您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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