You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

release-products.vue 5.6KB

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