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/components/diy_advertising/diy_advertising.wxml b/components/diy_advertising/diy_advertising.wxml
index 9895b34..a8e1a3b 100644
--- a/components/diy_advertising/diy_advertising.wxml
+++ b/components/diy_advertising/diy_advertising.wxml
@@ -401,7 +401,7 @@
- 0){
+ th.data.timer = setInterval(function() {
+ th.countDown2(th);
+ }, 1000);
+ }
+ }
+ },
+
+
ready: function() {
console.log("ready");
var g_id = this.data.object.data;
@@ -55,50 +69,83 @@ Component({
app = getApp(), all_array = [],
index = 0,
goodsidlist="";
+
+ //-- 当是默认的调用的时候 --
+ if(!g_id || g_id.length<=0 ){
+ th.no_gid_set();
+ }else{
+ //--先把商品ID串起来--
+ g_id.forEach(function(val, ind) {
+ var item = {};
+ goodsidlist+=val.goodsid+",";
+ })
+ goodsidlist= goodsidlist.substr(0,goodsidlist.length-1);
- //--先把商品ID串起来--
- g_id.forEach(function(val, ind) {
- var item = {};
- goodsidlist+=val.goodsid+",";
- })
- goodsidlist= goodsidlist.substr(0,goodsidlist.length-1);
-
- //--调用接口,读取拼单--
- app.request.promiseGet("/api/weshop/teamlist/getGoodsList?store_id="
- +os.stoid+"&goodsidlist="+goodsidlist, {}).then(res => {
-
- //如果拼单的数组为空的时候
- var goodslist=res.data.data;
- if(!goodslist || goodslist.length==0) return false;
-
- /*--商品队列按照添加的顺序排列--*/
- g_id.forEach(function(val, ind) {
- goodslist.forEach(function (vy,indy) {
- if(val.goodsid==vy.goods_id){
- all_array.push(vy);
- }
- })
- })
- if(all_array.length==0){
- all_array=goodslist;
- }
-
- var arr = new Array();
- //--三个三个一组---
- for(var i=0;i< all_array.length;i+=3){
- arr.push(all_array.slice(i,i+3));
- }
- /*--熏染到前台--*/
- th.setData({goods_array:arr});
- var newTime = ut.gettimestamp();
- th.setData({ newTime: newTime });
-
- th.data.timer = setInterval(function() {
- th.countDown2(th);
- }, 1000);
- });
+ //--调用接口,读取拼单--
+ app.request.promiseGet("/api/weshop/teamlist/getGoodsList?store_id="
+ +os.stoid+"&goodsidlist="+goodsidlist, {}).then(res => {
+ //如果拼单的数组为空的时候
+ var goodslist=res.data.data;
+ if(goodslist && goodslist.length>0){
+ th.set_goods_list(g_id,goodslist);
+ }
+
+ });
+ }
},
- //---小于10的格式化函数----
+
+ no_gid_set(){
+ var th=this;
+ var url= "/api/weshop/teamlist/pageteam/2?page=1&pageSize=9";
+ getApp().request.promiseGet(url, {
+ data: {
+ store_id: os.stoid,is_end: 0,is_show: 1,
+ }
+ }).then(res => {
+ if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){
+ var goodslist=res.data.data.pageData;
+ th.set_goods_list(null,goodslist);
+ }
+ })
+ },
+
+ //设置商品列表
+ set_goods_list:function(g_id,goodslist){
+ var th=this,all_array=[];
+ if(g_id){
+ /*--商品队列按照添加的顺序排列--*/
+ g_id.forEach(function(val, ind) {
+ goodslist.forEach(function (vy,indy) {
+ if(val.goodsid==vy.goods_id){
+ all_array.push(vy);
+ //th.setData({goods_array:arr});
+ }
+ })
+ })
+ }else{
+ all_array=goodslist;
+ }
+
+ if(all_array.length==0){
+ all_array=goodslist;
+ }
+
+ var arr = new Array();
+ //--三个三个一组---
+ for(var i=0;i< all_array.length;i+=3){
+ arr.push(all_array.slice(i,i+3));
+ }
+ /*--熏染到前台--*/
+ th.setData({goods_array:arr});
+ var newTime = ut.gettimestamp();
+ th.setData({ newTime: newTime });
+
+ th.data.timer = setInterval(function() {
+ th.countDown2(th);
+ }, 1000);
+ },
+
+ //---小于10的格式化函数----
timeFormat: function(param) {
return param < 10 ? '0' + param : param;
},
@@ -108,6 +155,8 @@ Component({
var ee = ob;
// 获取当前时间,同时得到活动结束时间数组
var newTime = ut.gettimestamp();
+ this.setData({newTime:newTime});
+
var List = ee.data.goods_array;
if (List.length == 0) return false;
for (var j = 0; j < List.length; j++) {
diff --git a/components/diy_pingd_buy/diy_pingd_buy.wxml b/components/diy_pingd_buy/diy_pingd_buy.wxml
index 5564c64..fb31a7c 100644
--- a/components/diy_pingd_buy/diy_pingd_buy.wxml
+++ b/components/diy_pingd_buy/diy_pingd_buy.wxml
@@ -1,5 +1,5 @@
-
+
@@ -21,11 +21,10 @@
即将开始
-
-
+
+
火热进行
-
@@ -50,12 +49,17 @@
- {{aitem.ct_num}}人团
-
- 去参团
- 去开团
- 去开团
- 已抢光
+ {{aitem.ct_num}}人团
+
+
+ 已结束
+
+
+ 去参团
+ 去开团
+ 去开团
+ 已抢光
+
@@ -89,16 +93,21 @@
¥{{aitem.price}}
¥{{aitem.market_price}}
-
+
- {{aitem.djs.day}}天{{aitem.djs.hou}}时{{aitem.djs.min}}分{{aitem.djs.sec}}秒
+ {{aitem.djs.day}}天{{aitem.djs.hou}}时{{aitem.djs.min}}分{{aitem.djs.sec}}秒
-
- 去参团
- 去开团
- 去参团
- 已抢光
-
+
+
+
+ 已结束
+
+
+ 去参团
+ 去开团
+ 去参团
+ 已抢光
+
diff --git a/components/diy_pingd_buy/diy_pingd_buy.wxss b/components/diy_pingd_buy/diy_pingd_buy.wxss
index 2ca2b78..14e0da8 100644
--- a/components/diy_pingd_buy/diy_pingd_buy.wxss
+++ b/components/diy_pingd_buy/diy_pingd_buy.wxss
@@ -362,4 +362,5 @@ swiper {
display: flex;
align-items: center;
margin:5rpx 0rpx;
-}
\ No newline at end of file
+}
+.o1_right_p .wo_p.huise{ background-color: #eee;}
\ No newline at end of file
diff --git a/components/diy_seckill/diy_seckill.js b/components/diy_seckill/diy_seckill.js
index 069c855..1cc16a8 100644
--- a/components/diy_seckill/diy_seckill.js
+++ b/components/diy_seckill/diy_seckill.js
@@ -36,6 +36,19 @@ Component({
imghost: os.imghost,
timer: null,
},
+
+ pageLifetimes:{
+ //要处理一下,游客登录后的界面的变化,主要还该是改变会员
+ show: function () {
+ var th=this;
+ if(this.data.goods_array.length>0){
+ th.data.timer = setInterval(function() {
+ th.countDown2(th);
+ }, 1000);
+ }
+ }
+ },
+
ready: function() {
console.log("ready");
var g_id = this.data.object.data;
@@ -50,66 +63,82 @@ Component({
// 这里是一个自定义方法
customMethod: function() {},
init: function(g_id) {
- var th = this, app = getApp(),all_array = [], goodsidlist="";
-
- //--先把商品ID串起来--
- g_id.forEach(function(val, ind) {
- var item = {};
- goodsidlist+=val.goodsid+",";
- })
- goodsidlist=ut.sub_last(goodsidlist);
-
- //--调用接口,读取秒杀--
- app.request.promiseGet("/api/ms/flash_sale/getGoodsList?store_id="
- +os.stoid+"&goodsidlist="+goodsidlist, {}).then(res => {
- //如果秒杀的数组为空的时候
-
- var goodslist=res.data.data;
- if(!goodslist || goodslist.length==0) return false;
-
- // 判断火热,预热
- var newTime = ut.gettimestamp();
- th.setData({newTime:newTime});
- // for(var a=0;a< goodslist.length;a++){
- // var starTime=goodslist[a].start_time;
- // var msStr=[];
- // console.log(2222222222)
- // console.log(starTime+":"+newTime)
- // if (starTime>newTime){
- // msStr.push()
- // //th.setData({msText:'即将开始'});
- // }
- // if (starTime0){
+ //--先把商品ID串起来--
+ g_id.forEach(function(val, ind) {
+ var item = {};
+ goodsidlist+=val.goodsid+",";
+ })
+ goodsidlist=ut.sub_last(goodsidlist);
+
+ //--调用接口,读取秒杀--
+ app.request.promiseGet("/api/ms/flash_sale/getGoodsList?store_id="
+ +os.stoid+"&goodsidlist="+goodsidlist, {}).then(res => {
+ //如果秒杀的数组为空的时候
+ var goodslist=res.data.data;
+ //就算是添加的活动已经过期,就要用最新的进行中活动
+ if(goodslist && goodslist.length>0) {
+ th.set_goods_list(g_id,goodslist);
+ }
+ });
+ }else{
+ th.no_gid_set();
+ }
},
+
+ //当是默认的情况
+ no_gid_set(){
+ getApp().request.promiseGet("/api/ms/flash_sale/spikepage?page=1&pageSize=9",
+ {isShowLoading:1,data:{store_id:os.stoid,is_end:0,is_show:1}}
+ ).then(res=>{
+ if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) {
+ goodsidlist=res.data.data.pageData;
+ th.set_goods_list(null,goodslist);
+ }
+ });
+ },
+
+ //就算是添加的活动已经过期,就要用最新的活动
+ set_goods_list(g_id,goodslist){
+ // 判断火热,预热
+ var newTime = ut.gettimestamp(),all_array = [],th=this;
+ th.setData({newTime:newTime});
+ if(g_id){
+ /*--商品队列按照添加的顺序排列--*/
+ g_id.forEach(function(val, ind) {
+ goodslist.forEach(function (vy,indy) {
+ if(val.goodsid==vy.goods_id){
+ all_array.push(vy);
+ //th.setData({goods_array:arr});
+ }
+ })
+ })
+ }else{
+ all_array=goodslist;
+ }
+
+
+ if(all_array.length==0){
+ all_array=goodslist;
+ }
+
+ var arr = new Array();
+ //--三个三个一组---
+ for(var i=0;i< all_array.length;i+=3){
+ arr.push(all_array.slice(i,i+3));
+ }
+ /*--熏染到前台--*/
+
+ th.setData({goods_array:arr});
+
+ th.data.timer = setInterval(function() {
+ th.countDown2(th);
+ }, 1000);
+ },
+
+
+
//---小于10的格式化函数----
timeFormat: function(param) {
return param < 10 ? '0' + param : param;
@@ -120,6 +149,8 @@ Component({
var ee = ob;
// 获取当前时间,同时得到活动结束时间数组
var newTime = ut.gettimestamp();
+ this.setData({newTime:newTime});
+
var List = ee.data.goods_array;
if (List.length == 0) return false;
for (var j = 0; j < List.length; j++) {
diff --git a/components/diy_seckill/diy_seckill.wxml b/components/diy_seckill/diy_seckill.wxml
index f5cee6e..789e7af 100644
--- a/components/diy_seckill/diy_seckill.wxml
+++ b/components/diy_seckill/diy_seckill.wxml
@@ -1,4 +1,4 @@
-
+
@@ -24,16 +24,26 @@
即将开始
-
-
- 火热进行
-
-
-
-
- 已抢光
-
-
+
+
+
+ 活动已结束
+
+
+
+
+
+ 火热进行
+
+
+
+
+ 已抢光
+
+
+
+
+
@@ -92,17 +102,25 @@
正在预热
-
-
- 我要抢
-
-
-
-
-
- 已抢光
-
-
+
+
+
+ 已结束
+
+
+
+
+
+ 我要抢
+
+
+
+
+
+ 已抢光
+
+
+
diff --git a/components/diy_shopname/diy_shopname.wxml b/components/diy_shopname/diy_shopname.wxml
index 537b0f7..48837a3 100644
--- a/components/diy_shopname/diy_shopname.wxml
+++ b/components/diy_shopname/diy_shopname.wxml
@@ -10,7 +10,7 @@
-
+
diff --git a/components/diy_shopname/diy_shopname.wxss b/components/diy_shopname/diy_shopname.wxss
index dc3f2aa..247be95 100644
--- a/components/diy_shopname/diy_shopname.wxss
+++ b/components/diy_shopname/diy_shopname.wxss
@@ -139,9 +139,9 @@ left:-116rpx;
width: 100%;
height: 260rpx;
position: absolute;
- top: -130rpx;
+ margin-top: -130rpx;
text-align: center;
- margin-top: 50%;
+ top: 50%;
}
/* 小图片2圆边框 */
diff --git a/components/full_screen/filter.wxs b/components/full_screen/filter.wxs
new file mode 100644
index 0000000..68e2458
--- /dev/null
+++ b/components/full_screen/filter.wxs
@@ -0,0 +1,12 @@
+var format = function (text) {
+
+ if (!text) {
+ return
+ }
+ var reg = getRegExp('\\\\n', 'g')
+ return text.replace(reg, '\n')
+}
+
+module.exports = {
+ format: format
+}
diff --git a/components/full_screen/full_screen.js b/components/full_screen/full_screen.js
new file mode 100644
index 0000000..a38f198
--- /dev/null
+++ b/components/full_screen/full_screen.js
@@ -0,0 +1,82 @@
+// components/userqy_pop_up/userqy_pop_up.js
+var o = getApp().globalData.setting
+Component({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ control: 1,
+ is_full_screen_show:0, //全屏显示
+ sec_show:3, //倒计时的秒数
+ full_ad:null, //全屏广告
+ url:o.imghost,
+ full_screen:0,
+ is_full_screen_men:1,
+ hidden:0,
+ },
+
+ pageLifetimes:{
+ hide: function() {
+ // 页面被隐藏
+ clearInterval(this.data.full_screen);
+ },
+ },
+
+ ready: function () {
+ var th=this;
+ setTimeout(function(){
+ th.setData({hidden:1,})
+ },2600)
+ },
+
+ properties: {},
+ methods: {
+ close_full_screen(){
+ this.setData({is_full_screen_show:0,sec_show:0,is_full_screen_men: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;
+ var th=this;
+ //获取全屏的广告
+ getApp().request.promiseGet("/api/weshop/ad/page?pid=1001&store_id=" + o.stoid,{
+ data: { enabled: 1 }
+ }).then(res=>{
+ //判断是不是有全屏广告
+ if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){
+ 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) {
+ clearInterval(th.data.full_screen);
+ th.close_full_screen();
+ return false;
+ }
+ 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
+ })
+ }
+ })
+ }
+ },
+
+})
\ No newline at end of file
diff --git a/components/full_screen/full_screen.json b/components/full_screen/full_screen.json
new file mode 100644
index 0000000..a88fc2f
--- /dev/null
+++ b/components/full_screen/full_screen.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/components/full_screen/full_screen.wxml b/components/full_screen/full_screen.wxml
new file mode 100644
index 0000000..4ba3a6f
--- /dev/null
+++ b/components/full_screen/full_screen.wxml
@@ -0,0 +1,8 @@
+
+
+
+ 跳过 {{sec_show}}
+
+
+
+
diff --git a/components/full_screen/full_screen.wxss b/components/full_screen/full_screen.wxss
new file mode 100644
index 0000000..f6dde99
--- /dev/null
+++ b/components/full_screen/full_screen.wxss
@@ -0,0 +1,18 @@
+.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;
+}
+
+
+.skip_box{
+ float: right; margin-top: 10rpx; margin-right: 10rpx;
+ background-color: gainsboro; width: 120rpx;
+ height: 48rpx; font-size: 28rpx; line-height: 48rpx;
+ text-align: center; border-radius: 20rpx;
+ }
\ No newline at end of file
diff --git a/packageA/pages/activity_share/activity_share.js b/packageA/pages/activity_share/activity_share.js
index 70f5da7..fe8437d 100644
--- a/packageA/pages/activity_share/activity_share.js
+++ b/packageA/pages/activity_share/activity_share.js
@@ -182,9 +182,14 @@ Page({
th.setData({share_hidden:1,share_good:null});
var ind=3;//秒杀活动分享
- if(item.prom_type==6){
- ind=4;
- }
+ if(th.data.currentIndex==0){
+ ind=3;//秒杀活动分享
+ }else if(th.data.currentIndex==1){
+ ind=4;//拼团
+ }else if(th.data.currentIndex==2){
+ ind=5;//促销
+ }
+
//插入活动
if(item.prom_type==3){
var hui_active=this.data.hui_active;
@@ -210,8 +215,12 @@ Page({
title: title,path:url,
};
th.setData({share_hidden:1,share_good:null});
+
+ var ind=0;//促销
+ if(th.data.currentIndex==2){ ind=5;}
+
//插入活动
- th.insert_act_share(title,hui_active.id);
+ th.insert_act_share(title,hui_active.id,ind);
return ob;
}
}
@@ -533,10 +542,15 @@ Page({
scene+="_"+user_id;
}
+ var ind=3;
+ if(that.data.currentIndex==1){
+ ind=4;
+ }
+
if(th.data.share_good.prom_type==3){
- th.insert_act_share(th.data.hui_active.name,th.data.hui_active.id); //插入分享
+ th.insert_act_share(th.data.hui_active.name,th.data.hui_active.id,5); //插入分享
}else{
- th.insert_act_share(th.data.share_good.title,th.data.share_good.id); //插入分享
+ th.insert_act_share(th.data.share_good.title,th.data.share_good.id,ind); //插入分享
}
diff --git a/packageA/pages/checkin/checkin.js b/packageA/pages/checkin/checkin.js
index 10ea4fa..587ac97 100644
--- a/packageA/pages/checkin/checkin.js
+++ b/packageA/pages/checkin/checkin.js
@@ -1,6 +1,6 @@
// packageA//pages/checkin/checkin.js
const app = getApp();
-
+let self;
Page({
/**
@@ -12,6 +12,9 @@ Page({
day: '',
weekArr: ['日', '一', '二', '三', '四', '五', '六'],
dateArr: [],
+ n_dateArr:[], //本月的日期
+ s_dateArr:[], //上月的日期
+
firstDay: '',
lastDay: '',
param: null,
@@ -25,19 +28,27 @@ Page({
checkInNums: 0, //补签次数
isCheckInDay: '',
-
flag: true,
+ isLogin: false,
+
},
loadQd(callback) {
- let self = this;
app.request.get('/api/weshop/qdrecord/getUser/'+ app.globalData.setting.stoid + '/' + app.globalData.user_id, {
success: function (res) {
- if(callback) callback();
- self.setData({
- res: res.data.data
- });
- self.loadCheckedRecord();
+ if(res.data.code==0){
+ if(callback) callback();
+ self.setData({
+ res: res.data.data
+ });
+ self.loadCheckedRecord();
+ }else{
+ wx.showToast({
+ title: "网络繁忙,请重试",
+ icon: 'none',
+ duration: 2000
+ })
+ }
},
});
},
@@ -46,18 +57,60 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
- let self = this;
+ console.log('执行onload');
+ self = this;
this.getDate();
this.setDate();
var res = wx.getSystemInfoSync();
this.setData({
- param: res.windowHeight / 12,
+ param: res.windowHeight / 12,
})
- this.loadQd();
+ // 判断会员是否授权登录,
+ // 没有登录则跳转到登录页,
+ // 已登录则设置已登录状态,请求加载签到数据
+ this.isLogin().then(function() {
+ console.log('loginnnn',app.globalData.userInfo);
+ self.setData({
+ isLogin: true
+ });
+ self.loadQd();
+ });
+
},
-
+
+ onShow() {
+ if(app.globalData.userInfo instanceof Object) {
+ if(this.data.isLogin) {
+ return;
+ } else {
+ this.setData({
+ isLogin: true
+ });
+ this.loadQd();
+ };
+ }
+ },
+
+ onHide() {
+ console.log('执行onHide');
+ },
+
+ // 是否登录
+ isLogin() {
+ return new Promise(function(resolve, reject) {
+ let user_info = getApp().globalData.userInfo;
+ if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
+ wx.navigateTo({
+ url: '/pages/togoin/togoin',
+ })
+ return false;
+ } else {
+ resolve();
+ };
+ });
+ },
// 点击"我的积分"和"去购物"进行跳转
goto(e) {
@@ -65,7 +118,6 @@ Page({
app.goto(url);
},
-
// 点击显示签到规则
showRules() {
if(this.data.isShowRules) {
@@ -82,34 +134,87 @@ Page({
// 加载签到记录
loadCheckedRecord() {
- let newDateArr = this.data.dateArr;
+ let newDateArr=[];
let list;
let bqlist;
- if(this.data.res.qddaylist) {
+ //--判断什么日子是签到的,上个月的--
+ if(this.data.res && this.data.res.qdsdaylist) {
+ list = this.data.res.qdsdaylist.split(',');
+ for(var i in this.data.s_dateArr){
+ var item=this.data.s_dateArr[i];
+ if(this.check_is_qd(item,list)){
+ item.isCheckIn = true;
+ }else{
+ item.isCheckIn = false;
+ }
+ }
+ }
+ newDateArr=newDateArr.concat(this.data.s_dateArr);
+ //--判断什么日子是签到的,这个月的--
+ if(this.data.res && this.data.res.qddaylist) {
list = this.data.res.qddaylist.split(',');
- for(let item of list) {
- newDateArr[item-1].isCheckIn = true;
- };
+ for(var i in this.data.n_dateArr){
+ var item=this.data.n_dateArr[i];
+ if(this.check_is_qd(item,list)){
+ item.isCheckIn = true;
+ }else{
+ item.isCheckIn = false;
+ }
+ }
}
- if(this.data.res.curbqdaynum) {
+ newDateArr=newDateArr.concat(this.data.n_dateArr);
+
+ //--判断什么日子是要补签的--
+ if(this.data.res && this.data.res.curbqdaynum) {
bqlist = this.data.res.curbqdaynum.split(',');
- for(let item of bqlist) {
- var date = new Date(item);
- newDateArr[date.getDate()-1].isBq = true;
- }
+ for(var i in newDateArr){
+ var item=newDateArr[i];
+ if(this.check_is_bq(item,bqlist)){
+ item.isBq = true;
+ }else{
+ item.isBq = false;
+ }
+ }
}
this.setData({
dateArr: newDateArr
});
},
+
+ //判断是不是同一个日期,签到的
+ check_is_qd(item,bqlist){
+ for(var i in bqlist){
+ var c_item=JSON.parse(JSON.stringify(item));
+ if(c_item.num<10) c_item.num="0"+c_item.num;
+ if(c_item.num==bqlist[i]){
+ return true;
+ }
+ }
+ return false;
+ },
+
+ //判断是不是同一个日期,补签到的
+ check_is_bq(item,bqlist){
+ for(var i in bqlist){
+ if(item.date==bqlist[i]){
+ return true;
+ }
+ }
+ return false;
+ },
+
// 点击签到
checkInToday() {
const self = this;
// 获取今天的签到状态
- let isCheckInToday = this.data.dateArr[this.data.day-1].isCheckIn;
+ //let isCheckInToday = this.data.dateArr[this.data.day-1].isCheckIn;
+ var ck=this.data.day;
+ if(parseInt(ck)<10) ck="0"+ck;
+ var isCheckInToday=this.data.res.qddaylist.indexOf(ck);
+
// 如果还没签到, 可以点击签到
- if(!isCheckInToday) {
+ if(isCheckInToday==-1) {
app.request.promisePost('/api/weshop/qdrecord/saveQd', {
data: {
store_id: app.globalData.setting.stoid,
@@ -118,8 +223,16 @@ Page({
}).then(res => {
// 改变签到状态,由false置为true
// let newDateArr = self.data.dateArr;
- // newDateArr[self.data.day-1].isCheckIn = true;
-
+ // newDateArr[self.data.day-1].isCheckIn = true;
+
+ for(var i in self.data.dateArr) {
+ self.data.dateArr[i].isCheckIn=false;
+ self.data.dateArr[i].isBq=false;
+ }
+ self.setData({
+ dateArr: self.data.dateArr
+ });
+
self.loadQd(function() {
wx.showToast({
title: self.data.res.qdintro,
@@ -147,26 +260,29 @@ Page({
data: {
store_id: app.globalData.setting.stoid,
user_id: app.globalData.user_id,
- daynum: self.data.res.getBQIntegral,
+ daynum: self.data.res.getBQIntegral1,
bqnum: self.data.res.getbqnum2,
- bqintegral: self.data.res.getBQIntegral1,
+ bqintegral: self.data.res.getBQIntegral,
}
}).then(res => {
// 改变签到状态,由false置为true
- // let newDateArr = self.data.dateArr;
- // newDateArr[self.data.day-1].isCheckIn = true;
- var bqlist = self.data.res.curbqdaynum.split(',').sort();
- var list = [];
+ // let newDateArr = self.data.dateArr;
+ // newDateArr[self.data.day-1].isCheckIn = true;
+ //var bqlist = self.data.res.curbqdaynum.split(',').sort();
+ //var list = [];
+ /*--
for(let item of bqlist) {
var date = new Date(item);
list.push(date.getDate());
- }
-
- self.data.dateArr[list[0]-1].isBq = false;
+ }--*/
+
+ for(var i in self.data.dateArr) {
+ self.data.dateArr[i].isCheckIn=false;
+ self.data.dateArr[i].isBq=false;
+ }
self.setData({
dateArr: self.data.dateArr
- });
-
+ });
self.loadQd(function() {
self.data.flag = true;
wx.showToast({
@@ -182,10 +298,6 @@ Page({
}
},
-
-
-
-
getDate: function() { //获取当月日期
var mydate = new Date();
var year = mydate.getFullYear();
@@ -195,7 +307,7 @@ Page({
this.data.month = months;
this.data.day = mydate.getDate(); //获取当月日期: 1~31
var fist = new Date(year, month, 1);
- this.data.firstDay = fist.getDay(); //获取当月第一天
+ this.data.firstDay = fist.getDay(); //获取当月第一天
var last = new Date(year, months, 0); //0表示当月最后一天
this.data.lastDay = last.getDate(); //获取当月最后一天
@@ -204,88 +316,43 @@ Page({
month: this.data.month,
day: this.data.day,
firstDay: this.data.firstDay,
- lastDay: this.data.lastDay
+ lastDay: this.data.lastDay,
+ fist:fist
})
console.log("今天:" + this.data.day);
},
setDate: function() {
var day;
- for (var i = 1; i < this.data.lastDay + 1; i++) {
- day = {
- num: i,
- };
- this.data.dateArr.push(day);
+ for(var i=0;i
- 我的积分
规则
+ 我的积分
+
-
-
+
+
+{{res.cday1}}
- {{myUtil.setDate(year, res.sday2, 0)}}日
+ {{res.sday2}}
-
+
+{{res.daynum}}
- {{myUtil.setDate(year, res.sday2, 1)}}日
+ 今日
-
+
+{{res.tdayc1}}
- {{myUtil.setDate(year, res.sday2, 2)}}日
+ 明日
-
+
+{{res.tdayc2}}
- {{myUtil.setDate(year, res.sday2, 3)}}日
+ {{myUtil.setDate(year, res.sday3, 2)}}日
-
+
+{{res.tdayc3}}
- {{myUtil.setDate(year, res.sday2, 4)}}日
+ {{myUtil.setDate(year, res.sday3, 3)}}日
-
+
+{{res.tdayc4}}
- {{myUtil.setDate(year, res.sday2, 5)}}日
+ {{myUtil.setDate(year, res.sday3, 4)}}日
-
+
+{{res.tdayc5}}
- {{myUtil.setDate(year, res.sday2, 6)}}日
+ {{myUtil.setDate(year, res.sday3, 5)}}日
+
-
-
- {{!dateArr[day-1].isCheckIn ? '立即签到':'今日已签到'}}
+
+
+ {{!myUtil.setDate_is_act(year, res.sday3, 0,res.qddaylist) ? '立即签到':'今日已签到'}}
- 补签(-10分)
+
+ 签到请登录
+
+ 补签(-{{res.getBQIntegral}}分)
-
+ -->
{{year}}年{{month}}月
- 补签卡:{{res.getkbqnum}}
+
+ 补签卡:{{res.getkbqnum}}
@@ -73,7 +78,7 @@
-
+
{{item.num}}
@@ -103,7 +108,7 @@
- 地址:{{def_pick_store.fulladdress}}
+ 地址:{{def_pick_store.fulladdress}}
diff --git a/pages/goods/goodsInfo/buy_integral_normal.wxml b/pages/goods/goodsInfo/buy_integral_normal.wxml
index 8bb1445..e14a36f 100644
--- a/pages/goods/goodsInfo/buy_integral_normal.wxml
+++ b/pages/goods/goodsInfo/buy_integral_normal.wxml
@@ -28,7 +28,7 @@
-
+
{{def_pick_store.pickup_name}}
距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}
@@ -54,7 +54,7 @@
(库存不足)
- 地址:{{def_pick_store.fulladdress}}
+ 地址:{{def_pick_store.fulladdress}}
diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js
index bf7e9c2..6642457 100644
--- a/pages/goods/goodsInfo/goodsInfo.js
+++ b/pages/goods/goodsInfo/goodsInfo.js
@@ -492,9 +492,8 @@ Page({
})
}
}
-
}, 500)
- },1500)
+ },700)
});
@@ -2075,8 +2074,9 @@ Page({
var timer_get = setInterval(function() {
if (th.data.is_get_local_ok == 0) return false;
- var dd = null,
- i = getApp().request;
+ var dd = null,i = getApp().request;
+ if (!th.data.sele_g) return false;
+
var g_distr_type = th.data.sele_g.distr_type;
if (g_distr_type != 0) {
dd = {
@@ -2160,9 +2160,12 @@ Page({
},
+
//------------处理门店---------------
deal_pickup(e){
var th=this;
+ if(!th.data.sele_g) return false
+
var g_distr_type=th.data.sele_g.distr_type;
wx.hideLoading();
@@ -2323,6 +2326,8 @@ Page({
//------------处理线下门店库存--------
deal_pickup_dline(e){
var pkno=[],th=this;
+ if(!th.data.sele_g) return false;
+
if(this.data.def_pick_store){
pkno.push(this.data.def_pick_store.pickup_no);
}
@@ -2698,6 +2703,7 @@ Page({
}else{
ee.setData({prom_type: 0, isshow: 1,});
ee.get_sku(os.stoid, ee.data.data.sku, gid);
+ ee.get_sto();
return false;
}
})
@@ -4596,8 +4602,8 @@ Page({
getApp().request.put('/api/weshop/users/update', {
data: {
- user_id,
- def_pickup_id
+ user_id:user_id,
+ def_pickup_id:def_pickup_id
},
success: function(res) {
if (res.data.code == 0) {
diff --git a/pages/goods/goodsInfo/goodsInfo.wxml b/pages/goods/goodsInfo/goodsInfo.wxml
index 78bb381..d56de6c 100644
--- a/pages/goods/goodsInfo/goodsInfo.wxml
+++ b/pages/goods/goodsInfo/goodsInfo.wxml
@@ -433,7 +433,7 @@
-
+
{{def_pick_store.pickup_name}}
@@ -1031,7 +1031,7 @@
-
+
{{def_pick_store.pickup_name}}
距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}
@@ -1058,7 +1058,7 @@
- 地址:{{def_pick_store.fulladdress}}
+ 地址:{{def_pick_store.fulladdress}}
diff --git a/pages/index/index/index.js b/pages/index/index/index.js
index bc6f8b6..a84dd8e 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,27 @@ 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) {
+
+ th.setData({
+ showHongbao: true,
+ });
+ } else if(code == -1) {
+ th.setData({
+ showHongbao: false,
+ });
+ };
+ });
+
+
+ // console.log(9090909);
//看一下商家是否开通了权益
@@ -184,8 +206,7 @@ Page({
}
})
-
-
+
},
//关闭新用户领取广告
close_disgraceful: function() {
@@ -205,7 +226,18 @@ Page({
getApp().requestCardNum(this);
}
- var th = this
+ var th = this
+ var show=getApp().globalData.isLoad_ad;
+ var userInfo=getApp().globalData.userInfo;
+ //有加载过一次首页,就显示.或者有会员就显示
+ 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;
+ }
+
+
},
//当隐藏的时候就关闭计时器
onHide: function() {
@@ -251,6 +283,7 @@ Page({
}
})
+
//--首页的问题--
if (getApp().globalData.config && getApp().globalData.config.store_name != undefined && getApp().globalData.config.store_name != null) {
@@ -261,7 +294,10 @@ Page({
wx.setNavigationBarTitle({
title: getApp().globalData.setting.appName,
});
- }
+ };
+
+
+
},
//---读取数据内容---
async init_fir() {
@@ -273,21 +309,24 @@ Page({
enabled: 1
}
}).then(res => {
- var a = res.data.data.pageData;
- var arr = new Array();
- for (var i = 0; i < a.length; i++) {
- var tt = {
- 'ad_code': o.imghost + a[i].ad_code,
- 'media_link': '',
- 'ad_weapplink':a[i].ad_weapplink
- };
- arr.push(tt);
- }
- if (arr.length > 0) e.setData({
- banner: arr,
- });
+
+ if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){
+ var a = res.data.data.pageData;
+ var arr = new Array();
+ for (var i = 0; i < a.length; i++) {
+ var tt = {
+ 'ad_code': o.imghost + a[i].ad_code,
+ 'media_link': '',
+ 'ad_weapplink':a[i].ad_weapplink
+ };
+ arr.push(tt);
+ }
+ if (arr.length > 0) e.setData({
+ banner: arr,
+ });
- wx.stopPullDownRefresh();
+ wx.stopPullDownRefresh();
+ }
})
//-----秒杀-----
@@ -875,10 +914,16 @@ Page({
//导航跳转
nav_goto:function(e){
- var url=e.currentTarget.dataset.url;
- if(!url || url=='') return;
- if(url[0]!='/') url='/'+url;
- getApp().goto(url);
+ var url=e.currentTarget.dataset.url;
+ if(!url || url=='') return;
+ if(url[0]!='/') url='/'+url;
+ getApp().goto(url);
+ if(this.data.showHongbao) {
+ this.setData({
+ showHongbao: false,
+ showHongbaoSmall: true, //显示抢红包小图标
+ });
+ }
},
//----跳转到搭配购买----
@@ -898,6 +943,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.json b/pages/index/index/index.json
index 63d46fb..878ab3a 100644
--- a/pages/index/index/index.json
+++ b/pages/index/index/index.json
@@ -17,7 +17,8 @@
"picMax": "/components/diy_picMax/diy_picMax",
"mvideo": "/components/diy_video/diy_video",
"service": "/components/diy_service/diy_service",
- "scan": "/components/diy_scan/diy_scan"
+ "scan": "/components/diy_scan/diy_scan",
+ "full_screen": "/components/full_screen/full_screen"
},
"enablePullDownRefresh": false
}
\ No newline at end of file
diff --git a/pages/index/index/index.wxml b/pages/index/index/index.wxml
index 66f3926..6d5db66 100644
--- a/pages/index/index/index.wxml
+++ b/pages/index/index/index.wxml
@@ -287,8 +287,11 @@
+
+
+
@@ -377,6 +380,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/index/index/index.wxss b/pages/index/index/index.wxss
index 82585c7..3a0bfc4 100644
--- a/pages/index/index/index.wxss
+++ b/pages/index/index/index.wxss
@@ -925,4 +925,43 @@ 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%;
+ top: 0;
+ left: 0;
+ background-color: rgba(0,0,0,.5);
+ z-index: 999;
+}
+
+.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
diff --git a/pages/user/coupons/coupons.wxml b/pages/user/coupons/coupons.wxml
index 9d3cbd9..b061963 100644
--- a/pages/user/coupons/coupons.wxml
+++ b/pages/user/coupons/coupons.wxml
@@ -63,7 +63,7 @@
有效期:不限
- {{detail.Remark}}
+ {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}};{{detail.Remark1}}
使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}}
diff --git a/pages/user/coupons/query/index.wxml b/pages/user/coupons/query/index.wxml
index 9aa7de2..77a1742 100644
--- a/pages/user/coupons/query/index.wxml
+++ b/pages/user/coupons/query/index.wxml
@@ -102,7 +102,8 @@
有效期: 不限
- 使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{detail.UseObjectID==null || detail.UseObjectID==''?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用{{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}}
+ {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}};{{detail.Remark}}
+ 使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}}
diff --git a/pages/user/coupons/query/index.wxss b/pages/user/coupons/query/index.wxss
index 90f9443..e0f335c 100644
--- a/pages/user/coupons/query/index.wxss
+++ b/pages/user/coupons/query/index.wxss
@@ -350,7 +350,8 @@ color:#999999;
font-size: 25rpx;
text-align: center;
- height: 47rpx;
+ min-height: 47rpx;
+ height:auto;
color: #999999;
}
diff --git a/utils/auth.js b/utils/auth.js
index b35e58b..5956baa 100644
--- a/utils/auth.js
+++ b/utils/auth.js
@@ -48,6 +48,7 @@ module.exports = {
console.log("thirdLogin");
console.log(e);
a.request.get("/api/weshop/users/openidandkey", {
+ isShowLoading:0,
data: {
js_code: e,
store_id: a.globalData.setting.stoid,
@@ -174,6 +175,7 @@ module.exports = {
if (app_d.user_id != "" && app_d.user_id != null) {
var ab = this.app().request;
ab.get("/api/weshop/users/get/" + oo.stoid + "/" + app_d.user_id, {
+ isShowLoading:0,
success: function (e) {
app_d.userInfo = e.data.data;
"function" == typeof t && t(e.data.data);
diff --git a/utils/filter.wxs b/utils/filter.wxs
index 93eddaf..7bb6dce 100644
--- a/utils/filter.wxs
+++ b/utils/filter.wxs
@@ -29,7 +29,7 @@ var filters = {
var fm = [d.getFullYear(), d.getMonth() + 1, d.getDate()].join('-');
var md = (d.getMonth() + 1) + '月' + d.getDate() + '日';
if (isFull == 1)
- fm = fm + ' ' + [d.getHours(), d.getMinutes(), d.getSeconds()].join(':');
+ fm = fm + ' ' + [appendZero(d.getHours()), appendZero(d.getMinutes()), appendZero(d.getSeconds())].join(':');
if (isFull == 2) {
fm = md + ' ' + [appendZero(d.getHours()), appendZero(d.getMinutes())].join(':');
}
@@ -55,7 +55,30 @@ var filters = {
return spec + "/" + color;
}
}
- }
+ },
+
+
+ show_default: function (value, placeholder, multiple) {
+ if(typeof value === 'number') {
+ if(isNaN(value) || value === 0) {
+ return placeholder || '0';
+ } else {
+ if(multiple) {
+ return value / multiple;
+ } else {
+ return value;
+ }
+ };
+ } else if(value === '' || value === undefined || value === null) {
+ return placeholder || '-';
+ } else {
+ return value;
+ }
+ },
+
+
+
+
};
module.exports = {
@@ -65,4 +88,5 @@ module.exports = {
format_time: filters.format_time,
pInt: filters.pInt,
show_gui_ge: filters.show_gui_ge,
+ show_default: filters.show_default,
}
\ No newline at end of file