Commit 414aed46 authored by Facius's avatar Facius

没有品牌显示通用

parent 6c756fb1
......@@ -17,7 +17,7 @@
<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="name-text">{{info.items[0].name}}</view>
<view>{{info.items[0].categoryName + '-' + info.items[0].brandName}}</view>
<view>{{noteText}}</view>
</view>
</view>
<view class="count-view">共{{info.items.length}}种</view>
......@@ -91,6 +91,13 @@
buttonText() {
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() {
return {
'height': '104rpx',
......
......@@ -50,7 +50,11 @@
},
computed: {
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() {
return this.item.images ? process.uniEnv.systemUrl.apiUrl + this.item.images.split(',').shift() : this.placeholderImage
......
......@@ -62,7 +62,7 @@
return {
info: {
items: [],
express: [],
express: {},
status: '0'
},
logisticsRecords: [], // 物流
......@@ -170,7 +170,8 @@
var pages = getCurrentPages();
if (pages.length >= 2) {
var page = pages[pages.length - 2];
this.info = page.info
this.info = page.info
this.info.express = this.info.express || {}
}
},
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