settingName.js
748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import MineApi from '~/api/mineApi/index'
Page({
data: {
nickName:''
},
changeName(e){
this.setData({
nickName:e.detail.value
})
},
comfirm(){
const {user,nickName} = this.data
if(!nickName)return wx.$api.showToast('请输入名字')
let para = {
id: user.bussinessId,
platformEntrance: 'STORE_ASSISTANT',
staffName: nickName,
merchantNo:user.merchantId
}
MineApi.updateStaffDetailApi(para).then(res => {
wx.$eventbus.emit('SETTING')
wx.$router.back((p)=>{
p.setData({
'list_fill[0].value':nickName,
})
},1)
})
},
onRoute(options) {
this.setData({
nickName:options.name,
user:options.user
})
},
})