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 7.1KB

10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
9 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
2 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
10 mesi fa
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  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="getUserinfo()">
  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, getUserMsg, userInfoIndex
  19. } from "@/utils/network/api";
  20. import {
  21. getItem,
  22. setItem
  23. } from "@/utils/storage";
  24. import { deviceType } from "@/utils/network/difference";
  25. const state = reactive({
  26. openid: "",
  27. equityId: "",
  28. id: "",
  29. clientFee: "",
  30. list: [], //权益数据
  31. choiceValue: [], //选择的权益数据的下标
  32. choiceValueComplete: [], //选择的权益数据的具体数据
  33. isValueCard: "",
  34. vanType: 0,
  35. userType: 0,
  36. totalAmount: 0, //产品+权益产品金额
  37. changeCardType: "",//储值卡转记账卡选权益产品
  38. applyId: "",
  39. orderId: "",
  40. sysType: "",
  41. signAgencyId: "",
  42. productId: "",//产品编号
  43. cardType: "",
  44. productIntro: "",
  45. })
  46. const 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.vanType = option.vanType;
  60. state.isValueCard = option.isValueCard;
  61. state.cardType = option.cardType;
  62. state.productId = option.productId;
  63. state.totalAmount = option.fee;
  64. state.productIntro = option.productIntro;
  65. // richText.value = JSON.parse(option.productIntro);
  66. // console.log(richText.value, "rich-text");
  67. // 储值卡转记账卡传过来的参数
  68. state.changeCardType = option.changeCardType;
  69. state.applyId = option.applyId;
  70. state.orderId = option.orderId;
  71. getInfo();
  72. getOpenID();
  73. state.signAgencyId = option.signAgencyId;
  74. })
  75. const getUserinfo = () => {
  76. const options = {
  77. type: 2,
  78. data: {},
  79. method: "POST",
  80. showLoading: true,
  81. };
  82. // 调用方式
  83. requestNew(userInfoIndex, options)
  84. .then((res) => {
  85. const data = res;
  86. console.log(data, "用户信息"); //|| !data.userNegImgUrl || !data.userPosImgUrl
  87. if (!data.idNum || !data.userIdBackImgUrl || !data.userIdImgUrl) {
  88. uni.showModal({
  89. title: "请先完成实名认证",
  90. icon: "none",
  91. duration: 2000,
  92. success: () => {
  93. setTimeout(() => {
  94. uni.navigateTo({
  95. url: "/subpackage/personal-center/real-name-authentication",
  96. });
  97. }, 2000);
  98. },
  99. });
  100. } else {
  101. addInterestsList();
  102. }
  103. })
  104. .catch((err) => {
  105. console.log(err);
  106. });
  107. // const options = {
  108. // type: 2,
  109. // data: { openId: getItem('openId') },
  110. // method: "POST",
  111. // showLoading: true,
  112. // };
  113. // requestNew(getUserMsg, options).then((res) => {
  114. // const data = res;
  115. // console.log(data, "用户信息"); //|| !data.userNegImgUrl || !data.userPosImgUrl
  116. // if (!data.userIdNum || !data.userNegImgUrl || !data.userPosImgUrl) {
  117. // uni.showModal({
  118. // title: "请先完成实名认证",
  119. // icon: "none",
  120. // duration: 2000,
  121. // success: () => {
  122. // setTimeout(() => {
  123. // uni.navigateTo({
  124. // url: "/subpackage/personal-center/real-name-authentication",
  125. // });
  126. // }, 2000);
  127. // },
  128. // });
  129. // } else {
  130. // addInterestsList();
  131. // }
  132. // });
  133. }
  134. const addInterestsList = () => {
  135. console.log("state.signAgencyId", state.signAgencyId, deviceType)
  136. if (state.signAgencyId === deviceType) {
  137. let obj = {
  138. type: state.vanType,
  139. userType: state.userType,
  140. promoteId: state.productId
  141. }
  142. const params = encodeURIComponent(JSON.stringify(obj))
  143. jump("15", params)
  144. } else {
  145. if (state.changeCardType == "1") {
  146. navTo(
  147. `/subpackage/after-sale/to-bookkeeping-card/mailing_information?orderId=${state.orderId}&&applyId=${state.applyId}&&productId=${state.productId}&&totalAmount=${state.totalAmount}&&equityId=${state.equityId}`
  148. )
  149. } else {
  150. // 正常流程
  151. navTo(
  152. `/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}`,
  153. );
  154. }
  155. }
  156. }
  157. const getInfo = () => {
  158. const options = {
  159. type: 2,
  160. data: {
  161. // "singleEquityId": state.equityId,
  162. "releaseId": state.productId,
  163. },
  164. method: 'POST',
  165. showLoading: true,
  166. }
  167. requestNew("/iaw/issue/product/pageDetail", options).then((res) => {
  168. const data = res;
  169. console.log("333333", data.productIntro)
  170. richText.value = data.productIntro
  171. })
  172. }
  173. //获取微信小程序openid
  174. const getOpenID = () => {
  175. // #ifdef MP-WEIXIN
  176. uni.login({
  177. provider: "weixin",
  178. success: function (e) {
  179. console.log(e);
  180. getOpenid(e.code);
  181. },
  182. });
  183. //#endif
  184. };
  185. const getOpenid = (code) => {
  186. const options = {
  187. type: 2,
  188. data: {
  189. "jsCode": code
  190. },
  191. method: "POST",
  192. showLoading: true,
  193. };
  194. // #ifdef MP-WEIXIN
  195. requestNew(getOpenId, options).then((res) => {
  196. const result = res;
  197. setItem("wxOpenid", result.openid);
  198. });
  199. // #endif
  200. }
  201. </script>
  202. <style scoped lang="scss">
  203. .btn-wrap {
  204. text-align: center;
  205. position: fixed;
  206. bottom: 40rpx;
  207. width: 100%;
  208. left: 0;
  209. }
  210. .imageDefault {
  211. height: 40rpx;
  212. width: 40rpx;
  213. transform: rotate(270deg);
  214. margin-right: 12rpx;
  215. color: white;
  216. }
  217. .imageChange {
  218. height: 40rpx;
  219. width: 40rpx;
  220. transform: rotate(90deg);
  221. margin-right: 12rpx;
  222. color: white;
  223. }
  224. .item {
  225. width: 90%;
  226. margin: 20rpx auto;
  227. background-color: rgb(41, 199, 207);
  228. border-radius: 20rpx;
  229. padding: 20rpx;
  230. box-sizing: border-box;
  231. color: white;
  232. font-size: 32rpx;
  233. }
  234. .button {
  235. height: 88rpx;
  236. background: radial-gradient(at 0% 0%, #01243A 0%, #004576 100%);
  237. border-radius: 44rpx;
  238. font-size: 32rpx;
  239. font-weight: 400;
  240. color: #ffffff;
  241. line-height: 88rpx;
  242. width: 660rpx;
  243. margin: 0 auto;
  244. }
  245. .item>.title {
  246. width: 100%;
  247. display: flex;
  248. justify-content: space-between;
  249. align-items: center;
  250. }
  251. .children {
  252. margin-left: 50rpx;
  253. margin-top: 16rpx;
  254. }
  255. .children>view {
  256. height: 50rpx;
  257. line-height: 50rpx;
  258. }
  259. .show {
  260. display: inline-block;
  261. }
  262. .hide {
  263. display: none;
  264. }
  265. .ul-item {
  266. padding-top: 20rpx;
  267. display: flex;
  268. align-items: center;
  269. .item-value {
  270. padding: 20rpx;
  271. position: absolute;
  272. display: flex;
  273. align-items: center;
  274. width: 80%;
  275. .content {
  276. width: 51%;
  277. .title {
  278. font-size: 32rpx;
  279. font-family: Microsoft YaHei;
  280. font-weight: 400;
  281. color: #ffffff;
  282. }
  283. .tip {
  284. font-size: 24rpx;
  285. font-family: Microsoft YaHei;
  286. font-weight: 400;
  287. color: #ffffff;
  288. }
  289. }
  290. }
  291. .icon-tip {
  292. width: 100rpx;
  293. height: 100rpx;
  294. }
  295. .content {
  296. margin-left: 40rpx;
  297. }
  298. }
  299. .money {
  300. color: white;
  301. }
  302. </style>