Data tracking / Revision by 0207 ppt

This commit is contained in:
Vion 2022-02-07 18:12:29 +08:00
parent 28c2614ca3
commit 02b361680b
10 changed files with 340 additions and 203 deletions

View File

@ -208,17 +208,22 @@ export const userquery = (stype, ) => {
return fetch('goods?petType='+stype, data, 'POST' )
}
//处方信息
export const userque = (goodsName, curPage,curRow) => {
export const userque = (goodsName, petType, curPage,curRow) => {
if(!curPage)
curPage=1;
if(!curRow)
curRow=10;
let queryTail='page='+curPage+'&rows='+curRow;
let queryTail='&page='+curPage+'&rows='+curRow;
let query='?0';
if(goodsName)
queryTail = '?goodsName='+goodsName;
query += '&goodsName='+goodsName;
if(petType!==undefined && petType!=='') {
query += '&petType='+petType;
}
query += queryTail;
var data = {
}
return fetch('goods'+queryTail, data, 'POST' )
return fetch('goods'+query, data, 'POST' )
}

View File

@ -1,4 +1,6 @@
let devData={
newGuestCoupon:['0000000123','0000000140','0000000122'],
rxGoodsFilter:[{tagName:'体重管理',tagValue:'体重'},{tagName:'提升活力',tagValue:'活力'},{tagName:'泌尿道',tagValue:'泌尿'},{tagName:'消化道',tagValue:'消化'},{tagName:'皮肤',tagValue:'皮肤'}],
catlistvideo:[
{
title: "主食级猫湿粮",
@ -137,6 +139,8 @@ let devData={
//Production data
let prdData={
newGuestCoupon:['0000000123','0000000140','0000000122','HJXRL20210827'],
rxGoodsFilter:[{tagName:'体重管理',tagValue:'体重'},{tagName:'提升活力',tagValue:'活力'},{tagName:'泌尿道',tagValue:'泌尿'},{tagName:'消化道',tagValue:'消化'},{tagName:'皮肤',tagValue:'皮肤'}],
catlistvideo:[
{
title: "主食级猫湿粮",

View File

@ -1413,25 +1413,32 @@ export default {
},
watch: {},
mounted() {
this.checkIsLogin();
let popupMessage = this.$route.query.msg;
if(popupMessage) {
this.$message({
type: 'success',
message: popupMessage,
});
}
this.checkIsLogin();
const that = this;
const that = this;
this.ifAdoid();
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
if (this.usermessage == null || this.usermessage == undefined) {
this.userunlogin = true;
}
window.addEventListener("scroll", this.handleScroll, true);
this.userchufang(); //
this.ifAdoid();
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
if (this.usermessage == null || this.usermessage == undefined) {
this.userunlogin = true;
}
window.addEventListener("scroll", this.handleScroll, true);
this.userchufang(); //
this.catmessage(); //
this.catclickGan();
this.catclickShi();
this.catmessage(); //
this.catclickGan();
this.catclickShi();
this.dogmessage(); //
this.userdogShi();
this.userdogGan();
this.dogmessage(); //
this.userdogShi();
this.userdogGan();
},
destroyed() {
window.removeEventListener("scroll", this.scrollToTop);
@ -1856,7 +1863,7 @@ export default {
if (!item) item = this.discounchufang[0].title;
this.dataLoaded = false;
let list = [];
let data = await userque(item, 1, 8);
let data = await userque(item, '', 1, 8);
if (data) {
list = data.slice(0, 8);
this.processinformation = list;

View File

@ -376,7 +376,7 @@ export default {
userget(){
let user = this.$store.state.userInfo;
if (user) {
this.userdraw(user.data.mobile);
//this.userdraw(user.data.mobile);
this.dialogInfo1 = true;
} else {
this.$router.push({
@ -392,7 +392,7 @@ export default {
let valDateFromTime=0;
let valDateToTime=0;
let dateChecked=true;
let avaliableCouponNum = 0;
if (data) {
this.drawlist=[];
for(let itemInCart of this.goldmedal) {
@ -423,10 +423,14 @@ export default {
if(dateChecked && myCoupon.activityId != 10 && myCoupon.status == 0 && (!myCoupon.productCodes || myCoupon.productCodes.indexOf(itemInCart.productCode)>-1)) {
data.data.splice(tmpIndex,1);
_self.drawlist.push(myCoupon);
avaliableCouponNum++;
}
tmpIndex++;
}
}
if(avaliableCouponNum > 0) {
this.curCoupon.couponName = '有 '+avaliableCouponNum+' 张优惠券可以使用';
}
}
},
pickCoupon(item){
@ -537,8 +541,6 @@ export default {
addressDetailInfo: orderAddress[0].detailAddress,
},
};
console.log(this.curCoupon,item.productCode,this.discountedProductCode);
debugger;
if(this.curCoupon.couponId && item.productCode == this.discountedProductCode) {
oneProduct.couponId = this.curCoupon.couponId;
oneProduct.couponTypeId = this.curCoupon.couponTypeId;
@ -634,13 +636,17 @@ export default {
"_trackCustomEvent",
"placing_order",
{
"product_id_":item.productCode,
"product_name_": item.productName,
"product_quantity_" : item.buyCount,
"product_amount_" : item.buyCount*item.productPrice,
"product_id":item.productCode,
"product_name": item.productName,
"product_quantity" : item.buyCount,
"product_amount" : item.buyCount*item.productPrice,
}
])
});
let user = this.$store.state.userInfo;
if(user) {
this.userdraw(user.data.mobile);
}
// this.addressstype = this.$route.query.stype;
// this.orderNumber = this.$route.query.orderNumber;
// this.canceldanhao(this.orderNumber);

View File

@ -180,7 +180,7 @@ export default {
"payment",
{
"payType" : payType,
"product_amount_" : this.userPayData.userprice,
"product_amount" : this.userPayData.userprice,
}
])
},
@ -241,7 +241,7 @@ export default {
"payment_finished",
{
"payType" : 'native',
"product_amount_" : this.userPayData.userprice,
"product_amount" : this.userPayData.userprice,
}
])
} else if (res.fail) {

View File

@ -114,14 +114,14 @@
<div class="rc-productdetail" v-if="userbuy">
<i class="ts-row-title">商品价格</i>
<span class="ts-realprice">{{ curItem.ecPrice }}</span>
<span class="ts-remove ts-ecprice" v-if="curItem.ecPrice<curItem.rsp"
>{{ curItem.rsp }}
</span>
<span class="ts-record" v-if="curItem.basePoint!==0">
购买该商品你将获得{{curItem.basePoint}}积分
</span>
<i class="ts-row-title">商品价格</i>
<span class="ts-realprice">{{ curItem.ecPrice }}</span>
<s class="ts-ecprice" v-if="curItem.ecPrice<curItem.rsp"
>{{ curItem.rsp }}
</s>
<span class="ts-record" v-if="curItem.basePoint!==0">
购买该商品你将获得<span class="rc-zeta">{{curItem.basePoint}}积分</span>
</span>
<!-- <span class="rc-title">购买该商品你将得到22积分</span> -->
</div>
@ -461,9 +461,9 @@ export default {
"_trackCustomEvent",
"product_visit",
{
"product_id_":this.curItem.productCode,
"product_category_":this.curItem.categoryName,
"product_name_": this.curItem.productName,
"product_id":this.curItem.productCode,
"product_category":this.curItem.categoryName,
"product_name": this.curItem.productName,
}
])
}
@ -479,11 +479,11 @@ export default {
"_trackCustomEvent",
"get_coupon",
{
"product_id_":this.curItem.productCode,
"product_category_":this.curItem.categoryName,
"product_name_": this.curItem.productName,
"product_quantity_" : this.sales_num,
"product_amount_" : this.sales_num*this.curItem.ecPrice,
"product_id":this.curItem.productCode,
"product_category":this.curItem.categoryName,
"product_name": this.curItem.productName,
"product_quantity" : this.sales_num,
"product_amount" : this.sales_num*this.curItem.ecPrice,
}
])
if (this.usermessage.data !== "" || this.usermessage.data !== undefined) {
@ -656,11 +656,11 @@ export default {
"_trackCustomEvent",
"add_to_cart",
{
"product_id_":this.curItem.productCode,
"product_category_":this.curItem.categoryName,
"product_name_": this.curItem.productName,
"product_quantity_" : this.sales_num,
"product_amount_" : this.sales_num*this.curItem.ecPrice,
"product_id":this.curItem.productCode,
"product_category":this.curItem.categoryName,
"product_name": this.curItem.productName,
"product_quantity" : this.sales_num,
"product_amount" : this.sales_num*this.curItem.ecPrice,
}
])
}
@ -685,11 +685,11 @@ export default {
"_trackCustomEvent",
"add_to_cart",
{
"product_id_":this.curItem.productCode,
"product_category_":this.curItem.categoryName,
"product_name_": this.curItem.productName,
"product_quantity_" : this.sales_num,
"product_amount_" : this.sales_num*this.curItem.ecPrice,
"product_id":this.curItem.productCode,
"product_category":this.curItem.categoryName,
"product_name": this.curItem.productName,
"product_quantity" : this.sales_num,
"product_amount" : this.sales_num*this.curItem.ecPrice,
}
])

View File

@ -39,8 +39,8 @@
</li>
</ol>
</div>
<div class="online rc-md-up"></div>
<div class="ts-scrollable-container">
<div class="online rc-md-up" v-if="!inRxGoods"></div>
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>年龄:</h2>
<ol class="ts-scrollable">
<li
@ -54,8 +54,8 @@
</li>
</ol>
</div>
<div class="online rc-md-up"></div>
<div class="ts-scrollable-container">
<div class="online rc-md-up" v-if="!inRxGoods"></div>
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>功能:</h2>
<ol class="ts-scrollable">
<li
@ -69,8 +69,8 @@
</li>
</ol>
</div>
<div class="online rc-md-up"></div>
<div class="ts-scrollable-container">
<div class="online rc-md-up" v-if="!inRxGoods"></div>
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>品种:</h2>
<ol class="ts-scrollable">
<li
@ -84,6 +84,20 @@
</li>
</ol>
</div>
<div class="online rc-md-up" v-if="inRxGoods"></div>
<div class="ts-scrollable-container" v-if="inRxGoods">
<h2>功能:</h2>
<ol class="ts-scrollable">
<li
v-for="(item, index) in rxFilters"
:key="index"
@click="selectFilter(item, index)"
:class="item.checked ? 'active' : 'unactive'"
>
{{ item.tagName }}
</li>
</ol>
</div>
<div class="online rc-md-up"></div>
</div>
</div>
@ -313,12 +327,14 @@ import Myheader from "~/components/header.vue";
import MyFooter from '~/components/rc-footer.vue'
import FixRight from "~/components/fixed-right.vue";
import tabs from "~/components/tabs.vue";
import envData from "~/config/env-data.js";
import {
userstype,
biaome,
biaomessage,
searchchanpin,
userquery
userquery,
userque
} from "../../ajax/getData";
export default {
data() {
@ -328,6 +344,8 @@ export default {
path:'/productdetails/productlist/',
}
],
envData,
rxFilters:[],
value: "",
isLoading: false,
userstype: [],
@ -507,13 +525,10 @@ export default {
_self.chooseDefaultOptions();
//_self.usetmessage();
});
/*
if (stype !== "" && stype !== undefined) {
this.onmessage(stype);//Wont happen
} else {
this.usetmessage();
}
*/
//Handling RxGoods filter
let curEnv = process.env.NODE_ENV;
this.rxFilters = envData[curEnv].rxGoodsFilter;
//Handling RxGoods filter end
},
methods: {
async usersearch(stype, usertype) {
@ -598,7 +613,7 @@ export default {
async usetmessage() {
this.isLoading = true;
let data = await biaome(this.activeIndex1, "", 1, 10);
let data = await biaome(this.activeIndex1, "", 1, 20);
if (data) {
this.rccontair = data;
this.isLoading = false;
@ -606,12 +621,21 @@ export default {
},
async onmessage(stype) {
this.isLoading = true;
let data = await biaomessage(stype, "", 1, 10);
let data = await biaomessage(stype, "", 1, 20);
if (data) {
this.rccontair = data;
this.isLoading = false;
}
},
async getRxGoodsByFunc(functionName) {
this.isLoading = true;
let petType = this.activeIndex1;
let data = await userque(functionName, petType, 1, 20);
if (data) {
this.rccontair = data;
this.isLoading = false;
}
},
chooseDefaultOptions(){
let tagStatus = this.routeParams.tagStatus;
let categoryName = this.routeParams.categoryName;
@ -713,8 +737,24 @@ export default {
else {
this.prefecture[this.rxGoodsIndexPointer].checked=false;
this.inRxGoods=false;
for(let tmp of this.rxFilters) {
tmp.checked = false;
}
}
},
selectFilter(item) {
for(let tmp of this.rxFilters) {
if(item.tagValue == tmp.tagValue) {
item.checked = !item.checked;
} else {
tmp.checked = false;
}
}
if(item.checked)
this.getRxGoodsByFunc(item.tagValue);
else
this.getRxGoodsByFunc();
},
resetAllOptions(){
let _self = this;
let categoriesSelectionEles=this.prefecture;
@ -725,6 +765,7 @@ export default {
allSelectionEles.forEach(function(tmp,index){
tmp.checked=false;
});
this.checkRxGoods(false);
this.userserachlist = [
{
categoryName: [], //

View File

@ -22,7 +22,7 @@
:key="index"
class="rc-margin-top--md"
>
<h2 class="rc-beta rc-margin-y--md">{{ index==1?'明星犬粮':'明星猫粮' }}</h2>
<h2 class="rc-beta rc-margin-y--md">{{ index==1?'明星猫粮':'明星犬粮' }}</h2>
<div
class="rc-click rc-margin-bottom--md"
@click="selectproduce(item, index)"
@ -43,7 +43,7 @@
center
"
@click="selectproduce(item, index)"
>点击查看</strong
>立即购买</strong
>
</div>
</li>

View File

@ -144,47 +144,49 @@
<script>
import { userLongin,sendMsg,vadatnmsg,userregOrLogin,inserdiscount } from "../../ajax/getData";
import { mapMutations } from "vuex";
import envData from "~/config/env-data.js";
import Myheader from "~/components/header.vue"; //
export default {
data() {
return {
phone: "",
layerMSg: "手机格式不对",
tel: "",
password: "",
userdata:{},
allcheck:false,
activeIndex: 0,
tamp:'',
radioData: [
{ value: '全部' ,href:'https://royalcanin.com.cn/privacy' },
{ value: '部分' ,href:''},
{ value: '零散' }
],
hash:'',
text: "",
sms: "",
buttonmsg: "获取验证码",
flag: false,
adminCode: "",
captchadata:'',
zhud: false,
loading: false,
usertitle: true,
ifpassword: false,
verification:'',//
userislogin:[],//
checked: false,
isRank: false,
isRanka: false,
usercheckbox:false,
data() {
return {
envData,
phone: "",
layerMSg: "手机格式不对",
tel: "",
password: "",
userdata:{},
allcheck:false,
activeIndex: 0,
tamp:'',
radioData: [
{ value: '全部' ,href:'https://royalcanin.com.cn/privacy' },
{ value: '部分' ,href:''},
{ value: '零散' }
],
hash:'',
text: "",
sms: "",
buttonmsg: "获取验证码",
flag: false,
adminCode: "",
captchadata:'',
zhud: false,
loading: false,
usertitle: true,
ifpassword: false,
verification:'',//
userislogin:[],//
checked: false,
isRank: false,
isRanka: false,
usercheckbox:false,
swiperData: [
// { index: 1 ,title:''},
// { index: 2 ,title:''},
]
};
},
swiperData: [
// { index: 1 ,title:''},
// { index: 2 ,title:''},
]
};
},
components: {
Myheader
},
@ -228,7 +230,7 @@ export default {
//
checkBoxa(e,order){
let checked=e.target.checked;
console.log(e.target.checked);
// console.log(e.target.checked);
// this.isRank=e.target.checked;
// this.isRanka=e.target.checked;
if(order==3){
@ -241,7 +243,7 @@ export default {
else if(order==1){
this.isRanka=e.target.checked;
}
console.log(this.isRank,this.isRanka);
//console.log(this.isRank,this.isRanka);
if(this.isRanka==true && this.isRank==true){
this.allcheck=true;
}else{
@ -268,7 +270,7 @@ export default {
//console.log("-----");
let data = await sendMsg(this.tel);
if(data){
console.log(data);
//console.log(data);
//this.captchadata=data.msgNum;
this.tamp=data.tamp;
this.hash=data.hash;
@ -276,51 +278,46 @@ export default {
},
//
async serdiscount (mobile,couponId) {
let data = await inserdiscount(mobile,couponId);
if(data){
console.log(data);
}
//console.log(data);
},
//
async serdiscount (mobile,couponId) {
let data = await inserdiscount(mobile,couponId);
if(data){
//
async vadmsg() {
//console.log("-----");
let data = await vadatnmsg(this.sms,this.hash,this.tamp);
if(data){
return data;
}
},
}
//console.log(data);
},
//
async vadmsg() {
//console.log("-----");
let data = await vadatnmsg(this.sms,this.hash,this.tamp);
if(data){
return data;
}
},
//
async userlogin() {
//console.log("-----");
let data= await userregOrLogin(this.tel);
if(data){
this.userislogin=data;
console.log(this.userislogin);
//console.log(this.userislogin);
}
},
onClickHander(e) {
console.log(e);
},
selectGoods(item, index) {
this.activeIndex = index;
console.log(index);
if (this.activeIndex == 0) {
this.ifpassword = false;
} else {
this.ifpassword = true;
}
//console.log(e);
},
selectGoods(item, index) {
this.activeIndex = index;
if (this.activeIndex == 0) {
this.ifpassword = false;
} else {
this.ifpassword = true;
}
},
//
useredd() {
//console.log("---");
this.usertitle = false;
},
@ -336,7 +333,7 @@ export default {
getCode() {
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") {
this.$message({
type: 'warning',
type: 'error',
message: '手机号码输入有误'
});
return
@ -361,85 +358,90 @@ export default {
async register() {
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") {
this.$message({
type: 'warning',
type: 'error',
message: '手机号码输入有误'
});
return
}
if(this.sms==''){
this.$message({
type: 'warning',
type: 'error',
message: '请输入验证码'
});
return
}
if(this.usercheckbox==false){
if(this.usercheckbox==false){
this.$message({
type: 'warning',
type: 'error',
message: '请先勾选相关协议'
});
return
}
if(this.usercheckbox==false){
//console.log('----');
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") {
this.$message({
type: 'warning',
type: 'error',
message: '手机号码输入有误'
});
this.$message({
type: 'warning',
type: 'error',
message: '请先同意隐私声明和账号使用协议'
});
return
}
}
else{
console.log('===')
let data=await this.vadmsg();
if(data.code=="1")
{
data = await userregOrLogin(this.tel);
console.log(data);
let token=JSON.stringify(data);
this.changeClod({ cloud: token });
this.checkIsLogin();
if(data.type==1){
if(data.data.memberName===undefined){
this.$message({
type: 'warning',
message: '欢迎回来'
});
console.log('-----')
}
else{
this.$message({
type: 'warning',
message: '欢迎回来'+data.data.memberName
});
}
}else if(data.type==2){
this.$message({
type: 'warning',
message: '恭喜注册成功'
});
let couponId='0000000123';
this.serdiscount(this.tel,couponId);
setTimeout(() => {
this.serdiscount(this.tel,"0000000140");
}, 100);
setTimeout(() => {
this.serdiscount(this.tel,"0000000122");
}, 500);
}
this.$router.push({
path: "/",
});
data = await userregOrLogin(this.tel);
let token=JSON.stringify(data);
this.changeClod({ cloud: token });
this.checkIsLogin();
let returnMessage='';
if(data.type==1) {
if(data.data.memberName===undefined){
returnMessage = '欢迎回来';
}
else{
returnMessage = '欢迎回来'+data.data.memberName;
}
_hmt.push([
"_trackCustomEvent",
"login",
{}
])
} else if(data.type==2) {
returnMessage = '恭喜注册成功';
_hmt.push([
"_trackCustomEvent",
"register",
{}
])
let curEnv = process.env.NODE_ENV;
let newGuestCouponCodes = envData[curEnv].newGuestCoupon;
let couponId=newGuestCouponCodes[0];
this.serdiscount(this.tel,couponId);
setTimeout(() => {
this.serdiscount(this.tel,newGuestCouponCodes[1]);
}, 100);
setTimeout(() => {
this.serdiscount(this.tel,newGuestCouponCodes[2]);
}, 500);
setTimeout(() => {
this.serdiscount(this.tel,newGuestCouponCodes[3]);
}, 500);
}
this.$router.push({
path: "/",
query:{msg:returnMessage}
});
}else{
this.$message({
type: 'warning',
message: data.msg,
});
this.$message({
type: 'warning',
message: data.msg,
});
return
}
}},

View File

@ -78,7 +78,7 @@
</ol>
</div>
<div class="ts-scrollable-container">
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>年龄:</h2>
<ol class="ts-scrollable">
<li
@ -92,6 +92,21 @@
</li>
</ol>
</div>
<div class="ts-scrollable-container" v-if="inRxGoods">
<h2>功能:</h2>
<ol class="ts-scrollable">
<li
v-for="(item, index) in rxFilters"
:key="index"
@click="selectFilter(item, index)"
:class="item.checked ? 'active' : 'unactive'"
>
{{ item.tagName }}
</li>
</ol>
</div>
</div>
</div>
</div>
@ -177,7 +192,7 @@
</ol>
</div>
<div class="ts-scrollable-container">
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>年龄:</h2>
<ol class="ts-scrollable">
<li
@ -191,7 +206,7 @@
</li>
</ol>
</div>
<div class="ts-scrollable-container">
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>功能:</h2>
<ol class="ts-scrollable">
<li
@ -205,7 +220,7 @@
</li>
</ol>
</div>
<div class="ts-scrollable-container">
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>品种:</h2>
<ol class="ts-scrollable">
<li
@ -220,6 +235,20 @@
</ol>
</div>
<div class="ts-scrollable-container" v-if="inRxGoods">
<h2>功能:</h2>
<ol class="ts-scrollable">
<li
v-for="(item, index) in rxFilters"
:key="index"
@click="selectFilter(item, index)"
:class="item.checked ? 'active' : 'unactive'"
>
{{ item.tagName }}
</li>
</ol>
</div>
</div>
</div>
@ -263,7 +292,7 @@
</ol>
</div>
<div class="ts-scrollable-container">
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>年龄:</h2>
<ol class="ts-scrollable">
<li
@ -277,7 +306,7 @@
</li>
</ol>
</div>
<div class="ts-scrollable-container">
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>功能:</h2>
<ol class="ts-scrollable">
<li
@ -291,7 +320,7 @@
</li>
</ol>
</div>
<div class="ts-scrollable-container">
<div class="ts-scrollable-container" v-if="!inRxGoods">
<h2>品种:</h2>
<ol class="ts-scrollable">
<li
@ -305,6 +334,19 @@
</li>
</ol>
</div>
<div class="ts-scrollable-container" v-if="inRxGoods">
<h2>功能:</h2>
<ol class="ts-scrollable">
<li
v-for="(item, index) in rxFilters"
:key="index"
@click="selectFilter(item, index)"
:class="item.checked ? 'active' : 'unactive'"
>
{{ item.tagName }}
</li>
</ol>
</div>
</div>
</div>
<!--
@ -331,16 +373,19 @@ import Myheader from "~/components/header.vue";
import MyFooter from '~/components/rc-footer.vue'
import FixRight from "~/components/fixed-right.vue";
import tabs from "~/components/tabs.vue";
import { biaome, userstype, searchchanpin, userquery } from "../../ajax/getData";
import { biaome, userstype, searchchanpin, userquery, userque } from "../../ajax/getData";
import envData from "~/config/env-data.js";
export default {
data() {
return {
value: "",
envData,
crumbs:[
{
path:'/usersearch/search/',
}
],
rxFilters:[],
isLoading: true,
userserachlist: [
{
@ -528,6 +573,10 @@ export default {
mounted() {
this.usetmessage();
this.userst();
//Handling RxGoods filter
let curEnv = process.env.NODE_ENV;
this.rxFilters = envData[curEnv].rxGoodsFilter;
//Handling RxGoods filter end
},
methods: {
//
@ -605,6 +654,15 @@ export default {
this.isLoading=false;
}
},
async getRxGoodsByFunc(functionName) {
this.isLoading = true;
let petType = this.activeIndex1;
let data = await userque(functionName, petType, 1, 20);
if (data) {
this.rccontair = data;
this.isLoading = false;
}
},
async userst() {
this.isLoading = true;
let pinzhong = [];
@ -721,6 +779,19 @@ export default {
this.inRxGoods=false;
}
},
selectFilter(item) {
for(let tmp of this.rxFilters) {
if(item.tagValue == tmp.tagValue) {
item.checked = !item.checked;
} else {
tmp.checked = false;
}
}
if(item.checked)
this.getRxGoodsByFunc(item.tagValue);
else
this.getRxGoodsByFunc();
},
resetAllOptions(){
let _self = this;
let categoriesSelectionEles=this.prefecture;
@ -731,6 +802,7 @@ export default {
allSelectionEles.forEach(function(tmp,index){
tmp.checked=false;
});
this.checkRxGoods(false);
this.userserachlist = [
{
categoryName: [], //