diff --git a/pages/news/recycling/order.vue b/pages/news/recycling/order.vue index 1112d4b..23a549a 100644 --- a/pages/news/recycling/order.vue +++ b/pages/news/recycling/order.vue @@ -189,8 +189,8 @@ methods: { reservation() { uni.navigateTo({ - url: "/pages/news/recycling/timer?shop_id=" + this.infor.shop_id + "&infor=" + JSON.stringify( - this.infor) + url: "/pages/news/recycling/timer?shop_id=" + this.infor.shop_id + "&infor=" + encodeURIComponent(JSON.stringify( + this.infor)) }) }, copyOrderNumber(orderNumber) { diff --git a/pages/news/recycling/timer.vue b/pages/news/recycling/timer.vue index f2b88a5..0e2fb16 100644 --- a/pages/news/recycling/timer.vue +++ b/pages/news/recycling/timer.vue @@ -35,7 +35,9 @@ } }, onLoad(op) { - this.infor = op.infor ? JSON.parse(op.infor) : '' + if(op.infor){ + this.infor = op.infor ? JSON.parse(decodeURIComponent(op.infor)) : '' + } this.getstopTimes(op.shop_id) }, methods: { diff --git a/pages/news3/components/category.vue b/pages/news3/components/category.vue index 22df0f0..2360ccf 100644 --- a/pages/news3/components/category.vue +++ b/pages/news3/components/category.vue @@ -69,7 +69,6 @@ if (storage.length > 0 && idList.length > 0) { idList = this.getArrDifference(idList, storage) } - this.$emit('getChoseCategory', { category_id: idList, }) diff --git a/pages/news3/vipPrice.vue b/pages/news3/vipPrice.vue index c68db81..a9fc609 100644 --- a/pages/news3/vipPrice.vue +++ b/pages/news3/vipPrice.vue @@ -89,7 +89,6 @@ list: [], categoryList: '', type: '', - isEdit: false } }, onLoad(op) { @@ -109,17 +108,17 @@ }); if (status == 200) { if (data.list.length > 0) { - this.isEdit = true data.list.forEach((item_1, index_1) => { let arr = item_1.category.split(",").map(item => Number(item)) let name = this.categoryList.filter(function(obj) { - return arr.some(function(item) { - return item === obj.category_id; - }); + return item_1.category.split(",").map(item => Number(item)).some( + function(item) { + return item === obj.category_id; + }); }).map(function(obj) { - return obj.name + '等'; + return obj.name }); - item_1.category_name = name.join(',') + item_1.category_name = name.join(',') + (name.length > 0 ? '等' : ''); item_1.price_list.forEach((item_2, index_2) => { item_2.startProfit = Number((Number(item_2.min) * (Number(item_2 .add_price_rate) / 100)).toFixed(2)); @@ -129,7 +128,7 @@ }) this.list = data.list } else { - this.isEdit = false + this.list = [] } } }, @@ -206,23 +205,14 @@ delete item_1.startProfit }) }) - let url = '' - if (this.isEdit) { - url = newFunApi.editStore({ - list: list, - type: this.type - }) - } else { - url = newFunApi.setStorePrice({ - list: list, - type: this.type - }) - } let { status, message, data - } = await url; + } = await newFunApi.setStorePrice({ + list: list, + type: this.type + }); if (status == 200) { uni.showToast({ title: "保存成功" @@ -335,7 +325,7 @@ }); }); console.log(nameList, newList) - this.list[this.categoryIndex].category_name = nameList.join(','); + this.list[this.categoryIndex].category_name = nameList.join(',') +(nameList.length > 0 ? '等' : ''); this.list[this.categoryIndex].category = newList.join(',') this.$refs.category.afterSale = false; },