Commit c3f4a9bc authored by geruidan's avatar geruidan

Merge branch 'defaultScreenImgV1' into 'defaultScreenImg'

Default screen img v1

See merge request !2
parents 7ec51e25 4a58a1ab
......@@ -3,12 +3,12 @@
*/
// export const BASE_URL = 'http://172.18.0.229:9001' //后台根域名 https://demo.shopro.top
export const BASE_URL = 'https://wx.zhonghuihaotai.com' //后台根域名 https://demo.shopro.top
export const BASE_URL = 'https://wxcs.zhonghuihaotai.com' //后台根域名 https://demo.shopro.top
// export const BASE_URL = 'https://wxcs.zhonghuihaotai.com' //后台根域名 https://demo.shopro.top
export const API_URL = `${BASE_URL}/api/a1/` //后台接口域名
export const IMG_URL = 'http://file.shopro.top' //全局网络图片地址变量,css背景图片地址变量在uni.scss
export const MAP_KEY = '426ebc3f1bbaced***89ee6061a98'; //高德地图开发者Web服务key,逆坐标解析
export const HAS_LIVE = false //后台是否开通直播权限,根据情况在manifest.json中,开启注释相应组件的引入,pages.json中打开直播
// http://172.18.1.66:9001/api/a1/mall/homePage/mp?code={前端传入的code}
export const MALL_ID ="101656910000414";
export const COMPANY_ID ="0210010";
export const MALL_ID ="119583623123146";
export const COMPANY_ID ="625";
......@@ -54,7 +54,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wx94a3f5be1ea552ec",
"appid" : "wx91fa336def077983",
"setting" : {
"urlCheck" : false,
"minified" : true
......
......@@ -63,11 +63,38 @@
"enablePullDownRefresh": false
}
}
},
{
"path" : "pages/agreement/conceal",
"style" :
{
"navigationBarTitleText": "用户隐私协议",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/agreement/user",
"style" :
{
"navigationBarTitleText": "用户服务协议",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/h5/bindPh",
"style" :
{
"navigationBarTitleText": "立即绑定",
"enablePullDownRefresh": false
}
}
],
"subPackages":[],
"tabBar": {
......@@ -106,7 +133,7 @@
"list": [
{
"name": "pay", //模式名称
"path": "/pages/h5/pay" //启动页面,必选
"path": "/pages/index/defalutScreen" //启动页面,必选
}
]
},
......
This diff is collapsed.
This diff is collapsed.
<template>
<view class="bindPh">
<view class="btn">
<u-button v-if="!checked" @click="judgeAgree" type="primary" text="微信授权" color="#00c791"></u-button>
<u-button v-else open-type="getPhoneNumber" @getphonenumber="getInfoPhoneNumber" type="primary" text="微信授权" color="#00c791"></u-button>
</view>
<view class="agree">
<label class="radio" @click="agreeChange"><radio value="r1" :checked="checked" style="transform:scale(0.7);" />我已阅读并同意</label> <text class="blue" @click="agreement('user')">《用户服务协议》</text><text class="blue" @click="agreement('conceal')">《用户隐私政策》</text>
</view>
</view>
</template>
<script>
import {
mapActions,
mapGetters
} from 'vuex'
import http from '@/shopro/request/index';
import qs from 'qs';
export default {
data() {
return {
value:1,
checked:false
}
},
methods: {
...mapActions(['getPhoneNumber']),
agreement(flag){
uni.navigateTo({
url: `/pages/agreement/${flag}`,
})
},
agreeChange(event){
this.checked = !this.checked;
console.log(this.checked)
},
// 判断协议是否勾选
judgeAgree(){
console.log(this.checked)
if(!this.checked) {
uni.showToast({
title:"请先勾选同意协议",
duration: 2000,
icon:'none'
})
return false;
}
},
// 获取手机号
async getInfoPhoneNumber(e) {
let ph = await this.getPhoneNumber(e);
http('user.editPhone', qs.stringify({"mobile":ph})).then(res => {
if(res.code == 0) {
uni.showToast({
title: '绑定成功',
duration: 2000,
icon:'none'
});
uni.navigateTo({
url: `/pages/h5/index?appointPage=personalCenter`
})
}else{
uni.showToast({
title: res.msg,
duration: 2000,
icon:'none'
});
}
})
}
}
}
</script>
<style lang="scss" scoped>
.bindPh{
margin: 0 auto;
padding: 300rpx 0 ;
width: 90%;
margin: 0 auto;
// text-align: center;
.btn{
}
.agree{
margin-top:30rpx;
font-size: 25rpx;
.blue{
color: #4395ff;
}
}
}
</style>
<template>
<view class="screen-container">
<image class="bg" src="../../static/img/screen/screen-bg.png" mode="scaleToFill" />
<button v-if="unregistered" @click="changeTabBar" class="btn">
<button @click="enter" class="btn">
马上进入
</button>
<button v-else class="btn" open-type="getPhoneNumber" @getphonenumber="getInfoPhoneNumber">
<!-- open-type="getPhoneNumber" @getphonenumber="getInfoPhoneNumber" -->
<!-- <button v-else class="btn" @click="getInfoPhoneNumber">
微信授权登录
</button>
</button> -->
</view>
</template>
<script>
......@@ -28,28 +29,27 @@
},
methods: {
...mapActions(['getPhoneNumber', 'registerInfoFn', 'authCheck', 'getUserInfo']),
// 切换底部tab;
changeTabBar() {
// 马上进入
enter() {
if (this.unregistered) {
uni.navigateTo({
url: '/pages/h5/index',
})
}
},
}else{
this.getInfoPhoneNumber()
}},
// 获取手机号
async getInfoPhoneNumber(e) {
let number = await this.getPhoneNumber(e);
// let number = await this.getPhoneNumber(e);
let register = await this.registerInfoFn();
if (register) { //注册成功
this.unregistered = true;
uni.showToast({
title: "授权成功,点击马上进入",
duration: 2000,
icon:'none'
});
this.unregistered = true;
uni.navigateTo({
url: '/pages/h5/index',
})
}
},
async authAndWeRun() {
async auth() {
let auth = await this.authCheck();
console.log("调用authcheck的值"+auth)
let that = this;
......@@ -77,7 +77,7 @@
if (this.checkSessionStatus && token) {
let token = uni.getStorageSync('token');
console.log("token的值===================="+token)
this.authAndWeRun();
this.auth();
} else {
console.log("走吗1")
// session 不存在,调用login。userInfo 。更新session
......
......@@ -43,7 +43,12 @@ export default {
url:'order/status',
auth: true,
method: "get"
}
},
editPhone:{
url:'mall/member/addPhone',
auth: true,
method: "post"
},
},
index:{
......
......@@ -144,13 +144,13 @@ const actions = {
// 注册用户
registerInfoFn({commit,state},e){
return new Promise((resolve,reject) => {
if(!state.registerInfo.mobile){
uni.showToast({
title: "手机号为空",
duration: 2000,
icon:'none'
});
}
// if(!state.registerInfo.mobile){
// uni.showToast({
// title: "手机号为空",
// duration: 2000,
// icon:'none'
// });
// }
http('user.register', state.registerInfo).then(res => {
if (res.code==0) {
resolve(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment