diff --git a/src/components/Modal/smallModal.vue b/src/components/Modal/smallModal.vue new file mode 100644 index 0000000..85137e1 --- /dev/null +++ b/src/components/Modal/smallModal.vue @@ -0,0 +1,76 @@ + + + diff --git a/src/components/OpOnline/index.vue b/src/components/OpOnline/index.vue index 187ed11..ae028a5 100644 --- a/src/components/OpOnline/index.vue +++ b/src/components/OpOnline/index.vue @@ -1,17 +1,17 @@ diff --git a/src/pagesOrder/battery/detail.vue b/src/pagesOrder/battery/detail.vue deleted file mode 100644 index 678c372..0000000 --- a/src/pagesOrder/battery/detail.vue +++ /dev/null @@ -1,250 +0,0 @@ - - - - - diff --git a/src/pagesOrder/battery/index.vue b/src/pagesOrder/battery/index.vue index 4ebdd91..f4d3f44 100644 --- a/src/pagesOrder/battery/index.vue +++ b/src/pagesOrder/battery/index.vue @@ -1,5 +1,11 @@ @@ -85,6 +85,9 @@ import CustomSwiper from "@/components/CustomSwiper/index.vue"; import OpOnline from "@/components/OpOnline/index.vue"; import { url } from "@/utils/data"; +import { useMemberStore } from "@/store/index"; +import pinia from "@/store"; +const store = useMemberStore(pinia); const bannerList = [ { imgUrl: "v-a1.png", @@ -180,6 +183,14 @@ const questionList = ref([ ]); const handleClick = (item: any) => { + if (item.name === "我要询价" || item.name === "我要登记") { + if (!store.profile.token) { + uni.navigateTo({ + url: '/pagesLogin/index', // 要跳转到的页面路径 + }); + return + } + } uni.navigateTo({ url: item.url, // 要跳转到的页面路径 }); diff --git a/src/pagesVehicle/inquiry.vue b/src/pagesVehicle/inquiry.vue index e0024a8..91db916 100644 --- a/src/pagesVehicle/inquiry.vue +++ b/src/pagesVehicle/inquiry.vue @@ -258,7 +258,7 @@ contentTextAlign="center" > - {{totalPrice}}元 + {{ totalPrice }}元 注:该价格为参考价格,实际价格根据过磅重量进行结算 @@ -820,7 +820,24 @@ const beforeSave = () => { check().then((res) => { if (res) { // startSave(); - isShowPrice.value = true; + // + VehicleApi.queryPrice({ name: model1.formData.wheelMaterial }).then( + (res: any) => { + if (res.code === 200) { + if (res.data) { + isShowPrice.value = true; + totalPrice.value = parseInt( + (res.data.price * model1.formData.totalWeight).toFixed(0) + ); + } else { + uni.showToast({ + icon: "none", + title: "当前材质未定价,联系人工客服处理", + }); + } + } + } + ); } }); }; @@ -863,7 +880,7 @@ const startSave = (type: number) => { ...model1.formData, ownerType: model1.formData.ownerType === "个人", status: 1, // 待登记 - totalPrice: totalPrice.value + totalPrice: totalPrice.value, }).then((res) => { if (res.code === 200) { uni.showToast({ diff --git a/src/pagesVehicle/registration.vue b/src/pagesVehicle/registration.vue index 13f0d4d..e8e44bc 100644 --- a/src/pagesVehicle/registration.vue +++ b/src/pagesVehicle/registration.vue @@ -826,7 +826,7 @@ const startSave = () => { uni.showToast({ title: "提交成功", }); - uni.navigateBack(); + uni.redirectTo({ url: '/pagesVehicle/index' }); } }); }; diff --git a/src/services/battery.ts b/src/services/battery.ts index 8bfadec..63dc304 100644 --- a/src/services/battery.ts +++ b/src/services/battery.ts @@ -20,6 +20,24 @@ export const addRegis = (data: any) => { }); }; +export const queryInquiry = (data: any) => { + return http({ + method: "GET", + url: "/api/v1/batteryInquiry/findPage", + data, + }); +}; + +export const queryRegis = (data: any) => { + return http({ + method: "GET", + url: "/api/v1/batteryRegistration/findPage", + data, + }); +}; + + + diff --git a/src/services/picture.ts b/src/services/picture.ts index 02583ca..03472ea 100644 --- a/src/services/picture.ts +++ b/src/services/picture.ts @@ -4,10 +4,11 @@ import { http } from "@/utils/http"; // 新增咨询 export const upload = (data: any) => { + return http({ method: "POST", header: {type: 'UPLOAD'}, - url: "/api/v1/upload/file/upload?front=" + data.front, + url: "/api/v1/upload/file/upload" + `${data.front !== undefined ? `?front=${data.front}` : ''}`, data, }); }; diff --git a/src/services/steel.ts b/src/services/steel.ts index 098bc62..54b77bf 100644 --- a/src/services/steel.ts +++ b/src/services/steel.ts @@ -12,6 +12,15 @@ export const add = (data: any) => { }; +export const getApplyList = (data: any) => { + return http({ + method: "GET", + url: "/api/v1/trialApplication/findPage", + data, + }); +}; + + diff --git a/src/services/user.ts b/src/services/user.ts index 7674cff..2dc552e 100644 --- a/src/services/user.ts +++ b/src/services/user.ts @@ -11,6 +11,62 @@ export const login = (data: any) => { }); }; +export const addPay = (data: any) => { + return http({ + method: "POST", + url: "/api/paymentInfo/insert", + data, + }); +}; + +export const sendMsg = (data: any) => { + return http({ + method: "GET", + url: "/api/admin/sendMsg", + data, + }); +}; + +export const loginPhone = (data: any) => { + return http({ + method: "GET", + url: "/api/admin/loginPhone", + data, + }); +}; + +export const getPayInfo = (data: any) => { + return http({ + method: "GET", + url: "/api/paymentInfo/findById", + data, + }); +}; + +export const updatePay = (data: any) => { + return http({ + method: "PUT", + url: "/api/paymentInfo", + data, + }); +}; + +export const logOut = (data: any) => { + return http({ + method: "POST", + url: "/api/admin/logOut", + data, + }); +}; + + + + + + + + + diff --git a/src/services/vehicle.ts b/src/services/vehicle.ts index 1df4710..6a8004e 100644 --- a/src/services/vehicle.ts +++ b/src/services/vehicle.ts @@ -70,6 +70,16 @@ export const getDetail = (data: any) => { }); }; +export const queryPrice = (data: any) => { + return http({ + method: "GET", + url: "/api/quote/findByName", + data, + }); +}; + + + diff --git a/src/utils/http.ts b/src/utils/http.ts index 02606a3..9a34b7d 100644 --- a/src/utils/http.ts +++ b/src/utils/http.ts @@ -96,8 +96,10 @@ export const http = (options: UniApp.RequestOptions) => { } else { + console.log(options) uni.request({ ...options, + data: Object.assign({...(options as any).data}, {isUser: true}), dataType: "string", //1.先将dataType设置为string success(res) { var json = (res.data as any).replace( @@ -117,7 +119,7 @@ export const http = (options: UniApp.RequestOptions) => { }); store.clearProfile(); uni.reLaunch({ - url: "/pagesLogin/login/index", + url: "/pagesLogin/index", }); return; } else if ([500, 5001, 10001].indexOf(res1.code) > -1) {