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

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

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