123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454 |
- <template>
- <uv-popup ref="popup" mode="bottom" bgColor="none">
- <view class="content-box">
- <image class="close" @click="close()" src="@/static/me/job/rw_icon_guanbi.png"></image>
- <view class="bottomCompatibility">
- <view class="left-title">
- <image src="@/static/me/job/rw_wenzi_03.png" mode="aspectFit"></image>
- <view class="checkInDays">
- <view>已签到 {{ signInfo.signDay }} 天
- <view v-if="false" class="line"></view> 签到提醒
- </view>
- <!-- <switch class="sign-switch" color="" :checked="signNotify" /> -->
- <!-- signNotify -->
- <uv-switch v-if="false" v-model="falg" size="30rpx" @change="toggleSignNotify" activeColor="#acf934"
- inactiveColor="#aecc87"></uv-switch>
- </view>
- </view>
- <view class="checkInContent">
- <view class="horizontal-box" v-for="(row, rowIndex) in signRewards" :key="rowIndex">
- <view v-for="(item, index) in row" :key="index" class="item-box" :class="[
- `item-box${item.id}`,
- item.type === 'one' ? 'item-box-one' : 'item-box-two',
- signInfo.signDay + 1 == item.day ? 'active' : '',
- signInfo.signDay >= item.day ? 'receivedIt' : '',
- ]">
- <view class="mask"></view>
- <view class="days"> {{ item.day }}天 </view>
- <view class="content" v-if="item.id !== 7">
- <image :src="getImagePath(item.icon)"></image>
- <view class="tit one-omit">{{ item.title }}</view>
- </view>
- <view v-else class="itemBox7Content">
- <view class="content" v-for="(subItem, subIndex) in item.items" :key="subIndex">
- <image :src="getImagePath(subItem.icon)"></image>
- <view class="tit one-omit">{{ subItem.title }}</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view v-if="signInfo.signDay == 7" class="receiveBtn" @click="confirmSign(3)">
- 本周奖励全部领取
- </view>
- <view v-else-if="signInfo.isSigned" class="receiveBtn" @click="confirmSign(1)">
- 今日已签到
- </view>
- <view v-else class="receiveBtn" @click="confirmSign(2)">
- 签到领取奖励
- </view>
- </view>
- </view>
- </uv-popup>
- </template>
- <script>
- import uvPopup from "@/uni_modules/uv-popup/components/uv-popup/uv-popup.vue";
- export default {
- name: "checkInPopUpWindow",
- components: {
- uvPopup,
- },
- data() {
- return {
- falg: this.signNotify,
- signRewards: [
- [
- {
- id: 1,
- day: 1,
- type: "one",
- icon:'wd_icon_xingyuan.png',
- title: '星源*2',
- },
- {
- id: 2,
- day: 2,
- type: "one",
- icon:'wd_icon_xingyuan.png',
- title: '星源*2',
- },
- {
- id: 3,
- day: 3,
- type: "two",
- icon:'wd_icon_xingyuan.png',
- title: '星源*3',
- },
- ],
- [
- {
- id: 4,
- day: 6,
- type: "two",
- icon:'wd_icon_xingyuan.png',
- title: '星源*3',
- },
- {
- id: 5,
- day: 5,
- type: "one",
- icon:'wd_icon_xingyuan.png',
- title: '星源*5',
- },
- {
- id: 6,
- day: 4,
- type: "one",
- icon:'wd_icon_xingyuan.png',
- title: '星源*5',
- },
- ],
- [
- {
- id: 7,
- day: 7,
- type: "one",
- items: [
- { icon: "wd_icon_xingyuan.png", title: '星源*5', },
- { icon: "wd_icon_xingyuan.png", title: '星源*5', },
- ],
- },
- ],
- ],
- };
- },
- props: {
- signInfo: {
- type: Object,
- default: () => { },
- },
- checkInDays: {
- type: Number || String,
- default: 1,
- },
- signNotify: {
- type: Boolean,
- default: true,
- },
- },
- methods: {
- open() {
- this.$refs.popup.open();
- },
- close() {
- this.$refs.popup.close();
- },
- toggleSignNotify(e) {
- this.$emit("toggleSignNotify", e);
- },
- confirmSign(type) {
- this.$emit("confirmSign", type);
- },
- getImagePath(iconName) {
- return `../../static/me/job/${iconName}`;
- },
- },
- };
- </script>
- <style scoped lang="scss">
- /* 添加样式 */
- .bottomCompatibility {
- height: --window-bottom;
- position: relative;
- left: 0;
- top: 0;
- }
- .content-box {
- min-height: 982rpx;
- background: url("@/static/me/job/rw_bg_tanchuang.png") top center / 100% auto no-repeat,
- linear-gradient(to bottom,
- rgba(0, 0, 0, 0) 0%,
- rgba(0, 0, 0, 0) 50%,
- #f1ffe5 50%,
- #f1ffe5 100%);
- box-sizing: border-box;
- padding: 30rpx;
- padding-top: 136rpx;
- .close {
- position: absolute;
- top: 6rpx;
- right: 30rpx;
- width: 54rpx;
- height: 54rpx;
- }
- .left-title {
- width: 360rpx;
- height: 142rpx;
- padding-bottom: 32rpx;
- image {
- width: 376rpx;
- height: 58rpx;
- }
- .checkInDays {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-top: 20rpx;
- font-size: 28rpx;
- color: #333333;
- >view {
- display: flex;
- align-items: center;
- font-weight: 400;
- font-size: 28rpx;
- color: #8f9c78;
- font-family: PingFang SC-Medium;
- .line {
- width: 2rpx;
- height: 30rpx;
- background: #d9d9d9;
- display: inline-block;
- margin: 0 12rpx;
- }
- }
- }
- }
- .checkInContent {
- width: 100%;
- height: 560rpx;
- .horizontal-box {
- width: 100%;
- height: 192rpx;
- display: flex;
- align-items: start;
- justify-content: space-between;
- }
- .item-box {
- display: inline-block;
- background: #000;
- position: relative;
- left: 0;
- top: 0;
- padding-top: 30rpx;
- padding-bottom: 12rpx;
- box-sizing: border-box;
- .mask{
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 10;
- display: none;
- }
- &.receivedIt {
- .mask{
- display: block;
- }
- }
- .days {
- font-weight: 700;
- font-size: 18px;
- color: #8cd914;
- font-family: "Alimama ShuHeiTi-Bold";
- position: absolute;
- top: 8rpx;
- left: 18rpx;
- }
- .content {
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- image {
- width: 76rpx;
- height: 76rpx;
- }
- .tit {
- max-width: 140rpx;
- display: inline-block;
- font-family: "PingFang SC-Medium";
- font-weight: 400;
- font-size: 28rpx;
- color: #2a3518;
- margin-top: 12rpx;
- text-align: center;
- }
- }
- .itemBox7Content {
- display: flex;
- align-items: center;
- }
- &.active {
- .days {
- color: #fff;
- }
- .content {
- .tit {
- color: #fff;
- }
- }
- }
- }
- .item-box-one {
- width: 226rpx;
- height: 172rpx;
- }
- .item-box-two {
- width: 212rpx;
- height: 188rpx;
- }
- .item-box1 {
- background: url("@/static/me/job/rw_bg_jiangli01_moren.png") center / 100% no-repeat;
- .mask{
- background: url("@/static/me/job/rw_bg_jiangli01_zhezhao.png") center / 100% no-repeat;
- }
- &.active {
- background: url("@/static/me/job/rw_bg_jiangli01_dianji.png") center / 100% no-repeat;
- transform: scale(1.07);
- }
- }
- .item-box2 {
- background: url("@/static/me/job/rw_bg_jiangli02_moren.png") center / 100% no-repeat;
- .mask{
- background: url("@/static/me/job/rw_bg_jiangli02_zhezhao.png") center / 100% no-repeat;
- }
- &.active {
- background: url("@/static/me/job/rw_bg_jiangli02_dianji.png") center / 100% no-repeat;
- transform: scale(1.07);
- }
- }
- .item-box3 {
- background: url("@/static/me/job/rw_bg_jiangli03_moren.png") center / 100% no-repeat;
- .mask{
- background: url("@/static/me/job/rw_bg_jiangli03_zhezhao.png") center / 100% no-repeat;
- }
- &.active {
- background: url("@/static/me/job/rw_bg_jiangli03_dianji.png") center / 100% no-repeat;
- transform: scale(1.07);
- }
- }
- .item-box4 {
- background: url("@/static/me/job/rw_bg_jiangli04_moren.png") center / 100% no-repeat;
- .mask{
- background: url("@/static/me/job/rw_bg_jiangli04_zhezhao.png") center / 100% no-repeat;
- }
- &.active {
- background: url("@/static/me/job/rw_bg_jiangli04_dianji.png") center / 100% no-repeat;
- transform: scale(1.07);
- }
- }
- .item-box5 {
- background: url("@/static/me/job/rw_bg_jiangli05_moren.png") center / 100% no-repeat;
- .mask{
- background: url("@/static/me/job/rw_bg_jiangli05_zhezhao.png") center / 100% no-repeat;
- }
- &.active {
- background: url("@/static/me/job/rw_bg_jiangli05_dianji.png") center / 100% no-repeat;
- transform: scale(1.07);
- }
- }
- .item-box6 {
- background: url("@/static/me/job/rw_bg_jiangli06_moren.png") center / 100% no-repeat;
- .mask{
- background: url("@/static/me/job/rw_bg_jiangli06_zhezhao.png") center / 100% no-repeat;
- }
- &.active {
- background: url("@/static/me/job/rw_bg_jiangli06_dianji.png") center / 100% no-repeat;
- transform: scale(1.07);
- }
- }
- .item-box7 {
- width: 100%;
- .mask{
- background: url("@/static/me/job/rw_bg_jiangli07_zhezhao.png") center / 100% no-repeat;
- }
- height: 172rpx;
- background: url("@/static/me/job/rw_bg_jiangli07_moren.png") center / 100% no-repeat;
- display: flex;
- align-items: center;
- justify-content: center;
- .itemBox7Content {
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 540rpx;
- }
- .tit {
- color: #4f3712;
- font-size: 28rpx;
- width: 130rpx;
- }
- &.active {
- background: url("@/static/me/job/rw_bg_jiangli07_dianji.png") center / 100% no-repeat;
- transform: scale(1.01);
- .tit {
- color: #fff;
- }
- }
- }
- }
- .receiveBtn {
- background: #acf934;
- border-radius: 126rpx;
- padding: 18rpx 0;
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- margin-top: 30rpx;
- }
- .sign-switch {
- transform: scale(0.6);
- }
- }
- </style>
|