Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
ad9ab5bd
Commit
ad9ab5bd
authored
Apr 08, 2024
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
e0f9e699
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
src/App.vue
+15
-10
No files found.
src/App.vue
View file @
ad9ab5bd
...
@@ -8,13 +8,18 @@ import { themeColor, checkShowConditionIds, getStoreInfo, setStoreInfo } from "@
...
@@ -8,13 +8,18 @@ import { themeColor, checkShowConditionIds, getStoreInfo, setStoreInfo } from "@
import
{
query_isEntry
}
from
"@/utils/mayi_fenxiao"
;
import
{
query_isEntry
}
from
"@/utils/mayi_fenxiao"
;
export
default
{
export
default
{
data
()
{
return
{
extConfig
:
{},
}
},
async
created
()
{
async
created
()
{
wx
.
setStorageSync
(
"firstView"
,
1
);
wx
.
setStorageSync
(
"firstView"
,
1
);
console
.
log
(
new
Date
().
getTime
(),
'load-----app-created'
)
console
.
log
(
new
Date
().
getTime
(),
'load-----app-created'
)
// NODE_ENV
// NODE_ENV
let
extConfig
=
wx
.
getExtConfigSync
?
wx
.
getExtConfigSync
()
:
{};
this
.
extConfig
=
wx
.
getExtConfigSync
?
wx
.
getExtConfigSync
()
:
{};
console
.
log
(
extConfig
,
"-----------
extConfig"
);
console
.
log
(
this
.
extConfig
,
"-----------this.
extConfig"
);
if
(
JSON
.
stringify
(
extConfig
)
==
"{}"
)
{
if
(
JSON
.
stringify
(
this
.
extConfig
)
==
"{}"
)
{
let
shopItem
=
{
let
shopItem
=
{
// development: { mixid: "IR8rkL", "shopid": 3813}, //道可测试1
// development: { mixid: "IR8rkL", "shopid": 3813}, //道可测试1
// development: { mixid: "iLntd3", "shopid": 3814}, //道可测试2
// development: { mixid: "iLntd3", "shopid": 3814}, //道可测试2
...
@@ -39,14 +44,14 @@ export default {
...
@@ -39,14 +44,14 @@ export default {
xhyx_prod
:
{
"mixid"
:
"xhyxshop"
,
"shopid"
:
1
},
xhyx_prod
:
{
"mixid"
:
"xhyxshop"
,
"shopid"
:
1
},
wly_prod
:
{
"mixid"
:
"WLYSWT"
,
"shopid"
:
2
}
wly_prod
:
{
"mixid"
:
"WLYSWT"
,
"shopid"
:
2
}
}
}
extConfig
=
shopItem
[
process
.
env
.
NODE_ENV
];
this
.
extConfig
=
shopItem
[
process
.
env
.
NODE_ENV
];
wx
.
setStorageSync
(
"extConfig"
,
JSON
.
stringify
(
extConfig
));
}
}
wx
.
setStorageSync
(
"extConfig"
,
JSON
.
stringify
(
this
.
extConfig
));
console
.
log
(
"
1444444444"
,
extConfig
);
console
.
log
(
"
extConfig->"
,
this
.
extConfig
);
this
.
$store
.
commit
(
"setExtConfig"
,
extConfig
.
mixid
);
this
.
$store
.
commit
(
"setExtConfig"
,
this
.
extConfig
.
mixid
);
this
.
$store
.
commit
(
'setExtConfigInfo'
,
extConfig
)
this
.
$store
.
commit
(
'setExtConfigInfo'
,
this
.
extConfig
)
// 调用API从本地缓存中获取数据
// 调用API从本地缓存中获取数据
/*
/*
* 平台 api 差异的处理方式: api 方法统一挂载到 mpvue 名称空间, 平台判断通过 mpvuePlatform 特征字符串
* 平台 api 差异的处理方式: api 方法统一挂载到 mpvue 名称空间, 平台判断通过 mpvuePlatform 特征字符串
...
@@ -70,12 +75,12 @@ export default {
...
@@ -70,12 +75,12 @@ export default {
mpvue
.
setStorageSync
(
"logs"
,
logs
);
mpvue
.
setStorageSync
(
"logs"
,
logs
);
}
}
// 初始
// 初始
await
this
.
getShopInfo
(
extConfig
);
await
this
.
getShopInfo
(
this
.
extConfig
);
// 页面配置信息
// 页面配置信息
this
.
getThemePage
(
extConfig
);
this
.
getThemePage
(
this
.
extConfig
);
let
mpApp
=
getApp
();
let
mpApp
=
getApp
();
console
.
log
(
mpApp
,
"this.mpApp"
);
console
.
log
(
mpApp
,
"this.mpApp"
);
mpApp
.
getShopInfo
=
this
.
getShopInfo
mpApp
.
getShopInfo
=
this
.
getShopInfo
...
...
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