index.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <template>
  2. <div>
  3. <div class="index_box flex flex-c">
  4. <div class="pay_btn" @click="jumUrl()">跳转繁星回收小程序</div>
  5. </div>
  6. </div>
  7. </template>
  8. <script>
  9. import { generateScheme } from "@/api";
  10. export default {
  11. data() {
  12. return {
  13. form: {
  14. userName: "",
  15. amount: "",
  16. },
  17. SchemeUrl: "",
  18. };
  19. },
  20. created() {
  21. console.log(this.$route.query);
  22. if (this.$route.query) {
  23. this.form.amount = this.$route.query.amount;
  24. this.form.userName = this.$route.query.userName;
  25. }
  26. this.generateScheme();
  27. },
  28. methods: {
  29. generateScheme() {
  30. // 要打开的小程序版本。正式版为"release",体验版为"trial",开发版为"develop",仅在微信外打开时生效
  31. let form = {
  32. jump_wxa: {
  33. path: "/pages/index/index",
  34. query: "",
  35. env_version: "release",
  36. },
  37. is_expire: true,
  38. expire_type: 1,
  39. expire_interval: 1,
  40. };
  41. generateScheme(form)
  42. .then((res) => {
  43. console.log(res, "成功信息");
  44. this.SchemeUrl=res.data.openlink;
  45. })
  46. .catch((err) => {
  47. console.log(err, "错误信息");
  48. });
  49. },
  50. // 跳转微信小程序
  51. jumUrl() {
  52. location.href = this.SchemeUrl;
  53. },
  54. },
  55. };
  56. </script>
  57. <style>
  58. .index_box {
  59. width: 100vw;
  60. height: 100vh;
  61. box-sizing: border-box;
  62. padding: 0 20px;
  63. }
  64. .flex {
  65. display: flex;
  66. align-items: center;
  67. }
  68. .flex-aa {
  69. display: flex;
  70. align-items: flex-start;
  71. }
  72. .flex1 {
  73. flex: 1;
  74. }
  75. .flex-jb {
  76. display: flex;
  77. justify-content: space-between;
  78. }
  79. .flex-c {
  80. display: flex;
  81. flex-direction: column;
  82. }
  83. .flex-jc {
  84. display: flex;
  85. justify-content: center;
  86. }
  87. .flex-w {
  88. flex-wrap: wrap;
  89. }
  90. .pay_img {
  91. width: 65px;
  92. height: 65px;
  93. border-radius: 50%;
  94. background: #eee;
  95. margin-top: 30px;
  96. }
  97. .pay_price {
  98. margin-top: 10px;
  99. color: #ff4b0c;
  100. font-weight: 500;
  101. font-size: 30px;
  102. }
  103. .pay_name {
  104. margin-top: 14px;
  105. font-size: 14px;
  106. }
  107. .pay_input {
  108. width: 325px;
  109. height: 44px;
  110. box-sizing: border-box;
  111. margin-top: 33px;
  112. outline: none;
  113. border-radius: 5px;
  114. font-size: 16px;
  115. }
  116. .pay_notice {
  117. font-size: 14px;
  118. margin-top: 40px;
  119. padding: 0 10px;
  120. color: #333333;
  121. margin-bottom: 20px;
  122. text-align: justify;
  123. }
  124. .pay_notice_title {
  125. font-size: 16px;
  126. font-weight: bold;
  127. color: #108ee9;
  128. margin-bottom: 4px;
  129. }
  130. .pay_text {
  131. width: 100%;
  132. font-size: 14px;
  133. background: rgba(255, 240, 240, 0.9);
  134. border-radius: 8px;
  135. color: #ff4b0c;
  136. padding: 5px 10px;
  137. box-sizing: border-box;
  138. text-align: justify;
  139. line-height: 24px;
  140. }
  141. .pay_text_title {
  142. font-weight: bold;
  143. }
  144. .dian {
  145. min-width: 4px;
  146. height: 4px;
  147. background: #ff4b0c;
  148. border-radius: 50%;
  149. margin-right: 4px;
  150. margin-top: 10px;
  151. }
  152. .pay_btn {
  153. width: 320px;
  154. height: 44px;
  155. border: none;
  156. color: #fff;
  157. text-align: center;
  158. display: flex;
  159. align-items: center;
  160. justify-content: center;
  161. background: #108ee9;
  162. border-radius: 10px;
  163. position: fixed;
  164. top: 50%;
  165. font-size: 16px;
  166. }
  167. .got_it {
  168. width: 320px;
  169. height: 44px;
  170. color: #fff;
  171. text-align: center;
  172. display: flex;
  173. align-items: center;
  174. justify-content: center;
  175. background: #108ee9;
  176. border-radius: 10px;
  177. font-size: 16px;
  178. margin: 20px auto 0;
  179. }
  180. /* 遮罩 */
  181. .mask {
  182. position: fixed;
  183. background: rgba(51, 51, 51, 0.212);
  184. width: 100%;
  185. height: 100vh;
  186. z-index: 10;
  187. top: 0;
  188. left: 0;
  189. }
  190. .dialog {
  191. width: 100%;
  192. position: fixed;
  193. bottom: 0;
  194. left: 0;
  195. background: #fff;
  196. border-radius: 20px 20px 0 0;
  197. z-index: 11;
  198. text-align: center;
  199. padding: 0 20px;
  200. box-sizing: border-box;
  201. padding-bottom: 30px;
  202. }
  203. .dialog_cancel {
  204. width: 38px;
  205. height: 33px;
  206. position: absolute;
  207. right: 0;
  208. top: 0;
  209. }
  210. .dialog_title {
  211. text-align: center;
  212. font-size: 14px;
  213. font-weight: bold;
  214. color: #333333;
  215. margin-top: 16px;
  216. }
  217. .dialog_title2 {
  218. font-weight: 500;
  219. margin-top: 20px;
  220. text-align: justify;
  221. padding: 0 2px;
  222. margin-bottom: 10px;
  223. }
  224. .dialog_title2 .title1 {
  225. font-size: 18px;
  226. font-weight: bold;
  227. margin-bottom: 4px;
  228. }
  229. .dialog_title2 .title2 {
  230. color: #108ee9;
  231. font-size: 14px;
  232. font-weight: bold;
  233. margin-bottom: 4px;
  234. margin-top: 10px;
  235. }
  236. .dialog_img_box {
  237. height: calc(100% - 95px);
  238. overflow-y: scroll;
  239. }
  240. .dialog_img {
  241. width: 100%;
  242. margin-top: 5px;
  243. }
  244. /*
  245. .el-input__inner {
  246. height: 44px !important;
  247. border-radius: 5px;
  248. font-size: 16px;
  249. }
  250. .message {
  251. width: 205px;
  252. height: 36px;
  253. background: rgba(0, 0, 0, 0.5);
  254. border-radius: 5px;
  255. text-align: center;
  256. line-height: 36px;
  257. position: fixed;
  258. bottom: 150px;
  259. left: 0;
  260. right: 0;
  261. margin: auto;
  262. z-index: 9999;
  263. color: #fff;
  264. font-size: 14px;
  265. font-weight: 500;
  266. color: #ffffff;
  267. }
  268. input::-webkit-input-placeholder {
  269. color: #c4c4c4;
  270. font-size: 14px;
  271. } */
  272. </style>