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

equityList.vue 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template>
  2. <navBar title="权益选购" :scrollTop="scrollTop" navbgClass="nav-bgXin" fontColor='#fff'></navBar>
  3. <view class="container">
  4. <view class="bg">
  5. <image mode="aspectFit" :src="`${$imgUrl}issuance/bj.png`" class="img"></image>
  6. </view>
  7. <view class="content">
  8. <view class="item-box">
  9. <!-- v-for='item in equityList' -->
  10. <image mode="aspectFit" :src="`${$imgUrl}issuance/l-car.png`" class="l-img"></image>
  11. <view class="r-info">
  12. <view class="t-title">
  13. {{equityList.productName}}
  14. </view>
  15. <view class="tip-list">
  16. <view class="tip-item" v-for='ele in equityList.labels'>
  17. {{ele}}
  18. </view>
  19. </view>
  20. <view class="b-con">
  21. <view class="l-fee">
  22. <view class="t-price">
  23. <text>¥</text>
  24. <!-- <text class='fee'>{{equityList.discountPrice * 0.01 }}</text> -->
  25. <text class='fee'>{{sendParams.amount * 0.01 }}</text>
  26. </view>
  27. <!-- <view class="b-price">
  28. ¥{{equityList.originalPrice * 0.01 }}
  29. </view> -->
  30. </view>
  31. <view class="r-btn" @click="savaHandle(equityList)">
  32. 立即购买
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script setup>
  41. import navBar from "@/components/nav-bar/nav-bar2.vue";
  42. import {
  43. ref
  44. } from 'vue'
  45. import {
  46. onLoad,
  47. onPageScroll,
  48. onShow
  49. } from "@dcloudio/uni-app";
  50. import {
  51. getItem,
  52. setItem
  53. } from "@/utils/storage.ts";
  54. import {
  55. navTo
  56. } from "@/utils/utils";
  57. import {
  58. pageDetail
  59. } from "@/utils/network/api.js";
  60. import {
  61. requestNew
  62. } from "@/utils/network/request.js";
  63. const sendParams = ref({})
  64. onLoad((e) => {
  65. if (e) {
  66. sendParams.value = e
  67. }
  68. currentProductList.value = getItem('currentProductList')
  69. getPageData();
  70. })
  71. const currentProductList = ref({})
  72. const equityList = ref([]);
  73. const scrollTop = ref(0); //滚动距离
  74. //监听页面滚动
  75. onPageScroll((e) => {
  76. scrollTop.value = e.scrollTop;
  77. });
  78. const getPageData = () => {
  79. let data = {
  80. "customerId": "",
  81. "releaseId": currentProductList.value.releaseId
  82. }
  83. const options = {
  84. data: data,
  85. method: "POST",
  86. showLoading: true,
  87. };
  88. requestNew(pageDetail, options).then((res) => {
  89. console.log("产品列表", res);
  90. equityList.value = res;
  91. });
  92. }
  93. const savaHandle = (val, idx) => {
  94. console.log("vAL", val)
  95. setItem("clientFee", currentProductList.value.clientFee);
  96. // setItem("promoteId", val.promoteId);
  97. // 产品金额+权益金额
  98. let fee = Number(currentProductList.value.fee) + Number(val.discountPrice);
  99. navTo(
  100. `/subpackage/orders/equity/interestsList?equityId=${val.equityId}&userType=${sendParams.value.userType}&vanType=${sendParams.value.vanType}&cardType=${sendParams.value.cardType}&isValueCard=${sendParams.value.isValueCard}&fee=${fee}&signAgencyId=${currentProductList.value['deviceType']}&productId=${currentProductList.value['releaseId']}&productIntro=${JSON.stringify(val.productIntro)}`
  101. )
  102. // uni.navigateTo({
  103. // url: `/subpackage/orders/equity/interestsList?equityId=${val.equityId}&userType=${sendParams.value.userType}&vanType=${sendParams.value.vanType}&cardType=${sendParams.value.cardType}&isValueCard=${sendParams.value.isValueCard}&fee=${fee}&signAgencyId=${currentProductList.value['deviceType']}&productId=${currentProductList.value['productId']}`,
  104. // });
  105. };
  106. </script>
  107. <style scoped lang='scss'>
  108. .container {
  109. height: 100vh;
  110. width: 100%;
  111. position: relative;
  112. .bg {
  113. position: absolute;
  114. width: 100%;
  115. .img {
  116. height: 405rpx;
  117. width: 100%;
  118. }
  119. }
  120. .content {
  121. width: 100%;
  122. position: absolute;
  123. top: 365rpx;
  124. border-radius: 30rpx 30rpx 0 0;
  125. background-color: #fff;
  126. height: calc(100% - 365rpx);
  127. padding: 40rpx 30rpx 0;
  128. box-sizing: border-box;
  129. .item-box {
  130. display: flex;
  131. align-items: center;
  132. margin-bottom: 50rpx;
  133. .l-img {
  134. flex-shrink: 0;
  135. width: 180rpx;
  136. height: 164rpx;
  137. }
  138. .r-info {
  139. margin-left: 20rpx;
  140. flex: 1 1 auto;
  141. height: 164rpx;
  142. .t-title {
  143. font-family: SourceHanSansSC, SourceHanSansSC;
  144. font-size: 30rpx;
  145. color: #111111;
  146. }
  147. .tip-list {
  148. display: flex;
  149. margin: 10rpx 0;
  150. .tip-item {
  151. border-radius: 6rpx;
  152. border: 1rpx solid #CCB375;
  153. padding: 5rpx 8rpx;
  154. font-size: 20rpx;
  155. color: #CCB375;
  156. margin-right: 10rpx;
  157. }
  158. }
  159. .b-con {
  160. display: flex;
  161. align-items: center;
  162. justify-content: space-between;
  163. .t-price {
  164. font-family: SourceHanSansSC, SourceHanSansSC;
  165. font-size: 22rpx;
  166. color: #CE1717;
  167. .fee {
  168. font-size: 30rpx;
  169. }
  170. }
  171. .b-price {
  172. text-decoration-line: line-through;
  173. font-size: 22rpx;
  174. color: #999999;
  175. }
  176. .r-btn {
  177. border-radius: 25rpx;
  178. background-color: #CCB375;
  179. font-family: MicrosoftYaHeiUI;
  180. font-size: 24rpx;
  181. color: #FFFFFF;
  182. width: 140rpx;
  183. height: 50rpx;
  184. text-align: center;
  185. line-height: 50rpx;
  186. }
  187. }
  188. }
  189. }
  190. }
  191. }
  192. </style>