|
|
@ -19,24 +19,24 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="inputRow"> |
|
|
|
<!-- <view class="inputRow"> |
|
|
|
<image src="../../static/baseIcon/code.png" mode="aspectFill" class="drawableLeft"></image> |
|
|
|
<input type="number" @input="codeText" maxlength="6" placeholder="请输入验证码" class="input" /> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
|
|
|
|
|
|
|
|
<view class="btn" @click="next"> |
|
|
|
<text class="btnText">绑定账号</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view v-show="!isShow"> |
|
|
|
|
|
|
|
<view v-show="!isShow"> |
|
|
|
<view style="display: flex;flex-direction: column;justify-content: center;width: 100%;margin-top: 50px;"> |
|
|
|
<text style="width: 100%;text-align: center;font-size: 35px;color: #f00;">抱歉!</text> |
|
|
|
<text style="margin: 20px; text-align: center;font-size: 30px;color: #f00;">您的平台应用未被授权,请联系工作人员。</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
</template> |
|
|
@ -45,7 +45,7 @@ |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
isShow:true, |
|
|
|
isShow: true, |
|
|
|
// 状态栏高度 |
|
|
|
statusBarHeight: 0, |
|
|
|
// 导航栏高度 |
|
|
@ -54,25 +54,15 @@ |
|
|
|
mobile: '', |
|
|
|
openid: '', |
|
|
|
code: '', |
|
|
|
unionid:"" |
|
|
|
unionid: "" |
|
|
|
} |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//第一次加载时调用 |
|
|
|
created() { |
|
|
|
//获取手机状态栏高度 |
|
|
|
this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight']; |
|
|
|
|
|
|
|
this.$bus.$on('isShow', msg => { |
|
|
|
//这里获取到http工具js文件中传过来的wholeSpin值 |
|
|
|
console.log("isShows>>>>>", msg) |
|
|
|
|
|
|
|
this.isShow = msg |
|
|
|
|
|
|
|
console.log("isShows>>>>>", this.isShow) |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
/* #ifdef MP-WEIXIN */ |
|
|
@ -80,44 +70,44 @@ |
|
|
|
/* #endif */ |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
console.log('=======', options) |
|
|
|
console.log('=======', options) |
|
|
|
this.page.openid = options.openid |
|
|
|
this.page.unionid = options.unionid |
|
|
|
console.log('this.page', this.page) |
|
|
|
|
|
|
|
console.log('this.page', this.page) |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
next() { |
|
|
|
var mobileLength = this.page.mobile.length; |
|
|
|
var codeLength = this.page.code.length; |
|
|
|
if (mobileLength == 0) { |
|
|
|
this.Toast("请输入手机号") |
|
|
|
return; |
|
|
|
} |
|
|
|
if (codeLength == 0) { |
|
|
|
this.Toast("验证码不能为空") |
|
|
|
uni.showToast({ |
|
|
|
icon: 'error', |
|
|
|
title: '手机号不能为空' |
|
|
|
}) |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
let _this = this |
|
|
|
console.log('1111', _this.page) |
|
|
|
_this.$api.wxBindMobile(_this.page).then((resp) => { |
|
|
|
// if (resp.success) { |
|
|
|
console.log('1111', resp) |
|
|
|
|
|
|
|
getApp().globalData.username = resp.userName |
|
|
|
getApp().globalData.token = resp.token |
|
|
|
getApp().globalData.sid = resp.sid |
|
|
|
getApp().globalData.mobile = resp.mobile |
|
|
|
getApp().globalData.isLogin = true |
|
|
|
getApp().globalData.sid = resp |
|
|
|
// getApp().globalData.token = resp.token |
|
|
|
// getApp().globalData.sid = resp.sid |
|
|
|
// getApp().globalData.mobile = resp.mobile |
|
|
|
// getApp().globalData.isLogin = true |
|
|
|
|
|
|
|
// _this.WritePreference("sysUserSid", res.data) |
|
|
|
// _this.WritePreference("isLogin", true) |
|
|
|
// getApp().globalData.isLogin = true |
|
|
|
// getApp().globalData.sysUserSid = res.data |
|
|
|
|
|
|
|
uni.navigateBack({ |
|
|
|
delta: 10, |
|
|
|
}); |
|
|
|
uni.switchTab({ |
|
|
|
url: '/pages/card/card' |
|
|
|
}) |
|
|
|
|
|
|
|
// uni.switchTab({ |
|
|
|
// url: '/pages/home/WorkFragment' |
|
|
@ -130,7 +120,7 @@ |
|
|
|
// showCancel: false, |
|
|
|
// success: function(res) { |
|
|
|
// if (res.confirm) { |
|
|
|
|
|
|
|
|
|
|
|
// } else { |
|
|
|
// console.log('点击了取消') |
|
|
|
// } |
|
|
@ -179,8 +169,8 @@ |
|
|
|
send(e) { //发送验证码 |
|
|
|
console.log(e); |
|
|
|
this.isShow = e.success |
|
|
|
console.log("this.isShow",this.isShow); |
|
|
|
|
|
|
|
console.log("this.isShow", this.isShow); |
|
|
|
|
|
|
|
}, |
|
|
|
codeText(e) { |
|
|
|
//验证码 |
|
|
|