Commit 3ad0f954 authored by qipeng's avatar qipeng

由WX.getUpdateManager 修改为uni通用的getUpdateManager

parent ba5ff906
......@@ -40,12 +40,12 @@
}
//#endif
/* 版本自动更新代码 */
const updateManager = wx.getUpdateManager()
const updateManager = uni.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
console.log('是否有更新:' + res.hasUpdate) // 请求完新版本信息的回调 true说明有更新
})
updateManager.onUpdateReady(function () {
wx.showModal({
uni.showModal({
title: '更新检测', // 此处可自定义提示标题
content: '检测到新版本,是否重启小程序?', // 此处可自定义提示消息内容
success: function (res) {
......@@ -58,7 +58,7 @@
})
updateManager.onUpdateFailed(function () {
// 新的版本下载失败
wx.showModal({
uni.showModal({
title: '更新提示',
content: '新版本下载失败',
showCancel: false
......
<template>
<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>
</template>
......@@ -8,8 +43,12 @@
export default {
data() {
return {
}
},
onLoad(option) {
},
methods: {
......@@ -17,6 +56,34 @@
}
</script>
<style>
</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>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment