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

interestsList.vue 5.5KB

1年前
1年前
1年前
11ヶ月前
7ヶ月前
11ヶ月前
7ヶ月前
11ヶ月前
8ヶ月前
1年前
1年前
11ヶ月前
7ヶ月前
1年前
1年前
8ヶ月前
7ヶ月前
1年前
11ヶ月前
1年前
11ヶ月前
8ヶ月前
11ヶ月前
11ヶ月前
11ヶ月前
11ヶ月前
11ヶ月前
7ヶ月前
11ヶ月前
11ヶ月前
11ヶ月前
7ヶ月前
7ヶ月前
7ヶ月前
7ヶ月前
1年前
1年前
1年前
1年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  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. uni.redirectTo({
  88. url: `/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: 90%;
  146. left: 5%;
  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: 80rpx;
  174. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  175. border-radius: 40rpx;
  176. font-size: 32rpx;
  177. font-weight: 400;
  178. color: #ffffff;
  179. line-height: 80rpx;
  180. }
  181. .item>.title {
  182. width: 100%;
  183. display: flex;
  184. justify-content: space-between;
  185. align-items: center;
  186. }
  187. .children {
  188. margin-left: 50rpx;
  189. margin-top: 16rpx;
  190. }
  191. .children>view {
  192. height: 50rpx;
  193. line-height: 50rpx;
  194. }
  195. .show {
  196. display: inline-block;
  197. }
  198. .hide {
  199. display: none;
  200. }
  201. .ul-item {
  202. // padding: 5px 20rpx;
  203. padding-top: 20rpx;
  204. display: flex;
  205. align-items: center;
  206. .item-value {
  207. padding: 20rpx;
  208. position: absolute;
  209. display: flex;
  210. align-items: center;
  211. width: 80%;
  212. .content {
  213. width: 51%;
  214. .title {
  215. font-size: 32rpx;
  216. font-family: Microsoft YaHei;
  217. font-weight: 400;
  218. color: #ffffff;
  219. }
  220. .tip {
  221. font-size: 24rpx;
  222. font-family: Microsoft YaHei;
  223. font-weight: 400;
  224. color: #ffffff;
  225. }
  226. }
  227. }
  228. .icon-tip {
  229. width: 100rpx;
  230. height: 100rpx;
  231. }
  232. .content {
  233. margin-left: 40rpx;
  234. }
  235. }
  236. .money {
  237. color: white;
  238. }
  239. </style>