Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

product-detail.vue 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <template>
  2. <image
  3. style="
  4. margin-top: 20rpx;
  5. width: 100%;
  6. height: 240rpx;
  7. background-color: #eeeeee;
  8. "
  9. :src="`${$imgUrl}applyCard/car-service.png`"
  10. mode="aspectFill"
  11. ></image>
  12. <view class="title"> 微信车主服务 </view>
  13. <view class="value">
  14. <view class="content_1">
  15. 微信车主服务是微信支付为车主用户提供的安全便捷的智慧服务
  16. </view>
  17. <view class="content_2">
  18. 本次将为安徽高灯微行科技有限公司开启免密支付服务,后续相关的费用将通过微信车主服务从你的微信支付账户扣除
  19. </view>
  20. </view>
  21. <view class="action">
  22. <button type="default" class="button" @click="savaHandle()">
  23. 开通服务
  24. </button>
  25. </view>
  26. </template>
  27. <script setup lang="ts">
  28. import { onLoad, onShow } from "@dcloudio/uni-app";
  29. import { reactive } from "vue";
  30. import { etcQYAction } from "@/utils/network/api.js";
  31. import { request } from "@/utils/network/request.js";
  32. import { stringToJson } from "@/utils/network/encryption";
  33. import { fileURL } from "@/datas/fileURL.js";
  34. import navBar from "../../components/nav-bar/nav-bar2.vue";
  35. import navBgCar from "./components/nav-bg-car4";
  36. import { getItem, StorageKeys } from "@/utils/storage.ts";
  37. import { msg } from "@/utils/utils";
  38. import {
  39. checkOrderStatus,
  40. orderPay,
  41. wechatAppID,
  42. wechatPayConfigId,
  43. wechatSecret,
  44. } from "@/utils/network/api";
  45. const imgURL = `${fileURL}image/`;
  46. const savaHandle = () => {
  47. // var data = {
  48. // orderId: state.orderId,
  49. // subOpenId: state.openid
  50. // }
  51. // const options = {
  52. // type: 2,
  53. // data: data,
  54. // method: 'POST',
  55. // showLoading: true,
  56. // }
  57. // request(etcQYAction, options).then((res) => {
  58. // const data = stringToJson(res.bizContent);
  59. // uni.navigateToMiniProgram({
  60. // appId: data.appId,
  61. // path: data.path,
  62. // extraData: {
  63. // appid: data.appid,
  64. // sub_appid: data.subAppid,
  65. // mch_id: data.mchId,
  66. // sub_mch_id: data.subMchId,
  67. // nonce_str: data.nonceStr,
  68. // sign_type: "HMAC-SHA256",
  69. // sign: data.sign,
  70. // trade_scene: data.tradeScene,
  71. // plate_number: data.plateNum,
  72. // sub_openid: data.subOpenId,
  73. // channel_type: data.channelType,
  74. // },
  75. // success(res) {
  76. // console.log(res);
  77. // },
  78. // complete(res) {
  79. // },
  80. // fail(res) {
  81. // // 未成功跳转到车主小程序
  82. // },
  83. // });
  84. // })
  85. };
  86. const state = reactive({
  87. openid: "",
  88. orderId: "",
  89. });
  90. onLoad((option: any) => {
  91. getOpenID();
  92. state.orderId = option.orderId;
  93. });
  94. //获取微信小程序openid
  95. const getOpenID = () => {
  96. uni.login({
  97. provider: "weixin",
  98. success: function (e) {
  99. uni.request({
  100. url: `https://api.weixin.qq.com/sns/jscode2session?appid=${wechatAppID}&secret=${wechatSecret}&js_code=${e.code}&grant_type=authorization_code`,
  101. success: (res: any) => {
  102. state.openid = res.data.openid;
  103. },
  104. });
  105. },
  106. });
  107. };
  108. </script>
  109. <style lang="scss" scoped>
  110. .action {
  111. margin-top: 40rpx;
  112. padding-left: 20rpx;
  113. padding-right: 20rpx;
  114. padding-bottom: 30rpx;
  115. .button {
  116. height: 80rpx;
  117. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  118. border-radius: 40rpx;
  119. font-size: 32rpx;
  120. font-weight: 400;
  121. color: #ffffff;
  122. line-height: 80rpx;
  123. }
  124. }
  125. .title {
  126. text-align: center;
  127. margin-top: 15rpx;
  128. font-size: 36rpx;
  129. font-family: Microsoft YaHei;
  130. font-weight: 400;
  131. color: #333333;
  132. line-height: 36rpx;
  133. }
  134. .value {
  135. padding: 0rpx 60rpx;
  136. }
  137. .content_1 {
  138. margin-top: 60rpx;
  139. font-size: 30rpx;
  140. font-family: Microsoft YaHei;
  141. font-weight: 400;
  142. color: #666666;
  143. line-height: 58rpx;
  144. }
  145. .content_2 {
  146. margin-top: 50rpx;
  147. font-size: 30rpx;
  148. font-family: Microsoft YaHei;
  149. font-weight: 400;
  150. color: #666666;
  151. line-height: 58rpx;
  152. }
  153. </style>