Commit 3b9eaf8b authored by 黄媛媛's avatar 黄媛媛

update

parent 9d93c931
......@@ -7,11 +7,11 @@
@click="clickHandler(c.page_url)"
>
<image
:src="c.pic_url"
:src="getIconLink(c.IconPath)"
mode="widthFix"
style="width: 80rpx; height: 80rpx;"
/>
<text class="grid-text">{{ c.name }}</text>
<text class="grid-text">{{ c.Name }}</text>
</u-grid-item>
</u-grid>
</div>
......
<template>
<view class="catsstyle2">
<view class="item" v-for="(x, index) in d" :key="index" @click="goUrl" :data-url='x.page_url'>
<view class="left">{{x.name}}</view>
<view class="left">{{x.Name}}</view>
<view class="right">
<image :src="x.big_pic_url" style="width:100%;height:100%" mode="aspectFit" />
<image :src="getIconLink(x.IconPath)" style="width:100%;height:100%" mode="aspectFit" />
</view>
</view>
</view>
......
......@@ -3,7 +3,7 @@
<view class="tabsbox">
<u-tabs
:is-scroll="true"
name="name"
name="Name"
:list="d"
:active-color="mainColor"
:current="active"
......@@ -60,7 +60,15 @@ export default {
data() {
return {
mainColor: "",
page: 1,
msg:{
pageIndex: 1,
pageSize:14,
Name:'',
GoodsType:0,
CategoryIds:'',
OrderBy:1,
UserId:0,
},
page_count: 1,
mh: 0,
g: [],
......@@ -78,8 +86,9 @@ export default {
},
methods: {
changeHandler(i) {
this.msg.CategoryIds= this.d[i].Id+'';
this.msg.page = 1;
this.tid = i;
this.page = 1;
this.g = [];
this.init();
this.active=i
......@@ -90,29 +99,49 @@ export default {
init() {
this.isover = false;
this.loading = true;
this.request(
this.request2(
{
url: "",
data: {
r: "api/default/goods-list",
page: this.page,
cat_id: this.d[this.tid].id,
},
url: '/api/AppletGoods/GetAppletGoodsPageListForZY',
data: this.msg
},
(res) => {
this.g = this.g.concat(res.data.list);
this.page_count = res.data.pagination.page_count;
if (this.page_count == 1) {
res => {
this.loading = false;
console.log("resggg",res);
if(res.resultCode==1){
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1 || this.page_count==0) {
this.isover = true;
}
this.loading = false;
}
uni.hideNavigationBarLoading();
}
);
// this.request(
// {
// url: "",
// data: {
// r: "api/default/goods-list",
// page: this.page,
// cat_id: this.d[this.tid].id,
// },
// },
// (res) => {
// this.g = this.g.concat(res.data.list);
// this.page_count = res.data.pagination.page_count;
// if (this.page_count == 1) {
// this.isover = true;
// }
// this.loading = false;
// }
// );
},
lower(e) {
if (this.page < this.page_count) {
if (this.msg.pageIndex < this.page_count) {
if (!this.loading) {
this.page++;
this.msg.pageIndex++;
this.init();
}
} else {
......
......@@ -3,7 +3,7 @@
<div class="left-slider">
<sidebar
:active="tid"
name="name"
name="Name"
:active-color="mainColor"
:border="false"
:list="d"
......@@ -88,6 +88,15 @@ export default {
loading: false,
tid: 0,
active: 0,
msg:{
pageIndex: 1,
pageSize:14,
Name:'',
GoodsType:0,
CategoryIds:'',
OrderBy:1,
UserId:0,
},
};
},
created() {
......@@ -99,8 +108,9 @@ export default {
},
methods: {
changeHandler(i) {
this.msg.CategoryIds= this.d[i].Id+'';
this.msg.page = 1;
this.tid = i;
this.page = 1;
this.g = [];
this.init();
},
......@@ -110,29 +120,49 @@ export default {
init() {
this.isover = false;
this.loading = true;
this.request(
this.request2(
{
url: "",
data: {
r: "api/default/goods-list",
page: this.page,
cat_id: this.d[this.tid].id,
},
url: '/api/AppletGoods/GetAppletGoodsPageListForZY',
data: this.msg
},
(res) => {
this.g = this.g.concat(res.data.list);
this.page_count = res.data.pagination.page_count;
if (this.page_count == 1) {
res => {
this.loading = false;
console.log("resggg",res);
if(res.resultCode==1){
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1 || this.page_count==0) {
this.isover = true;
}
this.loading = false;
}
uni.hideNavigationBarLoading();
}
);
// this.request(
// {
// url: "",
// data: {
// r: "api/default/goods-list",
// page: this.page,
// cat_id: this.d[this.tid].id,
// },
// },
// (res) => {
// this.g = this.g.concat(res.data.list);
// this.page_count = res.data.pagination.page_count;
// if (this.page_count == 1) {
// this.isover = true;
// }
// this.loading = false;
// }
// );
},
lower(e) {
if (this.page < this.page_count) {
if (this.msg.pageIndex < this.page_count) {
if (!this.loading) {
this.page++;
this.msg.pageIndex++;
this.init();
}
} else {
......
......@@ -3,7 +3,7 @@
<div class="left-slider">
<sidebar
:active="tid"
name="name"
name="Name"
:active-color="mainColor"
:border="false"
:list="d"
......@@ -29,12 +29,12 @@
:key="index"
@click="clickHandler(x.page_url)"
>
<div class="left">{{ x.name }}</div>
<div class="left">{{ x.Name }}</div>
<div class="right">
<image
v-if="x.big_pic_url && x.big_pic_url.length > 0"
v-if="x.IconPath && x.IconPath.length > 0"
mode="aspectFit"
:src="x.big_pic_url"
:src="getIconLink(c.IconPath)"
style="width: 100%; height: 100%;"
/>
</div>
......@@ -63,13 +63,13 @@ export default {
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.sd = this.d[this.tid].child;
this.sd = this.d[this.tid].ChildList;
},
methods: {
changeHandler(i) {
this.tid = i;
this.page = 1;
this.sd = this.d[this.tid].child;
this.sd = this.d[this.tid].ChildList;
},
clickHandler(url) {
uni.navigateTo({ url: url });
......
......@@ -3,7 +3,7 @@
<div class="left-slider">
<sidebar
:active="tid"
name="name"
name="Name"
:active-color="mainColor"
:border="false"
:list="d"
......@@ -29,11 +29,11 @@
@click="clickHandler(c.page_url)"
>
<image
:src="c.pic_url"
mode="widthFix"
class="imgclass"
:src="getIconLink(c.IconPath)"
style="width: 80rpx; height: 80rpx;"
/>
<text class="grid-text">{{ c.name }}</text>
<text class="grid-text">{{ c.Name }}</text>
</u-grid-item>
</u-grid>
</div>
......@@ -62,13 +62,13 @@ export default {
created() {
this.mainColor = this.$uiConfig.mainColor;
this.activeStyle = `background:${this.mainColor};`;
this.sd = this.d[this.tid].child;
this.sd = this.d[this.tid].ChildList;
},
methods: {
changeHandler(i) {
this.tid = i;
this.page = 1;
this.sd = this.d[this.tid].child;
this.sd = this.d[this.tid].ChildList;
},
clickHandler(url) {
uni.navigateTo({ url: url });
......@@ -78,6 +78,10 @@ export default {
</script>
<style>
.catstyle6 .imgclass{
display: block;
width: 80rpx; height: 80rpx;
}
.catstyle6 {
display: flex;
}
......
......@@ -3,7 +3,7 @@
<view class="tabsbox">
<u-tabs
:is-scroll="true"
name="name"
name="Name"
:list="d"
:active-color="mainColor"
:current="active"
......@@ -22,11 +22,11 @@
'border-color': stid == i ? mainColor : '#999',
color: stid == i ? mainColor : '#999',
}"
v-for="(x, i) in d[tid].child"
v-for="(x, i) in d[tid].ChildList"
:key="i"
@click="clickSecondHandler(i)"
>
{{ x.name }}
{{ x.Name }}
</div>
</div>
<div
......@@ -84,12 +84,24 @@ export default {
active: 0,
stid: 0,
sHeight: 0,
msg:{
pageIndex: 1,
pageSize:14,
Name:'',
GoodsType:0,
CategoryIds:'',
OrderBy:1,
UserId:0,
},
};
},
created() {
this.mainColor = this.$uiConfig.mainColor;
},
mounted() {
this.CategoryIdsList=[];
this.CategoryIds1=this.d[0].Id;
this.CategoryIds2=this.d[0].ChildList[0].Id;
this.init();
setTimeout(() => {
this.computSecondHeight();
......@@ -97,9 +109,11 @@ export default {
},
methods: {
changeHandler(i) {
this.active=i;
this.CategoryIds1=this.d[i].Id;
this.msg.page = 1;
this.tid = i;
this.stid = 0;
this.page = 1;
this.g = [];
this.init();
setTimeout(() => {
......@@ -107,8 +121,10 @@ export default {
}, 500);
},
clickSecondHandler(i) {
let tid=this.tid;
this.CategoryIds2=this.d[tid].ChildList[i].Id;
this.stid = i;
this.page = 1;
this.msg.page = 1;
this.g = [];
this.init();
},
......@@ -125,31 +141,54 @@ export default {
.exec();
},
init() {
this.CategoryIdsList=[];
this.CategoryIdsList.push(this.CategoryIds1,this.CategoryIds2);
this.msg.CategoryIds=this.CategoryIdsList.join(',');
this.isover = false;
this.loading = true;
this.request(
this.request2(
{
url: "",
data: {
r: "api/default/goods-list",
page: this.page,
cat_id: this.d[this.tid].child[this.stid].id,
},
url: '/api/AppletGoods/GetAppletGoodsPageListForZY',
data: this.msg
},
(res) => {
this.g = this.g.concat(res.data.list);
this.page_count = res.data.pagination.page_count;
if (this.page_count == 1) {
res => {
this.loading = false;
console.log("resggg",res);
if(res.resultCode==1){
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1 || this.page_count==0) {
this.isover = true;
}
this.loading = false;
}
uni.hideNavigationBarLoading();
}
);
// this.request(
// {
// url: "",
// data: {
// r: "api/default/goods-list",
// page: this.page,
// cat_id: this.d[this.tid].ChildList[this.stid].id,
// },
// },
// (res) => {
// this.g = this.g.concat(res.data.list);
// this.page_count = res.data.pagination.page_count;
// if (this.page_count == 1) {
// this.isover = true;
// }
// this.loading = false;
// }
// );
},
lower(e) {
if (this.page < this.page_count) {
if (this.msg.pageIndex < this.page_count) {
if (!this.loading) {
this.page++;
this.msg.pageIndex++;
this.init();
}
} else {
......
......@@ -3,7 +3,7 @@
<view class="left-slider">
<sidebar
:active="tid"
name="name"
name="Name"
:active-color="mainColor"
:border="false"
:list="d"
......@@ -26,10 +26,10 @@
'border-color': stid == i ? mainColor : '#999',
color: stid == i ? mainColor : '#999',
}"
v-for="(x, i) in d[tid].child"
v-for="(x, i) in d[tid].ChildList"
:key="i"
@click="clickSecondHandler(i)"
>{{ x.name }}</view>
>{{ x.Name }}</view>
</view>
</view>
......@@ -49,9 +49,9 @@
<view class="good-name">{{ cx.name }}</view>
<view class="goodprice">
<view class="left">
<view v-if="cx.vip_price">
<view v-if="cx.price_member">
<van-tag plain color="#f39800">会员价</van-tag>
<span class="vip">329</span>
<span class="vip">{{cx.price_member}}</span>
</view>
<view class="price" :style="{ color: mainColor }">{{ cx.price_content }}</view>
<view class="sell">{{ cx.sales }}</view>
......@@ -90,7 +90,19 @@ export default {
tid: 0,
stid: 0,
active: 0,
scrollHeight: "calc(100% - 33px"
scrollHeight: "calc(100% - 33px)",
msg:{
pageIndex: 1,
pageSize:14,
Name:'',
GoodsType:0,
CategoryIds:'',
OrderBy:1,
UserId:0,
},
CategoryIdsList:[],
CategoryIds1:'',
CategoryIds2:'',
};
},
components: {
......@@ -105,19 +117,26 @@ export default {
}
},
mounted() {
this.CategoryIdsList=[];
this.CategoryIds1=this.d[0].Id;
this.CategoryIds2=this.d[0].ChildList[0].Id;
this.init();
},
methods: {
changeHandler(e) {
this.tid = e;
changeHandler(i) {
this.active=i;
this.CategoryIds1=this.d[i].Id;
this.msg.page = 1;
this.tid = i;
this.stid = 0;
this.page = 1;
this.g = [];
this.init();
},
clickSecondHandler(e) {
this.stid = e;
this.page = 1;
clickSecondHandler(i) {
let tid=this.tid;
this.CategoryIds2=this.d[tid].ChildList[i].Id;
this.stid = i;
this.msg.page = 1;
this.g = [];
this.init();
},
......@@ -125,31 +144,54 @@ export default {
uni.navigateTo({ url: e });
},
init() {
this.CategoryIdsList=[];
this.CategoryIdsList.push(this.CategoryIds1,this.CategoryIds2);
this.msg.CategoryIds=this.CategoryIdsList.join(',');
this.isover = false;
this.loading = true;
this.request(
this.request2(
{
url: "",
data: {
r: "api/default/goods-list",
page: this.page,
cat_id: this.d[this.tid].child[this.stid].id
}
url: '/api/AppletGoods/GetAppletGoodsPageListForZY',
data: this.msg
},
res => {
this.g = this.g.concat(res.data.list);
this.page_count = res.data.pagination.page_count;
if (this.page_count == 1) {
this.loading = false;
console.log("resggg",res);
if(res.resultCode==1){
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1 || this.page_count==0) {
this.isover = true;
}
this.loading = false;
}
uni.hideNavigationBarLoading();
}
);
// this.request(
// {
// url: "",
// data: {
// r: "api/default/goods-list",
// page: this.page,
// cat_id: this.d[this.tid].child[this.stid].id
// }
// },
// res => {
// this.g = this.g.concat(res.data.list);
// this.page_count = res.data.pagination.page_count;
// if (this.page_count == 1) {
// this.isover = true;
// }
// this.loading = false;
// }
// );
},
lower(e) {
if (this.page < this.page_count) {
if (this.msg.pageIndex < this.page_count) {
if (!this.loading) {
this.page++;
this.msg.pageIndex++;
this.init();
}
} else {
......
......@@ -6,42 +6,42 @@
style="voerflow: hidden; overflow-y: auto;"
>
<style1
v-if="cstyle.cat_style == 1"
v-if="cstyle.Type == 1 && cstyle.Style == 1"
:d="types"
:h="(navHeight+54)"
></style1>
<style2
v-if="cstyle.cat_style == 2"
v-if="cstyle.Type == 1 && cstyle.Style == 2"
:d="types"
:h="(navHeight+54)"
></style2>
<style3
v-if="cstyle.cat_style == 3"
v-if="cstyle.Type == 1 && cstyle.Style == 3"
:d="types"
:h="(navHeight+54)"
></style3>
<style4
v-if="cstyle.cat_style == 5"
v-if="cstyle.Type == 1 && cstyle.Style == 4"
:d="types"
:h="(navHeight+54)"
></style4>
<style5
v-if="cstyle.cat_style == 6"
v-if="cstyle.Type == 2 && cstyle.Style == 1"
:d="types"
:h="(navHeight+54)"
></style5>
<style6
v-if="cstyle.cat_style == 4"
v-if="cstyle.Type == 2 && cstyle.Style == 2"
:d="types"
:h="(navHeight+54)"
></style6>
<style7
v-if="cstyle.cat_style == 7"
v-if="cstyle.Type == 2 && cstyle.Style == 3"
:d="types"
:h="(navHeight+54)"
></style7>
<style8
v-if="cstyle.cat_style == 8"
v-if="cstyle.Type == 2 && cstyle.Style == 4"
:d="types"
:h="(navHeight+54)"
></style8>
......@@ -82,6 +82,7 @@ import style11 from "@/components/cats/style10";
export default {
data() {
return {
cat_style:2,
isloading: true,
pageTitle: "分类",
navHeight: 0,
......@@ -96,7 +97,10 @@ export default {
types: [],
changeHeight: 0,
contentHeight: 0,
cstyle: {},
cstyle: {
Type:1,
Style:1
},
};
},
components: {
......@@ -116,9 +120,9 @@ export default {
},
onLoad() {
this.navHeight = this.$navHeight - 2;
this.cstyle = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").cat_style
: [];
// this.cstyle = uni.getStorageSync("basedata")
// ? uni.getStorageSync("basedata").cat_style
// : [];
if (this.cstyle.cat_style == "4") {
// this.searchStyle.p = {
// position: "fixed",
......@@ -146,34 +150,74 @@ export default {
title: this.pageTitle,
});
this.init();
this.getStyle();
uni.showNavigationBarLoading();
},
methods: {
goHome() {
uni.redirectTo({ url: "/pages/index/main" });
},
init() {
this.request(
getStyle(){
this.request2(
{
url: "",
data: {
r: "api/cat/list",
cat_id: "",
select_cat_id: "",
url: '/api/AppletGoods/GetProductCategoryTreeList',
data: {}
},
res => {
console.log("res",res);
this.isloading = false;
if(res.resultCode==1){
this.types = res.data;
console.log("this.types",this.types)
// this.types.forEach((x) => {
// if (x.IconPath == "") {
// x.IconPath =
// "https://cdnimg.iotweixin.com/uploads/mall1285/20200330/2099ca5e58ff3e0548d730bfaae14f7a.png";
// }
// });
}
uni.hideNavigationBarLoading();
}
);
},
init() {
this.request2(
{
url: '/api/AppletGoods/GetProductCategoryStyleInfo',
data: {}
},
(res) => {
this.types = res.data.list;
this.types.forEach((x) => {
if (x.pic_url == "") {
x.pic_url =
"https://cdnimg.iotweixin.com/uploads/mall1285/20200330/2099ca5e58ff3e0548d730bfaae14f7a.png";
res => {
console.log("res",res);
if(res.resultCode==1){
this.cstyle=res.data;
}
});
this.isloading = false;
uni.hideNavigationBarLoading();
}
);
// this.request(
// {
// url: "",
// data: {
// r: "api/cat/list",
// cat_id: "",
// select_cat_id: "",
// },
// },
// (res) => {
// this.types = res.data.list;
// console.log("this.types",this.types)
// this.types.forEach((x) => {
// if (x.pic_url == "") {
// x.pic_url =
// "https://cdnimg.iotweixin.com/uploads/mall1285/20200330/2099ca5e58ff3e0548d730bfaae14f7a.png";
// }
// });
// this.isloading = false;
// uni.hideNavigationBarLoading();
// }
// );
},
},
};
......
......@@ -47,7 +47,7 @@
nonceStr: this.payInfo.nonceStr,
package: this.payInfo.package,
signType: this.payInfo.signType,
paySign: '',
paySign: this.payInfo.sign,
success: function (res) {
console.log("success",res)
},
......
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