DESKTOP-2IO5MST\huting 2 лет назад
Родитель
Сommit
c7e47412eb

+ 76
- 12
pages/user/user.vue Просмотреть файл

<view class="panel-box"> <view class="panel-box">
<view class="panel"> <view class="panel">
<view class="panel-item" @click="$util.navTo('/subpackage/personal-center/vehicle-information', true)"> <view class="panel-item" @click="$util.navTo('/subpackage/personal-center/vehicle-information', true)">
<view class="panel-text"><text class="num">2</text><text class="txt">辆</text></view>
<view class="panel-text"><text class="num">{{state.carNumber}}</text><text class="txt">辆</text></view>
<text class="type">车辆</text> <text class="type">车辆</text>
</view> </view>
<view class="panel-item"> <view class="panel-item">
<view class="cars box"> <view class="cars box">
<view class="right-head"> <view class="right-head">
<view class="tit">我的车辆</view> <view class="tit">我的车辆</view>
<view class="more">
<view class="more" @click="$util.navTo('/subpackage/personal-center/vehicle-information', true)">
<text class="more-text">查看全部</text> <text class="more-text">查看全部</text>
<image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image> <image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image>
</view> </view>
</view> </view>
<view class="car-item">
<view class="car-item" v-for="(item,index) in state.list">
<image :src="`${$imgUrl}user/icon-car.png`" class="car-pic"></image> <image :src="`${$imgUrl}user/icon-car.png`" class="car-pic"></image>
<view class="car-info"> <view class="car-info">
<view class="car-no"><text class="no">贵ZSC122</text><text class="color">蓝色</text></view>
<view class="card-no">卡号:52011328220202006876</view>
<view class="card-no">签号:5202192509222195</view>
<view class="car-no"><text class="no">{{item.vehiclePlate}}</text><text class="color">{{item.color}}</text></view>
<view class="card-no">卡号:{{item.card_id}}</view>
<view class="card-no">签号:{{item.obu_id}}</view>
</view> </view>
<view class="btn-unbind">解除绑定</view>
<view class="btn-unbind" @click="del(item.vehicleId)">解除绑定</view>
</view> </view>
<view class="sub-bind"> <view class="sub-bind">
<view class="item-tit"> <view class="item-tit">
<image :src="`${$imgUrl}user/icon-car-3.png`" class="icon icon-2"></image> <image :src="`${$imgUrl}user/icon-car-3.png`" class="icon icon-2"></image>
<text>我要关联车辆</text> <text>我要关联车辆</text>
</view> </view>
<view class="right-arrow">
<view class="right-arrow" @click="$util.navTo('/subpackage/personal-center/setting/car-information/car-create', true)">
<view class="sub-tit">增加未关联车辆</view> <view class="sub-tit">增加未关联车辆</view>
<image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image> <image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image>
</view> </view>
import navBar from "../../components/nav-bar/nav-bar2.vue"; import navBar from "../../components/nav-bar/nav-bar2.vue";
import { onLoad, onShow, onPageScroll } from "@dcloudio/uni-app"; import { onLoad, onShow, onPageScroll } from "@dcloudio/uni-app";
import { import {
userInfoIndex
userInfoIndex,selectCarInfo,delCarInfo
} from "@/utils/network/api.js"; } from "@/utils/network/api.js";
import { import {
request request
stringToJson stringToJson
} from "@/utils/network/encryption.js"; } from "@/utils/network/encryption.js";
import filter from '@/components/filter/filter.vue'; import filter from '@/components/filter/filter.vue';
import {vehiclePlateColor} from "@/datas/vehiclePlateColor.js";
const height = ref(null); const height = ref(null);
const top = ref(null); const top = ref(null);
const margin = ref(null); const margin = ref(null);
totalAmount: 0, totalAmount: 0,
}, },
vehicleManageList: [], vehicleManageList: [],
list:'', //车辆信息
carNumber:'' //车辆数量
}); });
onMounted(() => { onMounted(() => {
const res = uni.getMenuButtonBoundingClientRect(); const res = uni.getMenuButtonBoundingClientRect();
onShow((option : any) => { onShow((option : any) => {
state.data.opId = getItem(StorageKeys.OpenId); state.data.opId = getItem(StorageKeys.OpenId);
if(state.data.opId){ if(state.data.opId){
getUserInfo()
getUserInfo();
} }
}); });

// 查询车辆信息
const queryCarMsg = () => {
const options = {
type: 2,
data: {
"openId":getItem('openId')
},
method: "POST",
showLoading: true,
};
//调用方式
request(selectCarInfo, options).then((res) => {
const data = (stringToJson(res.bizContent).vehicleManages)
for(var i=0;i<1;i++){
for(var j=0;j<vehiclePlateColor.length;j++){
if(data[i].vehiclePlateColor==vehiclePlateColor[j]['id']){
data[i].color=vehiclePlateColor[j]['color']
}
}
}
state.list=data;
state.carNumber=data.length
console.log("state.list",state.list)
})
.catch((err) => {
});
}
const getUserInfo = () => { const getUserInfo = () => {

const options = { const options = {
type: 2, type: 2,
data: { data: {
state.accountInfoVo = data.accountInfoVo; state.accountInfoVo = data.accountInfoVo;
state.monthFlowingVo = data.monthFlowingVo; state.monthFlowingVo = data.monthFlowingVo;
state.vehicleManageList = data.monthFlowingVo state.vehicleManageList = data.monthFlowingVo
queryCarMsg();
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
}); });
} }
const del = (id) => {
wx.showModal({
title: '提示',
content: '是否删除该条车辆信息',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
let data = {
vehicleId: id,
openId: getItem('openId')
}
const options = {
type: 2,
data: data,
method: "POST",
showLoading: true,
};
request(delCarInfo, options).then((res) => {
const data = stringToJson(res.bizContent);
console.log(data)
state.list = data.vehicleManages
if (data.info == '成功.') {
uni.showToast({
title: "删除成功",
icon: "none"
})
queryCarMsg();
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
</script> </script>
<style> <style>
page { page {

+ 11
- 7
subpackage/after-sale/account-recharge/recharge.vue Просмотреть файл

onLoad((option : any) => { onLoad((option : any) => {
console.log("option",option.cardNumber) console.log("option",option.cardNumber)
state.form.cardNumber=option.cardNumber; state.form.cardNumber=option.cardNumber;
if(option.value){
state.form=JSON.parse(decodeURIComponent(option.value))
}
}); });
const goRecharge=()=>{ const goRecharge=()=>{
for(var i in state.from){
if(!state.from[i]){
for(var i in state.form){
if(!state.form[i]){
msg('请把信息填写完整!') msg('请把信息填写完整!')
return; return;
} }
const options = { const options = {
type: 2, type: 2,
data: { data: {
'accountId':state.from.name, //账户编号
'fee':state.from.fee, //公司营业执照统一社会信用代码
'bankCardId':state.from.cardNumber, //对公名称
'imageUrl':state.from.url, //密码
'accountId':state.form.name, //账户编号
'fee':state.form.fee, //公司营业执照统一社会信用代码
'bankCardId':state.form.cardNumber, //对公名称
'imageUrl':state.form.url, //密码
}, },
method: "POST", method: "POST",
showLoading: true, showLoading: true,
}); });
} }
const goBank=()=>{ const goBank=()=>{
const params=encodeURIComponent(JSON.stringify(state.form));
uni.redirectTo({ uni.redirectTo({
//关闭当前页面,跳转到应用内的某个页面。 //关闭当前页面,跳转到应用内的某个页面。
url:`/subpackage/personal-center/setting/bank-card/bank-card?choiceCard=1&value=encodeURIComponent(JSON.stringify(state.from))`
url:`/subpackage/personal-center/setting/bank-card/bank-card?choiceCard=1&value=${params}`
}); });
// navTo(`/subpackage/personal-center/setting/bank-card/bank-card?choiceCard=1`) // navTo(`/subpackage/personal-center/setting/bank-card/bank-card?choiceCard=1`)
} }

+ 1
- 1
subpackage/applyCard/opening-account-people.vue Просмотреть файл

</view> </view>
<view class="shibie-wrapper"> <view class="shibie-wrapper">
<view class="title"> 识别内容如下 </view> <view class="title"> 识别内容如下 </view>
<u-form label-width="200" :model="state.form" ref="uForm">
<u-form label-width="230" :model="state.form" ref="uForm">
<u-form-item label="姓名"> <u-form-item label="姓名">
<u-input v-model="state.form.userName" placeholder='请输入姓名' :disabled="state.isEnableOCRData"/> <u-input v-model="state.form.userName" placeholder='请输入姓名' :disabled="state.isEnableOCRData"/>
</u-form-item> </u-form-item>

+ 6
- 4
subpackage/personal-center/setting/bank-card/bank-card.vue Просмотреть файл

import {navTo} from '@/utils/utils'; import {navTo} from '@/utils/utils';
import { onLoad} from "@dcloudio/uni-app"; import { onLoad} from "@dcloudio/uni-app";
const state = reactive({ const state = reactive({
name:''
name:'',
params:{}, //传过来的参数
}) })
onLoad((option : any) => { onLoad((option : any) => {
console.log("option",option)
console.log("option",JSON.parse(decodeURIComponent(option.value)))
state.name=option.name; state.name=option.name;
state.choiceCard=option.choiceCard; state.choiceCard=option.choiceCard;
// getBankList();
state.params=JSON.parse(decodeURIComponent(option.value))
getBankList();
}) })
const getBankList=()=>{ const getBankList=()=>{
const options = { const options = {
}else{ }else{
uni.redirectTo({ uni.redirectTo({
//关闭当前页面,跳转到应用内的某个页面。 //关闭当前页面,跳转到应用内的某个页面。
url:`/subpackage/after-sale/account-recharge/recharge?cardNumber=${cardNumber}`
url:`/subpackage/after-sale/account-recharge/recharge?cardNumber=${cardNumber}&value=${encodeURIComponent(JSON.stringify(state.params))}`
}); });
// navTo(`/subpackage/after-sale/account-recharge/recharge?cardNumber=${cardNumber}`) // navTo(`/subpackage/after-sale/account-recharge/recharge?cardNumber=${cardNumber}`)
} }

+ 57
- 30
subpackage/personal-center/vehicle-information.vue Просмотреть файл

<template> <template>
<view > <view >
<view class="car-item">
<view class="car-item" v-for="(item,index) in state.list">
<image :src="`${$imgUrl}user/icon-car.png`" class="car-pic"></image> <image :src="`${$imgUrl}user/icon-car.png`" class="car-pic"></image>
<view class="car-info"> <view class="car-info">
<view class="car-no"><text class="no">贵ZSC122</text><text class="color">蓝色</text></view>
<view class="card-no">卡号:52011328220202006876</view>
<view class="card-no">签号:5202192509222195</view>
<view class="car-no"><text class="no">{{item.vehiclePlate}}</text><text class="color">{{item.color}}</text></view>
<view class="card-no">卡号:{{item.card_id}}</view>
<view class="card-no">签号:{{item.obu_id}}</view>
</view> </view>
<view class="btn-unbind">解除绑定</view>
</view>
<view class="car-item">
<image :src="`${$imgUrl}user/icon-car.png`" class="car-pic"></image>
<view class="car-info">
<view class="car-no"><text class="no">贵ZSC122</text><text class="color">蓝色</text></view>
<view class="card-no">卡号:52011328220202006876</view>
<view class="card-no">签号:5202192509222195</view>
</view>
<view class="btn-unbind">解除绑定</view>
</view>
<view class="car-item">
<image :src="`${$imgUrl}user/icon-car.png`" class="car-pic"></image>
<view class="car-info">
<view class="car-no"><text class="no">贵ZSC122</text><text class="color">蓝色</text></view>
<view class="card-no">卡号:52011328220202006876</view>
<view class="card-no">签号:5202192509222195</view>
</view>
<view class="btn-unbind">解除绑定</view>
<view class="btn-unbind" @click="del(item.vehicleId)">解除绑定</view>
</view> </view>
</view> </view>
</template> </template>
import {request} from "@/utils/network/request.js"; import {request} from "@/utils/network/request.js";
import {stringToJson} from "@/utils/network/encryption.js"; import {stringToJson} from "@/utils/network/encryption.js";
import { onLoad} from "@dcloudio/uni-app"; import { onLoad} from "@dcloudio/uni-app";
import {getCarMsg} from "@/utils/network/api.js";
import {selectCarInfo,delCarInfo} from "@/utils/network/api.js";
import {getItem} from "@/utils/storage"; import {getItem} from "@/utils/storage";
import {vehiclePlateColor} from "@/datas/vehiclePlateColor.js";
const state = reactive({ const state = reactive({
list:''
}) })
onLoad((option : any) => { onLoad((option : any) => {
queryCarMsg(); queryCarMsg();
const options = { const options = {
type: 2, type: 2,
data: { data: {
// "openId":getItem('openId')
"openId":getItem('openId')
}, },
method: "POST", method: "POST",
showLoading: true, showLoading: true,
}; };
//调用方式 //调用方式
request(getCarMsg, options).then((res) => {
const data = stringToJson(res.bizContent)
console.log("车辆管理信息查询",data);
request(selectCarInfo, options).then((res) => {
const data = stringToJson(res.bizContent).vehicleManages
for(var i=0;i<data.length;i++){
for(var j=0;j<vehiclePlateColor.length;j++){
if(data[i].vehiclePlateColor==vehiclePlateColor[j]['id']){
data[i].color=vehiclePlateColor[j]['color']
}
}
}
console.log("data",data)
state.list=data;
}) })
.catch((err) => { .catch((err) => {
}); });
} }
// 删除
const del = (id) => {
wx.showModal({
title: '提示',
content: '是否删除该条车辆信息',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
let data = {
vehicleId: id,
openId: getItem('openId')
}
const options = {
type: 2,
data: data,
method: "POST",
showLoading: true,
};
request(delCarInfo, options).then((res) => {
const data = stringToJson(res.bizContent);
console.log(data)
state.list = data.vehicleManages
if (data.info == '成功.') {
uni.showToast({
title: "删除成功",
icon: "none"
})
queryCarMsg();
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
</script> </script>


<style scoped> <style scoped>

+ 0
- 1
utils/network/api.js Просмотреть файл

export const judageQuanProduct="fe71273c1a394eaa999825afe7daa59b" //判断是否有权益产品 export const judageQuanProduct="fe71273c1a394eaa999825afe7daa59b" //判断是否有权益产品
export const getGlobalParam="d0579171c82443cb9b243c113309119a" //全局配置 export const getGlobalParam="d0579171c82443cb9b243c113309119a" //全局配置
export const getUserMsg="c4a499a2a63042b9a2d4e88fc77d3fc0" //通过opneId查询用户信息 export const getUserMsg="c4a499a2a63042b9a2d4e88fc77d3fc0" //通过opneId查询用户信息
export const getCarMsg="1030" //车辆管理信息查询
// 单位账户充值 // 单位账户充值
export const accountLogin="308679d555fa47da84876a8aeaee40a4" //单位账户登录 export const accountLogin="308679d555fa47da84876a8aeaee40a4" //单位账户登录

Загрузка…
Отмена
Сохранить