mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-22 00:49:37 +08:00
111 lines
1.9 KiB
JavaScript
111 lines
1.9 KiB
JavaScript
let app = getApp();
|
|
|
|
import Notify from '@vant/weapp/notify/notify';
|
|
|
|
import {
|
|
flowHandleRq
|
|
} from "../../../../api/repair/repair.js"
|
|
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
IMG_NAME: app.IMG_NAME,
|
|
id: null,
|
|
content: '',
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad(options) {
|
|
let _this = this;
|
|
|
|
_this.setData({
|
|
...options,
|
|
})
|
|
},
|
|
|
|
// input输入内容监听
|
|
fieldInput(e) {
|
|
console.log('fieldInput', e);
|
|
let _this = this;
|
|
let detail = _this.data;
|
|
detail[e.currentTarget.dataset.name] = e.detail
|
|
_this.setData({
|
|
...detail
|
|
})
|
|
},
|
|
|
|
// 提交
|
|
submit() {
|
|
let _this = this
|
|
let data = {
|
|
"repair": {
|
|
"id": _this.data.id
|
|
},
|
|
"content": _this.data.content,
|
|
"operate": "END"
|
|
}
|
|
flowHandleRq(data).then(res => {
|
|
console.log('flowHandleRq', res);
|
|
if (res.code == 0) {
|
|
app.vantNotifySuccess(Notify, res.msg)
|
|
app.selfBackPage(2)
|
|
} else {
|
|
app.vantNotifyErr(Notify, res.msg)
|
|
}
|
|
})
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面隐藏
|
|
*/
|
|
onHide() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面卸载
|
|
*/
|
|
onUnload() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
*/
|
|
onPullDownRefresh() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
onReachBottom() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage() {
|
|
|
|
}
|
|
}) |