@@ -6,27 +6,14 @@ App({ | |||||
newArr:[],//存放分享二维进入消息信息 | newArr:[],//存放分享二维进入消息信息 | ||||
}, | }, | ||||
onLaunch: function(options) { | onLaunch: function(options) { | ||||
wx.hideTabBar({ | |||||
fail: function () { | |||||
setTimeout(function () { // 做了个延时重试一次,作为保底。 | |||||
wx.hideTabBar() | |||||
}, 500) | |||||
} | |||||
}); | |||||
}, | |||||
onShow:function(options){ | |||||
var that = this; | var that = this; | ||||
if (that.globalData.previewFlag){//解决微信图片预览重复进入app.js onshow | |||||
if (that.globalData.previewFlag) {//解决微信图片预览重复进入app.js onshow | |||||
that.globalData.previewFlag = false | that.globalData.previewFlag = false | ||||
return | return | ||||
} | } | ||||
if (options.query.scene) { | if (options.query.scene) { | ||||
that.globalData.newArr = decodeURIComponent(options.query.scene).split(":"); | that.globalData.newArr = decodeURIComponent(options.query.scene).split(":"); | ||||
} | } | ||||
console.log(that.globalData.newArr, "我是app.js") | |||||
that.globalData.sceneAddress = options.scene; | that.globalData.sceneAddress = options.scene; | ||||
/** | /** | ||||
* 小程序版本更新 | * 小程序版本更新 | ||||
@@ -42,6 +29,11 @@ App({ | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
onShow:function(options){ | |||||
console.log("onshow被调用了!") | |||||
}, | |||||
statusBarHeight: 0, | statusBarHeight: 0, | ||||
/** | /** | ||||
* 用户登录 | * 用户登录 | ||||
@@ -173,7 +165,7 @@ App({ | |||||
}, | }, | ||||
globalData: { | globalData: { | ||||
previewFlag:false,//解决图片预览调用noshow | previewFlag:false,//解决图片预览调用noshow | ||||
activityId:'',//活动id方便授权数据回传 | |||||
typeLsit: [],//初始哈样式 | typeLsit: [],//初始哈样式 | ||||
scene: "", | scene: "", | ||||
// token | // token | ||||
@@ -26,7 +26,9 @@ Component({ | |||||
xiala: imgurl.concealBnt.url, | xiala: imgurl.concealBnt.url, | ||||
xiangshang: imgurl.xiangshang.url, | xiangshang: imgurl.xiangshang.url, | ||||
switchFlag: true, | switchFlag: true, | ||||
activityDateList: [] | |||||
activityDateList: [], | |||||
activiyFalg:"", | |||||
context: -1 ,//-1表示取一周下标 1表示取一个月的下标 | |||||
}, | }, | ||||
/** | /** | ||||
@@ -54,7 +56,9 @@ Component({ | |||||
dateLsit: tempDateLsit, | dateLsit: tempDateLsit, | ||||
thendata: tempThenData | thendata: tempThenData | ||||
}) | }) | ||||
this.setThenDye(0) | |||||
}, | }, | ||||
getDey() { //查询当月标记日期 | getDey() { //查询当月标记日期 | ||||
let tempMonth = this.data.month | let tempMonth = this.data.month | ||||
let tempDey = this.getDays(this.data.year, this.data.month) //获取每月有多少天 | let tempDey = this.getDays(this.data.year, this.data.month) //获取每月有多少天 | ||||
@@ -86,6 +90,18 @@ Component({ | |||||
this.setData({ | this.setData({ | ||||
switchFlag: !temp | switchFlag: !temp | ||||
}) | }) | ||||
if(this.data.switchFlag){ | |||||
this.setData({ | |||||
context:-1 | |||||
}) | |||||
this.setThenDye() | |||||
}else{ | |||||
this.setData({ | |||||
context: 1 | |||||
}) | |||||
this.setThenDye() | |||||
} | |||||
// console.log(this.data.switchFlag) | |||||
}, | }, | ||||
showDate(year, month) { //刷新日历 | showDate(year, month) { //刷新日历 | ||||
let thenDey = this.getThenWeek(year, month) //每个月第一天星期几 | let thenDey = this.getThenWeek(year, month) //每个月第一天星期几 | ||||
@@ -110,7 +126,7 @@ Component({ | |||||
style: "1", | style: "1", | ||||
value: lastMonth - (thenDey - 1), | value: lastMonth - (thenDey - 1), | ||||
y: year, | y: year, | ||||
m: month - 1 | |||||
m: month==1?12:month-1 | |||||
}) | }) | ||||
lastMonth++ | lastMonth++ | ||||
} | } | ||||
@@ -119,17 +135,59 @@ Component({ | |||||
style: "2", | style: "2", | ||||
value: i + 1, | value: i + 1, | ||||
y: year, | y: year, | ||||
m: month + 1 | |||||
m: month == 12 ? 1 : month + 1 | |||||
}) | }) | ||||
} | } | ||||
this.setData({ | this.setData({ | ||||
dateLsit: tempDey | dateLsit: tempDey | ||||
}) | }) | ||||
this.itiActivityLst() | this.itiActivityLst() | ||||
this.setThenDye() | |||||
}, | }, | ||||
setThenDye(){//设置当天index | |||||
if (this.data.context==-1){//-1表示一周 | |||||
console.log(this.data.thendata,this.data.dey,this.data.monthFlgh,this.data.yearFlgh,"this.data.thendata") | |||||
let index_ = "" | |||||
this.data.thendata.map((item,index)=>{ | |||||
if(item.value == this.data.dey && this.data.monthFlgh == item.m && item.y == this.data.yearFlgh){ | |||||
index_ = index | |||||
this.setData({ | |||||
activiyFalg: index_ | |||||
}) | |||||
return | |||||
} | |||||
}) | |||||
}else{ | |||||
let index_ = "" | |||||
if(this.data.year==this.data.yearFlgh&&this.data.month==this.data.monthFlgh){ | |||||
this.data.dateLsit.map((item, index) => { | |||||
if (item.value == this.data.dey && this.data.monthFlgh == item.m && item.y == this.data.yearFlgh) { | |||||
console.log(index, "index") | |||||
index_ = index | |||||
this.setData({ | |||||
activiyFalg: index_ | |||||
}) | |||||
return | |||||
} | |||||
}) | |||||
}else{ | |||||
this.setData({ | |||||
activiyFalg: -1 | |||||
}) | |||||
} | |||||
} | |||||
}, | |||||
handle(e) { //点击号数 | handle(e) { //点击号数 | ||||
let item = e.currentTarget.dataset.item | let item = e.currentTarget.dataset.item | ||||
let index = e.currentTarget.dataset.index | |||||
if (this.data.allFlag){ | |||||
this.setData({ | |||||
activiyFalg:index | |||||
}) | |||||
} | |||||
if (item.style==0){ | if (item.style==0){ | ||||
this.triggerEvent("setDate", { | this.triggerEvent("setDate", { | ||||
y: this.data.year, | y: this.data.year, | ||||
@@ -195,6 +253,9 @@ Component({ | |||||
}) | }) | ||||
}, | }, | ||||
front() { //前面 | front() { //前面 | ||||
this.setData({ | |||||
context:1 | |||||
}) | |||||
if (this.data.month == 1) { | if (this.data.month == 1) { | ||||
let temp = this.data.switchFlag | let temp = this.data.switchFlag | ||||
this.setData({ | this.setData({ | ||||
@@ -214,9 +275,14 @@ Component({ | |||||
m: this.data.month | m: this.data.month | ||||
}) //第一个是自定义事件名,第二个是要传递的值(可以为空) | }) //第一个是自定义事件名,第二个是要传递的值(可以为空) | ||||
this.getDey() | this.getDey() | ||||
}, | }, | ||||
behind() { //后面 | behind() { //后面 | ||||
this.setData({ | |||||
context: 1 | |||||
}) | |||||
let temp = this.data.switchFlag | let temp = this.data.switchFlag | ||||
this.setData({ | this.setData({ | ||||
switchFlag: false | switchFlag: false | ||||
@@ -237,7 +303,8 @@ Component({ | |||||
this.triggerEvent("setDate", { | this.triggerEvent("setDate", { | ||||
y: this.data.year, | y: this.data.year, | ||||
m: this.data.month | m: this.data.month | ||||
}) //第一个是自定义事件名,第二个是要传递的值(可以为空) | |||||
}) | |||||
}, | }, | ||||
}, | }, | ||||
@@ -282,8 +349,10 @@ Component({ | |||||
} | } | ||||
} | } | ||||
this.setData({ | this.setData({ | ||||
thendata: tempArr | |||||
thendata: tempArr, | |||||
context:this.data.allFlag ? -1 : 1 | |||||
}) | }) | ||||
// 设置单周数组 | // 设置单周数组 | ||||
// setTimeout(() => { | // setTimeout(() => { | ||||
// this.showDate(this.data.year, this.data.month) | // this.showDate(this.data.year, this.data.month) | ||||
@@ -1,12 +1,13 @@ | |||||
<view class="Box"> | <view class="Box"> | ||||
<view class="dateText_box"> | <view class="dateText_box"> | ||||
<view class="dateMinus" bindtap="front">{{'<'}}</view> | |||||
<!-- <view class="dateMinus" bindtap="front">{{'<'}}</view> --> | |||||
<image src="https://formall.oss-accelerate.aliyuncs.com/cimg/xiangzuo.png" class="dateMinus" bindtap="front"></image> | |||||
<view class="dateText">{{year+'年 '+month+'月 '}}</view> | <view class="dateText">{{year+'年 '+month+'月 '}}</view> | ||||
<view class="dateAdd" bindtap="behind">{{'>'}}</view> | |||||
<image src="https://formall.oss-accelerate.aliyuncs.com/cimg/xiangyou.png" class="dateAdd" bindtap="behind"></image> | |||||
</view> | </view> | ||||
<view class="weekBox"> | <view class="weekBox"> | ||||
<view class="weekItme" wx:for="{{week}}" wx:key="index">{{item}}</view> | <view class="weekItme" wx:for="{{week}}" wx:key="index">{{item}}</view> | ||||
<view class="{{(item.value==dey&&monthFlgh==item.m&&item.y==yearFlgh)?'today':(item.style == '0'?'weekItme':'noThen')}}" wx:for="{{allFlag?(switchFlag? thendata:dateLsit):dateLsit}}" wx:key="index" bindtap="handle" data-item="{{item}}" style="{{item.act==1?activityStyle:''}}">{{ (item.value==dey&&monthFlgh==item.m&&item.y==yearFlgh)?'':item.value }}</view> | |||||
<view class="{{((item.value==dey&&monthFlgh==item.m&&item.y==yearFlgh)&&activiyFalg==index)?'today_a':((item.value==dey&&monthFlgh==item.m&&item.y==yearFlgh)&&activiyFalg!=index)?'today':((item.style == '0'&&activiyFalg==index)?'weekItme_a':(item.style=='0'&&activiyFalg!=index)?'weekItme':activiyFalg==index?'noThen_a':'noThen')}}" wx:for="{{allFlag?(switchFlag? thendata:dateLsit):dateLsit}}" wx:key="index" bindtap="handle" data-item="{{item}}" data-index="{{index}}" style="{{item.act==1?activityStyle:''}}">{{ (item.value==dey&&monthFlgh==item.m&&item.y==yearFlgh)?'':item.value }}</view> | |||||
</view> | </view> | ||||
<view class="concealBnt" bindtap="switchs" wx:if="{{allFlag&&yearFlgh==year&&month==monthFlgh}}"> | <view class="concealBnt" bindtap="switchs" wx:if="{{allFlag&&yearFlgh==year&&month==monthFlgh}}"> | ||||
<image class="concealBnt" src="{{ switchFlag?xiala:xiangshang}}"></image> | <image class="concealBnt" src="{{ switchFlag?xiala:xiangshang}}"></image> | ||||
@@ -1,37 +1,51 @@ | |||||
.dateText_box{ | |||||
.dateText_box { | |||||
width: 60%; | width: 60%; | ||||
margin: 0 auto; | margin: 0 auto; | ||||
overflow: hidden; | overflow: hidden; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
.dateMinus{ | |||||
font-size: 36rpx; | |||||
.Box { | |||||
width: 94%; | |||||
margin: 30rpx auto; | |||||
border-radius: 16rpx; | |||||
background-color: #fff; | |||||
} | |||||
.dateMinus { | |||||
float: left; | float: left; | ||||
line-height: 60rpx; | line-height: 60rpx; | ||||
padding: 10rpx; | padding: 10rpx; | ||||
height: 60rpx; | |||||
margin-left: 100rpx; | |||||
height: 50rpx; | |||||
margin-left: 40rpx; | |||||
width: 50rpx; | |||||
margin-top: 6rpx; | |||||
} | } | ||||
.dateText{ | |||||
.dateText { | |||||
float: left; | float: left; | ||||
padding: 10rpx; | |||||
padding: 10rpx 20rpx; | |||||
line-height: 60rpx; | line-height: 60rpx; | ||||
height: 60rpx; | height: 60rpx; | ||||
} | } | ||||
.dateAdd{ | |||||
.dateAdd { | |||||
padding: 10rpx; | padding: 10rpx; | ||||
line-height: 60rpx; | line-height: 60rpx; | ||||
height: 60rpx; | |||||
height: 50rpx; | |||||
float: left; | float: left; | ||||
font-size: 36rpx; | |||||
/* font-size: 36rpx; | |||||
*/ | |||||
margin-top: 6rpx; | |||||
width: 50rpx; | |||||
} | } | ||||
.weekBox{ | |||||
width: 96%; | |||||
margin: 0 auto; | |||||
overflow: hidden | |||||
.weekBox { | |||||
overflow: hidden; | |||||
font-family: SimHei; | |||||
} | } | ||||
.weekItme{ | |||||
.weekItme { | |||||
height: 80rpx; | height: 80rpx; | ||||
line-height: 80rpx; | line-height: 80rpx; | ||||
width: 80rpx; | width: 80rpx; | ||||
@@ -41,16 +55,50 @@ | |||||
/* background-color: red; | /* background-color: red; | ||||
border-radius: 50%; */ | border-radius: 50%; */ | ||||
} | } | ||||
.noThen{ | |||||
.weekItme_a { | |||||
height: 80rpx; | |||||
line-height: 80rpx; | |||||
width: 80rpx; | |||||
margin: 0 10rpx; | |||||
text-align: center; | |||||
float: left; | |||||
/* background-color: red;*/ | |||||
border-radius: 50%; | |||||
background-color: #ff990050; | |||||
} | |||||
.deyBox { | |||||
height: 80rpx; | |||||
line-height: 80rpx; | |||||
width: 80rpx; | |||||
margin: 0 10rpx; | |||||
text-align: center; | |||||
} | |||||
.noThen { | |||||
height: 80rpx; | height: 80rpx; | ||||
line-height: 80rpx; | line-height: 80rpx; | ||||
width: 80rpx; | width: 80rpx; | ||||
margin: 0 10rpx; | margin: 0 10rpx; | ||||
text-align: center; | text-align: center; | ||||
float: left; | float: left; | ||||
color: rgba(0, 0, 0, 0.1) | |||||
color: rgba(0, 0, 0, 0.1); | |||||
} | } | ||||
.today{ | |||||
.noThen_a { | |||||
height: 80rpx; | |||||
line-height: 80rpx; | |||||
width: 80rpx; | |||||
margin: 0 10rpx; | |||||
text-align: center; | |||||
float: left; | |||||
color: rgba(0, 0, 0, 0.1); | |||||
border-radius: 50%; | |||||
background-color: #f90; | |||||
} | |||||
.today_a { | |||||
height: 80rpx; | height: 80rpx; | ||||
line-height: 80rpx; | line-height: 80rpx; | ||||
width: 80rpx; | width: 80rpx; | ||||
@@ -64,7 +112,23 @@ | |||||
background-repeat: no-repeat; | background-repeat: no-repeat; | ||||
background-position: 50% 50%; | background-position: 50% 50%; | ||||
} | } | ||||
.concealBnt{ | |||||
.today { | |||||
height: 80rpx; | |||||
line-height: 80rpx; | |||||
width: 80rpx; | |||||
margin: 0 10rpx; | |||||
text-align: center; | |||||
float: left; | |||||
color: #fff; | |||||
/* background-color: rgba(50,177,252,1); */ | |||||
background-image: url('https://formall.oss-accelerate.aliyuncs.com/cimg/jintian_huise.png'); | |||||
background-size: 50rpx 50rpx; | |||||
background-repeat: no-repeat; | |||||
background-position: 50% 50%; | |||||
} | |||||
.concealBnt { | |||||
width: 60rpx; | width: 60rpx; | ||||
height: 60rpx; | height: 60rpx; | ||||
/* background-color: rebeccapurple; */ | /* background-color: rebeccapurple; */ | ||||
@@ -2,33 +2,43 @@ | |||||
"ext": { | "ext": { | ||||
"attr": { | "attr": { | ||||
"car": { | "car": { | ||||
"tjd": { | |||||
"payPath": "", | |||||
"tjdAppId": "wx6945d1bda68d7993" | |||||
}, | |||||
"etcp": { | "etcp": { | ||||
"etcpAppId": "wx192b7d2e8dcbefd0", | |||||
"etcpVersion": "release", | |||||
"etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback" | |||||
} | |||||
"payPath": "pages/pay/order-pay-open/main", | |||||
"etcpAppId": "wxc07f9d67923d676d", | |||||
"etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback" | |||||
}, | |||||
"bolink": { | |||||
"payPath": "pages/park/park", | |||||
"bolinkAppId": "wxbd08b4baa10fcc1d" | |||||
}, | |||||
"version": "release" | |||||
}, | }, | ||||
"imgProxy": [ | "imgProxy": [ | ||||
{ | { | ||||
"newUrl": "https://ctest.malls.iformall.com/img", | |||||
"newUrl": "https://c.malls.iformall.com/img", | |||||
"orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com" | "orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com" | ||||
}, | }, | ||||
{ | { | ||||
"newUrl": "https://ctest.malls.iformall.com/img1", | |||||
"newUrl": "https://c.malls.iformall.com/img1", | |||||
"orgUrl": "https://formall.oss-accelerate.aliyuncs.com" | "orgUrl": "https://formall.oss-accelerate.aliyuncs.com" | ||||
}, | }, | ||||
{ | { | ||||
"newUrl": "https://ctest.malls.iformall.com/img2", | |||||
"newUrl": "https://c.malls.iformall.com/img2", | |||||
"orgUrl": "https://wx.qlogo.cn" | "orgUrl": "https://wx.qlogo.cn" | ||||
} | } | ||||
], | ], | ||||
"configUrl": "https://ctest.malls.iformall.com/C/api", | |||||
"configUrl": "https://c.malls.iformall.com/C/api", | |||||
"ifStoreApp": "0", | |||||
"ifHaveWebSocket": "0", | "ifHaveWebSocket": "0", | ||||
"ifHaveCarModular": "1" | |||||
"ifHaveCarModular": "0" | |||||
}, | }, | ||||
"name": "金泸商务", | |||||
"weappId": "wx649b3be73c1afe47", | |||||
"appVersion": "C.test.5.2.0" | |||||
"name": "富茂链客生产版", | |||||
"weappId": "wx6a2524a8286d687f", | |||||
"appVersion": "C.5.1.1" | |||||
}, | }, | ||||
"debug": false, | "debug": false, | ||||
"tabBar": { | "tabBar": { | ||||
@@ -58,8 +68,7 @@ | |||||
"selectedIconPath": "assets/images/user-a.png" | "selectedIconPath": "assets/images/user-a.png" | ||||
} | } | ||||
], | ], | ||||
"color": "#abb1be", | |||||
"selectedColor": "#b2743d" | |||||
"custom": true | |||||
}, | }, | ||||
"window": { | "window": { | ||||
"backgroundTextStyle": "dark", | "backgroundTextStyle": "dark", | ||||
@@ -73,7 +82,7 @@ | |||||
"provider": "wx2b03c6e691cd7370" | "provider": "wx2b03c6e691cd7370" | ||||
} | } | ||||
}, | }, | ||||
"extAppid": "wx649b3be73c1afe47", | |||||
"extAppid": "wx6a2524a8286d687f", | |||||
"extEnable": true, | "extEnable": true, | ||||
"permission": { | "permission": { | ||||
"scope.userLocation": { | "scope.userLocation": { | ||||
@@ -867,6 +867,7 @@ Page({ | |||||
}, | }, | ||||
// 用户点击右上角分享 | // 用户点击右上角分享 | ||||
onShareAppMessage: function() { | onShareAppMessage: function() { | ||||
app.globalData.previewFlag = true | |||||
return { | return { | ||||
title: this.data.weappShareTitle, | title: this.data.weappShareTitle, | ||||
imageUrl: this.data.weappShareCoverImg, | imageUrl: this.data.weappShareCoverImg, | ||||
@@ -318,7 +318,7 @@ Page({ | |||||
if(res.code==200){ | if(res.code==200){ | ||||
this.setData({ | this.setData({ | ||||
memberName:res.data.name, | memberName:res.data.name, | ||||
memberLogo:res.data.imgUrl | |||||
memberLogo:res.data.imgUrlH | |||||
}) | }) | ||||
} | } | ||||
if (res.data.businessHours !== '[]') { | if (res.data.businessHours !== '[]') { | ||||
@@ -36,20 +36,25 @@ | |||||
<view class="marketTitleBox"> | <view class="marketTitleBox"> | ||||
<view class="marketName">{{memberName}}</view> | <view class="marketName">{{memberName}}</view> | ||||
<view class="levelName">{{levelName}}</view> | <view class="levelName">{{levelName}}</view> | ||||
<navigator url="/pages/shareFriend/shareFriend" open-type="navigate"> | |||||
<view class="share">分享好友</view> | |||||
</navigator> | |||||
</view> | </view> | ||||
<view class="user_growth_box"> | <view class="user_growth_box"> | ||||
<image src="{{rqCode}}" class="RQcode"></image> | |||||
<navigator url="/pages/specialcourtesy/specialcourtesy"> | |||||
<image src="{{rqCode}}" class="RQcode"></image> | |||||
</navigator> | |||||
<view class="memberBox"> | <view class="memberBox"> | ||||
<view class="memberCode">会员码:{{userId}}</view> | <view class="memberCode">会员码:{{userId}}</view> | ||||
<view class="user-phone" bindtap='gotograde'> | <view class="user-phone" bindtap='gotograde'> | ||||
<text class="my">我的</text> | |||||
<text class="chengzhang_h">成长值{{score}}</text> | |||||
<text class="my">我的成长值:{{score}}</text> | |||||
<!-- <text class="chengzhang_h"></text> --> | |||||
<text class="my my_line">|</text> | <text class="my my_line">|</text> | ||||
<!-- <text class="my">更多成长值</text> --> | <!-- <text class="my">更多成长值</text> --> | ||||
<text class="view" style='color:{{view}}'>更多成长值</text> | <text class="view" style='color:{{view}}'>更多成长值</text> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<image src="{{memberLogo}}" class="memberLogo"></image> | |||||
<!-- <image src="{{memberLogo}}" class="memberLogo"></image> --> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="user-btns"> | <view class="user-btns"> | ||||
@@ -66,7 +71,7 @@ | |||||
<view> | <view> | ||||
<image class='icons' src="{{quansUrl}}" mode='widthFix'></image>我的券包</view> | <image class='icons' src="{{quansUrl}}" mode='widthFix'></image>我的券包</view> | ||||
<view> | <view> | ||||
<text class="couponnum" wx:if="{{couponNum=='couponNum'}}"></text> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</navigator> | </navigator> | ||||
@@ -75,7 +80,6 @@ | |||||
<view> | <view> | ||||
<image class='icons' src="{{cardiconUrl}}" mode='widthFix'></image>我的卡包</view> | <image class='icons' src="{{cardiconUrl}}" mode='widthFix'></image>我的卡包</view> | ||||
<view> | <view> | ||||
<text class="couponnum" wx:if="{{couponNum2=='couponNum2'}}"></text> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</navigator> | </navigator> | ||||
@@ -11,12 +11,12 @@ page{ | |||||
} | } | ||||
.particulars_list{ | .particulars_list{ | ||||
overflow: hidden; | overflow: hidden; | ||||
border-bottom: 1rpx #ccc solid; | |||||
border-bottom: 1rpx #f6f6f6 solid; | |||||
width: 90%; | width: 90%; | ||||
margin: auto; | margin: auto; | ||||
height: 80rpx; | height: 80rpx; | ||||
line-height: 80rpx; | line-height: 80rpx; | ||||
color: #666666; | |||||
color: #888; | |||||
font-family: PingFangSC-Regular; | font-family: PingFangSC-Regular; | ||||
} | } | ||||
.particulars_name{ | .particulars_name{ | ||||
@@ -91,13 +91,13 @@ page{ | |||||
.RQcode{ | .RQcode{ | ||||
width: 80rpx; | width: 80rpx; | ||||
height: 80rpx; | height: 80rpx; | ||||
margin: 10rpx 10rpx 0 40rpx; | |||||
margin: 20rpx 10rpx 0 40rpx; | |||||
float: left; | float: left; | ||||
} | } | ||||
.memberLogo{ | .memberLogo{ | ||||
width: 80rpx; | |||||
max-width: 150rpx; | |||||
height: 80rpx; | height: 80rpx; | ||||
margin: 10rpx 10rpx 0 60rpx; | |||||
margin: 20rpx 10rpx 0 30rpx; | |||||
float: left; | float: left; | ||||
} | } | ||||
.memberBox{ | .memberBox{ | ||||
@@ -107,9 +107,9 @@ page{ | |||||
font-size: 24rpx; | font-size: 24rpx; | ||||
font-family: PingFangSC-Regular; | font-family: PingFangSC-Regular; | ||||
font-weight: 400; | font-weight: 400; | ||||
color: rgba(166,166,166,1); | |||||
color: #888; | |||||
line-height: 34rpx; | line-height: 34rpx; | ||||
margin: 10rpx 0 0 20rpx; | |||||
margin: 20rpx 0 0 20rpx; | |||||
} | } | ||||
.user-phone { | .user-phone { | ||||
font-family: PingFangSC-Regular; | font-family: PingFangSC-Regular; | ||||
@@ -137,6 +137,18 @@ page{ | |||||
border-radius: 16rpx 16rpx 0 0; | border-radius: 16rpx 16rpx 0 0; | ||||
background-color: #ff9933; | background-color: #ff9933; | ||||
overflow: hidden; | overflow: hidden; | ||||
height: 172rpx; | |||||
position: relative ; | |||||
} | |||||
.share{ | |||||
position: absolute; | |||||
bottom: 20rpx; | |||||
right: 0; | |||||
font-size: 26rpx; | |||||
border-radius:10rpx 0 0 10rpx; | |||||
background-color: #f6f6f6; | |||||
color:#993300; | |||||
padding: 5rpx 10rpx; | |||||
} | } | ||||
.marketName{ | .marketName{ | ||||
margin: 30rpx 40rpx; | margin: 30rpx 40rpx; | ||||
@@ -192,7 +204,7 @@ page{ | |||||
background: #fff; | background: #fff; | ||||
border-radius: 16rpx; | border-radius: 16rpx; | ||||
margin: 30rpx auto ; | margin: 30rpx auto ; | ||||
box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.10); | |||||
/* box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.10); */ | |||||
} | } | ||||
.user-btns navigator{ | .user-btns navigator{ | ||||
width: 25%; | width: 25%; | ||||
@@ -216,7 +228,7 @@ page{ | |||||
background: #fff; | background: #fff; | ||||
border-radius: 16rpx; | border-radius: 16rpx; | ||||
margin: -100rpx auto 0; | margin: -100rpx auto 0; | ||||
box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.10); | |||||
/* box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.10); */ | |||||
} | } | ||||
.btns_bg{ | .btns_bg{ | ||||
width: 94%; | width: 94%; | ||||
@@ -224,10 +236,10 @@ page{ | |||||
border-radius: 16rpx; | border-radius: 16rpx; | ||||
margin: 30rpx auto; | margin: 30rpx auto; | ||||
padding: 20rpx 0; | padding: 20rpx 0; | ||||
box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.10); | |||||
/* box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.10); */ | |||||
} | } | ||||
.user-btns .user-btn > view { | .user-btns .user-btn > view { | ||||
padding: 20rpx 10px ; | |||||
padding: 30rpx 10px ; | |||||
font-size: 28rpx; | font-size: 28rpx; | ||||
color: #888; | color: #888; | ||||
letter-spacing: 1.16rpx; | letter-spacing: 1.16rpx; | ||||
@@ -427,6 +439,7 @@ page{ | |||||
.mybtn { | .mybtn { | ||||
width: 686rpx; | width: 686rpx; | ||||
margin: 60rpx auto; | margin: 60rpx auto; | ||||
color: #888; | |||||
} | } | ||||
.mask { | .mask { | ||||
@@ -89,6 +89,7 @@ Page({ | |||||
// }) | // }) | ||||
}, | }, | ||||
onShareAppMessage: function (res) { | onShareAppMessage: function (res) { | ||||
app.globalData.previewFlag = true | |||||
if (res.from === 'button') { | if (res.from === 'button') { | ||||
console.log(this.data.cardDetail) | console.log(this.data.cardDetail) | ||||
console.log(111) | console.log(111) | ||||
@@ -9,80 +9,134 @@ Page({ | |||||
*/ | */ | ||||
data: { | data: { | ||||
navigationBarHeight, | navigationBarHeight, | ||||
activityStyle: '',//选中当前日历样式 | |||||
hideFlag:false,//遮罩成 | |||||
activityStyle: '', //选中当前日历样式 | |||||
hideFlag: false, //遮罩成 | |||||
childUrl: config.api.signDey, | childUrl: config.api.signDey, | ||||
continueSign:'',//连续签到天数 | |||||
signInDay:'',//0能签到 1是不能签到 | |||||
rules:[],//积分规则 | |||||
rewardPoints:"",//记录签到后的奖励积分 | |||||
continueSign: '', //连续签到天数 | |||||
signInDay: '', //0能签到 1是不能签到 | |||||
rules: [], //积分规则 | |||||
rewardPoints: "", //记录签到后的奖励积分 | |||||
}, | }, | ||||
getSignRule(){//查询签到规则 | |||||
getSignRule() { //查询签到规则 | |||||
Http.get({ | Http.get({ | ||||
url: config.api.signRule | url: config.api.signRule | ||||
}).then(res=>{ | |||||
let {code ,data}=res | |||||
if(code==200){ | |||||
}).then(res => { | |||||
let { | |||||
code, | |||||
data | |||||
} = res | |||||
if (code == 200) { | |||||
let tempArr = [] | let tempArr = [] | ||||
JSON.parse(data.rules).map(item=>{ | |||||
if (item.id == 17 || item.id == 18 || item.id == 19 || item.id == 20){ | |||||
JSON.parse(data.rules).map(item => { | |||||
if (item.id == 17 || item.id == 18 || item.id == 19 || item.id == 20) { | |||||
tempArr.push(item) | tempArr.push(item) | ||||
} | } | ||||
}) | }) | ||||
if (this.data.continueSign>=7){ | |||||
tempArr[1].activity=1 | |||||
if (this.data.continueSign >= 14){ | |||||
tempArr[2].activity = 1 | |||||
if (tempArr[1].activity >= 28){ | |||||
tempArr[3].activity = 1 | |||||
} | |||||
if (tempArr[0].score == 0 && tempArr[1].score == 0 && tempArr[2].score == 0 && tempArr[3].score == 0) { | |||||
this.setData({ | |||||
signInDay: 1 | |||||
}) | |||||
} | |||||
if (this.data.continueSign >= 7) { | |||||
tempArr[1].activity = 1 | |||||
if (this.data.continueSign >= 14) { | |||||
tempArr[2].activity = 1 | |||||
if (this.data.continueSign >= 28) { | |||||
tempArr[3].activity = 1 | |||||
} | } | ||||
} | } | ||||
} | |||||
console.log(tempArr, "tempArr") | |||||
this.setData({ | this.setData({ | ||||
rules: tempArr | rules: tempArr | ||||
}) | }) | ||||
} | } | ||||
}) | |||||
}).catch(err => { | |||||
wx.showToast({ | |||||
title: err.errMsg, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
}, | }, | ||||
setContinuousDye(){//获取连续签到天数 | |||||
setContinuousDye() { //获取连续签到天数 | |||||
Http.get({ | Http.get({ | ||||
url: config.api.continuousDye | url: config.api.continuousDye | ||||
}).then(res=>{ | |||||
let{code ,data}=res | |||||
if(code==200){ | |||||
}).then(res => { | |||||
let { | |||||
code, | |||||
data | |||||
} = res | |||||
if (code == 200) { | |||||
this.setData({ | this.setData({ | ||||
continueSign: data.continueSign, | continueSign: data.continueSign, | ||||
signInDay: data.signInDay | signInDay: data.signInDay | ||||
}) | }) | ||||
} | } | ||||
}).catch(err => { | |||||
if (err.code == 1989) { | |||||
app.globalData.type = "qd" | |||||
wx.navigateTo({ | |||||
url: '/pages/getuserinfo/index', | |||||
}) | |||||
}else{ | |||||
wx.showToast({ | |||||
title: err.errMsg, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
} | |||||
}) | }) | ||||
// .catch(err => { | |||||
// wx.showToast({ | |||||
// title: err.errMsg, | |||||
// icon: 'none', | |||||
// duration: 2000, | |||||
// mask: false | |||||
// }); | |||||
// }) | |||||
}, | }, | ||||
setHide(){//设置遮罩成 | |||||
this.setData({ | |||||
hideFlag:!this.data.hideFlag | |||||
}) | |||||
setHide() { //设置遮罩成 | |||||
this.setData({ | |||||
hideFlag: !this.data.hideFlag | |||||
}) | |||||
}, | }, | ||||
setSign(){//点击签到 | |||||
setSign() { //点击签到 | |||||
Http.post({ | Http.post({ | ||||
url: config.api.userSign, | url: config.api.userSign, | ||||
data:{type:"1"} | |||||
}).then(res=>{ | |||||
let{code}=res | |||||
if(code==200){ | |||||
data: { | |||||
type: "1" | |||||
} | |||||
}).then(res => { | |||||
let { | |||||
code | |||||
} = res | |||||
if (code == 200) { | |||||
this.setData({ | this.setData({ | ||||
rewardPoints: res.data.credit | rewardPoints: res.data.credit | ||||
}) | }) | ||||
this.setContinuousDye() | this.setContinuousDye() | ||||
this.getSignRule() | |||||
this.setHide() | this.setHide() | ||||
} | } | ||||
}) | |||||
}).catch(err => { | |||||
wx.showToast({ | |||||
title: err.errMsg, | |||||
icon: 'none', | |||||
duration: 2000, | |||||
mask: false | |||||
}); | |||||
}) | |||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面加载 | * 生命周期函数--监听页面加载 | ||||
*/ | */ | ||||
onLoad: function (options) { | |||||
onLoad: function(options) { | |||||
this.setContinuousDye() | this.setContinuousDye() | ||||
this.getSignRule() | this.getSignRule() | ||||
}, | }, | ||||
@@ -90,49 +144,49 @@ Page({ | |||||
/** | /** | ||||
* 生命周期函数--监听页面初次渲染完成 | * 生命周期函数--监听页面初次渲染完成 | ||||
*/ | */ | ||||
onReady: function () { | |||||
onReady: function() { | |||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面显示 | * 生命周期函数--监听页面显示 | ||||
*/ | */ | ||||
onShow: function () { | |||||
onShow: function() { | |||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面隐藏 | * 生命周期函数--监听页面隐藏 | ||||
*/ | */ | ||||
onHide: function () { | |||||
onHide: function() { | |||||
}, | }, | ||||
/** | /** | ||||
* 生命周期函数--监听页面卸载 | * 生命周期函数--监听页面卸载 | ||||
*/ | */ | ||||
onUnload: function () { | |||||
onUnload: function() { | |||||
}, | }, | ||||
/** | /** | ||||
* 页面相关事件处理函数--监听用户下拉动作 | * 页面相关事件处理函数--监听用户下拉动作 | ||||
*/ | */ | ||||
onPullDownRefresh: function () { | |||||
onPullDownRefresh: function() { | |||||
}, | }, | ||||
/** | /** | ||||
* 页面上拉触底事件的处理函数 | * 页面上拉触底事件的处理函数 | ||||
*/ | */ | ||||
onReachBottom: function () { | |||||
onReachBottom: function() { | |||||
}, | }, | ||||
/** | /** | ||||
* 用户点击右上角分享 | * 用户点击右上角分享 | ||||
*/ | */ | ||||
onShareAppMessage: function () { | |||||
// onShareAppMessage: function() { | |||||
} | |||||
// } | |||||
}) | }) |
@@ -10,7 +10,7 @@ | |||||
<view class="singvLsit"> | <view class="singvLsit"> | ||||
<view class="singvLsit_item_l"> {{item.desc}}</view> | <view class="singvLsit_item_l"> {{item.desc}}</view> | ||||
<view class="singvLsit_item_r"> {{item.score+''}} 积分</view> | <view class="singvLsit_item_r"> {{item.score+''}} 积分</view> | ||||
<view class="getBtn" wx:if="{{(index==0&&signInDay==1) || item.activity==1&&index!=0}}">已领取</view> | |||||
<view class="getBtn" wx:if="{{(index==0&&signInDay==1) || item.activity==1}}">已领取</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="shadeBox" catchtouchmove="true" wx:if="{{hideFlag}}"> | <view class="shadeBox" catchtouchmove="true" wx:if="{{hideFlag}}"> | ||||
@@ -36,11 +36,12 @@ | |||||
text-align: center; | text-align: center; | ||||
} | } | ||||
.singvLsit{ | .singvLsit{ | ||||
width: 80%; | |||||
width: 94%; | |||||
overflow: hidden; | overflow: hidden; | ||||
margin: 20rpx auto; | margin: 20rpx auto; | ||||
background-color: #fff; | background-color: #fff; | ||||
border-radius: 12rpx; | border-radius: 12rpx; | ||||
color: #888; | |||||
} | } | ||||
.singvLsit_item_l{ | .singvLsit_item_l{ | ||||
width: 40%; | width: 40%; | ||||
@@ -776,6 +776,7 @@ Page({ | |||||
} | } | ||||
}, | }, | ||||
onShareAppMessage: function(options) { | onShareAppMessage: function(options) { | ||||
app.globalData.previewFlag = true | |||||
var that = this; | var that = this; | ||||
var shareObj = { | var shareObj = { | ||||
title: that.data.nickName + '邀请您帮砍' + that.data.data.title, | title: that.data.nickName + '邀请您帮砍' + that.data.data.title, | ||||
@@ -531,6 +531,7 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
onShareAppMessage: function (options) { | onShareAppMessage: function (options) { | ||||
app.globalData.previewFlag = true | |||||
var that = this; | var that = this; | ||||
var shareObj = { | var shareObj = { | ||||
title: that.data.data.title, | title: that.data.data.title, | ||||
@@ -62,6 +62,7 @@ Page({ | |||||
}, | }, | ||||
// 扫一扫去支付 | // 扫一扫去支付 | ||||
gotoPay: function(e) { | gotoPay: function(e) { | ||||
app.globalData.previewFlag = true | |||||
/* wx.navigateTo({ | /* wx.navigateTo({ | ||||
url: `/pages/scanPay/scanPay`, | url: `/pages/scanPay/scanPay`, | ||||
}) | }) | ||||
@@ -298,6 +298,7 @@ Page({ | |||||
}, 500) | }, 500) | ||||
}, | }, | ||||
gotopay: function(e) { | gotopay: function(e) { | ||||
app.globalData.previewFlag = true | |||||
/* 判断是否授权*/ | /* 判断是否授权*/ | ||||
Http.get({ | Http.get({ | ||||
url: config.api.checkUserStatus, | url: config.api.checkUserStatus, | ||||
@@ -645,6 +646,7 @@ Page({ | |||||
* 支付订单更新 | * 支付订单更新 | ||||
*/ | */ | ||||
payOrderUpdate: (orderId, payOrderId, status, reason, type, _this) => { | payOrderUpdate: (orderId, payOrderId, status, reason, type, _this) => { | ||||
console.log("*-----------------") | |||||
let that = this; | let that = this; | ||||
// 支付成功 | // 支付成功 | ||||
Http.post({ | Http.post({ | ||||
@@ -1043,6 +1045,7 @@ Page({ | |||||
clearInterval(that.data.setInterval) | clearInterval(that.data.setInterval) | ||||
}, | }, | ||||
onShareAppMessage: function(options) { | onShareAppMessage: function(options) { | ||||
app.globalData.previewFlag = true | |||||
var that = this; | var that = this; | ||||
console.log(options) | console.log(options) | ||||
var shareObj = { | var shareObj = { | ||||
@@ -81,10 +81,10 @@ Page({ | |||||
let tempArr = this.data.list | let tempArr = this.data.list | ||||
tempArr.push(...res.data.list) | tempArr.push(...res.data.list) | ||||
tempArr.map(item => { | tempArr.map(item => { | ||||
item.activityEndTime = util.formatTime(item.activityEndTime, "yyyy-MM-dd") | |||||
item.activityStartTime = util.formatTime(item.activityStartTime, "yyyy-MM-dd") | |||||
item.startTime = util.formatTime(item.startTime, "yyyy-MM-dd") | |||||
item.endTime = util.formatTime(item.endTime, "yyyy-MM-dd") | |||||
item.activityEndTime = util.formatTime(item.activityEndTime, "yyyy-MM-dd hh:mm") | |||||
item.activityStartTime = util.formatTime(item.activityStartTime, "yyyy-MM-dd hh:mm") | |||||
item.startTime = util.formatTime(item.startTime, "yyyy-MM-dd hh:mm") | |||||
item.endTime = util.formatTime(item.endTime, "yyyy-MM-dd hh:mm") | |||||
}) | }) | ||||
this.setData({ | this.setData({ | ||||
list: tempArr, | list: tempArr, | ||||
@@ -148,7 +148,7 @@ Page({ | |||||
/** | /** | ||||
* 用户点击右上角分享 | * 用户点击右上角分享 | ||||
*/ | */ | ||||
onShareAppMessage: function() { | |||||
// onShareAppMessage: function() { | |||||
} | |||||
// } | |||||
}) | }) |
@@ -4,7 +4,7 @@ | |||||
<view class="activityBox" wx:for="{{list}}" wx:key="index" bindtap="goActivity" data-id="{{item.id}}"> | <view class="activityBox" wx:for="{{list}}" wx:key="index" bindtap="goActivity" data-id="{{item.id}}"> | ||||
<image class="activity" src="{{item.coverImg}}"></image> | <image class="activity" src="{{item.coverImg}}"></image> | ||||
<view class="title">{{item.title}}</view> | <view class="title">{{item.title}}</view> | ||||
<view class="text">报名时间:{{item.startTime}}至{{item.endTime}}</view> | |||||
<view class="text" wx:if="{{item.activityType==1}}">报名时间:{{item.startTime}}至{{item.endTime}}</view> | |||||
<view class="text">活动时间:{{item.activityStartTime}}至{{item.activityEndTime}}</view> | <view class="text">活动时间:{{item.activityStartTime}}至{{item.activityEndTime}}</view> | ||||
</view> | </view> | ||||
<view class="noData" wx:if="{{list.length==0}}">当月商场未设置活动,敬请期待!</view> | <view class="noData" wx:if="{{list.length==0}}">当月商场未设置活动,敬请期待!</view> | ||||
@@ -18,38 +18,41 @@ | |||||
.title { | .title { | ||||
text-align: left; | text-align: left; | ||||
font-size: 18px; | |||||
font-size: 32rpx; | |||||
font-weight: 700; | font-weight: 700; | ||||
margin-left: 40rpx; | |||||
margin-left: 10rpx; | |||||
height: 60rpx; | height: 60rpx; | ||||
line-height: 60rpx; | line-height: 60rpx; | ||||
} | } | ||||
.Box{ | |||||
background-image: linear-gradient(#cc9966, #F4F5F9); | |||||
.Box { | |||||
background-image: linear-gradient(#c96, #f4f5f9); | |||||
} | } | ||||
.text { | .text { | ||||
line-height: 50rpx; | line-height: 50rpx; | ||||
height: 50rpx; | height: 50rpx; | ||||
text-align: left; | text-align: left; | ||||
margin-left: 40rpx; | |||||
margin-left: 10rpx; | |||||
white-space: nowrap; | white-space: nowrap; | ||||
text-overflow: ellipsis; | text-overflow: ellipsis; | ||||
overflow: hidden; | overflow: hidden; | ||||
font-size: 26rpx; | font-size: 26rpx; | ||||
word-wrap: break-word; | word-wrap: break-word; | ||||
color: rgba(0, 0, 0, 0.3) | |||||
color: rgba(0, 0, 0, 0.3); | |||||
} | } | ||||
.noData{ | |||||
.noData { | |||||
text-align: center; | text-align: center; | ||||
height: 60rpx; | height: 60rpx; | ||||
line-height: 60rpx; | line-height: 60rpx; | ||||
margin-top: 60rpx; | margin-top: 60rpx; | ||||
color:rgba(0, 0, 0, 0.3); | |||||
color: rgba(0, 0, 0, 0.3); | |||||
} | } | ||||
.loading{ | |||||
text-align: center; | |||||
.loading { | |||||
text-align: center; | |||||
height: 60rpx; | height: 60rpx; | ||||
line-height: 60rpx; | line-height: 60rpx; | ||||
color:rgba(0, 0, 0, 0.3); | |||||
color: rgba(0, 0, 0, 0.3); | |||||
} | } |
@@ -7,6 +7,7 @@ Page({ | |||||
url:'' | url:'' | ||||
}, | }, | ||||
onShareAppMessage: function (res) { | onShareAppMessage: function (res) { | ||||
app.globalData.previewFlag = true | |||||
let _this=this; | let _this=this; | ||||
return { | return { | ||||
title: '小游戏', | title: '小游戏', | ||||
@@ -15,6 +15,7 @@ Page({ | |||||
// skip: app.globalData.skip | // skip: app.globalData.skip | ||||
}, | }, | ||||
onLoad: function(options) { | onLoad: function(options) { | ||||
var that = this; | var that = this; | ||||
console.log(options.skipUrl, "options.skipUrl") | console.log(options.skipUrl, "options.skipUrl") | ||||
that.setData({ | that.setData({ | ||||
@@ -83,7 +84,7 @@ Page({ | |||||
}).then(res => { | }).then(res => { | ||||
app.globalData.phone = res.data.phone; | app.globalData.phone = res.data.phone; | ||||
if (that.data.skipUrl == '1') { | if (that.data.skipUrl == '1') { | ||||
console.log(app.globalData.skip,app.globalData.skipUrl,"跳转地址" ) | |||||
if (app.globalData.skip == 'redirectTo') { | if (app.globalData.skip == 'redirectTo') { | ||||
wx.redirectTo({ | wx.redirectTo({ | ||||
url: app.globalData.skipUrl, | url: app.globalData.skipUrl, | ||||
@@ -16,7 +16,6 @@ Page({ | |||||
couponChannelIdflag: '' | couponChannelIdflag: '' | ||||
}, | }, | ||||
judgePhonelngo() { | judgePhonelngo() { | ||||
Http.get({ | Http.get({ | ||||
url: config.api.checkPhoneStatus, | url: config.api.checkPhoneStatus, | ||||
data: {} | data: {} | ||||
@@ -49,6 +48,7 @@ Page({ | |||||
onLoad: function(options) { | onLoad: function(options) { | ||||
console.log(app.globalData.skip, app.globalData.skipUrl, "跳转地址") | |||||
var that = this; | var that = this; | ||||
// options.fromflag == 'coupondetail'; | // options.fromflag == 'coupondetail'; | ||||
// 来自优惠券详情页面 | // 来自优惠券详情页面 | ||||
@@ -57,6 +57,9 @@ Page({ | |||||
fromflag: options.fromflag | fromflag: options.fromflag | ||||
}) | }) | ||||
} | } | ||||
if (options && options.goFlaig){ | |||||
that.se | |||||
} | |||||
// 来自优惠券列表券详情页面的 couponChannelId | // 来自优惠券列表券详情页面的 couponChannelId | ||||
if (options && options.couponChannelIdflag) { | if (options && options.couponChannelIdflag) { | ||||
that.setData({ | that.setData({ | ||||
@@ -246,6 +249,17 @@ Page({ | |||||
app.globalData.skipUrl = '/index/index', | app.globalData.skipUrl = '/index/index', | ||||
app.globalData.skip = 'switchTab' | app.globalData.skip = 'switchTab' | ||||
that.judgePhonelngo() | that.judgePhonelngo() | ||||
} else if (app.globalData.type == "qd"){ | |||||
//每日签到 | |||||
app.globalData.skipUrl = "/pages/activityCalendar/activityCalendar" | |||||
app.globalData.skip = 'reLaunch' | |||||
that.judgePhonelngo() | |||||
} | |||||
else if (app.globalData.type == "hdrl") { | |||||
//活动日历 | |||||
app.globalData.skipUrl = `/pages/radetail/index?id=${app.globalData.activityId}` | |||||
app.globalData.skip = 'redirectTo' | |||||
that.judgePhonelngo() | |||||
} | } | ||||
// 积分 | // 积分 | ||||
else if (app.globalData.type == 'jf') { | else if (app.globalData.type == 'jf') { | ||||
@@ -38,7 +38,6 @@ Page({ | |||||
that.setData({ | that.setData({ | ||||
newArr: this.data.scene.split(':') | newArr: this.data.scene.split(':') | ||||
}) | }) | ||||
//// 大屏-二维码-start | //// 大屏-二维码-start | ||||
if (this.data.newArr[0] == 'JC') { | if (this.data.newArr[0] == 'JC') { | ||||
// 跳转券详情 | // 跳转券详情 | ||||
@@ -331,6 +330,18 @@ Page({ | |||||
url: `/pages2/live/livelist/index` | url: `/pages2/live/livelist/index` | ||||
}); | }); | ||||
} | } | ||||
//活动日历 | |||||
else if (app.globalData.type == 'arl') { | |||||
wx.redirectTo({ | |||||
url: `/pages/dateLsit/dateLsit` | |||||
}); | |||||
} | |||||
//每日签到 | |||||
else if (app.globalData.type == 'qd') { | |||||
wx.redirectTo({ | |||||
url: `/pages/activityCalendar/activityCalendar` | |||||
}); | |||||
} | |||||
// 门店 | // 门店 | ||||
else if (app.globalData.type == 'ml') { | else if (app.globalData.type == 'ml') { | ||||
wx.switchTab({ | wx.switchTab({ | ||||
@@ -221,6 +221,7 @@ Page({ | |||||
* 获取多商铺列表 | * 获取多商铺列表 | ||||
*/ | */ | ||||
onShareAppMessage: function(res) { | onShareAppMessage: function(res) { | ||||
app.globalData.previewFlag = true | |||||
let that = this; | let that = this; | ||||
let shareObj = { | let shareObj = { | ||||
title: that.data.data.merchantName, | title: that.data.data.merchantName, | ||||
@@ -64,6 +64,7 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
onShareAppMessage: function (res) { | onShareAppMessage: function (res) { | ||||
app.globalData.previewFlag = true | |||||
if (res.from === 'button') { | if (res.from === 'button') { | ||||
console.log(res, 3333333333333333333333) | console.log(res, 3333333333333333333333) | ||||
// 来自页面内转发按钮 | // 来自页面内转发按钮 | ||||
@@ -9,10 +9,13 @@ const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | |||||
let configUrls = extConfig.attr.configUrl; | let configUrls = extConfig.attr.configUrl; | ||||
Page({ | Page({ | ||||
data: { | data: { | ||||
ifBtn:true,//是否能报名 | |||||
fenxiang: imgurl.fenxiang1.url, | fenxiang: imgurl.fenxiang1.url, | ||||
navigationBarHeight, | navigationBarHeight, | ||||
data: {}, | data: {}, | ||||
status: 1, | |||||
// status: 1, | |||||
activityStatus:'', | |||||
joinStatus:'', | |||||
couponId: null, | couponId: null, | ||||
orderId: "", | orderId: "", | ||||
question: [], | question: [], | ||||
@@ -44,8 +47,19 @@ Page({ | |||||
}).then(res => { | }).then(res => { | ||||
that.setData({ | that.setData({ | ||||
status: res.data.status | |||||
status: res.data.status, | |||||
activityStatus: res.data.activityStatus, | |||||
joinStatus:res.data.joinStatus | |||||
}); | }); | ||||
if (res.data.activity.activityType==0){ | |||||
that.setData({ | |||||
ifBtn:false | |||||
}) | |||||
}else{ | |||||
that.setData({ | |||||
ifBtn: true | |||||
}) | |||||
} | |||||
if (res && res.data && res.data.activity) { | if (res && res.data && res.data.activity) { | ||||
that.setData({ | that.setData({ | ||||
data: res.data.activity | data: res.data.activity | ||||
@@ -90,8 +104,10 @@ Page({ | |||||
}) | }) | ||||
}).catch(err=>{ | }).catch(err=>{ | ||||
wx.hideLoading() | wx.hideLoading() | ||||
app.globalData.activityId = activityId | |||||
app.globalData.type = "hdrl" | |||||
wx.navigateTo({ | wx.navigateTo({ | ||||
url: `/pages/getphoneInfo/index?signActivity=${activityId}`, | |||||
url: '/pages/getuserinfo/index', | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -101,6 +117,7 @@ Page({ | |||||
}) | }) | ||||
}, | }, | ||||
onShareAppMessage: function (options) { | onShareAppMessage: function (options) { | ||||
app.globalData.previewFlag = true | |||||
var that = this; | var that = this; | ||||
let shareObj = {}; | let shareObj = {}; | ||||
// 来自页面内的按钮的转发 | // 来自页面内的按钮的转发 | ||||
@@ -24,13 +24,14 @@ | |||||
<text>活动说明</text> | <text>活动说明</text> | ||||
<text class='detail' wx:if="{{data.type == 1}}">{{data.detail}}</text> | <text class='detail' wx:if="{{data.type == 1}}">{{data.detail}}</text> | ||||
</view> | </view> | ||||
<view class='num'> | |||||
<view class='member'>1、活动人数:{{data.personLimit}}人</view> | |||||
<view class='num' wx:if="{{ifBtn}}"> | |||||
<view class='member' >1、活动人数:{{data.personLimit}}人</view> | |||||
<view class='integral' wx:if='{{data.credit}}' ><text>消耗积分:</text><text class='integralNum'>{{data.credit}}</text> 积分</view> | <view class='integral' wx:if='{{data.credit}}' ><text>消耗积分:</text><text class='integralNum'>{{data.credit}}</text> 积分</view> | ||||
</view> | </view> | ||||
<view class='time'>2、报名有效日期</view> | |||||
<view class='time' style='margin-left:36rpx' >{{startTime}}--{{endTime}}</view> | |||||
<view class='time' >3、活动有效日期</view> | |||||
<view class='time' wx:if="{{ifBtn}}">2、报名有效日期</view> | |||||
<view class='time' style='margin-left:36rpx' wx:if="{{ifBtn}}">{{startTime}}--{{endTime}}</view> | |||||
<view class='time' wx:if="{{!ifBtn}}">1、活动有效日期</view> | |||||
<view class='time' wx:if="{{ifBtn}}">3、活动有效日期</view> | |||||
<view class='time' style='margin-left:36rpx'>{{activityStartTime}}--{{activityEndTime}}</view> | <view class='time' style='margin-left:36rpx'>{{activityStartTime}}--{{activityEndTime}}</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -42,7 +43,14 @@ | |||||
<template is="wxParse" data="{{wxParseData:article.nodes}}" /> | <template is="wxParse" data="{{wxParseData:article.nodes}}" /> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<button wx:if="{{status == 0}}" disabled class='signUpHr' hover-class='opacity'>报名未开始</button> | |||||
<button wx:if="{{status == 1}}" class='signUp' data-activityId="{{activityId}}" bindtap='goSignUp' hover-class='opacity'>我要报名</button> | |||||
<button wx:if="{{status == 2}}" disabled class='signUpHr' hover-class='opacity'>活动已结束</button> | |||||
<button wx:if="{{status == 3}}" disabled class='signUpHr' hover-class='opacity'>已报名</button> | |||||
<view class="apply" wx:if="{{joinStatus==3}}">已报名</view> | |||||
<button wx:if="{{activityStatus == 0&&ifBtn}}" disabled class='signUpHr' hover-class='opacity'>报名未开始</button> | |||||
<button wx:if="{{activityStatus == 1&&ifBtn&&joinStatus!=3}}" class='signUp' data-activityId="{{activityId}}" bindtap='goSignUp' hover-class='opacity'>我要报名</button> | |||||
<button wx:if="{{joinStatus==3&&activityStatus==1}}" disabled class='signUpHr' hover-class='opacity'>活动进行中</button> | |||||
<button wx:if="{{activityStatus == 2}}" disabled class='signUpHr' hover-class='opacity'>报名已结束</button> | |||||
<button wx:if="{{activityStatus == 5}}" disabled class='signUpHr' hover-class='opacity'>活动未上线</button> | |||||
<button wx:if="{{activityStatus == 6}}" disabled class='signUpHr' hover-class='opacity'>活动已下线</button> | |||||
<button wx:if="{{activityStatus == 7}}" disabled class='signUpHr' hover-class='opacity'>活动已结束</button> | |||||
<button wx:if="{{activityStatus == 8}}" disabled class='signUpHr' hover-class='opacity'>无需报名</button> | |||||
<!-- <button wx:if="{{activityStatus == 3&&ifBtn}}" disabled class='signUpHr' hover-class='opacity'>已报名</button> --> |
@@ -11,7 +11,17 @@ page{ | |||||
.coupons-body { | .coupons-body { | ||||
flex: 1; | flex: 1; | ||||
} | } | ||||
.apply{ | |||||
position: fixed; | |||||
bottom: 152rpx; | |||||
left: 100rpx; | |||||
margin: auto; | |||||
width:556rpx; | |||||
font-size: 30rpx; | |||||
text-align: center; | |||||
background-color: #f6f6f6; | |||||
color: #888; | |||||
} | |||||
.banner { | .banner { | ||||
position: relative; | position: relative; | ||||
width: 750rpx; | width: 750rpx; | ||||
@@ -80,6 +80,7 @@ Page({ | |||||
console.log(value) | console.log(value) | ||||
}, | }, | ||||
formSubmit: function(e) { | formSubmit: function(e) { | ||||
app.globalData.previewFlag = true | |||||
let that = this; | let that = this; | ||||
/** | /** | ||||
* sex | * sex | ||||
@@ -66,7 +66,7 @@ Page({ | |||||
this.getUserInfo(ctx, scale) | this.getUserInfo(ctx, scale) | ||||
ctx.setFillStyle("#fff"); | ctx.setFillStyle("#fff"); | ||||
ctx.fillRect(0, 0, this.data.windowWidth, this.data.windowHeight); | ctx.fillRect(0, 0, this.data.windowWidth, this.data.windowHeight); | ||||
this.drawNormalText(ctx, " 向您推荐", 140 * scale, 32 * scale, 16 * scale, "#848484", "left", "middle", scale); | |||||
this.drawNormalText(ctx, "长按二维码识别", 180 * scale, 360 * scale, 16 * scale, "#000", "left", "middle") | this.drawNormalText(ctx, "长按二维码识别", 180 * scale, 360 * scale, 16 * scale, "#000", "left", "middle") | ||||
this.drawNormalText(ctx, "尽享更多优惠活动!", 170 * scale, 390 * scale, 16 * scale, "#000", "left", "middle") | this.drawNormalText(ctx, "尽享更多优惠活动!", 170 * scale, 390 * scale, 16 * scale, "#000", "left", "middle") | ||||
ctx.draw(true); | ctx.draw(true); | ||||
@@ -107,7 +107,7 @@ Page({ | |||||
wx.getImageInfo({ | wx.getImageInfo({ | ||||
src: src2, | src: src2, | ||||
success: function(res) { | success: function(res) { | ||||
ctx.drawImage(res.path, 20 * scale, 80 * scale, (that.data.windowWidth - 60) * scale, 200 * scale); | |||||
ctx.drawImage(res.path, ((that.data.windowWidth -320 )/4 )* scale, 80 * scale, 320 * scale, 200 * scale); | |||||
ctx.draw(true); | ctx.draw(true); | ||||
} | } | ||||
}); | }); | ||||
@@ -169,6 +169,7 @@ Page({ | |||||
}); | }); | ||||
console.log(data.userInfo.avatarUrl, "????--**") | console.log(data.userInfo.avatarUrl, "????--**") | ||||
this.drawNormalText(ctx, nickName, 50 * scale, 34 * scale, 16 * scale, "#000", "left", "middle"); | this.drawNormalText(ctx, nickName, 50 * scale, 34 * scale, 16 * scale, "#000", "left", "middle"); | ||||
this.drawNormalText(ctx, " 向您推荐", (ctx.measureText(this.data.nickName).width + 60) * scale * scale, 32 * scale, 16 * scale, "#848484", "left", "middle", scale); | |||||
that.drawAvatarimg(ctx, scale) | that.drawAvatarimg(ctx, scale) | ||||
} | } | ||||
}) | }) | ||||
@@ -179,6 +180,7 @@ Page({ | |||||
avatarUrl: res.data.avatarUrl | avatarUrl: res.data.avatarUrl | ||||
}); | }); | ||||
this.drawNormalText(ctx, nickName, 48 * scale, 34 * scale, 16 * scale, "#000", "left", "middle"); | this.drawNormalText(ctx, nickName, 48 * scale, 34 * scale, 16 * scale, "#000", "left", "middle"); | ||||
this.drawNormalText(ctx, " 向您推荐", (ctx.measureText(this.data.nickName).width + 60) * scale * scale, 32 * scale, 16 * scale, "#848484", "left", "middle", scale); | |||||
that.drawAvatarimg(ctx, scale) | that.drawAvatarimg(ctx, scale) | ||||
} | } | ||||
}); | }); | ||||
@@ -4,6 +4,7 @@ var config = require("../../config/config.js"); | |||||
const Http = require("../../utils/HttpBasics"); | const Http = require("../../utils/HttpBasics"); | ||||
const imgurl = require("../../utils/imgurl"); | const imgurl = require("../../utils/imgurl"); | ||||
const { spellStatus } = require("../../utils/spell"); | const { spellStatus } = require("../../utils/spell"); | ||||
var app = getApp(); | |||||
Page({ | Page({ | ||||
/** | /** | ||||
@@ -263,6 +264,7 @@ Page({ | |||||
*/ | */ | ||||
// paramData | // paramData | ||||
onShareAppMessage: function (res) { | onShareAppMessage: function (res) { | ||||
app.globalData.previewFlag = true | |||||
if (res.from === 'button') { | if (res.from === 'button') { | ||||
console.log(res, this.data.nickName, this.data.avatarUrl, 3333333333333333333333) | console.log(res, this.data.nickName, this.data.avatarUrl, 3333333333333333333333) | ||||
// 来自页面内转发按钮 | // 来自页面内转发按钮 | ||||
@@ -385,6 +385,7 @@ Page({ | |||||
* 发起拼团 | * 发起拼团 | ||||
*/ | */ | ||||
gotoSpell(e) { | gotoSpell(e) { | ||||
app.globalData.previewFlag = false | |||||
let that = this; | let that = this; | ||||
that.setData({ | that.setData({ | ||||
canSpell: false, | canSpell: false, | ||||
@@ -798,6 +799,7 @@ Page({ | |||||
} | } | ||||
}, | }, | ||||
onShareAppMessage: function(options) { | onShareAppMessage: function(options) { | ||||
app.globalData.previewFlag = true | |||||
console.log(options) | console.log(options) | ||||
var that = this; | var that = this; | ||||
var shareObj = { | var shareObj = { | ||||
@@ -20,11 +20,15 @@ Page({ | |||||
tabs: [ | tabs: [ | ||||
{ | { | ||||
key: 0, | key: 0, | ||||
name: "参与中" | |||||
name: "报名成功 " | |||||
}, | }, | ||||
{ | { | ||||
key: 1, | key: 1, | ||||
name: "已过期" | |||||
name: "报名中" | |||||
}, | |||||
{ | |||||
key: 2, | |||||
name: "报名失败" | |||||
} | } | ||||
], | ], | ||||
list: [], | list: [], | ||||
@@ -67,7 +71,8 @@ Page({ | |||||
variable = { | variable = { | ||||
pageNum: pageNum, | pageNum: pageNum, | ||||
pageSize: 15, | pageSize: 15, | ||||
statusStr:"0,1,2" | |||||
// statusStr:"0,1,2" | |||||
status:1 | |||||
}; | }; | ||||
}else if(key == 1){ | }else if(key == 1){ | ||||
that.setData({ | that.setData({ | ||||
@@ -76,7 +81,16 @@ Page({ | |||||
variable = { | variable = { | ||||
pageNum: pageNum, | pageNum: pageNum, | ||||
pageSize: 15, | pageSize: 15, | ||||
status: 3 | |||||
status: 0 | |||||
}; | |||||
}else if(key==2){ | |||||
that.setData({ | |||||
key: 2 | |||||
}) | |||||
variable = { | |||||
pageNum: pageNum, | |||||
pageSize: 15, | |||||
status: 2 | |||||
}; | }; | ||||
} | } | ||||
@@ -116,6 +130,17 @@ Page({ | |||||
that.setData({ | that.setData({ | ||||
list: tmpArr | list: tmpArr | ||||
}) | }) | ||||
let tmpeArr = that.data.list | |||||
tmpeArr.map(item=>{ | |||||
if(item.activityEndTime<new Date().getTime()){ | |||||
item.past = true | |||||
} | |||||
item.startTime = util.formatTime(item.startTime, "yyyy-MM-dd hh:mm:ss"); | |||||
item.endTime = util.formatTime(item.endTime, "yyyy-MM-dd hh:mm:ss"); | |||||
}) | |||||
that.setData({ | |||||
list: tmpeArr | |||||
}) | |||||
for (let i = 0; i < that.data.list.length; i++) { | for (let i = 0; i < that.data.list.length; i++) { | ||||
var activityStartTime1 = util.formatTime(that.data.list[i].activityStartTime, "yyyy-MM-dd hh:mm:ss" ); | var activityStartTime1 = util.formatTime(that.data.list[i].activityStartTime, "yyyy-MM-dd hh:mm:ss" ); | ||||
var activityEndTime1 = util.formatTime(that.data.list[i].activityEndTime, "yyyy-MM-dd hh:mm:ss"); | var activityEndTime1 = util.formatTime(that.data.list[i].activityEndTime, "yyyy-MM-dd hh:mm:ss"); | ||||
@@ -125,6 +150,7 @@ Page({ | |||||
*/ | */ | ||||
var activityStartTime = 'list[' + i + '].activityStartTime' | var activityStartTime = 'list[' + i + '].activityStartTime' | ||||
var activityEndTime = 'list[' + i + '].activityEndTime' | var activityEndTime = 'list[' + i + '].activityEndTime' | ||||
that.setData({ | that.setData({ | ||||
[activityStartTime]: activityStartTime1, | [activityStartTime]: activityStartTime1, | ||||
[activityEndTime]: activityEndTime1, | [activityEndTime]: activityEndTime1, | ||||
@@ -10,14 +10,15 @@ | |||||
<view class='logo'> | <view class='logo'> | ||||
<image src='{{item.coverImg}}'></image> | <image src='{{item.coverImg}}'></image> | ||||
</view> | </view> | ||||
<view class='bottom'> | |||||
<view>{{item.title}}</view> | |||||
<view>{{item.activityStartTime}}--{{item.activityEndTime}}</view> | |||||
<view > | |||||
<view class="title">{{item.title}}</view> | |||||
<view id="text" >报名时间:{{item.startTime}}至{{item.endTime}}</view> | |||||
<view id="text">活动时间:{{item.activityStartTime}}至{{item.activityEndTime}}</view> | |||||
</view> | </view> | ||||
<view class='info'> | <view class='info'> | ||||
<image class="frImg" wx:if="{{item.status == 0&&key==0}}" src="{{orangeImg}}" mode="aspectFill" lazy-load="true"><text>报名中</text></image> | |||||
<image class="frImg" wx:if="{{item.status == 1&&key==0}}" src="{{blueImg}}" mode="aspectFill" lazy-load="true"><text>报名成功</text></image> | |||||
<image class="frImg" wx:if="{{item.status == 2&&key==0}}" src="{{grayImg}}" mode="aspectFill" lazy-load="true"><text>报名失败</text></image> | |||||
<image class="frImg" wx:if="{{item.status == 1}}" src="{{orangeImg}}" mode="aspectFill" lazy-load="true"><text>已下线</text></image> | |||||
<image class="frImg" wx:if="{{item.status > 1&&item.past }}" src="{{blueImg}}" mode="aspectFill" lazy-load="true"><text>已过期</text></image> | |||||
<!-- <image class="frImg" wx:if="{{item.status == 2&&key==0}}" src="{{grayImg}}" mode="aspectFill" lazy-load="true"><text>报名失败</text></image> --> | |||||
<!-- <image class="frImg" wx:if="{{item.status == 3&&key==0}}" src="{{grayImg}}" mode="aspectFill" lazy-load="true"><text>活动结束</text></image> --> | <!-- <image class="frImg" wx:if="{{item.status == 3&&key==0}}" src="{{grayImg}}" mode="aspectFill" lazy-load="true"><text>活动结束</text></image> --> | ||||
<view> | <view> | ||||
<!-- <text wx:if="{{item.status == 0&&key==0}}" style='font-size:30rpx;font-weight:bold;'>报名中</text> | <!-- <text wx:if="{{item.status == 0&&key==0}}" style='font-size:30rpx;font-weight:bold;'>报名中</text> | ||||
@@ -32,7 +32,26 @@ | |||||
/* display: flex; | /* display: flex; | ||||
justify-content: space-between; */ | justify-content: space-between; */ | ||||
padding: 10rpx 10rpx; | padding: 10rpx 10rpx; | ||||
text-align: center; | |||||
} | |||||
#text { | |||||
line-height: 50rpx; | |||||
height: 50rpx; | |||||
text-align: left; | |||||
margin-left: 40rpx; | |||||
white-space: nowrap; | |||||
text-overflow: ellipsis; | |||||
overflow: hidden; | |||||
font-size: 26rpx; | |||||
word-wrap: break-word; | |||||
color: rgba(0, 0, 0, 0.3) | |||||
} | |||||
.title{ | |||||
text-align: left; | |||||
font-size: 18px; | |||||
font-weight: 700; | |||||
margin-left: 40rpx; | |||||
height: 60rpx; | |||||
line-height: 60rpx; | |||||
} | } | ||||
.sendImg{ | .sendImg{ | ||||
position: absolute; | position: absolute; | ||||
@@ -32,7 +32,7 @@ | |||||
}, | }, | ||||
"compileType": "miniprogram", | "compileType": "miniprogram", | ||||
"libVersion": "2.9.5", | "libVersion": "2.9.5", | ||||
"appid": "wxfa336cad86ed598d", | |||||
"appid": "wx453ae0d37f3550d0", | |||||
"projectname": "oldC", | "projectname": "oldC", | ||||
"isGameTourist": false, | "isGameTourist": false, | ||||
"simulatorType": "wechat", | "simulatorType": "wechat", | ||||