Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
zhwy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 775cfc2e
authored
Sep 26, 2023
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
37dba5ff
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
136 additions
and
17 deletions
api/env/index.js
api/module/system.js
app.json
pages/loading/loading.js
pages/tab/index/index.js
pages/tab/index/index.wxml
api/env/index.js
View file @
775cfc2
import
{
preReleaseAppId
}
from
'~/config'
import
{
preReleaseAppId
}
from
'~/config'
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
]
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
]
let
index
=
1
let
index
=
2
/**
/**
*
*
...
@@ -108,9 +108,9 @@ const pathEnum = {
...
@@ -108,9 +108,9 @@ const pathEnum = {
const
defaultMerchantId
=
{
const
defaultMerchantId
=
{
ip
:
'44211227'
,
ip
:
'44211227'
,
dev
:
'44211227'
,
dev
:
'44211227'
,
uat
:
'4421
0895
'
,
uat
:
'4421
1651
'
,
prod
:
'44208317'
,
prod
:
'44208317'
,
preRelease
:
'442
11283
'
preRelease
:
'442
09566
'
}[
target
[
index
]]
}[
target
[
index
]]
const
CONFIG_ENV_MAP
=
{
const
CONFIG_ENV_MAP
=
{
...
...
api/module/system.js
View file @
775cfc2
...
@@ -6,7 +6,7 @@ const serverConfig = {
...
@@ -6,7 +6,7 @@ const serverConfig = {
mockTimer
:
{},
mockTimer
:
{},
mockCache
:
null
,
mockCache
:
null
,
};
};
const
configModule
=
'mini-
hmd
'
const
configModule
=
'mini-
wuye
'
const
configUrl
=
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=
${
configModule
}
&env=
${
env
}
`
;
const
configUrl
=
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=
${
configModule
}
&env=
${
env
}
`
;
/**获取mock数据 */
/**获取mock数据 */
...
...
app.json
View file @
775cfc2
{
{
"pages"
:
[
"pages"
:
[
"pages/loading/loading"
,
"pages/tab/index/index"
,
"pages/tab/index/index"
,
"pages/tab/equity/index"
,
"pages/tab/equity/index"
,
"pages/tab/mall/index"
,
"pages/tab/mall/index"
,
...
...
pages/loading/loading.js
View file @
775cfc2
...
@@ -26,7 +26,7 @@ Page({
...
@@ -26,7 +26,7 @@ Page({
if
(
options
.
url
)
{
if
(
options
.
url
)
{
return
this
.
login
(
options
)
return
this
.
login
(
options
)
}
}
this
.
login
()
this
.
login
(
options
)
},
},
async
login
(
options
=
{})
{
async
login
(
options
=
{})
{
if
(
options
.
merchantId
)
wx
.
$merchant_id
=
options
.
merchantId
if
(
options
.
merchantId
)
wx
.
$merchant_id
=
options
.
merchantId
...
...
pages/tab/index/index.js
View file @
775cfc2
const
navStyle
=
"background-color: transparent;"
;
const
navStyle
=
"background-color: transparent;"
;
import
{
IMG_URL
}
from
'../../../config'
import
{
IMG_URL
}
from
'~/config'
;
import
{
env
}
from
'~/api/env/index'
Page
({
Page
({
data
:
{
data
:
{
IMG_URL
,
IMG_URL
,
navStyle
,
navStyle
,
noticeContent
:
true
,
noticeContent
:
''
,
noticeContent
:
'卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡卡'
,
bannerList
:
[],
bannerList
:
[{
bannerImg
:
'https://img02.glsx.com.cn/weapp/resource/miniprogram/wuye/home/banner_test.png'
}],
codeList
:
[{
codeList
:
[{
title
:
'官方'
,
title
:
'官方'
,
desc
:
'福利群'
,
desc
:
'福利群'
,
...
@@ -20,8 +18,9 @@ Page({
...
@@ -20,8 +18,9 @@ Page({
tip
:
'超多福利,不容错过'
,
tip
:
'超多福利,不容错过'
,
url
:
'fuliguan'
url
:
'fuliguan'
}],
}],
showModal
:
false
,
showModal
:
false
,
urlName
:
''
urlName
:
''
,
merchantName
:
'深圳中海美居'
},
},
navbarReady
(
e
)
{
navbarReady
(
e
)
{
let
{
height
}
=
e
.
detail
;
let
{
height
}
=
e
.
detail
;
...
@@ -38,6 +37,7 @@ Page({
...
@@ -38,6 +37,7 @@ Page({
});
});
},
},
onLoad
()
{
onLoad
()
{
this
.
getHomeConfig
()
this
.
getStrategyList
();
this
.
getStrategyList
();
},
},
...
@@ -50,7 +50,6 @@ Page({
...
@@ -50,7 +50,6 @@ Page({
mainFlag
:
1
,
mainFlag
:
1
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
console
.
log
(
res
);
this
.
setData
({
this
.
setData
({
strategyList
:
res
.
list
,
strategyList
:
res
.
list
,
});
});
...
@@ -83,4 +82,121 @@ Page({
...
@@ -83,4 +82,121 @@ Page({
toCarLife
()
{
toCarLife
()
{
wx
.
p
.
router
.
go
(
"/packageIndex/pages/carLife/index"
);
wx
.
p
.
router
.
go
(
"/packageIndex/pages/carLife/index"
);
},
},
getHomeConfig
()
{
wx
.
p
.
api
.
homeApi
.
getHomeConfig
().
then
(
data
=>
{
let
{
merchantName
,
noticeContent
}
=
data
// let {
// userInfo
// } = this.data
//在线客服
// let customerlist = []
// if (data.customerServerName && data.customerServerOrCode) {
// customerlist.push({
// staffName: data.customerServerName,
// qrCode: data.customerServerOrCode,
// thumbAvatar: data.customerServerAvatar,
// staffPhone: data.customerServerPhone
// })
// }
// let utilList = [..._utilList_]
// if (data.clueList && data.clueList.length) {
// /**clueId 1:救援服务,2:维保预约,3:新车频道 */
// // const clueList = {
// // 2: {
// // name: '维保预约',
// // url: '/packageShopmall/packageIndex/pages/reservation/index/index',
// // icon: 'mainten-appoint',
// // hideMenu: true
// // },
// // 3: {
// // name: '新车频道',
// // url: '/packageShopmall/packageIndex/pages/newCars/index/index',
// // icon: 'new-car-channel',
// // badge: '特价新车'
// // },
// // 4: {
// // name: '代驾服务',
// // h5: '',
// // icon: 'sub-driving'
// // },
// // 5: {
// // name: '精品商城',
// // url: '',
// // icon: 'shop_icon',
// // tabBar: true
// // }
// // }
// // data.clueList.map(e => {
// // if (e.clueId == 1) {
// // let rescueTypeList = [{
// // confId: 0,
// // name: '紧急脱困',
// // icon: 'emergency_relief_icon'
// // },
// // {
// // confId: 1,
// // name: '拖车',
// // icon: 'trailer_icon'
// // },
// // {
// // confId: 2,
// // name: '换胎',
// // icon: 'trie_change_icon'
// // },
// // {
// // confId: 3,
// // name: '送油',
// // icon: 'send_oil_icon'
// // },
// // {
// // confId: 4,
// // name: '搭电',
// // icon: 'pick_up_power_icon'
// // },
// // {
// // confId: 5,
// // name: '事故救援',
// // icon: 'accident_rescue_icon'
// // }
// // ]
// // rescueTypeList.forEach(v => {
// // utilList.push({
// // ...v,
// // // url: 'packageEquity.road.index'
// // url: '/packageShopmall/packageEquity/pages/road/index/index'
// // })
// // })
// // } else utilList.push(clueList[e.clueId])
// // })
// }
let
bannerList
=
[]
if
(
data
.
bannerList
&&
data
.
bannerList
.
length
)
bannerList
=
data
.
bannerList
bannerList
.
unshift
({
bannerImg
:
`
${
this
.
data
.
IMG_URL
}
home/banner_test.png`
,
equity
:
true
})
this
.
setData
({
merchantName
,
noticeContent
,
bannerList
})
wx
.
hideLoading
()
})
},
// 门店切换
changeStore
(){
console
.
log
(
env
);
const
currentMerchantId
=
wx
.
$merchant_id
const
merchantObj
=
{
'develop'
:[
44211227
,
44209845
],
'test'
:[
44211651
,
44211654
],
'beta'
:[],
'production'
:[
44209566
,
44209565
],
}
const
MerchantList
=
merchantObj
[
env
]
console
.
log
(
MerchantList
);
},
});
});
pages/tab/index/index.wxml
View file @
775cfc2
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<view class="store-wrap">
<view class="store-wrap">
<view class="inner flex_sc">
<view class="inner flex_sc">
<glsx-image class="logo" webp src="home/store_logo.png"></glsx-image>
<glsx-image class="logo" webp src="home/store_logo.png"></glsx-image>
<view class="store_name">
深圳中海美居
</view>
<view class="store_name">
{{merchantName}}
</view>
<view class="change_box">
<view
bind:tap="changeStore"
class="change_box">
<glsx-image class="icon" webp src="home/change_store_icon.png"></glsx-image>
<glsx-image class="icon" webp src="home/change_store_icon.png"></glsx-image>
</view>
</view>
</view>
</view>
...
@@ -44,7 +44,9 @@
...
@@ -44,7 +44,9 @@
</block>
</block>
</view>
</view>
<!-- 省钱攻略 -->
<!-- 省钱攻略 -->
<MoneySavingTips list="{{strategyList}}" bind:selectStrategy="selectStrategy"></MoneySavingTips>
<block wx:if="{{strategyList.length}}">
<MoneySavingTips list="{{strategyList}}" bind:selectStrategy="selectStrategy"></MoneySavingTips>
</block>
</view>
</view>
<!-- 弹框 -->
<!-- 弹框 -->
<view wx:if="{{showModal}}" class="modal_widget">
<view wx:if="{{showModal}}" class="modal_widget">
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment