Commit d09030c7 authored by zhengke's avatar zhengke

修改

parent bde7954a
......@@ -23,7 +23,7 @@
</view>
{{ cx.name }}
</view>
<view class="good-info">
<view class="good-info" v-if="this.setting&&this.setting.is_show_korea!=1">
<view class="price" :style="{ color: mainColor }">¥{{cx.price}}</view>
<view class="sell">{{ cx.sales }}</view>
<view v-if="setting.is_show_cart==1" class="cart" @click.stop="showSkuHandler(cx)">
......@@ -56,6 +56,7 @@
sku: {},
mainColor: "",
setting: {},
isShowKorea: 0, //是否显示韩国的 0显示 1不显示
};
},
mounted() {
......
......@@ -94,7 +94,7 @@
//跳转详情
goDetail(item){
uni.navigateTo({
url: '/pages/goods/list?CategoryIds=' + item.Id
url: '/pages/goods/list?CategoryIds=' + item.Id + '&Name='+item.Name
});
}
}
......
<template>
<view class="good-list">
<view class="sortbox">
<view class="sortbox" v-if="isShowKorea==0">
<view class="item" @click="change(0,0)" :style="{ color: msg.OrderBy == 0 || msg.OrderBy==7 ? mainColor : '#222' }"
style="display: flex; justify-content: center;">
<text>综合</text>
<u-icon v-if="msg.OrderBy==0||msg.OrderBy==7" :name="msg.OrderBy == 7 ? 'descending' : 'ascending'" size="36" :color="msg.OrderBy == 0 || msg.OrderBy == 7 ? mainColor : '#222'"></u-icon>
<u-icon v-if="msg.OrderBy==0||msg.OrderBy==7" :name="msg.OrderBy == 7 ? 'descending' : 'ascending'" size="36"
:color="msg.OrderBy == 0 || msg.OrderBy == 7 ? mainColor : '#222'"></u-icon>
</view>
<view class="item" @click="change(1,1)" :style="{ color: msg.OrderBy == 1 || msg.OrderBy == 5 ? mainColor : '#222' }"
style="display: flex; justify-content: center;">
<text>时间</text>
<u-icon v-if="msg.OrderBy==1||msg.OrderBy==5" :name="msg.OrderBy == 1 ? 'descending' : 'ascending'" size="36" :color="msg.OrderBy == 1 || msg.OrderBy == 5 ? mainColor : '#222'"></u-icon>
<u-icon v-if="msg.OrderBy==1||msg.OrderBy==5" :name="msg.OrderBy == 1 ? 'descending' : 'ascending'" size="36"
:color="msg.OrderBy == 1 || msg.OrderBy == 5 ? mainColor : '#222'"></u-icon>
</view>
<view class="item" :style="{ color: msg.OrderBy == 2 || msg.OrderBy==3 ? mainColor : '#222' }" style="display: flex; justify-content: center;"
@click="change(2,2)">
<text>价格</text>
<u-icon v-if="msg.OrderBy==2||msg.OrderBy==3" :name="msg.OrderBy == 3 ? 'descending' : 'ascending'" size="36" :color="msg.OrderBy == 2 || msg.OrderBy==3 ? mainColor : '#222'"></u-icon>
<u-icon v-if="msg.OrderBy==2||msg.OrderBy==3" :name="msg.OrderBy == 3 ? 'descending' : 'ascending'" size="36"
:color="msg.OrderBy == 2 || msg.OrderBy==3 ? mainColor : '#222'"></u-icon>
</view>
<view class="item" @click="change(4,3)" :style="{ color: msg.OrderBy == 4 || msg.OrderBy == 6 ? mainColor : '#222' }"
style="display: flex; justify-content: center;">
<text>销量</text>
<u-icon v-if="msg.OrderBy==4||msg.OrderBy==6" :name="msg.OrderBy == 4 ? 'descending' : 'ascending'" size="36" :color="msg.OrderBy == 4 || msg.OrderBy == 6 ? mainColor : '#222'"></u-icon>
<u-icon v-if="msg.OrderBy==4||msg.OrderBy==6" :name="msg.OrderBy == 4 ? 'descending' : 'ascending'" size="36"
:color="msg.OrderBy == 4 || msg.OrderBy == 6 ? mainColor : '#222'"></u-icon>
</view>
</view>
<view v-if="g.length > 0" style="
......@@ -41,13 +45,10 @@
width: calc(100vw - 20px);
padding-top: 10px;
">
<u-empty text="没有找到商品信息" font-size="36" mode="list" ></u-empty>
<u-empty text="没有找到商品信息" font-size="36" mode="list"></u-empty>
</view>
<view class="quick" v-if="!loading">
<!-- <view class="item">
<u-icon name="cart-o" size="48" color="#333" />
</view> -->
<view class="item" @click="goTop">
<u-icon name="arrow-up" size="48" color="#333" />
</view>
......@@ -60,6 +61,7 @@
export default {
data() {
return {
pageTitle: '',
status: "loadmore",
sortStatus: 1,
mainColor: "",
......@@ -90,10 +92,11 @@
GoodsType: 0,
CategoryIds: '',
OrderBy: 1,
GoodsPageType:0,
StoreId:0,
GoodsPageType: 0,
StoreId: 0,
},
newsortType: 1,
isShowKorea: 0, //是否显示韩国的 0显示 1不显示
};
},
components: {
......@@ -102,15 +105,19 @@
onLoad(option) {
this.mainColor = this.$uiConfig.mainColor;
this.catId = option.cat_id;
if (option && option.coupon_id && option.UseType) {//优惠券带过来的参数
if (option && option.coupon_id && option.UseType) { //优惠券带过来的参数
console.log(option.coupon_id)
if(option.UseType==1){
this.msg.CategoryIds = option.coupon_id
}else if(option.UseType==2){
this.msg.GoodsIds = option.coupon_id
if (option.UseType == 1) {
this.msg.CategoryIds = option.coupon_id
} else if (option.UseType == 2) {
this.msg.GoodsIds = option.coupon_id
}
}
if (option.Name) {
this.pageTitle = option.Name
uni.setNavigationBarTitle({
title: this.pageTitle,
});
}
if (option.CategoryIds) {
this.msg.CategoryIds = option.CategoryIds;
......@@ -118,6 +125,7 @@
},
mounted() {
this.init();
this.isShowKorea = uni.getStorageSync("basedata").mall.setting.is_show_korea;
},
methods: {
scroll: function(e) {
......@@ -150,7 +158,7 @@
if (t == 2) {
if (this.msg.OrderBy == 3) {
this.msg.OrderBy = 2; //升序
} else {
} else {
this.msg.OrderBy = 3; //降序
}
}
......@@ -169,12 +177,12 @@
init() {
this.isover = false;
this.loading = true;
this.showLoading = this.msg.pageIndex != 1;
this.msg.GoodsPageType = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0;
this.msg.StoreId = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0;
let IsOpenReserve = uni.getStorageSync("GetAppConfig")?uni.getStorageSync("GetAppConfig").IsOpenReserve:0
if(IsOpenReserve==0){//如果没开启 门店id赋值为0
this.msg.StoreId=0
this.showLoading = this.msg.pageIndex != 1;
this.msg.GoodsPageType = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo").UserPageType : 0;
this.msg.StoreId = uni.getStorageSync("storeId") ? uni.getStorageSync("storeId").storeId : 0;
let IsOpenReserve = uni.getStorageSync("GetAppConfig") ? uni.getStorageSync("GetAppConfig").IsOpenReserve : 0
if (IsOpenReserve == 0) { //如果没开启 门店id赋值为0
this.msg.StoreId = 0
}
this.request2({
url: '/api/AppletGoods/GetAppletGoodsPageListForZY',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment