|
|
|
@ -4,7 +4,8 @@ |
|
|
|
|
<cu-custom class="main-topbar bg-main-oil" bgColor="bg-main-oil" :isBack="true"> |
|
|
|
|
<block slot="content">星油云站</block> |
|
|
|
|
</cu-custom> |
|
|
|
|
<view class="bg-img margin flex padding-lg radius align-center text-center" :style="'background-image: url('+mainURL+'login-bg.png)'"> |
|
|
|
|
<view class="bg-img margin flex padding-lg radius align-center text-center" |
|
|
|
|
:style="'background-image: url('+mainURL+'login-bg.png)'"> |
|
|
|
|
<view class="padding-lg margin text-center text-lg text-white w100"> |
|
|
|
|
<text class>油站工作人员绑定油站</text> |
|
|
|
|
</view> |
|
|
|
@ -42,7 +43,7 @@ |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="bottom-part"> |
|
|
|
|
<service-hotline /> |
|
|
|
|
<service-hotline ref="serviceHotline" :checked='checked' @onCheck="checkAgree" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="cu-modal" :class="modalName"> |
|
|
|
|
<view class="cu-dialog"> |
|
|
|
@ -64,12 +65,15 @@ |
|
|
|
|
<official-account @binderror="bindload" @bindload="binderror"></official-account> |
|
|
|
|
<view class="text-center" @longpress="navToQr" @tap="toQr"> |
|
|
|
|
<view class=" img-view"> |
|
|
|
|
<image height="200" src="https://xingka51.oss-cn-hangzhou.aliyuncs.com/applets/cloudSite/yunzhan.jpg" mode="widthFix"></image> |
|
|
|
|
<image height="200" |
|
|
|
|
src="https://xingka51.oss-cn-hangzhou.aliyuncs.com/applets/cloudSite/yunzhan.jpg" |
|
|
|
|
mode="widthFix"></image> |
|
|
|
|
星油云站公众号 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="text-center padding-top padding-bottom"> |
|
|
|
|
<button class="cu-btn bg-red light round" open-type='contact' @tap="hideModal">未解决,联系在线客服</button> |
|
|
|
|
<button class="cu-btn bg-red light round" open-type='contact' |
|
|
|
|
@tap="hideModal">未解决,联系在线客服</button> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -85,10 +89,12 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="text-left padding-xl padding-bottom padding-top bg-white"> |
|
|
|
|
<view class="flex align-center justify-between margin-bottom-sm " v-for="(list,i) in oliList" :key='list' v-if="checkUser"> |
|
|
|
|
<view class="flex align-center justify-between margin-bottom-sm " v-for="(list,i) in oliList" |
|
|
|
|
:key='list' v-if="checkUser"> |
|
|
|
|
<view class=""> {{list.otherSiteName}}</view> |
|
|
|
|
<view class=""> |
|
|
|
|
<view class=" bg-red cu-btn text-white text-center btn-radius-10 text-sm" @tap="checkLists(list.channelId)"> |
|
|
|
|
<view class=" bg-red cu-btn text-white text-center btn-radius-10 text-sm" |
|
|
|
|
@tap="checkLists(list.channelId)"> |
|
|
|
|
进入 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -101,6 +107,23 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<uni-popup ref='popup'> |
|
|
|
|
<view class="protocol_body"> |
|
|
|
|
<view class="protocol_header"> |
|
|
|
|
使用协议及隐私保护 |
|
|
|
|
</view> |
|
|
|
|
<view class="protocol_content"> |
|
|
|
|
为了更好地保障您的合法权益,请您阅读并同意 <text style=" color: black; font-weight: 600;" |
|
|
|
|
@click="$refs.serviceHotline.toAgree('xoilCloudUserAgree')">《用户协议》</text> 与 <text |
|
|
|
|
style=" color: black; font-weight: 600;" |
|
|
|
|
@click="$refs.serviceHotline.toAgree('xoilCloudPrivacyAgreement')">《隐私政策》</text>。 |
|
|
|
|
</view> |
|
|
|
|
<view class="protocol_footer"> |
|
|
|
|
<button @click="$refs.popup.close()" class="protocol_footer_close">取消</button> |
|
|
|
|
<button @click="checked=true;$refs.popup.close();" class="protocol_footer_confirm">确定</button> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</uni-popup> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -128,17 +151,19 @@ |
|
|
|
|
auth: {}, |
|
|
|
|
tips: '发送验证码', |
|
|
|
|
frozen: false, // 二维码冷却时间 |
|
|
|
|
oliList:[ |
|
|
|
|
{ |
|
|
|
|
oliList: [{ |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}], |
|
|
|
|
checked: false |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
uni.showShareMenu() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
checkAgree(val) { |
|
|
|
|
this.checked = val |
|
|
|
|
}, |
|
|
|
|
bulrInput() { |
|
|
|
|
if (!this.auth.phone) { |
|
|
|
|
uni.showToast({ |
|
|
|
@ -185,10 +210,11 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
checkOli(n) { |
|
|
|
|
// if(!this.checkUser){ |
|
|
|
|
// this.checkList = 'show' |
|
|
|
|
// return |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
if (!this.checked) { |
|
|
|
|
this.$refs.popup.open('center') |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.checkType = n |
|
|
|
|
if (n == 0) { |
|
|
|
|
this.loginRandom() |
|
|
|
@ -246,78 +272,7 @@ |
|
|
|
|
binderror() { |
|
|
|
|
//console.log('组件夹杂失败') |
|
|
|
|
}, |
|
|
|
|
// loginWeixin() { |
|
|
|
|
// uni.login({ |
|
|
|
|
// provider: 'weixin', |
|
|
|
|
// success: loginRes => { |
|
|
|
|
// const code = loginRes.code |
|
|
|
|
// //console.log('启动页code', code) |
|
|
|
|
// oilIdentityApi.loginPersonal(code).then(res => { |
|
|
|
|
// //console.log(res) |
|
|
|
|
// if (res.code === 20000) { |
|
|
|
|
// uni.reLaunch({ |
|
|
|
|
// url: '/pages/index/index', |
|
|
|
|
// fail: (err) => { |
|
|
|
|
// //console.log(err) |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// uni.showToast({ |
|
|
|
|
// title: res.msg, |
|
|
|
|
// icon: 'success', |
|
|
|
|
// duration: 3000 |
|
|
|
|
// }) |
|
|
|
|
// uni.setStorage({ |
|
|
|
|
// key: 'Authorization', |
|
|
|
|
// data: res.data.authTokenDTO.accessToken, |
|
|
|
|
// success: () => { |
|
|
|
|
// //console.log('Authorization成功', res.data.authTokenDTO.accessToken) |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// uni.setStorage({ |
|
|
|
|
// key: 'unionId', |
|
|
|
|
// data: res.data.unionId, |
|
|
|
|
// success: () => { |
|
|
|
|
// //console.log('deviceunionId', res.data.unionId) |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// uni.setStorage({ |
|
|
|
|
// key: 'device', |
|
|
|
|
// data: res.data.openid, |
|
|
|
|
// success: () => { |
|
|
|
|
// //console.log('deviceopenid', res.data.openid) |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// uni.setStorageSync('userMenu', res.data.authTokenDTO.loginUser.roleMenus) |
|
|
|
|
// uni.setStorageSync('loginUser', { |
|
|
|
|
// id: res.data.authTokenDTO.loginUser.id, |
|
|
|
|
// name: res.data.authTokenDTO.loginUser.name, |
|
|
|
|
// userPhone: res.data.authTokenDTO.loginUser.userPhone |
|
|
|
|
// }) |
|
|
|
|
// } else { |
|
|
|
|
// uni.reLaunch({ |
|
|
|
|
// url: '/pages/login/boforeLogin/boforeLogin', |
|
|
|
|
// fail: (err) => { |
|
|
|
|
// //console.log(err) |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// //console.log('res', res.code) |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }).catch(err => { |
|
|
|
|
// uni.reLaunch({ |
|
|
|
|
// url: '/pages/login/boforeLogin/boforeLogin', |
|
|
|
|
// fail: (err) => { |
|
|
|
|
// //console.log(err) |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// }) |
|
|
|
|
// }, |
|
|
|
|
// fail: err => { |
|
|
|
|
// //console.log(err) |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// }, |
|
|
|
|
loginPwd(channelId) { |
|
|
|
|
uni.login({ |
|
|
|
|
provider: 'weixin', |
|
|
|
@ -380,12 +335,14 @@ |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
uni.setStorageSync('userMenu', res.data.authTokenDTO.loginUser.roleMenus) |
|
|
|
|
uni.setStorageSync('userMenu', res.data.authTokenDTO |
|
|
|
|
.loginUser.roleMenus) |
|
|
|
|
//console.log( '这里是获取userMenu处',res.data.authTokenDTO.loginUser.roleMenus) |
|
|
|
|
uni.setStorageSync('loginUser', { |
|
|
|
|
id: res.data.authTokenDTO.loginUser.id, |
|
|
|
|
name: res.data.authTokenDTO.loginUser.name, |
|
|
|
|
userPhone: res.data.authTokenDTO.loginUser.userPhone |
|
|
|
|
userPhone: res.data.authTokenDTO.loginUser |
|
|
|
|
.userPhone |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -431,11 +388,13 @@ |
|
|
|
|
//console.log('deviceopenid', res.data.openid) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
uni.setStorageSync('userMenu', res.data.authTokenDTO.loginUser.roleMenus) |
|
|
|
|
uni.setStorageSync('userMenu', res.data.authTokenDTO |
|
|
|
|
.loginUser.roleMenus) |
|
|
|
|
uni.setStorageSync('loginUser', { |
|
|
|
|
id: res.data.authTokenDTO.loginUser.id, |
|
|
|
|
name: res.data.authTokenDTO.loginUser.name, |
|
|
|
|
userPhone: res.data.authTokenDTO.loginUser.userPhone |
|
|
|
|
userPhone: res.data.authTokenDTO.loginUser |
|
|
|
|
.userPhone |
|
|
|
|
}) |
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: 'unionId', |
|
|
|
@ -473,7 +432,6 @@ |
|
|
|
|
username: this.auth.phone |
|
|
|
|
} |
|
|
|
|
oilIdentityApi.getVerifyCode(data2).then(res => { |
|
|
|
|
//console.log('res', res) |
|
|
|
|
this.auth.verifyCodeToken = res.data.verifyCodeToken |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.msg, |
|
|
|
@ -497,11 +455,8 @@ |
|
|
|
|
this.btnColor = '#FE0505' |
|
|
|
|
} |
|
|
|
|
}, 1000) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '请输入您的账号', |
|
|
|
@ -534,8 +489,6 @@ |
|
|
|
|
verifyCodeToken: this.auth.verifyCodeToken, //验证码 |
|
|
|
|
openId: res.data.openId |
|
|
|
|
} |
|
|
|
|
//console.log('device') |
|
|
|
|
//console.log(res.data.openId) |
|
|
|
|
uni.setStorage({ |
|
|
|
|
key: 'unionId', |
|
|
|
|
data: res.data.unionId, |
|
|
|
@ -552,14 +505,10 @@ |
|
|
|
|
}) |
|
|
|
|
uni.setStorageSync('checkFirst', true) |
|
|
|
|
oilIdentityApi.verifyCodeLogin(userData).then(res => { |
|
|
|
|
//console.log('res', res) |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: res.msg, |
|
|
|
|
icon: 'none' |
|
|
|
|
}) |
|
|
|
|
//console.log('Authorization') |
|
|
|
|
//console.log(res.data.authTokenDTO.loginUser.accessToken) |
|
|
|
|
//console.log('oilSiteCode', this.oilSiteNo) |
|
|
|
|
if (res.code === 20000) { |
|
|
|
|
uni.reLaunch({ |
|
|
|
|
url: '/pages/index/index', |
|
|
|
@ -579,12 +528,13 @@ |
|
|
|
|
//console.log('Authorization成功', res.data.authTokenDTO.accessToken) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
uni.setStorageSync('userMenu', res.data.authTokenDTO.loginUser.roleMenus) |
|
|
|
|
uni.setStorageSync('userMenu', res.data.authTokenDTO |
|
|
|
|
.loginUser.roleMenus) |
|
|
|
|
uni.setStorageSync('loginUser', { |
|
|
|
|
id: res.data.authTokenDTO.loginUser.id, |
|
|
|
|
name: res.data.authTokenDTO.loginUser.name, |
|
|
|
|
userPhone: res.data.authTokenDTO.loginUser.userPhone |
|
|
|
|
userPhone: res.data.authTokenDTO.loginUser |
|
|
|
|
.userPhone |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -653,9 +603,60 @@ |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
|
.protocol_footer_close { |
|
|
|
|
width: 185rpx; |
|
|
|
|
border-radius: 94rpx 94rpx 94rpx 94rpx; |
|
|
|
|
opacity: 1; |
|
|
|
|
border: 1px solid #000000; |
|
|
|
|
font-size: 26rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.protocol_footer_confirm { |
|
|
|
|
width: 185rpx; |
|
|
|
|
background: #FD0505; |
|
|
|
|
border-radius: 56rpx 56rpx 56rpx 56rpx; |
|
|
|
|
opacity: 1; |
|
|
|
|
font-size: 26rpx; |
|
|
|
|
color: #FFFFFF; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.protocol_footer { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
color: #FFFFFF; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.protocol_content { |
|
|
|
|
font-size: 32rpx; |
|
|
|
|
font-family: PingFang SC-Medium, PingFang SC; |
|
|
|
|
font-weight: 400; |
|
|
|
|
color: #666666; |
|
|
|
|
line-height: 46rpx; |
|
|
|
|
margin: 60rpx 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.protocol_header { |
|
|
|
|
width: 330rpx; |
|
|
|
|
height: 32rpx; |
|
|
|
|
font-size: 36rpx; |
|
|
|
|
color: #000000; |
|
|
|
|
width: 100%; |
|
|
|
|
text-align: center; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.protocol_body { |
|
|
|
|
background: #FFFFFF; |
|
|
|
|
border-radius: 20rpx 20rpx 20rpx 20rpx; |
|
|
|
|
opacity: 1; |
|
|
|
|
padding: 70rpx 50rpx; |
|
|
|
|
max-width: 634rpx; |
|
|
|
|
box-sizing: border-box; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.textshowCheck { |
|
|
|
|
flex-direction: column; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.page-content { |
|
|
|
|
min-height: 100%; |
|
|
|
|
position: relative; |
|
|
|
@ -688,6 +689,7 @@ |
|
|
|
|
width: 200upx; |
|
|
|
|
height: 200rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.btn-radius-10 { |
|
|
|
|
border-radius: 20upx; |
|
|
|
|
} |
|
|
|
|