diff --git a/app.wxss b/app.wxss index 5abb5bb..2b39a1b 100644 --- a/app.wxss +++ b/app.wxss @@ -446,12 +446,12 @@ background: #ffe3e2; /* 图标字体(ty) */ @font-face { font-family: 'iconfont'; /* project id 2054717 */ - src: url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.eot'); - src: url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.eot?#iefix') format('embedded-opentype'), - url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.woff2') format('woff2'), - url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.woff') format('woff'), - url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.ttf') format('truetype'), - url('//at.alicdn.com/t/font_2054717_ntayyd8f2u.svg#iconfont') format('svg'); + src: url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.eot'); + src: url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.eot?#iefix') format('embedded-opentype'), + url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.woff2') format('woff2'), + url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.woff') format('woff'), + url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.ttf') format('truetype'), + url('//at.alicdn.com/t/font_2054717_qfl8swm1iw.svg#iconfont') format('svg'); } .iconfont { @@ -462,6 +462,10 @@ background: #ffe3e2; -moz-osx-font-smoothing: grayscale; } +.icon-riqi:before { + content: "\e64c"; +} + .icon-shanchu:before { content: "\e61b"; } diff --git a/pages/index/index/index.js b/pages/index/index/index.js index bc6f8b6..57302ae 100644 --- a/pages/index/index/index.js +++ b/pages/index/index/index.js @@ -75,6 +75,8 @@ Page({ new_nav: "", //新人页面跳转地址 w_holiday_pop:0, + showHongbao: true, + showHongbaoSmall: false, }, onLoad: async function(tt) { @@ -94,7 +96,26 @@ Page({ } }) } - + + // 判断是否有红包活动 + getApp().request.promiseGet('/api/weshop/redmoney/redConfig/get/'+getApp().globalData.setting.stoid, { + data: {} + }).then(function(data) { + // console.log('909090909090----->', data.data.code); + let code = data.data.code; + if(code == 0) { + showHongbao: true, + th.setData({ + }); + } else if(code == -1) { + th.setData({ + showHongbao: false, + }); + }; + }); + + + // console.log(9090909); //看一下商家是否开通了权益 @@ -185,7 +206,9 @@ Page({ }) - + + + }, //关闭新用户领取广告 close_disgraceful: function() { @@ -251,6 +274,7 @@ Page({ } }) + //--首页的问题-- if (getApp().globalData.config && getApp().globalData.config.store_name != undefined && getApp().globalData.config.store_name != null) { @@ -261,7 +285,10 @@ Page({ wx.setNavigationBarTitle({ title: getApp().globalData.setting.appName, }); - } + }; + + + }, //---读取数据内容--- async init_fir() { @@ -898,6 +925,14 @@ Page({ title: '首页-' + getApp().globalData.config.store_name, } }, - + + + // 关闭首页抢红包主弹窗,显示侧边栏抢红包小图标 + closeHongbao() { + this.setData({ + showHongbao: false, //关闭抢红包主弹窗 + showHongbaoSmall: true, //显示抢红包小图标 + }); + }, }); \ No newline at end of file diff --git a/pages/index/index/index.wxml b/pages/index/index/index.wxml index 66f3926..089dbc1 100644 --- a/pages/index/index/index.wxml +++ b/pages/index/index/index.wxml @@ -287,8 +287,23 @@ + + + + + + + + + + + + + + + @@ -381,3 +396,5 @@ + + diff --git a/pages/index/index/index.wxss b/pages/index/index/index.wxss index 82585c7..85f4c60 100644 --- a/pages/index/index/index.wxss +++ b/pages/index/index/index.wxss @@ -925,4 +925,41 @@ page { overflow-x: hidden; padding-bottom: 120rpx; } -.container{ overflow: hidden;} \ No newline at end of file +.container{ overflow: hidden;} + + +.hongbao-container { + position: fixed; + width: 100%; + height: 100%; + background-color: rgba(0,0,0,.5); + z-index: 10001; +} + +.hongbao { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +.hongbao-img { + width: 440rpx; + height: 640rpx; +} + +.close { + position: absolute; + top: 0; + right: 0; +} + +.hongbao_sm-img { + width: 124rpx; + height: 170rpx; + position: fixed; + top: 50%; + right: 0; + /* transform: translateY(-50%); */ + z-index: 10000; +} \ No newline at end of file