您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

interestsList.vue 5.3KB

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