Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

release-products.vue 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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} 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. // #ifdef MP-ALIPAY
  97. state.list = [
  98. {
  99. bg: imgURL + "applyCard/product-bg.png",
  100. icon: imgURL + "applyCard/alibaba.png",
  101. title: "支付宝代扣",
  102. // tip: "服务费是每笔交易金额的0.05%",
  103. tag1: "支付宝代付",
  104. tag2: "支付宝便捷支付",
  105. tag: "tag1",
  106. channelId: data.data[0].channelId,
  107. },
  108. ]
  109. // #endif
  110. // #ifdef MP-WEIXIN
  111. state.list = [
  112. {
  113. bg: imgURL + "applyCard/product-bg.png",
  114. icon: imgURL + "applyCard/wechat.png",
  115. title: "微信支付",
  116. // tip: "服务费是每笔交易金额的0.05%",
  117. tag1: "微信代付",
  118. tag2: "微信便捷支付",
  119. tag: "tag1",
  120. channelId: data.data[0].channelId,
  121. },
  122. ];
  123. // #endif
  124. });
  125. });
  126. const state = reactive({
  127. data: {
  128. show: false,
  129. src: imgURL + "applyCard/edit.png",
  130. },
  131. list: [],
  132. id: "",
  133. clientFee: "",
  134. orderId: "",
  135. });
  136. </script>
  137. <style lang="scss" scoped>
  138. .content-value {
  139. position: relative;
  140. margin-top: -50rpx;
  141. position: relative;
  142. }
  143. .flex {
  144. display: flex;
  145. align-items: center;
  146. }
  147. .action {
  148. margin-top: 30rpx;
  149. padding-left: 20rpx;
  150. padding-right: 20rpx;
  151. padding-bottom: 30rpx;
  152. .button {
  153. height: 80rpx;
  154. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  155. border-radius: 40rpx;
  156. font-size: 32rpx;
  157. font-weight: 400;
  158. color: #ffffff;
  159. line-height: 80rpx;
  160. }
  161. }
  162. .action-btn {
  163. margin-left: 45rpx;
  164. width: 121rpx;
  165. height: 61rpx;
  166. border: 1px solid rgba(255, 255, 255, 1);
  167. border-radius: 30rpx;
  168. background: rgba(255, 255, 255, 0.2);
  169. text-align: center;
  170. font-size: 30rpx;
  171. font-family: Microsoft YaHei;
  172. font-weight: 400;
  173. color: #ffffff;
  174. line-height: 61rpx;
  175. }
  176. .tag1 {
  177. padding: 5rpx;
  178. background: rgba(0, 179, 139, 0.5);
  179. border-radius: 6rpx;
  180. font-size: 22rpx;
  181. font-family: Microsoft YaHei;
  182. font-weight: 400;
  183. color: #ffffff;
  184. }
  185. .tag3 {
  186. padding: 5rpx;
  187. background: rgba(139, 112, 228, 0.5);
  188. border-radius: 6rpx;
  189. font-size: 22rpx;
  190. font-family: Microsoft YaHei;
  191. font-weight: 400;
  192. color: #ffffff;
  193. }
  194. .tag2 {
  195. padding: 5rpx;
  196. background: rgba(249, 97, 60, 0.5);
  197. border-radius: 6rpx;
  198. font-size: 22rpx;
  199. font-family: Microsoft YaHei;
  200. font-weight: 400;
  201. color: #ffffff;
  202. }
  203. .ul-item {
  204. padding: 5px 20rpx;
  205. display: flex;
  206. align-items: center;
  207. .item-value {
  208. padding: 20rpx;
  209. position: absolute;
  210. display: flex;
  211. align-items: center;
  212. justify-content: space-around;
  213. .content {
  214. .title {
  215. font-size: 32rpx;
  216. font-family: Microsoft YaHei;
  217. font-weight: 400;
  218. color: #ffffff;
  219. }
  220. .tip {
  221. font-size: 24rpx;
  222. font-family: Microsoft YaHei;
  223. font-weight: 400;
  224. color: #ffffff;
  225. }
  226. }
  227. }
  228. .icon-tip {
  229. width: 100rpx;
  230. height: 100rpx;
  231. }
  232. .content {
  233. margin-left: 40rpx;
  234. }
  235. }
  236. </style>