checkIn-popUp-window.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. <template>
  2. <uv-popup ref="popup" mode="bottom" bgColor="none">
  3. <view class="content-box">
  4. <image class="close" @click="close()" src="@/static/me/job/rw_icon_guanbi.png"></image>
  5. <view class="bottomCompatibility">
  6. <view class="left-title">
  7. <image src="@/static/me/job/rw_wenzi_03.png"></image>
  8. <view class="checkInDays">
  9. <view>已签到 1 天 <view class="line"></view> 签到提醒</view>
  10. <!-- <switch class="sign-switch" color="" :checked="signNotify" /> -->
  11. <!-- signNotify -->
  12. <uv-switch v-model="falg" size="30rpx" @change="toggleSignNotify" activeColor="#acf934" inactiveColor="#aecc87"></uv-switch>
  13. </view>
  14. </view>
  15. <view class="checkInContent">
  16. <view class="horizontal-box">
  17. <view class="item-box item-box1 item-box-one" :class="signInfo.signDay >= 1 ? 'active' : ''">
  18. <view class="days">
  19. 1天
  20. </view>
  21. <view class="content">
  22. <image src="@/static/me/job/wd_icon_xingyuan.png"></image>
  23. <view class="tit one-omit">海浪操作作秀</view>
  24. </view>
  25. </view>
  26. <view class="item-box item-box2 item-box-one" :class="signInfo.signDay >= 2 ? 'active' : ''">
  27. <view class="days">
  28. 2天
  29. </view>
  30. <view class="content">
  31. <image src="@/static/me/job/wd_icon_xingyuan(1).png"></image>
  32. <view class="tit one-omit">红玫瑰x3</view>
  33. </view>
  34. </view>
  35. <view class="item-box item-box3 item-box-two" :class="signInfo.signDay >= 3 ? 'active' : ''">
  36. <view class="days">
  37. 3天
  38. </view>
  39. <view class="content">
  40. <image src="@/static/me/job/wd_icon_xingyuan.png"></image>
  41. <view class="tit one-omit">海浪操作作秀</view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="horizontal-box">
  46. <view class="item-box item-box4 item-box-two" :class="signInfo.signDay >= 6 ? 'active' : ''">
  47. <view class="days">
  48. 6天
  49. </view>
  50. <view class="content">
  51. <image src="@/static/me/job/wd_icon_xingyuan(4).png"></image>
  52. <view class="tit one-omit">樱花x3</view>
  53. </view>
  54. </view>
  55. <view class="item-box item-box5 item-box-one" :class="signInfo.signDay >= 5 ? 'active' : ''">
  56. <view class="days">
  57. 5天
  58. </view>
  59. <view class="content">
  60. <image src="@/static/me/job/wd_icon_xingyuan(5).png"></image>
  61. <view class="tit one-omit">海浪头像框</view>
  62. </view>
  63. </view>
  64. <view class="item-box item-box6 item-box-one" :class="signInfo.signDay >= 4 ? 'active' : ''">
  65. <view class="days">
  66. 4天
  67. </view>
  68. <view class="content">
  69. <image src="@/static/me/job/wd_icon_xingyuan(1).png"></image>
  70. <view class="tit one-omit">红玫瑰x3</view>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="item-box item-box7" :class="signInfo.signDay >= 7 ? 'active' : ''">
  75. <view class="days">
  76. 7天
  77. </view>
  78. <view class="itemBox7Content">
  79. <view class="content">
  80. <image src="@/static/me/job/wd_icon_xingyuan(1).png"></image>
  81. <view class="tit one-omit">红玫瑰x3</view>
  82. </view>
  83. <view class="content">
  84. <image src="@/static/me/job/wd_icon_xingyuan(4).png"></image>
  85. <view class="tit one-omit">红玫瑰x3</view>
  86. </view>
  87. <view class="content">
  88. <image src="@/static/me/job/wd_icon_xingyuan.png"></image>
  89. <view class="tit one-omit">红玫瑰x3</view>
  90. </view>
  91. <view class="content">
  92. <image src="@/static/me/job/wd_icon_xingyuan(1).png"></image>
  93. <view class="tit one-omit">红玫瑰x3</view>
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. <view v-if="signInfo.isSigned " class="receiveBtn" @click="confirmSign()">
  99. 今日已签到
  100. </view>
  101. <view v-else-if="!signInfo.isSigned " class="receiveBtn" @click="confirmSign()">
  102. 签到领取奖励
  103. </view>
  104. </view>
  105. </view>
  106. </uv-popup>
  107. </template>
  108. <script>
  109. import uvPopup from '@/uni_modules/uv-popup/components/uv-popup/uv-popup.vue'
  110. export default {
  111. name: 'checkInPopUpWindow',
  112. components: {
  113. uvPopup
  114. },
  115. data(){
  116. return {
  117. falg:this.signNotify
  118. }
  119. },
  120. props: {
  121. signInfo: { // 签到信息
  122. type: Object,
  123. default: () => {}
  124. },
  125. checkInDays: { // 已签到天数
  126. type: Number || String,
  127. default: 1
  128. },
  129. signNotify: { // 签到提醒
  130. type: Boolean,
  131. default: true
  132. }
  133. },
  134. methods: {
  135. open() {
  136. this.$refs.popup.open();
  137. },
  138. close() {
  139. this.$refs.popup.close();
  140. },
  141. toggleSignNotify(e) {
  142. this.$emit('toggleSignNotify', e);
  143. },
  144. confirmSign(){
  145. this.$emit("confirmSign")
  146. }
  147. }
  148. }
  149. </script>
  150. <style scoped lang="scss">
  151. /* 添加样式 */
  152. .bottomCompatibility {
  153. height: --window-bottom;
  154. position: relative;
  155. left: 0;
  156. top: 0;
  157. }
  158. .content-box {
  159. min-height: 982rpx;
  160. 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%);
  161. box-sizing: border-box;
  162. padding: 30rpx;
  163. padding-top: 136rpx;
  164. .close {
  165. position: absolute;
  166. top: 6rpx;
  167. right: 30rpx;
  168. width: 54rpx;
  169. height: 54rpx;
  170. }
  171. .left-title {
  172. width: 360rpx;
  173. height: 142rpx;
  174. padding-bottom: 32rpx;
  175. image {
  176. width: 376rpx;
  177. height: 58rpx;
  178. }
  179. .checkInDays {
  180. display: flex;
  181. align-items: center;
  182. justify-content: space-between;
  183. margin-top: 20rpx;
  184. font-size: 28rpx;
  185. color: #333333;
  186. >view {
  187. display: flex;
  188. align-items: center;
  189. font-weight: 400;
  190. font-size: 28rpx;
  191. color: #8F9C78;
  192. font-family: PingFang SC-Medium;
  193. .line {
  194. width: 2rpx;
  195. height: 30rpx;
  196. background: #D9D9D9;
  197. display: inline-block;
  198. margin: 0 12rpx;
  199. }
  200. }
  201. }
  202. }
  203. .checkInContent {
  204. width: 100%;
  205. height: 560rpx;
  206. .horizontal-box {
  207. width: 100%;
  208. height: 192rpx;
  209. display: flex;
  210. align-items: start;
  211. justify-content: space-between;
  212. }
  213. .item-box {
  214. display: inline-block;
  215. background: #000;
  216. position: relative;
  217. left: 0;
  218. top: 0;
  219. padding-top: 30rpx;
  220. padding-bottom: 12rpx;
  221. box-sizing: border-box;
  222. .days {
  223. font-weight: 700;
  224. font-size: 18px;
  225. color: #8CD914;
  226. font-family: 'Alimama ShuHeiTi-Bold';
  227. position: absolute;
  228. top: 8rpx;
  229. left: 18rpx;
  230. }
  231. .content {
  232. width: 100%;
  233. height: 100%;
  234. display: flex;
  235. align-items: center;
  236. justify-content: center;
  237. flex-direction: column;
  238. image {
  239. width: 76rpx;
  240. height: 76rpx;
  241. }
  242. .tit {
  243. max-width: 140rpx;
  244. display: inline-block;
  245. font-family: 'PingFang SC-Medium';
  246. font-weight: 400;
  247. font-size: 28rpx;
  248. color: #2A3518;
  249. margin-top: 12rpx;
  250. text-align: center;
  251. }
  252. }
  253. .itemBox7Content {
  254. display: flex;
  255. align-items: center;
  256. }
  257. &.active {
  258. .days {
  259. color: #fff;
  260. }
  261. .content {
  262. .tit {
  263. color: #fff;
  264. }
  265. }
  266. }
  267. }
  268. .item-box-one {
  269. width: 226rpx;
  270. height: 172rpx;
  271. }
  272. .item-box-two {
  273. width: 212rpx;
  274. height: 188rpx;
  275. }
  276. .item-box1 {
  277. background: url('@/static/me/job/rw_bg_jiangli01_moren.png') center / 100% no-repeat;
  278. &.active {
  279. background: url('@/static/me/job/rw_bg_jiangli01_dianji.png') center / 100% no-repeat;
  280. transform: scale(1.07);
  281. }
  282. }
  283. .item-box2 {
  284. background: url('@/static/me/job/rw_bg_jiangli02_moren.png') center / 100% no-repeat;
  285. &.active {
  286. background: url('@/static/me/job/rw_bg_jiangli02_dianji.png') center / 100% no-repeat;
  287. transform: scale(1.07);
  288. }
  289. }
  290. .item-box3 {
  291. background: url('@/static/me/job/rw_bg_jiangli03_moren.png') center / 100% no-repeat;
  292. &.active {
  293. background: url('@/static/me/job/rw_bg_jiangli03_dianji.png') center / 100% no-repeat;
  294. transform: scale(1.07);
  295. }
  296. }
  297. .item-box4 {
  298. background: url('@/static/me/job/rw_bg_jiangli04_moren.png') center / 100% no-repeat;
  299. &.active {
  300. background: url('@/static/me/job/rw_bg_jiangli04_dianji.png') center / 100% no-repeat;
  301. transform: scale(1.07);
  302. }
  303. }
  304. .item-box5 {
  305. background: url('@/static/me/job/rw_bg_jiangli05_moren.png') center / 100% no-repeat;
  306. &.active {
  307. background: url('@/static/me/job/rw_bg_jiangli05_dianji.png') center / 100% no-repeat;
  308. transform: scale(1.07);
  309. }
  310. }
  311. .item-box6 {
  312. background: url('@/static/me/job/rw_bg_jiangli06_moren.png') center / 100% no-repeat;
  313. &.active {
  314. background: url('@/static/me/job/rw_bg_jiangli06_dianji.png') center / 100% no-repeat;
  315. transform: scale(1.07);
  316. }
  317. }
  318. .item-box7 {
  319. width: 100%;
  320. height: 172rpx;
  321. background: url('@/static/me/job/rw_bg_jiangli07_moren.png') center / 100% no-repeat;
  322. display: flex;
  323. align-items: center;
  324. justify-content: center;
  325. .itemBox7Content {
  326. display: flex;
  327. align-items: center;
  328. justify-content: space-between;
  329. width: 540rpx;
  330. }
  331. .tit {
  332. color: #4F3712;
  333. font-size: 28rpx;
  334. width: 130rpx;
  335. }
  336. &.active {
  337. background: url('@/static/me/job/rw_bg_jiangli07_dianji.png') center / 100% no-repeat;
  338. transform: scale(1.01);
  339. .tit {
  340. color: #fff;
  341. }
  342. }
  343. }
  344. }
  345. .receiveBtn {
  346. background: #ACF934;
  347. border-radius: 126rpx;
  348. padding: 18rpx 0;
  349. display: flex;
  350. align-items: center;
  351. justify-content: center;
  352. width: 100%;
  353. margin-top: 30rpx;
  354. }
  355. .sign-switch {
  356. transform: scale(0.6);
  357. }
  358. }
  359. </style>