소스 검색

工单升级

yxb
DESKTOP-2IO5MST\huting 1 년 전
부모
커밋
ea66925f8d

+ 2
- 2
composables/order/useOrderList.ts 파일 보기

import { reactive, ref } from 'vue'; import { reactive, ref } from 'vue';
import { hasLogin, msg } from "@/utils/utils"; import { hasLogin, msg } from "@/utils/utils";
export default function useOrderList() { export default function useOrderList() {
const tabbarRef = ref<{ changeTab: (index: Number) => void }>()
const tabbarRef = ref<{ changeTab : (index : Number) => void }>()


const data = reactive({ const data = reactive({
//登录状态 //登录状态
{ id: 3, name: '待激活' }, { id: 3, name: '待激活' },
{ id: 4, name: '退款/换货' } { id: 4, name: '退款/换货' }
], ],

}) })


onLoad((option) => { onLoad((option) => {
console.log("option", option)
if (!option.index) { if (!option.index) {
data.tabIndex = 0 data.tabIndex = 0
} else { } else {

+ 1
- 1
pages/order/components/order-list-item.vue 파일 보기

} }


.search-layout { .search-layout {
padding-top: 80rpx;
padding-top: 180rpx;


.search-box { .search-box {
margin: 30rpx 30rpx 0rpx 30rpx; margin: 30rpx 30rpx 0rpx 30rpx;

+ 32
- 27
pages/order/components/order-tabbar.vue 파일 보기

<!-- 切换的tabBar --> <!-- 切换的tabBar -->
<template> <template>
<view class="tab-bar" @touchmove.stop.prevent="()=>{}"> <view class="tab-bar" @touchmove.stop.prevent="()=>{}">
<scroll-view id="nav-bar" class="noScorll bar-view" scroll-x :scroll-left="data.scrollLeft">
<view v-for="(item,index) in tabs" :key="item.id" :class="{active:index === curIndex}" class="bar-item"
:style="{width: `${data.itemWidth}px`}" @click="changeTab(index)">
{{item.name}}
</view>
<scroll-view id="nav-bar" class="noScorll bar-view" scroll-x :scroll-left="data.scrollLeft">
<view v-for="(item,index) in tabs" :key="item.id" :class="{active:index === curIndex}" class="bar-item"
:style="{width: `${data.itemWidth}px`}" @click="changeTab(index)">
{{item.name}}
</view>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>


<script setup lang="ts"> <script setup lang="ts">
import {ref,watch, reactive, PropType} from 'vue'
import { ref, watch, reactive, PropType } from 'vue'


const emit = defineEmits(['update:curIndex']) const emit = defineEmits(['update:curIndex'])
const props = defineProps({ const props = defineProps({
}, },
//标签选项数组 //标签选项数组
tabs: { tabs: {
type: Array as PropType<{ id: number; name: string }[]>,
type: Array as PropType<{ id : number; name : string }[]>,
default: () => [] default: () => []
} }
}) })


/*监听标签数组变化,来计算每个标签占的宽度*/ /*监听标签数组变化,来计算每个标签占的宽度*/
watch(() => props.tabs, (newVal) => { watch(() => props.tabs, (newVal) => {
if (newVal && newVal.length < 5) {
if (newVal && newVal.length < 5) {
data.itemWidth = data.windowWidth / newVal.length data.itemWidth = data.windowWidth / newVal.length
} }
}, {immediate: true});
}, { immediate: true });




/* 改变tab refresh:点击同个tab是否刷新*/ /* 改变tab refresh:点击同个tab是否刷新*/
const changeTab = (index,refresh?:boolean) => {
console.log("index",index)
if(refresh){
const changeTab = (index, refresh ?: boolean) => {
console.log("index", index)
if (refresh) {
uni.$emit("refreshOrder"); uni.$emit("refreshOrder");
return; return;
} }
padding-bottom: 8rpx; padding-bottom: 8rpx;
// border-bottom: 1px solid #efeff4; // border-bottom: 1px solid #efeff4;
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8); box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
z-index: 9990;
position: fixed;
left: 0;
// z-index: 9990;
// position: fixed;
// left: 0;
.bar-view { .bar-view {
width: 100%; width: 100%;
text-align: center; text-align: center;
background-color: white; background-color: white;
white-space: nowrap; /* +++ 不换行*/
white-space: nowrap;
/* +++ 不换行*/
position: sticky; position: sticky;
top:0;
top: 0;
.bar-item { .bar-item {
flex: 1; //平均分配 flex: 1; //平均分配
font-size: 28rpx; font-size: 28rpx;
line-height: 80rpx; line-height: 80rpx;
position: relative; position: relative;
display: inline-block; /*+++ 在一行显示*/
display: inline-block;
/*+++ 在一行显示*/
min-width: 150rpx; min-width: 150rpx;
&:after { &:after {
position: absolute; position: absolute;
content: ''; content: '';
transition: .3s; transition: .3s;
} }
} }
.active { .active {
// color: #00B38B; // color: #00B38B;
font-weight: bold; font-weight: bold;
font-size:30rpx;
font-size: 30rpx;

&:after { &:after {
width: 70%; width: 70%;
border-radius: 6rpx; border-radius: 6rpx;
} }
&:first-child{

&:first-child {
&:after { &:after {
width:50%;
width: 50%;
} }
} }
&:last-child{

&:last-child {
&:after { &:after {
width: 95%; width: 95%;
} }
} }
} }
} }
</style>
</style>

+ 70
- 9
pages/order/order.vue 파일 보기

<!-- 订单列表2 --> <!-- 订单列表2 -->
<template> <template>
<filter> <filter>
<empty-view v-if="!data.login" mode="permission" content="请先登录再查看订单" btnTxt="立即登录"
<empty-view v-if="!data.login" mode="permission" content="请先登录再查看订单" btnTxt="立即登录"
@btnClick="$util.navTo('/login/login')"> @btnClick="$util.navTo('/login/login')">
</empty-view> </empty-view>


<view class="list-wrapper" v-else> <view class="list-wrapper" v-else>
<order-tabbar ref="tabbarRef" :tabs="data.tabsList" v-model:curIndex="data.tabIndex"
v-if="data.tabsList.length > 0" ></order-tabbar>
<view class="top-content">
<view class="top-menu">
<view :class="item == state.tabActive ? 'tab active' : 'tab'" v-for="item in state.flowPathTabList"
:key="item" @click="flowPathTabHandle(item)">
<view class="border"></view>{{ item }}
</view>
</view>
<order-tabbar ref="tabbarRef" :tabs="data.tabsList" v-model:curIndex="data.tabIndex"
v-if="data.tabsList.length > 0"></order-tabbar>
</view>



<order-list-item ref="mescrollItem" :index="data.tabIndex" :refresh="data.refresh"> <order-list-item ref="mescrollItem" :index="data.tabIndex" :refresh="data.refresh">
</order-list-item> </order-list-item>
</view> </view>
</filter>
</filter>
</template> </template>


<script setup lang="ts"> <script setup lang="ts">
import orderTabbar from "./components/order-tabbar.vue"; import orderTabbar from "./components/order-tabbar.vue";
import orderListItem from "./components/order-list-item"; import orderListItem from "./components/order-list-item";
import useOrderList from "@/composables/order/useOrderList"; import useOrderList from "@/composables/order/useOrderList";
import filter from '@/components/filter/filter.vue';
import { onLoad} from "@dcloudio/uni-app";
import filter from '@/components/filter/filter.vue';
import { onLoad } from "@dcloudio/uni-app";
import {
reactive
} from "vue";
const { const {
data, data,
tabbarRef tabbarRef
} = useOrderList(); } = useOrderList();
onLoad((option)=>{
const state = reactive({
tabActive: "小程序",
flowPathTabList: ["小程序", "线下网点"],
})
onLoad((option) => {
// console.log("option",option) // console.log("option",option)
// data.tabIndex=option.index // data.tabIndex=option.index
}) })
const flowPathTabHandle = (tab) => {
state.tabActive = tab;
};
</script> </script>


<style lang="scss"> <style lang="scss">
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.list-wrapper {}
</style>
.top-content {
position: fixed;
left: 0;
z-index: 99999;
background-color: white;
}

.top-menu {
display: flex;
justify-content: space-around;
}

.top-menu .tab {
font-size: 28rpx;
padding: 30rpx 30rpx;
color: #666666;
position: relative;
}

.top-menu .active .border {
position: absolute;
width: 70%;
height: 16rpx;
background: #00b38b;
opacity: 0.3;
bottom: 28rpx;
z-index: -99;
left: 15%;
border-radius: 6rpx;
}

.top-menu .active {
font-weight: bold;
font-size: 32rpx;
color: #0d0f26;
}

.top-menu .active::before {
width: 100%;
height: 16rpx;
background: #00b38b;
opacity: 0.3;
}
</style>

+ 66
- 5
subpackage/after-sale/equipment-upgrade/select-car.vue 파일 보기

ref ref
} from "vue" } from "vue"
import { import {
navTo
navTo, msg
} from "@/utils/utils" } from "@/utils/utils"
import { import {
onLoad, onLoad,
onShow onShow
} from "@dcloudio/uni-app"; } from "@dcloudio/uni-app";
import { import {
orderList
orderList,
workOrderList,
userInfoQuery,
searchVehicleInfo
} from "@/utils/network/api.js"; } from "@/utils/network/api.js";
import { import {
request request
} from "@/utils/network/encryption"; } from "@/utils/network/encryption";


const state = reactive({ const state = reactive({
list: []
list: [],
businessType: "",
customerId: "",
vehiclePlate: "",
vehiclePlateColor: ""
}); });
onLoad(() => { onLoad(() => {
state.businessType = getItem('key')['DASP_PUSH_TYPE'][0]['code']
quanCheckActionTrue().then((item : any) => { quanCheckActionTrue().then((item : any) => {
state.list = item.data state.list = item.data
console.log(item) console.log(item)

}) })
}); });


const searchVehicleInfoQuery = (vehicleId) => {
const options = {
type: 2,
data: {
vehicleId: vehicleId
},
method: "POST",
showLoading: true,
};
return new Promise(async (resolve, reject) => {
const res = await request(searchVehicleInfo, options);
const data = stringToJson(res.bizContent);
resolve(data);
}).catch((error) => {
reject(error);
});
}
const quanCheckActionTrue = () => { const quanCheckActionTrue = () => {
let source = "" let source = ""
// #ifdef MP-ALIPAY // #ifdef MP-ALIPAY
const flag = ref('0') const flag = ref('0')


const choose = (i, item) => { const choose = (i, item) => {
console.log(item.cardId)
navTo(`/subpackage/after-sale/equipment-upgrade/upgrade-confirm?id=${item.id}`)
let id = item.id
searchVehicleInfoQuery(item.vehicleId).then((item : any) => {
console.log("====", item.vehicles[0])
state.customerId = item.vehicles[0]['customerId']
state.vehiclePlate = item.vehicles[0]['vehiclePlate']
state.vehiclePlateColor = item.vehicles[0]['vehiclePlateColor']
isWorkOrder().then((item : any) => {
console.log("查询是否有工单", item)
if (item.data) {
if (item.data[0]['status'] == '0') {
navTo(`/subpackage/after-sale/equipment-upgrade/upgrade-confirm?id=${id}&workId=${item.data[0]['id']}`)
}
} else {
msg('暂无工单')
}
})
})
}
const isWorkOrder = () => {
var data = {
vehiclePlate: state.vehiclePlate,
vehiclePlateColor: state.vehiclePlateColor,
customerId: state.customerId,
};
const options = {
type: 2,
data: data,
method: "POST",
showLoading: true,
};
return new Promise(async (resolve, reject) => {
const res = await request(workOrderList, options);
const data = stringToJson(res.bizContent);
resolve(data);
}).catch((error) => {
reject(error);
});
} }
</script> </script>



+ 26
- 3
subpackage/after-sale/equipment-upgrade/upgrade-confirm.vue 파일 보기

modifyObuSysInfo, modifyObuSysInfo,
modifyObuVehicleInfo, modifyObuVehicleInfo,
obuActivation, obuActivation,
obuWriteAgain
obuWriteAgain,
changeWorkOrderStatus
} from "@/utils/network/api.js"; } from "@/utils/network/api.js";


import { import {
showPopup: false, showPopup: false,
flag: false, flag: false,
disabled: false, disabled: false,
workId: ""
}) })
const orderInfos = reactive({ const orderInfos = reactive({
orderId: "", orderId: "",
}); });
let cmdRandNum = ''; let cmdRandNum = '';
onLoad((option) => { onLoad((option) => {
console.log("options", option)
//请求订单详情 //请求订单详情
queryOrderDetail(option.id); queryOrderDetail(option.id);
getOrderDetails(option.id) getOrderDetails(option.id)
state.workId = option.workId
}); });


onShow((option) => { onShow((option) => {
tools.hideLoadingAlert(); tools.hideLoadingAlert();
console.log("在线激活 请求", res); console.log("在线激活 请求", res);
if (res[0] == "9000") { if (res[0] == "9000") {
state.showPopup = true;
changeWorkOrderStatusRequest().then(() => {
state.showPopup = true;
})
} }
}); });
}) })
} }
}); });
}; };
const changeWorkOrderStatusRequest = () => {
var data = {
id: state.workId,
};
const options = {
type: 2,
data: data,
method: "POST",
showLoading: true,
};
return new Promise(async (resolve, reject) => {
const res = await request(changeWorkOrderStatus, options);
const data = stringToJson(res.bizContent);
resolve(data);
}).catch((error) => {
reject(error);
});
}
</script> </script>


<style> <style>

+ 6
- 5
subpackage/orders/apply-ex-goods.vue 파일 보기

value: "ON_LINE", value: "ON_LINE",
name: "线上", name: "线上",
}, },
{
checked: false,
value: "OFFLINE",
name: "线下",
},
// 取消线下网点退货,隐藏对应模式,不要删除,后期可能还会重提业务修改
// {
// checked: false,
// value: "OFFLINE",
// name: "线下",
// },
], ],
}, },



+ 34
- 7
subpackage/personal-center/car-message-change.vue 파일 보기

ocrAllQuery, ocrAllQuery,
etcCarOcrCard, etcCarOcrCard,
searchVehicleInfo, searchVehicleInfo,
carChangeApi
carChangeApi,
creactWorkOrder
} from "@/utils/network/api.js"; } from "@/utils/network/api.js";


import { import {
outlineH: "", outlineH: "",
isEnableChangeOCRCarInfo: false, //申办时是否允许修改OCR识别出来的车辆信息数据 isEnableChangeOCRCarInfo: false, //申办时是否允许修改OCR识别出来的车辆信息数据
// allData: {} // allData: {}
businessType: "",
}); });
const searchVehicleInfoQuery = () => { const searchVehicleInfoQuery = () => {
const options = { const options = {
getGlobalParam(); //全局配置数据 getGlobalParam(); //全局配置数据
console.log("option", option) console.log("option", option)
searchVehicleInfoQuery(); //车辆信息查询 searchVehicleInfoQuery(); //车辆信息查询
state.businessType = getItem('key')['DASP_PUSH_TYPE'][0]['code']
console.log("getItem('key')['DASP_PUSH_TYPE']", getItem('key')['DASP_PUSH_TYPE'])
}); });


//监听页面滚动 //监听页面滚动
request(carChangeApi, options) request(carChangeApi, options)
.then((res) => { .then((res) => {
const data = stringToJson(res.bizContent); const data = stringToJson(res.bizContent);
msg("车辆信息变更成功")
setTimeout(() => {
uni.navigateBack({
delta: 2
})
}, 2000)
// 创建工单
creactWorkOrderRequest().then((val : any) => {
msg("车辆信息变更成功")
setTimeout(() => {
uni.navigateBack({
delta: 2
})
}, 2000)
})
}) })
.catch((res) => { .catch((res) => {
console.log(res); console.log(res);
}); });
}; };
const creactWorkOrderRequest = () => {
const options = {
type: 2,
data: {
businessType: state.businessType,
vehiclePlate: state.form.vehicleIdNum,
vehiclePlateColor: state.vehiclePlateColor,
customerId: state.form.customerId
},
method: "POST",
showLoading: true,
};


return new Promise(async (resolve, reject) => {
const res = await request(creactWorkOrder, options);
const data = stringToJson(res.bizContent);
resolve(data);
}).catch((error) => {
reject(error);
});
}
const selectConfirm = (index : any) => { const selectConfirm = (index : any) => {
console.log(index); console.log(index);
state.form.useUserType = state.actionSheetList[index].value; state.form.useUserType = state.actionSheetList[index].value;

+ 16
- 10
subpackage/personal-center/setting/change-phone.vue 파일 보기

<input class="input" v-model="state.phone" focus placeholder="请输入手机号" placeholder-class="form-placeholder" <input class="input" v-model="state.phone" focus placeholder="请输入手机号" placeholder-class="form-placeholder"
type="number" maxlength="11" /> type="number" maxlength="11" />
</view> </view>
<view class="tips">* 仅修改账号手机号,不能修改etc预留手机号</view>
<view class="agreement"> <view class="agreement">
<checkbox-group @change="checkboxChange" class="group"> <checkbox-group @change="checkboxChange" class="group">
<checkbox :checked="state.checked" color="#00B38B" style="transform:scale(0.85)"> <checkbox :checked="state.checked" color="#00B38B" style="transform:scale(0.85)">
</checkbox> </checkbox>
<label>我已阅读并同意</label> <label>我已阅读并同意</label>
</checkbox-group> </checkbox-group>
<!-- <view class="txt-grey">我已阅读并同意</view> -->
<view class="txt-green" @click="toRead">《平台用户服务隐私协议》</view> <view class="txt-green" @click="toRead">《平台用户服务隐私协议》</view>
</view> </view>
</view> </view>
checked: false, //是否勾选阅读协议 checked: false, //是否勾选阅读协议
}); });


const checkboxChange = (e) => { const checkboxChange = (e) => {
console.log(e); console.log(e);
state.checked = !state.checked; state.checked = !state.checked;
}; };
// 去协议页面 // 去协议页面
const toRead=()=>{
const toRead = () => {
navTo("/login/agreement") navTo("/login/agreement")
} }


.then((res) => { .then((res) => {
msg("验证码发送成功!"); msg("验证码发送成功!");
// #ifdef MP-ALIPAY // #ifdef MP-ALIPAY
navTo(`/subpackage/personal-center/setting/change-phone-code-ali?phone=${state.phone}`);
navTo(`/subpackage/personal-center/setting/change-phone-code-ali?phone=${state.phone}`);
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
navTo(`/subpackage/personal-center/setting/change-phone-code?phone=${state.phone}`);
navTo(`/subpackage/personal-center/setting/change-phone-code?phone=${state.phone}`);
// #endif // #endif
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
</script> </script>


<style lang="scss" scoped> <style lang="scss" scoped>
.tips {
color: red;
padding: 30rpx 20rpx 0rpx 0rpx;
font-size: 30rpx;
}

.group { .group {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.register-main { .register-main {
border-top: 1rpx solid #dcdcdc; border-top: 1rpx solid #dcdcdc;
padding: 78rpx 30rpx 50rpx; padding: 78rpx 30rpx 50rpx;
.btn { .btn {
margin: 200rpx 40rpx 0px; margin: 200rpx 40rpx 0px;
} }
</style>
</style>

+ 17
- 18
subpackage/personal-center/setting/personal-information/corrections.vue 파일 보기

<template v-for="(col,index) in list" :key="index"> <template v-for="(col,index) in list" :key="index">
<view class="title">{{col.title}}</view> <view class="title">{{col.title}}</view>
<u-cell-group> <u-cell-group>
<u-cell-item :title="item.title" v-for="(item,i) in col.columns" :key="i"
@click="itemClick(item)" :titleStyle="titleStyle"></u-cell-item>
<u-cell-item :title="item.title" v-for="(item,i) in col.columns" :key="i" @click="itemClick(item)"
:titleStyle="titleStyle"></u-cell-item>
</u-cell-group> </u-cell-group>
</template> </template>
</template> </template>


<script setup lang="ts"> <script setup lang="ts">
import { msg, navTo } from '@/utils/utils'; import { msg, navTo } from '@/utils/utils';
const titleStyle = {fontSize:'28rpx',color:'#333333'};
const titleStyle = { fontSize: '28rpx', color: '#333333' };
const basePath = "/subpackage/personal-center/setting/"; const basePath = "/subpackage/personal-center/setting/";
const list = [ const list = [
{ {
title:'账号信息',
columns:[
{title:'手机号码',path:'change-phone',login:true},
title: '账号信息',
columns: [
{ title: '账号手机号修改', path: 'change-phone', login: true },
] ]
}, },
{ {
title:'基础信息',
columns:[
{title:'用户信息变更',path:'personal-information/user-change',login:true},
title: '基础信息',
columns: [
{ title: '用户信息变更', path: 'personal-information/user-change', login: true },
// {title:'补传身份证',path:'personal-information/user-card',login:true}, // {title:'补传身份证',path:'personal-information/user-card',login:true},
] ]
}, },
] ]
/* item点击 */ /* item点击 */
const itemClick = (item) => { const itemClick = (item) => {
if(!item.path){
if (!item.path) {
msg('找不到该界面哦!'); msg('找不到该界面哦!');
return; return;
} }
if(item.path === 'phone'){
if (item.path === 'phone') {
msg('小程序唤起手机号更变'); msg('小程序唤起手机号更变');
return; return;
} }
navTo(basePath + item.path,item.login);
navTo(basePath + item.path, item.login);
} }
</script> </script>


<style> <style>
page{
page {
background: #EEF7F7; background: #EEF7F7;
} }
</style> </style>
padding-top: 30rpx; padding-top: 30rpx;
padding-left: 30rpx padding-left: 30rpx
} }

</style>
</style>

+ 28
- 21
subpackage/personal-center/setting/personal-information/user-change.vue 파일 보기

<u-field required labelWidth="180" v-model="state.ocrData.name" input-align='right' label="姓名" disabled <u-field required labelWidth="180" v-model="state.ocrData.name" input-align='right' label="姓名" disabled
:fieldStyle="fieldStyle"> :fieldStyle="fieldStyle">
</u-field> </u-field>
<!-- <u-field required labelWidth="180" v-model="state.ocrData.gender" input-align='right' label="性别"
<!-- <u-field required labelWidth="180" v-model="state.ocrData.gender" input-align='right' label="性别"
:fieldStyle="fieldStyle"> :fieldStyle="fieldStyle">
</u-field> --> </u-field> -->
<u-field required labelWidth="180" v-model="state.ocrData.userCardId" input-align='right' label="身份证号" <u-field required labelWidth="180" v-model="state.ocrData.userCardId" input-align='right' label="身份证号"
:fieldStyle="fieldStyle" disabled> :fieldStyle="fieldStyle" disabled>
</u-field> </u-field>
<!-- <u-field required labelWidth="180" v-model="state.ocrData.add" input-align='right' label="地址"
<!-- <u-field required labelWidth="180" v-model="state.ocrData.add" input-align='right' label="地址"
:fieldStyle="fieldStyle"> :fieldStyle="fieldStyle">
</u-field> --> </u-field> -->


<!-- <u-cell-item required title="证件有效期" :borderBottom="false" @click="timeClick"
<!-- <u-cell-item required title="证件有效期" :borderBottom="false" @click="timeClick"
:titleStyle="{fontSize:'28rpx',color:'#777777'}" :valueStyle="{fontSize:'28rpx',color:'#333333'}" :titleStyle="{fontSize:'28rpx',color:'#777777'}" :valueStyle="{fontSize:'28rpx',color:'#333333'}"
:value="state.ocrData.type"></u-cell-item> --> :value="state.ocrData.type"></u-cell-item> -->
<u-field required labelWidth="180" :borderTop="true" v-model="state.ocrData.tel" input-align='right' <u-field required labelWidth="180" :borderTop="true" v-model="state.ocrData.tel" input-align='right'
label="联系方式" :fieldStyle="fieldStyle" disabled> label="联系方式" :fieldStyle="fieldStyle" disabled>
</u-field> </u-field>
</view>
<view class="tips">* 修改的是etc预留手机号,不能修改登录账号手机号,修改后需要到票根网重新实名</view>
</view>


<view class="subBtn"> <view class="subBtn">
<submit-button title="去修改" form-type="submit" @submit="formSubmit"> <submit-button title="去修改" form-type="submit" @submit="formSubmit">
import { import {
userInfoQuery userInfoQuery
} from "@/utils/network/api.js"; } from "@/utils/network/api.js";
import{
import {
getItem getItem
} from "@/utils/storage.ts" } from "@/utils/storage.ts"
import { import {
color: '#333333', color: '#333333',
fontSize: '28rpx' fontSize: '28rpx'
}; };
import {onLoad} from"@dcloudio/uni-app"
import { onLoad } from "@dcloudio/uni-app"
const state = reactive({ const state = reactive({
ocrData: { ocrData: {
name:'',
gender:'',
userCardId:'',
add:"",
tel:''
name: '',
gender: '',
userCardId: '',
add: "",
tel: ''


}, },
customerId:''
customerId: ''
}) })


const getUserinfo = () => { const getUserinfo = () => {
const options = { const options = {
type: 2, type: 2,
data: {openId: getItem('openId')},
data: { openId: getItem('openId') },
method: "POST", method: "POST",
showLoading: true, showLoading: true,
}; };
request(userInfoQuery, options).then((res) => { request(userInfoQuery, options).then((res) => {
const data = stringToJson(res.bizContent); const data = stringToJson(res.bizContent);
console.log(data,"用户信息");
state.ocrData.name=data.list[0].customerName
state.ocrData.userCardId=data.list[0].customerIdNum
state.ocrData.tel=data.list[0].tel
state.customerId=data.list[0].customerId
console.log(data, "用户信息");
state.ocrData.name = data.list[0].customerName
state.ocrData.userCardId = data.list[0].customerIdNum
state.ocrData.tel = data.list[0].tel
state.customerId = data.list[0].customerId
}); });
} }


const formSubmit = () => { const formSubmit = () => {
navTo(`/subpackage/personal-center/setting/personal-information/user-card?customerId=${state.customerId}`) navTo(`/subpackage/personal-center/setting/personal-information/user-card?customerId=${state.customerId}`)
}; };
onLoad(()=>{
onLoad(() => {
getUserinfo() getUserinfo()
}) })
</script> </script>
.subBtn { .subBtn {
padding: 500rpx 40rpx 60rpx; padding: 500rpx 40rpx 60rpx;
} }
</style>

.tips {
color: red;
padding: 20rpx 28rpx 20rpx 16rpx;
font-size: 30rpx;
}
</style>

+ 4
- 1
utils/network/api.js 파일 보기

export const transferApply = "fc4f88f8f2e947b197ed8011ce27cb07" //过户激活申请 export const transferApply = "fc4f88f8f2e947b197ed8011ce27cb07" //过户激活申请
export const accountApi = "9b7e8508229b492f8dd588e0a4180334" //对公账户查询 export const accountApi = "9b7e8508229b492f8dd588e0a4180334" //对公账户查询
export const queryPhoneApi = "068cf4d1a26f4c2ba37dcf92c7519f88" //对公账户忘记密码查询手机号 export const queryPhoneApi = "068cf4d1a26f4c2ba37dcf92c7519f88" //对公账户忘记密码查询手机号
export const forgetPassApi = "edaf323b75ba4a2490c242305d692b40" //对公账户忘记密码提交
export const forgetPassApi = "edaf323b75ba4a2490c242305d692b40" //对公账户忘记密码提交
export const creactWorkOrder = "c0e9940b350a44c8a60c7d57691658d5" //创建工单
export const workOrderList = "9cc56a94b9e342228a89e389303f0898" //查询是否有工单
export const changeWorkOrderStatus = "154c93c9474046dc8c397c35f641e97c" //修改工单

Loading…
취소
저장