This commit is contained in:
tx 2024-10-17 18:08:10 +08:00
parent e6c5c86a13
commit 0f4ae76f61
6 changed files with 206 additions and 43 deletions

View File

@ -7,9 +7,9 @@ const install = (Vue, vm) => {
// baseUrl: 'http://192.168.2.46:8080',
// baseUrl: 'https://che.chuangtewl.com/prod-api',
// 测试环境
baseUrl: 'https://testzc.chuangtewl.com/prod-api',
baseUrl: 'https://zc.chuangtewl.com/prod-api',
// 俞山岛
// baseUrl: 'http://192.168.2.228:8090',
// baseUrl: 'http://192.168.2.20:8090',
// baseUrl: 'http://47.120.68.19:8090',
// 创特

View File

@ -1,7 +1,7 @@
<template>
<view class="cont">
<view class="tab" @tap.stop="changeTabbar(0)">
<image src="https://lxnapi.ccttiot.com/bike/img/static/ujqtjatCLwwZdpRmRmXA" mode="" v-show="indexs!=0"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uHiAEGb6wNZKZ9KL8ZmO" mode="" v-show="indexs!=0"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJdVl8YDhrpXWulJcpLJ" mode="" v-show="indexs==0"></image>
<!-- <view class="txt" :class="indexs==0?'act1':''" >工作台</view> -->
</view>

View File

@ -7,9 +7,16 @@
<view class="backimg">
</view>
<view class="tit">
<view class="tit" v-if="orderInfo.isOverdue&&orderInfo.status!=8" style="color: red;">
已超时
</view>
<view class="tit" v-else>
{{typeReturn(orderInfo.status)}}
</view>
<view class="tips" v-if="orderInfo.isOverdue">
已超时请点击续租按钮进行续租
</view>
<view class="tips" v-if="orderInfo.status==0">
剩余支付时间{{countdown}}
</view>
@ -199,7 +206,30 @@
</view>
</view>
</view>
<view class="bot_btn">
<view class="order_code" v-if="orderInfo.deliveryMethod!=1">
<view class="tits">
配送信息
</view>
<view class="code_li" v-if='orderInfo.deliveryOrder'>
<view class="code">
配送状态 {{typeReturns(orderInfo.deliveryOrder.status).text}}
</view>
</view>
<view class="code_li">
<view class="code">
配送人员 {{orderInfo.deliveryOrder.deliveryman?orderInfo.deliveryOrder.deliveryman:'--'}}
</view>
</view>
<view class="code_li">
<view class="code">
联系电话 {{orderInfo.deliveryOrder.deliverymanPhone?orderInfo.deliveryOrder.deliverymanPhone:'--'}}
</view>
</view>
</view>
<view class="bot_btn" >
<view class="btn_li" v-if="orderInfo.status==0">
<view class="txt2" @click="orderCancel">
取消订单
@ -245,6 +275,9 @@
<view class="btn3" style="width: 1rpx;"></view>
<view class="btn5" @click="tosubOrder()">
重新下单
</view>
</view>
</view>
@ -306,7 +339,7 @@
确认还车
</view>
</view>
<u-mask :show="showsub" :z-index='100' duration='0' />
<u-mask :show="showsub" :z-index='100' duration='0' @click="closeSub()"/>
<view class="sub_car" v-if="showsub">
<view class="tit3">
确认用车
@ -397,6 +430,35 @@
this.getOrderInfo()
},
methods: {
closeSub(){
this.showsub=false
},
typeReturns(num) {
console.log(num,'aaaaaaaaaaaa');
let result = {
text: '',
color: '#4297F3' //
};
if (num == 0) {
result.text = '待接单';
result.color = '#F14C4C'; //
} else if (num == 1) {
result.text = '待配送';
result.color = '#F38C42'; //
} else if (num == 2) {
result.text = '配送中';
result.color = '#4297F3'; //
} else if (num == 3) {
result.text = '已完成';
result.color = '#000000'; //
} else if (num == 8) {
result.text = '已取消';
result.color = '#ccc'; //
}
return result;
},
back(){
uni.redirectTo({
url:'/pages/my'
@ -1371,6 +1433,8 @@
}
}
.tab_box {
width: 696rpx;
margin: 0 auto;

View File

@ -150,11 +150,39 @@
dataIndex: 0,
dataInfo: {},
shopList: [],
userInfo:{}
userInfo: {},
qParam:'',
sn:''
}
},
onLoad() {
onLoad(e) {
console.log(e);
if (e.q) {
this.qParam = e.q
if (this.qParam != 'null' ) {
let qParam = this.qParam
console.log(qParam, 'qParamqParamqParam');
// 2: URLq
let decodedUrl = decodeURIComponent(qParam);
// 3: 使URL
let sn = null;
let queryParams = decodedUrl.split('?')[1];
if (queryParams) {
let params = queryParams.split('&');
params.forEach(param => {
let [key, value] = param.split('=');
if (key === 'sn') {
sn = value;
}
});
}
this.sn = sn
}
}
this.getcityList()
this.getdata()
},
@ -162,7 +190,12 @@
},
onShow() {
this.getUserInfo()
if(this.userInfo.userId){
}else{
this.getUserInfo()
}
let that = this
uni.getLocation({
type: 'gcj02',
@ -170,9 +203,10 @@
that.gps.latitude = lb.latitude;
that.gps.longitude = lb.longitude;
that.getshopList()
that.getCity()
that.getaddress()
that.getshopList()
},
fail: function(error) {
uni.showToast({
@ -201,44 +235,95 @@
},
methods: {
getUserInfo(){
this.$u.get("/getInfo").then((res) => {
if(res.code==200){
this.userInfo=res.user
console.log(this.userInfo);
getsn(){
if(this.userInfo.userId){
let data = {
sn: this.sn
}
this.$u.get(`appVerify/getInProgressOrder?`, data).then((res) => {
if (res.code == 200) {
// if(res.data.)
// this.getstoreInfo()
if(res.data){
uni.navigateTo({
url:'/pages_device/carInfo?sn='+this.sn
})
}else{
this.$u.get('app/getDeviceBySn?sn=' + this.sn).then((res) => {
console.log(res, 'rererer');
if (res.code === 200) {
// console.log(this.areaId,);
uni.redirectTo({
url:'/page_user/ordder?storeId='+res.data.storeId+'&modelId='+res.data.modelId
})
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
}
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
}else{
uni.navigateTo({
url:'/pages/login/login?qParam='+this.qParam
})
}
},
getUserInfo() {
this.$u.get("/getInfo").then((res) => {
if (res.code == 200) {
this.userInfo = res.user
}
if(this.sn!=''){
this.getsn()
}
});
},
tomap(){
if(this.userInfo.userId){
tomap() {
if (this.userInfo.userId) {
uni.navigateTo({
url:'/page_user/mapSele?index='+this.dataIndex
url: '/page_user/mapSele?index=' + this.dataIndex
})
}else{
} else {
uni.navigateTo({
url:'/pages/login/login'
url: '/pages/login/login'
})
}
console.log(this.dataInfo,'dataInfo');
console.log(this.dataInfo, 'dataInfo');
// this.dataInfo = item
// this.dataIndex = index
},
toTips(){
toTips() {
uni.navigateTo({
url:'/page_user/tips'
url: '/page_user/tips'
})
},
toStore(item) {
if(this.userInfo.userId){
if (this.userInfo.userId) {
uni.navigateTo({
url: '/page_user/carStore?storeId=' + item.storeId
})
}else{
} else {
uni.navigateTo({
url:'/pages/login/login'
url: '/pages/login/login'
})
}
@ -381,13 +466,13 @@
});
},
tosele() {
if(this.userInfo.userId){
if (this.userInfo.userId) {
uni.navigateTo({
url: '/page_user/carSelection'
})
}else{
} else {
uni.navigateTo({
url:'/pages/login/login'
url: '/pages/login/login'
})
}

View File

@ -245,10 +245,14 @@
codeButtonText2: '获取验证码',
countdown2: 60,
openCode:null,
qParam:''
}
},
onLoad() {
onLoad(e) {
if(e.qParam){
this.qParam=e.qParam
}
console.log(e);
},
computed: {
codeButtonStyle() {
@ -641,11 +645,18 @@
this.$u.get("/getInfo").then((res) => {
console.log('进入跳转',res);
if(res.user.isAuthentication){
uni.navigateTo({
url: '/pages/index/index'
})
if(this.qParam!=''){
uni.redirectTo({
url: '/pages/index/index?q='+this.qParam
})
}else{
uni.redirectTo({
url: '/pages/index/index'
})
}
}else{
uni.navigateTo({
uni.redirectTo({
url:"/page_user/idcard_test"
})
}

View File

@ -29,6 +29,9 @@
<view class="txt3" :style="{ color: typeReturn(item.status).color }">
{{ typeReturn(item.status).text }}
</view>
<view class="txt3" style="color: red;" v-if="item.isOverdue">
已超时
</view>
</view>
<view class="info_li">
<view class="txt" v-if="item.returnMethod==1">取车方式自行前往门店</view>