|
|
@@ -3,7 +3,7 @@ |
|
|
|
<navBgCar></navBgCar> |
|
|
|
<view class="content-value"> |
|
|
|
<view |
|
|
|
@click="savaHandle(item)" |
|
|
|
@click="savaHandle(item)" |
|
|
|
class="ul-item" |
|
|
|
v-for="(item, index) in state.dataArray" |
|
|
|
:key="index" |
|
|
@@ -33,6 +33,17 @@ |
|
|
|
</view> |
|
|
|
<view class="bottomTip"> 到底啦!敬请期待其他产品! </view> |
|
|
|
</view> |
|
|
|
<u-popup mode="center" v-model="state.choiceCardShow"> |
|
|
|
<view class="squire"> |
|
|
|
<u-radio-group> |
|
|
|
<u-radio :customStyle="{marginBottom: '8px'}" activeColor="#2CE242" |
|
|
|
v-for="(item, index) in state.radiolist1" :key="index" :label="item.disabled" :name="item.name" |
|
|
|
@change="radioChange"> |
|
|
|
{{item.name}} |
|
|
|
</u-radio> |
|
|
|
</u-radio-group> |
|
|
|
</view> |
|
|
|
</u-popup> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
@@ -52,42 +63,52 @@ const imgURL = `${fileURL}image/`; |
|
|
|
// import { setItem } from "@/utils/storage"; |
|
|
|
|
|
|
|
const scrollTop = ref(0); //滚动距离 |
|
|
|
|
|
|
|
// 单选默认数据 |
|
|
|
// let flag = ref(true) |
|
|
|
// 单选 |
|
|
|
const radioChange = (n) => { |
|
|
|
console.log('radioChange', n); |
|
|
|
if (n == '记账卡') { |
|
|
|
state.isValueCard=1 |
|
|
|
} else if(n == '储值卡'){ |
|
|
|
state.isValueCard=2 |
|
|
|
}else{ |
|
|
|
state.isValueCard=3 |
|
|
|
} |
|
|
|
uni.redirectTo({ |
|
|
|
url: `/subpackage/orders/essential-information?promoteId=${getItem("promoteId")}&userType=${state.userType}&type=${state.type}&isSign=${state.isSign}&isValueCard=${state.isValueCard}`, |
|
|
|
}); |
|
|
|
} |
|
|
|
const savaHandle = (val) => { |
|
|
|
state.choiceCardShow=true; |
|
|
|
console.log("vAL",val) |
|
|
|
// productReCodeAction(val.id).then((value) => { |
|
|
|
// if (val.isValueCard === 2) { |
|
|
|
setItem("clientFee", val.clientFee); |
|
|
|
setItem("promoteId", val.promoteId); |
|
|
|
setItem("isValueCard", val.isValueCard); |
|
|
|
state.isSign=val.isSign; |
|
|
|
uni.redirectTo({ |
|
|
|
url: `/subpackage/orders/essential-information?promoteId=${val.promoteId}&userType=${state.userType}&type=${state.type}&isSign=${state.isSign}`, |
|
|
|
}); |
|
|
|
|
|
|
|
// if (state.userType === 1) { |
|
|
|
// uni.redirectTo({ |
|
|
|
// url: `/subpackage/orders/opening-account-people?orderId=${state.orderId}&vehiclePlateColor=${state.vehiclePlateColor}`, |
|
|
|
// }); |
|
|
|
// } else { |
|
|
|
// uni.redirectTo({ |
|
|
|
// url: `/subpackage/orders/opening-account-unit?orderId=${state.orderId}&vehiclePlateColor=${state.vehiclePlateColor}`, |
|
|
|
// }); |
|
|
|
// } |
|
|
|
|
|
|
|
// if (val.isValueCard === 2) { |
|
|
|
// setItem('clientFee', val.clientFee) |
|
|
|
// setItem("productId", val.id) |
|
|
|
// uni.navigateTo({ |
|
|
|
// url: `/subpackage/orders/release-products?orderId=${state.orderId}&&clientFee=${val.clientFee}&&id=${val.id}`, |
|
|
|
// }); |
|
|
|
// } else { |
|
|
|
|
|
|
|
// uni.navigateTo({ |
|
|
|
// url: `/subpackage/orders/product-detail?orderId=${state.orderId}&&clientFee=${val.clientFee}&&id=${val.id}`, |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// 判断是几张卡 |
|
|
|
if(val.cardTypeArr.split(",").length==1){ |
|
|
|
if(val.cardTypeArr.split(",")[0]=="记账卡"){ |
|
|
|
state.isValueCard=1 |
|
|
|
} else if(val.cardTypeArr.split(",")[0] == '储值卡'){ |
|
|
|
state.isValueCard=2 |
|
|
|
}else{ |
|
|
|
state.isValueCard=3 |
|
|
|
} |
|
|
|
uni.redirectTo({ |
|
|
|
url: `/subpackage/orders/essential-information?promoteId=${getItem("promoteId")}&userType=${state.userType}&type=${state.type}&isValueCard=${state.isValueCard}`, |
|
|
|
}); |
|
|
|
}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) |
|
|
|
} |
|
|
|
console.log("state.radiolist1",state.radiolist1) |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
onLoad((option: any) => { |
|
|
@@ -96,24 +117,6 @@ onLoad((option: any) => { |
|
|
|
// state.vehiclePlateColor = option.vehiclePlateColor; |
|
|
|
state.userType = option.userType; |
|
|
|
state.type = option.type; |
|
|
|
// var data = { |
|
|
|
// orderId: state.orderId, |
|
|
|
// }; |
|
|
|
// const options = { |
|
|
|
// type: 2, |
|
|
|
// data: data, |
|
|
|
// method: "POST", |
|
|
|
// showLoading: true, |
|
|
|
// }; |
|
|
|
// console.log('输出内容',options.data) |
|
|
|
// request(etcQueryProduct, options).then((res) => { |
|
|
|
// console.log(res.bizContent); |
|
|
|
// const data = stringToJson(res.bizContent); |
|
|
|
// console.log(data); |
|
|
|
// console.log(typeof(data)); |
|
|
|
// state.dataArray = data?data:[]; |
|
|
|
// }); |
|
|
|
|
|
|
|
var data = { |
|
|
|
type: state.type, |
|
|
|
source:'WECHAT' //请求方来源 |
|
|
@@ -175,6 +178,9 @@ const productReCodeAction = (id) => { |
|
|
|
}; |
|
|
|
|
|
|
|
const state = reactive({ |
|
|
|
isValueCard:1, //卡的类型 |
|
|
|
radiolist1:[], //选择卡的数据列表 |
|
|
|
choiceCardShow:false, //选择卡的弹出框 |
|
|
|
isSign:'', |
|
|
|
orderId: "", |
|
|
|
userType: 1, //1 个人 2单位 |
|
|
@@ -197,6 +203,9 @@ const state = reactive({ |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
::v-deep .u-icon__icon{ |
|
|
|
top: -4px !important; |
|
|
|
} |
|
|
|
.bottomTip { |
|
|
|
margin-top: 100rpx; |
|
|
|
text-align: center; |
|
|
@@ -349,4 +358,10 @@ const state = reactive({ |
|
|
|
color: white; |
|
|
|
// float: right; |
|
|
|
} |
|
|
|
::v-deep .u-mode-center-box{ |
|
|
|
border-radius: 10rpx; |
|
|
|
} |
|
|
|
.squire{ |
|
|
|
padding: 20rpx; |
|
|
|
} |
|
|
|
</style> |