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.

interestsList.vue 5.6KB

9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
1 개월 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
9 달 전
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <template>
  2. <view class="content" style="padding: 20rpx;overflow: hidden;padding-bottom: 160rpx;">
  3. <rich-text :nodes="richText"></rich-text>
  4. </view>
  5. <view class="btn-wrap">
  6. <button type="default" class="button" @click="addInterestsList()">
  7. 下一步
  8. </button>
  9. </view>
  10. </template>
  11. <script setup lang="ts">
  12. import { onLoad } from "@dcloudio/uni-app";
  13. import { reactive, ref } from "vue";
  14. import { requestNew } from "@/utils/network/request";
  15. import { navTo } from "@/utils/utils";
  16. import { jump } from "@/datas/9901Jump.js";
  17. import {
  18. singleEquityDetail, getOpenId
  19. } from "@/utils/network/api";
  20. import {
  21. setItem
  22. } from "@/utils/storage";
  23. import { deviceType } from "@/utils/network/difference";
  24. const state = reactive({
  25. openid: "",
  26. equityId: "",
  27. id: "",
  28. clientFee: "",
  29. list: [], //权益数据
  30. choiceValue: [], //选择的权益数据的下标
  31. choiceValueComplete: [], //选择的权益数据的具体数据
  32. isValueCard: "",
  33. vanType: 0,
  34. userType: 0,
  35. totalAmount: 0, //产品+权益产品金额
  36. changeCardType: "",//储值卡转记账卡选权益产品
  37. applyId: "",
  38. orderId: "",
  39. sysType: "",
  40. signAgencyId: "",
  41. productId: "",//产品编号
  42. cardType: "",
  43. productIntro: "",
  44. })
  45. const richText = ref(`<p><img src="https://qtzl.etcjz.cn/sett-minio/sett-minio/20250709/c3a94c2a5f36428594d18971_car.png" alt="测试" style="width: 100%;"></p>`)
  46. onLoad((option : any) => {
  47. console.log("option===", option)
  48. // #ifdef MP-ALIPAY
  49. state.sysType = 'ALI';
  50. // #endif
  51. // #ifdef MP-WEIXIN
  52. state.sysType = 'WECHAT';
  53. // #endif
  54. console.log("promoteId", option)
  55. state.clientFee = option.clientFee;
  56. state.equityId = option.equityId;
  57. state.userType = option.userType;
  58. state.vanType = option.vanType;
  59. state.isValueCard = option.isValueCard;
  60. state.cardType = option.cardType;
  61. state.productId = option.productId;
  62. state.totalAmount = option.fee;
  63. state.productIntro = option.productIntro;
  64. richText.value = JSON.parse(option.productIntro);
  65. console.log(richText.value, "rich-text");
  66. // 储值卡转记账卡传过来的参数
  67. state.changeCardType = option.changeCardType;
  68. state.applyId = option.applyId;
  69. state.orderId = option.orderId;
  70. // getInfo();
  71. getOpenID();
  72. state.signAgencyId = option.signAgencyId;
  73. })
  74. const addInterestsList = () => {
  75. console.log("state.signAgencyId", state.signAgencyId, deviceType)
  76. if (state.signAgencyId === deviceType) {
  77. let obj = {
  78. type: state.vanType,
  79. userType: state.userType,
  80. promoteId: state.productId
  81. }
  82. const params = encodeURIComponent(JSON.stringify(obj))
  83. jump("15", params)
  84. } else {
  85. if (state.changeCardType == "1") {
  86. navTo(
  87. `/subpackage/after-sale/to-bookkeeping-card/mailing_information?orderId=${state.orderId}&&applyId=${state.applyId}&&productId=${state.productId}&&totalAmount=${state.totalAmount}&&equityId=${state.equityId}`
  88. )
  89. } else {
  90. // 正常流程
  91. navTo(
  92. `/subpackage/orders/essential-information?userType=${state.userType}&vanType=${state.vanType}&isValueCard=${state.isValueCard}&cardType=${state.cardType}&totalAmount=${state.totalAmount}&equityId=${state.equityId}&productId=${state.productId}`,
  93. );
  94. }
  95. }
  96. }
  97. const getInfo = () => {
  98. const options = {
  99. type: 2,
  100. data: {
  101. "singleEquityId": state.equityId,
  102. },
  103. method: 'POST',
  104. showLoading: true,
  105. }
  106. requestNew(singleEquityDetail, options).then((res) => {
  107. const data = res;
  108. console.log("333333", data.productIntro)
  109. richText.value = data.productIntro
  110. })
  111. }
  112. //获取微信小程序openid
  113. const getOpenID = () => {
  114. // #ifdef MP-WEIXIN
  115. uni.login({
  116. provider: "weixin",
  117. success: function (e) {
  118. console.log(e);
  119. getOpenid(e.code);
  120. },
  121. });
  122. //#endif
  123. };
  124. const getOpenid = (code) => {
  125. const options = {
  126. type: 2,
  127. data: {
  128. "jsCode": code
  129. },
  130. method: "POST",
  131. showLoading: true,
  132. };
  133. // #ifdef MP-WEIXIN
  134. requestNew(getOpenId, options).then((res) => {
  135. const result = res;
  136. setItem("wxOpenid", result.openid);
  137. });
  138. // #endif
  139. }
  140. </script>
  141. <style scoped lang="scss">
  142. .btn-wrap {
  143. text-align: center;
  144. position: fixed;
  145. bottom: 40rpx;
  146. width: 100%;
  147. left: 0;
  148. }
  149. .imageDefault {
  150. height: 40rpx;
  151. width: 40rpx;
  152. transform: rotate(270deg);
  153. margin-right: 12rpx;
  154. color: white;
  155. }
  156. .imageChange {
  157. height: 40rpx;
  158. width: 40rpx;
  159. transform: rotate(90deg);
  160. margin-right: 12rpx;
  161. color: white;
  162. }
  163. .item {
  164. width: 90%;
  165. margin: 20rpx auto;
  166. background-color: rgb(41, 199, 207);
  167. border-radius: 20rpx;
  168. padding: 20rpx;
  169. box-sizing: border-box;
  170. color: white;
  171. font-size: 32rpx;
  172. }
  173. .button {
  174. height: 88rpx;
  175. background: radial-gradient(at 0% 0%, #01243A 0%, #004576 100%);
  176. border-radius: 44rpx;
  177. font-size: 32rpx;
  178. font-weight: 400;
  179. color: #ffffff;
  180. line-height: 88rpx;
  181. width: 660rpx;
  182. margin: 0 auto;
  183. }
  184. .item>.title {
  185. width: 100%;
  186. display: flex;
  187. justify-content: space-between;
  188. align-items: center;
  189. }
  190. .children {
  191. margin-left: 50rpx;
  192. margin-top: 16rpx;
  193. }
  194. .children>view {
  195. height: 50rpx;
  196. line-height: 50rpx;
  197. }
  198. .show {
  199. display: inline-block;
  200. }
  201. .hide {
  202. display: none;
  203. }
  204. .ul-item {
  205. padding-top: 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. width: 80%;
  214. .content {
  215. width: 51%;
  216. .title {
  217. font-size: 32rpx;
  218. font-family: Microsoft YaHei;
  219. font-weight: 400;
  220. color: #ffffff;
  221. }
  222. .tip {
  223. font-size: 24rpx;
  224. font-family: Microsoft YaHei;
  225. font-weight: 400;
  226. color: #ffffff;
  227. }
  228. }
  229. }
  230. .icon-tip {
  231. width: 100rpx;
  232. height: 100rpx;
  233. }
  234. .content {
  235. margin-left: 40rpx;
  236. }
  237. }
  238. .money {
  239. color: white;
  240. }
  241. </style>