index.ux 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <!-- src/components/tools-mall/index.ux -->
  2. <template>
  3. <div class="content">
  4. <div class="box text-white">
  5. <text class="text-24 text-white" style="font-size: 24px;">金币明细</text>
  6. <div class="mgy-20" style="align-items: center;">
  7. <text class="text-48 text-white" style="margin-right: 5px;font-size: 48px;">{{ coinNum }}</text>
  8. <text class="text-white" style="font-size: 24px;margin-left: 10px;" @click="navTo('pages/commonModule/coinRecord')">金币 ></text>
  9. </div>
  10. <text class="text-24 text-white" style="font-size: 24px;">活动奖品数量有限,先到先得,兑完即止</text>
  11. </div>
  12. <div class="box2">
  13. <div class="top_box">
  14. <text class="text-36" style="color: #333;">新人签到 必得金币</text>
  15. <text class="text-24" style="color: #ffcdaf;margin-top: 10px;">活动盛启,福利满满</text>
  16. </div>
  17. <div class="bottom_box">
  18. <div class="bottom_item" style="border-bottom: 1px solid #ddd;">
  19. <div class="fd_c">
  20. <text class="text-32 text-000">签到</text>
  21. <text class="text-24 text-999">连续签到奖励更高!</text>
  22. </div>
  23. <div class="{{ signStatus?'disBtn':'btn' }}" @click="signIn">
  24. <text>{{ signStatus ? '已签到' : '签到'}}</text>
  25. </div>
  26. </div>
  27. <div class="bottom_item" style="border-bottom: 1px solid #ddd;">
  28. <div class="fd_c">
  29. <text class="text-32 text-000">天天惊喜,红包多多</text>
  30. <text class="text-24 text-999">金币兑换海量福利等你来拿</text>
  31. </div>
  32. <div class="{{ getStatus?'disBtn':'btn' }}" @click="getCoin">
  33. <text>{{getStatus?'已领取':'立即领取'}}</text>
  34. </div>
  35. </div>
  36. <div class="bottom_item" style="border-bottom: 1px solid #ddd;">
  37. <div class="fd_c">
  38. <text class="text-32 text-000">易推小说</text>
  39. <text class="text-24 text-999">点击右边按钮体验</text>
  40. </div>
  41. <div class="btn" @click="backIndex()">
  42. <text>返回首页</text>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </template>
  49. <script>
  50. import router from '@system.router'
  51. export default {
  52. private: {
  53. coinNum:0,//金币数量
  54. signStatus:false, // 是否已经签到
  55. getStatus:false,// 是否已领取
  56. },
  57. onInit() {},
  58. backIndex() {
  59. router.replace({
  60. uri: 'pages/main',
  61. params: {
  62. testId: '1'
  63. }
  64. })
  65. },
  66. navTo(uri){
  67. router.push({
  68. uri,
  69. })
  70. },
  71. getCoin(){
  72. if(!this.getStatus){
  73. $utils.showToast('领取成功')
  74. this.coinNum += 10
  75. this.getStatus = true
  76. }else{
  77. $utils.showToast('已领取')
  78. }
  79. },
  80. signIn(){
  81. if(!this.signStatus){
  82. $utils.showToast('签到成功')
  83. this.coinNum += 10
  84. this.signStatus = true
  85. }else{
  86. $utils.showToast('已签到')
  87. }
  88. },
  89. }
  90. </script>
  91. <style lang="less">
  92. .content {
  93. padding: 28px;
  94. flex-direction: column;
  95. background: linear-gradient(to bottom, #ff8843, #ffffff);
  96. }
  97. .box {
  98. width: 100%;
  99. height: 220px;
  100. padding: 28px;
  101. background: linear-gradient(90deg, #ff7a3d, #ff582e);
  102. border-radius: 30px;
  103. flex-direction: column;
  104. }
  105. .text-white{
  106. color: #fff;
  107. }
  108. .mgy-20{
  109. margin: 20px 0;
  110. }
  111. .box2 {
  112. flex-direction: column;
  113. margin-top: 50px;
  114. border-radius: 30px;
  115. .top_box {
  116. height: 180px;
  117. background: linear-gradient(90deg, #ff843c, #ff6e6e);
  118. border-radius: 30px;
  119. flex-direction: column;
  120. padding: 30px;
  121. }
  122. .text-36{
  123. font-size: 36px;
  124. }
  125. .text-32{
  126. font-size: 32px;
  127. }
  128. .text-24{
  129. font-size: 24px;
  130. }
  131. .fd_c{
  132. flex-direction: column;
  133. }
  134. .text-000{
  135. color: #000;
  136. }
  137. .text-white{
  138. color: #fff;
  139. }
  140. .bottom_box {
  141. margin-top: -30px;
  142. border-radius: 30px;
  143. background-color: #ffffff;
  144. height: 600px;
  145. flex-direction: column;
  146. .bottom_item{
  147. justify-content: space-between;
  148. align-items: center;
  149. padding: 20px;
  150. }
  151. .disBtn{
  152. text{
  153. color: #999;
  154. font-size: 22px;
  155. }
  156. background-color: #ccc;
  157. height: 60px;
  158. line-height: 60px;
  159. width: 150px;
  160. justify-content: center;
  161. border-radius: 30px;
  162. }
  163. .btn {
  164. text{
  165. color: #ffffff;
  166. font-size: 22px;
  167. }
  168. background-color: #ff843c;
  169. height: 60px;
  170. line-height: 60px;
  171. width: 150px;
  172. justify-content: center;
  173. border-radius: 30px;
  174. }
  175. }
  176. }
  177. </style>