diff --git a/components/full_screen/full_screen.js b/components/full_screen/full_screen.js
index a38f198..81f7d8f 100644
--- a/components/full_screen/full_screen.js
+++ b/components/full_screen/full_screen.js
@@ -21,28 +21,23 @@ Component({
clearInterval(this.data.full_screen);
},
},
-
- ready: function () {
- var th=this;
- setTimeout(function(){
- th.setData({hidden:1,})
- },2600)
- },
-
+
+ ready: function () {},
properties: {},
methods: {
close_full_screen(){
- this.setData({is_full_screen_show:0,sec_show:0,is_full_screen_men:0});
+ this.setData({is_full_screen_show:0,sec_show:0});
},
//-- 跳转到满屏广告的链接 --
go_full_ad(){
if(!this.data.full_ad) return false;
if(!this.data.full_ad.ad_weapplink) return false;
getApp().goto(this.data.full_ad.ad_weapplink);
- this.setData({is_full_screen_show:0,is_full_screen_men:0});
},
get_the_full_screen(){
- if(this.data.full_ad) return false;
+ if(this.data.full_ad) {
+ return false;
+ }
var th=this;
//获取全屏的广告
getApp().request.promiseGet("/api/weshop/ad/page?pid=1001&store_id=" + o.stoid,{
@@ -53,8 +48,7 @@ Component({
th.setData({
is_full_screen_show:1,
full_ad:res.data.data.pageData[0],
- })
-
+ })
//--定时关闭--
th.data.full_screen=setInterval(function(){
if(!th.data.sec_show) {
@@ -65,16 +59,8 @@ Component({
th.data.sec_show--;
th.setData({sec_show:th.data.sec_show});
},1000)
-
-
- setTimeout(function(){
- th.setData({is_full_screen_men:0});
- },1000)
- }else{
- th.setData({
- is_full_screen_men:0
- })
- }
+
+ }
})
}
},
diff --git a/components/full_screen/full_screen.wxml b/components/full_screen/full_screen.wxml
index 4ba3a6f..ce01065 100644
--- a/components/full_screen/full_screen.wxml
+++ b/components/full_screen/full_screen.wxml
@@ -1,5 +1,4 @@
-
跳过 {{sec_show}}
diff --git a/components/full_screen/full_screen.wxss b/components/full_screen/full_screen.wxss
index f6dde99..f5220b9 100644
--- a/components/full_screen/full_screen.wxss
+++ b/components/full_screen/full_screen.wxss
@@ -8,8 +8,6 @@
background-size: 100% 100%;
background-repeat: no-repeat;
}
-
-
.skip_box{
float: right; margin-top: 10rpx; margin-right: 10rpx;
background-color: gainsboro; width: 120rpx;
diff --git a/components/goods_list/goods_list.js b/components/goods_list/goods_list.js
index 79830f6..6d29215 100644
--- a/components/goods_list/goods_list.js
+++ b/components/goods_list/goods_list.js
@@ -37,7 +37,7 @@ Component({
getApp().request.get("/api/weshop/users/get/" + os.stoid + "/" + getApp().globalData.user_id, {
isShowLoading:false,
success: function (e) {
- if(e.code==0 && e.data && e.data.data){
+ if(e.data.code==0 && e.data && e.data.data){
getApp().globalData.userInfo = e.data.data;
getApp().getConfig2(function (e) {
var swithc_list = e.switch_list;
diff --git a/images/banner.jpg b/images/banner.jpg
deleted file mode 100644
index 10c4120..0000000
--- a/images/banner.jpg
+++ /dev/null
diff --git a/pages/goods/goodsList/goodsList.js b/pages/goods/goodsList/goodsList.js
index 4786d3d..4984781 100644
--- a/pages/goods/goodsList/goodsList.js
+++ b/pages/goods/goodsList/goodsList.js
@@ -66,6 +66,10 @@ Page({
if (0 != t.is_new && t.is_new != undefined) { url += "&is_new=" + t.is_new; }
if (0 != t.is_hot && t.is_hot != undefined) { url += "&is_hot=" + t.is_hot; }
+
+ if(getApp().globalData.userInfo){
+ url += "&user_id=" + getApp().globalData.userInfo.user_id;
+ }
//优惠活动的凑单
if(t.prom_type==3){
diff --git a/pages/goods/goodsList/goodsList.wxml b/pages/goods/goodsList/goodsList.wxml
index 1f086fb..7b04967 100644
--- a/pages/goods/goodsList/goodsList.wxml
+++ b/pages/goods/goodsList/goodsList.wxml
@@ -28,7 +28,7 @@
-
+
价格
diff --git a/pages/goods/search/search.js b/pages/goods/search/search.js
index 12f178a..7e1a067 100644
--- a/pages/goods/search/search.js
+++ b/pages/goods/search/search.js
@@ -107,6 +107,7 @@ Page({
if (0 != t.brand_id && t.brand_id!=undefined){ url += "&brand_id=" + t.brand_id;}
if (0 != t.nation_id && t.nation_id!=undefined) { url += "&nation_id=" + t.nation_id;}
if (0 != t.max_price && t.max_price!=undefined) { url += "&min_pirce=" + t.min_pirce + "&max_price=" + t.max_price;}
+
if (url != this.data.baseUrl) return this.requestSearch(url);
this.openSearchModal();
@@ -132,6 +133,10 @@ Page({
//-----------真的调用地址进行搜索------------
requestSearch: function(t) {
var a = this;
+
+ if(getApp().globalData.userInfo){
+ t += "&user_id=" + getApp().globalData.userInfo.user_id;
+ }
this.data.requestUrl = t,
//t += "&orderField=" + a.data.tabname;
diff --git a/pages/goods/search/search.wxml b/pages/goods/search/search.wxml
index 9841727..8bdaf46 100644
--- a/pages/goods/search/search.wxml
+++ b/pages/goods/search/search.wxml
@@ -13,7 +13,7 @@
- 价格
+ 价格
diff --git a/pages/index/index/index.js b/pages/index/index/index.js
index d21cf3a..4fcd618 100644
--- a/pages/index/index/index.js
+++ b/pages/index/index/index.js
@@ -248,16 +248,33 @@ Page({
var th = this;
- var show=getApp().globalData.isLoad_ad;
- var userInfo=getApp().globalData.userInfo;
+ var show=getApp().globalData.isLoad_ad;
+ setTimeout(function(){
+ //user没有及时更新
+ var userInfo=getApp().globalData.userInfo;
+ if(!userInfo || !userInfo.user_id) userInfo=null;
+ //有加载过一次首页,就显示
+ if(show || userInfo || getApp().globalData.user_id){
+ setTimeout(function(){
+ var full_screen = th.selectComponent("#full_screen"); //组件的id
+ full_screen.get_the_full_screen();
+ },800)
+ //动画效果
+ if(!th.data.f_hidden){
+ wx.showLoading({
+ title:'加载中..'
+ });
+ setTimeout(function(){
+ th.setData({f_hidden:1})
+ wx.hideLoading();
+ },960)
+ }
+ }else{
+ getApp().globalData.isLoad_ad=1;
+ }
+ },500)
+
- //有加载过一次首页,就显示
- if(show || userInfo || getApp().globalData.user_id){
- var full_screen = th.selectComponent("#full_screen"); //组件的id
- full_screen.get_the_full_screen();
- }else{
- getApp().globalData.isLoad_ad=1;
- }
},
//当隐藏的时候就关闭计时器
@@ -371,7 +388,6 @@ Page({
flash_data = e.data.data.pageData;
if (flash_data == null || flash_data.length <= 0) return false;
-
//当前时间戳
var nt = ut.gettimestamp();
@@ -506,17 +522,17 @@ Page({
th.is_new();
}
- setTimeout(function () {
- if (getApp().globalData.user_id) getApp().requestCardNum(th);
- },500)
+ setTimeout(function () {
+ if (getApp().globalData.user_id) getApp().requestCardNum(th);
+ },500)
});
-
- var goods_list = this.selectComponent("#goods_list"); //组件的id
- goods_list.init();
+
setTimeout(function() {
- goods_list.get_list();
- }, 300)
+ var goods_list = th.selectComponent("#goods_list"); //组件的id
+ goods_list.init();
+ goods_list.get_list();
+ }, 2000)
},
//--判断小程序是否过期--
diff --git a/pages/index/index/index.wxml b/pages/index/index/index.wxml
index c88fe7b..fcec284 100644
--- a/pages/index/index/index.wxml
+++ b/pages/index/index/index.wxml
@@ -1,7 +1,8 @@
-
-
+
+
+
@@ -295,6 +296,8 @@
+
+
@@ -390,6 +393,8 @@
+
+
@@ -397,13 +402,12 @@
-
-
+
+
+
-
-
-
+
@@ -418,8 +422,6 @@
-
-
@@ -427,9 +429,6 @@
-
-
-
diff --git a/pages/index/index/index.wxss b/pages/index/index/index.wxss
index 1d5ed89..b28ea57 100644
--- a/pages/index/index/index.wxss
+++ b/pages/index/index/index.wxss
@@ -966,4 +966,14 @@ page {
/* transform: translateY(-50%); */
z-index: 10000;
}
-.dis_top{position: fixed; top: 0; left: 0; width: 100%; z-index: 100000;}
\ No newline at end of file
+.dis_top{position: fixed; top: 0; left: 0; width: 100%; z-index: 100000;}
+.full_screen{
+ position: fixed;left: 0;top: 0;
+ z-index: 1000000000000;
+ background-color: rgba(0,0,0,0.4);
+ width: 100%;
+ height: 100%;
+ background-position: center;
+ background-size: 100% 100%;
+ background-repeat: no-repeat;
+}