mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-22 04:19:36 +08:00
113 lines
1.9 KiB
JavaScript
113 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)
|
||
|
wx.navigateBack({
|
||
|
delta: 2
|
||
|
})
|
||
|
} else {
|
||
|
app.vantNotifyErr(Notify, res.msg)
|
||
|
}
|
||
|
})
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 生命周期函数--监听页面初次渲染完成
|
||
|
*/
|
||
|
onReady() {
|
||
|
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 生命周期函数--监听页面显示
|
||
|
*/
|
||
|
onShow() {
|
||
|
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 生命周期函数--监听页面隐藏
|
||
|
*/
|
||
|
onHide() {
|
||
|
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 生命周期函数--监听页面卸载
|
||
|
*/
|
||
|
onUnload() {
|
||
|
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||
|
*/
|
||
|
onPullDownRefresh() {
|
||
|
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 页面上拉触底事件的处理函数
|
||
|
*/
|
||
|
onReachBottom() {
|
||
|
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 用户点击右上角分享
|
||
|
*/
|
||
|
onShareAppMessage() {
|
||
|
|
||
|
}
|
||
|
})
|