Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

release-products.vue 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <template>
  2. <navBar title="支付账户签约" navbgClass="nav-bgXin" fontColor='#fff'></navBar>
  3. <navBgCar :activeNum='5'></navBgCar>
  4. <view class="content-value">
  5. <view @click="qianyueAction(item)" class="ul-item" v-for="(item, index) in state.list" :key="index">
  6. <image class="icon-tip" :src="item.icon"></image>
  7. <view class="content">
  8. <view class="title">
  9. {{ item.title }}
  10. </view>
  11. <view style="margin-top: 15rpx" class="flex">
  12. <view :class="item.tag">
  13. {{ item.tag1 }}
  14. </view>
  15. <view style="margin-left: 15rpx" :class="item.tag">
  16. {{ item.tag2 }}
  17. </view>
  18. </view>
  19. <view style="margin-top: 15rpx" class="tip">
  20. {{ item.tip }}
  21. </view>
  22. </view>
  23. <view class="action-btn">签约</view>
  24. </view>
  25. </view>
  26. </template>
  27. <script setup lang="ts">
  28. import { onLoad } from "@dcloudio/uni-app";
  29. import { reactive } from "vue";
  30. import { etcQyList } from "@/utils/network/api.js";
  31. import { request, requestNew } from "@/utils/network/request.js";
  32. import { fileURL } from "@/datas/fileURL.js";
  33. import navBar from "@/components/nav-bar/nav-bar2.vue";
  34. import navBgCar from "./components/nav-bg-car1";
  35. const imgURL = `${fileURL}image/`;
  36. import {navTo} from "@/utils/utils";
  37. const savaHandle = () => {
  38. console.log("执行点击事件");
  39. navTo(
  40. `/subpackage/orders/choice-product?orderId=${state.orderId}`,
  41. );
  42. };
  43. const qianyueAction = (val) => {
  44. console.log(val);
  45. // #ifdef MP-ALIPAY
  46. navTo(
  47. `/subpackage/orders/sign-up-ali?orderId=${state.orderId}`,
  48. );
  49. // #endif
  50. // #ifdef MP-WEIXIN
  51. navTo(
  52. `/subpackage/orders/sign-up?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}`,
  53. );
  54. // #endif
  55. };
  56. //解析URL获取参数
  57. const getRequest = (urlStr) => {
  58. if (typeof urlStr == "undefined") {
  59. // 获取url中"?"符后的字符串
  60. var url = decodeURI(location.search);
  61. } else {
  62. var url = "?" + urlStr.split("?")[1];
  63. }
  64. var theRequest = new Object();
  65. if (url.indexOf("?") != -1) {
  66. var str = url.substr(1);
  67. var strs = str.split("&");
  68. for (var i = 0; i < strs.length; i++) {
  69. theRequest[strs[i].split("=")[0]] = decodeURI(strs[i].split("=")[1]);
  70. }
  71. }
  72. return theRequest;
  73. };
  74. onLoad((option : any) => {
  75. if (option.q) {
  76. const q = decodeURIComponent(option.q); // 获取到二维码原始链接内容
  77. console.log(getRequest(q));
  78. state.orderId = getRequest(q)['orderId'];
  79. } else {
  80. state.orderId = option.orderId;
  81. state.clientFee = option.clientFee;
  82. state.id = option.id;
  83. }
  84. var data = {};
  85. const options = {
  86. type: 2,
  87. data: data,
  88. method: "POST",
  89. showLoading: true,
  90. };
  91. requestNew(etcQyList, options).then((res) => {
  92. const data = res;
  93. // #ifdef MP-ALIPAY
  94. state.list = [
  95. {
  96. icon: imgURL + "issuance/zfb.png",
  97. title: "支付宝签约",
  98. // tip: "服务费是每笔交易金额的0.05%",
  99. tag1: "支付宝代付",
  100. tag2: "支付宝便捷支付",
  101. tag: "tag1",
  102. channelId: data.data[0].channelId,
  103. },
  104. ]
  105. // #endif
  106. // #ifdef MP-WEIXIN
  107. state.list = [
  108. {
  109. icon: imgURL + "issuance/weixin.png",
  110. title: "微信签约",
  111. // tip: "服务费是每笔交易金额的0.05%",
  112. tag1: "微信代付",
  113. tag2: "微信便捷支付",
  114. tag: "tag1",
  115. channelId: data.data[0].channelId,
  116. },
  117. ];
  118. // #endif
  119. });
  120. });
  121. const state = reactive({
  122. data: {
  123. show: false,
  124. src: imgURL + "applyCard/edit.png",
  125. },
  126. list: [],
  127. id: "",
  128. clientFee: "",
  129. orderId: "",
  130. });
  131. </script>
  132. <style lang="scss" scoped>
  133. .content-value {
  134. position: absolute;
  135. top: 370rpx;
  136. width: 100%;
  137. min-height: calc(100% - 370rpx);
  138. box-sizing: border-box;
  139. padding: 0 30rpx 210rpx;
  140. }
  141. .flex {
  142. display: flex;
  143. align-items: center;
  144. }
  145. .action-btn {
  146. width: 124rpx;
  147. height: 50rpx;
  148. font-family: SourceHanSansSC, SourceHanSansSC;
  149. font-weight: 400;
  150. font-size: 24rpx;
  151. color: #FFFFFF;
  152. background: radial-gradient(at 0% 0%, #CCB375 0%, #E7D398 100%);
  153. border-radius: 25rpx;
  154. text-align: center;
  155. line-height: 50rpx;
  156. margin-top: 16rpx;
  157. }
  158. .tag1 {
  159. color: #CCB375;
  160. border-radius: 5rpx;
  161. border: 1rpx solid #CCB375;
  162. font-family: SourceHanSansSC, SourceHanSansSC;
  163. font-weight: 400;
  164. font-size: 20rpx;
  165. height: 30rpx;
  166. line-height: 30rpx;
  167. text-align: center;
  168. padding: 0 10rpx;
  169. }
  170. .tag3 {
  171. padding: 5rpx;
  172. background: rgba(139, 112, 228, 0.5);
  173. border-radius: 6rpx;
  174. font-size: 22rpx;
  175. font-family: Microsoft YaHei;
  176. font-weight: 400;
  177. color: #ffffff;
  178. }
  179. .tag2 {
  180. padding: 5rpx;
  181. background: rgba(249, 97, 60, 0.5);
  182. border-radius: 6rpx;
  183. font-size: 22rpx;
  184. font-family: Microsoft YaHei;
  185. font-weight: 400;
  186. color: #ffffff;
  187. }
  188. .ul-item {
  189. // padding: 5px 20rpx;
  190. display: flex;
  191. background-color: #fff;
  192. padding: 50rpx 30rpx 40rpx;
  193. border-radius: 12rpx;
  194. .content {
  195. margin-left: 23rpx;
  196. flex: 1 1 auto;
  197. .title {
  198. font-size: 30rpx;
  199. font-family: SourceHanSansSC, SourceHanSansSC;
  200. font-weight: 400;
  201. color: #111;
  202. }
  203. .tip {
  204. font-size: 24rpx;
  205. font-family: SourceHanSansSC, SourceHanSansSC;
  206. font-weight: 400;
  207. color: #999;
  208. }
  209. }
  210. .icon-tip {
  211. width: 80rpx;
  212. height: 80rpx;
  213. flex-shrink: 0;
  214. }
  215. }
  216. </style>