mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
Data tracking / Revision by 0207 ppt
This commit is contained in:
parent
28c2614ca3
commit
02b361680b
@ -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' )
|
||||
}
|
||||
|
||||
|
||||
|
@ -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: "主食级猫湿粮",
|
||||
|
@ -1413,6 +1413,13 @@ export default {
|
||||
},
|
||||
watch: {},
|
||||
mounted() {
|
||||
let popupMessage = this.$route.query.msg;
|
||||
if(popupMessage) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: popupMessage,
|
||||
});
|
||||
}
|
||||
this.checkIsLogin();
|
||||
|
||||
const that = this;
|
||||
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -116,11 +116,11 @@
|
||||
<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"
|
||||
<s class="ts-ecprice" v-if="curItem.ecPrice<curItem.rsp"
|
||||
>¥{{ curItem.rsp }}
|
||||
</span>
|
||||
</s>
|
||||
<span class="ts-record" v-if="curItem.basePoint!==0">
|
||||
购买该商品你将获得{{curItem.basePoint}}积分
|
||||
购买该商品你将获得<span class="rc-zeta">{{curItem.basePoint}}积分</span>
|
||||
</span>
|
||||
|
||||
<!-- <span class="rc-title">购买该商品你将得到22积分</span> -->
|
||||
@ -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,
|
||||
}
|
||||
])
|
||||
|
||||
|
@ -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,7 +621,16 @@ 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;
|
||||
@ -713,7 +737,23 @@ 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;
|
||||
@ -725,6 +765,7 @@ export default {
|
||||
allSelectionEles.forEach(function(tmp,index){
|
||||
tmp.checked=false;
|
||||
});
|
||||
this.checkRxGoods(false);
|
||||
this.userserachlist = [
|
||||
{
|
||||
categoryName: [], //专区
|
||||
|
@ -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>
|
||||
|
@ -144,10 +144,12 @@
|
||||
<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 {
|
||||
envData,
|
||||
phone: "",
|
||||
layerMSg: "手机格式不对",
|
||||
tel: "",
|
||||
@ -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;
|
||||
@ -280,7 +282,7 @@ export default {
|
||||
async serdiscount (mobile,couponId) {
|
||||
let data = await inserdiscount(mobile,couponId);
|
||||
if(data){
|
||||
console.log(data);
|
||||
|
||||
}
|
||||
//console.log(data);
|
||||
},
|
||||
@ -292,26 +294,22 @@ export default {
|
||||
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);
|
||||
//console.log(e);
|
||||
},
|
||||
selectGoods(item, index) {
|
||||
this.activeIndex = index;
|
||||
console.log(index);
|
||||
|
||||
if (this.activeIndex == 0) {
|
||||
this.ifpassword = false;
|
||||
} else {
|
||||
@ -320,7 +318,6 @@ export default {
|
||||
},
|
||||
//注册账户
|
||||
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,79 +358,84 @@ 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){
|
||||
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();
|
||||
let returnMessage='';
|
||||
if(data.type==1) {
|
||||
if(data.data.memberName===undefined){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '欢迎回来'
|
||||
});
|
||||
console.log('-----')
|
||||
returnMessage = '欢迎回来';
|
||||
}
|
||||
else{
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '欢迎回来'+data.data.memberName
|
||||
});
|
||||
returnMessage = '欢迎回来'+data.data.memberName;
|
||||
}
|
||||
_hmt.push([
|
||||
"_trackCustomEvent",
|
||||
"login",
|
||||
{}
|
||||
])
|
||||
} else if(data.type==2) {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '恭喜注册成功'
|
||||
});
|
||||
let couponId='0000000123';
|
||||
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,"0000000140");
|
||||
this.serdiscount(this.tel,newGuestCouponCodes[1]);
|
||||
}, 100);
|
||||
setTimeout(() => {
|
||||
this.serdiscount(this.tel,"0000000122");
|
||||
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({
|
||||
|
@ -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: [], //专区
|
||||
|
Loading…
Reference in New Issue
Block a user