修改签到
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"u-image": "/components/uview-ui/components/u-image/u-image",
|
||||
"u-line": "/components/uview-ui/components/u-line/u-line",
|
||||
"u-button": "/components/uview-ui/components/u-button/u-button"
|
||||
}
|
||||
},
|
||||
"component": true
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"u-icon": "/components/uview-ui/components/u-icon/u-icon"
|
||||
}
|
||||
},
|
||||
"component": true
|
||||
}
|
||||
154
unpackage/dist/dev/mp-weixin/pages/signin/signin.js
vendored
154
unpackage/dist/dev/mp-weixin/pages/signin/signin.js
vendored
@ -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
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -1 +1 @@
|
||||
<view><view class="signin"><view class="bold-700 title">每日签到</view><view class="day"><text class="lg">已经连续签到</text><text>{{signDays+"天"}}</text></view><view class="row-between u-m-t-32 u-m-l-24 u-m-r-24"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="{{item.m0}}"><view class="date mt10">{{"第"+item.$orig.days+"天"}}</view><view class="mt10"><u-image vue-id="{{'4a92de40-1-'+index}}" src="{{item.m1}}" width="30" height="30" bind:__l="__l"></u-image></view><view class="points mt10">{{"x"+item.$orig.integral}}</view></view></block></view><view data-event-opts="{{[['tap',[['userSignFun',['$event']]]]]}}" class="u-m-t-26 signin-btn" bindtap="__e">{{''+(canSign==1?'已签到':'签到')+''}}</view></view><view class="bg-white ad row-between u-padding-left-20 u-padding-right-20"><view class="row"><view><u-image vue-id="4a92de40-2" src="{{cloudPath+'img/red-packet.png'}}" width="90" height="90" bind:__l="__l"></u-image></view><view class="ml20"><view class="bold-600 xs">看广告获取积分</view><view class="text-AE xxs u-m-t-12">每日观看5分钟最高可领取376金币</view></view></view><view><u-button vue-id="4a92de40-3" hover-class="none" customStyle="{{$root.a0}}" plain="{{true}}" hair-line="{{false}}" shape="circle" data-event-opts="{{[['^click',[['mobileLogin']]]]}}" bind:click="__e" bind:__l="__l" vue-slots="{{['default']}}">看广告</u-button></view></view></view>
|
||||
<view><view class="signin"><view class="bold-700 title">每日签到</view><view class="day"><text class="lg">已经连续签到</text><text>{{signDays+"天"}}</text></view><view class="row-between u-m-t-32 u-m-l-24 u-m-r-24"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="{{['sigin-day','column-center',[(currentDay==item.$orig.days&&canSign==0)?'current':'',(currentDay==item.$orig.days&&item.$orig.status==1||currentDay!=item.$orig.days&&item.$orig.status==1)?'normal':'',(currentDay==item.$orig.days&&item.$orig.status==0||currentDay!=item.$orig.days&&item.$orig.status==0)?'expire':'']]}}"><view class="date mt10">{{"第"+item.$orig.days+"天"}}</view><view class="mt10"><u-image vue-id="{{'4a92de40-1-'+index}}" src="{{item.m0}}" width="30" height="30" bind:__l="__l"></u-image></view><view class="points mt10">{{"x"+item.$orig.integral}}</view></view></block></view><view data-event-opts="{{[['tap',[['userSignFun',['$event']]]]]}}" class="u-m-t-26 signin-btn" bindtap="__e">{{''+(canSign==1?'已签到':'签到')+''}}</view></view><view class="bg-white ad row-between u-padding-left-20 u-padding-right-20"><view class="row"><view><u-image vue-id="4a92de40-2" src="{{cloudPath+'img/red-packet.png'}}" width="90" height="90" bind:__l="__l"></u-image></view><view class="ml20"><view class="bold-600 xs">看广告获取积分</view><view class="text-AE xxs u-m-t-12">每日观看5分钟最高可领取376金币</view></view></view><view><u-button vue-id="4a92de40-3" hover-class="none" customStyle="{{$root.a0}}" plain="{{true}}" hair-line="{{false}}" shape="circle" data-event-opts="{{[['^click',[['mobileLogin']]]]}}" bind:click="__e" bind:__l="__l" vue-slots="{{['default']}}">看广告</u-button></view></view></view>
|
||||
@ -42,9 +42,11 @@
|
||||
}
|
||||
.signin .normal {
|
||||
background-color: #F5F5F4;
|
||||
color: #141414;
|
||||
}
|
||||
.signin .last {
|
||||
.signin .current {
|
||||
background: linear-gradient(137deg, #099DF1 0%, #7BC7F2 100%);
|
||||
color: #141414;
|
||||
}
|
||||
.signin .sigin-day {
|
||||
width: 80rpx;
|
||||
|
||||
Reference in New Issue
Block a user