Compare commits

...

4 Commits

Author SHA1 Message Date
wuxw
99b73e71e1 加入用户协议和隐私政策 2025-10-14 11:58:51 +08:00
wuxw
ec15a49027 Merge https://gitee.com/java110/WechatOwnerService 2025-10-14 11:57:55 +08:00
wuxw
6254b7061a 加入用户协议和隐私政策 2025-10-14 11:57:13 +08:00
wuxw
8ec446f2e3 优化商圈 错位问题 2025-10-10 10:37:15 +08:00
7 changed files with 113 additions and 43 deletions

View File

@ -0,0 +1,52 @@
<template>
<view>
<view class="padding flex justify-start">
<checkbox-group @change="_changeReadme">
<checkbox style="transform: scale(0.7)" :checked="readme" value="readme"></checkbox>
</checkbox-group>
<view class="read-me">
<text class="margin-left-xs">我已阅读并同意</text>
<text class="user-read" @click="_readMe('protocol')">用户协议</text>
<text ></text>
<text class="user-read" @click="_readMe('secure')">隐私政策</text>
</view>
</view>
</view>
</template>
<script>
export default {
name:"user-protocol",
data() {
return {
readme:true,
};
},
methods:{
_readMe:function(_type){
uni.navigateTo({
url:'/pages/login/registerProtocol?type='+_type
})
},
_changeReadme:function(e){
if(e.detail.value && e.detail.value.length>0){
this.readme = true;
}else{
this.readme =false;
}
this.$emit('readme',this.readme)
},
}
}
</script>
<style>
.read-me{
line-height: 64upx;
}
.user-read{
margin-left: 10upx;
color: darkgreen;
}
</style>

View File

@ -8,7 +8,8 @@
</template>
<script>
import {
import { boolAttrs } from '../jyf-parser/libs/config';
import {
wechatLogin
} from '@/api/user/userApi.js';
import {
@ -27,6 +28,12 @@
appId:''
};
},
props: {
readme: {
type: Boolean,
default: false,
},
},
methods: {
_initWechatLogin: function() {
let _that = this;
@ -43,6 +50,7 @@
});
},
_getPhoneNumber(e) {
if (e.detail.errMsg === "getPhoneNumber:ok") {
//
const {
@ -61,6 +69,13 @@
}
},
_loginByPhoneNumber() {
if(!this.readme){
wx.showToast({
title: '请阅读用户协议和隐私政策',
icon: "none"
});
return;
}
wechatLogin({
encryptedData: this.encryptedData,
iv: this.iv,

View File

@ -324,8 +324,7 @@
}, {
"path": "pages/mall/mall",
"style": {
"navigationBarTitleText": "商圈",
"navigationStyle": "custom"
"navigationBarTitleText": "商圈"
}
},
{

View File

@ -1,7 +1,7 @@
<template>
<view>
<service-property></service-property>
<!-- <service-homemaking></service-homemaking> -->
<!-- <service-homemaking></service-homemaking> -->
</view>
</template>

View File

@ -31,7 +31,7 @@
<view class="padding flex flex-direction margin-top">
<button class="cu-btn bg-blue lg" @click="_doLogin()">登录</button>
<!-- #ifdef MP-WEIXIN -->
<wechat-login ref="wechatLoginRef"></wechat-login>
<wechat-login ref="wechatLoginRef" :readme="readme"></wechat-login>
<!-- #endif -->
</view>
<!-- #ifdef H5 -->
@ -40,6 +40,9 @@
<view class="text-green" @click="_doRegister()">注册</view>
</view>
<!-- #endif -->
<user-protocol @readme="_readme"></user-protocol>
</view>
</template>
@ -48,6 +51,7 @@
var _this;
import wInput from '@/components/watch-input.vue' //input
import wButton from '@/components/watch-button.vue' //button
import userProtocol from '../../components/user/user-protocol.vue';
import {
sendSmsCode,
ownerLogin,
@ -77,14 +81,15 @@
data() {
return {
logoUrl: '',
username: '',
password: '',
username: '18909711234',
password: '123456',
code: "",
loginByPhone: false,
msgCode: '',
btnDisabled: false,
btnValue: '验证码',
phoneLoginName: '验证码登录'
phoneLoginName: '验证码登录',
readme:true
};
},
@ -104,11 +109,19 @@
// #endif
},
components:{
wechatLogin
wechatLogin,
userProtocol
},
methods: {
_doLogin: function() {
let _that = this;
if(!this.readme){
wx.showToast({
title: '请阅读用户协议和隐私政策',
icon: "none"
});
return;
}
if (this.username == '') {
wx.showToast({
title: '请填写用户名',
@ -163,6 +176,9 @@
}
this.username = '';
this.password = '';
},
_readme:function(_value){
this.readme = _value
}
}

View File

@ -18,15 +18,8 @@
<input v-model="msgCode" placeholder="请输入短信验证码" name="input"></input>
<button class='cu-btn bg-green shadow' :disabled="btnDisabled" @click="_sendMsgCode()">{{btnValue}}</button>
</view>
<view class="padding flex justify-start">
<checkbox-group @change="_changeReadme">
<checkbox style="transform: scale(0.7)" value="readme"></checkbox>
</checkbox-group>
<view class="read-me">
<text class="margin-left-xs">我已阅读</text>
<text class="user-read" @click="_readMe">用户须知</text>
</view>
</view>
<user-protocol @readme="_readme"></user-protocol>
<view class="padding flex flex-direction margin-top">
<button class="cu-btn bg-green lg" @click="_doRegister()">提交</button>
</view>
@ -38,6 +31,7 @@
const constant = context.constant;
import conf from '../../conf/config';
import {sendSmsCode,ownerRegiter} from '../../api/user/userApi.js';
import userProtocol from '../../components/user/user-protocol.vue';
export default {
data() {
@ -51,7 +45,7 @@
btnDisabled: false,
password: '',
rePassword: '',
readme:false,
readme:true,
};
},
/**
@ -60,17 +54,14 @@
onLoad: function(options) {
let _that = this;
},
components:{
userProtocol
},
methods: {
_sendMsgCode: function() {
sendSmsCode(this.link,this)
},
_changeReadme:function(e){
if(e.detail.value && e.detail.value.length>0){
this.readme = true;
}else{
this.readme =false;
}
},
_doRegister: function(e) {
let _communityId = uni.getStorageSync("DEFAULT_COMMUNITY_ID")
if(!_communityId){
@ -126,12 +117,11 @@
_that.areaCode = data.data[2].code;
console.log(data);
},
_readMe:function(){
uni.navigateTo({
url:'/pages/login/registerProtocol'
})
_readme:function(_value){
this.readme = _value
}
}
};
</script>
@ -149,12 +139,5 @@
text-align: center;
}
.read-me{
line-height: 64upx;
}
.user-read{
margin-left: 10upx;
color: darkgreen;
}
</style>

View File

@ -12,20 +12,25 @@
export default {
data() {
return {
protocol: ''
protocol: '',
type:'protocol'
}
},
onLoad() {
onLoad(options) {
this.type = options.type;
this._loadProtocol();
},
components: {
jyfParser
},
methods: {
_loadProtocol: function() {
_loadProtocol: function() {
let _that = this;
getRegisterProtocol().then(_data => {
getRegisterProtocol().then(_data => {
_that.protocol = _data[0].userProtocol
if(_that.type == 'secure'){
_that.protocol = _data[0].merchantProtocol
}
})
}
}