From 9acb15e00cc118df6222d7e250447c12d6ef37e8 Mon Sep 17 00:00:00 2001
From: tx <2622874537@qq.com>
Date: Wed, 14 Aug 2024 18:05:16 +0800
Subject: [PATCH] =?UTF-8?q?bug=20=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/http.interceptor.js | 6 +-
manifest.json | 2 +-
page_user/changeCar.vue | 32 +-
pages.json | 37 +-
pages/index/index.vue | 865 +++++++++++++++--------------
pages/login/login.vue | 17 +-
pages_admin/admin_index.vue | 25 +-
pages_admin/order/order_detail.vue | 8 +-
pages_adminSet/shDetail.vue | 22 +
pages_adminSet/shgl.vue | 136 +++--
10 files changed, 680 insertions(+), 470 deletions(-)
create mode 100644 pages_adminSet/shDetail.vue
diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index 858f47d..02a1480 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -1,13 +1,13 @@
const install = (Vue, vm) => {
- uni.setStorageSync('deptId', 101);
+ uni.setStorageSync('deptId', 100);
Vue.prototype.$u.http.setConfig({
// baseUrl: 'http://61.174.243.28:15861',
// baseUrl: 'http://192.168.2.46:8080',
// baseUrl: 'http://124.221.246.124:2289',
- baseUrl: 'https://dianche.chuantewulian.cn/prod-api',
- // baseUrl: 'https://dche.ccttiot.com/prod-api',
+ // baseUrl: 'https://dianche.chuantewulian.cn/prod-api',
+ baseUrl: 'https://dche.ccttiot.com/prod-api',
loadingText: '努力加载中~',
loadingTime: 10000,
// 设置自定义头部content-type
diff --git a/manifest.json b/manifest.json
index 5b8abf7..3106710 100644
--- a/manifest.json
+++ b/manifest.json
@@ -51,7 +51,7 @@
/* 小程序特有相关 */
"mp-weixin" : {
"libVersion" : "latest",
- "appid" : "wx4d178f8c80348214",
+ "appid" : "wx3428c498d5061192",
"setting" : {
"urlCheck" : false,
"minified" : true
diff --git a/page_user/changeCar.vue b/page_user/changeCar.vue
index e349114..559ffb6 100644
--- a/page_user/changeCar.vue
+++ b/page_user/changeCar.vue
@@ -361,11 +361,10 @@
});
},
onShow() {
- if (uni.getStorageSync('adminAreaid')) {
- this.areaId = uni.getStorageSync('adminAreaid')
-
- this.getArea()
- }
+
+ // if (uni.getStorageSync('adminAreaid')) {
+
+ // }
this.$store.dispatch('userInfo', this.$u).then(() => {
this.getQiniuToken()
this.getisInOrder()
@@ -400,6 +399,12 @@
},
},
methods: {
+ totxtpage() {
+ // this.seeDetail = true
+ uni.navigateTo({
+ url: '/page_user/bulelink'
+ })
+ },
getQiniuToken() {
console.log('diaou');
this.$u.get("/common/qiniu/uploadInfo").then((res) => {
@@ -756,10 +761,19 @@
});
},
getdevice() {
+ this.deviceinfo={}
this.$u.get('/app/device/info?sn=' + this.sncode).then((res) => {
if (res.code == 200) {
-
- this.deviceinfo = res.data
+ if(this.orderinfo.areaId==res.data.areaId){
+ this.deviceinfo = res.data
+ }else{
+ uni.showToast({
+ title: '换车设备和当前运营区不同,请使用其他车辆换车',
+ icon: 'none',
+ duration: 2000
+ });
+ }
+
} else {
// 处理接口返回错误的情况
@@ -1207,8 +1221,12 @@
this.$u.post('/app/user/isInOrder?userId=' + this.userId, ).then((res) => {
// uni.hideLoading()
if (res.code === 200) {
+
// this.freList=res.rows
this.orderinfo = res.data[0]
+ this.areaId = this.orderinfo.areaId
+
+ this.getArea()
const createTimeTimestamp = new Date(this.orderinfo.unlockTime).getTime();
this.$u.get('/app/device/info?sn=' + this.orderinfo.sn).then((res) => {
if (res.code == 200) {
diff --git a/pages.json b/pages.json
index a1b4976..d8a7a9a 100644
--- a/pages.json
+++ b/pages.json
@@ -211,22 +211,31 @@
// ... 分包A的其他页面
]
},
- // {
- // "root": "pages_adminSet", // 分包A的根目录
- // "pages": [
- // {
- // "path": "shgl",
- // "style": {
- // "navigationBarTitleText": "上传",
- // "enablePullDownRefresh": false,
- // "navigationStyle": "custom"
- // }
- // }
+ {
+ "root": "pages_adminSet", // 分包A的根目录
+ "pages": [
+ {
+ "path": "shgl",
+ "style": {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path" : "shDetail",
+ "style" :
+ {
+ "navigationBarTitleText": "上传",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ }
- // // ... 分包A的其他页面
- // ]
- // },
+ // ... 分包A的其他页面
+ ]
+ },
{
"root": "page_user",
"pages": [{
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 0067533..bc26b3c 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1084,8 +1084,8 @@
showdevice(newValue, oldValue) {
console.log('showdevice变化了', newValue, oldValue);
},
- showtcs(newValue, oldValue) {
- console.log('showtcs变化了', newValue, oldValue);
+ tozf(newValue, oldValue) {
+ console.log('tozf变化了', newValue, oldValue);
},
},
@@ -1117,9 +1117,10 @@
}
+ console.log(e,'e.qParame.qParam');
if (e.qParam) {
this.qParam = e.qParam
-
+
}
if (e.isupload) {
@@ -1248,24 +1249,24 @@
});
}
that.sn = sn
- if (that.sn != '') {
+ // if (that.sn != '') {
- setTimeout(() => {
+ // setTimeout(() => {
- if (!that.orderinfo.status) {
- that.deviceInfo(1)
- that.qParam = null
- // this.showdevice = true
- // this.deviceIndex = 1
- // this.type = 1
- } else {
- // this.showtcs=true
- }
- }, 700)
+ // if (!that.orderinfo.status) {
+ // that.deviceInfo(1)
+ // that.qParam = null
+ // // this.showdevice = true
+ // // this.deviceIndex = 1
+ // // this.type = 1
+ // } else {
+ // // this.showtcs=true
+ // }
+ // }, 700)
- }
+ // }
}
// that.getmarks()
@@ -1297,9 +1298,19 @@
} else {
- this.getinfo()
-
-
+ this.getinfo()
+
+ setTimeout(() => {
+ console.log(this.userinfo.balance, this.deviceIndex, this.showdevice,this.tozf,
+ 'this.userinfo.balancethis.userinfo.balancethis.userinfo.balance');
+ if (this.userinfo.balance != 0 && this.deviceIndex == 1 && this
+ .showdevice == true&&this.tozf==true) {
+ this.tozf=false
+ this.taploadmask(1)
+ }
+
+ }, 300)
+
}
},
@@ -1356,6 +1367,396 @@
},
},
methods: {
+ getArea() {
+ // this.showmap = false
+ // 发送请求获取数据
+ this.areaInfo = {}
+ // console.log(this.qParam, 'qParamqParamqParamqParam');
+ this.polyline = []
+ // if(this.qParam){
+
+ // }
+ // console.log(this.sn,'this.gps.sn this.gps.sn this.gps.sn ');
+
+ // console.log(this.qParam,'qParamqParamqParamqParam');
+ if (/^\d{7}$/.test(this.qParam)) {
+ this.gps.sn = this.qParam
+ console.log(this.gps.sn,'this.gps.sn this.gps.sn this.gps.sn ');
+ }
+ if (this.orderinfo.sn != '') {
+ this.gps.sn = this.orderinfo.sn
+ }
+ if (this.deviceInfos.sn) {
+ this.gps.sn = this.deviceInfos.sn
+ }
+ if (this.qParam != '' && this.qParam != null) {
+ this.sn = this.getSNFromQRCode(this.qParam);
+
+ if (this.sn != 0 && this.sn != '' && this.sn != null) {
+ this.gps.sn = this.sn
+ console.log(this.sn,'qParamqParamqParamqParam');
+
+ }
+ }
+ this.$u.get('/app/area/info?', this.gps).then((res) => {
+ // this.showmap = true
+ if (res.code === 200) {
+
+ // 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
+ const polylines = this.convertBoundaryToPolyline(res.data.boundaryStr)
+ // console.log(polylines,'polylinespolylinespolylines');
+ // .filter(area => area.boundaryStr) // 过滤掉boundary为空的数据
+ // .map(area => this.convertBoundaryToPolyline(area.boundaryStr));
+ // 更新折线数据
+ this.areaInfo = res.data
+ setTimeout(() => {
+ let abb = this.cleanedText()
+ console.log(abb.length, 'cleanedTextcleanedTextcleanedText');
+
+ // 计算滚动时间,基于文本宽度
+ this.duration = abb.length * 0.3; // 50 px/s 的速度
+ }, 200)
+
+ this.polyline.push(polylines)
+ console.log();
+ // console.log(this.areaInfo, 'areaInfoareaInfo');
+ uni.setStorageSync('areaId', res.data.areaId);
+ this.getinfo()
+ this.getmarks()
+ this.getlist()
+ this.getParking()
+ if (uni.getStorageSync('token')) {
+ this.getisInOrder()
+
+ }
+ const hasShownPopup = uni.getStorageSync('hasShownPopup');
+ console.log(hasShownPopup, 'hasShownPopup');
+
+ if (hasShownPopup === '' || hasShownPopup === null) {
+ console.log('1111111111');
+
+ this.showTips = true;
+ this.startCountdown();
+ uni.setStorageSync('hasShownPopup', true);
+ } else {
+ console.log('222');
+ this.showTips = uni.getStorageSync('hasShownPopup');
+ console.log(this.showTips, 'this.showTips');
+ this.startCountdown();
+
+ }
+ if (this.gps.sn&&/^\d{7}$/.test(this.gps.sn)) {
+ setTimeout(() => {
+ if (this.orderinfo.status) {
+ // this.showtcs = true
+ } else {
+ // if(this.showdevice==false&&){
+ // console.log('进入的判断1');
+ // this.deviceInfo(1)
+ // this.qParam = null
+ // }
+ if(this.deviceInfos.sn){
+
+ }else{
+ if (this.qParam ) {
+ console.log('进入的判断2');
+ this.deviceInfo(1)
+ this.qParam = null
+ } else{
+ console.log('进入的判断3');
+ // if(this.de)
+ this.deviceInfo(0)
+ this.qParam = null
+ }
+ }
+
+
+
+ }
+
+ }, 200)
+
+ }
+
+ // if(!hasShownPopup){
+ // console.log(typeof(hasShownPopup),'hasShownPopuphasShownPopup');
+ // this.showTips=uni.getStorageSync('hasShownPopup')
+ // }else{
+ // this.showTips=true
+ // uni.setStorageSync('hasShownPopup', true);
+ // }
+
+ // this.$store.commit('SET_SHOWTIPS', true);
+ // console.log(this.polyline);
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ }).catch(error => {
+ console.error("Error fetching area data:", error);
+ });
+
+ },
+ deviceInfo(num) {
+ if (uni.getStorageSync('token')) {
+
+ this.$u.get('/app/device/info?sn=' + this.sn).then((res) => {
+ if (res.code === 200) {
+ this.isqrcode = true
+ this.deviceInfos = res.data;
+ if (!this.orderinfo.sn) {
+ this.mac = res.data.mac
+ }
+ if (num == 0) {
+ this.showdevice = true;
+ this.type = 0;
+ if (this.areaInfo.areaId != res.data.areaId) {
+ this.getArea()
+ }
+ // this.routePlanning(res.data.latitude, res.data.longitude)
+ // setTimeout(() => {
+
+ // // this.deviceIndex = 1;
+ // }, 600)
+ } else {
+ // if (this.deviceInfos.onlineStatus == 0) {
+ // wx.showToast({
+ // title: '车辆离线中,请使用其他车辆',
+ // icon: 'none',
+ // duration: 4000
+ // });
+ // } else
+ if (this.deviceInfos.status == 0) {
+ uni.showToast({
+ title: '车辆未上架,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos.status == 2) {
+ uni.showToast({
+ title: '车辆预约中,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos.status == 3) {
+ uni.showToast({
+ title: '车辆骑行中,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos.status == 4) {
+ uni.showToast({
+ title: '车辆临时锁车中,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos.status == 6) {
+ uni.showToast({
+ title: '车辆调度中,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos.status == 8) {
+ uni.showToast({
+ title: '车辆下线中,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos.status == 9) {
+ uni.showToast({
+ title: '车辆已废弃,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos.status == 7) {
+ uni.showToast({
+ title: '车辆未上线,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos.status == 1) {
+
+ if (this.areaInfo.areaId != res.data.areaId) {
+ this.getArea()
+ }
+ // this.routePlanning(res.data.latitude, res.data.longitude)
+ setTimeout(() => {
+ this.showdevice = true
+ this.type = 1;
+ this.deviceIndex = 1;
+ }, 600)
+
+ }
+ }
+ } else {
+ this.showdevice = false;
+ this.deviceIndex = 0;
+ this.type = 0;
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ });
+ } else {
+ console.log('判断2');
+ wx.login({
+ success: (res) => {
+ if (res.code) {
+ console.log('登录!', res);
+ let data = {
+ wxOpenId: res.code,
+ };
+ let areaId = uni.getStorageSync('areaId');
+ if (areaId) {
+ this.$u.post('/loginByopenid?jsCode=' + res.code + '&areaId=' +
+ areaId)
+ .then((
+ res) => {
+ // uni.hideLoading();
+ if (res.code == 200) {
+ uni.setStorageSync('token', res.token);
+ this.getinfo()
+ this.$u.get('/app/device/info?sn=' + this.sn)
+ .then((
+ res) => {
+ if (res.code === 200) {
+ this.isqrcode = true
+ this.deviceInfos = res.data;
+
+ if (num == 0) {
+ // this.routePlanning(res.data.latitude,
+ // res.data.longitude)
+ this.showdevice = true;
+ this.type = 0;
+ } else {
+ // if (this.deviceInfos
+ // .onlineStatus ==
+ // 0) {
+ // uni.showToast({
+ // title: '车辆离线中,请使用其他车辆',
+ // icon: 'none',
+ // duration: 4000
+ // });
+ // } else
+ if (this.deviceInfos
+ .status ==
+ 0) {
+ uni.showToast({
+ title: '车辆未上架,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos
+ .status ==
+ 2) {
+ uni.showToast({
+ title: '车辆预约中,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos
+ .status ==
+ 3) {
+ uni.showToast({
+ title: '车辆骑行中,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos
+ .status ==
+ 4) {
+ uni.showToast({
+ title: '车辆临时锁车中,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos.status ==
+ 6) {
+ uni.showToast({
+ title: '车辆调度中,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos
+ .status ==
+ 8) {
+ uni.showToast({
+ title: '车辆下线中,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos
+ .status ==
+ 9) {
+ uni.showToast({
+ title: '车辆已废弃,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos
+ .status ==
+ 7) {
+ uni.showToast({
+ title: '车辆未上线,请使用其他车辆',
+ icon: 'none',
+ duration: 4000
+ });
+ } else if (this.deviceInfos
+ .status ==
+ 1) {
+ // this.routePlanning(res.data
+ // .latitude, res.data
+ // .longitude)
+ if (this.areaInfo != res.data
+ .areaId) {
+ this.getArea()
+ }
+ // this.routePlanning(res.data.latitude, res.data.longitude)
+ setTimeout(() => {
+ this.showdevice = true
+ this.type = 1;
+ this.deviceIndex = 1;
+ }, 600)
+ }
+ }
+ } else {
+ this.showdevice = false;
+ this.deviceIndex = 0;
+ this.type = 0;
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ });
+ } else if (res.code == 501) {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ } else {
+ uni.redirectTo({
+ url: '/pages/login/login'
+ });
+ }
+ });
+
+ }
+
+ }
+ },
+ });
+ }
+ },
+
+
mapFun() {
console.log('点击了');
uni.openLocation({
@@ -1369,7 +1770,7 @@
},
tochange() {
this.seeDetail = false
- this.tozf=true
+
uni.navigateTo({
url: '/page_user/changeCar'
})
@@ -3903,6 +4304,9 @@
// 骑行结束支付
topay1() {
if (this.ispaid == false) {
+ uni.showLoading({
+
+ })
this.ispaid = true
let data = {
userId: this.userId,
@@ -3915,10 +4319,8 @@
}
- uni.showLoading({
-
- })
- console.log('点击了');
+
+ console.log('点击了',this.ispaid );
let that = this
this.$u.post('/appVerify/pre/order', data).then((res) => {
if (res.code === 200) {
@@ -3943,6 +4345,7 @@
},
fail(err) {
+ that.closePay()
that.ispaid = false
// 支付失败逻辑
uni.showToast({
@@ -3962,10 +4365,24 @@
}
})
}
-
+
},
-
+ closePay(){
+
+ this.$u.post('/appVerify/order/unlockOrder?orderNo='+ this.orderinfo.orderNo).then((res) => {
+ if (res.code === 200) {
+ // this.freList=res.rows
+
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ })
+ },
sub5() {
if (this.orderinfo.ruleId) {
@@ -4277,9 +4694,12 @@
} else {
clearInterval(this.timer)
- this.orderinfo = {}
- this.showdevice = false
- this.deviceIndex = 0
+ if(this.orderinfo.sn){
+ this.orderinfo = {}
+ this.showdevice = false
+ this.deviceIndex = 0
+ }
+
}
} else {
@@ -4425,16 +4845,7 @@
if (res.code == 200) {
this.$store.commit('SET_USERID', res.user.userId);
this.userinfo = res.user
- setTimeout(() => {
- console.log(this.userinfo.balance, this.deviceIndex, this.showdevice,
- 'this.userinfo.balancethis.userinfo.balancethis.userinfo.balance');
- if (this.userinfo.balance != 0 && this.deviceIndex == 1 && this
- .showdevice == true&&this.tozf==true) {
- this.tozf=false
- this.taploadmask(1)
- }
-
- }, 300)
+
} else {
// setTimeout(() => {
// this.getinfo()
@@ -4460,117 +4871,8 @@
return null;
}
},
- getArea() {
- // this.showmap = false
- // 发送请求获取数据
- this.areaInfo = {}
- console.log(this.qParam, 'qParamqParamqParamqParam');
- this.polyline = []
- // if(this.qParam){
-
- // }
- if (this.qParam != '' && this.qParam != null) {
- this.sn = this.getSNFromQRCode(this.qParam);
- if (this.sn != 0 && this.sn != '' && this.sn != null) {
- this.gps.sn = this.sn
- }
- }
- if (this.orderinfo.sn != '') {
- this.gps.sn = this.orderinfo.sn
- }
- if (this.deviceInfos.sn) {
- this.gps.sn = this.deviceInfos.sn
- }
-
- this.$u.get('/app/area/info?', this.gps).then((res) => {
- // this.showmap = true
- if (res.code === 200) {
-
- // 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
- const polylines = this.convertBoundaryToPolyline(res.data.boundaryStr)
- // console.log(polylines,'polylinespolylinespolylines');
- // .filter(area => area.boundaryStr) // 过滤掉boundary为空的数据
- // .map(area => this.convertBoundaryToPolyline(area.boundaryStr));
- // 更新折线数据
- this.areaInfo = res.data
- setTimeout(() => {
- let abb = this.cleanedText()
- console.log(abb.length, 'cleanedTextcleanedTextcleanedText');
-
- // 计算滚动时间,基于文本宽度
- this.duration = abb.length * 0.3; // 50 px/s 的速度
- }, 200)
-
- this.polyline.push(polylines)
- console.log();
- // console.log(this.areaInfo, 'areaInfoareaInfo');
- uni.setStorageSync('areaId', res.data.areaId);
- this.getinfo()
- this.getmarks()
- this.getlist()
- this.getParking()
- if (uni.getStorageSync('token')) {
- this.getisInOrder()
-
- }
- const hasShownPopup = uni.getStorageSync('hasShownPopup');
- console.log(hasShownPopup, 'hasShownPopup');
-
- if (hasShownPopup === '' || hasShownPopup === null) {
- console.log('1111111111');
-
- this.showTips = true;
- this.startCountdown();
- uni.setStorageSync('hasShownPopup', true);
- } else {
- console.log('222');
- this.showTips = uni.getStorageSync('hasShownPopup');
- console.log(this.showTips, 'this.showTips');
- this.startCountdown();
-
- }
- if (this.gps.sn) {
- setTimeout(() => {
- if (this.orderinfo.status) {
- // this.showtcs = true
- } else {
- if (this.type == 1 && this.deviceIndex == 1) {
- this.deviceInfo(1)
- this.qParam = null
- }else{
- this.deviceInfo(0)
- this.qParam = null
- }
-
- }
-
- }, 200)
-
- }
-
- // if(!hasShownPopup){
- // console.log(typeof(hasShownPopup),'hasShownPopuphasShownPopup');
- // this.showTips=uni.getStorageSync('hasShownPopup')
- // }else{
- // this.showTips=true
- // uni.setStorageSync('hasShownPopup', true);
- // }
-
- // this.$store.commit('SET_SHOWTIPS', true);
- // console.log(this.polyline);
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none',
- duration: 2000
- });
- }
- }).catch(error => {
- console.error("Error fetching area data:", error);
- });
-
- },
-
+
+
convertBoundaryToPolyline(boundary) {
if (!boundary) return null;
@@ -4697,6 +4999,7 @@
url: "/page_user/idcard_test"
});
} else {
+ this.tozf=true
this.seeDetail = true;
uni.hideLoading()
console.log('跳转1');
@@ -4716,6 +5019,7 @@
});
} else {
this.seeDetail = true;
+ this.tozf=true
uni.hideLoading()
console.log('跳转2');
uni.navigateTo({
@@ -4753,12 +5057,13 @@
.isAuthentication == 0) {
uni.hideLoading()
that.seeDetail = true;
-
+ that.tozf=true
uni.navigateTo({
url: "/page_user/idcard_test"
});
} else {
that.seeDetail = true;
+ that.tozf=true
uni.hideLoading()
console.log('跳转3');
uni.navigateTo({
@@ -4778,6 +5083,7 @@
}
});
} else {
+ that.tozf=true
that.seeDetail = true;
uni.hideLoading()
console.log('跳转4');
@@ -4880,262 +5186,7 @@
},
- deviceInfo(num) {
- if (uni.getStorageSync('token')) {
-
- this.$u.get('/app/device/info?sn=' + this.sn).then((res) => {
- if (res.code === 200) {
- this.isqrcode = true
- this.deviceInfos = res.data;
- if (!this.orderinfo.sn) {
- this.mac = res.data.mac
- }
- if (num == 0) {
- this.showdevice = true;
- this.type = 0;
- if (this.areaInfo.areaId != res.data.areaId) {
- this.getArea()
- }
- // this.routePlanning(res.data.latitude, res.data.longitude)
- // setTimeout(() => {
-
- // // this.deviceIndex = 1;
- // }, 600)
- } else {
- // if (this.deviceInfos.onlineStatus == 0) {
- // wx.showToast({
- // title: '车辆离线中,请使用其他车辆',
- // icon: 'none',
- // duration: 4000
- // });
- // } else
- if (this.deviceInfos.status == 0) {
- uni.showToast({
- title: '车辆未上架,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos.status == 2) {
- uni.showToast({
- title: '车辆预约中,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos.status == 3) {
- uni.showToast({
- title: '车辆骑行中,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos.status == 4) {
- uni.showToast({
- title: '车辆临时锁车中,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos.status == 6) {
- uni.showToast({
- title: '车辆调度中,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos.status == 8) {
- uni.showToast({
- title: '车辆下线中,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos.status == 9) {
- uni.showToast({
- title: '车辆已废弃,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos.status == 7) {
- uni.showToast({
- title: '车辆未上线,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos.status == 1) {
-
- if (this.areaInfo.areaId != res.data.areaId) {
- this.getArea()
- }
- // this.routePlanning(res.data.latitude, res.data.longitude)
- setTimeout(() => {
- this.showdevice = true
- this.type = 1;
- this.deviceIndex = 1;
- }, 600)
-
- }
- }
- } else {
- this.showdevice = false;
- this.deviceIndex = 0;
- this.type = 0;
- uni.showToast({
- title: res.msg,
- icon: 'none',
- duration: 2000
- });
- }
- });
- } else {
- console.log('判断2');
- wx.login({
- success: (res) => {
- if (res.code) {
- console.log('登录!', res);
- let data = {
- wxOpenId: res.code,
- };
- let areaId = uni.getStorageSync('areaId');
- if (areaId) {
- this.$u.post('/loginByopenid?jsCode=' + res.code + '&areaId=' +
- areaId)
- .then((
- res) => {
- // uni.hideLoading();
- if (res.code == 200) {
- uni.setStorageSync('token', res.token);
- this.getinfo()
- this.$u.get('/app/device/info?sn=' + this.sn)
- .then((
- res) => {
- if (res.code === 200) {
- this.isqrcode = true
- this.deviceInfos = res.data;
-
- if (num == 0) {
- // this.routePlanning(res.data.latitude,
- // res.data.longitude)
- this.showdevice = true;
- this.type = 0;
- } else {
- // if (this.deviceInfos
- // .onlineStatus ==
- // 0) {
- // uni.showToast({
- // title: '车辆离线中,请使用其他车辆',
- // icon: 'none',
- // duration: 4000
- // });
- // } else
- if (this.deviceInfos
- .status ==
- 0) {
- uni.showToast({
- title: '车辆未上架,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos
- .status ==
- 2) {
- uni.showToast({
- title: '车辆预约中,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos
- .status ==
- 3) {
- uni.showToast({
- title: '车辆骑行中,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos
- .status ==
- 4) {
- uni.showToast({
- title: '车辆临时锁车中,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos.status ==
- 6) {
- uni.showToast({
- title: '车辆调度中,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos
- .status ==
- 8) {
- uni.showToast({
- title: '车辆下线中,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos
- .status ==
- 9) {
- uni.showToast({
- title: '车辆已废弃,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos
- .status ==
- 7) {
- uni.showToast({
- title: '车辆未上线,请使用其他车辆',
- icon: 'none',
- duration: 4000
- });
- } else if (this.deviceInfos
- .status ==
- 1) {
- // this.routePlanning(res.data
- // .latitude, res.data
- // .longitude)
- if (this.areaInfo != res.data
- .areaId) {
- this.getArea()
- }
- // this.routePlanning(res.data.latitude, res.data.longitude)
- setTimeout(() => {
- this.showdevice = true
- this.type = 1;
- this.deviceIndex = 1;
- }, 600)
- }
- }
- } else {
- this.showdevice = false;
- this.deviceIndex = 0;
- this.type = 0;
- uni.showToast({
- title: res.msg,
- icon: 'none',
- duration: 2000
- });
- }
- });
- } else if (res.code == 501) {
- uni.showToast({
- title: res.msg,
- icon: 'none',
- duration: 2000
- });
- } else {
- uni.redirectTo({
- url: '/pages/login/login'
- });
- }
- });
-
- }
-
- }
- },
- });
- }
- },
-
+
},
}
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 31edcc8..4ec7c70 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -22,7 +22,8 @@
手机号登录
@@ -235,6 +236,7 @@
isCodeButtonDisabled2: false,
codeButtonText2: '获取验证码',
countdown2: 60,
+ openCode:null,
}
},
onLoad() {
@@ -247,6 +249,16 @@
},
},
+ onShow() {
+ wx.login({
+ success(res) {
+ if (res.code) {
+ this.openCode=res.code
+ console.log(this.openCode,'this.openCodethis.openCode');
+ }
+ },
+ });
+ },
watch: {
phone() {
this.checkInputFields();
@@ -526,7 +538,8 @@
password: this.password,
areaId: areaId,
phoneCode: this.phoneCode,
- uuid: this.uuid
+ uuid: this.uuid,
+ openid:this.openCode
}
this.$u.post("/appCodeLogin", data).then((res) => {
if (res.code == 200) {
diff --git a/pages_admin/admin_index.vue b/pages_admin/admin_index.vue
index 1897915..a977838 100644
--- a/pages_admin/admin_index.vue
+++ b/pages_admin/admin_index.vue
@@ -316,9 +316,30 @@
this.sn = sn
if (this.sn != '') {
- uni.navigateTo({
- url: '/pages_admin/order/device_detail?id=' + this.sn
+ this.$u.get('/app/device/info?sn=' + this.sn).then((res) => {
+ console.log(res,'rererer');
+ if (res.code === 200) {
+ if(res.data.sn==this.areaId){
+ uni.navigateTo({
+ url: '/pages_admin/order/device_detail?id=' + this.sn
+ })
+ }else{
+ uni.showToast({
+ title: '无效车辆',
+ icon: 'none',
+ duration: 2000
+ });
+ }
+
+ }else{
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
})
+
}
},
diff --git a/pages_admin/order/order_detail.vue b/pages_admin/order/order_detail.vue
index f082daf..d8284b9 100644
--- a/pages_admin/order/order_detail.vue
+++ b/pages_admin/order/order_detail.vue
@@ -659,6 +659,9 @@
},
// 开锁
openBtn(){
+ uni.showLoading({
+ title:'加载中...'
+ })
this.$u.post('/appVerify/admin/unlocking?sn=' + this.orderInfo.sn).then((res) => {
if (res.code == 200) {
@@ -681,7 +684,10 @@
});
},
// 关锁
- closBtn(){
+ closeBtn(){
+ uni.showLoading({
+ title:'加载中...'
+ })
this.$u.post('/appVerify/admin/lock?sn=' + this.orderInfo.sn).then((res) => {
if (res.code == 200) {
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
diff --git a/pages_adminSet/shDetail.vue b/pages_adminSet/shDetail.vue
new file mode 100644
index 0000000..8183fd0
--- /dev/null
+++ b/pages_adminSet/shDetail.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
diff --git a/pages_adminSet/shgl.vue b/pages_adminSet/shgl.vue
index e6b73f0..a6d3f7b 100644
--- a/pages_adminSet/shgl.vue
+++ b/pages_adminSet/shgl.vue
@@ -5,19 +5,20 @@
-
+
-
+
- 张某某
- 13523458945
- 待处理
+
+ {{item.userName}}
+ 待处理
+ 已驳回
- 【其他】 车辆不好控制方向
+ 【{{item.typeStr}}】 {{item.detail}}
@@ -35,33 +36,82 @@
生成工单
+
+ 已生成工单
+
忽略
+
+ 该车故障记录>
+
+
\ No newline at end of file