Commit ece7d293e6123842ae12a006f85de75e217cd388
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
9 changed files
with
133 additions
and
4 deletions
components/diy_shopname/diy_shopname.wxml
| ... | ... | @@ -10,7 +10,7 @@ |
| 10 | 10 | <view style="position: relative; height: 150rpx;"> |
| 11 | 11 | <view class="big_border" > |
| 12 | 12 | <view class="circle"> |
| 13 | - <view class="border"> | |
| 13 | + <view class="border" style="width: 100%; height: 100%;"> | |
| 14 | 14 | <image class="wxd_ww" src='{{sto}}' bindtap="go_user"></image> |
| 15 | 15 | </view> |
| 16 | 16 | </view> | ... | ... |
components/diy_shopname/diy_shopname.wxss
components/full_screen/filter.wxs
0 → 100644
components/full_screen/full_screen.js
0 → 100644
| 1 | +// components/userqy_pop_up/userqy_pop_up.js | |
| 2 | +var o = getApp().globalData.setting | |
| 3 | +Component({ | |
| 4 | + /** | |
| 5 | + * 页面的初始数据 | |
| 6 | + */ | |
| 7 | + data: { | |
| 8 | + control: 1, | |
| 9 | + is_full_screen_show:0, //全屏显示 | |
| 10 | + sec_show:3, //倒计时的秒数 | |
| 11 | + full_ad:null, //全屏广告 | |
| 12 | + url:o.imghost, | |
| 13 | + full_screen:0, | |
| 14 | + }, | |
| 15 | + | |
| 16 | + pageLifetimes:{ | |
| 17 | + //要处理一下,游客登录后的界面的变化,主要还该是改变会员 | |
| 18 | + show: function () { | |
| 19 | + var th=this; | |
| 20 | + th.setData({sec_show:3}); | |
| 21 | + //--如果有全屏广告的时候-- | |
| 22 | + if(this.data.is_full_screen_show){ | |
| 23 | + //--定时关闭-- | |
| 24 | + th.data.full_screen=setInterval(function(){ | |
| 25 | + if(!th.data.sec_show) { | |
| 26 | + clearInterval(th.data.full_screen); | |
| 27 | + th.close_full_screen(); | |
| 28 | + return false; | |
| 29 | + } | |
| 30 | + th.data.sec_show--; | |
| 31 | + th.setData({sec_show:th.data.sec_show}); | |
| 32 | + },1000) | |
| 33 | + } | |
| 34 | + }, | |
| 35 | + hide: function() { | |
| 36 | + // 页面被隐藏 | |
| 37 | + clearInterval(this.data.full_screen); | |
| 38 | + }, | |
| 39 | + }, | |
| 40 | + | |
| 41 | + properties: { | |
| 42 | + | |
| 43 | + }, | |
| 44 | + ready: function () { | |
| 45 | + this.get_the_full_screen(); | |
| 46 | + }, | |
| 47 | + methods: { | |
| 48 | + close_full_screen(){ | |
| 49 | + this.setData({is_full_screen_show:0,sec_show:0}); | |
| 50 | + }, | |
| 51 | + //-- 跳转到满屏广告的链接 -- | |
| 52 | + go_full_ad(){ | |
| 53 | + if(!this.data.full_ad) return false; | |
| 54 | + if(!this.data.full_ad.ad_weapplink) return false; | |
| 55 | + getApp().goto(this.data.full_ad.ad_weapplink); | |
| 56 | + this.setData({is_full_screen_show:0}); | |
| 57 | + }, | |
| 58 | + get_the_full_screen(){ | |
| 59 | + var th=this; | |
| 60 | + //获取全屏的广告 | |
| 61 | + getApp().request.promiseGet("/api/weshop/ad/page?pid=1001&store_id=" + o.stoid,{ | |
| 62 | + data: { enabled: 1 } | |
| 63 | + }).then(res=>{ | |
| 64 | + //判断是不是有全屏广告 | |
| 65 | + if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){ | |
| 66 | + th.setData({ | |
| 67 | + is_full_screen_show:1, | |
| 68 | + full_ad:res.data.data.pageData[0] | |
| 69 | + }) | |
| 70 | + | |
| 71 | + //--定时关闭-- | |
| 72 | + th.data.full_screen=setInterval(function(){ | |
| 73 | + if(!th.data.sec_show) { | |
| 74 | + clearInterval(th.data.full_screen); | |
| 75 | + th.close_full_screen(); | |
| 76 | + return false; | |
| 77 | + } | |
| 78 | + th.data.sec_show--; | |
| 79 | + th.setData({sec_show:th.data.sec_show}); | |
| 80 | + },1000) | |
| 81 | + } | |
| 82 | + }) | |
| 83 | + } | |
| 84 | + }, | |
| 85 | + | |
| 86 | +}) | |
| 0 | 87 | \ No newline at end of file | ... | ... |
components/full_screen/full_screen.json
0 → 100644
components/full_screen/full_screen.wxml
0 → 100644
components/full_screen/full_screen.wxss
0 → 100644
| 1 | +.full_screen{ | |
| 2 | + position: fixed;left: 0;top: 0; | |
| 3 | + z-index: 1000000000000; | |
| 4 | + background-color: rgba(0,0,0,0.4); | |
| 5 | + width: 100%; | |
| 6 | + height: 100%; | |
| 7 | + background-position: center; | |
| 8 | + background-size: cover; | |
| 9 | + background-repeat: no-repeat; | |
| 10 | +} | |
| 11 | + | |
| 12 | + | |
| 13 | +.skip_box{ | |
| 14 | + float: right; margin-top: 10rpx; margin-right: 10rpx; | |
| 15 | + background-color: gainsboro; width: 120rpx; | |
| 16 | + height: 48rpx; font-size: 28rpx; line-height: 48rpx; | |
| 17 | + text-align: center; border-radius: 20rpx; | |
| 18 | + } | |
| 0 | 19 | \ No newline at end of file | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
pages/index/index/index.json
| ... | ... | @@ -17,7 +17,8 @@ |
| 17 | 17 | "picMax": "/components/diy_picMax/diy_picMax", |
| 18 | 18 | "mvideo": "/components/diy_video/diy_video", |
| 19 | 19 | "service": "/components/diy_service/diy_service", |
| 20 | - "scan": "/components/diy_scan/diy_scan" | |
| 20 | + "scan": "/components/diy_scan/diy_scan", | |
| 21 | + "full_screen": "/components/full_screen/full_screen" | |
| 21 | 22 | }, |
| 22 | 23 | "enablePullDownRefresh": false |
| 23 | 24 | } |
| 24 | 25 | \ No newline at end of file | ... | ... |