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

10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
9 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
10 miesięcy temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  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 && false) {
  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. }
  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: 5px 20rpx;
  206. padding-top: 20rpx;
  207. display: flex;
  208. align-items: center;
  209. .item-value {
  210. padding: 20rpx;
  211. position: absolute;
  212. display: flex;
  213. align-items: center;
  214. width: 80%;
  215. .content {
  216. width: 51%;
  217. .title {
  218. font-size: 32rpx;
  219. font-family: Microsoft YaHei;
  220. font-weight: 400;
  221. color: #ffffff;
  222. }
  223. .tip {
  224. font-size: 24rpx;
  225. font-family: Microsoft YaHei;
  226. font-weight: 400;
  227. color: #ffffff;
  228. }
  229. }
  230. }
  231. .icon-tip {
  232. width: 100rpx;
  233. height: 100rpx;
  234. }
  235. .content {
  236. margin-left: 40rpx;
  237. }
  238. }
  239. .money {
  240. color: white;
  241. }
  242. </style>