[锶源昆仑-寺庙捐赠活动]

This commit is contained in:
2023-05-15 13:53:32 +08:00
parent 1b6eb2668c
commit c9b18c9074
284 changed files with 9505 additions and 3822 deletions

View File

@@ -6,21 +6,31 @@
</view>
未注册的手机号码将自动注册
</view>
<!-- 姓名 -->
<view class="inputs">
<input type="text" v-model="name" placeholder="输入您的姓名" maxlength="4" />
</view>
<!-- 输入手机号相关 -->
<view class="inputs phone">
<label class="label">+86</label>
<input type="number" placeholder="输入您的手机号码" maxlength="11" v-model="phone" />
<label class="label">+86</label>
<input type="number" placeholder="输入您的手机号码" maxlength="11" v-model="tel" />
</view>
<view class="inputs sms">
<input type="number" placeholder="输入短信验证码" maxlength="4" v-model="code" />
<button class="sms-btn" type="default" size="mini" :disabled="phone == '' || getSms"
<button class="sms-btn" type="default" size="mini" :disabled="tel == '' || getSms"
@click="getPhoneCode">{{getSms ? '重新发送' + smsTime + 's': '发送验证码'}}</button>
</view>
<view class="inputs">
<input placeholder="邀请码 (选填)" maxlength="10" v-model="parentId" />
</view>
<button class="btn" type="default" :disabled="phone == '' || code == ''" @click="login">登录</button>
<view class="beianNo">黑ICP备2021013714号-1</view>
<button class="btn" type="default" :disabled="tel == '' || code == ''" @click="login">登录</button>
<!-- 用户登录注册协议 -->
<view class="agreement">
<checkbox-group @change="radioChange">
<checkbox color="#4490ff" :checked="checked" size='10' class="radioGroup" />
</checkbox-group>
<view class="agreement-text">
登录即表示同意用户<view @click="$Router.push({name: 'Agreement', params: {name : 'secret'}})">隐私协议</view><view @click="$Router.push({name: 'Agreement', params: {name : 'protocol'}})">服务协议</view>
</view>
</view>
<!-- <view class="beianNo">黑ICP备2021013714号-1</view> -->
</view>
</template>
@@ -32,30 +42,65 @@
export default {
data() {
return {
phone : "",
name : "",
code : "",
parentId: "",
smsTime : 60,
parentId: "",
tel : '', //获取手机号
channelId: '', //渠道码
newUser : '', //是否为新用户
smsTime : 60,
checked : false, //勾选协议
getSms : false
}
},
mounted(){
this.parentId = this.$Route.query.invite || ''
this.parentId = this.$store.getters.getParentId
this.channelId = this.$Route.query.channel || ''
this.name = this.$Route.query.name
this.tel = this.$Route.query.tel
},
methods: {
// 用户登录
login() {
smsAuth({
mobileNo : this.phone,
mobileNo : this.tel,
code : this.code,
invite : this.parentId
invite : this.parentId,
channel : this.channelId,
name : this.name
}).then(res => {
this.$store.commit('setToken', res.token_type + ' ' + res.access_token)
if(this.$Route.toName){
this.$store.commit('setIntive', res.invite)
if(this.checked) {
this.$store.commit('setToken', res.token_type + ' ' + res.access_token)
if(this.$Route.query.skuId){
this.$Router.replace({
name: 'indexPlace',
params: {
name : this.name,
skuId : this.$Route.query.skuId
},
})
return
}
this.$Router.back()
}else{
this.$Router.replaceAll({name: 'Index'})
}
// if(this.$Route.toName){
// }else{
// // this.$Router.back()
// if(getApp().globalData.envType == 'indexPage') {
// this.$Router.replaceAll({name: 'Index'})
// } else if(getApp().globalData.envType == 'userPage') {
// this.$Router.replaceAll({name: 'Index'})
// } else {
// this.$Router.replaceAll({name: 'Index'})
// }
// }
} else {
uni.showToast({
title: '请勾选用户隐私和服务协议',
icon: "none"
})
}
}).catch(err => {
uni.showToast({
title: err.message,
@@ -67,8 +112,9 @@
getPhoneCode() {
let outTime
getSms({
mobileNo: this.phone
}).then(res => {
mobileNo: this.tel
}).then(res => {
this.newUser = res.new
uni.showToast({
title: res,
icon: "none"
@@ -88,7 +134,12 @@
icon: "none"
})
})
}
},
// 勾选协议
radioChange() {
this.checked = !this.checked
}
}
}
</script>
@@ -97,7 +148,7 @@
.content {
height: 100vh;
width: 100vw;
padding: $padding * 3;
padding: $padding * 3 $padding * 2;
box-sizing: border-box;
background: white;
@@ -206,11 +257,9 @@
line-height: 90rpx;
height: 90rpx;
font-weight: bold;
&::after {
border: none;
}
&[disabled] {
background: rgba($color: $mian-color, $alpha: .6);
}
@@ -219,7 +268,31 @@
font-size: $title-size-sm;
color: $text-gray;
text-align: center;
padding-top: $padding*2;
padding-top: $padding*2;
position: fixed;
width: 100%;
left: 0;
bottom: 50rpx;
}
}
}
// 协议
.agreement {
font-size: $title-size-sm;
color: $text-gray;
margin-top: $margin - 10;
display: flex;
.radioGroup {
transform: scale(.6);
width: 55rpx;
text-align: left;
}
.agreement-text {
width: calc(100% - 55rpx);
line-height: 48rpx;
view {
color: #000;
display: inline-block;
}
}
}
</style>