2023-11-28 17:27:10 +08:00
|
|
|
<template>
|
|
|
|
<view class="content">
|
|
|
|
<view class="container">
|
|
|
|
<view class="my-header">
|
2023-12-01 15:29:00 +08:00
|
|
|
<view class="my-icons"> </view>
|
2023-11-29 13:11:01 +08:00
|
|
|
<view class="my-text"></view>
|
2023-11-28 17:27:10 +08:00
|
|
|
<view class="my-icons"></view>
|
|
|
|
</view>
|
2023-11-29 13:11:01 +08:00
|
|
|
<view class="top-box"></view>
|
2023-11-28 17:27:10 +08:00
|
|
|
<!-- 顶部区域 -->
|
2023-11-29 13:58:22 +08:00
|
|
|
|
2023-12-28 17:31:50 +08:00
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
2023-11-29 13:11:01 +08:00
|
|
|
<button class="dl-box" open-type='getPhoneNumber' @getphonenumber="getPhone">手机号快捷登录</button>
|
2023-12-28 17:31:50 +08:00
|
|
|
<!-- #endif -->
|
|
|
|
<!-- #ifdef MP-ALIPAY -->
|
|
|
|
<button class="dl-box" open-type="getPhoneNumber" @getphonenumber="getUserLogin">手机号快捷登录</button>
|
|
|
|
<!-- #endif -->
|
2023-12-01 15:29:00 +08:00
|
|
|
<button class="kk-box" @click="goback">我再看看</button>
|
2023-11-29 13:11:01 +08:00
|
|
|
<view class="dbottom">
|
|
|
|
<view class="quanzi" v-if="qindex == false " @click="qindex =! qindex"></view>
|
|
|
|
<view class="lanquanzi" v-if="qindex == true" @click="qindex =! qindex"><u-icon name="checkbox-mark"
|
|
|
|
color="#ffffff" size="14"></u-icon></view>
|
|
|
|
<text>请仔细阅读</text>
|
|
|
|
<text class="lan">《用户协议》</text>
|
|
|
|
<text>和</text>
|
|
|
|
<text class="lan">《隐私政策》</text>
|
|
|
|
</view>
|
2023-11-28 17:27:10 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
2023-11-29 14:34:32 +08:00
|
|
|
|
2023-11-28 17:27:10 +08:00
|
|
|
<script>
|
2023-12-28 17:31:50 +08:00
|
|
|
import request from '../../utils/request'
|
2023-11-28 17:27:10 +08:00
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
title: '',
|
2023-11-29 13:11:01 +08:00
|
|
|
qindex: false,
|
2023-11-28 17:27:10 +08:00
|
|
|
baseUrl: this.$baseUrl,
|
2023-12-28 17:31:50 +08:00
|
|
|
appltType:uni.getStorageSync("appltType"),
|
2023-11-28 17:27:10 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad() {
|
|
|
|
console.log(this.$baseUrl);
|
|
|
|
|
|
|
|
},
|
2023-12-01 15:29:00 +08:00
|
|
|
components: {},
|
2023-11-28 17:27:10 +08:00
|
|
|
methods: {
|
2023-12-25 18:10:00 +08:00
|
|
|
// 获取支付宝userid
|
2023-12-28 17:31:50 +08:00
|
|
|
getUserLogin(e) {
|
|
|
|
// if (this.qindex == false) {
|
|
|
|
// uni.showToast({
|
|
|
|
// icon: "none",
|
|
|
|
// title: "请阅读并勾选用户协议",
|
|
|
|
// duration: 2000
|
|
|
|
// })
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
console.log(e)
|
2023-12-29 15:27:06 +08:00
|
|
|
|
2023-12-25 18:10:00 +08:00
|
|
|
let _this = this;
|
|
|
|
my.getAuthCode({
|
|
|
|
scopes: 'auth_base',
|
|
|
|
success: res => {
|
|
|
|
const authCode = res.authCode;
|
|
|
|
console.log(res)
|
|
|
|
request({
|
2023-12-28 17:31:50 +08:00
|
|
|
url: "clientApi/sign/alipayLogin/getUserid",
|
2023-12-25 18:10:00 +08:00
|
|
|
method: 'post',
|
2023-12-28 17:31:50 +08:00
|
|
|
data: {
|
|
|
|
authCode:authCode,
|
2023-12-29 15:27:06 +08:00
|
|
|
storeId:0,
|
|
|
|
staffId:"",
|
|
|
|
phone:"18457621459",
|
2023-12-28 17:31:50 +08:00
|
|
|
},
|
2023-12-25 18:10:00 +08:00
|
|
|
}).then((resp)=>{
|
|
|
|
console.log(resp)
|
2023-12-29 15:27:06 +08:00
|
|
|
if (resp.code == 200) {
|
|
|
|
|
|
|
|
uni.setStorageSync('App-Token', resp.data.token);
|
|
|
|
uni.setStorageSync('chainStoreId', resp.data.chainStoreId);
|
|
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/index/index'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
console.log("swq", uni.getStorageSync(
|
|
|
|
'App-Token'));
|
2023-12-25 18:10:00 +08:00
|
|
|
})
|
|
|
|
},
|
|
|
|
fail: err => {
|
|
|
|
console.log('my.getAuthCode 调用失败', err)
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
2023-12-01 15:29:00 +08:00
|
|
|
wxlogin() {},
|
2023-11-28 17:27:10 +08:00
|
|
|
getPhone(e) {
|
|
|
|
let that = this
|
|
|
|
// if (this.privacyPolicyChecked == false) {
|
|
|
|
// uni.showToast({
|
|
|
|
// icon: "none",
|
|
|
|
// title: "请阅读并勾选用户协议",
|
|
|
|
// duration: 2000
|
|
|
|
// })
|
|
|
|
// return;
|
|
|
|
// }
|
2023-12-28 17:31:50 +08:00
|
|
|
console.log(e)
|
2023-11-28 17:27:10 +08:00
|
|
|
uni.login({
|
|
|
|
provider: 'weixin',
|
|
|
|
success(res) {
|
|
|
|
if (res.code) {
|
|
|
|
uni.setStorageSync('c1', res.code);
|
|
|
|
console.log('weixin', res.code);
|
|
|
|
} else {
|
|
|
|
console.log('登录失败!' + res.errMsg)
|
|
|
|
}
|
|
|
|
|
2023-12-28 17:31:50 +08:00
|
|
|
// console.log(e);
|
2023-11-28 17:27:10 +08:00
|
|
|
uni.checkSession({
|
|
|
|
success: () => {
|
|
|
|
uni.request({
|
|
|
|
url: that.baseUrl + "clientApi/sign/mpWxLogin",
|
|
|
|
method: "POST",
|
|
|
|
data: {
|
|
|
|
code: uni.getStorageSync('c1'),
|
|
|
|
encryptedIv: e.detail.iv,
|
|
|
|
encryptedData: e.detail.encryptedData,
|
|
|
|
userInfo: {
|
2023-11-29 16:48:44 +08:00
|
|
|
storeId: 0,
|
2023-11-28 17:27:10 +08:00
|
|
|
staffId: "",
|
2023-12-22 16:33:34 +08:00
|
|
|
phone: '18457621459'
|
2023-11-28 17:27:10 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
type: 'phone',
|
|
|
|
inviteId: uni.getStorageSync('inviteId') ? uni
|
|
|
|
.getStorageSync(
|
|
|
|
'inviteId') : null
|
|
|
|
},
|
|
|
|
success: (rex) => {
|
|
|
|
console.log('请求成功', rex)
|
2023-11-29 13:58:22 +08:00
|
|
|
if (rex.data.code == 200) {
|
2023-12-01 15:29:00 +08:00
|
|
|
|
|
|
|
uni.setStorageSync('App-Token', rex.data.data
|
|
|
|
.token);
|
2023-12-05 13:33:30 +08:00
|
|
|
uni.setStorageSync('chainStoreId', rex.data
|
|
|
|
.data
|
|
|
|
.chainStoreId);
|
|
|
|
|
2023-12-29 09:15:55 +08:00
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/index/index'
|
|
|
|
})
|
2023-11-29 13:58:22 +08:00
|
|
|
}
|
2023-12-01 15:29:00 +08:00
|
|
|
console.log("swq", uni.getStorageSync(
|
2023-12-05 13:33:30 +08:00
|
|
|
'App-Token'));
|
2023-11-28 17:27:10 +08:00
|
|
|
},
|
|
|
|
fail: (res) => {
|
|
|
|
console.log("fail", res);
|
|
|
|
uni.showToast({
|
|
|
|
icon: "error",
|
|
|
|
title: "登录失败,请重新点击并授权!",
|
|
|
|
duration: 2000
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
fail: () => {
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'error',
|
|
|
|
duration: 2000,
|
|
|
|
title: "登录状态过期,重新登录"
|
|
|
|
});
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
goback() {
|
|
|
|
uni.navigateBack()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.content {
|
2023-11-29 13:11:01 +08:00
|
|
|
background: #ffffff;
|
2023-11-29 13:58:22 +08:00
|
|
|
|
2023-11-28 17:27:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.container {
|
|
|
|
width: 100%;
|
|
|
|
height: 100vh;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding-top: 88px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.my-header {
|
|
|
|
width: 100%;
|
|
|
|
height: 88px;
|
2023-11-29 13:11:01 +08:00
|
|
|
background: #3c91f4;
|
2023-11-28 17:27:10 +08:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
color: #000;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 0px 15px;
|
|
|
|
padding-top: 40px;
|
|
|
|
z-index: 99999;
|
|
|
|
|
|
|
|
.my-icons {
|
|
|
|
width: 20px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
position: fixed;
|
|
|
|
top: 0px;
|
|
|
|
}
|
2023-12-01 15:29:00 +08:00
|
|
|
|
|
|
|
.dl {
|
2023-11-29 13:11:01 +08:00
|
|
|
height: 40px;
|
|
|
|
background: #2F72F7;
|
|
|
|
border-radius: 50px;
|
2023-11-29 13:58:22 +08:00
|
|
|
|
|
|
|
|
2023-11-29 13:11:01 +08:00
|
|
|
}
|
2023-12-01 15:29:00 +08:00
|
|
|
|
|
|
|
.top-box {
|
2023-11-29 13:11:01 +08:00
|
|
|
width: 100%;
|
|
|
|
height: 60vh;
|
|
|
|
background: url('http://47.95.206.185:83/lgoin.png')center no-repeat;
|
|
|
|
background-size: 100% 100%;
|
|
|
|
background-attachment: fixed;
|
|
|
|
|
|
|
|
}
|
2023-12-01 15:29:00 +08:00
|
|
|
|
|
|
|
.dl-box {
|
2023-11-29 13:11:01 +08:00
|
|
|
width: 80%;
|
|
|
|
height: 45px;
|
|
|
|
background: #2F72F7;
|
|
|
|
color: white;
|
|
|
|
border-radius: 50px;
|
2023-12-28 17:31:50 +08:00
|
|
|
margin: 0 auto;
|
2023-11-29 13:11:01 +08:00
|
|
|
}
|
2023-12-01 15:29:00 +08:00
|
|
|
|
|
|
|
.kk-box {
|
2023-11-29 13:11:01 +08:00
|
|
|
width: 80%;
|
|
|
|
height: 45px;
|
|
|
|
background: #F0F3FA;
|
|
|
|
color: #333333;
|
|
|
|
border-radius: 50px;
|
|
|
|
border: 1px solid #F0F3FA;
|
|
|
|
margin: 10px auto;
|
|
|
|
}
|
2023-12-01 15:29:00 +08:00
|
|
|
|
2023-11-29 13:11:01 +08:00
|
|
|
.dbottom {
|
|
|
|
width: 100%;
|
|
|
|
text-align: center;
|
|
|
|
font-size: 12px;
|
|
|
|
color: #333333;
|
|
|
|
margin-top: 40px;
|
|
|
|
position: fixed;
|
|
|
|
bottom: 45px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
2023-11-29 13:58:22 +08:00
|
|
|
|
2023-11-29 13:11:01 +08:00
|
|
|
.quanzi {
|
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
border: 1px solid #666666;
|
|
|
|
border-radius: 50%;
|
|
|
|
margin-right: 10px;
|
|
|
|
}
|
2023-11-29 13:58:22 +08:00
|
|
|
|
2023-11-29 13:11:01 +08:00
|
|
|
.lanquanzi {
|
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
border: 1px solid #0078FF;
|
|
|
|
border-radius: 50%;
|
|
|
|
margin-right: 10px;
|
|
|
|
background: #0078FF;
|
|
|
|
color: white;
|
|
|
|
}
|
2023-11-29 13:58:22 +08:00
|
|
|
|
2023-11-29 13:11:01 +08:00
|
|
|
.lan {
|
|
|
|
color: #0078FF;
|
|
|
|
}
|
2023-11-29 13:58:22 +08:00
|
|
|
|
2023-11-29 13:11:01 +08:00
|
|
|
.jiuzhong {
|
|
|
|
width: 90%;
|
|
|
|
margin: 10px auto;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2023-11-29 13:58:22 +08:00
|
|
|
|
2023-11-29 13:11:01 +08:00
|
|
|
.dist {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
margin: 0px 10px;
|
|
|
|
}
|
2023-11-29 13:58:22 +08:00
|
|
|
|
2023-11-29 13:11:01 +08:00
|
|
|
.d-zi {
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
2023-11-29 13:58:22 +08:00
|
|
|
|
2023-11-29 13:11:01 +08:00
|
|
|
.d-qian {
|
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
margin-right: 5px;
|
|
|
|
overflow: hidden;
|
|
|
|
border-radius: 50%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
border: 1px solid #666666;
|
|
|
|
color: white;
|
|
|
|
}
|
2023-11-29 13:58:22 +08:00
|
|
|
|
2023-11-29 13:11:01 +08:00
|
|
|
.d-qian-lan {
|
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
margin-right: 5px;
|
|
|
|
overflow: hidden;
|
|
|
|
border-radius: 50%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
background: #0078FF;
|
|
|
|
border: 1px solid #0078FF;
|
|
|
|
color: white;
|
|
|
|
}
|
2023-12-01 15:29:00 +08:00
|
|
|
</style>
|