Commit b5fe7dde authored by zhangjianguo's avatar zhangjianguo

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

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