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.8KB

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