From 94906b8260568c53d6061b7e386b8c7d10e385fd Mon Sep 17 00:00:00 2001 From: Carl <376654749@qq.com> Date: Fri, 21 Jan 2022 17:09:16 +0800 Subject: [PATCH 1/5] adding install cart verification --- .../royalcanin/good/GoodController.java | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/royalcanin/good/GoodController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/royalcanin/good/GoodController.java index 985db1f1..c414b6d3 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/royalcanin/good/GoodController.java +++ b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/royalcanin/good/GoodController.java @@ -5,6 +5,7 @@ package net.lab1024.smartadmin.module.system.royalcanin.good; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import net.lab1024.smartadmin.common.anno.OperateLog; +import net.lab1024.smartadmin.common.constant.ResponseCodeConst; import net.lab1024.smartadmin.common.domain.ResponseDTO; import net.lab1024.smartadmin.common.heartbeat.StringUtil; import net.lab1024.smartadmin.constant.SwaggerTagConst; @@ -165,21 +166,26 @@ public class GoodController { @ApiOperation(value = "插入购物车信息", notes = "插入购物车信息") @PostMapping("royalcanin/insertCartProductInfo") - public ResponseDTO insertCartProductInfo(@RequestBody CartEntity cartEntity){ - - CartEntity cartEntityFromDB = cartService.getInfoByProductCodeAndMemberId(cartEntity.getMemberId(),cartEntity.getProductCode()); - if (null == cartEntityFromDB){ - if (1 == cartService.insertProductCart(cartEntity)) - return ResponseDTO.succ(); - else - return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_FAIL); - }else{ - int buyCountTotal = cartEntity.getBuyCount()+ cartEntityFromDB.getBuyCount(); - cartEntityFromDB.setBuyCount(buyCountTotal); - if (1 == cartService.updateInfo(cartEntityFromDB)) - return ResponseDTO.succ(); - else - return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_FAIL); + public ResponseDTO insertCartProductInfo(@RequestBody CartEntity cartEntity,HttpServletRequest request){ + String memberId = SmartJWTUtil.decodeToken(request.getHeader(TOKEN_NAME)); + cartEntity.setMemberId(memberId); + if(cartEntity.getProductCode() != null&&cartEntity.getProductCode() != ""&&cartEntity.getProductName() != null&&cartEntity.getProductName() != ""&&cartEntity.getMemberId() != null&&cartEntity.getMemberId() != "") { + CartEntity cartEntityFromDB = cartService.getInfoByProductCodeAndMemberId(cartEntity.getMemberId(), cartEntity.getProductCode()); + if (null == cartEntityFromDB) { + if (1 == cartService.insertProductCart(cartEntity)) + return ResponseDTO.succ(); + else + return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_FAIL); + } else { + int buyCountTotal = cartEntity.getBuyCount() + cartEntityFromDB.getBuyCount(); + cartEntityFromDB.setBuyCount(buyCountTotal); + if (1 == cartService.updateInfo(cartEntityFromDB)) + return ResponseDTO.succ(); + else + return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM); + } + }else { + return ResponseDTO.wrap(ResponseCodeConst.ERROR_PARAM); } } From 4a1d1b9dd624a584eac0048f145a51cd76d29c45 Mon Sep 17 00:00:00 2001 From: Vion Date: Fri, 21 Jan 2022 18:12:45 +0800 Subject: [PATCH 2/5] Product list function completed --- rc-busness/ajax/getData.js | 2 +- rc-busness/assets/css/global.less | 7 +- rc-busness/assets/css/index.less | 8 + rc-busness/assets/css/product-list.less | 2 +- rc-busness/components/addressInput.vue | 24 +- rc-busness/pages/index.vue | 28 +- .../pages/productdetails/productlist.vue | 506 +++++++++++------- 7 files changed, 361 insertions(+), 216 deletions(-) diff --git a/rc-busness/ajax/getData.js b/rc-busness/ajax/getData.js index 2efb2607..6fe65551 100644 --- a/rc-busness/ajax/getData.js +++ b/rc-busness/ajax/getData.js @@ -187,7 +187,7 @@ export const userquery = (stype) => { goodsName:stype } - return fetch('goods?goodsName='+stype, data, 'POST' ) + return fetch('goods?petType='+stype, data, 'POST' ) } //商品全部信息 export const userque = (stype) => { diff --git a/rc-busness/assets/css/global.less b/rc-busness/assets/css/global.less index 4c1f0fd5..d7d9399e 100644 --- a/rc-busness/assets/css/global.less +++ b/rc-busness/assets/css/global.less @@ -432,7 +432,8 @@ img, picture { } .ts-product-list{ text-align: left; - display:block; + //display:block; + display:flex; li{ max-width:20rem; min-width:18.75rem; @@ -621,8 +622,8 @@ img, picture { display:flex; //justify-content: space-between; li{ - //margin-left:0; - //margin-right:0; + margin-left:0; + margin-right:0; } } } diff --git a/rc-busness/assets/css/index.less b/rc-busness/assets/css/index.less index 77f4b563..e1ccdf93 100644 --- a/rc-busness/assets/css/index.less +++ b/rc-busness/assets/css/index.less @@ -383,6 +383,14 @@ } .ts-banner-swiper-container{ position:relative; + picture + { + min-height:12rem; + width:100%; + img{ + margin:0 auto; + } + } .ts-carousel-indicator{ position:absolute; bottom:.4rem; diff --git a/rc-busness/assets/css/product-list.less b/rc-busness/assets/css/product-list.less index b1fd2b92..7bcabaeb 100644 --- a/rc-busness/assets/css/product-list.less +++ b/rc-busness/assets/css/product-list.less @@ -571,7 +571,7 @@ border-radius: 30px; h2{ display: flex; align-items: center; - width: 4%; + width: 3.25rem; } .ts-scrollable{ width: 100%; diff --git a/rc-busness/components/addressInput.vue b/rc-busness/components/addressInput.vue index a60768aa..369e83ee 100644 --- a/rc-busness/components/addressInput.vue +++ b/rc-busness/components/addressInput.vue @@ -63,7 +63,11 @@ export default { { defaultValues = this.defaultValues; this.onConfirm(defaultValues); - } + } + else + { + this.defaultValues = defaultValues; + } //Initilizing end }, pickValue(pickId,pickName){ @@ -233,16 +237,18 @@ export default { popAddress() { this.show=true; let _self=this; - //mobile //const picker = this.selectComponent('.ts-area-picker-mobile-component'); - this.defaultValues.forEach(function(ele,index){ - let tmpPointer=parseInt(_self.inArray(ele,_self.columns[index].values)); - if(tmpPointer) - { - _self.columns[index].defaultIndex = tmpPointer; - } - }); + if(this.defaultValues && this.defaultValues.length>0) + { + this.defaultValues.forEach(function(ele,index){ + let tmpPointer=parseInt(_self.inArray(ele,_self.columns[index].values)); + if(tmpPointer) + { + _self.columns[index].defaultIndex = tmpPointer; + } + }); + } // setTimeout(function(){ // //debugger; diff --git a/rc-busness/pages/index.vue b/rc-busness/pages/index.vue index 9079d402..7f84721c 100644 --- a/rc-busness/pages/index.vue +++ b/rc-busness/pages/index.vue @@ -129,6 +129,7 @@
+
暂未发现相关记录
  • @@ -147,7 +148,7 @@
- +
查看更多
@@ -183,6 +184,7 @@
+
暂未发现相关记录
  • @@ -199,7 +201,7 @@
- +
查看更多
@@ -213,6 +215,7 @@
+
暂未发现相关记录
  • @@ -231,7 +234,7 @@
- +
查看更多
@@ -270,6 +273,7 @@
+
暂未发现相关记录
  • @@ -286,7 +290,7 @@
- +
查看更多
@@ -377,6 +381,7 @@
+
暂未发现相关记录
  • @@ -395,7 +400,7 @@
- +
查看更多
@@ -437,6 +442,7 @@
+
暂未发现相关记录
  • @@ -454,7 +460,7 @@
- +
查看更多
@@ -491,6 +497,7 @@
+
暂未发现相关记录
  • @@ -508,7 +515,7 @@
- +
查看更多
@@ -550,6 +557,7 @@
+
暂未发现相关记录
  • @@ -566,7 +574,7 @@
- +
查看更多
@@ -587,6 +595,7 @@
+
暂未发现相关记录
  • @@ -603,7 +612,7 @@
- +
查看更多
@@ -645,6 +654,7 @@
+
暂未发现相关记录
  • diff --git a/rc-busness/pages/productdetails/productlist.vue b/rc-busness/pages/productdetails/productlist.vue index 862c457d..746d1d17 100644 --- a/rc-busness/pages/productdetails/productlist.vue +++ b/rc-busness/pages/productdetails/productlist.vue @@ -1,9 +1,5 @@ @@ -311,26 +313,24 @@ import { biaome, biaomessage, searchchanpin, + userquery } from "../../ajax/getData"; export default { data() { return { value: "", - isLoading: true, + isLoading: false, userstype: [], - activeIndex: "-1", + activeIndex: 0, allacindex: 0, userishwo: true, - userishwo1: true, - userishwo2: true, - userishwo3: true, userishwo4: true, userserachlist: [ { - categoryName: "", //专区 - tagUsedAge: "", //年龄 - tagFunction: "", //功能 - tagBreed: "", //品种 + categoryName: [], //专区 + tagUsedAge: [], //年龄 + tagFunction: [], //功能 + tagBreed: [], //品种 }, ], activeIndex1: 0, @@ -393,28 +393,17 @@ export default { }, ], - prefecture: [ + extraPrefecture: [ { - title: "猫湿粮", - ordernum: "2", - catimage: require("../../assets/image/rc-dog.png"), - }, - { - title: "品种猫粮", - ordernum: "2", - catimage: require("../../assets/image/rc-dog.png"), - }, - { - title: "营养猫粮", - ordernum: "2", - catimage: require("../../assets/image/rc-dog.png"), - }, - { - title: "功能猫粮", - ordernum: "2", + tagName: "处方粮", + ordernum: "99", catimage: require("../../assets/image/rc-dog.png"), + isRxGoods:1 }, ], + prefecture: [ + + ], catage: [ { title: "<4月龄", @@ -472,63 +461,72 @@ export default { rccontair: [ { - title: "皇家英国短毛猫全价湿粮", - price: "¥123.45", + title: "", + price: "", ordernum: 1, - - catimage: require("../../assets/image/rc-cat.png"), - }, - - { - title: "皇家英国短毛猫全价湿粮", - price: "¥123.45", - ordernum: "2", - catimage: require("../../assets/image/rc-dog.png"), - }, - { - title: "皇家英国短毛猫全价湿粮", - price: "¥123.45", - ordernum: "2", - catimage: require("../../assets/image/rc-dog.png"), - }, - { - title: "皇家英国短毛猫全价湿粮", - price: "¥123.45", - ordernum: "2", - catimage: require("../../assets/image/rc-dog.png"), - }, - { - title: "皇家英国短毛猫全价湿粮", - price: "¥123.45", - ordernum: "2", - catimage: require("../../assets/image/rc-dog.png"), + catimage: '', }, ], + routeParams:[], + rxGoodsIndexPointer:0 }; }, components: { Myheader, MyFooter }, + created() { + this.routeParams=this.$route.query; + if(this.routeParams.stype) + this.activeIndex = this.routeParams.stype;//Initialized pet type selection + }, mounted() { - let stype = this.$route.query.stype; - this.$nextTick(() => { - this.$refs.userstandard[0].style.margin = 0 + "px"; - }); - this.userst(); - // this.activeIndex = stype; - // if (stype !== "" && stype !== undefined) { - // this.onmessage(stype); - // } else { - // this.usetmessage(); - // } + let stype = this.routeParams.stype; + this.$nextTick(() => { + this.$refs.userstandard[0].style.margin = 0 + "px"; + }); + let tagSettingPromise = this.userst(); + let _self = this; + tagSettingPromise.then(function(resolve){ + _self.chooseDefaultOptions(); + //_self.usetmessage(); + }); + /* + if (stype !== "" && stype !== undefined) { + this.onmessage(stype);//Wont happen + } else { + this.usetmessage(); + } + */ }, methods: { async usersearch(stype, usertype) { - let data = await searchchanpin(stype, usertype, 1, 10); - if (data) { - this.rccontair = data; - } + this.isLoading=true; + let data = undefined; + if(this.prefecture[this.rxGoodsIndexPointer].checked==true){ + data = await userquery(usertype, 1, 10); + } + else{ + let searchCriteria=[{}]; + for(let key in stype[0]){ + if(stype[0][key].length>0){ + if(typeof stype[0][key] == 'string') { + searchCriteria[0][key]=stype[0][key]; + } + else { + searchCriteria[0][key]=stype[0][key].join(','); + } + if(key=='categoryName' && searchCriteria[0][key].indexOf("湿")>-1){ + searchCriteria[0]['tagStatus']=2; + } + } + } + data = await searchchanpin(searchCriteria, usertype, 1, 10); + } + if (data) { + this.rccontair = data; + this.isLoading=false; + } }, async userst() { this.isLoading = true; @@ -574,6 +572,11 @@ export default { console.log(pinzhong); // debugger }); + let _self = this; + this.extraPrefecture.forEach(function(ele){ + _self.prefecture.push(ele); + _self.rxGoodsIndexPointer = _self.prefecture.length-1; + }); this.userdoglisgt = this.userstype.filter((item) => item.petType == "1"); }, @@ -593,7 +596,106 @@ export default { this.isLoading = false; } }, - + chooseDefaultOptions(){ + let tagStatus = this.routeParams.tagStatus; + let categoryName = this.routeParams.categoryName; + let rxgoods = this.routeParams.rxgoods; + + let tagUsedAge = this.routeParams.tagUsedAge; + + let key = this.routeParams.key; + let _self = this; + + + if(tagStatus && tagStatus.length>0) { + tagStatus=='1'?1:2;//1:干粮, 2:湿粮 + } else { + tagStatus = 0; + } + if(rxgoods && rxgoods.length>0) { + rxgoods=='1'?1:0; + } else { + rxgoods = 0; + } + if(categoryName && categoryName.length>0) { + categoryName = categoryName.split(","); + } else { + categoryName = []; + } + if(tagUsedAge && tagUsedAge.length>0) { + tagUsedAge = tagUsedAge.split(","); + } else { + tagUsedAge = []; + } + + + + //RxGood handling + if(rxgoods) { + this.checkRxGoods(true); + this.usersearch([],this.activeIndex); + return; + } + //RxGood handling + + //Category Handling + if(tagStatus || categoryName.length>0) { + for(let item of this.prefecture){ + if(item.tagName.indexOf('湿')>-1){ + if(tagStatus==2) { + item.checked=true; + } + } else { + if(tagStatus==1 && item.tagName!=this.prefecture[this.rxGoodsIndexPointer].tagName){ + item.checked=true; + } + } + if(categoryName.indexOf(item.tagName)>-1) { + item.checked=true; + } + } + if(tagStatus) + this.userserachlist[0].tagStatus=tagStatus; + if(categoryName.length>0) + this.userserachlist[0].categoryName=categoryName; + } + //Category Handling end + + //Age Handling + if(tagUsedAge.length>0) { + this.catage.forEach(function(item,index){ + if(tagUsedAge.indexOf(item.tagName)>-1) { + item.checked=true; + } + }); + this.userserachlist[0].tagUsedAge=tagUsedAge; + } + //Age Handling end + + //go query + this.usersearch(this.userserachlist,this.activeIndex1); + }, + checkRxGoods(toggleSwitch){ + let _self = this; + let categoriesSelectionEles=this.prefecture; + let functionalSelectionEles=this.catagea; + let ageSelectionEles=this.catage; + let breedSelectionEles=this.catageb; + let allSelectionEles=categoriesSelectionEles.concat(functionalSelectionEles,ageSelectionEles,breedSelectionEles); + + if(toggleSwitch) + { + allSelectionEles.forEach(function(tmp,index){ + tmp.checked=false; + if(tmp.isRxGoods) + { + tmp.checked=true; + } + }); + } + else + this.prefecture[this.rxGoodsIndexPointer].checked=false; + }, userbuy() { this.$router.push({ path: "/myorder/userrecord", @@ -636,20 +738,20 @@ export default { bIsWM ) ) { - console.log("当前是电脑打开"); + //console.log("当前是电脑打开"); this.$nextTick(() => { - this.isadrond = false; - this.dialogInfo1 = true; - this.isadrond = false; - this.isshow = false; + this.isadrond = false; + this.dialogInfo1 = true; + this.isadrond = false; + this.isshow = false; }); } else { - console.log("当前是手机打开"); + //console.log("当前是手机打开"); this.$nextTick(() => { - this.isadrond = true; - this.isshow = true; - this.$refs.usercontent.style.display = "none "; - this.dialogInfo1 = false; + this.isadrond = true; + this.isshow = true; + this.$refs.usercontent.style.display = "none "; + this.dialogInfo1 = false; }); } }, @@ -659,20 +761,19 @@ export default { this.activeIndex = index; this.allacindex = index; this.usersearch(this.userserachlist, this.activeIndex1); - // for (let i = 0; i < this.userserachlist.length; i++) { // if (!this.userserachlist.includes(petType)) { // this.userserachlist.push(petType); // } // } - this.userserachlist = [ - { - categoryName: "", //专区 - tagUsedAge: "", //年龄 - tagFunction: "", //功能 - tagBreed: "", //品种 - }, - ]; + this.userserachlist = [ + { + categoryName: [], //专区 + tagUsedAge: [], //年龄 + tagFunction: [], //功能 + tagBreed: [], //品种 + }, + ]; let pinzhong = []; let zhuanqu = []; let age = []; @@ -729,7 +830,12 @@ export default { }); } - this.activeIndex = index; + let _self = this; + this.extraPrefecture.forEach(function(ele){ + _self.prefecture.push(ele); + _self.rxGoodsIndexPointer = _self.prefecture.length-1; + }); + this.activeIndex = index; }, selectGoodsa(item, index) { this.activeIndex1 = index; @@ -746,109 +852,125 @@ export default { this.$refs.usercontent.style.display = "block "; }); }, - + utilSimpleArrayRemove(haystack,needle){ + if(haystack.length<=0) + return false; + let index=haystack.indexOf(needle); + if(index>-1) + { + haystack.splice(index,1); + return true; + } + return false; + }, selectsearch(item, index) { this.activeIndexa = index; }, selectage(item, index) { - if(this.activeIndex=='-1'){ - this.activeIndex=0; - } - let tagUsedAge = {}; - this.activeIndexc = index; - this.userishwo1 = !this.userishwo1; - console.log(this.userishwo1); - if (item.checked == false) { - item.checked = true; - this.userserachlist[0].tagUsedAge = item.tagName; - this.$refs.chosebox1[index].className = "active"; - } else { - this.userserachlist[0].tagUsedAge = ""; - item.checked = false; - this.$refs.chosebox1[index].className = "unactive"; - } + this.checkRxGoods(false); + if(this.activeIndex=='-1'){ + this.activeIndex=0; + } + let tagUsedAge = {}; + this.activeIndexc = index; + item.checked = !item.checked; + if (item.checked == false) { + this.utilSimpleArrayRemove(this.userserachlist[0].tagUsedAge,item.tagName); + } else { + this.userserachlist[0].tagUsedAge.push(item.tagName); + } - // for (let i = 0; i < this.userserachlist.length; i++) { - // if (!this.userserachlist.includes(tagUsedAge)) { - // this.userserachlist.push(tagUsedAge); - // } - // } - this.usersearch(this.userserachlist, this.activeIndex1); + // for (let i = 0; i < this.userserachlist.length; i++) { + // if (!this.userserachlist.includes(tagUsedAge)) { + // this.userserachlist.push(tagUsedAge); + // } + // } + this.usersearch(this.userserachlist, this.activeIndex1); }, selectagc(item, index) { - // let tagFunction = {}; - if(this.activeIndex=='-1'){ - this.activeIndex=0; - } - this.activeIndexd = index; - this.userishwo2 = !this.userishwo2; - if (item.checked == false) { - item.checked = true; - this.$refs.cgosebox4[index].className = "active"; - this.userserachlist[0].tagFunction = item.tagName; - } else { - item.checked = false; - this.$refs.cgosebox4[index].className = "unactive"; - this.userserachlist[0].tagFunction = ""; - } - // if (this.userishwo2 == false) { - // tagFunction = { - // petType: this.allacindex, - // tagFunction: item.tagName, - // }; - // } else { - // console.log("这是false"); - // tagFunction = { - // petType: this.allacindex, - // }; - // } - // for (let i = 0; i < this.userserachlist.length; i++) { - // if (!this.userserachlist.includes(tagFunction)) { - // this.userserachlist.push(tagFunction); - // } - // } - this.usersearch(this.userserachlist, this.activeIndex1); + this.checkRxGoods(false); + // let tagFunction = {}; + if(this.activeIndex=='-1'){ + this.activeIndex=0; + } + this.activeIndexd = index; + item.checked = !item.checked; + if (item.checked == false) { + this.utilSimpleArrayRemove(this.userserachlist[0].tagFunction,item.tagName); + } else { + this.userserachlist[0].tagFunction.push(item.tagName); + } + + // if (this.userishwo2 == false) { + // tagFunction = { + // petType: this.allacindex, + // tagFunction: item.tagName, + // }; + // } else { + // console.log("这是false"); + // tagFunction = { + // petType: this.allacindex, + // }; + // } + // for (let i = 0; i < this.userserachlist.length; i++) { + // if (!this.userserachlist.includes(tagFunction)) { + // this.userserachlist.push(tagFunction); + // } + // } + this.usersearch(this.userserachlist, this.activeIndex1); }, selectagd(item, index) { - if(this.activeIndex=='-1'){ - this.activeIndex=0; - } - let tagBreed = {}; - this.activeIndexe = index; - this.userishwo3 = !this.userishwo3; - if (item.checked == false) { - item.checked = true; - this.$refs.chosebox3[index].className = "active"; - this.userserachlist[0].tagBreed = item.tagName; - } else { - item.checked = false; - this.$refs.chosebox3[index].className = "unactive"; - this.userserachlist[0].tagBreed = ""; - } - - // this.$refs.chosebox3[index].className = "unactive"; - // for (let i = 0; i < this.userserachlist.length; i++) { - // if (!this.userserachlist.includes(tagBreed)) { - // this.userserachlist.push(tagBreed); - // } - // } - this.usersearch(this.userserachlist, this.activeIndex1); + this.checkRxGoods(false); + if(this.activeIndex=='-1'){ + this.activeIndex=0; + } + let tagBreed = {}; + this.activeIndexe = index; + item.checked = !item.checked; + if (item.checked == false) { + this.utilSimpleArrayRemove(this.userserachlist[0].tagBreed,item.tagName); + } else { + this.userserachlist[0].tagBreed.push(item.tagName); + } + // this.$refs.chosebox3[index].className = "unactive"; + // for (let i = 0; i < this.userserachlist.length; i++) { + // if (!this.userserachlist.includes(tagBreed)) { + // this.userserachlist.push(tagBreed); + // } + // } + this.usersearch(this.userserachlist, this.activeIndex1); }, + //Fetching Categories Products selectproduct(item, index) { - if(this.activeIndex=='-1'){ - this.activeIndex=0; - } - this.activeIndexb = index; - // console.log(this.userishwo=!this.userishwo) - if (item.checked == false) { - item.checked = true; - this.$refs.chosebox[index].className = "active"; - this.userserachlist[0].categoryName = item.tagName; - } else { - item.checked = false; - this.$refs.chosebox[index].className = "unactive"; - this.userserachlist[0].categoryName = ""; - } + if(this.activeIndex=='-1'){ + this.activeIndex=0; + } + this.activeIndexb = index; + let _self=this; + //Handling Rx Goods + if(item.isRxGoods==1) + { + this.checkRxGoods(true); + } + //Handling Rx Goods end + + //Handling other options + else { + // console.log(this.userishwo=!this.userishwo) + this.checkRxGoods(false); + + //item.checked = !item.checked; + //this.prefecture[index].checked = item.checked; + item.checked = !item.checked; + this.prefecture[index].checked = item.checked; + if (item.checked == false) { + this.utilSimpleArrayRemove(this.userserachlist[0].categoryName,item.tagName); + } else { + this.userserachlist[0].categoryName.push(item.tagName); + } + + } + //Handling other options end // if (this.userishwo == false) { // console.log("===="); // categoryName = { @@ -866,10 +988,8 @@ export default { // this.userserachlist.push(categoryName); // } // } - - this.usersearch(this.userserachlist, this.activeIndex1); + this.usersearch(this.userserachlist, this.activeIndex1); }, - //弹框的显示隐藏 }, }; From f3c9a9c65ba8cb92ec98c35f530680fa8180325e Mon Sep 17 00:00:00 2001 From: Vion Date: Fri, 21 Jan 2022 19:28:46 +0800 Subject: [PATCH 3/5] addressInput error fixed --- rc-busness/components/addressInput.vue | 4 +- rc-busness/package-lock.json | 597 +++++++++++++++++- rc-busness/package.json | 5 +- .../pages/productdetails/productlist.vue | 12 +- 4 files changed, 605 insertions(+), 13 deletions(-) diff --git a/rc-busness/components/addressInput.vue b/rc-busness/components/addressInput.vue index 93761a45..ec0b252c 100644 --- a/rc-busness/components/addressInput.vue +++ b/rc-busness/components/addressInput.vue @@ -63,9 +63,9 @@ export default { { defaultValues = this.defaultValues; this.onConfirm(defaultValues); - else{ + } else { this.defaultValues = defaultValues; - + } //Initilizing end }, diff --git a/rc-busness/package-lock.json b/rc-busness/package-lock.json index 7e6dc16f..b32a6316 100644 --- a/rc-busness/package-lock.json +++ b/rc-busness/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "rc-busness", "version": "1.0.0", "dependencies": { "@nuxtjs/axios": "^5.13.6", @@ -21,6 +20,7 @@ "swiper": "^5.4.5", "vant": "^2.12.22", "vue-awesome-swiper": "^4.1.1", + "vue-qr": "^3.2.4", "vuex-persistedstate": "^4.1.0" }, "devDependencies": { @@ -1679,6 +1679,85 @@ "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz", "integrity": "sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw==" }, + "node_modules/@mapbox/node-pre-gyp": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/@mapbox/node-pre-gyp/download/@mapbox/node-pre-gyp-1.0.8.tgz", + "integrity": "sha512-CMGKi28CF+qlbXh26hDe6NxCd7amqeAzEqnS6IHeO6LoaKyM/n+Xw3HT1COdq8cuioOdlKdqn/hCmqPUOMOywg==", + "dependencies": { + "detect-libc": "^1.0.3", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.5", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-6.0.0.tgz?cache=0&sync_timestamp=1599054167787&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-6.0.0.tgz", + "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-3.1.0.tgz", + "integrity": "sha1-QV6WcEazp/HRhSd9hKpYIDcmoT8=", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", + "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/rimraf/download/rimraf-3.0.2.tgz", + "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npm.taobao.org/semver/download/semver-7.3.5.tgz", + "integrity": "sha1-C2Ich5NI2JmOSw5L6Us/EuYBjvc=", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", + "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=" + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -3196,6 +3275,11 @@ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.nlark.com/abbrev/download/abbrev-1.1.1.tgz", + "integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg=" + }, "node_modules/accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -3227,6 +3311,38 @@ "node": ">=0.4.0" } }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npm.taobao.org/agent-base/download/agent-base-6.0.2.tgz?cache=0&sync_timestamp=1603480100923&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fagent-base%2Fdownload%2Fagent-base-6.0.2.tgz", + "integrity": "sha1-Sf/1hXfP7j83F2/qtMIuAPhtf3c=", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/agent-base/node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/debug/download/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/agent-base/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/ms/download/ms-2.1.2.tgz", + "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=" + }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -3360,6 +3476,31 @@ "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" }, + "node_modules/are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.nlark.com/are-we-there-yet/download/are-we-there-yet-2.0.0.tgz", + "integrity": "sha1-Ny4Oe9J52OlMZTqqH2cgCIS/Phw=", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/are-we-there-yet/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz", + "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/arg": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.1.tgz", @@ -4315,6 +4456,20 @@ "url": "https://opencollective.com/browserslist" } }, + "node_modules/canvas": { + "version": "2.9.0", + "resolved": "https://registry.npmmirror.com/canvas/download/canvas-2.9.0.tgz", + "integrity": "sha512-0l93g7uxp7rMyr7H+XRQ28A3ud0dKIUTIEkUe1Dxh4rjUYN7B93+SjC3r1PDKA18xcQN87OFGgUnyw7LSgNLSQ==", + "hasInstallScript": true, + "dependencies": { + "@mapbox/node-pre-gyp": "^1.0.0", + "nan": "^2.15.0", + "simple-get": "^3.0.3" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -4516,6 +4671,14 @@ "simple-swizzle": "^0.2.2" } }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npm.taobao.org/color-support/download/color-support-1.1.3.tgz", + "integrity": "sha1-k4NDeaHMmgxh+C9S8NBDIiUb1aI=", + "bin": { + "color-support": "bin.js" + } + }, "node_modules/colorette": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", @@ -4633,6 +4796,11 @@ "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/console-control-strings/download/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, "node_modules/consolidate": { "version": "0.15.1", "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.15.1.tgz", @@ -5195,6 +5363,17 @@ "node": ">=0.10" } }, + "node_modules/decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmmirror.com/decompress-response/download/decompress-response-4.2.1.tgz", + "integrity": "sha1-QUAjzHowLaJc4uyC0NUjjMr9iYY=", + "dependencies": { + "mimic-response": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/deepmerge": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz", @@ -5230,6 +5409,11 @@ "resolved": "https://registry.npmjs.org/defu/-/defu-5.0.1.tgz", "integrity": "sha512-EPS1carKg+dkEVy3qNTqIdp2qV7mUP08nIsupfwQpz++slCVRw7qbQyWvSTig+kFPwz2XXp5/kIIkH+CwrJKkQ==" }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.nlark.com/delegates/download/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, "node_modules/depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -5265,6 +5449,17 @@ "node": ">=4" } }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/detect-libc/download/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/devalue": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/devalue/-/devalue-2.0.1.tgz", @@ -6245,6 +6440,25 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/gauge/download/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -6577,6 +6791,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.nlark.com/has-unicode/download/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, "node_modules/has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -6907,6 +7126,39 @@ "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" }, + "node_modules/https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npm.taobao.org/https-proxy-agent/download/https-proxy-agent-5.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttps-proxy-agent%2Fdownload%2Fhttps-proxy-agent-5.0.0.tgz", + "integrity": "sha1-4qkFQqu2inYuCghQ9sntrf2FBrI=", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/debug/download/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/https-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/ms/download/ms-2.1.2.tgz", + "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=" + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -7630,6 +7882,12 @@ "jiti": "bin/jiti.js" } }, + "node_modules/js-binary-schema-parser": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/js-binary-schema-parser/download/js-binary-schema-parser-2.0.3.tgz", + "integrity": "sha1-PXhIdI6FhuY7NOiRG2Q/Wc+2OW4=", + "license": "MIT" + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -8088,6 +8346,14 @@ "node": ">=6" } }, + "node_modules/mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.nlark.com/mimic-response/download/mimic-response-2.1.0.tgz?cache=0&sync_timestamp=1628692495204&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmimic-response%2Fdownload%2Fmimic-response-2.1.0.tgz", + "integrity": "sha1-0Tdj019hPQnsN+uzC6wEacDuj0M=", + "engines": { + "node": ">=8" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -8279,8 +8545,7 @@ "node_modules/nan": { "version": "2.15.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", - "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", - "optional": true + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==" }, "node_modules/nanoid": { "version": "3.2.0", @@ -8534,6 +8799,20 @@ "vary": "^1.1.2" } }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npm.taobao.org/nopt/download/nopt-5.0.0.tgz", + "integrity": "sha1-UwlCu1ilEvzK/lP+IQ8TolNV3Ig=", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -8580,6 +8859,17 @@ "node": ">=8" } }, + "node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/npmlog/download/npmlog-5.0.1.tgz?cache=0&sync_timestamp=1637084951649&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fnpmlog%2Fdownload%2Fnpmlog-5.0.1.tgz", + "integrity": "sha1-8GZ46A4pQZrWerlk4PpplZweuLA=", + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, "node_modules/nth-check": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", @@ -11041,6 +11331,11 @@ "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=" }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.nlark.com/set-blocking/download/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, "node_modules/set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -11124,6 +11419,21 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==" }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.nlark.com/simple-concat/download/simple-concat-1.0.1.tgz", + "integrity": "sha1-9Gl2CCujXCJj8cirXt/ibEHJVS8=" + }, + "node_modules/simple-get": { + "version": "3.1.0", + "resolved": "https://registry.npm.taobao.org/simple-get/download/simple-get-3.1.0.tgz", + "integrity": "sha1-tFvgYkNeUNFZVAtXYgLO7EC5xrM=", + "dependencies": { + "decompress-response": "^4.2.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "node_modules/simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", @@ -12688,6 +12998,15 @@ "resolved": "https://registry.npmjs.org/vue-no-ssr/-/vue-no-ssr-1.1.1.tgz", "integrity": "sha512-ZMjqRpWabMPqPc7gIrG0Nw6vRf1+itwf0Itft7LbMXs2g3Zs/NFmevjZGN1x7K3Q95GmIjWbQZTVerxiBxI+0g==" }, + "node_modules/vue-qr": { + "version": "3.2.4", + "resolved": "https://registry.npmmirror.com/vue-qr/download/vue-qr-3.2.4.tgz", + "integrity": "sha512-wQaoC0JKt3bR8Y0ql0SFF/QfL77ZTN/lov7msSccJJJSUBFauj+1l8dSD8GiU88YitEOKKhoKm4LUPdPiDi2/g==", + "dependencies": { + "canvas": "2.9", + "js-binary-schema-parser": "^2.0.2" + } + }, "node_modules/vue-router": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.3.tgz", @@ -13902,6 +14221,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmmirror.com/wide-align/download/wide-align-1.1.5.tgz", + "integrity": "sha1-3x1MIGhUNp7PPJpImPGyP72dFdM=", + "license": "ISC", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "node_modules/widest-line": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", @@ -15213,6 +15541,68 @@ "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz", "integrity": "sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw==" }, + "@mapbox/node-pre-gyp": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/@mapbox/node-pre-gyp/download/@mapbox/node-pre-gyp-1.0.8.tgz", + "integrity": "sha512-CMGKi28CF+qlbXh26hDe6NxCd7amqeAzEqnS6IHeO6LoaKyM/n+Xw3HT1COdq8cuioOdlKdqn/hCmqPUOMOywg==", + "requires": { + "detect-libc": "^1.0.3", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.5", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-6.0.0.tgz?cache=0&sync_timestamp=1599054167787&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flru-cache%2Fdownload%2Flru-cache-6.0.0.tgz", + "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", + "requires": { + "yallist": "^4.0.0" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npm.taobao.org/make-dir/download/make-dir-3.1.0.tgz", + "integrity": "sha1-QV6WcEazp/HRhSd9hKpYIDcmoT8=", + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz", + "integrity": "sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=" + } + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/rimraf/download/rimraf-3.0.2.tgz", + "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npm.taobao.org/semver/download/semver-7.3.5.tgz", + "integrity": "sha1-C2Ich5NI2JmOSw5L6Us/EuYBjvc=", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", + "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=" + } + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -16482,6 +16872,11 @@ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.nlark.com/abbrev/download/abbrev-1.1.1.tgz", + "integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg=" + }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -16501,6 +16896,29 @@ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==" }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npm.taobao.org/agent-base/download/agent-base-6.0.2.tgz?cache=0&sync_timestamp=1603480100923&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fagent-base%2Fdownload%2Fagent-base-6.0.2.tgz", + "integrity": "sha1-Sf/1hXfP7j83F2/qtMIuAPhtf3c=", + "requires": { + "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/debug/download/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/ms/download/ms-2.1.2.tgz", + "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=" + } + } + }, "aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -16598,6 +17016,27 @@ "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" }, + "are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.nlark.com/are-we-there-yet/download/are-we-there-yet-2.0.0.tgz", + "integrity": "sha1-Ny4Oe9J52OlMZTqqH2cgCIS/Phw=", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npm.taobao.org/readable-stream/download/readable-stream-3.6.0.tgz", + "integrity": "sha1-M3u9o63AcGvT4CRCaihtS0sskZg=", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "arg": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.1.tgz", @@ -17335,6 +17774,16 @@ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001300.tgz", "integrity": "sha512-cVjiJHWGcNlJi8TZVKNMnvMid3Z3TTdDHmLDzlOdIiZq138Exvo0G+G0wTdVYolxKb4AYwC+38pxodiInVtJSA==" }, + "canvas": { + "version": "2.9.0", + "resolved": "https://registry.npmmirror.com/canvas/download/canvas-2.9.0.tgz", + "integrity": "sha512-0l93g7uxp7rMyr7H+XRQ28A3ud0dKIUTIEkUe1Dxh4rjUYN7B93+SjC3r1PDKA18xcQN87OFGgUnyw7LSgNLSQ==", + "requires": { + "@mapbox/node-pre-gyp": "^1.0.0", + "nan": "^2.15.0", + "simple-get": "^3.0.3" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -17486,6 +17935,11 @@ "simple-swizzle": "^0.2.2" } }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npm.taobao.org/color-support/download/color-support-1.1.3.tgz", + "integrity": "sha1-k4NDeaHMmgxh+C9S8NBDIiUb1aI=" + }, "colorette": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", @@ -17595,6 +18049,11 @@ "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==" }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/console-control-strings/download/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, "consolidate": { "version": "0.15.1", "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.15.1.tgz", @@ -18034,6 +18493,14 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, + "decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmmirror.com/decompress-response/download/decompress-response-4.2.1.tgz", + "integrity": "sha1-QUAjzHowLaJc4uyC0NUjjMr9iYY=", + "requires": { + "mimic-response": "^2.0.0" + } + }, "deepmerge": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz", @@ -18060,6 +18527,11 @@ "resolved": "https://registry.npmjs.org/defu/-/defu-5.0.1.tgz", "integrity": "sha512-EPS1carKg+dkEVy3qNTqIdp2qV7mUP08nIsupfwQpz++slCVRw7qbQyWvSTig+kFPwz2XXp5/kIIkH+CwrJKkQ==" }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.nlark.com/delegates/download/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -18089,6 +18561,11 @@ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=" }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/detect-libc/download/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + }, "devalue": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/devalue/-/devalue-2.0.1.tgz", @@ -18856,6 +19333,22 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/gauge/download/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "requires": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + } + }, "gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -19093,6 +19586,11 @@ "has-symbols": "^1.0.2" } }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.nlark.com/has-unicode/download/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -19352,6 +19850,30 @@ "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npm.taobao.org/https-proxy-agent/download/https-proxy-agent-5.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttps-proxy-agent%2Fdownload%2Fhttps-proxy-agent-5.0.0.tgz", + "integrity": "sha1-4qkFQqu2inYuCghQ9sntrf2FBrI=", + "requires": { + "agent-base": "6", + "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.3", + "resolved": "https://registry.npmmirror.com/debug/download/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/ms/download/ms-2.1.2.tgz", + "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=" + } + } + }, "human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -19855,6 +20377,11 @@ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.12.9.tgz", "integrity": "sha512-TdcJywkQtcwLxogc4rSMAi479G2eDPzfW0fLySks7TPhgZZ4s/tM6stnzayIh3gS/db3zExWJyUx4cNWrwAmoQ==" }, + "js-binary-schema-parser": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/js-binary-schema-parser/download/js-binary-schema-parser-2.0.3.tgz", + "integrity": "sha1-PXhIdI6FhuY7NOiRG2Q/Wc+2OW4=" + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -20213,6 +20740,11 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, + "mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.nlark.com/mimic-response/download/mimic-response-2.1.0.tgz?cache=0&sync_timestamp=1628692495204&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmimic-response%2Fdownload%2Fmimic-response-2.1.0.tgz", + "integrity": "sha1-0Tdj019hPQnsN+uzC6wEacDuj0M=" + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -20371,8 +20903,7 @@ "nan": { "version": "2.15.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", - "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", - "optional": true + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==" }, "nanoid": { "version": "3.2.0", @@ -20577,6 +21108,14 @@ "vary": "^1.1.2" } }, + "nopt": { + "version": "5.0.0", + "resolved": "https://registry.npm.taobao.org/nopt/download/nopt-5.0.0.tgz", + "integrity": "sha1-UwlCu1ilEvzK/lP+IQ8TolNV3Ig=", + "requires": { + "abbrev": "1" + } + }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -20611,6 +21150,17 @@ "path-key": "^3.0.0" } }, + "npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/npmlog/download/npmlog-5.0.1.tgz?cache=0&sync_timestamp=1637084951649&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fnpmlog%2Fdownload%2Fnpmlog-5.0.1.tgz", + "integrity": "sha1-8GZ46A4pQZrWerlk4PpplZweuLA=", + "requires": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, "nth-check": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", @@ -22600,6 +23150,11 @@ "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", "integrity": "sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=" }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.nlark.com/set-blocking/download/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, "set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -22668,6 +23223,21 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==" }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.nlark.com/simple-concat/download/simple-concat-1.0.1.tgz", + "integrity": "sha1-9Gl2CCujXCJj8cirXt/ibEHJVS8=" + }, + "simple-get": { + "version": "3.1.0", + "resolved": "https://registry.npm.taobao.org/simple-get/download/simple-get-3.1.0.tgz", + "integrity": "sha1-tFvgYkNeUNFZVAtXYgLO7EC5xrM=", + "requires": { + "decompress-response": "^4.2.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", @@ -23873,6 +24443,15 @@ "resolved": "https://registry.npmjs.org/vue-no-ssr/-/vue-no-ssr-1.1.1.tgz", "integrity": "sha512-ZMjqRpWabMPqPc7gIrG0Nw6vRf1+itwf0Itft7LbMXs2g3Zs/NFmevjZGN1x7K3Q95GmIjWbQZTVerxiBxI+0g==" }, + "vue-qr": { + "version": "3.2.4", + "resolved": "https://registry.npmmirror.com/vue-qr/download/vue-qr-3.2.4.tgz", + "integrity": "sha512-wQaoC0JKt3bR8Y0ql0SFF/QfL77ZTN/lov7msSccJJJSUBFauj+1l8dSD8GiU88YitEOKKhoKm4LUPdPiDi2/g==", + "requires": { + "canvas": "2.9", + "js-binary-schema-parser": "^2.0.2" + } + }, "vue-router": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.3.tgz", @@ -24831,6 +25410,14 @@ "is-symbol": "^1.0.3" } }, + "wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmmirror.com/wide-align/download/wide-align-1.1.5.tgz", + "integrity": "sha1-3x1MIGhUNp7PPJpImPGyP72dFdM=", + "requires": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "widest-line": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", diff --git a/rc-busness/package.json b/rc-busness/package.json index 4954d2f6..516c0c7a 100644 --- a/rc-busness/package.json +++ b/rc-busness/package.json @@ -25,10 +25,11 @@ "nuxt": "^2.15.7", "nuxt-tailvue": "^1.0.95", "qrcodejs2": "^0.0.2", + "swiper": "^5.4.5", "vant": "^2.12.22", "vue-awesome-swiper": "^4.1.1", - "vuex-persistedstate": "^4.1.0", - "swiper":"^5.4.5" + "vue-qr": "^3.2.4", + "vuex-persistedstate": "^4.1.0" }, "devDependencies": { "@vant/area-data": "^1.1.5", diff --git a/rc-busness/pages/productdetails/productlist.vue b/rc-busness/pages/productdetails/productlist.vue index 746d1d17..9d792290 100644 --- a/rc-busness/pages/productdetails/productlist.vue +++ b/rc-busness/pages/productdetails/productlist.vue @@ -477,11 +477,15 @@ export default { }, created() { this.routeParams=this.$route.query; - if(this.routeParams.stype) + + let stype = this.routeParams.stype; + stype = (stype=='0'?0:1); + + if(stype>-1) this.activeIndex = this.routeParams.stype;//Initialized pet type selection }, mounted() { - let stype = this.routeParams.stype; + this.$nextTick(() => { this.$refs.userstandard[0].style.margin = 0 + "px"; }); @@ -539,7 +543,7 @@ export default { this.userstype = data; this.isLoading = false; } - this.usercatlist = this.userstype.filter((item) => item.petType == "0"); + this.usercatlist = this.userstype.filter((item) => item.petType == this.activeIndex); this.usercatlist.map((element) => { if (element.name == "品种") { pinzhong.push(element); @@ -569,7 +573,7 @@ export default { element.checked = false; }); } - console.log(pinzhong); + //console.log(pinzhong); // debugger }); let _self = this; From 8e464641d319fd85c04abdcf49d5ee349d7d2e0a Mon Sep 17 00:00:00 2001 From: Vion Date: Fri, 21 Jan 2022 20:48:13 +0800 Subject: [PATCH 4/5] Product list & search list completed --- rc-busness/assets/css/search.less | 41 +-- rc-busness/pages/index.vue | 2 +- .../pages/productdetails/productlist.vue | 50 +-- rc-busness/pages/usersearch/search.vue | 295 +++++++++++------- 4 files changed, 237 insertions(+), 151 deletions(-) diff --git a/rc-busness/assets/css/search.less b/rc-busness/assets/css/search.less index e843f622..d08b2cb1 100644 --- a/rc-busness/assets/css/search.less +++ b/rc-busness/assets/css/search.less @@ -230,7 +230,7 @@ margin-left: 0.18rem; display: block; margin-left: 0.5rem; display: block; - + cursor: pointer; } } @@ -387,11 +387,11 @@ border-radius: 100px; overflow: hidden; margin-top: 40px; .ts-scrollable-container{ - h2{ - font-weight: bold; - color: #333333; - -} + h2{ + font-weight: bold; + color: #333333; + width: 3.25rem; + } } .rc-padding--md{ padding: 0; @@ -452,6 +452,7 @@ cursor: pointer; /deep/.el-dialog { width: 920px; background: #FFFFFF; + max-width:unset; } /deep/.van-search__action{ display: block; @@ -511,7 +512,7 @@ margin-left: 8px; display: block; margin-left: 0.5rem; display: block; - + cursor:pointer; } } @@ -624,6 +625,7 @@ border-radius: 30px; } /deep/.van-search{ padding-left: 0; + width:100%; } .van-search__content--square{ display: flex; @@ -632,7 +634,7 @@ border-radius: 30px; background: white; border: 1px solid #D7D7D7; height: 50px; - width: 1200px; + width:100%; border-radius: 200px; } /deep/.van-field__left-icon @@ -658,17 +660,18 @@ border-radius: 30px; } ul li { - width: 130px; - height: 40px; - background: #ffffff; - border: 2px solid #D7D7D7; - border-radius: 30px; - text-align: center; - font-size: 14px; - display: flex; - align-items: center; - justify-content: center; - margin-left: 32px; + width: 130px; + height: 40px; + background: #ffffff; + border: 2px solid #D7D7D7; + border-radius: 30px; + text-align: center; + font-size: 14px; + display: flex; + align-items: center; + justify-content: center; + margin-left: 32px; + cursor: pointer; } li:first-child{ margin-left: 0; diff --git a/rc-busness/pages/index.vue b/rc-busness/pages/index.vue index 7f84721c..bec8625d 100644 --- a/rc-busness/pages/index.vue +++ b/rc-busness/pages/index.vue @@ -995,7 +995,7 @@ title: "主食级狗湿粮", video:"/images/dog/one.mp4", catimage: "/images/dog/one.jpg", - productimage: "/images/cat/star-1.png", + productimage: "/images/dog/star-1.png", detail:'柔软细腻慕斯 适合离乳期幼犬舔食', price:'¥77', }, diff --git a/rc-busness/pages/productdetails/productlist.vue b/rc-busness/pages/productdetails/productlist.vue index 9d792290..999ab243 100644 --- a/rc-busness/pages/productdetails/productlist.vue +++ b/rc-busness/pages/productdetails/productlist.vue @@ -481,8 +481,9 @@ export default { let stype = this.routeParams.stype; stype = (stype=='0'?0:1); - if(stype>-1) - this.activeIndex = this.routeParams.stype;//Initialized pet type selection + if(stype>-1){ + this.activeIndex = this.routeParams.stype;//Initialized pet type selection + } }, mounted() { @@ -492,6 +493,7 @@ export default { let tagSettingPromise = this.userst(); let _self = this; tagSettingPromise.then(function(resolve){ + _self.selectGoods(null,_self.activeIndex,true); _self.chooseDefaultOptions(); //_self.usetmessage(); }); @@ -508,7 +510,7 @@ export default { this.isLoading=true; let data = undefined; if(this.prefecture[this.rxGoodsIndexPointer].checked==true){ - data = await userquery(usertype, 1, 10); + data = await userquery(usertype, 1, 12); } else{ let searchCriteria=[{}]; @@ -525,7 +527,7 @@ export default { } } } - data = await searchchanpin(searchCriteria, usertype, 1, 10); + data = await searchchanpin(searchCriteria, usertype, 1, 12); } if (data) { this.rccontair = data; @@ -543,7 +545,7 @@ export default { this.userstype = data; this.isLoading = false; } - this.usercatlist = this.userstype.filter((item) => item.petType == this.activeIndex); + this.usercatlist = this.userstype.filter((item) => item.petType == "0"); this.usercatlist.map((element) => { if (element.name == "品种") { pinzhong.push(element); @@ -700,6 +702,25 @@ export default { else this.prefecture[this.rxGoodsIndexPointer].checked=false; }, + resetAllOptions(){ + let _self = this; + let categoriesSelectionEles=this.prefecture; + let functionalSelectionEles=this.catagea; + let ageSelectionEles=this.catage; + let breedSelectionEles=this.catageb; + let allSelectionEles=categoriesSelectionEles.concat(functionalSelectionEles,ageSelectionEles,breedSelectionEles); + allSelectionEles.forEach(function(tmp,index){ + tmp.checked=false; + }); + this.userserachlist = [ + { + categoryName: [], //专区 + tagUsedAge: [], //年龄 + tagFunction: [], //功能 + tagBreed: [], //品种 + }, + ]; + }, userbuy() { this.$router.push({ path: "/myorder/userrecord", @@ -760,24 +781,13 @@ export default { } }, - selectGoods(item, index) { + selectGoods(item, index, onlyRefreshCategory) { this.activeIndex1 = index; this.activeIndex = index; this.allacindex = index; - this.usersearch(this.userserachlist, this.activeIndex1); - // for (let i = 0; i < this.userserachlist.length; i++) { - // if (!this.userserachlist.includes(petType)) { - // this.userserachlist.push(petType); - // } - // } - this.userserachlist = [ - { - categoryName: [], //专区 - tagUsedAge: [], //年龄 - tagFunction: [], //功能 - tagBreed: [], //品种 - }, - ]; + this.resetAllOptions(); + if(!onlyRefreshCategory) + this.usersearch(this.userserachlist, this.activeIndex1); let pinzhong = []; let zhuanqu = []; let age = []; diff --git a/rc-busness/pages/usersearch/search.vue b/rc-busness/pages/usersearch/search.vue index c933d390..e10d47a2 100644 --- a/rc-busness/pages/usersearch/search.vue +++ b/rc-busness/pages/usersearch/search.vue @@ -100,7 +100,7 @@
    -
    +
      @@ -120,7 +120,7 @@
      {{ item.categoryName }} - ¥{{ item.ecPrice }} + {{ item.ecPrice?("¥"+item.ecPrice):'' }}
      +
      +
      + 数据加载中 +
    @@ -320,7 +325,7 @@ diff --git a/rc-busness/pages/useraddress/editaddress.vue b/rc-busness/pages/useraddress/editaddress.vue index 077d26fe..a91488ac 100644 --- a/rc-busness/pages/useraddress/editaddress.vue +++ b/rc-busness/pages/useraddress/editaddress.vue @@ -8,15 +8,15 @@ 收货人:
    -
    +
    手机号码:
    -
    +
    所在地区:
    -
    +
    详细地址:
    @@ -254,6 +254,5 @@ export default {