'完成填写基本信息' = 1, | '完成填写基本信息' = 1, | ||||
'完成个人/单位信息上传' = 2, | '完成个人/单位信息上传' = 2, | ||||
'完成车辆信息上传' = 3, | '完成车辆信息上传' = 3, | ||||
'待支付' = 4, | |||||
// '待支付' = 4, | |||||
'待支付' = 26, | |||||
'已支付' = 5, | '已支付' = 5, | ||||
'待审核' = 6, | '待审核' = 6, | ||||
'审核不通过' = 7, | '审核不通过' = 7, |
} | } | ||||
//TODO 目前后端规定验证码只能是123456,所以目前写死 | //TODO 目前后端规定验证码只能是123456,所以目前写死 | ||||
// navTo(`/login/register-step3?phone=${phone.value}&code=${code.value}`); | |||||
navTo(`/login/register-step3?phone=${phone.value}&code=123456`); | |||||
navTo(`/login/register-step3?phone=${phone.value}&code=${code.value}`); | |||||
// navTo(`/login/register-step3?phone=${phone.value}&code=123456`); | |||||
}; | }; | ||||
</script> | </script> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</template> | </template> | ||||
<script setup lang="ts"> | <script setup lang="ts"> | ||||
navTo, | navTo, | ||||
confirm | confirm | ||||
} from "@/utils/utils"; | } from "@/utils/utils"; | ||||
const bgOrange = `url(${fileURL}image/index/bg-orange.png) center center no-repeat`; | const bgOrange = `url(${fileURL}image/index/bg-orange.png) center center no-repeat`; | ||||
const bgBlue = `url(${fileURL}image/index/bg-blue.png) center center no-repeat`; | const bgBlue = `url(${fileURL}image/index/bg-blue.png) center center no-repeat`; | ||||
const list = reactive(["您有一条待办事项,还未办理完成"]) | const list = reactive(["您有一条待办事项,还未办理完成"]) |
<view class="right"> | <view class="right"> | ||||
<view class="right-content"> | <view class="right-content"> | ||||
<block v-if="menu.list.length >0"> | <block v-if="menu.list.length >0"> | ||||
<view v-for="(item,index) in menu.list[tableSelectIndex].subMenus" :key='index' class="item-box" @click="toNext(item.link)"> | |||||
<view v-for="(item,index) in menu.list[tableSelectIndex].children" :key='index' class="item-box" @click="toNext(item.link)"> | |||||
<view class="item bg-blue" :style="{ '--background': bgBlue }"> | <view class="item bg-blue" :style="{ '--background': bgBlue }"> | ||||
<image :src="`${$imgUrl}${item.iconPath}`" /> | <image :src="`${$imgUrl}${item.iconPath}`" /> | ||||
</view> | </view> |
source: 'WECHAT', | source: 'WECHAT', | ||||
tabIndex: '0', | tabIndex: '0', | ||||
orderStep: '11', | orderStep: '11', | ||||
isValueCard: '2' | |||||
// isValueCard: '2' | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
source: 'WECHAT', | source: 'WECHAT', | ||||
tabIndex: '0', | tabIndex: '0', | ||||
orderStep: '11', | orderStep: '11', | ||||
isValueCard: '2' | |||||
// isValueCard: '2' | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
source: "WECHAT", | source: "WECHAT", | ||||
tabIndex: "0", | tabIndex: "0", | ||||
orderStep: "11", | orderStep: "11", | ||||
isValueCard: "2", | |||||
// isValueCard: "2", | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
import { getEtcCardStatus } from "@/datas/etcCardStatus.js"; | import { getEtcCardStatus } from "@/datas/etcCardStatus.js"; | ||||
import { getItem } from "@/utils/storage"; | import { getItem } from "@/utils/storage"; | ||||
import {hasLogin} from "@/utils/utils.ts" | |||||
const scrollTop = ref(0); | const scrollTop = ref(0); | ||||
//监听页面滚动 | //监听页面滚动 | ||||
state.data.transferLogs = value.transferLogs; | state.data.transferLogs = value.transferLogs; | ||||
state.show = true; | state.show = true; | ||||
} else { | } else { | ||||
if (state.type == 1 || state.type == "1") { | |||||
uni.redirectTo({ | |||||
url: `/subpackage/applyCard/addAddress?orderId=${state.form.orderId | |||||
}&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`, | |||||
}); | |||||
} else { | |||||
// 签约 | |||||
if(state.isSign == 1){ | |||||
if (!hasLogin()) { | |||||
uni.redirectTo({ | |||||
url: `/subpackage/applyCard/addAddress?orderId=${state.form.orderId | |||||
}&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`, | |||||
}); | |||||
} else { | |||||
uni.redirectTo({ | |||||
// url: `/subpackage/applyCard/choice-product?orderId=${state.form.orderId}`, | |||||
url: `/subpackage/applyCard/release-products?orderId=${state.form.orderId | |||||
}&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`, | |||||
}); | |||||
} | |||||
}else{ | |||||
// 不签约 | |||||
uni.redirectTo({ | uni.redirectTo({ | ||||
// url: `/subpackage/applyCard/choice-product?orderId=${state.form.orderId}`, | |||||
url: `/subpackage/applyCard/release-products?orderId=${state.form.orderId | |||||
}&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`, | |||||
url: `/subpackage/applyCard/sign-up?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`, | |||||
}); | }); | ||||
} | } | ||||
} | } | ||||
outlineL: "", | outlineL: "", | ||||
outlineW: "", | outlineW: "", | ||||
outlineH: "", | outlineH: "", | ||||
isSign:'' | |||||
}); | }); | ||||
onLoad((option : any) => { | onLoad((option : any) => { | ||||
state.form.orderId = option.orderId; | state.form.orderId = option.orderId; | ||||
state.type = option.type; | state.type = option.type; | ||||
state.vehiclePlateColor = option.vehiclePlateColor; | state.vehiclePlateColor = option.vehiclePlateColor; | ||||
state.isSign=option.isSign | |||||
console.log("option",option) | |||||
}); | }); | ||||
//外廓尺寸输入框 | //外廓尺寸输入框 |
<image class="icon-tip" :src="`${$imgUrl}applyCard/wechat.png`"></image> | <image class="icon-tip" :src="`${$imgUrl}applyCard/wechat.png`"></image> | ||||
<view class="content"> | <view class="content"> | ||||
<view class="title"> | <view class="title"> | ||||
{{ item.name }} | |||||
{{ item.promoteName }} | |||||
</view> | </view> | ||||
<view style="margin-top: 15rpx" class="tip"> | |||||
{{ item.productMsg }} | |||||
<!-- 1记账卡2储值卡3记存卡 --> | |||||
<view style="margin-top: 15rpx" class="tip" v-if="item.cardType=='1'"> | |||||
记账卡 | |||||
</view> | </view> | ||||
<view style="margin-top: 15rpx" class="tip" v-else> | |||||
储值卡 | |||||
</view> | |||||
</view> | </view> | ||||
<view class="money"> | |||||
¥:{{ item.fee * 0.01 }} | |||||
</view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="bottomTip"> 到底啦!敬请期待其他产品! </view> | <view class="bottomTip"> 到底啦!敬请期待其他产品! </view> | ||||
const scrollTop = ref(0); //滚动距离 | const scrollTop = ref(0); //滚动距离 | ||||
const savaHandle = (val) => { | const savaHandle = (val) => { | ||||
console.log("vAL",val) | |||||
// productReCodeAction(val.id).then((value) => { | // productReCodeAction(val.id).then((value) => { | ||||
// if (val.isValueCard === 2) { | // if (val.isValueCard === 2) { | ||||
setItem("clientFee", val.clientFee); | setItem("clientFee", val.clientFee); | ||||
setItem("productId", val.id); | |||||
setItem("promoteId", val.promoteId); | |||||
setItem("isValueCard", val.isValueCard); | setItem("isValueCard", val.isValueCard); | ||||
state.isSign=val.isSign; | |||||
uni.redirectTo({ | uni.redirectTo({ | ||||
url: `/subpackage/applyCard/essential-information?productId=${val.id}&userType=${state.userType}&type=${state.type}`, | |||||
url: `/subpackage/applyCard/essential-information?promoteId=${val.promoteId}&userType=${state.userType}&type=${state.type}&isSign=${state.isSign}`, | |||||
}); | }); | ||||
// if (state.userType === 1) { | // if (state.userType === 1) { | ||||
method: "POST", | method: "POST", | ||||
showLoading: true, | showLoading: true, | ||||
}; | }; | ||||
console.log("输出内容", options.data); | |||||
console.log("输出内容", options); | |||||
request(etcQueryProduct, options).then((res) => { | request(etcQueryProduct, options).then((res) => { | ||||
// console.log(res.bizContent); | // console.log(res.bizContent); | ||||
const data = stringToJson(res.bizContent); | const data = stringToJson(res.bizContent); | ||||
console.log(data); | console.log(data); | ||||
// console.log(typeof(data)); | // console.log(typeof(data)); | ||||
state.dataArray = data.csmsnProducts ?? []; | |||||
state.dataArray = data.csmsnPromoteDistPro ?? []; | |||||
// for(var i=0;i<state.dataArray.length;i++){ | |||||
// for(var j=0;j<state.dataArray[i].cardType.length;j++){ | |||||
// const cardTypeArr=[] | |||||
// if(state.dataArray[i].cardType[j]=='1'){ | |||||
// cardTypeArr.push('记账卡') | |||||
// }else if(state.dataArray[i].cardType[j]=='2'){ | |||||
// cardTypeArr.push('储值卡') | |||||
// }else if(state.dataArray[i].cardType[j]=='3'){ | |||||
// cardTypeArr.push('记存卡') | |||||
// } | |||||
// } | |||||
// state.dataArray[i].cardTypeArr=cardTypeArr.toString() | |||||
// } | |||||
console.log("state.dataArray",state.dataArray) | |||||
}); | }); | ||||
}); | }); | ||||
}; | }; | ||||
const state = reactive({ | const state = reactive({ | ||||
isSign:'', | |||||
orderId: "", | orderId: "", | ||||
userType: 1, //1 个人 2单位 | userType: 1, //1 个人 2单位 | ||||
type: 0, //0 客车 1货车 | type: 0, //0 客车 1货车 | ||||
.content-value { | .content-value { | ||||
position: relative; | position: relative; | ||||
margin-top: -50rpx; | |||||
// margin-top: -50rpx; | |||||
padding: 0rpx 30rpx; | padding: 0rpx 30rpx; | ||||
position: relative; | position: relative; | ||||
position: absolute; | position: absolute; | ||||
display: flex; | display: flex; | ||||
align-items: center; | align-items: center; | ||||
justify-content: space-around; | |||||
// justify-content: space-around; | |||||
width: 80%; | |||||
.content { | .content { | ||||
width: 51%; | |||||
.title { | .title { | ||||
font-size: 32rpx; | font-size: 32rpx; | ||||
font-family: Microsoft YaHei; | font-family: Microsoft YaHei; | ||||
font-weight: 400; | font-weight: 400; | ||||
color: #ffffff; | color: #ffffff; | ||||
} | } | ||||
.tip { | .tip { | ||||
margin-left: 40rpx; | margin-left: 40rpx; | ||||
} | } | ||||
} | } | ||||
.money{ | |||||
color: white; | |||||
// float: right; | |||||
} | |||||
</style> | </style> |
region: "", | region: "", | ||||
address: "", | address: "", | ||||
postalCode: "", | postalCode: "", | ||||
productId:"", | |||||
promoteId:"", | |||||
}, | }, | ||||
show: false, | show: false, | ||||
addressArray: [], | addressArray: [], | ||||
isSign:'' | |||||
}); | }); | ||||
/* 选择车牌颜色 */ | /* 选择车牌颜色 */ | ||||
} else { | } else { | ||||
const data = stringToJson(res.bizContent); | const data = stringToJson(res.bizContent); | ||||
console.log(data); | console.log(data); | ||||
//提交产品信息 | //提交产品信息 | ||||
productReCodeAction(data.orderId).then((result)=>{ | productReCodeAction(data.orderId).then((result)=>{ | ||||
console.log(state.data); | console.log(state.data); | ||||
console.log(result); | console.log(result); | ||||
if (state.data.userType == 1) { | if (state.data.userType == 1) { | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: `/subpackage/applyCard/opening-account-people?orderId=${data.orderId}&&vehiclePlateColor=${state.data.vehiclePlateColor}`, | |||||
url: `/subpackage/applyCard/opening-account-people?orderId=${data.orderId}&&vehiclePlateColor=${state.data.vehiclePlateColor}&isSign=${state.isSign}`, | |||||
}); | }); | ||||
} else { | } else { | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: `/subpackage/applyCard/opening-account-unit?orderId=${data.orderId}&&vehiclePlateColor=${state.data.vehiclePlateColor}`, | |||||
url: `/subpackage/applyCard/opening-account-unit?orderId=${data.orderId}&&vehiclePlateColor=${state.data.vehiclePlateColor}&isSign=${state.isSign}`, | |||||
}); | }); | ||||
} | } | ||||
uni.redirectTo({ | uni.redirectTo({ | ||||
url: `/subpackage/applyCard/choice-product?orderId=${val.orderId}`, | url: `/subpackage/applyCard/choice-product?orderId=${val.orderId}`, | ||||
}); | }); | ||||
} else if (val.orderStep === 4) { | |||||
}else if (val.orderStep === 4) { | |||||
uni.redirectTo({ | |||||
url: `/subpackage/applyCard/product-detail?orderId=${val.orderId}&&clientFee=${val.product.clientFee}&&id=${val.productId}`, | |||||
}); | |||||
} else if (val.orderStep === 26) { | |||||
uni.redirectTo({ | uni.redirectTo({ | ||||
url: `/subpackage/applyCard/product-detail?orderId=${val.orderId}&&clientFee=${val.product.clientFee}&&id=${val.productId}`, | url: `/subpackage/applyCard/product-detail?orderId=${val.orderId}&&clientFee=${val.product.clientFee}&&id=${val.productId}`, | ||||
}); | }); | ||||
} | } | ||||
}; | }; | ||||
onLoad((option: any) => { | onLoad((option: any) => { | ||||
state.data.opId = getItem(StorageKeys.OpenId); | state.data.opId = getItem(StorageKeys.OpenId); | ||||
state.data.type = option.type; //客车 | state.data.type = option.type; //客车 | ||||
state.data.userType = option.userType; | state.data.userType = option.userType; | ||||
state.data.productId = option.productId; | |||||
state.data.promoteId = option.promoteId; | |||||
state.isSign=option.isSign | |||||
console.log("订单选择推广发行产品接口",option) | |||||
}); | }); | ||||
//监听页面滚动 | //监听页面滚动 | ||||
var data = { | var data = { | ||||
openId: getItem(StorageKeys.OpenId), | openId: getItem(StorageKeys.OpenId), | ||||
}; | }; | ||||
console.log(getItem(StorageKeys.OpenId)); | |||||
if (getItem(StorageKeys.OpenId)) { | if (getItem(StorageKeys.OpenId)) { | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, | ||||
showLoading: true, | showLoading: true, | ||||
}; | }; | ||||
request(addressQuery, options).then((res) => { | request(addressQuery, options).then((res) => { | ||||
console.log(res.bizContent); | |||||
const data = stringToJson(res.bizContent); | const data = stringToJson(res.bizContent); | ||||
console.log(data); | |||||
console.log("111",data); | |||||
state.addressArray = data.data ?? []; | state.addressArray = data.data ?? []; | ||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
const productReCodeAction = (orderId) => { | const productReCodeAction = (orderId) => { | ||||
// var data = { | |||||
// productId: state.data.productId, | |||||
// orderId: orderId, | |||||
// }; | |||||
var data = { | var data = { | ||||
productId: state.data.productId, | |||||
promoteId: state.data.promoteId, | |||||
orderId: orderId, | orderId: orderId, | ||||
}; | }; | ||||
const options = { | const options = { | ||||
method: "POST", | method: "POST", | ||||
showLoading: true, | showLoading: true, | ||||
}; | }; | ||||
return new Promise(async (resolve, reject) => { | return new Promise(async (resolve, reject) => { | ||||
const res = await request(productReCode, options); | const res = await request(productReCode, options); | ||||
const data = stringToJson(res.bizContent); | const data = stringToJson(res.bizContent); | ||||
console.log("111") | |||||
resolve(data); | resolve(data); | ||||
}).catch((error) => { | }).catch((error) => { | ||||
console.log("222") | |||||
reject(error); | reject(error); | ||||
}); | }); | ||||
}; | }; |
<view class="content"> | <view class="content"> | ||||
<view class="item" v-for="(item,index) in state.list" :key='index'> | <view class="item" v-for="(item,index) in state.list" :key='index'> | ||||
<view class="title"> | <view class="title"> | ||||
<view v-if='item.children' style="display: inline-block;"> | |||||
<image :class="item.isShow?'imageChange':'imageDefault'" @click="changeIsShow(index)" src="../../static/image/icon-back.png" alt="" srcset=""></image> | |||||
<view> | |||||
<view v-if='item.children' style="display: inline-block;"> | |||||
<image :class="item.isShow?'imageChange':'imageDefault'" @click="changeIsShow(index)" src="../../static/image/icon-back.png" alt="" srcset=""></image> | |||||
</view> | |||||
<text><text>{{item.productName}}</text> <text>¥{{item.discountPrice * 0.01}}</text></text> | |||||
</view> | </view> | ||||
<text><text>{{item.productName}}</text> <text>¥{{item.discountPrice * 0.01}}</text></text> | |||||
<checkbox-group @change='getValue(index)'> | <checkbox-group @change='getValue(index)'> | ||||
<label > | <label > | ||||
<checkbox :value="index" /> | <checkbox :value="index" /> | ||||
</checkbox-group> | </checkbox-group> | ||||
</view> | </view> | ||||
<view v-if="item.isShow" class="children" v-for="(itemChild,index) in item.children" :key='index'> | <view v-if="item.isShow" class="children" v-for="(itemChild,index) in item.children" :key='index'> | ||||
<view><text>{{itemChild.productName}}</text><text>{{itemChild.discountPrice * 0.01}}</text></view> | |||||
<view><text>{{itemChild.productName}}</text> <text>{{itemChild.discountPrice * 0.01}}</text></view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<button type="default" class="button" @click="savaHandle()"> | <button type="default" class="button" @click="savaHandle()"> | ||||
width: 90%; | width: 90%; | ||||
margin: 10rpx auto; | margin: 10rpx auto; | ||||
background-color: rgb(41, 199, 207); | background-color: rgb(41, 199, 207); | ||||
height: 150rpx; | |||||
// height: 150rpx; | |||||
border-radius: 20rpx; | border-radius: 20rpx; | ||||
padding: 20rpx; | padding: 20rpx; | ||||
box-sizing: border-box; | box-sizing: border-box; | ||||
color: white; | color: white; | ||||
font-size: 32rpx; | font-size: 32rpx; | ||||
} | |||||
.item>.title{ | |||||
width: 100%; | |||||
display: flex; | |||||
justify-content: space-between; | |||||
align-items: center; | |||||
} | } | ||||
.title>checkbox-group{ | .title>checkbox-group{ | ||||
float: right; | |||||
// float: right; | |||||
} | } | ||||
.children{ | .children{ | ||||
margin-left: 50rpx; | margin-left: 50rpx; |
orderId: "", | orderId: "", | ||||
vehiclePlateColor: undefined, | vehiclePlateColor: undefined, | ||||
isMyPeopple: true, | isMyPeopple: true, | ||||
isSign:'' | |||||
}); | }); | ||||
const userGenderAction = () => { | const userGenderAction = () => { | ||||
} | } | ||||
//如果未登录||新用户 | //如果未登录||新用户 | ||||
if (!getItem('openId')) { | |||||
// if (!getItem('openId')) { | |||||
let data = { | let data = { | ||||
userType: "PERSONAL", | userType: "PERSONAL", | ||||
// let result = stringToJson(res.bizContent); | // let result = stringToJson(res.bizContent); | ||||
console.log(res); | console.log(res); | ||||
uni.redirectTo({ | uni.redirectTo({ | ||||
url: `/subpackage/applyCard/car-release?orderId=${state.orderId}&vehiclePlateColor=${state.vehiclePlateColor}&type=1`, | |||||
url: `/subpackage/applyCard/car-release?orderId=${state.orderId}&vehiclePlateColor=${state.vehiclePlateColor}&type=1&isSign=${state.isSign}`, | |||||
}); | }); | ||||
}); | }); | ||||
} | } | ||||
}) | }) | ||||
} else { | |||||
// } else { | |||||
//已经登录 | //已经登录 | ||||
let data = state.form; | |||||
const options = { | |||||
type: 2, | |||||
data: data, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(etcUserCardInfoSubmit, options).then((res) => { | |||||
// let result = stringToJson(res.bizContent); | |||||
console.log(res); | |||||
uni.redirectTo({ | |||||
url: `/subpackage/applyCard/car-release?orderId=${state.orderId}&vehiclePlateColor=${state.vehiclePlateColor}`, | |||||
}); | |||||
}); | |||||
} | |||||
// let data = state.form; | |||||
// const options = { | |||||
// type: 2, | |||||
// data: data, | |||||
// method: "POST", | |||||
// showLoading: true, | |||||
// }; | |||||
// request(etcUserCardInfoSubmit, options).then((res) => { | |||||
// // let result = stringToJson(res.bizContent); | |||||
// console.log(res); | |||||
// uni.redirectTo({ | |||||
// url: `/subpackage/applyCard/car-release?orderId=${state.orderId}&vehiclePlateColor=${state.vehiclePlateColor}&isSign=${state.isSign}`, | |||||
// }); | |||||
// }); | |||||
// } | |||||
}; | }; | ||||
const cardFileImageUpdate = () => { | const cardFileImageUpdate = () => { | ||||
uni.chooseImage({ | uni.chooseImage({ | ||||
state.orderId = option.orderId; | state.orderId = option.orderId; | ||||
state.vehiclePlateColor = option.vehiclePlateColor; | state.vehiclePlateColor = option.vehiclePlateColor; | ||||
state.form.opId = getItem('openId')??''; | state.form.opId = getItem('openId')??''; | ||||
state.isSign=option.isSign; | |||||
//state.fromOrder = option.fromOrder //是否来自订单-修改资料 | //state.fromOrder = option.fromOrder //是否来自订单-修改资料 | ||||
}); | }); | ||||
orderSource: 'WECHAT', | orderSource: 'WECHAT', | ||||
}, | }, | ||||
orderId: "", | orderId: "", | ||||
vehiclePlateColor: '' | |||||
vehiclePlateColor: '', | |||||
isSign:'' | |||||
}); | }); | ||||
const savaHandle = () => { | const savaHandle = () => { | ||||
} | } | ||||
//如果未登录||新用户 | //如果未登录||新用户 | ||||
if (!getItem('openId')) { | |||||
// if (!getItem('openId')) { | |||||
let data = { | let data = { | ||||
userType: "ENTERPRISE", | userType: "ENTERPRISE", | ||||
// let result = stringToJson(res.bizContent); | // let result = stringToJson(res.bizContent); | ||||
console.log(res); | console.log(res); | ||||
uni.redirectTo({ | uni.redirectTo({ | ||||
url: `/subpackage/applyCard/car-release?orderId=${state.orderId}&vehiclePlateColor=${state.vehiclePlateColor}&type=1`, | |||||
url: `/subpackage/applyCard/car-release?orderId=${state.orderId}&vehiclePlateColor=${state.vehiclePlateColor}&type=1&isSign=${state.isSign}`, | |||||
}); | }); | ||||
}); | }); | ||||
} | } | ||||
}) | }) | ||||
}else{ | |||||
var data = state.form; | |||||
const options = { | |||||
type: 2, | |||||
data: data, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(etcCompanyCardInfoSubmit, options).then((res) => { | |||||
const data = stringToJson(res.bizContent); | |||||
uni.redirectTo({ | |||||
url: `/subpackage/applyCard/car-release?orderId=${state.orderId}&&vehiclePlateColor=${state.vehiclePlateColor}`, | |||||
}); | |||||
}); | |||||
} | |||||
// }else{ | |||||
// var data = state.form; | |||||
// const options = { | |||||
// type: 2, | |||||
// data: data, | |||||
// method: "POST", | |||||
// showLoading: true, | |||||
// }; | |||||
// request(etcCompanyCardInfoSubmit, options).then((res) => { | |||||
// const data = stringToJson(res.bizContent); | |||||
// uni.redirectTo({ | |||||
// url: `/subpackage/applyCard/car-release?orderId=${state.orderId}&&vehiclePlateColor=${state.vehiclePlateColor}&isSign=${state.isSign}`, | |||||
// }); | |||||
// }); | |||||
// } | |||||
}; | }; | ||||
state.orderId = option.orderId; | state.orderId = option.orderId; | ||||
state.vehiclePlateColor = option.vehiclePlateColor; | state.vehiclePlateColor = option.vehiclePlateColor; | ||||
state.form.opId = getItem('openId')??''; | state.form.opId = getItem('openId')??''; | ||||
state.isSign=option.isSign; | |||||
}); | }); | ||||
//监听页面滚动 | //监听页面滚动 |
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<uni-swipe-action> | |||||
<uni-swipe-action-item | |||||
class="del_item" | |||||
v-for="(item,index) in state.list" | |||||
:right-options="state.options2" | |||||
:show="item.isOpened" | |||||
:auto-close="false" | |||||
@change="change" | |||||
@click="bindClick(index)" | |||||
> | |||||
<view class="content-box"> | |||||
<text class="content-text" @tap="setOpened">{{item.productName}} ¥{{item.discountPrice * 0.01}}</text> | |||||
</view> | |||||
</uni-swipe-action-item> | |||||
</uni-swipe-action> | |||||
<!-- 加购权益列表 --> | |||||
<view class="add_all"> | |||||
<uni-swipe-action> | |||||
<uni-swipe-action-item | |||||
class="del_item" | |||||
v-for="(item,index) in state.list" | |||||
:right-options="state.options2" | |||||
:show="item.isOpened" | |||||
:auto-close="false" | |||||
@change="change" | |||||
@click="bindClick(index)" | |||||
> | |||||
<view class="content-box"> | |||||
<view v-if='item.children' style="display: inline-block;"> | |||||
<image :class="item.isShow?'imageChange':'imageDefault'" @click="changeIsShow(index)" src="../../static/image/icon-back.png" alt="" srcset=""></image> | |||||
</view> | |||||
<text class="content-text" @tap="setOpened">{{item.productName}} ¥{{item.discountPrice * 0.01}}</text> | |||||
<view v-if="item.isShow" class="children" v-for="(itemChild,index) in item.children" :key='index'> | |||||
<view><text>{{itemChild.productName}}</text> <text>{{itemChild.discountPrice * 0.01}}</text></view> | |||||
</view> | |||||
</view> | |||||
</uni-swipe-action-item> | |||||
</uni-swipe-action> | |||||
</view> | |||||
<view class="value-wrapper"> | <view class="value-wrapper"> | ||||
<view class="flex"> | <view class="flex"> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="action"> | <view class="action"> | ||||
<button type="default" class="button" @click="savaHandle()"> | <button type="default" class="button" @click="savaHandle()"> | ||||
{{ "确认办理:¥" + state.allMoney }} | {{ "确认办理:¥" + state.allMoney }} | ||||
</button> | </button> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</template> | </template> | ||||
onShow | onShow | ||||
} from "@dcloudio/uni-app"; | } from "@dcloudio/uni-app"; | ||||
import { | import { | ||||
reactive | |||||
reactive,ref | |||||
} from "vue"; | } from "vue"; | ||||
import { | import { | ||||
etcQueryProduct,addProduct | etcQueryProduct,addProduct | ||||
msg | msg | ||||
} from "@/utils/utils"; | } from "@/utils/utils"; | ||||
const imgURL = `${fileURL}image/`; | const imgURL = `${fileURL}image/`; | ||||
const savaHandle = () => { | const savaHandle = () => { | ||||
wxPayment(); | |||||
console.log("state.productId.length",state.productId.length) | |||||
if(state.productId.length>0){ | |||||
queryAddProduct(); | |||||
uni.showModal({ | |||||
// title: '提示', | |||||
content: '确定支付', | |||||
success: function (res) { | |||||
if (res.confirm) { | |||||
console.log('用户点击确定'); | |||||
wxPayment(); | |||||
} else if (res.cancel) { | |||||
console.log('用户点击取消'); | |||||
} | |||||
} | |||||
}); | |||||
}else{ | |||||
wxPayment(); | |||||
} | |||||
// msg("确定绑定权益产品"); | |||||
// wxPayment(); | |||||
}; | }; | ||||
//获取微信小程序openid | //获取微信小程序openid | ||||
url: `https://api.weixin.qq.com/sns/jscode2session?appid=${wechatAppID}&secret=${wechatSecret}&js_code=${e.code}&grant_type=authorization_code`, | url: `https://api.weixin.qq.com/sns/jscode2session?appid=${wechatAppID}&secret=${wechatSecret}&js_code=${e.code}&grant_type=authorization_code`, | ||||
success: (res: any) => { | success: (res: any) => { | ||||
state.openid = res.data.openid; | state.openid = res.data.openid; | ||||
console.log(state.openid); | |||||
console.log("state.openid",state.openid); | |||||
}, | }, | ||||
}); | }); | ||||
}, | }, | ||||
}; | }; | ||||
request(checkOrderStatus, options).then((res) => { | request(checkOrderStatus, options).then((res) => { | ||||
queryAddProduct(); | |||||
msg("支付成功!"); | msg("支付成功!"); | ||||
var pages = getCurrentPages().length; | var pages = getCurrentPages().length; | ||||
uni.$emit("refreshOrder"); | uni.$emit("refreshOrder"); | ||||
console.log("data",option) | console.log("data",option) | ||||
console.log("数组",JSON.parse(decodeURIComponent(option.data))) | console.log("数组",JSON.parse(decodeURIComponent(option.data))) | ||||
}); | }); | ||||
const state = reactive({ | const state = reactive({ | ||||
list:[], | list:[], | ||||
productMoney:0, | productMoney:0, | ||||
allMoney:0, | allMoney:0, | ||||
productId:[] | |||||
productId:[], | |||||
// 弹框 | |||||
type: 'center', | |||||
msgType: 'success', | |||||
messageText: '这是一条成功提示', | |||||
value: '' | |||||
}); | }); | ||||
const bindClick=(i)=>{ | const bindClick=(i)=>{ | ||||
console.log(i); | console.log(i); | ||||
} | } | ||||
// 加购权益产品接口 | // 加购权益产品接口 | ||||
const queryAddProduct=()=>{ | const queryAddProduct=()=>{ | ||||
console.log("state.openid",state.openid); | |||||
const options = { | const options = { | ||||
type: 2, | type: 2, | ||||
data: { | data: { | ||||
orderId: state.orderId, //订单编号 | orderId: state.orderId, //订单编号 | ||||
openid: state.openid, //操作人 id | |||||
singleEquityId: state.id, //单项益Id | |||||
multipleEquityd: state.id, //多项益Id | |||||
totalAmount: state.allMoney, //总金额 | |||||
openId: state.openid, //操作人 id | |||||
equityId: state.productId.toString() , //权益Id | |||||
totalAmount: state.allMoney * 100, //总金额 | |||||
isRepeatPurchase:0 | |||||
}, | }, | ||||
method: "POST", | method: "POST", | ||||
showLoading: true, | showLoading: true, | ||||
}; | }; | ||||
request(addProduct, options).then((res) => { | request(addProduct, options).then((res) => { | ||||
msg("加购权益成功。"); | |||||
// msg("加购权益成功。"); | |||||
}); | }); | ||||
} | } | ||||
const changeIsShow = (index) =>{ | |||||
console.log(index,state.list[index]['isShow'],!state.list[index]['isShow']) | |||||
state.list[index]['isShow']=!state.list[index]['isShow'] | |||||
console.log("state.list",state.list) | |||||
} | |||||
</script> | </script> | ||||
<style lang="scss" scoped> | <style lang="scss" scoped> | ||||
} | } | ||||
} | } | ||||
.del_item{ | .del_item{ | ||||
background-color: #43a1e0 !important; | |||||
background-color: rgb(41, 199, 207) !important; | |||||
} | } | ||||
.content-box{ | .content-box{ | ||||
background-color: #43a1e0; | |||||
background-color: rgb(41, 199, 207); | |||||
line-height: 80rpx; | line-height: 80rpx; | ||||
color: white; | color: white; | ||||
font-size: 32rpx; | font-size: 32rpx; | ||||
border-radius: 10rpx; | |||||
margin-bottom: 16rpx; | |||||
border-radius: 10rpx 0 0 10rpx; | |||||
padding: 20rpx; | padding: 20rpx; | ||||
box-sizing: border-box; | box-sizing: border-box; | ||||
} | } | ||||
::v-deep.uni-swipe_button-text{ | |||||
font-size: 30rpx !important; | |||||
} | |||||
::v-deep.uni-swipe_button-group { | |||||
font-size: 28rpx !important; | |||||
} | |||||
.add_all{ | |||||
width: 95%; | |||||
margin: 0 auto; | |||||
} | |||||
.uni-swipe_box{ | |||||
margin-bottom: 16rpx !important; | |||||
} | |||||
::v-deep.uni-swipe { | |||||
margin-bottom: 16rpx !important; | |||||
} | |||||
.imageDefault{ | |||||
height: 40rpx; | |||||
width: 40rpx; | |||||
transform: rotate(270deg); | |||||
margin-right: 12rpx; | |||||
color: white; | |||||
} | |||||
.imageChange{ | |||||
height: 40rpx; | |||||
width: 40rpx; | |||||
transform: rotate(90deg); | |||||
margin-right: 12rpx; | |||||
color: white; | |||||
} | |||||
</style> | </style> |
export const envs = { | export const envs = { | ||||
//开发环境配置 | //开发环境配置 | ||||
development: { | development: { | ||||
baseUrl: "192.168.100.63:8087", | |||||
// baseUrl: "222.85.144.89:19002", | |||||
// baseUrl: "192.168.100.63:8087", | |||||
baseUrl: "222.85.144.89:19002", | |||||
}, | }, | ||||
//生产环境配置 | //生产环境配置 | ||||
production: { | production: { | ||||
//产品选择 | //产品选择 | ||||
// export const etcQueryProduct = "48"; //获取产品根据orderId获取 | // export const etcQueryProduct = "48"; //获取产品根据orderId获取 | ||||
export const etcQueryProduct = "098bff3fc88e48bf9cafc3b5679b4d07"; //获取产品 根据客货类型获取 | export const etcQueryProduct = "098bff3fc88e48bf9cafc3b5679b4d07"; //获取产品 根据客货类型获取 | ||||
export const productReCode = '914'//订单产品选择接口 | |||||
// export const productReCode = '914'//订单产品选择接口 | |||||
export const productReCode = '198172b1858d474fa8e35225d65014d7'//订单选择推广发行产品 | |||||
//签约 | //签约 | ||||
export const etcOpenIdMember = "62"; //统一会员平台openId查询接口 | export const etcOpenIdMember = "62"; //统一会员平台openId查询接口 |