Commit d09030c7 authored by zhengke's avatar zhengke

修改

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