|
|
@@ -68,12 +68,9 @@ Page({
|
|
|
* @param {*} e
|
|
|
*/
|
|
|
dateChange(e) {
|
|
|
- // {year: 2021, month: 7, day: 25, dateString: "2021-07-25"}
|
|
|
- console.log("dateChange", e.detail.dateString)
|
|
|
-
|
|
|
// 当前日期的区间
|
|
|
let dateArrs = util.getCurrentDateMonth(e.detail.dateString)
|
|
|
- console.log(dateArrs);
|
|
|
+ this.getSignData(dateArrs[0], dateArrs[1])
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
@@ -91,25 +88,25 @@ Page({
|
|
|
let serverDate = new Date(nowDate).toDateStr()
|
|
|
_this.setData({
|
|
|
serverDate,
|
|
|
- spot: [
|
|
|
- {
|
|
|
- date: '2024-07-02',
|
|
|
- title: '2个',
|
|
|
- isnormal: true,
|
|
|
-
|
|
|
- },
|
|
|
- {
|
|
|
- date: '2024-07-12',
|
|
|
- title: '2个',
|
|
|
- isnormal: true,
|
|
|
- }
|
|
|
- ,
|
|
|
- {
|
|
|
- date: '2024-07-22',
|
|
|
- title: '2个',
|
|
|
- isnormal: true,
|
|
|
- }
|
|
|
- ]
|
|
|
+ // spot: [
|
|
|
+ // {
|
|
|
+ // date: '2024-07-02',
|
|
|
+ // title: '2个',
|
|
|
+ // isnormal: true,
|
|
|
+
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // date: '2024-07-12',
|
|
|
+ // title: '2个',
|
|
|
+ // isnormal: true,
|
|
|
+ // }
|
|
|
+ // ,
|
|
|
+ // {
|
|
|
+ // date: '2024-07-22',
|
|
|
+ // title: '2个',
|
|
|
+ // isnormal: true,
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
})
|
|
|
|
|
|
}
|
|
|
@@ -161,8 +158,10 @@ Page({
|
|
|
* @date : 2024/4/1
|
|
|
*/
|
|
|
getCouponCount() {
|
|
|
- let params = {}
|
|
|
- let service = app.globalData['couponService']
|
|
|
+ let params = {
|
|
|
+ integralType: Constants.integralType.sign
|
|
|
+ }
|
|
|
+ let service = app.globalData['couponUseService']
|
|
|
this.excute(service, '10002024-0718-0000-0000-000005c0a01e', params).then(res => {
|
|
|
console.log(res.data);
|
|
|
if (res.data.code == Constants.SUCESS_CODE) {
|
|
|
@@ -179,7 +178,7 @@ Page({
|
|
|
getUser() {
|
|
|
let service = app.globalData['oauthService']
|
|
|
return this.excute(service, service.getUser + '/' + app.globalData.user.userId, {}).then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
+ if (res.data.code == Constants.SUCESS_CODE) {
|
|
|
let avatarUrl = res.data.data.userImage || this.data.defaultAvatarUrl
|
|
|
this.setData({
|
|
|
avatarUrl: avatarUrl
|
|
|
@@ -193,8 +192,32 @@ Page({
|
|
|
* @date : 2024年3月8日
|
|
|
* @author : jyh
|
|
|
*/
|
|
|
- getSignData() {
|
|
|
- return this.excute(this.data.service, this.data.service.selectByCond, params);
|
|
|
+ getSignData(accDateStart, accDateEnd) {
|
|
|
+ let _this = this
|
|
|
+ let params = {
|
|
|
+ integralType: Constants.integralType.sign,
|
|
|
+ accDateStart: accDateStart,
|
|
|
+ accDateEnd: accDateEnd,
|
|
|
+ flgValid: true,
|
|
|
+ userId: app.globalData.user.userId,
|
|
|
+ }
|
|
|
+ let service = app.globalData['integralItemService']
|
|
|
+ return this.excute(service, service.selectByCond, params).then(res => {
|
|
|
+ if (res.data.code == Constants.SUCESS_CODE) {
|
|
|
+ let spot = []
|
|
|
+ console.log(res.data.data.list);
|
|
|
+ res.data.data.list.forEach(it => {
|
|
|
+ spot.push({
|
|
|
+ date: it.accDate,
|
|
|
+ title: it.integral + '个',
|
|
|
+ isnormal: true,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ _this.setData({
|
|
|
+ spot
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
@@ -212,7 +235,9 @@ Page({
|
|
|
* @author : 姜永辉
|
|
|
*/
|
|
|
handleData() {
|
|
|
- this.getSignData()
|
|
|
+ let serverDate = this.data.serverDate
|
|
|
+ let dateArrs = util.getCurrentDateMonth(serverDate)
|
|
|
+ this.getSignData(dateArrs[0], dateArrs[1])
|
|
|
},
|
|
|
|
|
|
})
|