Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mini_own
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
geruidan
mini_own
Commits
ae53f900
Commit
ae53f900
authored
Mar 28, 2023
by
小耗子
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
正式版本上线
parent
463292c4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
15 deletions
+57
-15
cmd.md
cmd.md
+25
-1
env.js
env.js
+4
-2
pages/h5/index.vue
pages/h5/index.vue
+7
-2
pages/index/index.vue
pages/index/index.vue
+6
-3
shopro/store/modules/user.js
shopro/store/modules/user.js
+11
-7
shopro/utils/base.js
shopro/utils/base.js
+4
-0
No files found.
cmd.md
View file @
ae53f900
#### 测试
### 微信步数(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
```
env.js
View file @
ae53f900
...
...
@@ -3,10 +3,12 @@
*/
// export const BASE_URL = 'http://172.18.0.229:9001' //后台根域名 https://demo.shopro.top
export
const
BASE_URL
=
'
https://wx
cs
.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
pages/h5/index.vue
View file @
ae53f900
...
...
@@ -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
)
}
})
...
...
pages/index/index.vue
View file @
ae53f900
...
...
@@ -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
;
}
})
})
...
...
shopro/store/modules/user.js
View file @
ae53f900
// 用户数据模块
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
'
});
re
solve
(
res
.
code
)
re
ject
(
res
.
code
)
}
});
})
...
...
@@ -182,12 +185,13 @@ const actions = {
duration
:
2000
,
icon
:
'
none
'
});
re
ject
(
res
.
data
);
re
solve
(
0
);
}
})
},
fail
:
function
(
err
){
console
.
log
(
err
)
resolve
(
0
);
uni
.
showToast
({
title
:
"
您未授权微信步数,请点击右上角...进去设置开启授权
"
,
duration
:
2000
,
...
...
shopro/utils/base.js
0 → 100644
View file @
ae53f900
export
const
companyId
=
""
export
const
mallId
=
""
export
const
mallId
=
""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment