Commit 541daca8 authored by 黄媛媛's avatar 黄媛媛

update

parent b0368046
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="left-slider"> <div class="left-slider">
<sidebar <sidebar
:active="tid" :active="tid"
name="name" name="Name"
:active-color="mainColor" :active-color="mainColor"
:border="false" :border="false"
:list="d" :list="d"
...@@ -23,20 +23,20 @@ ...@@ -23,20 +23,20 @@
/> />
</div> </div>
<div v-for="(c, i) in sd" :key="i"> <div v-for="(c, i) in sd" :key="i">
<div class="sec-title">{{ c.name }}</div> <div class="sec-title">{{ c.Name }}</div>
<u-grid :column-num="3" :border="false"> <u-grid :column-num="3" :border="false">
<template v-if="c.child && c.child.length > 0"> <template v-if="c.ChildList && c.ChildList.length > 0">
<u-grid-item <u-grid-item
v-for="(cc, ci) in c.child" v-for="(cc, ci) in c.ChildList"
:key="ci" :key="ci"
@click="clickHandler(c.page_url)" @click="clickHandler(c.page_url)"
> >
<image <image
:src="c.pic_url" :src="c.IconPath"
mode="widthFix" mode="widthFix"
style="width: 80rpx; height: 80rpx;" style="width: 80rpx; height: 80rpx;"
/> />
<text class="grid-text">{{ c.name }}</text> <text class="grid-text">{{ c.Name }}</text>
</u-grid-item> </u-grid-item>
</template> </template>
<template v-else> <template v-else>
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
created() { created() {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.activeStyle = `background:${this.mainColor};`; this.activeStyle = `background:${this.mainColor};`;
this.sd = this.d[this.tid].child; this.sd = this.d[this.tid].ChildList;
}, },
components:{ components:{
sidebar sidebar
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
changeHandler(e) { changeHandler(e) {
this.tid = e; this.tid = e;
this.page = 1; this.page = 1;
this.sd = this.d[this.tid].child; this.sd = this.d[this.tid].ChildList;
}, },
clickHandler(e) { clickHandler(e) {
uni.navigateTo({ url: e }); uni.navigateTo({ url: e });
...@@ -102,6 +102,8 @@ export default { ...@@ -102,6 +102,8 @@ export default {
height: 100%; height: 100%;
width: 1px; width: 1px;
flex: 1; flex: 1;
overflow: hidden;
overflow-y: auto;
} }
.catstyle10 .right-slider .van-icon--image, .catstyle10 .right-slider .van-icon--image,
.catstyle10 .right-slider .van-icon { .catstyle10 .right-slider .van-icon {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="left-slider"> <view class="left-slider">
<sidebar <sidebar
:active="tid" :active="tid"
name="name" name="Name"
:active-color="mainColor" :active-color="mainColor"
:border="false" :border="false"
:list="d" :list="d"
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
'border-color': stid == i ? mainColor : '#999', 'border-color': stid == i ? mainColor : '#999',
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" :key="i"
@click="clickSecondHandler(i)" @click="clickSecondHandler(i)"
>{{ x.name }}</view> >{{ x.Name }}</view>
</view> </view>
</view> </view>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
:enable-flex="true" :enable-flex="true"
:style="{ height: '100%', padding: '0 0 0 10px' }" :style="{ height: '100%', padding: '0 0 0 10px' }"
> >
<view class="good" v-for="(cx, ci) in g" :key="ci" @click="clickHandler(url)"> <view class="good" v-for="(cx, ci) in g" :key="ci" @click="clickHandler(cx.page_url)">
<view class="good-img"> <view class="good-img">
<image mode="aspectFit" :src="cx.cover_pic" style="width: 100%; height: 100%;" /> <image mode="aspectFit" :src="cx.cover_pic" style="width: 100%; height: 100%;" />
</view> </view>
...@@ -51,10 +51,10 @@ ...@@ -51,10 +51,10 @@
<view class="left"> <view class="left">
<view v-if="cx.vip_price"> <view v-if="cx.vip_price">
<van-tag plain color="#f39800">会员价</van-tag> <van-tag plain color="#f39800">会员价</van-tag>
<span class="vip">329</span> <span class="vip">{{cx.level_price}}</span>
</view> </view>
<view class="price" :style="{ color: mainColor }">{{ cx.price_content }}</view> <view class="price" :style="{ color: mainColor }">{{ cx.price_content }}</view>
<view class="sell">{{ cx.sales }}</view> <view class="sell">{{ cx.price }}</view>
</view> </view>
<view class="right"> <view class="right">
<u-icon name="cart-circle-o" size="44" :color="mainColor" /> <u-icon name="cart-circle-o" size="44" :color="mainColor" />
...@@ -90,7 +90,19 @@ export default { ...@@ -90,7 +90,19 @@ export default {
tid: 0, tid: 0,
stid: 0, stid: 0,
active: 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: { components: {
...@@ -105,19 +117,27 @@ export default { ...@@ -105,19 +117,27 @@ export default {
} }
}, },
mounted() { mounted() {
this.CategoryIdsList=[];
this.CategoryIds1=this.d[0].Id;
this.CategoryIds2=this.d[0].ChildList[0].Id;
this.init(); this.init();
}, },
methods: { methods: {
changeHandler(e) { changeHandler(i) {
this.tid = e; this.active=i;
this.CategoryIds1=this.d[i].Id;
this.CategoryIds2=this.d[i].ChildList[0].Id;
this.msg.page = 1;
this.tid = i;
this.stid = 0; this.stid = 0;
this.page = 1;
this.g = []; this.g = [];
this.init(); this.init();
}, },
clickSecondHandler(e) { clickSecondHandler(i) {
this.stid = e; let tid=this.tid;
this.page = 1; this.CategoryIds2=this.d[tid].ChildList[i].Id;
this.stid = i;
this.msg.page = 1;
this.g = []; this.g = [];
this.init(); this.init();
}, },
...@@ -125,31 +145,56 @@ export default { ...@@ -125,31 +145,56 @@ export default {
uni.navigateTo({ url: e }); uni.navigateTo({ url: e });
}, },
init() { init() {
this.isover = false; this.CategoryIdsList=[];
this.loading = true; this.CategoryIdsList.push(this.CategoryIds1,this.CategoryIds2);
this.request( this.msg.CategoryIds=this.CategoryIdsList.join(',');
{ this.isover = false;
url: "", this.loading = true;
data: { this.request2(
r: "api/default/goods-list", {
page: this.page, url: '/api/AppletGoods/GetAppletGoodsPageListForZY',
cat_id: this.d[this.tid].child[this.stid].id data: this.msg
} },
}, res => {
res => { this.loading = false;
this.g = this.g.concat(res.data.list); console.log("resggg",res);
this.page_count = res.data.pagination.page_count; if(res.resultCode==1){
if (this.page_count == 1) { this.g = this.g.concat(res.data.pageData);
this.isover = true; this.page_count = res.data.pageCount;
} if (this.page_count == 1 || this.page_count==0) {
this.loading = false; this.isover = true;
} }
);
}
uni.hideNavigationBarLoading();
}
);
// this.isover = false;
// this.loading = true;
// 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) { lower(e) {
if (this.page < this.page_count) { if (this.msg.pageIndex < this.page_count) {
if (!this.loading) { if (!this.loading) {
this.page++; this.msg.pageIndex++;
this.init(); this.init();
} }
} else { } else {
...@@ -174,6 +219,8 @@ export default { ...@@ -174,6 +219,8 @@ export default {
height: 100%; height: 100%;
width: 1px; width: 1px;
flex: 1; flex: 1;
overflow: hidden;
overflow-y: auto;
} }
.catstyle11 .good { .catstyle11 .good {
border-bottom: 1rpx solid #f1f1f1; border-bottom: 1rpx solid #f1f1f1;
......
...@@ -46,10 +46,11 @@ ...@@ -46,10 +46,11 @@
<div class="good-name">{{ cx.name }}</div> <div class="good-name">{{ cx.name }}</div>
<div class="goodprice"> <div class="goodprice">
<div class="left"> <div class="left">
<div v-if="cx.vip_price"> <div v-if="cx.level_price">
<!-- todo VIP价格显示--> <!-- todo VIP价格显示-->
<u-tag color="#f39800" type="warning">会员价</u-tag> <u-tag size="mini" shape="circle" text="会员价" type="warning" />
<span class="vip">¥329</span> <!-- <u-tag color="#f39800" type="warning">会员价</u-tag> -->
<span class="vip">{{cx.level_price}}</span>
</div> </div>
<div class="price" :style="{ color: mainColor }"> <div class="price" :style="{ color: mainColor }">
{{ cx.price_content }} {{ cx.price_content }}
......
...@@ -111,6 +111,7 @@ export default { ...@@ -111,6 +111,7 @@ export default {
changeHandler(i) { changeHandler(i) {
this.active=i; this.active=i;
this.CategoryIds1=this.d[i].Id; this.CategoryIds1=this.d[i].Id;
this.CategoryIds2=this.d[i].ChildList[0].Id;
this.msg.page = 1; this.msg.page = 1;
this.tid = i; this.tid = i;
this.stid = 0; this.stid = 0;
......
...@@ -49,9 +49,9 @@ ...@@ -49,9 +49,9 @@
<view class="good-name">{{ cx.name }}</view> <view class="good-name">{{ cx.name }}</view>
<view class="goodprice"> <view class="goodprice">
<view class="left"> <view class="left">
<view v-if="cx.price_member"> <view v-if="cx.level_price">
<van-tag plain color="#f39800">会员价</van-tag> <van-tag plain color="#f39800">会员价</van-tag>
<span class="vip">{{cx.price_member}}</span> <span class="vip">{{cx.level_price}}</span>
</view> </view>
<view class="price" :style="{ color: mainColor }">{{ cx.price_content }}</view> <view class="price" :style="{ color: mainColor }">{{ cx.price_content }}</view>
<view class="sell">{{ cx.sales }}</view> <view class="sell">{{ cx.sales }}</view>
...@@ -126,6 +126,7 @@ export default { ...@@ -126,6 +126,7 @@ export default {
changeHandler(i) { changeHandler(i) {
this.active=i; this.active=i;
this.CategoryIds1=this.d[i].Id; this.CategoryIds1=this.d[i].Id;
this.CategoryIds2=this.d[i].ChildList[0].Id;
this.msg.page = 1; this.msg.page = 1;
this.tid = i; this.tid = i;
this.stid = 0; this.stid = 0;
...@@ -216,6 +217,8 @@ export default { ...@@ -216,6 +217,8 @@ export default {
height: 100%; height: 100%;
width: 1px; width: 1px;
flex: 1; flex: 1;
overflow: hidden;
overflow-y: auto;
} }
.catstyle8 .good { .catstyle8 .good {
border-bottom: 1rpx solid #f1f1f1; border-bottom: 1rpx solid #f1f1f1;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="left-slider"> <view class="left-slider">
<sidebar <sidebar
:active="tid" :active="tid"
name="name" name="Name"
:active-color="mainColor" :active-color="mainColor"
:border="false" :border="false"
:list="d" :list="d"
...@@ -23,21 +23,21 @@ ...@@ -23,21 +23,21 @@
/> />
</view> </view>
<view v-for="(x, index) in sd" :key="index"> <view v-for="(x, index) in sd" :key="index">
<view class="sec-title">{{ x.name }}</view> <view class="sec-title">{{ x.Name }}</view>
<template v-if="x.child && x.child.length > 0"> <template v-if="x.ChildList && x.ChildList.length > 0">
<view <view
class="item" class="item"
v-for="(cx, ci) in x.child" v-for="(cx, ci) in x.ChildList"
:key="ci" :key="ci"
@click="clickHandler" @click="clickHandler"
:data-url="cx.page_url" :data-url="cx.page_url"
> >
<view class="left">{{ c.name }}</view> <view class="left">{{ c.Name }}</view>
<view class="right"> <view class="right">
<image <image
v-if="cx.big_pic_url && cx.big_pic_url.length > 0" v-if="cx.IconPath && cx.IconPath!=''"
mode="aspectFit" mode="aspectFit"
:src="cx.big_pic_url" :src="cx.IconPath"
style="width: 100%; height: 100%;" style="width: 100%; height: 100%;"
/> />
</view> </view>
...@@ -74,13 +74,13 @@ export default { ...@@ -74,13 +74,13 @@ export default {
}, },
created() { created() {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.sd = this.d[this.tid].child; this.sd = this.d[this.tid].ChildList;
}, },
methods: { methods: {
changeHandler(e) { changeHandler(e) {
this.tid = e; this.tid = e;
this.page = 1; this.page = 1;
this.sd = this.d[this.tid].child; this.sd = this.d[this.tid].ChildList;
}, },
clickHandler(e) { clickHandler(e) {
uni.navigateTo({ url: e }); uni.navigateTo({ url: e });
......
...@@ -78,7 +78,13 @@ export default { ...@@ -78,7 +78,13 @@ export default {
u: {}, u: {},
contentHeight: 0, contentHeight: 0,
showModal: false, showModal: false,
deleteID: 0 deleteID: 0,
msg:{
Name:'',
IsDefault:0,
Mobile:'',
},
}; };
}, },
components: { components: {
...@@ -120,21 +126,36 @@ export default { ...@@ -120,21 +126,36 @@ export default {
this.loading = false; this.loading = false;
uni.showNavigationBarLoading(); uni.showNavigationBarLoading();
let h = this.apiheader(); let h = this.apiheader();
this.request( this.request2(
{ {
url: "", url: '/api/AppletUser/GetUserShippingAddressList',
header: h, data: this.msg
data: { },
r: "api/user/address" res => {
} uni.hideNavigationBarLoading();
}, console.log("res",res);
if(res.resultCode==1){
this.isloading = false;
this.list = res.data.list;
}
}
);
// this.request(
// {
// url: "",
// header: h,
// data: {
// r: "api/user/address"
// }
// },
res => { // res => {
uni.hideNavigationBarLoading(); // uni.hideNavigationBarLoading();
this.isloading = false; // this.isloading = false;
this.list = res.data.list; // this.list = res.data.list;
} // }
); // );
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync("userinfo"); this.u = uni.getStorageSync("userinfo");
......
...@@ -46,17 +46,17 @@ ...@@ -46,17 +46,17 @@
:h="(navHeight+54)" :h="(navHeight+54)"
></style8> ></style8>
<style9 <style9
v-if="cstyle.cat_style == 9" v-if="cstyle.Type == 3 && cstyle.Style == 1"
:d="types" :d="types"
:h="(navHeight+54)" :h="(navHeight+54)"
></style9> ></style9>
<style10 <style10
v-if="cstyle.cat_style == 10" v-if="cstyle.Type == 3 && cstyle.Style == 2"
:d="types" :d="types"
:h="(navHeight+54)" :h="(navHeight+54)"
></style10> ></style10>
<style11 <style11
v-if="cstyle.cat_style == 11" v-if="cstyle.Type == 3 && cstyle.Style == 3"
:d="types" :d="types"
:h="(navHeight+54)" :h="(navHeight+54)"
></style11> ></style11>
...@@ -78,7 +78,7 @@ import style7 from "@/components/cats/style7"; ...@@ -78,7 +78,7 @@ import style7 from "@/components/cats/style7";
import style8 from "@/components/cats/style8"; import style8 from "@/components/cats/style8";
import style9 from "@/components/cats/style9"; import style9 from "@/components/cats/style9";
import style10 from "@/components/cats/style10"; import style10 from "@/components/cats/style10";
import style11 from "@/components/cats/style10"; import style11 from "@/components/cats/style11";
export default { export default {
data() { data() {
return { return {
......
...@@ -158,6 +158,12 @@ ...@@ -158,6 +158,12 @@
index:0, index:0,
ci:0, ci:0,
u:{}, u:{},
msg:{
pageIndex:1,
pageSize:15,
StartTime:'',
EndTime:'',
},
} }
}, },
components:{ components:{
...@@ -201,38 +207,62 @@ ...@@ -201,38 +207,62 @@
this.isover = false; this.isover = false;
this.loading2 = true; this.loading2 = true;
let h=this.apiheader() let h=this.apiheader()
this.request( this.msg.StartTime=this.start_time;
{ this.msg.EndTime=this.end_time;
url: "", console.log("this.msg",this.msg)
header:h, this.request2(
data: { {
r: "api/footprint/footprint", url: '/api/AppletUser/GetUserShippingAddressList',
start_time: this.start_time, data: this.msg
end_time: this.end_time, },
page: this.page, res => {
uni.hideNavigationBarLoading();
console.log("res",res);
if(res.resultCode==1){
if(res.data.pageData.length>0){
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.isover = true;
}
}
this.isloading = false;
this.list = res.data.list;
}
}
);
// this.request(
// {
// url: "",
// header:h,
// data: {
// r: "api/footprint/footprint",
// start_time: this.start_time,
// end_time: this.end_time,
// page: this.page,
} // }
}, // },
res => { // res => {
if(res.list.length>0){ // if(res.list.length>0){
this.g = this.g.concat(res.list); // this.g = this.g.concat(res.list);
this.page_count = res.pagination.page_count; // this.page_count = res.pagination.page_count;
if (this.page_count == 1) { // if (this.page_count == 1) {
this.isover = true; // this.isover = true;
} // }
} // }
this.loading = false; // this.loading = false;
this.loading2 = false; // this.loading2 = false;
} // }
); // );
}, },
lower(e) { lower(e) {
if (this.page < this.page_count) { if (this.msg.pageIndex < this.page_count) {
if (!this.loading2) { if (!this.loading2) {
this.page++; this.msg.pageIndex++;
this.init(); this.init();
} }
} else { } else {
......
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