選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

interestsList.vue 5.5KB

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