Commit 5766b197 authored by 刘用法's avatar 刘用法

我的页面

parent 4fd4cf64
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<view class="list-view"> <view class="list-view">
<u-cell-group :border="false"> <u-cell-group :border="false">
<view v-for="(item, index) in items" :key="index"> <view v-for="(item, index) in items" :key="index">
<u-cell-item :value="item.value" :border-bottom="false" @click="handleClick(index)"> <u-cell-item :value="item.value" :border-bottom="false" @click="handleClick(item.pathName)">
<image slot="icon" :src="qnPath + item.icon" :style="item.imageStyle"></image> <image slot="icon" :src="qnPath + item.icon" :style="item.imageStyle"></image>
<view slot="title" class="item-title">{{item.title}}</view> <view slot="title" class="item-title">{{item.title}}</view>
<view slot="value" class="item-value">{{value}}</view> <view slot="value" class="item-value">{{value}}</view>
...@@ -62,43 +62,51 @@ ...@@ -62,43 +62,51 @@
return this.settled && this.settled.mobile || '' return this.settled && this.settled.mobile || ''
}, },
items() { items() {
return [{ return [
{
pathName: 'wallet',
title: '我的钱包', title: '我的钱包',
value: '', value: '',
icon: 'qianbao.png', icon: 'qianbao.png',
imageStyle: 'width:34rpx;height:32rpx' imageStyle: 'width:34rpx;height:32rpx'
}, },
{ {
pathName: 'deposit',
title: '配件押金', title: '配件押金',
value: '', value: '',
icon: 'yajin.png', icon: 'yajin.png',
imageStyle: 'width:32rpx;height:32rpx' imageStyle: 'width:32rpx;height:32rpx'
}, },
{ {
pathName: 'contract',
title: '我的合同', title: '我的合同',
value: '', value: '',
icon: 'hetong.png', icon: 'hetong.png',
imageStyle: 'width:34rpx;height:32rpx' imageStyle: 'width:34rpx;height:32rpx'
}, },
{ {
pathName: 'cert',
title: '我的证件', title: '我的证件',
value: '', value: '',
icon: 'zhengjian.png', icon: 'zhengjian.png',
imageStyle: 'width:36rpx;height:28rpx' imageStyle: 'width:36rpx;height:28rpx'
}, },
{ {
pathName: 'address',
title: '收货地址', title: '收货地址',
value: '', value: '',
icon: 'wddizhi.png', icon: 'wddizhi.png',
imageStyle: 'width:32rpx;height:32rpx' imageStyle: 'width:32rpx;height:32rpx'
}, },
{ {
pathName: 'warehouse',
title: '我的仓库', title: '我的仓库',
value: '', value: '',
icon: 'cangku.png', icon: 'cangku.png',
imageStyle: 'width:36rpx;height:32rpx' imageStyle: 'width:36rpx;height:32rpx'
}, },
{ {
pathName: 'customer',
title: '联系客服', title: '联系客服',
value: this.serviceTel, value: this.serviceTel,
icon: 'lxkefu.png', icon: 'lxkefu.png',
...@@ -109,9 +117,6 @@ ...@@ -109,9 +117,6 @@
telTip() { telTip() {
return this.mobile && '已绑定手机'|| '绑定手机号' return this.mobile && '已绑定手机'|| '绑定手机号'
}, },
pages() {
return ['wallet', 'deposit', 'contract', 'cert', 'address', 'warehouse', 'customer']
},
headImageUrl() { headImageUrl() {
return this.avatar || this.placeholderImage return this.avatar || this.placeholderImage
}, },
...@@ -138,10 +143,10 @@ ...@@ -138,10 +143,10 @@
let self = this let self = this
app.getBaseInfo(self); app.getBaseInfo(self);
}, },
handleClick(index) { handleClick(path) {
if(this.vuex_token) { if(this.vuex_token) {
this.$u.route({ this.$u.route({
url: 'pages/mine/' + this.pages[index] + '/index' url: 'pages/mine/' + path + '/index'
}) })
} else { } else {
this.$u.route({url: "pages/login/index"}) this.$u.route({url: "pages/login/index"})
......
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