Commit 403d6acc authored by 罗超's avatar 罗超

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

# Conflicts:
#	pages/index/index.vue
parents 144350bf 90e17ba8
......@@ -88,7 +88,6 @@ export default {
this.contentHeight = this.$utils.calcContentHeight(-40) + "px";
this.mainColor = this.$uiConfig.mainColor;
this.u = uni.getStorageSync("mall_UserInfo");
console.log(this.u)
if (!this.u) {
this.u = {
nickName: "未登录",
......@@ -117,7 +116,7 @@ export default {
},
methods: {
change(index) {
console.log(index)
this.current = index;
this.page = 1;
this.g = [];
......@@ -127,30 +126,31 @@ export default {
init() {
this.isover = false;
let h = this.apiheader();
this.request(
{
url: "",
header: h,
data: {
r: "api/card/user-card",
status: this.current+1,
page: this.page,
},
},
(res) => {
this.loading = false;
this.loading = false;
// this.request(
// {
// url: "",
// header: h,
// data: {
// r: "api/card/user-card",
// status: this.current+1,
// page: this.page,
// },
// },
// (res) => {
// this.loading = false;
if(res.data.list.length>0){
this.g = this.g.concat(res.data.list);
// TODO 这里没返一共多少页 注意下
// this.page_count = res.data.pagination.page_count;
// if (this.page_count == 1) {
// this.isover = true;
// }
// if(res.data.list.length>0){
// this.g = this.g.concat(res.data.list);
// // TODO 这里没返一共多少页 注意下
// // this.page_count = res.data.pagination.page_count;
// // if (this.page_count == 1) {
// // this.isover = true;
// // }
}
}
);
// }
// }
// );
},
lower(e) {
if (this.page < this.page_count) {
......
......@@ -2,6 +2,7 @@
<view class="favoriteStyle" :style="{'height':contentHeight}" v-if="!isloading">
<u-tabs :list="list" :is-scroll="false" :current="current" @change="change" :active-color='mainColor'></u-tabs>
<template >
<u-empty v-if="current==0&& goodslist.length==0" text="没有任何收藏商品哦~" mode="favor"></u-empty>
<view v-if="current==0 && goodslist.length>0" style="
height: calc(100vh - 50px);
width: calc(100vw - 20px);
......
......@@ -220,7 +220,7 @@
});
this.msg.StartTime=this.start_time;
this.msg.EndTime=this.end_time;
console.log("this.msg",this.msg)
this.request2(
{
url: '/api/AppletUser/GetUserFootMarkPageList',
......@@ -290,7 +290,7 @@
let end = res.obj.tyear + "-" + res.obj.tmonth + "-" + res.obj.tday +' '+ '23:59:59';
this.start_time= start;
this.end_time=end;
this.page = 1
this.msg.pageIndex = 1
this.g =[]
this.init()
},
......@@ -313,7 +313,7 @@
}else{
that.end_time=time1;
}
this.page = 1
this.msg.pageIndex = 1
this.g =[]
this.init()
......
......@@ -9,7 +9,7 @@
:current="active"
:bar-width="80"
:font-size="32"
:bold="false"
:bold="false"
@change="changeHandler"
></u-tabs>
<template v-for="(item, i) in myPageData.home_pages.navs">
......@@ -59,7 +59,7 @@
:key="di"
></addialog>
<quicknav
v-if="d.id == 'quick-nav' && d.data.navSwitch == 1"
v-if="d.id == 'quick-nav' && d.data.navSwitch == 1"
:navs="d.data"
:key="di"
></quicknav>
......@@ -67,21 +67,15 @@
</view>
</template>
<tabbar></tabbar>
<view
class="tips"
v-if="add_show == 1 && JSON.stringify(setting) != '{}'"
:style="{
'border-radius': setting.add_app_bg_radius + 'rpx',
opacity: setting.add_app_bg_transparency / 100,
}"
>
<u-icon name="cross" color="#fff" @click="close"></u-icon>
<view
style="width: 1px; height: 20px; margin: 0 10px; background: #fff;"
></view>
<Text style="color: #fff;">{{ setting.add_app_text }}</Text>
<view class="triangle-up"></view>
</view>
<view class="tips" v-if="add_show==1&& JSON.stringify(setting) != '{}' " :style="{
'border-radius':setting.add_app_bg_radius+'rpx',
'opacity':setting.add_app_bg_transparency/100
}">
<u-icon name="cross" color="#fff" @click="close"></u-icon>
<view style="width: 1px;height: 20px;margin:0 10px;background: #fff;"></view>
<Text style='color: #fff;'>{{setting.add_app_text}}</Text>
<view class="triangle-up"></view>
</view>
</view>
</template>
......@@ -108,14 +102,14 @@ export default {
data() {
return {
title: "Hello",
myPageData: {},
myPageData:{},
indexPageData: {},
mainColor: "",
active: 0,
contentHeight: 0,
pageId: 0,
setting: {},
add_show: 1,
pageId:0,
setting:{},
add_show:1,
};
},
components: {
......@@ -136,28 +130,24 @@ export default {
mapi,
checkform,
addialog,
quicknav,
quicknav
},
onLoad(options) {
console.log(options, "option");
if (options && options.page_id) {
this.pageId = options.page_id;
}
console.log(options,'option');
if(options&&options.page_id){
this.pageId=options.page_id
}
let c = this.$uiConfig.is_bang ? 78 : 50;
this.contentHeight = this.$utils.calcContentHeight(c);
this.init();
let set = uni.getStorageSync("basedata")
? uni.getStorageSync("basedata").mall.setting
: {};
if (!uni.getStorageSync("add_top_app")) {
uni.setStorageSync("add_top_app", { add_top_app_show: 1 });
}
this.add_show = uni.getStorageSync("add_top_app")
? uni.getStorageSync("add_top_app").add_top_app_show
: 1;
this.setting = set;
console.log(this.setting);
let set = uni.getStorageSync("basedata")? uni.getStorageSync("basedata").mall.setting:{};
if(!uni.getStorageSync("add_top_app")){
uni.setStorageSync("add_top_app", {add_top_app_show:1});
}
this.add_show = uni.getStorageSync("add_top_app")?uni.getStorageSync("add_top_app").add_top_app_show:1;
this.setting =set;
console.log(this.setting)
uni.showNavigationBarLoading();
},
onShow() {
......@@ -168,41 +158,40 @@ export default {
},
methods: {
init() {
this.request2(
{
url: "/api/Mall/GetHome",
data: {
page_id: this.pageId,
this.request2(
{
url: '/api/Mall/GetHome',
data: {
page_id:this.pageId
},
},
},
(res) => {
console.log(res, "resIndex");
this.indexPageData = res.data.home_pages.navs[0].template.data;
this.myPageData = res.data;
uni.showToast({
title: this.mainColor,
duration: 2000,
});
if (res.data.home_pages.title != "") {
uni.setNavigationBarTitle({
title: res.data.home_pages.title,
});
uni.setNavigationBarColor({
//字体颜色
frontColor: res.data.navbar.top_text_color,
//背景颜色
backgroundColor: res.data.navbar.top_background_color,
});
}
this.formatBg();
},
(error) => {}
);
},
close() {
this.add_show = 2;
uni.setStorageSync("add_top_app", { add_top_app_show: 2 });
(res) => {
console.log(res,'resIndex');
this.indexPageData = res.data.home_pages.navs[0].template.data;
this.myPageData=res.data;
// wx.setStorageSync("indexdata", this.myPageData);
if (res.data.home_pages.title != "") {
uni.setNavigationBarTitle({
title: res.data.home_pages.title,
});
uni.setNavigationBarColor({
//字体颜色
frontColor:res.data.navbar.top_text_color,
//背景颜色
backgroundColor:res.data.navbar.top_background_color
});
}
this.formatBg();
},
(error)=>{
}
);
},
close(){
this.add_show =2;
uni.setStorageSync("add_top_app", {add_top_app_show:2});
},
changeHandler(i) {
this.active = i;
},
......@@ -237,29 +226,30 @@ export default {
flex-direction: column;
/* align-items: center;
justify-content: center; */
padding-bottom: 100rpx;
padding-bottom:100rpx;
}
.content .tips {
position: fixed;
top: 8px;
right: 6px;
height: 36px;
background: #000000;
display: flex;
flex-direction: row;
align-items: center;
padding: 0 10px;
font-size: 12px;
.content .tips{
position: fixed;
top:8px;
right: 6px;
height: 36px;
background: #000000;
display: flex;
flex-direction: row;
align-items: center;
padding: 0 10px;
font-size: 12px;
}
.triangle-up {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 10px solid black;
position: fixed;
right: 65px;
top: 0px;
.triangle-up{
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 12px solid black;
position: fixed;
right: 65px;
top:0px
}
/* .logo {
height: 200rpx;
......
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