Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
panyongping
uni-pdtravel
Commits
3ad0f954
Commit
3ad0f954
authored
May 19, 2023
by
qipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
由WX.getUpdateManager 修改为uni通用的getUpdateManager
parent
ba5ff906
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
8 deletions
+75
-8
App.vue
App.vue
+3
-3
productList.vue
pages/my/order/productList/productList.vue
+72
-5
No files found.
App.vue
View file @
3ad0f954
...
@@ -40,12 +40,12 @@
...
@@ -40,12 +40,12 @@
}
}
//#endif
//#endif
/* 版本自动更新代码 */
/* 版本自动更新代码 */
const
updateManager
=
wx
.
getUpdateManager
()
const
updateManager
=
uni
.
getUpdateManager
()
updateManager
.
onCheckForUpdate
(
function
(
res
)
{
updateManager
.
onCheckForUpdate
(
function
(
res
)
{
console
.
log
(
'是否有更新:'
+
res
.
hasUpdate
)
// 请求完新版本信息的回调 true说明有更新
console
.
log
(
'是否有更新:'
+
res
.
hasUpdate
)
// 请求完新版本信息的回调 true说明有更新
})
})
updateManager
.
onUpdateReady
(
function
()
{
updateManager
.
onUpdateReady
(
function
()
{
wx
.
showModal
({
uni
.
showModal
({
title
:
'更新检测'
,
// 此处可自定义提示标题
title
:
'更新检测'
,
// 此处可自定义提示标题
content
:
'检测到新版本,是否重启小程序?'
,
// 此处可自定义提示消息内容
content
:
'检测到新版本,是否重启小程序?'
,
// 此处可自定义提示消息内容
success
:
function
(
res
)
{
success
:
function
(
res
)
{
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
})
})
updateManager
.
onUpdateFailed
(
function
()
{
updateManager
.
onUpdateFailed
(
function
()
{
// 新的版本下载失败
// 新的版本下载失败
wx
.
showModal
({
uni
.
showModal
({
title
:
'更新提示'
,
title
:
'更新提示'
,
content
:
'新版本下载失败'
,
content
:
'新版本下载失败'
,
showCancel
:
false
showCancel
:
false
...
...
pages/my/order/productList/productList.vue
View file @
3ad0f954
<
template
>
<
template
>
<view>
<view>
<view
class=
"product-title"
>
<u-icon
name=
"arrow-left"
color=
"#191919"
size=
"32"
@
click=
""
></u-icon>
我的订单
</view>
<view
class=
"product-orderState"
>
<view
class=
"orderState-click"
>
<text
class=
"click-name"
>
全部
</text>
<view
class=
"click-line"
>
<text></text>
</view>
</view>
<view
class=
"orderState-click"
>
<text
class=
"click-name"
>
待付款
</text>
<view
class=
"click-line"
>
<text></text>
</view>
</view>
<view
class=
"orderState-click"
>
<text
class=
"click-name"
>
待使用
</text>
<view
class=
"click-line"
>
<text></text>
</view>
</view>
<view
class=
"orderState-click"
>
<text
class=
"click-name"
>
待收货
</text>
<view
class=
"click-line"
>
<text></text>
</view>
</view>
<view
class=
"orderState-click"
>
<text
class=
"click-name"
>
待评价
</text>
<view
class=
"click-line"
>
<text></text>
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -10,6 +45,10 @@
...
@@ -10,6 +45,10 @@
return
{
return
{
}
}
},
onLoad
(
option
)
{
},
},
methods
:
{
methods
:
{
...
@@ -17,6 +56,34 @@
...
@@ -17,6 +56,34 @@
}
}
</
script
>
</
script
>
<
style
>
<
style
scoped
lang=
"scss"
>
page
{
background-color
:
#f5f5f5
;
}
.product-title
{
display
:
flex
;
justify-content
:
center
;
width
:
100%
;
height
:
80rpx
;
background-color
:
#fff
;
font-size
:
32rpx
;
font-weight
:
bold
;
line-height
:
80rpx
;
text-align
:
center
;
position
:
relative
;
u-icon
{
height
:
80rpx
;
position
:
absolute
;
left
:
24rpx
;
top
:
0
;
bottom
:
0
;
}
}
.product-orderState
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
0
24rpx
;
background-color
:
#fff
;
}
</
style
>
</
style
>
\ No newline at end of file
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