// export const fileURL = 'http://47.94.96.52/' | // export const fileURL = 'http://47.94.96.52/' | ||||
// export const fileURL = 'http://222.85.144.89:19002/default-bucket/' | // export const fileURL = 'http://222.85.144.89:19002/default-bucket/' | ||||
export const downloadFileURL = 'http://'+ envs[process.env.NODE_ENV].baseUrl +'/user-export-excel/' | export const downloadFileURL = 'http://'+ envs[process.env.NODE_ENV].baseUrl +'/user-export-excel/' | ||||
export const fileURL = 'http://'+ envs[process.env.NODE_ENV].baseUrl +'/default-bucket/' | |||||
export const fileURL = 'http://'+ envs[process.env.NODE_ENV].baseUrl +'/default-bucket/' | |||||
export const fileURLList = 'http://'+ envs[process.env.NODE_ENV].baseUrl |
{ | { | ||||
"root": "subpackage/after-sale", //售后相关 | "root": "subpackage/after-sale", //售后相关 | ||||
"pages": [ | "pages": [ | ||||
{ | |||||
"path": "account-recharge/recharge-record", | |||||
"style": { | |||||
"navigationBarTitleText": "充值明细", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
}, | |||||
{ | |||||
"path": "account-recharge/consumption-record", | |||||
"style": { | |||||
"navigationBarTitleText": "消费明细", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
}, | |||||
{ | { | ||||
"path": "account-recharge/open-account", | "path": "account-recharge/open-account", | ||||
"style": { | "style": { |
} from "@/utils/network/encryption"; | } from "@/utils/network/encryption"; | ||||
const state = reactive({ | const state = reactive({ | ||||
list: [] //车辆list | |||||
list: [] ,//车辆list, | |||||
}); | }); | ||||
const flag = ref('0') //默认选择0 | const flag = ref('0') //默认选择0 | ||||
onLoad(() => { | |||||
onLoad((option) => { | |||||
quanCheckActionTrue().then((item: any) => { | quanCheckActionTrue().then((item: any) => { | ||||
state.list = item.data | state.list = item.data | ||||
}) | }) | ||||
console.log("1",option) | |||||
}); | }); | ||||
const quanCheckActionTrue = () => { | const quanCheckActionTrue = () => { | ||||
} | } | ||||
const choose = (i, item) => { | const choose = (i, item) => { | ||||
flag.value = i | |||||
navTo(`/pages/recharge/recharge?cardId=${item.cardId}`) | |||||
flag.value = i | |||||
navTo(`/pages/recharge/recharge?cardId=${item.cardId}`) | |||||
} | } | ||||
</script> | </script> | ||||
<block v-if="menu.list.length >0"> | <block v-if="menu.list.length >0"> | ||||
<view v-for="(item,index) in menu.list[tableSelectIndex].children" :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="`${fileURLList}${item.iconPath}`" /> | |||||
<!-- <image :src="`${item.iconPath}`" /> --> | <!-- <image :src="`${item.iconPath}`" /> --> | ||||
</view> | </view> | ||||
<view class="text">{{item.name}}</view> | <view class="text">{{item.name}}</view> | ||||
</view> | </view> | ||||
<!-- <view class="item-box" @click="toNext(`/subpackage/after-sale/account-recharge/login`)"> | |||||
<view class="item bg-blue" :style="{ '--background': bgBlue }"> | |||||
</view> | |||||
<view class="text">单位账户充值</view> | |||||
</view> --> | |||||
</block> | </block> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
onLoad | onLoad | ||||
} from "@dcloudio/uni-app"; | } from "@dcloudio/uni-app"; | ||||
import { | import { | ||||
fileURL | |||||
fileURL,fileURLList | |||||
} from "@/datas/fileURL.js"; | } from "@/datas/fileURL.js"; | ||||
import { | import { | ||||
msg | msg |
<template> | |||||
<view class='content'> | |||||
<view class='search_wrap'> | |||||
<input type="text" placeholder='搜索ETC卡号'/><button size='mini'>搜索</button> | |||||
</view> | |||||
<view class='item'> | |||||
<view class='time'><text>时间:2021-07-10 09:37:22</text><text>¥5000</text></view> | |||||
<view>ETC卡号:52011328220200045994</view> | |||||
</view> | |||||
</view> | |||||
</template> | |||||
<script> | |||||
</script> | |||||
<style scoped> | |||||
.content{ | |||||
/* background-color:#f6f6f6; */ | |||||
min-height:100vh; | |||||
padding: 0 30rpx; | |||||
overflow: hidden; | |||||
font-size: 32rpx; | |||||
} | |||||
.search_wrap{ | |||||
display:flex; | |||||
margin:20rpx 0; | |||||
} | |||||
.search_wrap>input{ | |||||
background-color:rgb(238,240,237); | |||||
width: 76%; | |||||
height: 40rpx; | |||||
line-height: 40rpx; | |||||
padding: 10rpx 10rpx; | |||||
border-radius: 10rpx 0 0 10rpx; | |||||
} | |||||
.item{ | |||||
width:100%; | |||||
border:1rpx solid rgb(203,203,203); | |||||
border-radius:10rpx; | |||||
box-sizing: border-box; | |||||
padding: 30rpx 20rpx; | |||||
margin-top:30rpx; | |||||
} | |||||
.time{ | |||||
display:flex; | |||||
margin-bottom: 16rpx; | |||||
justify-content: space-between; | |||||
} | |||||
</style> |
} | } | ||||
button{ | button{ | ||||
width: 75%; | width: 75%; | ||||
background-color: rgb(25,190,107); | |||||
color: white; | |||||
border-color: 1rpx solid rgb(75,164,89); | |||||
height: 90rpx; | |||||
line-height: 90rpx; | |||||
height: 80rpx; | |||||
margin-top:60rpx; | margin-top:60rpx; | ||||
font-size:38rpx; | |||||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||||
border-radius: 40rpx; | |||||
font-size: 32rpx; | |||||
font-weight: 400; | |||||
color: #ffffff; | |||||
line-height: 80rpx; | |||||
} | } | ||||
</style> | </style> |
<template> | <template> | ||||
<view class='content'> | <view class='content'> | ||||
<view class='content_all'> | <view class='content_all'> | ||||
<view class="change" @click='change()'>切换</view> | |||||
<view class="change" @click='change()' v-if='state.isChangeBtn'>切换</view> | |||||
<view v-if="state.inputCarNumber"> | <view v-if="state.inputCarNumber"> | ||||
<view class="car-input"> | <view class="car-input"> | ||||
<view class="title">车牌号</view> | <view class="title">车牌号</view> | ||||
<u-form-item label="请选择车辆"><u-input v-model="state.form.choiceCarVal" type="select" :select-open="state.show" @click="state.show = true" placeholder='请选择车辆'/></u-form-item> | <u-form-item label="请选择车辆"><u-input v-model="state.form.choiceCarVal" type="select" :select-open="state.show" @click="state.show = true" placeholder='请选择车辆'/></u-form-item> | ||||
<u-form-item label="车牌颜色"><u-input v-model="state.form.carColor" disabled placeholder='车牌颜色'/></u-form-item> | <u-form-item label="车牌颜色"><u-input v-model="state.form.carColor" disabled placeholder='车牌颜色'/></u-form-item> | ||||
</u-form> | </u-form> | ||||
<u-form :model="form" ref="form1" label-width=180> | |||||
<!-- <u-form :model="form" ref="form1" label-width=180> | |||||
<u-form-item label="手机号" class="phoneBox" v-if='state.showPhone'> | <u-form-item label="手机号" class="phoneBox" v-if='state.showPhone'> | ||||
<u-input placeholder='手机号' type="number" v-model="state.form.tel" /> | <u-input placeholder='手机号' type="number" v-model="state.form.tel" /> | ||||
<u-button type="success" size="mini" @click="getCode" v-if="waitTime==0">获取验证码</u-button> | <u-button type="success" size="mini" @click="getCode" v-if="waitTime==0">获取验证码</u-button> | ||||
<text class="btn" v-else>{{waitTime}}后重试</text> | <text class="btn" v-else>{{waitTime}}后重试</text> | ||||
</u-form-item> | </u-form-item> | ||||
<u-form-item v-if='state.showPhone' label="验证码"><u-input v-model="state.form.code" placeholder='请输入短信验证码'/></u-form-item> | <u-form-item v-if='state.showPhone' label="验证码"><u-input v-model="state.form.code" placeholder='请输入短信验证码'/></u-form-item> | ||||
</u-form> | |||||
</u-form> --> | |||||
</view> | </view> | ||||
<u-picker mode="selector" :range="state.array" v-model="state.show" @confirm="regionConfirm"></u-picker> | |||||
<u-picker mode="selector" :range="state.carData" v-model="state.show" @confirm="regionConfirm"></u-picker> | |||||
<u-picker mode="selector" :range="state.colorList" v-model="state.showColor" @confirm="regionConfirmColor"></u-picker> | <u-picker mode="selector" :range="state.colorList" v-model="state.showColor" @confirm="regionConfirmColor"></u-picker> | ||||
<button type="success" class='search' @click='goOpen'>开户</button> | <button type="success" class='search' @click='goOpen'>开户</button> | ||||
</view> | </view> | ||||
<script setup lang="ts"> | <script setup lang="ts"> | ||||
import { reactive,ref } from "vue"; | import { reactive,ref } from "vue"; | ||||
import {request} from "@/utils/network/request.js"; | import {request} from "@/utils/network/request.js"; | ||||
import {sendCode} from "@/utils/network/api.js"; | |||||
import {sendCode,orderList} from "@/utils/network/api.js"; | |||||
import carNumberInput from "@/components/car-number-input/car-number-input.vue"; | import carNumberInput from "@/components/car-number-input/car-number-input.vue"; | ||||
import { navTo } from "@/utils/utils"; | |||||
import { msg } from "@/utils/utils"; | |||||
import { navTo,msg,hasLogin} from "@/utils/utils"; | |||||
import {onLoad} from "@dcloudio/uni-app"; | |||||
import {getItem,StorageKeys} from "@/utils/storage"; | |||||
import {stringToJson} from "@/utils/network/encryption"; | |||||
import {vehiclePlateColor} from "@/datas/vehiclePlateColor"; | |||||
const state = reactive({ | const state = reactive({ | ||||
index: 0, | index: 0, | ||||
array: ['贵ZJSZ21 蓝色', '贵ZJSZ21 红色', '贵ZJSZ21 绿色', '贵ZJSZ21 白色'], | |||||
colorList:['蓝色','白色'], | |||||
carData: [],//车辆数据 | |||||
colorList:[], //没有注册时车辆颜色 | |||||
form:{ | form:{ | ||||
choiceCarVal:'', | choiceCarVal:'', | ||||
carColor:'', | carColor:'', | ||||
showPhone:false, //是否展示车牌号 | showPhone:false, //是否展示车牌号 | ||||
inputCarNumber:false, //是否需要输入车牌号 | inputCarNumber:false, //是否需要输入车牌号 | ||||
showColor:false, //选择车牌颜色 | showColor:false, //选择车牌颜色 | ||||
isChangeBtn:true, //切换按钮是否展示 | |||||
}); | }); | ||||
let waitTime = ref(0); | let waitTime = ref(0); | ||||
onLoad((option : any) => { | |||||
if(!hasLogin()){ | |||||
state.isChangeBtn=false; | |||||
state.inputCarNumber=true; | |||||
} | |||||
quanCheckActionTrue(); | |||||
}); | |||||
const getCode = () => { | const getCode = () => { | ||||
console.log(123); | console.log(123); | ||||
if (state.form.tel) { | if (state.form.tel) { | ||||
} | } | ||||
// 选择车牌回调 | // 选择车牌回调 | ||||
const regionConfirm = (e : any) => { | const regionConfirm = (e : any) => { | ||||
console.log("e",e) | |||||
state.form.choiceCarVal = state.array[e]; | |||||
state.form.choiceCarVal = state.carData[e]; | |||||
// 切割车牌号,获取颜色 | |||||
console.log("e",state.carData[e].substring(8,10)) | |||||
state.form.carColor=state.carData[e].substring(8,10) | |||||
state.showPhone=true; | state.showPhone=true; | ||||
}; | }; | ||||
// 选择颜色的回调 | // 选择颜色的回调 | ||||
state.form.carColor=''; | state.form.carColor=''; | ||||
} | } | ||||
const carNumber = (val: any) => { | const carNumber = (val: any) => { | ||||
state.vehiclePlate = val; | |||||
// state.vehiclePlate = val; | |||||
state.form.choiceCarVal = val; | |||||
}; | }; | ||||
// 去开户页面 | // 去开户页面 | ||||
const goOpen=()=>{ | const goOpen=()=>{ | ||||
// choiceCarVal:'', | |||||
// carColor:'', | |||||
// tel:'', | |||||
// code:'' | |||||
console.log("as",state.form) | |||||
if(!state.form.choiceCarVal){ | if(!state.form.choiceCarVal){ | ||||
msg('请选择车辆'); | msg('请选择车辆'); | ||||
return; | return; | ||||
} | } | ||||
if(!state.form.tel){ | |||||
msg('请输入手机号'); | |||||
return; | |||||
} | |||||
if(!state.form.code){ | |||||
msg('请输入验证码'); | |||||
return; | |||||
} | |||||
// if(!state.form.tel){ | |||||
// msg('请输入手机号'); | |||||
// return; | |||||
// } | |||||
// if(!state.form.code){ | |||||
// msg('请输入验证码'); | |||||
// return; | |||||
// } | |||||
navTo(`/subpackage/after-sale/account-recharge/open-account`); | navTo(`/subpackage/after-sale/account-recharge/open-account`); | ||||
} | } | ||||
const quanCheckActionTrue = () => { | |||||
var data = { | |||||
opId: getItem(StorageKeys.OpenId), | |||||
source: 'WECHAT', //渠道为小程序 | |||||
tabIndex: '0', //0全部 | |||||
orderStep: '11', //11 为已完成” | |||||
}; | |||||
const options = { | |||||
type: 2, | |||||
data: data, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(orderList, options).then((res) => { | |||||
let data = stringToJson(res.bizContent).data | |||||
// 深拷贝获取全部车牌颜色 | |||||
let colorArr=JSON.parse(JSON.stringify(vehiclePlateColor)) | |||||
for(var k=0;k<colorArr.length;k++){ | |||||
state.colorList.push(colorArr[k].color) | |||||
} | |||||
console.log( "state.colorList",state.colorList); | |||||
for(var i=0;i<data.length;i++){ | |||||
let strData=''; | |||||
strData+=data[i].vehiclePlate+" "+getVehiclePlateColor(data[i].vehiclePlateColor); | |||||
state.carData.push(strData); | |||||
} | |||||
}) | |||||
.catch((err) => { | |||||
console.log(err); | |||||
}); | |||||
} | |||||
//获取车牌颜色文字 | |||||
const getVehiclePlateColor = (id: number) => { | |||||
const colors = vehiclePlateColor.filter(item => item.id == id); | |||||
return colors[0].color | |||||
} | |||||
</script> | </script> | ||||
<style scoped> | <style scoped> | ||||
margin-left:30rpx; | margin-left:30rpx; | ||||
} | } | ||||
.search{ | .search{ | ||||
background-color: rgb(25,190,107); | |||||
color: white; | |||||
height: 100rpx; | |||||
line-height: 100rpx; | |||||
font-size: 40rpx; | |||||
margin-top: 70rpx; | |||||
height: 80rpx; | |||||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||||
border-radius: 40rpx; | |||||
font-size: 32rpx; | |||||
font-weight: 400; | |||||
color: #ffffff; | |||||
line-height: 80rpx; | |||||
margin:0 30rpx; | |||||
margin-top:70rpx; | |||||
} | } | ||||
</style> | </style> |
<view>¥0</view> | <view>¥0</view> | ||||
</view> | </view> | ||||
<view class='item_wrap'> | <view class='item_wrap'> | ||||
<view class='item'> | |||||
<view class='item' @click='navTo(`/pages/recharge/select-car`)'> | |||||
<view class='left_content'> | <view class='left_content'> | ||||
<image src="http://222.85.144.89:19002/default-bucket/image/index/item-1.png" mode=""></image> | |||||
<image :src="fileURL + 'image/index/item-1.png'" ></image> | |||||
<view>去圈层</view> | <view>去圈层</view> | ||||
</view> | </view> | ||||
<u-icon name="arrow-right" color='#ccc'></u-icon> | <u-icon name="arrow-right" color='#ccc'></u-icon> | ||||
</view> | </view> | ||||
<view class='item'> | |||||
<view class='item' @click='navTo(`/subpackage/after-sale/account-recharge/consumption-record`)'> | |||||
<view class='left_content'> | <view class='left_content'> | ||||
<image src="http://222.85.144.89:19002/default-bucket/image/index/item-1.png" mode=""></image> | |||||
<image :src="fileURL + 'image/index/item-1.png'" ></image> | |||||
<view>消费明细</view> | <view>消费明细</view> | ||||
</view> | </view> | ||||
<u-icon name="arrow-right" color='#ccc'></u-icon> | <u-icon name="arrow-right" color='#ccc'></u-icon> | ||||
</view> | </view> | ||||
<view class='item'> | |||||
<view class='item' @click='navTo(`/subpackage/after-sale/account-recharge/recharge-record`)'> | |||||
<view class='left_content'> | <view class='left_content'> | ||||
<image src="http://222.85.144.89:19002/default-bucket/image/index/item-1.png" mode=""></image> | |||||
<image :src="fileURL + 'image/index/item-1.png'" ></image> | |||||
<view>充值明细</view> | <view>充值明细</view> | ||||
</view> | </view> | ||||
<u-icon name="arrow-right" color='#ccc'></u-icon> | <u-icon name="arrow-right" color='#ccc'></u-icon> | ||||
</view> | </view> | ||||
<view class='item' @click='navTo(`/subpackage/personal-center/setting/bank-card/bank-card?name=state.name`)'> | |||||
<view class='left_content'> | |||||
<image :src="fileURL + 'image/index/item-1.png'" ></image> | |||||
<view>银行卡管理</view> | |||||
</view> | |||||
<u-icon name="arrow-right" color='#ccc'></u-icon> | |||||
</view> | |||||
</view> | </view> | ||||
<view class='item item_wrap' @click='navTo(`/subpackage/after-sale/account-recharge/login`)'> | <view class='item item_wrap' @click='navTo(`/subpackage/after-sale/account-recharge/login`)'> | ||||
<view class='left_content'> | <view class='left_content'> | ||||
<image src="http://222.85.144.89:19002/default-bucket/image/index/item-1.png" mode=""></image> | |||||
<image :src="fileURL + 'image/index/item-1.png'" ></image> | |||||
<view>退出</view> | <view>退出</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<script setup lang='ts'> | <script setup lang='ts'> | ||||
import { navTo } from "@/utils/utils"; | import { navTo } from "@/utils/utils"; | ||||
import {fileURL} from "@/datas/fileURL.js"; | |||||
import { onLoad} from "@dcloudio/uni-app"; | |||||
import { reactive } from "vue"; | |||||
const state = reactive({ | |||||
name:'' | |||||
}) | |||||
onLoad((option : any) => { | |||||
state.name=option.name; | |||||
}) | |||||
</script> | </script> | ||||
<style scoped> | <style scoped> |
</view> | </view> | ||||
<view class="item"> | <view class="item"> | ||||
<text>密码:</text> | <text>密码:</text> | ||||
<input class="uni-input" focus placeholder="大小写,数字,位数必须大于7位" v-model='state.password'/> | |||||
<input style='width:412rpx;' class="uni-input" focus placeholder="大小写,数字,位数必须大于7位" v-model='state.password' type='password'/> | |||||
</view> | </view> | ||||
<button @click='login()'>登录</button> | <button @click='login()'>登录</button> | ||||
<view class='go'> | <view class='go'> | ||||
onLoad((option : any) => { | onLoad((option : any) => { | ||||
}); | }); | ||||
const login=()=>{ | const login=()=>{ | ||||
if(!state.name){ | |||||
msg("请输入用户名!"); | |||||
return; | |||||
} | |||||
if(!state.password){ | |||||
msg("请输入密码!"); | |||||
return; | |||||
} | |||||
let options = { | |||||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | |||||
data: { | |||||
accountId: state.name, | |||||
passWord: state.password | |||||
}, //请求参数 | |||||
method: "POST", //提交方式(默认POST) | |||||
showLoading: true, //是否显示加载中(默认显示) | |||||
}; | |||||
// if(!state.name){ | |||||
// msg("请输入用户名!"); | |||||
// return; | |||||
// } | |||||
// if(!state.password){ | |||||
// msg("请输入密码!"); | |||||
// return; | |||||
// } | |||||
// let options = { | |||||
// type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | |||||
// data: { | |||||
// accountId: state.name, | |||||
// passWord: state.password | |||||
// }, //请求参数 | |||||
// method: "POST", //提交方式(默认POST) | |||||
// showLoading: true, //是否显示加载中(默认显示) | |||||
// }; | |||||
//调用方式 | |||||
request(accountLogin, options).then((res) => { | |||||
let data = stringToJson(res.bizContent) | |||||
console.log(data, "#################"); | |||||
navTo(`/subpackage/after-sale/account-recharge/index`); | |||||
}) | |||||
.catch((err) => { | |||||
console.log(err); | |||||
}); | |||||
// //调用方式 | |||||
// request(accountLogin, options).then((res) => { | |||||
// let data = stringToJson(res.bizContent) | |||||
// console.log(data, "#################"); | |||||
// navTo(`/subpackage/after-sale/account-recharge/index`); | |||||
// }) | |||||
// .catch((err) => { | |||||
// console.log(err); | |||||
// }); | |||||
navTo(`/subpackage/after-sale/account-recharge/index?name=state.name`); | |||||
// navTo(`/subpackage/after-sale/account-recharge/index?name=scyl12345`); | |||||
} | } | ||||
const goAccount=()=>{ | const goAccount=()=>{ | ||||
navTo(`/subpackage/after-sale/account-recharge/go-account`); | navTo(`/subpackage/after-sale/account-recharge/go-account`); | ||||
// navTo(`/pages/recharge/select-car?type=1`); | |||||
} | } | ||||
const forgetPassword=()=>{ | const forgetPassword=()=>{ | ||||
navTo(`/subpackage/after-sale/account-recharge/forget-password`); | navTo(`/subpackage/after-sale/account-recharge/forget-password`); | ||||
} | } | ||||
button{ | button{ | ||||
width: 75%; | width: 75%; | ||||
background-color: rgb(25,190,107); | |||||
color: white; | |||||
border-color: 1rpx solid rgb(75,164,89); | |||||
height: 90rpx; | |||||
line-height: 90rpx; | |||||
height: 80rpx; | |||||
margin-top:60rpx; | margin-top:60rpx; | ||||
font-size:38rpx; | |||||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||||
border-radius: 40rpx; | |||||
font-size: 32rpx; | |||||
font-weight: 400; | |||||
color: #ffffff; | |||||
line-height: 80rpx; | |||||
} | } | ||||
.go{ | .go{ | ||||
display:flex; | display:flex; | ||||
color:rgb(33,155,63); | |||||
color:#43a1e0; | |||||
justify-content: space-around; | justify-content: space-around; | ||||
font-size: 32rpx; | font-size: 32rpx; | ||||
margin-top: 90rpx; | margin-top: 90rpx; |
<view class='title'>请上传图片</view> | <view class='title'>请上传图片</view> | ||||
<view class='tips'>注意事项:1.请上传有效图片;2.图片大小不超过2M</view> | <view class='tips'>注意事项:1.请上传有效图片;2.图片大小不超过2M</view> | ||||
<view class='item_wrap'> | <view class='item_wrap'> | ||||
<view class='item' @click="cardDbImageOcr('1')"> | |||||
<image v-if="!state.isBusinessLicense" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`"> | |||||
<view class='item' @click="cardImageOcrYY()"> | |||||
<image v-if="!state.form.url1" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`"> | |||||
</image> | </image> | ||||
<image v-else class="icon" :src="strReplace(state.form.url1)"></image> | |||||
<image v-else class="icon" :src="state.form.url1"></image> | |||||
<view>公司营业执照</view> | <view>公司营业执照</view> | ||||
</view> | </view> | ||||
<view class='item' @click="cardDbImageOcr('2')"> | <view class='item' @click="cardDbImageOcr('2')"> | ||||
<image v-if="!state.isBusinessLicense" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`"> | |||||
<image v-if="!state.form.url2" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`"> | |||||
</image> | </image> | ||||
<image v-else class="icon" :src="strReplace(state.form.url2)"></image> | |||||
<image v-else class="icon" :src="state.form.url2"></image> | |||||
<view>单位授权书</view> | <view>单位授权书</view> | ||||
</view> | </view> | ||||
<view class='item' @click="cardDbImageOcr('3')"> | <view class='item' @click="cardDbImageOcr('3')"> | ||||
<image v-if="!state.isBusinessLicense" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`"> | |||||
<image v-if="!state.form.url3" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`"> | |||||
</image> | </image> | ||||
<image v-else class="icon" :src="strReplace(state.form.url3)"></image> | |||||
<image v-else class="icon" :src="state.form.url3"></image> | |||||
<view>被委托人身份证正页照</view> | <view>被委托人身份证正页照</view> | ||||
</view> | </view> | ||||
<view class='item' @click="cardDbImageOcr('4')"> | <view class='item' @click="cardDbImageOcr('4')"> | ||||
<image v-if="!state.isBusinessLicense" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`"> | |||||
<image v-if="!state.form.url4" class="icon" :src="`${$imgUrl}applyCard/renxiang.png`"> | |||||
</image> | </image> | ||||
<image v-else class="icon" :src="strReplace(state.form.url4)"></image> | |||||
<image v-else class="icon" :src="state.form.url4"></image> | |||||
<view>被委托人身份证副页</view> | <view>被委托人身份证副页</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<u-form-item label="对公用户登录名 " border-bottom=true > | <u-form-item label="对公用户登录名 " border-bottom=true > | ||||
<u-input placeholder='请输入6-12位字母加数字组成的账号' type="text" v-model="state.form.name"/> | <u-input placeholder='请输入6-12位字母加数字组成的账号' type="text" v-model="state.form.name"/> | ||||
</u-form-item> | </u-form-item> | ||||
<u-form-item label="对公用户密码" > | |||||
<u-input placeholder='请输入对公用户密码' type="text" v-model="state.form.password"/> | |||||
</u-form-item> | |||||
<u-form-item label="公司证件类型 "> | <u-form-item label="公司证件类型 "> | ||||
<u-input v-model="state.form.type" type="select" :select-open="state.showType" @click="state.showType = true" placeholder='请选择'/> | <u-input v-model="state.form.type" type="select" :select-open="state.showType" @click="state.showType = true" placeholder='请选择'/> | ||||
</u-form-item> | </u-form-item> | ||||
<u-input placeholder='请输入经办人手机号' type="text" v-model="state.form.handlerPhone"/> | <u-input placeholder='请输入经办人手机号' type="text" v-model="state.form.handlerPhone"/> | ||||
</u-form-item> | </u-form-item> | ||||
</u-form> | </u-form> | ||||
<view class='pay_msg'>付款银行账户信息</view> | |||||
<!-- <view class='pay_msg'>付款银行账户信息</view> | |||||
<view class='company' @click='goBankCard()'> | <view class='company' @click='goBankCard()'> | ||||
<view> | <view> | ||||
<view><text>123456</text><text>贵阳银行股份有限公司</text></view> | <view><text>123456</text><text>贵阳银行股份有限公司</text></view> | ||||
<view class='phone'>123****5678</view> | <view class='phone'>123****5678</view> | ||||
</view> | </view> | ||||
<u-icon name="arrow-right" color='#ccc' size='40'></u-icon> | <u-icon name="arrow-right" color='#ccc' size='40'></u-icon> | ||||
</view> | |||||
</view> --> | |||||
</view> | </view> | ||||
<view class='attention'> | <view class='attention'> | ||||
<view>注意事项:</view> | <view>注意事项:</view> | ||||
<view>3.开户申请审核结果将于两个工作日发送短信告知</view> | <view>3.开户申请审核结果将于两个工作日发送短信告知</view> | ||||
<view>4.只支持黔通卡充值</view> | <view>4.只支持黔通卡充值</view> | ||||
</view> | </view> | ||||
<u-button class='open' type="success">开户</u-button> | |||||
<button class='open' type="success" @click='open()'>开户</button> | |||||
</view> | </view> | ||||
<u-picker mode="selector" :range="state.typeList" v-model="state.showType" @confirm="regionConfirmType"></u-picker> | <u-picker mode="selector" :range="state.typeList" v-model="state.showType" @confirm="regionConfirmType"></u-picker> | ||||
</template> | </template> | ||||
<script setup lang="ts"> | <script setup lang="ts"> | ||||
import {reactive} from "vue"; | import {reactive} from "vue"; | ||||
import {etcOcrCard,envs} from "@/utils/network/api.js"; | |||||
import {etcOcrCard,envs,ocrAllQuery,fileUpload} from "@/utils/network/api.js"; | |||||
import {pathToBase64} from "@/utils/image-tools/index.js"; | import {pathToBase64} from "@/utils/image-tools/index.js"; | ||||
import { navTo } from "@/utils/utils"; | import { navTo } from "@/utils/utils"; | ||||
import {request} from "@/utils/network/request.js"; | |||||
import {stringToJson} from "@/utils/network/encryption.js"; | |||||
import { msg } from "@/utils/utils"; | |||||
const state = reactive({ | const state = reactive({ | ||||
isBusinessLicense:false, //是否上传公司营业执照 | isBusinessLicense:false, //是否上传公司营业执照 | ||||
form:{ | form:{ | ||||
url3:'', // | url3:'', // | ||||
url4:'', // | url4:'', // | ||||
name:'',//对公用户登录名 | name:'',//对公用户登录名 | ||||
password:'',//对公用户登录密码 | |||||
type:'',//公司证件类型 | type:'',//公司证件类型 | ||||
code:'', //公司证件编码 | code:'', //公司证件编码 | ||||
companyName:'', | companyName:'', | ||||
handlerName:'', | handlerName:'', | ||||
handlerPhone:'', | handlerPhone:'', | ||||
bankAddress:"贵阳银行", //开户行 | |||||
bankCardId:"1111", //充值银行卡号 | |||||
}, | }, | ||||
showType:false, //公司证件类型下拉 | showType:false, //公司证件类型下拉 | ||||
typeList:['营业执照','统一社会信用代码证','组织结构代码证'], | typeList:['营业执照','统一社会信用代码证','组织结构代码证'], | ||||
method: "POST", | method: "POST", | ||||
showLoading: true, | showLoading: true, | ||||
}; | }; | ||||
console.log("cdfdf") | |||||
request(etcOcrCard, options).then((res) => { | request(etcOcrCard, options).then((res) => { | ||||
const data = stringToJson(res.bizContent); | const data = stringToJson(res.bizContent); | ||||
console.log("图片信息",data) | console.log("图片信息",data) | ||||
if (val === "1") { | |||||
state.form.url1 = data.name; | |||||
} else if (val === "2"){ | |||||
state.form.url1 = data.name; | |||||
if (val === "2"){ | |||||
state.form.url2 = data.imageUrl; | |||||
}else if (val === "3"){ | }else if (val === "3"){ | ||||
state.form.url1 = data.name; | |||||
state.form.url3 = data.imageUrl; | |||||
}else if (val === "4"){ | }else if (val === "4"){ | ||||
state.form.url1 = data.name; | |||||
state.form.url4 = data.imageUrl; | |||||
} | } | ||||
}); | }); | ||||
}) | }) | ||||
const goBankCard=()=>{ | const goBankCard=()=>{ | ||||
navTo(`/subpackage/personal-center/setting/bank-card/bank-card`); | navTo(`/subpackage/personal-center/setting/bank-card/bank-card`); | ||||
} | } | ||||
const open=()=>{ | |||||
for(var i in state.from){ | |||||
if(!state.from[i]){ | |||||
msg('请把信息填写完整!') | |||||
return; | |||||
} | |||||
} | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
'accountId':state.from.code, //账户编号 | |||||
'corporateIdNum':state.from.type, //公司营业执照统一社会信用代码 | |||||
'corporateName':state.from.name, //对公名称 | |||||
'password':state.from.password, //密码 | |||||
'photoUrl':state.from.url1, //营业执照图片路径 | |||||
'authBookUrl':state.from.url2, //授权书图片路径 | |||||
'agentName':state.from.handlerName, //经办人姓名 | |||||
'agentTel':state.from.handlerPhone, //经办人手机号 | |||||
'idCardImageUrl':state.from.url3, //经办人身份证正面 | |||||
'idCardImageUrl':state.from.url4, //经办人身份证反面 | |||||
'bankAddress':"贵阳银行", //开户行 | |||||
'bankCardId':"1111", //充值银行卡号 | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(sendCode, options) | |||||
.then((res) => { | |||||
let data = stringToJson(res.bizContent) | |||||
console.log("开户成功",data) | |||||
}) | |||||
.catch((err) => { | |||||
console.log(err); | |||||
}); | |||||
} | |||||
//营业执照Orc接口调用 | |||||
const cardImageOcrYY = () => { | |||||
uni.chooseImage({ | |||||
count: 1, //只能选取一张照片 | |||||
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有 | |||||
sourceType: ["camera", "album"], //从相册选择 | |||||
success: function(res) { | |||||
pathToBase64(res.tempFilePaths[0]) | |||||
.then((path) => { | |||||
var data = { | |||||
type: 'business_license', | |||||
base64: path, | |||||
}; | |||||
const options = { | |||||
type: 2, | |||||
data: data, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(ocrAllQuery, options).then((res) => { | |||||
const data = stringToJson(res.bizContent); | |||||
console.log("营业执照",data) | |||||
if (data.result) { | |||||
state.form.url2 = ''; | |||||
state.form.companyName = stringToJson(data.result | |||||
.businessLicense)[ | |||||
'名称']; | |||||
state.form.code = stringToJson(data.result | |||||
.businessLicense)[ | |||||
'统一社会信用代码']; | |||||
cardFileImageUpdateyy(path) | |||||
} | |||||
}); | |||||
}) | |||||
.catch((error) => {}); | |||||
}, | |||||
}); | |||||
}; | |||||
//委托书获取图片给后端 | |||||
const cardFileImageUpdateyy = (val: any) => { | |||||
var data = { | |||||
fileBase64: val, | |||||
}; | |||||
const options = { | |||||
type: 2, | |||||
data: data, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(fileUpload, options).then((res) => { | |||||
const data = stringToJson(res.bizContent); | |||||
state.form.url1 = data.data.url; | |||||
}); | |||||
}; | |||||
</script> | </script> | ||||
<style scoped> | <style scoped> | ||||
font-size:30rpx; | font-size:30rpx; | ||||
padding:30rpx 20rpx 20rpx 20rpx; | padding:30rpx 20rpx 20rpx 20rpx; | ||||
} | } | ||||
.open{ | |||||
height: 80rpx; | |||||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||||
border-radius: 40rpx; | |||||
font-size: 32rpx; | |||||
font-weight: 400; | |||||
color: #ffffff; | |||||
margin:0 30rpx; | |||||
} | |||||
</style> | </style> |
<template> | |||||
<view> | |||||
充值明细 | |||||
</view> | |||||
</template> | |||||
<script> | |||||
</script> | |||||
<style> | |||||
</style> |
</view> | </view> | ||||
</view> | </view> | ||||
<view class="money"> | <view class="money"> | ||||
¥:{{ item.oncePrice * 0.01 }} | |||||
¥:{{ item.fee * 0.01 }} | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> |
const state = reactive({ | const state = reactive({ | ||||
data: { | data: { | ||||
vehiclePlate: undefined, //车牌号 | vehiclePlate: undefined, //车牌号 | ||||
vehiclePlateNumber: "贵A12345", //车牌号 | |||||
vehiclePlateNumber: "", //车牌号 | |||||
vehiclePlateColor: 0, //车盘颜色 | vehiclePlateColor: 0, //车盘颜色 | ||||
type: "0", //车牌类型 | type: "0", //车牌类型 | ||||
userType: 1, | userType: 1, | ||||
promoteId:"", | promoteId:"", | ||||
longitude:"", | longitude:"", | ||||
latitude:"", | latitude:"", | ||||
zhuanAddress:'', //通过经纬度转的地址 | |||||
detailedAddress:'', //通过经纬度转的地址 | |||||
}, | }, | ||||
show: false, | show: false, | ||||
addressArray: [], | addressArray: [], | ||||
success: function (res) { | success: function (res) { | ||||
state.data.longitude=res.longitude; | state.data.longitude=res.longitude; | ||||
state.data.latitude=res.latitude; | state.data.latitude=res.latitude; | ||||
// zhuanAddress | |||||
// const myAmapFun = new amap.AMapWX({key:'f152f20c9e2ff22eb4bd7ad918ae4739'}); | |||||
// myAmapFun.getRegeo({ | |||||
// success: function(data){ | |||||
// //成功回调 | |||||
// console.log("成功回调",data) | |||||
// }, | |||||
// fail: function(info){ | |||||
// //失败回调 | |||||
// console.log(info) | |||||
// } | |||||
// }) | |||||
console.log("成功回调",res) | |||||
uni.request({ | |||||
url: 'https://apis.map.qq.com/ws/geocoder/v1/', | |||||
data: { | |||||
location: (res.latitude + "," + res.longitude), | |||||
key: 'U3EBZ-EITC3-SRW3P-3PKVC-LWFD6-SJBAE', | |||||
}, | |||||
success: function(res) { | |||||
console.log("成功回调",res) | |||||
state.data.detailedAddress = res.data.result.address; // 详细地址信息 | |||||
// 处理获取到的地址信息 | |||||
}, | |||||
fail: function(error) { | |||||
// 请求失败的处理 | |||||
} | |||||
}); | |||||
} | } | ||||
}); | }); | ||||
}); | }); |
<template> | <template> | ||||
<view class="container"> | <view class="container"> | ||||
<u-form label-width='200' :model="state.form" ref="uForm"> | <u-form label-width='200' :model="state.form" ref="uForm"> | ||||
<u-form-item label="姓名"> | <u-form-item label="姓名"> | ||||
<u-input v-model="state.form.agentName" /> | |||||
</u-form-item> | |||||
<u-form-item label="身份证"> | |||||
<u-input v-model="state.form.agentgender" /> | |||||
<u-input v-model="state.form.name" placeholder='请输入姓名'/> | |||||
</u-form-item> | </u-form-item> | ||||
<u-form-item label="银行卡号"> | <u-form-item label="银行卡号"> | ||||
<u-input v-model="state.form.agentIdNum" /> | |||||
<u-input v-model="state.form.card" placeholder='请输入银行卡号'/> | |||||
</u-form-item> | </u-form-item> | ||||
<u-form-item label="开户银行"> | <u-form-item label="开户银行"> | ||||
<u-input v-model="state.form.begindate" type="select" /> | |||||
<u-input v-model="state.form.bank" placeholder='请输入开户银行'/> | |||||
</u-form-item> | </u-form-item> | ||||
<!-- <u-form-item label="身份证"> | |||||
<u-input v-model="state.form.agentgender" /> | |||||
</u-form-item> --> | |||||
<!-- <u-form-item label="开户银行"> | |||||
<u-input v-model="state.form.begindate" type="select" /> | |||||
</u-form-item> --> | |||||
<!-- <u-form-item label="银行预留手机号"> | |||||
<u-input v-model="state.form.phone" /> | |||||
</u-form-item> --> | |||||
<u-form-item label="银行预留手机号"> | <u-form-item label="银行预留手机号"> | ||||
<u-input v-model="state.form.agentPhone" /> | |||||
<u-input v-model="state.form.phone" placeholder='请输入银行预留手机号'/> | |||||
<u-button type="success" size="mini" @click="getCode" v-if="waitTime==0">获取验证码</u-button> | |||||
<text class="btn" v-else>{{waitTime}}后重试</text> | |||||
</u-form-item> | </u-form-item> | ||||
<u-form-item label="验证码"> | |||||
<u-form-item label="验证码" placeholder='请输入验证码'> | |||||
<u-input v-model="state.form.code" /> | <u-input v-model="state.form.code" /> | ||||
</u-form-item> | </u-form-item> | ||||
</u-form> | </u-form> | ||||
<!-- <view class="uni-list" style='font-size:32rpx'> | |||||
<view class="uni-list-cell uni-list-cell-pd"> | |||||
<view class="uni-list-cell-db">是否默认</view> | |||||
<switch style="transform:scale(0.7)" @change="switchChange"/> | |||||
</view> | |||||
</view> --> | |||||
<view style='margin-top: 40rpx;'> | <view style='margin-top: 40rpx;'> | ||||
<submit-button title="提交绑定" @submit="submit"></submit-button> | <submit-button title="提交绑定" @submit="submit"></submit-button> | ||||
</view> | </view> | ||||
</template> | </template> | ||||
<script setup lang="ts"> | <script setup lang="ts"> | ||||
import { | |||||
reactive | |||||
} from "vue"; | |||||
import { reactive,ref } from "vue"; | |||||
import {request} from "@/utils/network/request.js"; | |||||
import {addBankCard,sendCode} from "@/utils/network/api.js"; | |||||
import {stringToJson} from "@/utils/network/encryption.js"; | |||||
import { msg } from "@/utils/utils"; | |||||
let waitTime = ref(0); | |||||
const state = reactive({ | const state = reactive({ | ||||
ocrData: { | |||||
name: '', | |||||
gender: '', | |||||
idno: '', | |||||
address: '', | |||||
begindate: '', | |||||
enddate: '', | |||||
tel: '' | |||||
}, | |||||
form: { | form: { | ||||
orderId: '', //订单ID | |||||
userName: '', //开户人姓名 | |||||
userIdType: '101', //用户证件类型 101//身份证 | |||||
userIdNum: '', //用户证件号码 | |||||
userPosImgUrl: "", //身份证正面 | |||||
userNegImgUrl: '', //身份证反面 | |||||
tel: '', //开户人手机号 | |||||
address: '', //开户人地址 | |||||
sceneType: '', //用户协议支撑服务场景(发行服务机构和用户签订的协议) | |||||
channelId: '', //渠道id | |||||
gender: '', | |||||
customerIdVld: '', | |||||
agentName: '', | |||||
agentgender: '', | |||||
agentPhone: '', | |||||
agentIdType: '101', | |||||
agentIdNum: '', | |||||
agentPosImgUrl: '', | |||||
agentNegImgUrl: '', | |||||
proxyUrl: '', | |||||
agentAddress: '', | |||||
begindate: '', | |||||
code: '' | |||||
}, | |||||
orderId: '', | |||||
isMyPeopple: true, | |||||
buchongData: { | |||||
'conmpany': '李某一', | |||||
'type': '居民身份证', | |||||
'card': '23728347626342332', | |||||
'phone': '' | |||||
}, | |||||
name:'', | |||||
card:'', | |||||
bank:'', | |||||
phone:'', | |||||
code:'', | |||||
}, | |||||
// isDefault:0, //是否默认 | |||||
}) | }) | ||||
const submit = () => { | |||||
for(var i in state.form){ | |||||
if(!state.form[i]){ | |||||
msg('请将信息填写完整!'); | |||||
return; | |||||
} | |||||
} | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
'accountId': state.form.name, | |||||
'bankCardId': state.form.card, | |||||
'bankAddress': state.form.bank, | |||||
'code': state.form.code, | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(addBankCard, options).then((res) => { | |||||
const data = stringToJson(res.bizContent) | |||||
console.log("添加银行卡",data) | |||||
}) | |||||
} | |||||
const getCode = () => { | |||||
console.log(123); | |||||
if (state.form.phone) { | |||||
sendCodeApi() | |||||
codeInterval() | |||||
} else { | |||||
uni.showToast({ | |||||
title: '请输入手机号', | |||||
icon: 'none' | |||||
}); | |||||
} | |||||
} | |||||
// 发送验证码 | |||||
const sendCodeApi = (type) => { | |||||
//参数说明 | |||||
let options = { | |||||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | |||||
data: { | |||||
mobile: state.form.phone | |||||
}, //请求参数 | |||||
method: "POST", //提交方式(默认POST) | |||||
showLoading: true, //是否显示加载中(默认显示) | |||||
}; | |||||
//调用方式 | |||||
request(sendCode, options) | |||||
.then((res) => { | |||||
}) | |||||
.catch((err) => { | |||||
console.log(err); | |||||
}); | |||||
} | |||||
//倒计时函数 | |||||
const codeInterval = () => { | |||||
waitTime.value = 60 | |||||
let timer = setInterval(() => { | |||||
if (waitTime.value == 1) { | |||||
clearInterval(timer) | |||||
} | |||||
waitTime.value -= 1 | |||||
}, 1000) | |||||
} | |||||
// 是否默认 | |||||
// const switchChange=(e)=>{ | |||||
// console.log('switch1 发生 change 事件,携带值为', e.detail.value); | |||||
// if(e.detail.value){ | |||||
// state.isDefault=1 | |||||
// }else{ | |||||
// state.isDefault=0 | |||||
// } | |||||
// } | |||||
</script> | </script> | ||||
<style lang="scss" scoped> | <style lang="scss" scoped> | ||||
.container { | .container { | ||||
padding: 30rpx; | padding: 30rpx; | ||||
} | } | ||||
.uni-list-cell{ | |||||
display: flex; | |||||
margin: 10rpx auto; | |||||
justify-content: space-between; | |||||
align-items: center; | |||||
} | |||||
::v-deep .u-form-item--right__content__slot{ | |||||
display:flex !important; | |||||
align-items: center; | |||||
} | |||||
.btn{ | |||||
background: #19BE6B; | |||||
padding: 0rpx 32rpx; | |||||
border-radius: 10rpx; | |||||
color: white; | |||||
font-size: 24rpx; | |||||
height: 46rpx; | |||||
line-height: 46rpx; | |||||
text-align: center; | |||||
} | |||||
</style> | </style> |
<view class="card">储蓄卡</view> | <view class="card">储蓄卡</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="button" @click.stop='delCard()'>解除绑定</view> | |||||
<view class="button" @click.stop='delCard(11)'>解除绑定</view> | |||||
</view> | </view> | ||||
<view class="value">6216 **** **** 8721</view> | <view class="value">6216 **** **** 8721</view> | ||||
<view class='default'>默认</view> | |||||
<!-- <view class='default'>默认</view> --> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="container" @click="navTo('/subpackage/personal-center/setting/bank-card/bank-card-add')"> | <view class="container" @click="navTo('/subpackage/personal-center/setting/bank-card/bank-card-add')"> | ||||
<view class='default'>默认</view> | <view class='default'>默认</view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view style='margin-top: 40rpx;' @click="navTo('/subpackage/personal-center/setting/bank-card/bank-card-add')"> | |||||
<submit-button title="+ 添加银行卡"> | |||||
</submit-button> | |||||
<view style='margin: 40rpx 30rpx;' @click="navTo('/subpackage/personal-center/setting/bank-card/bank-card-add')"> | |||||
<submit-button title="+ 添加银行卡"></submit-button> | |||||
</view> | </view> | ||||
</template> | </template> | ||||
<script lang="ts" setup> | <script lang="ts" setup> | ||||
import { reactive } from "vue"; | |||||
import {request} from "@/utils/network/request.js"; | |||||
import {queryBankCard,delBankCard} from "@/utils/network/api.js"; | |||||
import {stringToJson} from "@/utils/network/encryption.js"; | |||||
import {navTo} from '@/utils/utils'; | import {navTo} from '@/utils/utils'; | ||||
const delCard=()=>{ | |||||
console.log("删除") | |||||
import { onLoad} from "@dcloudio/uni-app"; | |||||
const state = reactive({ | |||||
name:'' | |||||
}) | |||||
onLoad((option : any) => { | |||||
state.name=option.name; | |||||
getBankList(); | |||||
}) | |||||
const getBankList=()=>{ | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
'accountId': state.name | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(queryBankCard, options).then((res) => { | |||||
const data = stringToJson(res.bizContent) | |||||
console.log("获取银行卡",data) | |||||
}) | |||||
} | |||||
const delCard=(cardId)=>{ | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
'accountId': state.name, | |||||
'bankCardId':cardId | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(delBankCard, options).then((res) => { | |||||
const data = stringToJson(res.bizContent) | |||||
console.log("删除银行卡",data); | |||||
getBankList(); | |||||
}) | |||||
} | } | ||||
</script> | </script> | ||||
// 单位账户充值 | // 单位账户充值 | ||||
export const accountLogin="308679d555fa47da84876a8aeaee40a4" //单位账户登录 | export const accountLogin="308679d555fa47da84876a8aeaee40a4" //单位账户登录 | ||||
export const addBankCard="578a8372a8c0414aa917c84ac8c802b9" //对公账户银行账户添加接口 | |||||
export const queryBankCard="769790d75f3648a8925312c7e1496860" //对公账户银行账户查询接口 | |||||
export const delBankCard="0a05e54acebe46d29e2fbcaf1db95c75" //对公账户银行账户移除接口 |