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

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