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

正式版本上线

parent 463292c4
#### 测试
### 微信步数(zhmp):中汇内购
```
商城:106975910000477 测试环境小程序
......@@ -10,4 +11,27 @@
企业:625 商城小程序
AppID:wx91fa336def077983
AppSecret: 7f2855a8ff743f1f295ecb9af07f5998
```
\ No newline at end of file
```
#### 正式
### 微信步数(zhmp):正式
```
商城:133507311100590
企业:202203282
APPID: wx60c6530c49c52ff7
```
### 理品堂步数小程序
```
企业:741
商城id:169782111100588
AppID(小程序ID) :wxf462b300a28539ec
AppSecret(小程序密钥) :aafbb74ee3e6dcc1c567d6c6ac721870
```
### 无步数商城小程序 :正式
```
商城:189099911100589
企业:20230328
AppID:wx91fa336def077983
AppSecret: 7f2855a8ff743f1f295ecb9af07f5998
```
......@@ -3,10 +3,12 @@
*/
// export const BASE_URL = 'http://172.18.0.229:9001' //后台根域名 https://demo.shopro.top
export const BASE_URL = 'https://wxcs.zhonghuihaotai.com' //后台根域名 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 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}
\ No newline at end of file
// http://172.18.1.66:9001/api/a1/mall/homePage/mp?code={前端传入的code}
export const MALL_ID ="133507311100590";
export const COMPANY_ID ="202203282";
\ No newline at end of file
......@@ -6,6 +6,12 @@
<script>
import http from '@/shopro/request/index';
// import http from '@/shopro/request/index';
import {
BASE_URL,
MALL_ID,
COMPANY_ID
} from "@/env";
export default {
data() {
return {
......@@ -28,8 +34,7 @@
if (!res.code && res.data) {
let code = res.data.sfCode;
let time = new Date().getTime();
this.webUrl= `https://wxcs.zhonghuihaotai.com/webpage/wxdist/index.html#/${this.appointPage?this.appointPage:""}?mallId=106975910000477&companyId=999999998&time=${time}&sfCode=${code}&authMode=force`
// this.webUrl = `https://wxcs.zhonghuihaotai.com/webpage/wxdist/index.html#/?mallId=106975910000477&companyId=999999998&time=${time}&sfCode=${code}`
this.webUrl= `${BASE_URL}/webpage/wxdist/index.html#/${this.appointPage?this.appointPage:""}?mallId=${MALL_ID}&companyId=${COMPANY_ID}&time=${time}&sfCode=${code}&authMode=force`
console.log(this.webUrl)
}
})
......
......@@ -102,15 +102,15 @@
async authAndWeRun() {
let auth = await this.authCheck();
console.log("调用authcheck的值"+auth)
let that = this;
this.loading = false;
if (auth == 0) {
let runData = await this.getWeRunDataFn();
console.log("调用this.loading的值"+this.loading)
runData && (this.unregistered = true);
this.loading = false;
} else if (auth == 2001) {
this.unregistered = false;
this.loading = false;
}
console.log("调用this.loading的值"+this.loading)
},
async loginSession() {
let token = uni.getStorageSync('token');
......@@ -143,10 +143,13 @@
let userInfo = that.getUserInfo(info.code);
userInfo.then(res => {
that.authCheck().then(checkCode => {
console.log("处理lll"+checkCode)
if (checkCode == 0) {
that.getWeRunDataFn().then(runData => {
runData && (that.unregistered = true);
})
}else if(checkCode == 2001){
that.unregistered = false;
}
})
})
......
// 用户数据模块
import http from '@/shopro/request/index'
import api from "@/shopro/request/index";
import {
MALL_ID,
COMPANY_ID
} from "@/env";
const state = {
mallId:'106975910000477',
mallId:MALL_ID,
sessionkey: uni.getStorageSync("sessionkey") || "",
userInfo: {},
registerInfo: {//注册信息
companyId: '999999998', //开放式传
companyId: COMPANY_ID, //开放式传
mobile: '', //封闭式传
empcardno: '', //封闭式传
registerType: 'register' //注册时的类型为普通注册
......@@ -38,8 +42,6 @@ const actions = {
return new Promise((resolve, reject) => {
uni.setStorageSync("mallId", state.mallId);
// console.log(state.wxCode)
// let code = state.wxCode;
http('user.getHomePage', {
code: code,
mallId: state.mallId
......@@ -47,7 +49,8 @@ const actions = {
if (!res.code) {
let { sessionKey } = res.data;
uni.setStorageSync("sessionKey", sessionKey)
commit('userInfo', res.data);
// commit('userInfo', res.data);
state.userInfo = res.data;
let token = encodeURI(JSON.stringify(res.data))
uni.setStorageSync("token", token)
resolve(1);
......@@ -97,7 +100,7 @@ const actions = {
duration: 2000,
icon:'none'
});
resolve(res.code)
reject(res.code)
}
});
})
......@@ -182,12 +185,13 @@ const actions = {
duration: 2000,
icon:'none'
});
reject(res.data);
resolve(0);
}
})
},
fail:function(err){
console.log(err)
resolve(0);
uni.showToast({
title: "您未授权微信步数,请点击右上角...进去设置开启授权",
duration: 2000,
......
export const companyId =""
export const mallId =""
export const mallId =""
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