Commit e9e4c3cd authored by 小耗子's avatar 小耗子

无卡无手机号小程序绑定授权

parent 87e41774
......@@ -10,7 +10,6 @@ export const IMG_URL = 'http://file.shopro.top' //全局网络图片地址变量
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 ="159339311100563";
export const COMPANY_ID ="00000730";
export const MALL_ID ="101656910000414";
export const COMPANY_ID ="0210010";
\ No newline at end of file
......@@ -54,18 +54,19 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wxa8257c2ee2213e3e",
"appid" : "wx94a3f5be1ea552ec",
"setting" : {
"urlCheck" : false,
"minified" : false
"minified" : false,
"es6" : false,
"postcss" : false
},
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "获取您的信息位置"
}
},
"navigateToMiniprogramAppIDList":["wx91d27dbf599dff74"]
}
},
"mp-alipay" : {
"usingComponents" : true
......
......@@ -36,7 +36,7 @@ AppID:wx91fa336def077983
AppSecret: 7f2855a8ff743f1f295ecb9af07f5998
```
### 无步数商城小程序-谷民市集 :正式
### 无步数商城小程序-谷民市集 :正式
```
商城:101656910000414 上海元更科技
企业:0210010
......
......@@ -21,7 +21,8 @@
data() {
return {
value:1,
checked:false
checked:false,
appointPage:''
}
},
methods: {
......@@ -58,7 +59,7 @@
icon:'none'
});
uni.navigateTo({
url: `/pages/h5/index?appointPage=personalCenter`
url: `/pages/h5/index?appointPage=${this.appointPage}`
})
}else{
uni.showToast({
......@@ -70,6 +71,9 @@
})
}
},
onLoad(option){
this.appointPage = option.appointPage;
}
}
</script>
......
......@@ -49,6 +49,7 @@
},
onLaunch(){
}
}
</script>
<style>
......
<template>
<view class="screen-container">
<image class="bg" src="../../static/img/screen/screen-bg.png" mode="scaleToFill" />
<button @click="enter" class="btn">
马上进入
</button>
<!-- open-type="getPhoneNumber" @getphonenumber="getInfoPhoneNumber" -->
<!-- <button v-else class="btn" @click="getInfoPhoneNumber">
微信授权登录
</button> -->
<view class="">
<view class="load">
<u-loading-page
loading-color="#61b077"
color="#61b077"
:loading="loading"
></u-loading-page>
</view>
<view class="screen-container">
<image class="bg" src="../../static/img/screen/screen-bg.png" mode="scaleToFill" />
<button :disabled="loading" @click="enter" class="btn">
马上进入
</button>
</view>
</view>
</template>
<script>
import http from '@/shopro/request/index';
......@@ -21,7 +28,9 @@
data() {
return {
unregistered: false,
checkSessionStatus: false
checkSessionStatus: false,
loading: true
}
},
computed: {
......@@ -31,7 +40,7 @@
...mapActions(['getPhoneNumber', 'registerInfoFn', 'authCheck', 'getUserInfo']),
// 马上进入
enter() {
if (this.unregistered) {
if (this.unregistered && !this.loading) {
uni.navigateTo({
url: '/pages/h5/index',
})
......@@ -52,6 +61,7 @@
async auth() {
let auth = await this.authCheck();
console.log("调用authcheck的值"+auth)
this.loading = false;
let that = this;
if (auth == 0) {
that.unregistered = true;
......@@ -88,7 +98,10 @@
let userInfo = that.getUserInfo(info.code);
userInfo.then(res => {
that.authCheck().then(checkCode => {
that.loading = false;
if (checkCode == 0) {
console.log("checkcode拿到了拿到了")
console.log(checkCode)
that.unregistered = true;
}else if(checkCode == 2001){
that.unregistered = false;
......@@ -99,6 +112,7 @@
},
fail:function(err){
console.log(err)
that.loading = false;
uni.showToast({
title: err,
duration: 2000,
......@@ -111,6 +125,7 @@
},
async getAuth() {
this.loading = true;
let that = this;
uni.checkSession({ //校验session
success(res) { //有效
......@@ -139,7 +154,6 @@
},
onShareAppMessage(res){
return {
// title: '微信步数',
path: 'pages/index/defalutScreen'
}
}
......
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