Quellcode durchsuchen

修改图片地址

yxb
不甘寂寞 vor 2 Jahren
Ursprung
Commit
2ee4e580f9

+ 2
- 2
applyCard/opening-account-unit.vue Datei anzeigen

@@ -15,7 +15,7 @@
<view class="tip-value"> 拍摄规范 </view>
</view>
</view>
<image class="icon" src="../../static/image/applyCard/zhizhao.png"></image>
<image class="icon" :src="`${$imgUrl}applyCard/zhizhao.png`"></image>
</view>
</view>
<view class="picture-wrapper" @click="cardImageOcr('1')">
@@ -27,7 +27,7 @@
<view class="tip-value"> 拍摄规范 </view>
</view>
</view>
<image class="icon" src="../../static/image/applyCard/renxiang.png"></image>
<image class="icon" :src="`${$imgUrl}applyCard/renxiang.png`"></image>
</view>
</view>
<view class="shibie-wrapper">

+ 4
- 1
composables/order/useOrderSkip.ts Datei anzeigen

@@ -16,7 +16,10 @@ export default function useOrderSkip(){
}else if(orderInfo.orderType === OrderTypes.增补OBU){
navTo(`/orders/order-details-obu?id=${orderInfo.id}`);
} else if(orderInfo.orderType === OrderTypes.ETC注销){
}else if(orderInfo.orderType === OrderTypes.公务车增补OBU){
navTo(`/orders/order-details-obu?id=${orderInfo.id}`);
}
else if(orderInfo.orderType === OrderTypes.ETC注销){
navTo(`/orders/order-details-logoff-etc?id=${orderInfo.id}`);
}else if(orderInfo.orderType === OrderTypes.车辆信息变更){

+ 2
- 1
datas/fileURL.js Datei anzeigen

@@ -1,2 +1,3 @@
// 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 fileURL = 'http://192.168.100.63:8087/default-bucket/'

+ 2
- 2
issueActivation/address.vue Datei anzeigen

@@ -129,7 +129,7 @@
data: {
openId: "",
orderSource: "WECHAT",
receiveMethod: 1,
receiveMethod: 0,
deptId: 0,
vehicleId: "",
consignee: "", //收货人
@@ -178,7 +178,7 @@
console.log(res);
const result = stringToJson(res.bizContent);
if (result.orderId) {
navTo("orders/order-details-obu?id=" + result.orderId)
navTo("/orders/order-details-obu?id=" + result.orderId)
} else {
console.log("增补订单提交有错误");
}

+ 40
- 39
pages/index/index.vue Datei anzeigen

@@ -303,7 +303,42 @@
isShowBar.value = false;
}
});
onLoad(() => {
getInfo()
})

onMounted(() => {
uni.getSystemInfo({
success: (e: any) => {
console.log(e.statusBarHeight);
statusBarHeight.value = e.statusBarHeight;
}
})
// console.log(credentialType);

//参数说明
// let code = "30" //请求编码
let options = {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
opId: getItem("openId"),
source: "WECHAT",
tabIndex: "0",
}, //请求参数
method: "POST", //提交方式(默认POST)
showLoading: true, //是否显示加载中(默认显示)
};

//调用方式
// request(searchOrder, options)
// .then((res) => {
// console.log(stringToJson(res.bizContent));
// // stringToJson(res.bizContent)
// })
// .catch((err) => {
// console.log(err);
// });
});
//办理流程tab选择
const flowPathTabHandle = (tab) => {
state.tabActive = tab;
@@ -358,42 +393,11 @@
const closeMask = () => {
isShowMask.value = false;
};

onMounted(() => {
uni.getSystemInfo({
success: (e: any) => {
console.log(e.statusBarHeight);
statusBarHeight.value = e.statusBarHeight;
}
})
// console.log(credentialType);

//参数说明
// let code = "30" //请求编码
let options = {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
opId: getItem("openId"),
source: "WECHAT",
tabIndex: "0",
}, //请求参数
method: "POST", //提交方式(默认POST)
showLoading: true, //是否显示加载中(默认显示)
};

//调用方式
// request(searchOrder, options)
// .then((res) => {
// console.log(stringToJson(res.bizContent));
// // stringToJson(res.bizContent)
// })
// .catch((err) => {
// console.log(err);
// });
});

// 获取文本信息----用户协议
const getInfo = (type) => {
const getInfo = () => {
//参数说明
let options = {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
@@ -416,9 +420,6 @@
});
}

onLoad(() => {
getInfo()
})
</script>

<style>
@@ -467,8 +468,8 @@
margin-bottom: 0;

text {
font-size: 24rpx!important;
color: #ffffff!important;
font-size: 24rpx !important;
color: #ffffff !important;
}
}
}

+ 75
- 72
utils/utils.ts Datei anzeigen

@@ -1,6 +1,6 @@
import { getItem, StorageKeys } from "./storage";
import {OrderStatus, OrderTypes} from "@/datas/enum";
import { OrderStatus, OrderTypes } from "@/datas/enum";
//toast
export const msg = (title: string = "", param: any = {}) => {
if (!title) return;
@@ -13,13 +13,13 @@ export const msg = (title: string = "", param: any = {}) => {
};

//确认弹窗
export const confirm = (content:string,callback:Function,title:string = "",showCancel?:boolean, confimTxt = '确定') => {
export const confirm = (content: string, callback: Function, title: string = "", showCancel?: boolean, confimTxt = '确定') => {
uni.showModal({
title: title,
content: content,
showCancel:showCancel ?? true,
confirmText:confimTxt,
success: function (res) {
showCancel: showCancel ?? true,
confirmText: confimTxt,
success: function(res) {
if (res.confirm) {
callback()
} else if (res.cancel) {
@@ -32,7 +32,7 @@ export const confirm = (content:string,callback:Function,title:string = "",showC
/**
* 判断是否登录
*/
export const hasLogin = () =>{
export const hasLogin = () => {
const token = getItem(StorageKeys.Token);
const openId = getItem(StorageKeys.OpenId);
return !isBlank(token) && !isBlank(openId);
@@ -49,12 +49,12 @@ export const navTo = (url: string = "", login: boolean = false) => {
}

if (login && !hasLogin()) {
confirm('您需要登录过后才能使用此功能',()=>{
confirm('您需要登录过后才能使用此功能', () => {
uni.navigateTo({
url:'/login/login',
url: '/login/login',
});
},'温馨提示',true,'去登录');
}else{
}, '温馨提示', true, '去登录');
} else {
uni.navigateTo({
url,
});
@@ -66,7 +66,7 @@ export const navTo = (url: string = "", login: boolean = false) => {
* @param 要校验的数据
* @param 什么类型格式
*/
export const checkStr = (str:string, type:string) => {
export const checkStr = (str: string, type: string) => {
switch (type) {
case 'mobile': //手机号码
return /^1[3|4|5|6|7|8|9][0-9]{9}$/.test(str);
@@ -137,70 +137,70 @@ export function isBlank(val) {
};

//根据订单状态获取订单状态文字
export const getOrderStatusName = (status) =>{
switch (status){
export const getOrderStatusName = (status) => {
switch (status) {
case OrderStatus.完成填写基本信息:
return '申请中';
break;
break;
case OrderStatus["完成个人/单位信息上传"]:
return '申请中';
break;
break;
case OrderStatus.完成车辆信息上传:
return '申请中';
break;
break;
case OrderStatus.待支付:
return '待支付';
break;
break;
case OrderStatus.已支付:
return '已支付';
break;
break;
case OrderStatus.待审核:
return '待审核';
break;
break;
case OrderStatus.审核不通过:
return '审核不通过';
break;
break;
case OrderStatus.待发货:
return '待发货';
break;
break;
case OrderStatus.待收货:
return '待收货';
break;
break;
case OrderStatus.待激活:
return '待激活';
break;
break;
case OrderStatus.已完成:
return '已完成';
break;
break;
case OrderStatus["已申请-换货"]:
return '换货中';
break;
break;
case OrderStatus["已申请-退货"]:
return '退货中';
break;
break;
case OrderStatus.已结束:
return '已结束';
break;
break;
case OrderStatus.退款中:
return '退款中';
break;
break;
case OrderStatus.退款成功:
return '退款成功';
break;
break;
case OrderStatus.退货成功:
return '退货成功';
break;
break;
case OrderStatus["换货-设备已回收"]:
return '换货成功';
break;
break;
default:
break;
}
}

//根据订单类型获取订单类型文字
export const getOrderTypeName = (orderType) =>{
switch (orderType){
export const getOrderTypeName = (orderType) => {
switch (orderType) {
case OrderTypes.更换签:
return '更换签';
break;
@@ -211,7 +211,10 @@ export const getOrderTypeName = (orderType) =>{
return '新办发行';
break;
case OrderTypes.增补OBU:
return '增补ETC设备';
return '增补OBU';
break;
case OrderTypes.公务车增补OBU:
return '公务车增补OBU';
break;
case OrderTypes.储值卡转记账卡:
return '储值卡转记账卡';
@@ -222,8 +225,8 @@ export const getOrderTypeName = (orderType) =>{
}

//根据车辆类型获取车辆名称
export const getCarTypeName = (carType) =>{
switch (carType){
export const getCarTypeName = (carType) => {
switch (carType) {
case 0:
return '客车';
break;
@@ -237,7 +240,7 @@ export const getCarTypeName = (carType) =>{

//根据ETC卡状态获取ETC卡状态文字
export const getETCStatusName = (cardStatus) => {
switch (cardStatus){
switch (cardStatus) {
case 0:
return '申请';
break;
@@ -271,8 +274,8 @@ export const getETCStatusName = (cardStatus) => {
}

//根据OBU状态获取OBU状态文字
export const getOBUStatusName = (obuStatus) =>{
switch (obuStatus){
export const getOBUStatusName = (obuStatus) => {
switch (obuStatus) {
case 0:
return '未安装';
break;
@@ -318,21 +321,21 @@ export const getOBUStatusName = (obuStatus) =>{
}

//获取订单时间
export const getOrderTime = (time) =>{
if(!time) return '';
export const getOrderTime = (time) => {
if (!time) return '';
return getFormatDate(new Date(time));
}

//查看大图
export const checkBigImg = (current,urls) =>{
export const checkBigImg = (current, urls) => {
uni.previewImage({
current: current,
urls: urls,
current: current,
urls: urls,
});
}

//日期格式化
export function getFormatDate(date, fmt?:string) {
export function getFormatDate(date, fmt?: string) {
date = date == undefined ? new Date() : date;
date = typeof date == 'number' ? new Date(date) : date;
fmt = fmt || 'yyyy-MM-dd HH:mm:ss';
@@ -361,43 +364,43 @@ export function getFormatDate(date, fmt?:string) {
};

//时间格式化
export function formatTime (date:any) {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const hour = date.getHours()
const minute = date.getMinutes()
const second = date.getSeconds()
export function formatTime(date: any) {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const hour = date.getHours()
const minute = date.getMinutes()
const second = date.getSeconds()

return `${[year, month, day].map(formatNumber).join('-')}T${[hour, minute, second].map(formatNumber).join(':')}`
return `${[year, month, day].map(formatNumber).join('-')}T${[hour, minute, second].map(formatNumber).join(':')}`
}

//有效期时间格式化
export function expireDate (date:any) {
const year = date.getFullYear()+10
export function expireDate(date: any) {
const year = date.getFullYear() + 10
const month = date.getMonth() + 1
const day = date.getDate()
return `${[year, month, day].map(formatNumber).join('-')}`
}
export function expireDate2 (date:any) {
const year = date.getFullYear()+10
const month = date.getMonth() + 1
const day = date.getDate()
return `${[year, month, day].map(formatNumber).join('')}`
}
}
export function expireDate2(date: any) {
const year = date.getFullYear() + 10
const month = date.getMonth() + 1
const day = date.getDate()
return `${[year, month, day].map(formatNumber).join('')}`
}
//当前时间时间格式化
export function nowDate (date:any) {
export function nowDate(date: any) {
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
const day = date.getDate()
return `${[year, month, day].map(formatNumber).join('-')}`
}
}

function formatNumber (n:any) {
n = n.toString()
return n[1] ? n : `0${n}`
function formatNumber(n: any) {
n = n.toString()
return n[1] ? n : `0${n}`
}


Laden…
Abbrechen
Speichern