Commit 4a58a1ab authored by geruidan's avatar geruidan

首页注册

parent 4e2f16d3
......@@ -4,15 +4,6 @@
"^mpShop-(.*)": "@/components/mpShop-$1/mpShop-$1.vue"
},
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path" : "pages/h5/bindPh",
"style" :
{
"navigationBarTitleText": "立即绑定",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/index/defalutScreen",
"style" :
......@@ -89,6 +80,15 @@
"enablePullDownRefresh": false
}
},
{
"path" : "pages/h5/bindPh",
"style" :
{
"navigationBarTitleText": "立即绑定",
"enablePullDownRefresh": false
}
}
......@@ -133,7 +133,7 @@
"list": [
{
"name": "pay", //模式名称
"path": "/pages/h5/pay" //启动页面,必选
"path": "/pages/index/defalutScreen" //启动页面,必选
}
]
},
......
......@@ -16,6 +16,7 @@
mapGetters
} from 'vuex'
import http from '@/shopro/request/index';
import qs from 'qs';
export default {
data() {
return {
......@@ -76,7 +77,7 @@
<style lang="scss" scoped>
.bindPh{
margin: 0 auto;
padding: 100rpx 0 ;
padding: 300rpx 0 ;
width: 90%;
margin: 0 auto;
// text-align: center;
......
<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>
<!-- open-type="getPhoneNumber" @getphonenumber="getInfoPhoneNumber" -->
<button v-else class="btn" @click="getInfoPhoneNumber">
<!-- <button v-else class="btn" @click="getInfoPhoneNumber">
微信授权登录
</button>
</button> -->
</view>
</template>
<script>
......@@ -29,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 register = await this.registerInfoFn();
if (register) { //注册成功
this.unregistered = true;
uni.showToast({
title: "授权成功,点击马上进入",
duration: 2000,
icon:'none'
});
uni.navigateTo({
url: '/pages/h5/index',
})
}
},
async authAndWeRun() {
async auth() {
let auth = await this.authCheck();
console.log("调用authcheck的值"+auth)
let that = this;
......@@ -78,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
......
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