123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570 |
- <template>
- <navBar title="产品选择" :scrollTop="scrollTop" navbgClass="nav-bgXin" fontColor='#fff'></navBar>
- <navBgCar :activeNum='1'></navBgCar>
- <view class="content-value">
- <view class="con">
- <view class="con-item bgImgs" v-for="(item, index) in state.dataArray" :key="index"
- :style="{'--bgimg':`url(${$imgUrl}issuance/chanping-bg.png)`}" @click="toEquity(item)">
- <view class="item-header ">
- <view class="l-txt">
- {{ item.productName }}
- </view>
- <view class="r-tip bgImgs" :style="{'--bgimg':`url(${$imgUrl}issuance/r-tip.png)`}">
- {{ item['cardTypeArr'] }}
- </view>
- </view>
- <view class="b-txt">
- <view class="l-money">
- <text>¥</text> <text class="fee">{{ item.fee * 0.01 }}</text>
- </view>
- <view class="c-line" v-if='item.remarks'>
- </view>
- <view class="r-desc">
- {{item.remarks}}
- <!-- 产品权益专用,2%加息10天 -->
- </view>
- </view>
- </view>
- </view>
- <view class="bottomTip" v-if='state.dataArray.length===0'> 暂无产品,敬请期待! </view>
- </view>
- <u-popup mode="center" v-model="state.choiceCardShow">
- <view class="squire">
- <view class="mask-close">
- <image :src="fileURL + 'image/index/icon-close.png'" class="icon-closed" @click="closeMask"></image>
- </view>
- <view class="mask-title" :style="{ '--color': color }">选择办理卡类型</view>
- <view class="as-layout-horizontal">
- <view v-for="(item, index) in state.radiolist1" :key="index" :label="item.disabled" :name="item.name"
- @click="radioChange(item.name)" style="width: 100%;display: flex;align-items: center;margin-bottom: 30rpx;">
- <view class="as-layout-vertical as-gravity-center">
- <image style="width: 140rpx; height: 100rpx; border-radius: 20rpx;margin-right: 20rpx;"
- :src="`${$imgUrl}card2.png`" mode="aspectFill"></image>
- <view style="margin-top: 20rpx;text-align: center;">
- {{item.name}}
- </view>
- </view>
- </view>
- </view>
- </view>
- </u-popup>
- </template>
-
- <script setup lang="ts">
- import { onLoad, onPageScroll, onShow } from "@dcloudio/uni-app";
- import { reactive, ref } from "vue";
- import { pageQuery } from "@/utils/network/api.js";
- import { requestNew } from "@/utils/network/request.js";
- import { fileURL } from "@/datas/fileURL.js";
- import navBgCar from "./components/nav-bg-car1";
- import navBar from "@/components/nav-bar/nav-bar2.vue";
- import { setItem } from "@/utils/storage.ts";
- import { agentId } from "@/utils/network/difference";
- import { msg,navTo } from "@/utils/utils";
- const imgURL = `${fileURL}image/`;
-
- let bgc = ""
- // #ifdef MP-ALIPAY
- bgc = "#FFFFFF"
- // #endif
- // #ifdef MP-WEIXIN
- bgc = "#F4F6FA"
- // #endif
-
- const scrollTop = ref(0); //滚动距离
- // 单选默认数据
- // 单选
- // 单选
- const radioChange = (n) => {
- console.log('radioChange', n);
- if (n == '记账卡') {
- state.isValueCard = 2
- state.cardType = 1
- } else if (n == '储值卡') {
- state.isValueCard = 1
- state.cardType = 2
- } else {
- state.isValueCard = 2
- state.cardType = 3
- }
- setItem("isValueCard", state.isValueCard);
- 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}`)
-
- }
- const toEquity = (itemData) => {
- if (itemData['cardTypeArr'].split(",").length == 1) {
- if (itemData['cardTypeArr'].split(",")[0] == "记账卡") {
- state.isValueCard = 2
- state.cardType = 1
- } else if (itemData['cardTypeArr'].split(",")[0] == '储值卡') {
- state.isValueCard = 1
- state.cardType = 2
- } else {
- state.isValueCard = 2
- state.cardType = 3
- }
-
- }
- console.log("state.isValueCard", state.isValueCard)
- setItem("isValueCard", state.isValueCard);
- setItem("currentProductList", itemData);
- navTo(`/subpackage/orders/equity/equityList?userType=${state.userType}&vanType=${state.vanType}&cardType=${state.cardType}&isValueCard=${state.isValueCard}`)
-
- }
- const savaHandle = (val, idx) => {
- console.log("vAL", val)
- // 1不能点击 0可以点击 权益置灰 弹出提示
- if (val.equityList[0]['isClick'] == 1) {
- msg(val.equityList[0]['noClickCase'])
- return;
- }
- setItem("clientFee", val.clientFee);
- // setItem("promoteId", val.promoteId);
-
- state.isSign = val.isSign;
- state.signAgencyId = val['deviceType'];
- state.equityId = val.equityList[idx].equityId;
- // 产品金额+权益金额
- state.fee = Number(val.fee) + Number(val.equityList[idx].discountPrice);
- // 判断是几张卡
-
- if (val['cardTypeArr'].split(",").length == 1) {
- if (val['cardTypeArr'].split(",")[0] == "记账卡") {
- state.isValueCard = 2
- state.cardType = 1
- } else if (val['cardTypeArr'].split(",")[0] == '储值卡') {
- state.isValueCard = 1
- state.cardType = 2
- } else {
- state.isValueCard = 2
- state.cardType = 3
- }
- console.log("state.isValueCard", state.isValueCard)
- setItem("isValueCard", state.isValueCard);
- 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']}`)
- } else {
- state.radiolist1 = [];
- // 处理卡的数据
- for (var i = 0; i < val['cardTypeArr'].split(",").length; i++) {
- const obj = {};
- obj["name"] = val['cardTypeArr'].split(",")[i];
- obj["disabled"] = false;
- state.radiolist1.push(obj)
- }
- state.choiceCardShow = true;
- console.log("state.radiolist1", state.radiolist1)
- }
- };
-
- onLoad((option : any) => {
- // #ifdef MP-ALIPAY
- state.sysType = 'ALI';
- // #endif
- // #ifdef MP-WEIXIN
- state.sysType = 'WECHAT';
- // #endif
- state.userType = Number(option.userType);
- state.vanType = Number(option.vanType);
- productList();
- console.log("option选择产品列表", option)
- });
-
- // 产品列表
- const productList = () => {
- var data = {
- userType: state.userType,
- agencyId: agentId,
- vanType: state.vanType,
- };
- console.log("data", data)
- const options = {
- data: data,
- method: "POST",
- showLoading: true,
- };
- console.log("输出内容", options);
- requestNew(pageQuery, options).then((res) => {
- console.log("产品列表", res);
- const data = res;
- if (data.list && data.list.length > 0) {
- state.dataArray = data.list ? data.list : [];
- console.log("state.dataArray", state.dataArray);
- for (var i = 0; i < state.dataArray.length; i++) {
- const cardTypeArr = []
- for (var j = 0; j < state.dataArray[i].cardType.length; j++) {
- if (state.dataArray[i].cardType[j] == '2') {
- cardTypeArr.push('储值卡')
- } else if (state.dataArray[i].cardType[j] == '1') {
- cardTypeArr.push('记账卡')
- } else if (state.dataArray[i].cardType[j] == '3') {
- cardTypeArr.push('预存卡')
- }
- }
- state.dataArray[i]['cardTypeArr'] = cardTypeArr.toString()
- }
- } else {
- uni.showModal({
- title: '提示',
- content: '尊敬的用户:感谢您的关注!我们正紧锣密鼓地为您准备一款全新的产品。虽然目前尚未上线,但请您耐心等待,我们将以更好的姿态与更丰富的功能,为您呈现一份超出期待的产品。',
- showCancel: false,
- success: function (res) {
- if (res.confirm) {
- uni.switchTab({
- url: '/pages/index/index'
- })
- console.log('用户点击确定');
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- }
-
- console.log("state.dataArray", state.dataArray)
- });
- }
- //监听页面滚动
- onPageScroll((e) => {
- scrollTop.value = e.scrollTop;
- });
-
- const state = reactive({
- isValueCard: 1, //卡的类型
- radiolist1: [], //选择卡的数据列表
- choiceCardShow: false, //选择卡的弹出框
- isSign: '',
- sysType: "",
- orderId: "",
- userType: 1, //1 个人 2单位
- vanType: 0, //0 客车 1货车
- vehiclePlateColor: "",
- data: {
- show: false,
- src: imgURL + "applyCard/edit.png",
- },
- dataArray: [],
- list: [
- {
- bg: imgURL + "applyCard/product-bg.png",
- icon: imgURL + "applyCard/wechat.png",
- title: "【货车】微信车主服务",
- tip: "绑定微信支付,无需绑定银行卡",
- },
- ],
- fee: 0, //产品金额
- equityId: "",
- signAgencyId: "",//渠道标识
- cardType: ""
- });
- const closeMask = () => {
- state.choiceCardShow = false;
- };
- </script>
-
- <style lang="scss" scoped>
- ::v-deep .u-radio {
- display: flex !important;
- align-items: center !important;
- float: none !important;
- }
-
- ::v-deep .u-icon__icon {
- top: -4px !important;
- }
-
- .bottomTip {
- padding: 30rpx 0 0;
- text-align: center;
- font-size: 28rpx;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #b3b3b3;
- }
-
- .content-value {
- position: absolute;
- top: 370rpx;
- // height: calc(100% - 390rpx);
- background-color: #fff;
- border-radius: 12rpx;
- padding: 20rpx 0 50rpx;
- margin: 0 30rpx;
- width: 690rpx;
-
- .img-pos {
- position: absolute;
- left: 500rpx;
- top: -38rpx;
- right: 50rpx;
-
- .img-flex {
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- .car-img {
- width: 86rpx;
- height: 42rpx;
- }
-
- .flag-img {
- width: 30rpx;
- height: 35rpx;
- }
- }
- }
- }
-
- .flex {
- display: flex;
- align-items: center;
- }
-
- .action {
- margin-top: 30rpx;
- padding-left: 20rpx;
- padding-right: 20rpx;
- padding-bottom: 30rpx;
-
- .button {
- height: 80rpx;
- background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%);
- border-radius: 40rpx;
- font-size: 32rpx;
- font-weight: 400;
- color: #ffffff;
- line-height: 80rpx;
- }
- }
-
- .action-btn {
- margin-left: 45rpx;
- width: 121rpx;
- height: 61rpx;
- border: 1px solid rgba(255, 255, 255, 1);
- border-radius: 30rpx;
- background: rgba(255, 255, 255, 0.2);
-
- text-align: center;
- font-size: 30rpx;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #ffffff;
- line-height: 61rpx;
- }
-
- .tag1 {
- padding: 5rpx;
- background: rgba(0, 179, 139, 0.5);
- border-radius: 6rpx;
- font-size: 22rpx;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #ffffff;
- }
-
- .tag3 {
- padding: 5rpx;
- background: rgba(139, 112, 228, 0.5);
- border-radius: 6rpx;
- font-size: 22rpx;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #ffffff;
- }
-
- .tag2 {
- padding: 5rpx;
- background: rgba(249, 97, 60, 0.5);
- border-radius: 6rpx;
- font-size: 22rpx;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #ffffff;
- }
-
- .ul-item-hui {
- padding: 5px 20rpx;
- display: flex;
- align-items: center;
- color: #c1c1cc;
-
- .item-value {
- padding: 20rpx;
- position: absolute;
- display: flex;
- align-items: center;
- width: 80%;
-
- .content {
- width: 51%;
-
- .title {
- font-size: 32rpx;
- font-family: Microsoft YaHei;
- font-weight: 400;
-
- }
-
- .tip {
- font-size: 24rpx;
- font-family: Microsoft YaHei;
- font-weight: 400;
- }
- }
- }
-
- .icon-tip {
- width: 100rpx;
- height: 100rpx;
- }
-
- .content {
- margin-left: 40rpx;
- }
- }
-
- .ul-item {
- padding: 5px 20rpx;
- display: flex;
- align-items: center;
- color: white;
-
- .item-value {
- padding: 20rpx;
- position: absolute;
- display: flex;
- align-items: center;
- width: 80%;
-
- .content {
- width: 51%;
-
- .title {
- font-size: 32rpx;
- font-family: Microsoft YaHei;
- font-weight: 400;
-
- }
-
- .tip {
- font-size: 24rpx;
- font-family: Microsoft YaHei;
- font-weight: 400;
- }
- }
- }
-
- .icon-tip {
- width: 100rpx;
- height: 100rpx;
- }
-
- .content {
- margin-left: 40rpx;
- }
- }
-
- ::v-deep .u-mode-center-box {
- border-radius: 10rpx;
- }
-
- .squire {
- padding: 30rpx 30rpx 50rpx 50rpx;
- }
-
- .mask-close {
- text-align: right;
- }
-
- .icon-closed {
- width: 48rpx;
- height: 48rpx;
- }
-
- .mask-title {
- text-align: center;
- font-size: 32rpx;
- color: $uni-text-color-black;
- margin-bottom: 50rpx;
- }
-
- .icon-closed {
- width: 40rpx;
- height: 40rpx;
- }
-
- .bgImgs {
- background-image: var(--bgimg);
- background-repeat: no-repeat;
- background-size: 100% 100%;
- }
-
- .con {
-
- .con-item {
- padding: 20rpx 0;
- box-sizing: border-box;
- width: 630rpx;
- // height: 198rpx;
- margin: 30rpx auto 0;
- }
-
- .item-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
-
- .l-txt {
- margin-left: 30rpx;
- font-family: SourceHanSansCN, SourceHanSansCN;
- font-weight: bold;
- font-size: 26rpx;
- color: #FFF9EE;
- }
-
- .r-tip {
- width: 150rpx;
- height: 50rpx;
- font-family: SourceHanSansCN, SourceHanSansCN;
- font-size: 22rpx;
- color: #BF6229;
- text-align: center;
- line-height: 46rpx;
- position: relative;
- left: 10rpx;
- }
- }
-
- .b-txt {
- margin-top: 10rpx;
- display: flex;
- align-items: center;
- padding: 0 20rpx;
-
- .l-money {
- font-family: MicrosoftYaHei;
- font-size: 28rpx;
- color: #FFFFFF;
-
- .fee {
- margin-left: 5rpx;
- font-size: 92rpx;
- }
- }
-
- .c-line {
- margin: 0 18rpx 0 30rpx;
- background: #FFF9EE;
- height: 70rpx;
- width: 1rpx;
- }
-
- .r-desc {
- font-family: SourceHanSansCN, SourceHanSansCN;
- font-size: 26rpx;
- color: #FFF0D0;
- }
- }
- }
- </style>
|