You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
181 lines
3.7 KiB
181 lines
3.7 KiB
// pages/user_moudle/checkpending/checkpending.js
|
|
var api = require('../../../api/checkpendingrequest.js')
|
|
import { $wuxSelect } from '../../../dist/index'
|
|
import {
|
|
$wuxToast
|
|
} from '../../../dist/index'
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
detailsData: {},
|
|
authenticatedFlag: '1',
|
|
authenticatedFlagValue: '审核通过>',
|
|
remark:'',
|
|
userId: '',
|
|
isBlock: true,
|
|
focus: false,//默认没获取焦点
|
|
viewData: ""
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad: function (options) {
|
|
this.setData({
|
|
userId: options.userId
|
|
})
|
|
this.handleResidentDetail();
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面隐藏
|
|
*/
|
|
onHide: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面卸载
|
|
*/
|
|
onUnload: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
*/
|
|
onPullDownRefresh: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
onReachBottom: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage: function () {
|
|
|
|
},
|
|
/**
|
|
* 认证提交
|
|
*/
|
|
handleAuti: function () {
|
|
let that = this
|
|
|
|
if (this.data.authenticatedFlag == '0' && this.data.remark.trim() == ''){//未通过
|
|
$wuxToast().show({
|
|
type: 'text',
|
|
duration: 3000,
|
|
color: '#fff',
|
|
text: '请填写未通过原因',
|
|
success: () => console.log('')
|
|
})
|
|
return false
|
|
}
|
|
let params = {
|
|
"authenticatedFlag": this.data.authenticatedFlag,
|
|
"userId": this.data.userId,
|
|
"remark": this.data.remark
|
|
}
|
|
if (this.data.authenticatedFlag == '0') { //未通过
|
|
api.authenticateResidentNoPass(params).then(function(res) {
|
|
that.togUserList()
|
|
console.log(res)
|
|
})
|
|
} else {
|
|
api.authenticateResidentPass(params).then(function(res) {
|
|
that.togUserList()
|
|
console.log(res)
|
|
})
|
|
}
|
|
// api.authenticateResident(params).then(function (res) {
|
|
// that.togUserList()
|
|
// console.log(res)
|
|
// })
|
|
},
|
|
// 用户详情
|
|
handleResidentDetail: function () {
|
|
let that = this
|
|
let params = {
|
|
userId: this.data.userId
|
|
}
|
|
api.getResidentDetail(params).then(function (res) {
|
|
that.setData({
|
|
detailsData: res.data
|
|
})
|
|
console.log(res)
|
|
})
|
|
},
|
|
// 筛选列表
|
|
onSelectLinisting () {
|
|
$wuxSelect('#wux-select').open({
|
|
value: this.data.value1,
|
|
options: [
|
|
'审核未通过',
|
|
'审核通过',
|
|
],
|
|
onConfirm: (value, index, options) => {
|
|
console.log('onConfirm', value, index, options)
|
|
if (index !== -1) {
|
|
this.setData({
|
|
authenticatedFlagValue: options[index] + '>',
|
|
authenticatedFlag: index,
|
|
})
|
|
}
|
|
},
|
|
})
|
|
},
|
|
// 跳转认证历史详情
|
|
authenticationHistory: function () {
|
|
wx.navigateTo({
|
|
url: '../certificationhistorydetails/certificationhistorydetails?userId=' + this.data.userId
|
|
})
|
|
},
|
|
//认证之后跳转 列表
|
|
togUserList: function () {
|
|
wx.navigateBack({
|
|
delta: 1
|
|
})
|
|
},
|
|
getRemark(e) {
|
|
this.setData({
|
|
remark: e.detail.value,
|
|
isBlock: true,//失去焦点以后view隐藏
|
|
viewData: e.detail.value
|
|
})
|
|
},
|
|
handleAreaInput(e){
|
|
this.setData({
|
|
remark:e.detail.value
|
|
})
|
|
},
|
|
// Textarea的显示层级太高导致遮挡,通过点击view代替Textarea显示
|
|
clickTextarea() {
|
|
this.setData({
|
|
isBlock: false,
|
|
focus: true
|
|
})
|
|
}
|
|
})
|