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

7 maanden geleden
6 maanden geleden
7 maanden geleden
6 maanden geleden
7 maanden geleden
6 maanden geleden
7 maanden geleden
6 maanden geleden
7 maanden geleden
6 maanden geleden
7 maanden geleden
6 maanden geleden
2 maanden geleden
6 maanden geleden
7 maanden geleden
6 maanden geleden
7 maanden geleden
6 maanden geleden
7 maanden geleden
6 maanden geleden
7 maanden geleden
6 maanden geleden
7 maanden geleden
6 maanden geleden
7 maanden geleden
6 maanden geleden
7 maanden geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  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. })
  44. let richText = ref('')
  45. onLoad((option : any) => {
  46. console.log("option===", option)
  47. // #ifdef MP-ALIPAY
  48. state.sysType = 'ALI';
  49. // #endif
  50. // #ifdef MP-WEIXIN
  51. state.sysType = 'WECHAT';
  52. // #endif
  53. console.log("promoteId", option)
  54. state.clientFee = option.clientFee;
  55. state.equityId = option.equityId;
  56. state.userType = option.userType;
  57. state.vanType = option.vanType;
  58. state.isValueCard = option.isValueCard;
  59. state.cardType = option.cardType;
  60. state.productId = option.productId;
  61. state.totalAmount = option.fee;
  62. // 储值卡转记账卡传过来的参数
  63. state.changeCardType = option.changeCardType;
  64. state.applyId = option.applyId;
  65. state.orderId = option.orderId;
  66. getInfo();
  67. getOpenID();
  68. state.signAgencyId = option.signAgencyId;
  69. })
  70. const addInterestsList = () => {
  71. console.log("state.signAgencyId", state.signAgencyId, deviceType)
  72. if (state.signAgencyId === deviceType) {
  73. let obj = {
  74. type: state.vanType,
  75. userType: state.userType,
  76. promoteId: state.productId
  77. }
  78. const params = encodeURIComponent(JSON.stringify(obj))
  79. jump("15", params)
  80. } else {
  81. if (state.changeCardType == "1") {
  82. navTo(
  83. `/subpackage/after-sale/to-bookkeeping-card/mailing_information?orderId=${state.orderId}&&applyId=${state.applyId}&&productId=${state.productId}&&totalAmount=${state.totalAmount}&&equityId=${state.equityId}`
  84. )
  85. } else {
  86. // 正常流程
  87. navTo(
  88. `/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}`,
  89. );
  90. }
  91. }
  92. }
  93. const getInfo = () => {
  94. const options = {
  95. type: 2,
  96. data: {
  97. "singleEquityId": state.equityId,
  98. },
  99. method: 'POST',
  100. showLoading: true,
  101. }
  102. requestNew(singleEquityDetail, options).then((res) => {
  103. const data = res;
  104. console.log("333333", data.productIntro)
  105. richText.value = data.productIntro
  106. })
  107. }
  108. //获取微信小程序openid
  109. const getOpenID = () => {
  110. // #ifdef MP-WEIXIN
  111. uni.login({
  112. provider: "weixin",
  113. success: function (e) {
  114. console.log(e);
  115. getOpenid(e.code);
  116. },
  117. });
  118. //#endif
  119. };
  120. const getOpenid = (code) => {
  121. const options = {
  122. type: 2,
  123. data: {
  124. "jsCode": code
  125. },
  126. method: "POST",
  127. showLoading: true,
  128. };
  129. // #ifdef MP-WEIXIN
  130. requestNew(getOpenId, options).then((res) => {
  131. const result = res;
  132. console.log("获取微信小程序openid", result);
  133. const openidData = result.data;
  134. state.openid = openidData.openid;
  135. setItem("QYorder", state);
  136. });
  137. // #endif
  138. }
  139. </script>
  140. <style scoped lang="scss">
  141. .btn-wrap {
  142. text-align: center;
  143. position: fixed;
  144. bottom: 40rpx;
  145. width: 100%;
  146. left: 0;
  147. }
  148. .imageDefault {
  149. height: 40rpx;
  150. width: 40rpx;
  151. transform: rotate(270deg);
  152. margin-right: 12rpx;
  153. color: white;
  154. }
  155. .imageChange {
  156. height: 40rpx;
  157. width: 40rpx;
  158. transform: rotate(90deg);
  159. margin-right: 12rpx;
  160. color: white;
  161. }
  162. .item {
  163. width: 90%;
  164. margin: 20rpx auto;
  165. background-color: rgb(41, 199, 207);
  166. border-radius: 20rpx;
  167. padding: 20rpx;
  168. box-sizing: border-box;
  169. color: white;
  170. font-size: 32rpx;
  171. }
  172. .button {
  173. height: 88rpx;
  174. background: radial-gradient(at 0% 0%, #01243A 0%, #004576 100%);
  175. border-radius: 44rpx;
  176. font-size: 32rpx;
  177. font-weight: 400;
  178. color: #ffffff;
  179. line-height: 88rpx;
  180. width: 660rpx;
  181. margin: 0 auto;
  182. }
  183. .item>.title {
  184. width: 100%;
  185. display: flex;
  186. justify-content: space-between;
  187. align-items: center;
  188. }
  189. .children {
  190. margin-left: 50rpx;
  191. margin-top: 16rpx;
  192. }
  193. .children>view {
  194. height: 50rpx;
  195. line-height: 50rpx;
  196. }
  197. .show {
  198. display: inline-block;
  199. }
  200. .hide {
  201. display: none;
  202. }
  203. .ul-item {
  204. padding-top: 20rpx;
  205. display: flex;
  206. align-items: center;
  207. .item-value {
  208. padding: 20rpx;
  209. position: absolute;
  210. display: flex;
  211. align-items: center;
  212. width: 80%;
  213. .content {
  214. width: 51%;
  215. .title {
  216. font-size: 32rpx;
  217. font-family: Microsoft YaHei;
  218. font-weight: 400;
  219. color: #ffffff;
  220. }
  221. .tip {
  222. font-size: 24rpx;
  223. font-family: Microsoft YaHei;
  224. font-weight: 400;
  225. color: #ffffff;
  226. }
  227. }
  228. }
  229. .icon-tip {
  230. width: 100rpx;
  231. height: 100rpx;
  232. }
  233. .content {
  234. margin-left: 40rpx;
  235. }
  236. }
  237. .money {
  238. color: white;
  239. }
  240. </style>