Commit 13857647 by 张晓玮

Merge branch 'feat_v3.0' into 'zhangxw_dev_3.0'

Feat v3.0

See merge request !139
2 parents f7c4cb77 c12c5494
......@@ -75,7 +75,7 @@ Page({
if(code == '0' && loginUserInfoList?.length){
target = loginUserInfoList.find(item => item.merchantId== this.data.linkParams.merchantId)
}
if(target && target.staffLabel){
if(target && target.department){
this.register(detail)
}else{
this.isTypeEmpty(detail)
......
......@@ -111,18 +111,26 @@ Page({
weChatNickName: merchantFileRequest.fileName,
weChatAvatarUrl: merchantFileRequest.fileUrl
}
wx.showLoading()
USERAPI.register(params).then((res) => {
if (res.code == '0'){
this.toLogin()
}else if(res.errId == '200122'){
wx.hideLoading()
this.init(2)
}else{
wx.hideLoading()
wx.$api.showToast(res.message || '系统异常')
}
}).catch(({
errMsg
}) => {
wx.hideLoading()
wx.$api.showToast(errMsg || '系统异常')
})
//
},
toLogin(){
wx.showLoading()
USERAPI.authUserPhone(this.data.dataFromOptions.detail, this.loginToken).then(({
code,
data,
......@@ -132,15 +140,17 @@ Page({
if (code == '0'){
this.checkLoginUserInfo(data)
}else if(errId == '200122'){
wx.hideLoading()
this.init(1)
}else{
wx.hideLoading()
wx.$api.showToast(message || '系统异常')
}
}).catch(({
errMsg
}) => {
this.setShowLoading(false)
wx.$api.showToast('系统异常')
wx.hideLoading()
wx.$api.showToast(errMsg || '系统异常')
})
},
checkLoginUserInfo({
......
......@@ -26,6 +26,7 @@
}
.placeholder{
margin-top: 2rpx;
color:#999999;
}
.depart-name,input{
display: inline-block;
......
......@@ -8,7 +8,8 @@
</view>
<view class="info-item" bindtap="selectDepartment">
<text class="label">部门</text>
<text class="depart-name">{{department.name}}</text>
<text wx:if="{{department.id}}" class="depart-name">{{department.name}}</text>
<text wx:else style="color:#999999;" class="depart-name">请选择部门</text>
<image class="right-arrow" src="{{IMGURL}}right_arrow_grey_icon.png"></image>
</view>
</view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!