mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-06-12 10:00:57 +08:00
加入注册功能
This commit is contained in:
parent
879cbdb67b
commit
b8b4fd6c54
@ -100,3 +100,32 @@ export function uploadImageAsync(_objData,_that) {
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 刷新用户
|
||||||
|
* @param {Object} _objData
|
||||||
|
*/
|
||||||
|
export function getRegisterProtocol(){
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
requestNoAuth({
|
||||||
|
url: url.listRegisterProtocol,
|
||||||
|
method: "GET",
|
||||||
|
data: {
|
||||||
|
page:1,
|
||||||
|
row:1
|
||||||
|
}, //动态数据
|
||||||
|
success: function(res) {
|
||||||
|
if (res.data.code == 0) {
|
||||||
|
resolve(res.data.data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
reject();
|
||||||
|
},
|
||||||
|
fail: function(e) {
|
||||||
|
reject();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -186,6 +186,7 @@ export default {
|
|||||||
deleteReserveGoodsPerson:baseUrl+"app/reserveOrder.deleteReserveGoodsPerson", // 查询预约订单
|
deleteReserveGoodsPerson:baseUrl+"app/reserveOrder.deleteReserveGoodsPerson", // 查询预约订单
|
||||||
listProductSeckill: baseUrl + "app/productSeckill.listProductSeckill",
|
listProductSeckill: baseUrl + "app/productSeckill.listProductSeckill",
|
||||||
listProductGroup: baseUrl + "app/productGroup.listProductGroup",
|
listProductGroup: baseUrl + "app/productGroup.listProductGroup",
|
||||||
|
listRegisterProtocol: baseUrl + "app/system.listRegisterProtocol",
|
||||||
|
|
||||||
|
|
||||||
NEED_NOT_LOGIN_PAGE: [
|
NEED_NOT_LOGIN_PAGE: [
|
||||||
|
|||||||
@ -703,6 +703,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/login/registerProtocol",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
"color": "#272636",
|
"color": "#272636",
|
||||||
|
|||||||
@ -18,9 +18,15 @@
|
|||||||
<input v-model="msgCode" placeholder="请输入短信验证码" name="input"></input>
|
<input v-model="msgCode" placeholder="请输入短信验证码" name="input"></input>
|
||||||
<button class='cu-btn bg-green shadow' :disabled="btnDisabled" @click="sendMsgCode()">{{btnValue}}</button>
|
<button class='cu-btn bg-green shadow' :disabled="btnDisabled" @click="sendMsgCode()">{{btnValue}}</button>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view >
|
<view class="padding flex justify-start">
|
||||||
<view >{{codeMsg}}</view>
|
<checkbox-group @change="_changeReadme">
|
||||||
</view> -->
|
<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>
|
||||||
<view class="padding flex flex-direction margin-top">
|
<view class="padding flex flex-direction margin-top">
|
||||||
<button class="cu-btn bg-green lg" @click="_doRegister()">绑定</button>
|
<button class="cu-btn bg-green lg" @click="_doRegister()">绑定</button>
|
||||||
</view>
|
</view>
|
||||||
@ -30,7 +36,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import context from '../../lib/java110/Java110Context.js';
|
import context from '../../lib/java110/Java110Context.js';
|
||||||
const constant = context.constant;
|
const constant = context.constant;
|
||||||
import conf from '../../conf/config'
|
import conf from '../../conf/config';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -44,7 +50,7 @@
|
|||||||
btnDisabled: false,
|
btnDisabled: false,
|
||||||
password: '',
|
password: '',
|
||||||
rePassword: '',
|
rePassword: '',
|
||||||
|
readme:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -113,6 +119,13 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
_changeReadme:function(e){
|
||||||
|
if(e.detail.value && e.detail.value.length>0){
|
||||||
|
this.readme = true;
|
||||||
|
}else{
|
||||||
|
this.readme =false;
|
||||||
|
}
|
||||||
|
},
|
||||||
_doRegister: function(e) {
|
_doRegister: function(e) {
|
||||||
let obj = {
|
let obj = {
|
||||||
"link": this.link,
|
"link": this.link,
|
||||||
@ -121,6 +134,14 @@
|
|||||||
"openId": uni.getStorageSync(constant.mapping.CURRENT_OPEN_ID),
|
"openId": uni.getStorageSync(constant.mapping.CURRENT_OPEN_ID),
|
||||||
"defaultCommunityId": conf.DEFAULT_COMMUNITY_ID
|
"defaultCommunityId": conf.DEFAULT_COMMUNITY_ID
|
||||||
}
|
}
|
||||||
|
if(!this.readme){
|
||||||
|
wx.showToast({
|
||||||
|
title: '未选择我已阅读《用户须知》',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
let msg = "";
|
let msg = "";
|
||||||
if (this.password == '' || this.password != this.rePassword) {
|
if (this.password == '' || this.password != this.rePassword) {
|
||||||
msg = "密码和重置密码不一致";
|
msg = "密码和重置密码不一致";
|
||||||
@ -137,7 +158,6 @@
|
|||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log("提交数据", obj);
|
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中',
|
title: '加载中',
|
||||||
mask: true
|
mask: true
|
||||||
@ -202,6 +222,11 @@
|
|||||||
promise.then((setTimer) => {
|
promise.then((setTimer) => {
|
||||||
clearInterval(setTimer)
|
clearInterval(setTimer)
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
_readMe:function(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/login/registerProtocol'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -219,4 +244,13 @@
|
|||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.read-me{
|
||||||
|
line-height: 64upx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-read{
|
||||||
|
margin-left: 10upx;
|
||||||
|
color: darkgreen;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
37
pages/login/registerProtocol.vue
Normal file
37
pages/login/registerProtocol.vue
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<view class="padding">
|
||||||
|
<jyf-parser :html="protocol" ref="article"></jyf-parser>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getRegisterProtocol
|
||||||
|
} from '../../api/common/commonApi.js';
|
||||||
|
import jyfParser from "@/components/jyf-parser/jyf-parser";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
protocol: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this._loadProtocol();
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
jyfParser
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
_loadProtocol: function() {
|
||||||
|
let _that = this;
|
||||||
|
getRegisterProtocol().then(_data => {
|
||||||
|
_that.protocol = _data[0].userProtocol
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user