添加环境判断
diff --git a/pages/sub_mine/leaveMsg/index.vue b/pages/sub_mine/leaveMsg/index.vue
index 18cab56..261e0a1 100644
--- a/pages/sub_mine/leaveMsg/index.vue
+++ b/pages/sub_mine/leaveMsg/index.vue
@@ -12,6 +12,7 @@
</template>
<script>
+ const app = getApp()
export default {
data() {
return {
@@ -65,20 +66,22 @@
})
return false
}
+ let version = app.globalData.version
let params = {
- title: title,
+ title,
content: value,
- pictures: list
+ pictures: list,
+ version
}
that.$u.post("/v1/feedback/release", params).then(res => {
uni.showToast({
title: "留言成功,我们将尽快给您回复",
- icon:"none",
- duration:1500,
+ icon: "none",
+ duration: 1500,
complete: (res) => {
setTimeout(() => {
uni.navigateBack({
- delta:1
+ delta: 1
})
}, 1500)
}
diff --git a/pages/sub_tabbar/mine.vue b/pages/sub_tabbar/mine.vue
index 25aca57..a3f72e8 100644
--- a/pages/sub_tabbar/mine.vue
+++ b/pages/sub_tabbar/mine.vue
@@ -19,7 +19,7 @@
<!-- 列表 -->
<view class="wrap-list">
<u-cell-group :border="false">
- <u-cell-item :title="v.name" :title-style="titleStyle" :value="i===0?value:''" @click="toPath(v.path)" v-for="(v,i) in list"
+ <u-cell-item :title="v.name" :title-style="titleStyle" :value="v.value" @click="toPath(v.path)" v-for="(v,i) in list"
:key="i">
<u-icon :name="v.icon" custom-prefix="custom-icon" size="40" slot="icon" color="#2FA8E1"></u-icon>
</u-cell-item>
@@ -33,6 +33,7 @@
</template>
<script>
+ const app = getApp()
export default {
data() {
return {
@@ -47,36 +48,41 @@
'fontSize': '28rpx',
'marginLeft': '30rpx'
},
- value: "0积分",
list: [{
name: "我的积分",
path: "/pages/sub_mine/integral/index",
- icon: "integral"
+ icon: "integral",
+ value:'0积分'
},
{
name: "我的足迹",
path: "/pages/sub_mine/cashFlow/index",
- icon: "bills"
+ icon: "bills",
+ value:''
},
{
name: "我的卡券",
path: "/pages/sub_mine/voucher/index",
- icon: "voucher"
+ icon: "voucher",
+ value:''
},
{
name: "账户安全",
path: "/pages/sub_mine/accountSafe/index",
- icon: "safe"
+ icon: "safe",
+ value:''
},
{
name: "我的消息",
path: "/pages/sub_mine/message/index",
- icon: "message"
+ icon: "message",
+ value:''
},
{
name: "留言反馈",
path: "/pages/sub_mine/leaveMsg/index",
- icon: "leaveMsg"
+ icon: "leaveMsg",
+ value:''
},
],
loginOut: {
@@ -85,7 +91,8 @@
marginTop: '100rpx',
color:'#ffffff',
backgroundColor:'#2FA8E1'
- }
+ },
+ version:''
}
},
computed: {
@@ -105,6 +112,7 @@
that.tel = '暂无号码'
that.name = '游客'
}
+ that.list[that.list.length-1].value = 'v' + app.globalData.version
},
methods: {
exit() {
@@ -145,7 +153,7 @@
getIntegral(){
let that = this
that.$u.get("/v1/point/total",{}).then(res=>{
- that.value = res.data + '积分'
+ that.list[0].value = res.data + '积分'
})
}
},
@@ -163,13 +171,11 @@
.status_bar {
background-color: #4EB4E4;
}
-
.loginOut {
width: 600rpx;
padding: 50rpx 0;
margin-top: 100rpx;
}
-
.wrap {
font-family: "PingFang-SC-Medium";
&-mine {