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 1c6b94ec
authored
Jul 24, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
ed89e10b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
19 deletions
packageMine/pages/order/index/index.js
pages/tab/mine/components/myOrder/myOrder.js
pages/tab/mine/components/myOrder/myOrder.wxml
pages/tab/mine/index.wxml
router/router.js
packageMine/pages/order/index/index.js
View file @
1c6b94e
...
@@ -161,28 +161,21 @@ Page({
...
@@ -161,28 +161,21 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
console
.
log
(
options
,
'========='
)
this
.
setData
({
this
.
setData
({
tabIndex
:
options
.
tabIndex
,
tabIndex
:
options
.
tabIndex
,
orderStatusPart
:
orderStatusPartEnum
[
options
.
tabIndex
],
orderStatusPart
:
orderStatusPartEnum
[
options
.
tabIndex
],
})
})
const
{
userInfo
,
tabIndex
}
=
this
.
data
if
(
userInfo
)
{
if
(
tabIndex
!=
options
?.
tabIndex
)
delete
options
.
tabIndex
this
.
setData
(
options
)
this
.
clearData
()
this
.
clearData
()
}
},
},
onShow
(){
onShow
()
{
if
(
this
.
refresh
)
this
.
clearData
()
if
(
this
.
refresh
)
this
.
clearData
()
},
},
onHide
(){
onHide
()
{
this
.
refresh
=
true
this
.
refresh
=
true
},
},
clearData
()
{
async
clearData
()
{
const
res
=
await
wx
.
p
.
router
.
intercept
()
if
(
res
)
return
this
.
setData
({
this
.
setData
({
listFlag
:
false
,
listFlag
:
false
,
list
:
[],
list
:
[],
...
...
pages/tab/mine/components/myOrder/myOrder.js
View file @
1c6b94e
...
@@ -39,8 +39,11 @@ Component({
...
@@ -39,8 +39,11 @@ Component({
*/
*/
methods
:
{
methods
:
{
goOrder
(
e
)
{
goOrder
(
e
)
{
let
tabIndex
=
e
.
currentTarget
.
dataset
.
key
+
1
let
{
wx
.
p
.
router
.
go
(
'/packageMine/pages/order/index/index'
,{
key
}
=
e
.
currentTarget
.
dataset
,
tabIndex
=
key
||
0
wx
.
p
.
router
.
go
(
'/packageMine/pages/order/index/index'
,
{
tabIndex
tabIndex
})
})
}
}
...
...
pages/tab/mine/components/myOrder/myOrder.wxml
View file @
1c6b94e
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
</view>
</view>
</view>
</view>
<view class="btnBox">
<view class="btnBox">
<view class="independentBox" wx:for="{{orderList}}" wx:key="index" bindtap="goOrder" data-key="{{index}}">
<view class="independentBox" wx:for="{{orderList}}" wx:key="index" bindtap="goOrder" data-key="{{index
+ 1
}}">
<view class="order-img">
<view class="order-img">
<glsx-image webp src="mine/{{item.imageUrl}}.png"></glsx-image>
<glsx-image webp src="mine/{{item.imageUrl}}.png"></glsx-image>
</view>
</view>
...
...
pages/tab/mine/index.wxml
View file @
1c6b94e
...
@@ -36,7 +36,6 @@
...
@@ -36,7 +36,6 @@
</view>
</view>
</view>
</view>
<!-- 会员卡 -->
<!-- 会员卡 -->
<block wx:if="{{memberInfo}}">
<block wx:if="{{memberFlag}}">
<block wx:if="{{memberFlag}}">
<block wx:if="{{!isMember}}">
<block wx:if="{{!isMember}}">
<view class="member-box">
<view class="member-box">
...
@@ -69,7 +68,6 @@
...
@@ -69,7 +68,6 @@
</view> -->
</view> -->
</block>
</block>
</block>
</block>
</block>
<!-- 我的券包 -->
<!-- 我的券包 -->
<view class="coupon-box box flex" bindtap="jump" data-url="/packageMine/pages/coupon/index/index">
<view class="coupon-box box flex" bindtap="jump" data-url="/packageMine/pages/coupon/index/index">
我的卡券
我的卡券
...
...
router/router.js
View file @
1c6b94e
...
@@ -40,7 +40,7 @@ class Router {
...
@@ -40,7 +40,7 @@ class Router {
/**
/**
* 跳转到switchTab
* 跳转到switchTab
*/
*/
switchTab
(
route
,
events
=
{})
{
switchTab
(
route
,
events
=
{})
{
this
.
_to
(
route
,
events
,
'switchTab'
);
this
.
_to
(
route
,
events
,
'switchTab'
);
}
}
_to
(
route
,
events
,
to
,
success
)
{
_to
(
route
,
events
,
to
,
success
)
{
...
@@ -82,6 +82,10 @@ class Router {
...
@@ -82,6 +82,10 @@ class Router {
if
(
Object
.
keys
(
data
).
length
!==
0
)
if
(
Object
.
keys
(
data
).
length
!==
0
)
data
.
on
(
'getData'
,
(
res
)
=>
callBack
(
res
));
data
.
on
(
'getData'
,
(
res
)
=>
callBack
(
res
));
}
}
/**
*
* @param {*} auto 是否自动跳转到登录,默认自动跳转
*/
async
intercept
(
auto
=
true
)
{
async
intercept
(
auto
=
true
)
{
const
authStatus
=
wx
.
$authStatus
;
const
authStatus
=
wx
.
$authStatus
;
if
(
authStatus
)
{
if
(
authStatus
)
{
...
...
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