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

choice-product.vue 13KB

7ヶ月前
7ヶ月前
6ヶ月前
7ヶ月前
6ヶ月前
7ヶ月前
6ヶ月前
7ヶ月前
1年前
1年前
7ヶ月前
1年前
6ヶ月前
1年前
11ヶ月前
6ヶ月前
7ヶ月前
7ヶ月前
7ヶ月前
1年前
6ヶ月前
6ヶ月前
7ヶ月前
6ヶ月前
7ヶ月前
1年前
7ヶ月前
6ヶ月前
7ヶ月前
7ヶ月前
1年前
8ヶ月前
1年前
8ヶ月前
8ヶ月前
7ヶ月前
8ヶ月前
7ヶ月前
7ヶ月前
1年前
6ヶ月前
8ヶ月前
8ヶ月前
8ヶ月前
1年前
6ヶ月前
1年前
1年前
8ヶ月前
7ヶ月前
7ヶ月前
8ヶ月前
8ヶ月前
8ヶ月前
8ヶ月前
8ヶ月前
6ヶ月前
1年前
8ヶ月前
1年前
7ヶ月前
6ヶ月前
7ヶ月前
6ヶ月前
7ヶ月前
6ヶ月前
6ヶ月前
6ヶ月前
7ヶ月前
6ヶ月前
7ヶ月前
6ヶ月前
6ヶ月前
7ヶ月前
6ヶ月前
7ヶ月前
6ヶ月前
7ヶ月前
6ヶ月前
7ヶ月前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. <template>
  2. <navBar title="产品选择" :scrollTop="scrollTop" navbgClass="nav-bgXin" fontColor='#fff'></navBar>
  3. <navBgCar :activeNum='1'></navBgCar>
  4. <view class="content-value">
  5. <view class="con">
  6. <view class="con-item bgImgs" v-for="(item, index) in state.dataArray" :key="index"
  7. :style="{'--bgimg':`url(${$imgUrl}issuance/chanping-bg.png)`}" @click="toEquity(item)">
  8. <view class="item-header ">
  9. <view class="l-txt">
  10. {{ item.productName }}
  11. </view>
  12. <view class="r-tip bgImgs" :style="{'--bgimg':`url(${$imgUrl}issuance/r-tip.png)`}">
  13. {{ item['cardTypeArr'] }}
  14. </view>
  15. </view>
  16. <view class="b-txt">
  17. <view class="l-money">
  18. <text>¥</text> <text class="fee">{{ item.fee * 0.01 }}</text>
  19. </view>
  20. <view class="c-line" v-if='item.remarks'>
  21. </view>
  22. <view class="r-desc">
  23. {{item.remarks}}
  24. <!-- 产品权益专用,2%加息10天 -->
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="bottomTip" v-if='state.dataArray.length===0'> 暂无产品,敬请期待! </view>
  30. </view>
  31. <u-popup mode="center" v-model="state.choiceCardShow">
  32. <view class="squire">
  33. <view class="mask-close">
  34. <image :src="fileURL + 'image/index/icon-close.png'" class="icon-closed" @click="closeMask"></image>
  35. </view>
  36. <view class="mask-title" :style="{ '--color': color }">选择办理卡类型</view>
  37. <view class="as-layout-horizontal">
  38. <view v-for="(item, index) in state.radiolist1" :key="index" :label="item.disabled" :name="item.name"
  39. @click="radioChange(item.name)" style="width: 100%;display: flex;align-items: center;margin-bottom: 30rpx;">
  40. <view class="as-layout-vertical as-gravity-center">
  41. <image style="width: 140rpx; height: 100rpx; border-radius: 20rpx;margin-right: 20rpx;"
  42. :src="`${$imgUrl}card2.png`" mode="aspectFill"></image>
  43. <view style="margin-top: 20rpx;text-align: center;">
  44. {{item.name}}
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </u-popup>
  51. </template>
  52. <script setup lang="ts">
  53. import { onLoad, onPageScroll, onShow } from "@dcloudio/uni-app";
  54. import { reactive, ref } from "vue";
  55. import { pageQuery } from "@/utils/network/api.js";
  56. import { requestNew } from "@/utils/network/request.js";
  57. import { fileURL } from "@/datas/fileURL.js";
  58. import navBgCar from "./components/nav-bg-car1";
  59. import navBar from "@/components/nav-bar/nav-bar2.vue";
  60. import { setItem } from "@/utils/storage.ts";
  61. import { agentId } from "@/utils/network/difference";
  62. import { msg,navTo } from "@/utils/utils";
  63. const imgURL = `${fileURL}image/`;
  64. let bgc = ""
  65. // #ifdef MP-ALIPAY
  66. bgc = "#FFFFFF"
  67. // #endif
  68. // #ifdef MP-WEIXIN
  69. bgc = "#F4F6FA"
  70. // #endif
  71. const scrollTop = ref(0); //滚动距离
  72. // 单选默认数据
  73. // 单选
  74. // 单选
  75. const radioChange = (n) => {
  76. console.log('radioChange', n);
  77. if (n == '记账卡') {
  78. state.isValueCard = 2
  79. state.cardType = 1
  80. } else if (n == '储值卡') {
  81. state.isValueCard = 1
  82. state.cardType = 2
  83. } else {
  84. state.isValueCard = 2
  85. state.cardType = 3
  86. }
  87. setItem("isValueCard", state.isValueCard);
  88. navTo(`/subpackage/orders/interestsList?userType=${state.userType}&type=${state.type}&isValueCard=${state.isValueCard}&cardType=${state.cardType}&fee=${Number(state.fee)}&equityId=${state.equityId}&fee=${state.fee}&signAgencyId=${state.signAgencyId}`)
  89. }
  90. const toEquity = (itemData) => {
  91. if (itemData['cardTypeArr'].split(",").length == 1) {
  92. if (itemData['cardTypeArr'].split(",")[0] == "记账卡") {
  93. state.isValueCard = 2
  94. state.cardType = 1
  95. } else if (itemData['cardTypeArr'].split(",")[0] == '储值卡') {
  96. state.isValueCard = 1
  97. state.cardType = 2
  98. } else {
  99. state.isValueCard = 2
  100. state.cardType = 3
  101. }
  102. }
  103. console.log("state.isValueCard", state.isValueCard)
  104. setItem("isValueCard", state.isValueCard);
  105. setItem("currentProductList", itemData);
  106. navTo(`/subpackage/orders/equity/equityList?userType=${state.userType}&vanType=${state.vanType}&cardType=${state.cardType}&isValueCard=${state.isValueCard}`)
  107. }
  108. const savaHandle = (val, idx) => {
  109. console.log("vAL", val)
  110. // 1不能点击 0可以点击 权益置灰 弹出提示
  111. if (val.equityList[0]['isClick'] == 1) {
  112. msg(val.equityList[0]['noClickCase'])
  113. return;
  114. }
  115. setItem("clientFee", val.clientFee);
  116. // setItem("promoteId", val.promoteId);
  117. state.isSign = val.isSign;
  118. state.signAgencyId = val['deviceType'];
  119. state.equityId = val.equityList[idx].equityId;
  120. // 产品金额+权益金额
  121. state.fee = Number(val.fee) + Number(val.equityList[idx].discountPrice);
  122. // 判断是几张卡
  123. if (val['cardTypeArr'].split(",").length == 1) {
  124. if (val['cardTypeArr'].split(",")[0] == "记账卡") {
  125. state.isValueCard = 2
  126. state.cardType = 1
  127. } else if (val['cardTypeArr'].split(",")[0] == '储值卡') {
  128. state.isValueCard = 1
  129. state.cardType = 2
  130. } else {
  131. state.isValueCard = 2
  132. state.cardType = 3
  133. }
  134. console.log("state.isValueCard", state.isValueCard)
  135. setItem("isValueCard", state.isValueCard);
  136. navTo(`/subpackage/orders/interestsList?equityId=${val.equityList[idx].equityId}&userType=${state.userType}&vanType=${state.vanType}&cardType=${state.cardType}&isValueCard=${state.isValueCard}&fee=${state.fee}&signAgencyId=${val['deviceType']}&productId=${val['productId']}`)
  137. } else {
  138. state.radiolist1 = [];
  139. // 处理卡的数据
  140. for (var i = 0; i < val['cardTypeArr'].split(",").length; i++) {
  141. const obj = {};
  142. obj["name"] = val['cardTypeArr'].split(",")[i];
  143. obj["disabled"] = false;
  144. state.radiolist1.push(obj)
  145. }
  146. state.choiceCardShow = true;
  147. console.log("state.radiolist1", state.radiolist1)
  148. }
  149. };
  150. onLoad((option : any) => {
  151. // #ifdef MP-ALIPAY
  152. state.sysType = 'ALI';
  153. // #endif
  154. // #ifdef MP-WEIXIN
  155. state.sysType = 'WECHAT';
  156. // #endif
  157. state.userType = Number(option.userType);
  158. state.vanType = Number(option.vanType);
  159. productList();
  160. console.log("option选择产品列表", option)
  161. });
  162. // 产品列表
  163. const productList = () => {
  164. var data = {
  165. userType: state.userType,
  166. agencyId: agentId,
  167. vanType: state.vanType,
  168. };
  169. console.log("data", data)
  170. const options = {
  171. data: data,
  172. method: "POST",
  173. showLoading: true,
  174. };
  175. console.log("输出内容", options);
  176. requestNew(pageQuery, options).then((res) => {
  177. console.log("产品列表", res);
  178. const data = res;
  179. if (data.list && data.list.length > 0) {
  180. state.dataArray = data.list ? data.list : [];
  181. console.log("state.dataArray", state.dataArray);
  182. for (var i = 0; i < state.dataArray.length; i++) {
  183. const cardTypeArr = []
  184. for (var j = 0; j < state.dataArray[i].cardType.length; j++) {
  185. if (state.dataArray[i].cardType[j] == '2') {
  186. cardTypeArr.push('储值卡')
  187. } else if (state.dataArray[i].cardType[j] == '1') {
  188. cardTypeArr.push('记账卡')
  189. } else if (state.dataArray[i].cardType[j] == '3') {
  190. cardTypeArr.push('预存卡')
  191. }
  192. }
  193. state.dataArray[i]['cardTypeArr'] = cardTypeArr.toString()
  194. }
  195. } else {
  196. uni.showModal({
  197. title: '提示',
  198. content: '尊敬的用户:感谢您的关注!我们正紧锣密鼓地为您准备一款全新的产品。虽然目前尚未上线,但请您耐心等待,我们将以更好的姿态与更丰富的功能,为您呈现一份超出期待的产品。',
  199. showCancel: false,
  200. success: function (res) {
  201. if (res.confirm) {
  202. uni.switchTab({
  203. url: '/pages/index/index'
  204. })
  205. console.log('用户点击确定');
  206. } else if (res.cancel) {
  207. console.log('用户点击取消');
  208. }
  209. }
  210. });
  211. }
  212. console.log("state.dataArray", state.dataArray)
  213. });
  214. }
  215. //监听页面滚动
  216. onPageScroll((e) => {
  217. scrollTop.value = e.scrollTop;
  218. });
  219. const state = reactive({
  220. isValueCard: 1, //卡的类型
  221. radiolist1: [], //选择卡的数据列表
  222. choiceCardShow: false, //选择卡的弹出框
  223. isSign: '',
  224. sysType: "",
  225. orderId: "",
  226. userType: 1, //1 个人 2单位
  227. vanType: 0, //0 客车 1货车
  228. vehiclePlateColor: "",
  229. data: {
  230. show: false,
  231. src: imgURL + "applyCard/edit.png",
  232. },
  233. dataArray: [],
  234. list: [
  235. {
  236. bg: imgURL + "applyCard/product-bg.png",
  237. icon: imgURL + "applyCard/wechat.png",
  238. title: "【货车】微信车主服务",
  239. tip: "绑定微信支付,无需绑定银行卡",
  240. },
  241. ],
  242. fee: 0, //产品金额
  243. equityId: "",
  244. signAgencyId: "",//渠道标识
  245. cardType: ""
  246. });
  247. const closeMask = () => {
  248. state.choiceCardShow = false;
  249. };
  250. </script>
  251. <style lang="scss" scoped>
  252. ::v-deep .u-radio {
  253. display: flex !important;
  254. align-items: center !important;
  255. float: none !important;
  256. }
  257. ::v-deep .u-icon__icon {
  258. top: -4px !important;
  259. }
  260. .bottomTip {
  261. padding: 30rpx 0 0;
  262. text-align: center;
  263. font-size: 28rpx;
  264. font-family: Microsoft YaHei;
  265. font-weight: 400;
  266. color: #b3b3b3;
  267. }
  268. .content-value {
  269. position: absolute;
  270. top: 370rpx;
  271. // height: calc(100% - 390rpx);
  272. background-color: #fff;
  273. border-radius: 12rpx;
  274. padding: 20rpx 0 50rpx;
  275. margin: 0 30rpx;
  276. width: 690rpx;
  277. .img-pos {
  278. position: absolute;
  279. left: 500rpx;
  280. top: -38rpx;
  281. right: 50rpx;
  282. .img-flex {
  283. display: flex;
  284. justify-content: space-between;
  285. align-items: center;
  286. .car-img {
  287. width: 86rpx;
  288. height: 42rpx;
  289. }
  290. .flag-img {
  291. width: 30rpx;
  292. height: 35rpx;
  293. }
  294. }
  295. }
  296. }
  297. .flex {
  298. display: flex;
  299. align-items: center;
  300. }
  301. .action {
  302. margin-top: 30rpx;
  303. padding-left: 20rpx;
  304. padding-right: 20rpx;
  305. padding-bottom: 30rpx;
  306. .button {
  307. height: 80rpx;
  308. background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
  309. border-radius: 40rpx;
  310. font-size: 32rpx;
  311. font-weight: 400;
  312. color: #ffffff;
  313. line-height: 80rpx;
  314. }
  315. }
  316. .action-btn {
  317. margin-left: 45rpx;
  318. width: 121rpx;
  319. height: 61rpx;
  320. border: 1px solid rgba(255, 255, 255, 1);
  321. border-radius: 30rpx;
  322. background: rgba(255, 255, 255, 0.2);
  323. text-align: center;
  324. font-size: 30rpx;
  325. font-family: Microsoft YaHei;
  326. font-weight: 400;
  327. color: #ffffff;
  328. line-height: 61rpx;
  329. }
  330. .tag1 {
  331. padding: 5rpx;
  332. background: rgba(0, 179, 139, 0.5);
  333. border-radius: 6rpx;
  334. font-size: 22rpx;
  335. font-family: Microsoft YaHei;
  336. font-weight: 400;
  337. color: #ffffff;
  338. }
  339. .tag3 {
  340. padding: 5rpx;
  341. background: rgba(139, 112, 228, 0.5);
  342. border-radius: 6rpx;
  343. font-size: 22rpx;
  344. font-family: Microsoft YaHei;
  345. font-weight: 400;
  346. color: #ffffff;
  347. }
  348. .tag2 {
  349. padding: 5rpx;
  350. background: rgba(249, 97, 60, 0.5);
  351. border-radius: 6rpx;
  352. font-size: 22rpx;
  353. font-family: Microsoft YaHei;
  354. font-weight: 400;
  355. color: #ffffff;
  356. }
  357. .ul-item-hui {
  358. padding: 5px 20rpx;
  359. display: flex;
  360. align-items: center;
  361. color: #c1c1cc;
  362. .item-value {
  363. padding: 20rpx;
  364. position: absolute;
  365. display: flex;
  366. align-items: center;
  367. width: 80%;
  368. .content {
  369. width: 51%;
  370. .title {
  371. font-size: 32rpx;
  372. font-family: Microsoft YaHei;
  373. font-weight: 400;
  374. }
  375. .tip {
  376. font-size: 24rpx;
  377. font-family: Microsoft YaHei;
  378. font-weight: 400;
  379. }
  380. }
  381. }
  382. .icon-tip {
  383. width: 100rpx;
  384. height: 100rpx;
  385. }
  386. .content {
  387. margin-left: 40rpx;
  388. }
  389. }
  390. .ul-item {
  391. padding: 5px 20rpx;
  392. display: flex;
  393. align-items: center;
  394. color: white;
  395. .item-value {
  396. padding: 20rpx;
  397. position: absolute;
  398. display: flex;
  399. align-items: center;
  400. width: 80%;
  401. .content {
  402. width: 51%;
  403. .title {
  404. font-size: 32rpx;
  405. font-family: Microsoft YaHei;
  406. font-weight: 400;
  407. }
  408. .tip {
  409. font-size: 24rpx;
  410. font-family: Microsoft YaHei;
  411. font-weight: 400;
  412. }
  413. }
  414. }
  415. .icon-tip {
  416. width: 100rpx;
  417. height: 100rpx;
  418. }
  419. .content {
  420. margin-left: 40rpx;
  421. }
  422. }
  423. ::v-deep .u-mode-center-box {
  424. border-radius: 10rpx;
  425. }
  426. .squire {
  427. padding: 30rpx 30rpx 50rpx 50rpx;
  428. }
  429. .mask-close {
  430. text-align: right;
  431. }
  432. .icon-closed {
  433. width: 48rpx;
  434. height: 48rpx;
  435. }
  436. .mask-title {
  437. text-align: center;
  438. font-size: 32rpx;
  439. color: $uni-text-color-black;
  440. margin-bottom: 50rpx;
  441. }
  442. .icon-closed {
  443. width: 40rpx;
  444. height: 40rpx;
  445. }
  446. .bgImgs {
  447. background-image: var(--bgimg);
  448. background-repeat: no-repeat;
  449. background-size: 100% 100%;
  450. }
  451. .con {
  452. .con-item {
  453. padding: 20rpx 0;
  454. box-sizing: border-box;
  455. width: 630rpx;
  456. // height: 198rpx;
  457. margin: 30rpx auto 0;
  458. }
  459. .item-header {
  460. display: flex;
  461. align-items: center;
  462. justify-content: space-between;
  463. .l-txt {
  464. margin-left: 30rpx;
  465. font-family: SourceHanSansCN, SourceHanSansCN;
  466. font-weight: bold;
  467. font-size: 26rpx;
  468. color: #FFF9EE;
  469. }
  470. .r-tip {
  471. width: 150rpx;
  472. height: 50rpx;
  473. font-family: SourceHanSansCN, SourceHanSansCN;
  474. font-size: 22rpx;
  475. color: #BF6229;
  476. text-align: center;
  477. line-height: 46rpx;
  478. position: relative;
  479. left: 10rpx;
  480. }
  481. }
  482. .b-txt {
  483. margin-top: 10rpx;
  484. display: flex;
  485. align-items: center;
  486. padding: 0 20rpx;
  487. .l-money {
  488. font-family: MicrosoftYaHei;
  489. font-size: 28rpx;
  490. color: #FFFFFF;
  491. .fee {
  492. margin-left: 5rpx;
  493. font-size: 92rpx;
  494. }
  495. }
  496. .c-line {
  497. margin: 0 18rpx 0 30rpx;
  498. background: #FFF9EE;
  499. height: 70rpx;
  500. width: 1rpx;
  501. }
  502. .r-desc {
  503. font-family: SourceHanSansCN, SourceHanSansCN;
  504. font-size: 26rpx;
  505. color: #FFF0D0;
  506. }
  507. }
  508. }
  509. </style>