From 5e49fa4ef237c58cf2c3d0570f423350b4b085bb Mon Sep 17 00:00:00 2001 From: "3321822538@qq.com" <3321822538@qq.com> Date: Thu, 17 Apr 2025 17:12:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=94=B5=E5=8A=A8=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/http.interceptor.js | 2 +- page_fenbao/jiameng/index.vue | 2 +- page_fenbao/yunwei/addyunwei.vue | 428 ++++++++++++++++++++++++++++ page_fenbao/yunwei/index.vue | 337 ++++++++++++++++++++++ page_shanghu/guanli/Qrcode.vue | 4 +- page_shanghu/guanli/admin_worke.vue | 12 + page_user/hcshenhe.vue | 21 +- pages.json | 14 + pages/my.vue | 192 ++++++------- pages/nearbystores/index.vue | 56 +++- 10 files changed, 957 insertions(+), 111 deletions(-) create mode 100644 page_fenbao/yunwei/addyunwei.vue create mode 100644 page_fenbao/yunwei/index.vue diff --git a/common/http.interceptor.js b/common/http.interceptor.js index c0b1ffe..8e87cc7 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -1,7 +1,7 @@ const install = (Vue, vm) => { uni.setStorageSync('deptId', 100); Vue.prototype.$u.http.setConfig({ - // baseUrl: 'http://192.168.2.46:4101', //键辉本地 + // baseUrl: 'http://192.168.2.76:4101', //键辉本地 // baseUrl: 'http://192.168.0.102:4101', //景森本地 baseUrl: 'https://ele.ccttiot.com/prod-api', //线上 loadingText: '努力加载中~', diff --git a/page_fenbao/jiameng/index.vue b/page_fenbao/jiameng/index.vue index 2ebc3ab..0835577 100644 --- a/page_fenbao/jiameng/index.vue +++ b/page_fenbao/jiameng/index.vue @@ -123,7 +123,7 @@ }) }, getlist() { - this.$u.get(`/bst/areaJoin/list?pageNum=1&pageSize=999`).then(res => { + this.$u.get(`/bst/areaJoin/list?pageNum=1&pageSize=999&types=1,2`).then(res => { if (res.code == 200) { this.wateringList = res.rows } diff --git a/page_fenbao/yunwei/addyunwei.vue b/page_fenbao/yunwei/addyunwei.vue new file mode 100644 index 0000000..3fcb686 --- /dev/null +++ b/page_fenbao/yunwei/addyunwei.vue @@ -0,0 +1,428 @@ + + + + \ No newline at end of file diff --git a/page_fenbao/yunwei/index.vue b/page_fenbao/yunwei/index.vue new file mode 100644 index 0000000..d528895 --- /dev/null +++ b/page_fenbao/yunwei/index.vue @@ -0,0 +1,337 @@ + + + + + \ No newline at end of file diff --git a/page_shanghu/guanli/Qrcode.vue b/page_shanghu/guanli/Qrcode.vue index 5e52b2f..798069f 100644 --- a/page_shanghu/guanli/Qrcode.vue +++ b/page_shanghu/guanli/Qrcode.vue @@ -32,9 +32,9 @@ const qrSizePx = uni.upx2px(qrSizeRpx); // 将rpx转换为px if (this.deptId == 100) { - qr.data = 'https://wc.chuangtewl.com/xl/xd?s=' + this.sn; + qr.data = 'https://wx.ccttiot.com/x/d?s=' + this.sn; } else if (this.deptId == 101) { - qr.data = 'https://wc.chuangtewl.com/xl/xd?s=' + this.sn; + qr.data = 'https://wx.ccttiot.com/x/d?s=' + this.sn; } qr.size = qrSizePx; // 设置二维码大小为像素值 diff --git a/page_shanghu/guanli/admin_worke.vue b/page_shanghu/guanli/admin_worke.vue index 1b52370..e09c8d2 100644 --- a/page_shanghu/guanli/admin_worke.vue +++ b/page_shanghu/guanli/admin_worke.vue @@ -113,6 +113,12 @@ 加盟伙伴 + + + + 运维人员 + + @@ -229,6 +235,12 @@ export default { } }, methods: { + // 点击跳转到运维人员 + btnywry(){ + uni.navigateTo({ + url:'/page_fenbao/yunwei/index' + }) + }, // 点击跳转到电子围栏 toMap(){ uni.navigateTo({ diff --git a/page_user/hcshenhe.vue b/page_user/hcshenhe.vue index b4e26e7..a4475b0 100644 --- a/page_user/hcshenhe.vue +++ b/page_user/hcshenhe.vue @@ -9,7 +9,7 @@ 我们将在12小时内完成审核 - + @@ -86,8 +86,13 @@ }) }, sub(){ + uni.showLoading({ + title: '还车中...', + mask: true + }) uni.getLocation({ type: 'wgs84', + isHighAccuracy:true, success: (res) => { console.log(res); this.lat = res.latitude @@ -104,19 +109,27 @@ getfeiyong(){ let data = { orderId:this.orderId, - lon:this.lat, - lat:this.lon + lon:this.lon, + lat:this.lat } this.$u.post(`/app/order/calcFee`,data).then(res =>{ if(res.code == 200){ this.fajinobj = res.data if(res.data.manageFee > 0 || res.data.dispatchFee > 0){ + uni.hideLoading() this.fjflag = true // this.gethc() }else{ // this.fjflag = true this.gethc() } + }else{ + uni.hideLoading() + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }) } }) }, @@ -134,12 +147,14 @@ icon: 'success', duration: 2000 }) + uni.hideLoading() setTimeout(()=>{ uni.switchTab({ url:'/pages/myorder/returned/index' }) },1500) }else{ + uni.hideLoading() uni.showToast({ title: res.msg, icon: 'none', diff --git a/pages.json b/pages.json index 41ac776..3860b1c 100644 --- a/pages.json +++ b/pages.json @@ -242,6 +242,20 @@ "enablePullDownRefresh": false, "navigationStyle": "custom" } + },{ + "path": "yunwei/addyunwei", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + },{ + "path": "yunwei/index", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } },{ "path": "renlian", "style": { diff --git a/pages/my.vue b/pages/my.vue index 246d270..f4a4f93 100644 --- a/pages/my.vue +++ b/pages/my.vue @@ -150,7 +150,8 @@ adminflag:false, user:{}, kefulist:[], - lists:[] + lists:[], + logoflag:false } }, onLoad() { @@ -224,15 +225,6 @@ uni.navigateTo({ url: `/page_shanghu/guanli/admin_worke?id=${e[0].value}` }) - // if (this.totype == 2) { - // uni.navigateTo({ - // url: `/page_shanghu/admin_index?id=${e.id}` - // }) - // } else { - // uni.navigateTo({ - // url: '/page_shanghu/fix_index' - // }) - // } }, // 请求运营区 getareaList() { @@ -254,22 +246,7 @@ }) } }else if(res.code == 401){ - uni.showModal({ - title: '提示', - content: '您当前未登录,是否前去登录?', - showCancel: true, - success: function (res) { - if (res.confirm) { - uni.reLaunch({ - url:'/pages/login/login' - }) - } else if (res.cancel) { - uni.switchTab({ - url:'/pages/index/index' - }) - } - } - }) + this.logoflag = true } }) }, @@ -287,87 +264,106 @@ }, // 点击事件进行操作 btnpage(num){ - if(num == 1){ //实名认证 - uni.navigateTo({ - url:'/page_user/shiming?user=' + JSON.stringify(this.user) - }) - }else if(num == 2){ //我的订单 - uni.navigateTo({ - url:'/pages/myorder/index' - }) - }else if(num == 3){ //用车指南 - uni.navigateTo({ - url:'/page_user/yongche/index?type=1' - }) - }else if(num == 4){ //租车指南 - uni.navigateTo({ - url:'/page_user/yongche/index?type=0' - }) - }else if(num == 5){ //故障上报 - uni.navigateTo({ - url:'/page_user/guzhang/index' - }) - }else if(num == 6){ //故障上报记录 - uni.navigateTo({ - url:'/page_user/guzhang/guzhanglv' - }) - }else if(num == 7){ //意见反馈 - uni.navigateTo({ - url:'/page_user/yijian' - }) - }else if(num == 8){ //联系客服 - this.kefuflag = true - }else if(num == 9){ //帮助中心 - uni.navigateTo({ - url:'/page_user/bangzhu' - }) - }else if(num == 10){ //运维人员 - this.totype = 1 - if (this.list.length < 2) { - uni.setStorageSync('adminAreaid', this.list[0].value); - uni.navigateTo({ - url: '/page_shanghu/fix_index' - }) - } else { - this.show = true - } - }else if(num == 11){ //管理人员 - this.totype = 2 - if (this.list.length < 2) { - uni.setStorageSync('adminAreaid', this.list[0].value); - uni.navigateTo({ - url: '/page_shanghu/guanli/admin_worke' - }) - } else { - this.show = true - } - }else if(num == 12){ + if(this.logoflag == true){ uni.showModal({ title: '提示', - content: '您确定要退出登录吗?', + content: '您当前未登录,是否前去登录?', showCancel: true, success: function (res) { if (res.confirm) { - try { - uni.clearStorageSync() // 同步清除 - console.log('所有缓存已清除') - uni.showToast({ title: '缓存已清除', icon: 'success' }) - uni.reLaunch({ - url:'/pages/login/login' - }) - } catch (e) { - console.error('清除失败:', e) - uni.showToast({ title: '清除失败', icon: 'none' }) - } + uni.reLaunch({ + url:'/pages/login/login' + }) } else if (res.cancel) { - console.log('取消'); // 用户点击取消 + // uni.switchTab({ + // url:'/pages/index/index' + // }) } } }) - }else if(num == 13){ - uni.navigateTo({ - url:'/page_user/luru/index' - }) + }else{ + if(num == 1){ //实名认证 + uni.navigateTo({ + url:'/page_user/shiming?user=' + JSON.stringify(this.user) + }) + }else if(num == 2){ //我的订单 + uni.navigateTo({ + url:'/pages/myorder/index' + }) + }else if(num == 3){ //用车指南 + uni.navigateTo({ + url:'/page_user/yongche/index?type=1' + }) + }else if(num == 4){ //租车指南 + uni.navigateTo({ + url:'/page_user/yongche/index?type=0' + }) + }else if(num == 5){ //故障上报 + uni.navigateTo({ + url:'/page_user/guzhang/index' + }) + }else if(num == 6){ //故障上报记录 + uni.navigateTo({ + url:'/page_user/guzhang/guzhanglv' + }) + }else if(num == 7){ //意见反馈 + uni.navigateTo({ + url:'/page_user/yijian' + }) + }else if(num == 8){ //联系客服 + this.kefuflag = true + }else if(num == 9){ //帮助中心 + uni.navigateTo({ + url:'/page_user/bangzhu' + }) + }else if(num == 10){ //运维人员 + this.totype = 1 + if (this.list.length < 2) { + uni.setStorageSync('adminAreaid', this.list[0].value); + uni.navigateTo({ + url: '/page_shanghu/fix_index' + }) + } else { + this.show = true + } + }else if(num == 11){ //管理人员 + this.totype = 2 + if (this.list.length < 2) { + uni.setStorageSync('adminAreaid', this.list[0].value); + uni.navigateTo({ + url: `/page_shanghu/guanli/admin_worke?id=${this.list[0].value}` + }) + } else { + this.show = true + } + }else if(num == 12){ + uni.showModal({ + title: '提示', + content: '您确定要退出登录吗?', + showCancel: true, + success: function (res) { + if (res.confirm) { + try { + uni.clearStorageSync() // 同步清除 + console.log('所有缓存已清除') + uni.showToast({ title: '缓存已清除', icon: 'success' }) + uni.reLaunch({ + url:'/pages/login/login' + }) + } catch (e) { + console.error('清除失败:', e) + uni.showToast({ title: '清除失败', icon: 'none' }) + } + } else if (res.cancel) { + console.log('取消'); // 用户点击取消 + } + } + }) + }else if(num == 13){ + uni.navigateTo({ + url:'/page_user/luru/index' + }) + } } } } diff --git a/pages/nearbystores/index.vue b/pages/nearbystores/index.vue index b25a4af..c4c82f0 100644 --- a/pages/nearbystores/index.vue +++ b/pages/nearbystores/index.vue @@ -276,6 +276,7 @@ }, onShow() { + this.covers = [] this.sockedata = '' this.getMyLocation() this.setMapScale() @@ -362,7 +363,50 @@ console.log('解析后的JSON数据:', data); // 这里可以处理具体的业务逻辑 this.sockedata = data - this.getqingqiu() + // this.getqingqiu() + // this.$u.get(`/app/device/listNearBy?radius=10000¢er=${this.jingweidu}`).then((res) => { + // if (res.code == 200) { + this.covers = [] + const newMarkers = [] + this.parkingList.forEach(item => { + newMarkers.push({ + id: parseFloat(item.id), + latitude: parseFloat(item.latitude), + longitude: parseFloat(item.longitude), + width: 40, + height: 60, + iconPath: item.type == 1 ? + 'https://lxnapi.ccttiot.com/bike/img/static/up2xXqAgwCX5iER600k3' : + item.type == 2 ? + 'https://lxnapi.ccttiot.com/bike/img/static/uDNY5Q4zOiZTCBTA2Jdq' : + 'https://lxnapi.ccttiot.com/bike/img/static/u53BAQcFIX3vxsCzEZ7t', + callout: { + content: item.name, + color: '#ffffff', + fontSize: 14, + borderRadius: 10, + bgColor: item.type == 1 ? '#3A7EDB' : item.type == 2 ? '#FF473E' : + '#FFC107', + padding: 6, + display: 'ALWAYS' + }, + isCalloutVisible: true // 添加标记 + }) + }) + this.newMarkers = newMarkers + this.$set(this, 'covers', [...this.covers, ...newMarkers]) + // this.$set(this, 'covers', [...this.covers, ...this.newMarkers]) + if(this.sockedata.latitude){ + this.covers.push({ + latitude: this.sockedata.latitude, + longitude: this.sockedata.longitude, + width: 8, + height: 8, + iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uow9Zq3edTUYCVHI9H60', + }) + } + // } + // }) this.covers.push({ latitude: data.latitude, longitude: data.longitude, @@ -956,9 +1000,9 @@ })) return { points: points, - fillColor: "#3A7EDB40", //填充颜色 - strokeColor: "#3A7EDB", //描边颜色 - strokeWidth: 2, //描边宽度 + fillColor: "#88888850", //填充颜色 + strokeColor: "#88888850", //描边颜色 + strokeWidth: 1, //描边宽度 zIndex: 1, //层级 } }).filter(polyline => polyline !== null) @@ -1035,8 +1079,8 @@ id: parseFloat(item.id), latitude: parseFloat(item.latitude), longitude: parseFloat(item.longitude), - width: 20, - height: 28.95, + width: 40, + height: 60, iconPath: item.type == 1 ? 'https://lxnapi.ccttiot.com/bike/img/static/up2xXqAgwCX5iER600k3' : item.type == 2 ?