confirmation.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <template>
  2. <div class="confirmation">
  3. <div class="confirmation-bg">
  4. <div class="confirmation-tips">
  5. <template v-if="status === 1">
  6. <van-icon name="passed" />下单成功
  7. </template>
  8. <template v-else> <van-icon name="close" /> 下单失败 </template>
  9. </div>
  10. <div class="confirmation-obtain" v-if="status === 1">
  11. 3大权益已开通&nbsp;&nbsp;云机已到账
  12. </div>
  13. </div>
  14. <div class="confirmation-container">
  15. <div class="jump">
  16. <div @click="download">打开APP,使用完整功能</div>
  17. <div @click="toH5">暂不下载,使用网页版</div>
  18. </div>
  19. <div class="confirmation-guide">
  20. <div class="confirmation-guide-title">
  21. 您可在云应用/浏览器直接下载安装应用
  22. </div>
  23. <img
  24. src="@/assets/image/claimCloudPhone/confirmation-guide.png"
  25. alt=""
  26. />
  27. <div class="confirmation-guide-step">
  28. <div>
  29. <div>1</div>
  30. 进入云手机
  31. </div>
  32. <div>
  33. <div>2</div>
  34. 点开云应用,浏览/搜索内容
  35. </div>
  36. <div>
  37. <div>3</div>
  38. 下载,打开游戏
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. </template>
  45. <script>
  46. export default {
  47. auth: false,
  48. name: 'confirmation',
  49. head: {
  50. title: '0元购机,尽情享受',
  51. },
  52. components: {},
  53. data() {
  54. return {
  55. status: '',
  56. bargainingStatusInfo: {},
  57. };
  58. },
  59. mounted() {
  60. this.getPayStatus();
  61. this.bargainingStatusInfo = JSON.parse(
  62. localStorage.getItem('bargainingStatusInfo'),
  63. );
  64. console.log(this.bargainingStatusInfo.downloadAndroidUrl);
  65. },
  66. methods: {
  67. getPayStatus() {
  68. console.log(456789);
  69. this.$axios
  70. .$get('pay/v1/alipay/h5/spend/getPayStatus', {
  71. params: {
  72. myOrderNum: localStorage.getItem('myOrderNum'),
  73. },
  74. })
  75. .then((res) => {
  76. if (res.success) {
  77. this.status = res.data;
  78. }
  79. });
  80. },
  81. download() {
  82. location.href = this.$userAgent.isAndroid
  83. ? this.bargainingStatusInfo.downloadAndroidUrl
  84. : 'https://www.androidscloud.com';
  85. },
  86. toH5(){
  87. location.href = 'http://gntest.phone.androidscloud.com:1280/cloud/phone/web/#/'
  88. }
  89. },
  90. };
  91. </script>
  92. <style lang="less" scoped>
  93. .confirmation {
  94. height: 100%;
  95. background: #f4f6f8;
  96. .confirmation-bg {
  97. height: 215px;
  98. background: #1676fe;
  99. padding-top: 38px;
  100. border-radius: 0px 0px 46px 46px;
  101. .confirmation-tips {
  102. font-family: PingFangSC, PingFang SC;
  103. font-weight: 400;
  104. font-size: 22px;
  105. color: #ffffff;
  106. line-height: 30px;
  107. text-align: center;
  108. font-style: normal;
  109. .van-icon-passed {
  110. margin-right: 5px;
  111. }
  112. }
  113. .confirmation-obtain {
  114. font-family: PingFangSC, PingFang SC;
  115. font-weight: 400;
  116. font-size: 14px;
  117. color: #9ccffb;
  118. text-align: center;
  119. font-style: normal;
  120. margin-top: 12px;
  121. }
  122. }
  123. .confirmation-container {
  124. padding: 0 26px;
  125. .jump {
  126. height: 146px;
  127. padding: 0 45px;
  128. box-sizing: border-box;
  129. background: #ffffff;
  130. border-radius: 8px;
  131. margin-top: -100px;
  132. margin-bottom: 16px;
  133. overflow: hidden;
  134. & > div:first-of-type {
  135. margin-top: 41px;
  136. height: 46px;
  137. line-height: 46px;
  138. background: #3974f2;
  139. border-radius: 23px;
  140. font-family: PingFangSC, PingFang SC;
  141. font-weight: 600;
  142. font-size: 14px;
  143. color: #ffffff;
  144. text-align: center;
  145. font-style: normal;
  146. }
  147. & > div:last-of-type {
  148. margin-top: 12px;
  149. font-family: PingFangSC, PingFang SC;
  150. font-weight: 400;
  151. font-size: 12px;
  152. color: #bbbbbb;
  153. line-height: 17px;
  154. text-align: center;
  155. font-style: normal;
  156. }
  157. }
  158. .confirmation-guide {
  159. background: #ffffff;
  160. border-radius: 8px;
  161. padding: 16px 10px;
  162. .confirmation-guide-title {
  163. font-family: PingFangSC, PingFang SC;
  164. font-weight: bold;
  165. font-size: 16px;
  166. color: #0a132b;
  167. text-align: center;
  168. font-style: normal;
  169. }
  170. & > img {
  171. width: 100%;
  172. height: 156px;
  173. margin: 22px 0;
  174. }
  175. .confirmation-guide-step {
  176. font-family: PingFangSC, PingFang SC;
  177. font-weight: 400;
  178. font-size: 14px;
  179. color: #333333;
  180. line-height: 18px;
  181. text-align: left;
  182. font-style: normal;
  183. & > div {
  184. display: flex;
  185. align-items: center;
  186. }
  187. div > div {
  188. display: inline-block;
  189. width: 16px;
  190. height: 16px;
  191. border-radius: 50%;
  192. line-height: 20px;
  193. color: #fff;
  194. background: #3b7fff;
  195. display: flex;
  196. justify-content: center;
  197. align-items: center;
  198. margin-right: 8px;
  199. }
  200. }
  201. }
  202. }
  203. }
  204. </style>