修改签到

This commit is contained in:
2025-05-08 11:23:31 +08:00
parent 35967a152c
commit cbf23a8a06
156 changed files with 1341 additions and 1412 deletions

View File

@ -97,10 +97,65 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
var render = function () {}
var staticRenderFns = []
var recyclableRender
var components
try {
components = {
uImage: function () {
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-image/u-image */ "components/uview-ui/components/u-image/u-image").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-image/u-image.vue */ 356))
},
uButton: function () {
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-button/u-button */ "components/uview-ui/components/u-button/u-button").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-button/u-button.vue */ 342))
},
}
} catch (e) {
if (
e.message.indexOf("Cannot find module") !== -1 &&
e.message.indexOf(".vue") !== -1
) {
console.error(e.message)
console.error("1. 排查组件名称拼写是否正确")
console.error(
"2. 排查组件是否符合 easycom 规范文档https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
)
console.error(
"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件"
)
} else {
throw e
}
}
var render = function () {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
var l0 = _vm.__map(_vm.signList, function (item, index) {
var $orig = _vm.__get_orig(item)
var m0 = _vm.signinCurrent(item)
return {
$orig: $orig,
m0: m0,
}
})
var a0 = {
color: _vm.themeColor,
border: "1px solid " + _vm.themeColor,
width: "120rpx",
height: "60rpx",
fontSize: "28rpx",
}
_vm.$mp.data = Object.assign(
{},
{
$root: {
l0: l0,
a0: a0,
},
}
)
}
var recyclableRender = false
var staticRenderFns = []
render._withStripped = true
@ -191,50 +246,6 @@ var _tools = __webpack_require__(/*! @/utils/tools.js */ 41);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var _default = {
data: function data() {
return {
@ -248,7 +259,7 @@ var _default = {
addGrowth: 0,
signDays: 0,
makeInegral: [],
weekDay: 1
currentDay: 0
};
},
onLoad: function onLoad() {
@ -264,13 +275,20 @@ var _default = {
(0, _user.getSignList)().then(function (res) {
if (res.code == 1) {
var sign_list = res.data.sign_list;
console.log("sign_list>>>", sign_list);
console.log("sign_list>>>", sign_list.length);
_this.signList = sign_list;
_this.integral = res.data.user.user_integral;
_this.canSign = res.data.user.today_sign;
_this.signDays = res.data.user.days;
_this.weekDay = res.data.user.week_day;
_this.canSign = res.data.user.today_sign; // 是否可以签到 1:已签到 0:未签到
_this.signDays = res.data.user.days; // 连续签到天数
_this.makeInegral = res.data.make_inegral;
// 如果签到天数为0的话,也指向第一天的高亮样式
_this.currentDay = _this.signDays + 1;
if (_this.signDays == 0) {
_this.currentDay = 1;
} else if (_this.signDays > sign_list.length) {
_this.currentDay = sign_list.length;
}
}
});
},
@ -299,8 +317,7 @@ var _default = {
var _this3 = this;
return function (item) {
// 如果签到天数为0的话,也指向第一天的高亮图片
var day = _this3.signDays || 1;
if (day == item.days && _this3.canSign == 0) {
if (_this3.currentDay == item.days && _this3.canSign == 0) {
// 当天日期
return "".concat(_this3.cloudPath, "img/icon_signin_white.png");
} else if (item.status == 0) {
@ -311,35 +328,6 @@ var _default = {
return "".concat(_this3.cloudPath, "img/icon_signin_blue.png");
}
};
},
// 处理签到class显示
getDayActive: function getDayActive() {
var _this4 = this;
return function (item) {
var obj = {
'sigin-day': true,
'column-center': true
};
// 如果签到天数为0的话,也指向第一天的高亮样式
var day = _this4.signDays || 1;
if (day == item.days && _this4.canSign == 0) {
// 当天日期
return Object.assign(obj, {
'last': true
});
} else if (item.status == 0) {
// 未签到
return Object.assign(obj, {
'expire': true
});
} else if (item.status == 1) {
// 已签到
return Object.assign(obj, {
'normal': true
});
}
};
}
}
};