Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

release-products.vue 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  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}&orderQuery=${state.orderQuery}`,
  48. );
  49. // #endif
  50. // #ifdef MP-WEIXIN
  51. navTo(
  52. `/subpackage/orders/sign-up?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&orderQuery=${state.orderQuery}`,
  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.orderQuery = option.orderQuery;
  82. state.clientFee = option.clientFee;
  83. state.id = option.id;
  84. }
  85. var data = {};
  86. const options = {
  87. type: 2,
  88. data: data,
  89. method: "POST",
  90. showLoading: true,
  91. };
  92. requestNew(etcQyList, options).then((res) => {
  93. const data = res;
  94. // #ifdef MP-ALIPAY
  95. state.list = [
  96. {
  97. icon: imgURL + "issuance/zfb.png",
  98. title: "支付宝签约",
  99. // tip: "服务费是每笔交易金额的0.05%",
  100. tag1: "支付宝代付",
  101. tag2: "支付宝便捷支付",
  102. tag: "tag1",
  103. channelId: data.data[0].channelId,
  104. },
  105. ]
  106. // #endif
  107. // #ifdef MP-WEIXIN
  108. state.list = [
  109. {
  110. icon: imgURL + "issuance/weixin.png",
  111. title: "微信签约",
  112. // tip: "服务费是每笔交易金额的0.05%",
  113. tag1: "微信代付",
  114. tag2: "微信便捷支付",
  115. tag: "tag1",
  116. channelId: data.data[0].channelId,
  117. },
  118. ];
  119. // #endif
  120. });
  121. });
  122. const state = reactive({
  123. data: {
  124. show: false,
  125. src: imgURL + "applyCard/edit.png",
  126. },
  127. list: [],
  128. id: "",
  129. clientFee: "",
  130. orderId: "",
  131. orderQuery:"0"
  132. });
  133. </script>
  134. <style lang="scss" scoped>
  135. .content-value {
  136. position: absolute;
  137. top: 370rpx;
  138. width: 100%;
  139. min-height: calc(100% - 370rpx);
  140. box-sizing: border-box;
  141. padding: 0 30rpx 210rpx;
  142. }
  143. .flex {
  144. display: flex;
  145. align-items: center;
  146. }
  147. .action-btn {
  148. width: 124rpx;
  149. height: 50rpx;
  150. font-family: SourceHanSansSC, SourceHanSansSC;
  151. font-weight: 400;
  152. font-size: 24rpx;
  153. color: #FFFFFF;
  154. background: radial-gradient(at 0% 0%, #CCB375 0%, #E7D398 100%);
  155. border-radius: 25rpx;
  156. text-align: center;
  157. line-height: 50rpx;
  158. margin-top: 16rpx;
  159. }
  160. .tag1 {
  161. color: #CCB375;
  162. border-radius: 5rpx;
  163. border: 1rpx solid #CCB375;
  164. font-family: SourceHanSansSC, SourceHanSansSC;
  165. font-weight: 400;
  166. font-size: 20rpx;
  167. height: 30rpx;
  168. line-height: 30rpx;
  169. text-align: center;
  170. padding: 0 10rpx;
  171. }
  172. .tag3 {
  173. padding: 5rpx;
  174. background: rgba(139, 112, 228, 0.5);
  175. border-radius: 6rpx;
  176. font-size: 22rpx;
  177. font-family: Microsoft YaHei;
  178. font-weight: 400;
  179. color: #ffffff;
  180. }
  181. .tag2 {
  182. padding: 5rpx;
  183. background: rgba(249, 97, 60, 0.5);
  184. border-radius: 6rpx;
  185. font-size: 22rpx;
  186. font-family: Microsoft YaHei;
  187. font-weight: 400;
  188. color: #ffffff;
  189. }
  190. .ul-item {
  191. // padding: 5px 20rpx;
  192. display: flex;
  193. background-color: #fff;
  194. padding: 50rpx 30rpx 40rpx;
  195. border-radius: 12rpx;
  196. .content {
  197. margin-left: 23rpx;
  198. flex: 1 1 auto;
  199. .title {
  200. font-size: 30rpx;
  201. font-family: SourceHanSansSC, SourceHanSansSC;
  202. font-weight: 400;
  203. color: #111;
  204. }
  205. .tip {
  206. font-size: 24rpx;
  207. font-family: SourceHanSansSC, SourceHanSansSC;
  208. font-weight: 400;
  209. color: #999;
  210. }
  211. }
  212. .icon-tip {
  213. width: 80rpx;
  214. height: 80rpx;
  215. flex-shrink: 0;
  216. }
  217. }
  218. </style>