finance.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. <template>
  2. <s-layout title="Cash back" :bgStyle="{ color: '#fff' }">
  3. <fill-form :id="id" :days="days" :platform="platform" :task_step="task_step" @submit="onSubmit()" v-if="state===1"></fill-form>
  4. <view class="main" v-if="state===0">
  5. <!-- <h3>Cash back</h3> -->
  6. <view class="top">
  7. <image mode="widthFix" src="/static/fin_top.png"></image>
  8. </view>
  9. <view class="middle">
  10. <!-- <view class="notice">
  11. <view class="notice-content">
  12. <image src="/static/8.png"></image>
  13. <text>The user successfully obtained <text>888</text> cashback</text>
  14. </view>
  15. </view> -->
  16. <view class="product">
  17. <view class="product-item" v-for="(item,idx) in products" @tap="goDays(item)">
  18. <view class="product-item-bg">
  19. </view>
  20. <view class="item-one">
  21. <view class="left">
  22. <p>
  23. <strong>{{item.day}}</strong>
  24. <text>Days</text>
  25. </p>
  26. <p>
  27. <span>{{item.requirement}}</span>
  28. </p>
  29. </view>
  30. <view class="right">
  31. <image :src="'http://8.217.120.52:882'+item.platform_image"></image>
  32. </view>
  33. </view>
  34. <view class="item-two">
  35. <text>{{item.platform}}</text>
  36. </view>
  37. </view>
  38. </view>
  39. <!-- <view class="tips">
  40. <view class="tips-content">
  41. <image src="/static/8.png"></image>
  42. <text>Special statement: Here is the content</text>
  43. </view>
  44. </view> -->
  45. </view>
  46. <!-- <view class="mask" v-if="maskVisible"></view>
  47. <view class="popDialog" v-if="popDialogVisible">
  48. <image @tap="popDialogVisible=false;maskVisible=false" class="close" src="/static/10.png"></image>
  49. <view class="title">
  50. <text>Successfully</text>
  51. </view>
  52. <view class="img">
  53. <image src="/static/6.png"></image>
  54. </view>
  55. <view class="progress">
  56. <image src="/static/9.png"></image>
  57. </view>
  58. <view class="tips">
  59. <view class="tips-content">
  60. <image src="/static/8.png"></image>
  61. <text>Special statement: Here is the content</text>
  62. </view>
  63. </view>
  64. </view> -->
  65. <view class="index-icon-list">
  66. <view class="index-icon-btn">
  67. <view class="icon" @click="goCashBackList()">
  68. <image src="/static/6.png" class="index-icon"></image>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </s-layout>
  74. </template>
  75. <script>
  76. export default {
  77. data() {
  78. return {
  79. popDialogVisible: false,
  80. maskVisible: false,
  81. showForm: false,
  82. state: 0,
  83. id: 0,
  84. days: 0,
  85. platform: '',
  86. products: [30, 15, 7, 5]
  87. }
  88. },
  89. onShow() {
  90. this.state = 0;
  91. this.getTaskList();
  92. },
  93. methods: {
  94. goDays(item) {
  95. this.id = item.id;
  96. this.days = item.day;
  97. this.task_step = item.task_step;
  98. this.platform = item.platform;
  99. this.state = 1;
  100. },
  101. onSubmit() {
  102. this.state = 0;
  103. sheep.$router.go('/pages/index/cash-back-list');
  104. },
  105. async getTaskList(){
  106. const res = await sheep.$api.task.list({});
  107. console.log(res)
  108. if(res.code == 1){
  109. this.products = res.data;
  110. }else{
  111. this.products = [];
  112. }
  113. },
  114. getImgUrl(n) {
  115. return `../../static/${n+2}.png`
  116. }
  117. }
  118. }
  119. </script>
  120. <script setup>
  121. import sheep from '@/sheep';
  122. import fillForm from './components/fill-form.vue'
  123. import {
  124. computed,
  125. reactive,
  126. unref
  127. } from 'vue';
  128. const goCashBackList = () => {
  129. sheep.$router.go('/pages/index/cash-back-list');
  130. };
  131. </script>
  132. <style lang="scss" scoped>
  133. uni-page-body {
  134. background: #fff;
  135. }
  136. h3 {
  137. color: rgb(51, 51, 51);
  138. font-size: 1.125rem;
  139. font-weight: normal;
  140. line-height: 22px;
  141. margin: 20px 0;
  142. text-align: center;
  143. }
  144. .top {}
  145. .top image {
  146. width: 100%;
  147. }
  148. .middle {
  149. width: 90%;
  150. margin: 15px auto;
  151. }
  152. .notice {
  153. background: #FDEAC9;
  154. border-radius: 5px;
  155. padding: 7px 15px;
  156. }
  157. .notice .notice-content {
  158. width: 100%;
  159. }
  160. .notice image {
  161. width: 14px;
  162. height: 14px;
  163. vertical-align: middle;
  164. padding-right: 6px;
  165. }
  166. .notice text {
  167. color: #8C7E75;
  168. font-size: 12px;
  169. }
  170. .product {
  171. width: 100%;
  172. margin-top: 20px;
  173. }
  174. .product-item-bg {
  175. background: url('../../static/activity-left.png');
  176. background-repeat: no-repeat;
  177. background-position-y: bottom;
  178. background-size: 50% 50%;
  179. position: absolute;
  180. top: 0;
  181. left: 0;
  182. width: 100%;
  183. height: 100%;
  184. z-index: -1;
  185. border-radius: 8px;
  186. }
  187. .product .product-item {
  188. position: relative;
  189. background-color: #feeaca;
  190. ;
  191. width: 45%;
  192. margin-bottom: 15px;
  193. border-radius: 8px;
  194. padding: 20px 2% 12px;
  195. display: inline-block;
  196. z-index: 4;
  197. }
  198. .product .product-item:nth-child(2n+1) {
  199. margin-right: 2%;
  200. }
  201. .product .product-item .item-one {
  202. width: 100%;
  203. overflow: hidden;
  204. }
  205. .product .product-item .item-one .left {
  206. float: left;
  207. text-align: right;
  208. width: 52%;
  209. }
  210. .product .product-item .item-one .left p {
  211. width: 100%;
  212. }
  213. .product .product-item .item-one .left strong {
  214. color: #FAA435;
  215. font-size: 24px;
  216. padding-right: 5px;
  217. }
  218. .product .product-item .item-one .left text {
  219. color: #333333;
  220. font-size: 14px;
  221. font-weight: bold;
  222. }
  223. .product .product-item .item-one .left span {
  224. font-size: 12px;
  225. color: #333;
  226. }
  227. .product .product-item .item-one .right {
  228. float: right;
  229. }
  230. .product .product-item .item-one .right image {
  231. width: 66px;
  232. height: 66px;
  233. }
  234. .product .product-item .item-two {
  235. margin-left: 5%;
  236. text-align: left;
  237. }
  238. .product .product-item .item-two text {
  239. color: #8C7E75;
  240. font-size: 12px;
  241. }
  242. .index-icon-list {
  243. position: fixed;
  244. bottom: 10vh;
  245. right: 10px;
  246. z-index: 9;
  247. }
  248. .index-icon-list .index-icon-btn {
  249. width: 45px;
  250. height: 45px;
  251. border-radius: 50%;
  252. background: #fff;
  253. box-shadow: 0 3px 7px 0 rgba(157, 96, 130, .5);
  254. margin-bottom: 19px;
  255. display: flex;
  256. justify-content: center;
  257. align-items: center;
  258. }
  259. .index-icon-list image {
  260. width: 36px;
  261. height: 36px;
  262. }
  263. .tips {
  264. background: #FDEAC9;
  265. border-radius: 40px;
  266. padding: 7px 15px;
  267. margin-top: 10px;
  268. }
  269. .tips .tips-content {
  270. width: 100%;
  271. }
  272. .tips image {
  273. width: 14px;
  274. height: 14px;
  275. vertical-align: middle;
  276. padding-right: 6px;
  277. }
  278. .tips text {
  279. color: #8C7E75;
  280. font-size: 12px;
  281. }
  282. .mask {
  283. width: 100%;
  284. height: 100%;
  285. position: fixed;
  286. background: rgba(0, 0, 0, 0.7);
  287. left: 0;
  288. top: 0;
  289. z-index: 99;
  290. }
  291. .popDialog {
  292. width: 90%;
  293. z-index: 100;
  294. margin: 0 auto;
  295. top: 25%;
  296. position: absolute;
  297. left: 5%;
  298. background: #fff;
  299. border-radius: 15px;
  300. padding-bottom: 20px;
  301. }
  302. .popDialog .close {
  303. width: 30px;
  304. position: fixed;
  305. right: 8%;
  306. height: 30px;
  307. margin-top: 4%;
  308. }
  309. .popDialog .title {
  310. width: 100%;
  311. text-align: center;
  312. margin: 6% 0 10px;
  313. }
  314. .popDialog .title text {
  315. font-size: 14px;
  316. color: #333;
  317. }
  318. .popDialog .img {
  319. width: 100%;
  320. text-align: center;
  321. }
  322. .popDialog .img image {
  323. width: 58px;
  324. height: 58px;
  325. }
  326. .popDialog .progress {
  327. width: 100%;
  328. }
  329. .popDialog .progress image {
  330. width: 88%;
  331. height: 60px;
  332. margin-left: 6%;
  333. }
  334. .popDialog .tips {
  335. background: #FDEAC9;
  336. border-radius: 40px;
  337. padding: 7px 5%;
  338. margin-top: 18px;
  339. width: 78%;
  340. margin-left: 6%;
  341. }
  342. </style>