Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
hmd
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 f3660b39
authored
Jul 18, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改loading
1 parent
35a65de2
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
50 additions
and
34 deletions
api/env/index.js
api/module/common.js
api/request/http.js
packageEquity/pages/open/open.js
packageEquity/pages/open/open.wxml
pages/loading/loading.js
pages/loading/loading.json
pages/tab/index/index.wxml
pages/tab/mine/index.js
project.config.json
api/env/index.js
View file @
f3660b3
...
...
@@ -107,8 +107,8 @@ const pathEnum = {
}
const
defaultMerchantId
=
{
ip
:
'44210895'
,
dev
:
'4421
0895
'
,
uat
:
'442
10895
'
,
dev
:
'4421
1227
'
,
uat
:
'442
09846
'
,
prod
:
'44189923'
}[
target
[
index
]]
...
...
api/module/common.js
View file @
f3660b3
...
...
@@ -19,10 +19,6 @@ module.exports = {
noSignAttr
:
[
"file"
],
});
},
// /**根据sceneId 查参数 */
// getSceneById(data) {
// return http.post('dj.api.smartcarlife.common.getSceneById', data)
// },
/** 首页、发现列表 搜索接口 */
search
(
data
)
{
return
http
.
post
({
...
...
api/request/http.js
View file @
f3660b3
...
...
@@ -54,7 +54,7 @@ class Request {
}
:
{
'Cache-Control'
:
'no-cache'
}
header
.
merchantId
=
defaultMerchantId
header
.
merchantId
=
wx
.
$merchant_id
||
defaultMerchantId
let
projectName
=
this
.
getRopProject
(
params
.
method
)
if
(
!
projectName
)
projectName
=
this
.
getRopProject
(
params
.
method
)
const
path
=
pathEnum
[
projectName
]
...
...
packageEquity/pages/open/open.js
View file @
f3660b3
...
...
@@ -6,12 +6,14 @@ Page({
data
:
{
isOpen
:
false
,
openingStatus
:
false
,
IMGURKBASE
:
'equity/version/1_0_0/'
,
IMGURKBASE
:
'equity/version/1_0_0/'
,
},
// 获取门店会员卡信息
getMemberCardData
()
{
const
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
const
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
let
newMerchantId
=
merchantId
||
defaultMerchantId
let
para
=
{
merchantId
:
newMerchantId
...
...
@@ -56,15 +58,12 @@ Page({
},
// 去购买会员
async
openMemberFn
()
{
let
sid
=
wx
.
$util
.
getSessionId
()
if
(
!
sid
)
{
this
.
setData
({
showLogin
:
true
})
return
}
const
{
memberInfo
}
=
this
.
data
wx
.
$api
.
showLoading
()
const
loginStatu
=
await
wx
.
p
.
router
.
intercept
()
if
(
loginStatu
)
return
const
{
memberInfo
}
=
this
.
data
wx
.
p
.
wxApi
.
showLoading
()
let
para
=
{
equityClassId
:
memberInfo
.
equityClassId
,
orderCode
:
memberInfo
.
orderCode
,
...
...
@@ -84,7 +83,13 @@ Page({
},
// 处理购买参数拉起支付
handlePay
(
payData
)
{
const
{
timeStamp
,
nonceStr
,
packages
,
signType
,
paySign
}
=
payData
const
{
timeStamp
,
nonceStr
,
packages
,
signType
,
paySign
}
=
payData
let
self
=
this
wx
.
requestPayment
({
timeStamp
:
timeStamp
,
...
...
@@ -118,4 +123,4 @@ Page({
// url: '/packageShopmall/packageEquity/pages/active/active'
// })
// }
})
})
\ No newline at end of file
packageEquity/pages/open/open.wxml
View file @
f3660b3
...
...
@@ -34,5 +34,4 @@
</view>
</view>
</view>
</view>
<login show="{{showLogin}}"></login>
\ No newline at end of file
</view>
\ No newline at end of file
pages/loading/loading.js
View file @
f3660b3
...
...
@@ -12,8 +12,19 @@ Page({
* 生命周期函数--监听页面加载
*/
async
onLoad
(
options
)
{
console
.
log
(
options
,
'==='
)
this
.
tabList
=
__wxConfig
.
tabBar
.
list
wx
.
p
.
wxApi
.
showLoading
()
//scenc获取页面参数并跳转
if
(
options
.
scene
)
{
return
this
.
getSceneById
(
options
.
scene
)
}
if
(
options
.
url
)
{
return
this
.
login
(
options
)
}
},
async
login
(
options
)
{
if
(
options
.
merchantId
)
wx
.
$merchant_id
=
options
.
merchantId
try
{
const
{
code
,
...
...
@@ -34,10 +45,6 @@ Page({
wx
.
p
.
storage
.
rm
(
'sessionId'
)
}
console
.
log
(
data
,
'============='
)
//scenc获取页面参数并跳转
if
(
options
.
scene
)
{
return
this
.
getSceneById
(
options
.
scene
)
}
if
(
options
.
url
)
{
return
this
.
jumpPage
(
options
.
url
)
}
...
...
@@ -46,8 +53,8 @@ Page({
}
catch
(
error
)
{
console
.
log
(
error
)
wx
.
p
.
wxApi
.
showToast
(
String
(
error
))
wx
.
p
.
router
.
goHome
()
}
},
async
getSceneById
(
scene
)
{
const
id
=
decodeURIComponent
(
scene
).
split
(
'='
).
at
(
-
1
)
...
...
@@ -58,7 +65,7 @@ Page({
}
=
await
wx
.
p
.
api
.
wechatApi
.
getSceneById
({
id
})
if
(
code
==
0
)
this
.
jumpPage
(
data
.
scene
)
if
(
code
==
0
)
this
.
login
(
data
.
scene
)
else
throw
{}
}
catch
(
error
)
{
wx
.
p
.
wxApi
.
showToast
(
error
||
'获取scene失败'
)
...
...
pages/loading/loading.json
View file @
f3660b3
{
"usingComponents"
:
{}
"usingComponents"
:
{},
"navigationStyle"
:
"custom"
}
\ No newline at end of file
pages/tab/index/index.wxml
View file @
f3660b3
...
...
@@ -57,7 +57,7 @@
<view class="btn text-center" bindtap="jump" data-url="activity.index">
查看更多
<view class="icon">
<
image webp src="{{IMGURL}}index/more.png"></
image>
<
glsx-image webp src="home/more.png"></glsx-
image>
</view>
</view>
</block>
...
...
@@ -66,7 +66,7 @@
<block wx:else>
<view class="nothing flex">
<view class="icon">
<
image webp src="{{IMGURL}}index/index-activity-nothing.png"></
image>
<
glsx-image webp src="home/index-activity-nothing.png"></glsx-
image>
</view>
暂无优惠活动,敬请期待
</view>
...
...
pages/tab/mine/index.js
View file @
f3660b3
...
...
@@ -60,17 +60,25 @@ Page({
})
}
else
{
wx
.
p
.
api
.
equityApi
.
checkOpenMember
().
then
(
res
=>
{
let
flag
=
false
console
.
log
(
res
,
'----------'
)
res
.
data
=
{
}
let
flag
=
false
,
identity
=
0
// 普通会员3 银卡2 金卡1 非会员 0
if
(
res
.
data
&&
res
.
data
.
validitDate
)
{
res
.
data
.
time
=
new
Date
(
res
.
data
.
validitDate
).
format
(
'yyyy.MM.dd'
)
}
if
(
res
.
code
==
0
&&
res
.
data
)
{
flag
=
true
identity
=
3
if
(
res
.
data
&&
res
.
data
.
cardTypeSpecial
)
identity
=
res
.
data
.
cardTypeSpecial
}
wx
.
p
.
storage
.
set
(
'isVIP'
,
flag
)
this
.
setData
({
isMember
:
flag
,
vipInfo
:
res
.
data
vipInfo
:
res
.
data
,
identity
})
})
}
...
...
project.config.json
View file @
f3660b3
...
...
@@ -57,6 +57,6 @@
],
"include"
:
[]
},
"appid"
:
"wx
6e40cfb83ce4ffb1
"
,
"appid"
:
"wx
e10067a63c1856ac
"
,
"projectname"
:
"hmd"
}
\ No newline at end of file
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