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