Commit 414aed46 authored by Facius's avatar Facius

没有品牌显示通用

parent 6c756fb1
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<image class="image-view" v-for="(item, index) in images" :key="index" :src="item"></image> <image class="image-view" v-for="(item, index) in images" :key="index" :src="item"></image>
<view class="info-view" v-if="info.items.length == 1"> <view class="info-view" v-if="info.items.length == 1">
<view class="name-text">{{info.items[0].name}}</view> <view class="name-text">{{info.items[0].name}}</view>
<view>{{info.items[0].categoryName + '-' + info.items[0].brandName}}</view> <view>{{noteText}}</view>
</view> </view>
</view> </view>
<view class="count-view">共{{info.items.length}}种</view> <view class="count-view">共{{info.items.length}}种</view>
...@@ -91,6 +91,13 @@ ...@@ -91,6 +91,13 @@
buttonText() { buttonText() {
return this.texts[this.info.status] return this.texts[this.info.status]
}, },
noteText() {
if (info.items[0].categoryName || info.items[0].brandName) {
return (info.items[0].categoryName || '通用') + '-' + (info.items[0].brandName || '通用')
} else {
return '通用'
}
},
buttonStyle() { buttonStyle() {
return { return {
'height': '104rpx', 'height': '104rpx',
......
...@@ -50,7 +50,11 @@ ...@@ -50,7 +50,11 @@
}, },
computed: { computed: {
remarkText() { remarkText() {
return this.item.categoryName + '-' + this.item.brandName if (this.item.categoryName || this.item.brandName) {
return (this.item.categoryName || '通用') + '-' + (this.item.brandName || '通用')
} else {
return '通用'
}
}, },
imageUrl() { imageUrl() {
return this.item.images ? process.uniEnv.systemUrl.apiUrl + this.item.images.split(',').shift() : this.placeholderImage return this.item.images ? process.uniEnv.systemUrl.apiUrl + this.item.images.split(',').shift() : this.placeholderImage
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
return { return {
info: { info: {
items: [], items: [],
express: [], express: {},
status: '0' status: '0'
}, },
logisticsRecords: [], // 物流 logisticsRecords: [], // 物流
...@@ -171,6 +171,7 @@ ...@@ -171,6 +171,7 @@
if (pages.length >= 2) { if (pages.length >= 2) {
var page = pages[pages.length - 2]; var page = pages[pages.length - 2];
this.info = page.info this.info = page.info
this.info.express = this.info.express || {}
} }
}, },
methods: { methods: {
......
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