|
@@ -171,7 +171,7 @@ Page({
|
|
|
const tempList = list.map(item => {
|
|
|
return {
|
|
|
...item,
|
|
|
- ...that.getStatusTextAndColor(item.product_status)
|
|
|
+ ...that.getStatusTextAndColor(item.product_status, item.product_check_status)
|
|
|
}
|
|
|
})
|
|
|
const _list = temp.isRefresh ? [].concat(tempList) : that.data.originScrollViewData[_tab].list.concat(tempList)
|
|
@@ -268,24 +268,28 @@ Page({
|
|
|
booLock: false
|
|
|
})
|
|
|
},
|
|
|
- getStatusTextAndColor(val) {
|
|
|
- const arr = ['未上架', '已上架', '审核中', '审核未通过']
|
|
|
+ getStatusTextAndColor(productStatus, productCheckStatus) {
|
|
|
+ // product_check_status 0未审核 1审核成功 2审核失败
|
|
|
+ // product_status 0 未上架 1 上架
|
|
|
+
|
|
|
let color = 'col-0'
|
|
|
- switch (val) {
|
|
|
- case 1:
|
|
|
- color = 'col-2'
|
|
|
- break
|
|
|
- case 2:
|
|
|
- color = 'col-1'
|
|
|
- break
|
|
|
- case 3:
|
|
|
- color = 'col-3'
|
|
|
- break
|
|
|
- default:
|
|
|
+ let text = ''
|
|
|
+
|
|
|
+ if (productCheckStatus === 0) {
|
|
|
+ color = 'col-1'
|
|
|
+ text = '审核中'
|
|
|
+ } else if (productCheckStatus === 2) {
|
|
|
+ color = 'col-3'
|
|
|
+ text = '审核未通过'
|
|
|
+ } else if (productCheckStatus === 1 && productStatus === 1) {
|
|
|
+ color = 'col-2'
|
|
|
+ text = '已上架'
|
|
|
+ } else if (productCheckStatus === 1 && productStatus === 0) {
|
|
|
+ text = '未上架'
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
- product_status_text: arr[val] || '',
|
|
|
+ product_status_text: text,
|
|
|
product_status_color: color
|
|
|
}
|
|
|
}
|