secondReward.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <template>
  2. <layout
  3. bgImgName="second-reward-img"
  4. bgColor="#f64d5d"
  5. bgHeight="188"
  6. @goBack="goBack"
  7. >
  8. <div class="second-reward">
  9. <div class="second-reward-title">
  10. 请搜索您希望在云机内运行的应用为您安装至云机
  11. </div>
  12. <div v-if="!isSelectBool">
  13. <div class="application">
  14. <div
  15. v-for="item in applicationList"
  16. :key="item"
  17. @click="toDetails(item)"
  18. >
  19. {{ item }}
  20. </div>
  21. </div>
  22. </div>
  23. <div v-else class="details">
  24. <img
  25. :src="`${IMG_URL}/installApps_${+this.imgName + 1}.png`"
  26. alt=""
  27. class="details-img"
  28. />
  29. <img
  30. src="@/assets/image/claimCloudPhone/claim-mobile-phone-btn.png"
  31. class="details-btn"
  32. @click="toPurchase"
  33. />
  34. </div>
  35. </div>
  36. </layout>
  37. </template>
  38. <script>
  39. import layout from './components/layout';
  40. export default {
  41. auth: false,
  42. name: 'secondReward',
  43. head: {
  44. title: '0元购机,尽情享受',
  45. },
  46. data() {
  47. return {
  48. applicationList: [
  49. '飞书',
  50. '钉钉',
  51. '企业微信',
  52. '梦幻西游',
  53. '闲鱼之王',
  54. '寻道大千',
  55. '部落冲突',
  56. '传奇',
  57. '倩女幽魂',
  58. ], // 应用数组
  59. adaptedModels: [1], // 适配机型
  60. isSelectBool: false,
  61. imgName: '',
  62. IMG_URL: process.env.IMG_URL,
  63. };
  64. },
  65. components: { layout },
  66. methods: {
  67. toDetails(applicationName) {
  68. // 埋点
  69. this.$axios
  70. .$post('public/v5/User/selects/addApplication', { applicationName })
  71. .then((res) => {});
  72. this.imgName = this.applicationList.indexOf(applicationName);
  73. console.log(this.imgName);
  74. this.isSelectBool = true;
  75. },
  76. goBack() {
  77. if (this.isSelectBool) return (this.isSelectBool = false);
  78. this.$router.go(-1);
  79. },
  80. toPurchase() {
  81. localStorage.removeItem('activityPurchaseVisible');
  82. this.$router.push('/claimCloudPhone/purchase');
  83. },
  84. },
  85. };
  86. </script>
  87. <style lang="less" scoped>
  88. .second-reward {
  89. height: 100%;
  90. box-sizing: border-box;
  91. padding-top: 188px;
  92. .second-reward-title {
  93. font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  94. font-weight: bold;
  95. font-size: 15px;
  96. color: #fefefe;
  97. line-height: 18px;
  98. text-align: center;
  99. font-style: normal;
  100. }
  101. .application {
  102. padding: 0 16px;
  103. margin-top: 24px;
  104. display: grid;
  105. grid-gap: 16px;
  106. grid-template-columns: repeat(3, 1fr);
  107. & > div {
  108. font-family: PingFangSC, PingFang SC;
  109. font-weight: 400;
  110. font-size: 14px;
  111. color: #742428;
  112. line-height: 20px;
  113. text-align: center;
  114. font-style: normal;
  115. background: #fff1e1;
  116. border-radius: 14px;
  117. padding: 11px 0;
  118. }
  119. }
  120. .details {
  121. margin-top: 24px;
  122. display: flex;
  123. flex-direction: column;
  124. align-items: center;
  125. .details-img {
  126. height: 130px;
  127. width: 100%;
  128. }
  129. .details-btn {
  130. margin-top: 32px;
  131. height: 56px;
  132. }
  133. }
  134. }
  135. // height: 100%;
  136. // box-sizing: border-box;
  137. // background: #f64d5d;
  138. // .second-reward-container {
  139. // padding: 12.2666666667vw 0 16px;
  140. // height: 100%;
  141. // box-sizing: border-box;
  142. // background: url('~/assets/image/claimCloudPhone/second-reward-img.png')
  143. // no-repeat;
  144. // background-size: 100% 210px;
  145. // background-position: 0px 12.2666666667vw;
  146. // & > div {
  147. // padding-top: 224px;
  148. // .second-reward-container_title {
  149. // font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  150. // font-weight: bold;
  151. // font-size: 16px;
  152. // color: #fefefe;
  153. // line-height: 18px;
  154. // text-align: center;
  155. // font-style: normal;
  156. // }
  157. // .second-reward-container_main {
  158. // padding: 0 16px;
  159. // .application {
  160. // margin-top: 24px;
  161. // display: grid;
  162. // grid-gap: 16px;
  163. // grid-template-columns: repeat(3, 1fr);
  164. // & > div {
  165. // font-family: PingFangSC, PingFang SC;
  166. // font-weight: 400;
  167. // font-size: 14px;
  168. // color: #742428;
  169. // line-height: 20px;
  170. // text-align: center;
  171. // font-style: normal;
  172. // background: #fff1e1;
  173. // border-radius: 14px;
  174. // padding: 11px 0;
  175. // }
  176. // }
  177. // .adapted-models {
  178. // margin-top: 16px;
  179. // font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
  180. // font-size: 14px;
  181. // color: #891c04;
  182. // & > div {
  183. // height: 64px;
  184. // padding: 16px;
  185. // box-sizing: border-box;
  186. // &:first-of-type {
  187. // background: #fff1e1;
  188. // border-radius: 12px 12px 0 0;
  189. // font-weight: bold;
  190. // line-height: 32px;
  191. // display: flex;
  192. // align-items: center;
  193. // & > img {
  194. // height: 32px;
  195. // width: 32px;
  196. // margin-right: 8px;
  197. // }
  198. // }
  199. // &:last-of-type {
  200. // background: #fedec0;
  201. // border-radius: 0 0 12px 12px;
  202. // font-weight: 400;
  203. // font-size: 14px;
  204. // font-style: normal;
  205. // line-height: 15px;
  206. // }
  207. // }
  208. // }
  209. // &>img{
  210. // height: 56px;
  211. // width: 281px;
  212. // display: block;
  213. // margin: 0 auto;
  214. // margin-top: 32px;
  215. // }
  216. // }
  217. // }
  218. // }
  219. // }
  220. // ::v-deep .van-nav-bar__arrow {
  221. // color: #000000;
  222. // font-size: 24px;
  223. // }
  224. // ::v-deep .van-nav-bar__title {
  225. // font-weight: bold !important;
  226. // font-size: 17px !important;
  227. // color: #0a132b !important;
  228. // line-height: 24px !important;
  229. // }
  230. </style>