shish %!s(int64=3) %!d(string=hai) anos
pai
achega
5005c2c0ff
Modificáronse 2 ficheiros con 7 adicións e 10 borrados
  1. 5 8
      mallApp/src/mixins/cgProduct.js
  2. 2 2
      mallApp/src/pages/item/item.vue

+ 5 - 8
mallApp/src/mixins/cgProduct.js

@@ -208,15 +208,12 @@ export default {
 			}
 		},
 		//清除已记忆花材
-		removeMemory(ghsId){
-			if(ghsId){
-				uni.removeStorageSync('selectList'+this.pageType+'_hd_'+ghsId);
-				//删除小菊的记忆
-				uni.removeStorageSync("ghsXj"+ghsId)
-			}else{
-				uni.removeStorageSync('selectList'+this.pageType);
+		removeMemory(){
+			uni.removeStorageSync('selectList'+this.pageType)
+			this.resetSelectInfoByType(this.pageType)
+			if(this.pageType == 'cg' && !this.$util.isEmpty(this.option.account)){
+				uni.removeStorageSync('selectList'+this.pageType+'_hd_'+this.option.account)
 			}
-			this.resetSelectInfoByType(this.pageType);
 		},
 		async initData(extendInfo) {
 			try {

+ 2 - 2
mallApp/src/pages/item/item.vue

@@ -6,7 +6,7 @@
 				<app-search-module v-model="py" placeholder="输入拼音首字母也可以搜索" @input="searchFn" />
 			</view>
 			<view style="padding:0 0upx 0 20upx;" >
-				<button class="admin-button-com middle blue" style="border:none;height:70upx;" @click="removeMemory(option.id)">清除已选</button>
+				<button class="admin-button-com middle blue" style="border:none;height:70upx;" @click="removeMemory()">清除已选</button>
 			</view>
 		</view>
 
@@ -285,7 +285,7 @@ export default {
 		},
 		delMemory(){
 			this.cartItemShow = false
-			this.removeMemory(this.option.id)
+			this.removeMemory()
 		},
 		hideCartItem(){
 			this.cartItemShow = false