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