diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index 41a59ca..4c963ff 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -9,8 +9,9 @@ const install = (Vue, vm) => {
// 测试环境
// baseUrl: 'https://dianche.chuantewulian.cn/prod-api',
// 俞山岛
+ baseUrl: 'https://testzc.chuangtewl.com/prod-api',
// baseUrl: 'http://47.120.68.19:8090',
- baseUrl: 'http://192.168.2.228:8090',
+ // baseUrl: 'http://192.168.2.20:8090',
// 创特
loadingText: '努力加载中~',
loadingTime: 10000,
diff --git a/components/tab-bar/tab-bar.vue b/components/tab-bar/tab-bar.vue
index e005064..26998e9 100644
--- a/components/tab-bar/tab-bar.vue
+++ b/components/tab-bar/tab-bar.vue
@@ -35,9 +35,11 @@
// 自定义底栏对应页面的加载情况
tabberPageLoadFlag: [],
ispop: false,
+ AccountInfo:{}
}
},
mounted() {
+ this.getAccountInfo()
this.currentTabbarIndex = this.indexs
// const index = Number(this.indexs || 0)
// // 根据底部tabbar菜单列表设置对应页面的加载情况
@@ -47,12 +49,27 @@
// this.changeTabbar(index)
},
methods:{
+ getAccountInfo(){
+ this.$u.get(`appAdmin/myAccountInfo`).then((res) => {
+ if (res.code === 200) {
+ this.AccountInfo=res.data
+ } else {
+ // uni.showToast({
+ // title: res.msg,
+ // icon: 'none',
+ // duration: 2000
+ // });
+ }
+ });
+ },
changeTabbar(index) {
- let that =this
+ let that =this
+
if (this.currentTabbarIndex === index) return
// this._switchTabbarPage(index)
+ if(this.AccountInfo.userId){
if(index==0){
uni.redirectTo({
url:'/pages/index/index',
@@ -71,6 +88,13 @@
}
})
}
+ }else{
+ uni.navigateTo({
+ url:'/pages/login/login'
+ })
+ }
+
+
},
}
}
diff --git a/manifest.json b/manifest.json
index 5b9326a..a0bc38a 100644
--- a/manifest.json
+++ b/manifest.json
@@ -51,7 +51,7 @@
/* 小程序特有相关 */
"mp-weixin" : {
"libVersion" : "latest",
- "appid" : "wx21a50f113c30d41a",
+ "appid" : "wxc89e4a21f3907a53",
"setting" : {
"urlCheck" : false,
"minified" : true
diff --git a/page_Delivery/OrderDetail.vue b/page_Delivery/OrderDetail.vue
index 609788a..76ca0fb 100644
--- a/page_Delivery/OrderDetail.vue
+++ b/page_Delivery/OrderDetail.vue
@@ -186,6 +186,18 @@
}
},
methods: {
+ callPhone(phone) {
+ uni.makePhoneCall({
+ phoneNumber: phone
+ })
+
+ },
+
+ todetal(item){
+ uni.navigateTo({
+ url:'/page_Delivery/OrderDetail?orderNo='+item.orderNo
+ })
+ },
getDetail(){
this.$u.get(`appAdmin/deliveryOrderinfo/` + this.deliveryId).then((res) => {
if (res.code == 200) {
@@ -203,16 +215,11 @@
}
});
},
- todetal(item){
- uni.navigateTo({
- url:'/page_Delivery/OrderDetail?orderNo='+item.orderNo
- })
- },
goDeli(item) {
- this.$u.get(`appAdmin/inDelivery?orderNo=` + this.item.orderNo).then((res) => {
+ this.$u.post(`appAdmin/inDelivery?orderNo=` + this.orderInfo.orderNo).then((res) => {
if (res.code == 200) {
- this.getList()
+ this.getDetail()
uni.showToast({
title: '开始配送',
icon: 'none',
@@ -230,10 +237,10 @@
});
},
overDeli(item) {
- this.$u.get(`appAdmin/endDelivery?orderNo=` + this.item.orderNo).then((res) => {
+ this.$u.post(`appAdmin/endDelivery?orderNo=` + this.orderInfo.orderNo).then((res) => {
if (res.code == 200) {
- this.getList()
+ this.getDetail()
uni.showToast({
title: '配送完成',
icon: 'none',
@@ -251,10 +258,10 @@
});
},
getOrder(item) {
- this.$u.get(`appAdmin/orderTaking?orderNo=` + this.item.orderNo).then((res) => {
+ this.$u.post(`appAdmin/orderTaking?orderNo=` + this.orderInfo.orderNo).then((res) => {
if (res.code == 200) {
- this.getList()
+ this.getDetail()
uni.showToast({
title: '接单成功',
icon: 'none',
@@ -292,7 +299,7 @@
if (num == 0) {
result.text = '待接单';
result.color = '#F14C4C'; // 待支付颜色
- } else if (num == 1) {
+ } else if (num == 1) {w
result.text = '待配送';
result.color = '#F38C42'; // 超时取消颜色
} else if (num == 2) {
diff --git a/page_Delivery/orerList.vue b/page_Delivery/orerList.vue
index decfdd4..0b69efd 100644
--- a/page_Delivery/orerList.vue
+++ b/page_Delivery/orerList.vue
@@ -150,13 +150,19 @@
this.getList()
},
methods: {
+ callPhone(phone) {
+ uni.makePhoneCall({
+ phoneNumber: phone
+ })
+
+ },
todetal(item){
uni.navigateTo({
url:'/page_Delivery/OrderDetail?deliveryId='+item.deliveryId
})
},
goDeli(item) {
- this.$u.get(`appAdmin/inDelivery?orderNo=` + this.item.orderNo).then((res) => {
+ this.$u.post(`appAdmin/inDelivery?orderNo=` + item.orderNo).then((res) => {
if (res.code == 200) {
this.getList()
@@ -177,7 +183,7 @@
});
},
overDeli(item) {
- this.$u.get(`appAdmin/endDelivery?orderNo=` + this.item.orderNo).then((res) => {
+ this.$u.post(`appAdmin/endDelivery?orderNo=` + item.orderNo).then((res) => {
if (res.code == 200) {
this.getList()
@@ -198,7 +204,7 @@
});
},
getOrder(item) {
- this.$u.get(`appAdmin/orderTaking?orderNo=` + this.item.orderNo).then((res) => {
+ this.$u.post(`appAdmin/orderTaking?orderNo=` + item.orderNo).then((res) => {
if (res.code == 200) {
this.getList()
@@ -280,7 +286,7 @@
this.tabindex = index
console.log(item, 'aaa');
this.tabstause = item.value
- // this.getList(); // 调用实际的搜索功能
+ this.getList(); // 调用实际的搜索功能
},
getList() {
diff --git a/page_Merchant/addStore.vue b/page_Merchant/addStore.vue
index ae36d93..8fac65e 100644
--- a/page_Merchant/addStore.vue
+++ b/page_Merchant/addStore.vue
@@ -1,7 +1,8 @@
-
-
+
+
店铺名称
@@ -17,15 +18,15 @@
{{ data.businessTimeStart ? data.businessTimeStart : '请选择营业开始时间' }}
-
+
-
+
结束时间
-
+
{{ data.businessTimeEnd ? data.businessTimeEnd : '请选择营业结束时间' }}
@@ -53,11 +54,11 @@
请选择省市区
-
+
- {{data.province}} {{data.city}} {{data.county}}
+ {{data.province}} {{data.city}} {{data.county}}
@@ -65,7 +66,7 @@
详细地址
-
+
{{ data.address ? data.address : '请选择详细地址' }}
@@ -81,21 +82,23 @@
-
+
-
+
保存
-
-
-
-
+
+
+
+
@@ -106,9 +109,9 @@
bgc: {
backgroundColor: "#fff",
},
- list:[],
- time:false,
- time1:false,
+ list: [],
+ time: false,
+ time1: false,
params: {
year: false,
month: false,
@@ -117,52 +120,52 @@
minute: true,
second: false
},
-
+
pickertime: '08:00',
pickertime1: '21:00',
- showcity:false,
- data:{
-
- name:'',
- businessTimeStart:'',
- businessTimeEnd:'',
- lng:'',
- lat:'',
- province:'',
- city:'',
- county:'',
- contactName:'',
- contactMobile:'',
- address:'',
- picture:'',
- simpleAddress:''
+ showcity: false,
+ data: {
+
+ name: '',
+ businessTimeStart: '',
+ businessTimeEnd: '',
+ lng: '',
+ lat: '',
+ province: '',
+ city: '',
+ county: '',
+ contactName: '',
+ contactMobile: '',
+ address: '',
+ picture: '',
+ simpleAddress: ''
},
token: '',
}
},
onLoad(e) {
- if(e.id){
- this.data.storeId=e.id
+ if (e.id) {
+ this.data.storeId = e.id
this.getOrderDetail()
}
},
onShow() {
this.getList()
- this.getQiniuToken()
+ this.getQiniuToken()
},
methods: {
- getOrderDetail(){
- let data ={
- storeId:this.data.storeId
+ getOrderDetail() {
+ let data = {
+ storeId: this.data.storeId
}
- this.$u.get(`app/getStore?`,this.data).then((res) => {
+ this.$u.get(`app/getStore?`, this.data).then((res) => {
if (res.code == 200) {
-
- this.data=res.data
-
+
+ this.data = res.data
+
} else {
-
-
+
+
uni.showToast({
title: res.msg,
icon: 'none',
@@ -171,141 +174,141 @@
}
});
},
- sub(){
- if (!this.data.name) {
- uni.showToast({
- title: '请填写店铺名称',
- icon: 'none',
- duration: 2000
- });
- return; // 阻止请求继续执行
- }
- if (!this.data.businessTimeStart) {
- uni.showToast({
- title: '请填写营业开始时间',
- icon: 'none',
- duration: 2000
- });
- return;
- }
- if (!this.data.businessTimeEnd) {
- uni.showToast({
- title: '请填写营业结束时间',
- icon: 'none',
- duration: 2000
- });
- return;
- }
-
- if (!this.data.province || !this.data.city || !this.data.county) {
- uni.showToast({
- title: '请选择省市区信息',
- icon: 'none',
- duration: 2000
- });
- return;
- }
- if (!this.data.contactName) {
- uni.showToast({
- title: '请填写负责人姓名',
- icon: 'none',
- duration: 2000
- });
- return;
- }
- if (!this.data.contactMobile) {
- uni.showToast({
- title: '请填写联系人手机号',
- icon: 'none',
- duration: 2000
- });
- return;
- }
- if (!this.data.address) {
- uni.showToast({
- title: '请选择详细地址',
- icon: 'none',
- duration: 2000
- });
- return;
- }
- if (!this.data.picture) {
- uni.showToast({
- title: '请上传图片',
- icon: 'none',
- duration: 2000
- });
- return;
- }
- console.log(this.data,'datadata');
- this.$u.post(`appAdmin/store/save`,this.data).then((res) => {
- if (res.code == 200) {
-
- this.list=res.data
-
- } else {
-
-
- uni.showToast({
- title: res.msg,
- icon: 'none',
- duration: 2000
- });
- }
- });
- },
- btn(){
- let _this=this
- let math='static/'+_this.$u.guid(20)
- uni.chooseMessageFile({
- count: 1,
- type: 'all',
- success (res) {
- // tempFilePath可以作为img标签的src属性显示图片
- const tempFilePaths = res.tempFiles
- // let tempFilePaths = chooseImageRes.tempFilePaths;
- // console.log(tempFilePaths)
- // tempFilePaths.forEach(item=>{
- // // 上传图片到七牛云
-
- // })
- wx.uploadFile({
- url: 'https://up-z2.qiniup.com',
- name: 'file',
- filePath: tempFilePaths[0].path,
- formData: {
- token: _this.token, //后端返回的token
- key:'bike/img/'+math
- },
- success: function(res) {
-
- let str = JSON.parse(res.data)
-
- _this.data.picture = _this.upurl +'/'+ str.key
- console.log(_this.data.picture)
- }
+ sub() {
+ if (!this.data.name) {
+ uni.showToast({
+ title: '请填写店铺名称',
+ icon: 'none',
+ duration: 2000
});
- }
+ return; // 阻止请求继续执行
+ }
+ if (!this.data.businessTimeStart) {
+ uni.showToast({
+ title: '请填写营业开始时间',
+ icon: 'none',
+ duration: 2000
+ });
+ return;
+ }
+ if (!this.data.businessTimeEnd) {
+ uni.showToast({
+ title: '请填写营业结束时间',
+ icon: 'none',
+ duration: 2000
+ });
+ return;
+ }
+
+ if (!this.data.province || !this.data.city || !this.data.county) {
+ uni.showToast({
+ title: '请选择省市区信息',
+ icon: 'none',
+ duration: 2000
+ });
+ return;
+ }
+ if (!this.data.contactName) {
+ uni.showToast({
+ title: '请填写负责人姓名',
+ icon: 'none',
+ duration: 2000
+ });
+ return;
+ }
+ if (!this.data.contactMobile) {
+ uni.showToast({
+ title: '请填写联系人手机号',
+ icon: 'none',
+ duration: 2000
+ });
+ return;
+ }
+ if (!this.data.address) {
+ uni.showToast({
+ title: '请选择详细地址',
+ icon: 'none',
+ duration: 2000
+ });
+ return;
+ }
+ if (!this.data.picture) {
+ uni.showToast({
+ title: '请上传图片',
+ icon: 'none',
+ duration: 2000
+ });
+ return;
+ }
+ console.log(this.data, 'datadata');
+ this.$u.post(`appAdmin/store/save`, this.data).then((res) => {
+ if (res.code == 200) {
+
+ this.list = res.data
+
+ } else {
+
+
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ });
+ },
+ btn() {
+ let _this = this
+ let math = 'static/' + _this.$u.guid(20)
+ uni.chooseMessageFile({
+ count: 1,
+ type: 'all',
+ success(res) {
+ // tempFilePath可以作为img标签的src属性显示图片
+ const tempFilePaths = res.tempFiles
+ // let tempFilePaths = chooseImageRes.tempFilePaths;
+ // console.log(tempFilePaths)
+ // tempFilePaths.forEach(item=>{
+ // // 上传图片到七牛云
+
+ // })
+ wx.uploadFile({
+ url: 'https://up-z2.qiniup.com',
+ name: 'file',
+ filePath: tempFilePaths[0].path,
+ formData: {
+ token: _this.token, //后端返回的token
+ key: 'bike/img/' + math
+ },
+ success: function(res) {
+
+ let str = JSON.parse(res.data)
+
+ _this.data.picture = _this.upurl + '/' + str.key
+ console.log(_this.data.picture)
+ }
+ });
+ }
})
-
+
// });
},
getQiniuToken() {
console.log('diaou');
- this.$u.get("/common/qiniu/uploadInfo").then((res) => {
- if (res.code == 200) {
- this.token=res.token
- console.log(res,'resres');
- this.upurl=res.domain
- }
- });
+ this.$u.get("/common/qiniu/uploadInfo").then((res) => {
+ if (res.code == 200) {
+ this.token = res.token
+ console.log(res, 'resres');
+ this.upurl = res.domain
+ }
+ });
// this.$u.get('https://v2.ielts.langsi.online/file/getToken').then(res => {
// console.log(res.data);
// this.token = res.data.token
// }).catch(err => {
// console.log(err)
// })
-
+
},
getMapLocation() {
uni.chooseLocation({
@@ -314,7 +317,7 @@
this.data.address = res.address
this.data.lng = res.longitude
this.data.lat = res.latitude
- this.data.simpleAddress=res.name
+ this.data.simpleAddress = res.name
// this.getRegionFn(res);
},
fail: () => {
@@ -382,28 +385,28 @@
}
});
},
- confirm(e){
- this.data.businessTimeStart= e.hour + ':' + e.minute
+ confirm(e) {
+ this.data.businessTimeStart = e.hour + ':' + e.minute
},
- confirm1(e){
- this.data.businessTimeEnd= e.hour + ':' + e.minute
+ confirm1(e) {
+ this.data.businessTimeEnd = e.hour + ':' + e.minute
},
- confirm2(e){
+ confirm2(e) {
console.log(e);
- this.data.province=e.province.label
- this.data.city=e.city.label
- this.data.county=e.area.label
+ this.data.province = e.province.label
+ this.data.city = e.city.label
+ this.data.county = e.area.label
},
-
- getList(){
+
+ getList() {
this.$u.get(`appAdmin/getStoreListByToken`).then((res) => {
if (res.code == 200) {
-
- this.list=res.data
-
+
+ this.list = res.data
+
} else {
-
-
+
+
uni.showToast({
title: res.msg,
icon: 'none',
@@ -417,12 +420,12 @@
+
\ No newline at end of file
diff --git a/page_Merchant/order_Detail.vue b/page_Merchant/order_Detail.vue
index ce21adb..85f9e37 100644
--- a/page_Merchant/order_Detail.vue
+++ b/page_Merchant/order_Detail.vue
@@ -181,7 +181,7 @@
- {{staReturn(item.statusChange)}}- ¥{{item.amountChange}}
+ {{item.details}}
2024-09-11 13:56:03
@@ -244,9 +244,27 @@
-
-
- 立即接单
+
+
+ 配送信息
+
+
+
+ 配送状态: {{typeReturns(orderInfo.deliveryOrder.status).text}}
+
+
+
+
+
+ 配送人员: {{orderInfo.deliveryOrder.deliveryman?orderInfo.deliveryOrder.deliveryman:'--'}}
+
+
+
+
+
+
+ 联系电话: {{orderInfo.deliveryOrder.deliverymanPhone?orderInfo.deliveryOrder.deliverymanPhone:'--'}}
+
@@ -364,7 +382,17 @@
-
+
+
+ 立即接单
+
+
+ 立即配送
+
+
+ 配送完成
+
+
@@ -375,7 +403,7 @@
return {
typeidx: 1,
height: 0,
- showtips: true,
+ showtips: false,
orderNo:"",
orderInfo:{},
modelInfo:{},
@@ -383,8 +411,9 @@
deliveryFee:0,
dispatchFee:0,
leaseFee:0,
- showcs:true,
- csmoney:0
+ showcs:false,
+ csmoney:0.,
+ AccountInfo:{}
}
},
onShow() {
@@ -394,10 +423,114 @@
if(e.orderNo){
this.orderNo=e.orderNo
this.getOrderInfo()
+ this.getAccountInfo()
}
},
methods: {
+ 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;
+ },
+ getAccountInfo(){
+ this.$u.get(`appAdmin/myAccountInfo`).then((res) => {
+ if (res.code === 200) {
+ this.AccountInfo=res.data
+
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ });
+ },
+ goDeli(item) {
+ this.$u.post(`appAdmin/inDelivery?orderNo=` + this.orderInfo.orderNo).then((res) => {
+ if (res.code == 200) {
+
+ this.getOrderInfo()
+ uni.showToast({
+ title: '开始配送',
+ icon: 'none',
+ duration: 2000
+ });
+ } else {
+
+
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ });
+ },
+ overDeli(item) {
+ this.$u.post(`appAdmin/endDelivery?orderNo=` + this.orderInfo.orderNo).then((res) => {
+ if (res.code == 200) {
+
+ this.getOrderInfo()
+ uni.showToast({
+ title: '配送完成',
+ icon: 'none',
+ duration: 2000
+ });
+ } else {
+
+
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ });
+ },
+ getOrder(item) {
+ this.$u.post(`appAdmin/orderTaking?orderNo=` + this.orderInfo.orderNo).then((res) => {
+ if (res.code == 200) {
+
+ this.getOrderInfo()
+ uni.showToast({
+ title: '接单成功',
+ icon: 'none',
+ duration: 2000
+ });
+ } else {
+
+
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ });
+ },
backyj(){
this.$u.post(`appVerify/depositRefund?orderNo=`+this.orderInfo.orderNo).then((res) => {
if (res.code == 200) {
@@ -642,6 +775,40 @@
.page {
width: 750rpx;
padding-bottom: 220rpx;
+ .order_code {
+ width: 696rpx;
+ margin: 0 auto;
+ margin-top: 16rpx;
+ padding: 20rpx 28rpx;
+ background: #FFFFFF;
+ border-radius: 20rpx 20rpx 20rpx 20rpx;
+
+ .tits {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #3D3D3D;
+ }
+
+ .code_li {
+ display: flex;
+ flex-wrap: nowrap;
+ justify-content: space-between;
+
+ .code {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #3D3D3D;
+ }
+
+ .btn {
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #4297F3;
+ }
+ }
+ }
+
+
.tip_box {
position: fixed;
left: 72rpx;
diff --git a/page_Operator/CarModel.vue b/page_Operator/CarModel.vue
index d986ad4..eed940f 100644
--- a/page_Operator/CarModel.vue
+++ b/page_Operator/CarModel.vue
@@ -128,6 +128,7 @@
page {}
.page {
+ padding-bottom: 170rpx;
.modelCard {
margin-top: 22rpx;
width: 750rpx;
diff --git a/page_Operator/modelMt.vue b/page_Operator/modelMt.vue
index c1527c8..c3cf310 100644
--- a/page_Operator/modelMt.vue
+++ b/page_Operator/modelMt.vue
@@ -1,6 +1,6 @@
-
@@ -8,23 +8,25 @@
车型名称
-
- 上传门头照
+ 上传车辆照片
门头照片必须清晰、方正、易于辨识
-
+
-
+
@@ -34,7 +36,7 @@
最高电压
- v
@@ -43,7 +45,7 @@
最低电压
- v
@@ -52,11 +54,31 @@
满电续航
-
KM
+
+
+ 押金
+
+
+
+ 元
+
+
+
+
+ 车型简介
+
+
+
+
+
+
-
+
车辆配件
+
+ {{getAccessoryNames()}}
@@ -84,7 +108,7 @@
-
+
选择配件
@@ -107,7 +131,7 @@
取消
-
+
保存
@@ -125,25 +149,27 @@
list: [],
Accessorylist: [],
chooseIdxArr: [], // 存储选中的索引
- data:{
- model:"",
- fullVoltage:"",
- lowVoltage:"",
- fullEndurance:"",
- remark:"",
- intro:"",
- deposit:"",
- picture:"",
- description:"",
-
+ data: {
+ model: "",
+ fullVoltage: "",
+ lowVoltage: "",
+ fullEndurance: "",
+ accessoryIds: [],
+ deposit: "",
+ picture: "",
+ description: "",
+
},
token: '',
- upurl:''
+ upurl: '',
+ modelId: ''
}
},
onLoad(e) {
if (e.modelId) {
-
+ console.log(e);
+ this.modelId = e.modelId
+ this.getmodelInfo()
}
this.getQiniuToken()
},
@@ -153,56 +179,122 @@
},
methods: {
- btn(){
- let _this=this
- let math='static/'+_this.$u.guid(20)
- uni.chooseMessageFile({
- count: 1,
- type: 'all',
- success (res) {
- // tempFilePath可以作为img标签的src属性显示图片
- const tempFilePaths = res.tempFiles
- // let tempFilePaths = chooseImageRes.tempFilePaths;
- // console.log(tempFilePaths)
- // tempFilePaths.forEach(item=>{
- // // 上传图片到七牛云
-
- // })
- wx.uploadFile({
- url: 'https://up-z2.qiniup.com',
- name: 'file',
- filePath: tempFilePaths[0].path,
- formData: {
- token: _this.token, //后端返回的token
- key:'bike/img/'+math
- },
- success: function(res) {
-
- let str = JSON.parse(res.data)
-
- _this.data.picture = _this.upurl +'/'+ str.key
- console.log(_this.data.picture)
+ getmodelInfo() {
+
+ let data = {
+ modelId: this.modelId
+ }
+ this.$u.get("app/getModelById?", data).then((res) => {
+ if (res.code == 200) {
+ this.data = res.data
+ if (this.data.accessorys && this.data.accessorys.length > 0) {
+ this.data.accessoryIds = this.data.accessorys.map(accessory => accessory.accessoryId);
+ } else {
+ // 如果没有配件数据,确保 accessoryIds 是空数组
+ this.data.accessoryIds = [];
}
+
+ this.chooseIdxArr = this.data.accessoryIds.map(accessoryId => {
+ // 找到 Accessorylist 中与 accessoryId 匹配的索引
+ const index = this.Accessorylist.findIndex(item => item.accessoryId ==
+ accessoryId);
+ return index > -1 ? index : null; // 如果找到匹配项,返回索引,否则返回 null
+ }).filter(idx => idx !== null); // 过滤掉未找到的 null 值
+
+ // 打印 chooseIdxArr 以查看匹配的索引
+ console.log('选中的索引数组:', this.chooseIdxArr);
+
+ // 调用 getAccessoryNames 方法获取选中的配件名称
+ const selectedAccessoryIds = this.chooseIdxArr.map(i => this.Accessorylist[i].accessoryId);
+ const selectedAccessoryNames = this.getAccessoryNames(selectedAccessoryIds);
+
+ console.log(this.data.accessorys,'this.data.accessorysthis.data.accessorysthis.data.accessorys');
+ }
+ });
+ },
+ sub() {
+ if (!this.data.model) {
+ uni.showToast({
+ title: '请填写车型名称',
+ icon: 'none',
+ duration: 2000
});
- }
+ return; // 阻止请求继续执行
+ }
+ if (!this.data.deposit) {
+ uni.showToast({
+ title: '请填写押金',
+ icon: 'none',
+ duration: 2000
+ });
+ return;
+ }
+
+ this.$u.post("appAgent/model/save", this.data).then((res) => {
+ if (res.code == 200) {
+ uni.showToast({
+ title: '操作成功',
+ icon: 'none',
+ duration: 1000
+ });
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 1200)
+
+ }
+ });
+ },
+ btn() {
+ let _this = this
+ let math = 'static/' + _this.$u.guid(20)
+ uni.chooseMessageFile({
+ count: 1,
+ type: 'all',
+ success(res) {
+ // tempFilePath可以作为img标签的src属性显示图片
+ const tempFilePaths = res.tempFiles
+ // let tempFilePaths = chooseImageRes.tempFilePaths;
+ // console.log(tempFilePaths)
+ // tempFilePaths.forEach(item=>{
+ // // 上传图片到七牛云
+
+ // })
+ wx.uploadFile({
+ url: 'https://up-z2.qiniup.com',
+ name: 'file',
+ filePath: tempFilePaths[0].path,
+ formData: {
+ token: _this.token, //后端返回的token
+ key: 'bike/img/' + math
+ },
+ success: function(res) {
+
+ let str = JSON.parse(res.data)
+
+ _this.data.picture = _this.upurl + '/' + str.key
+ console.log(_this.data.picture)
+ }
+ });
+ }
})
-
+
// });
},
getQiniuToken() {
-
- this.$u.get("/common/qiniu/uploadInfo").then((res) => {
- if (res.code == 200) {
- this.token=res.token
- console.log(res,'resres');
- this.upurl=res.domain
- }
- });
-
-
+
+ this.$u.get("/common/qiniu/uploadInfo").then((res) => {
+ if (res.code == 200) {
+ this.token = res.token
+ console.log(res, 'resres');
+ this.upurl = res.domain
+ }
+ });
+
+
},
- subacc(){
-
+ subacc() {
+ this.showpart = false
+ console.log(this.chooseIdxArr);
},
chooseAcc(itm, idx) {
const index = this.chooseIdxArr.indexOf(idx);
@@ -213,11 +305,51 @@
// 如果索引不存在于数组中,表示未选中,添加到数组中
this.chooseIdxArr.push(idx);
}
+ // 获取选中的 accessoryId 列表
+ const selectedAccessoryIds = this.chooseIdxArr.map(i => this.Accessorylist[i].accessoryId);
+ console.log(selectedAccessoryIds, 'selectedAccessoryIds');
+ // 将 accessoryId 数组拼接成字符串
+ // const selectedAccessoryIdsStr = selectedAccessoryIds.join(',');
+ this.data.accessoryIds = selectedAccessoryIds
+ // console.log(selectedAccessoryIdsStr,'selectedAccessoryIdsStrselectedAccessoryIdsStr');''
+ // 比对数据
+ // if (selectedAccessoryIdsStr === this.data.accessoryIds) {
+ // console.log('选中的配件与原始数据匹配');
+ // } else {
+ // console.log('选中的配件与原始数据不匹配');
+ // }
+ },
+ getAccessoryNames(accessoryIds) {
+ // 根据 accessoryIds 找到 Accessorylist 中对应的 name 字段
+ // 遍历 accessoryIds 数组,根据每个 id 找到 Accessorylist 中对应的 name 字段
+ const accessoryNames = this.data.accessoryIds.map(id => {
+ const item = this.Accessorylist.find(accessory => accessory.accessoryId === id);
+ return item ? item.name : '';
+ });
+
+ // 拼接 name 字符串,过滤掉空值
+ return accessoryNames.filter(name => name).join(', ');
},
getAccessorylist() {
this.$u.get(`appAgent/getAccessorylist`).then((res) => {
if (res.code == 200) {
this.Accessorylist = res.data
+ console.log( this.data.accessoryIds);
+ this.chooseIdxArr = this.data.accessoryIds.map(accessoryId => {
+ // 找到 Accessorylist 中与 accessoryId 匹配的索引
+ const index = this.Accessorylist.findIndex(item => item.accessoryId ==
+ accessoryId);
+ return index > -1 ? index : null; // 如果找到匹配项,返回索引,否则返回 null
+ }).filter(idx => idx !== null); // 过滤掉未找到的 null 值
+
+ // 打印 chooseIdxArr 以查看匹配的索引
+ console.log('选中的索引数组:', this.chooseIdxArr);
+
+ // 调用 getAccessoryNames 方法获取选中的配件名称
+ const selectedAccessoryIds = this.chooseIdxArr.map(i => this.Accessorylist[i].accessoryId);
+ const selectedAccessoryNames = this.getAccessoryNames(selectedAccessoryIds);
+
+ console.log('选中的配件名称:', selectedAccessoryNames);
} else {
// 处理接口返回错误的情况
}
@@ -403,7 +535,8 @@
width: 110rpx;
height: 110rpx;
}
- .close{
+
+ .close {
background: #FFFFFF;
// border-radius: 50%;
position: absolute;
diff --git a/page_Operator/order_Detail.vue b/page_Operator/order_Detail.vue
index 074991b..99a572e 100644
--- a/page_Operator/order_Detail.vue
+++ b/page_Operator/order_Detail.vue
@@ -181,7 +181,8 @@
- {{staReturn(item.statusChange)}}- ¥{{item.amountChange}}
+
+ {{item.details}}
2024-09-11 13:56:03
diff --git a/pages/index/index.vue b/pages/index/index.vue
index e61d3f9..54009fd 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -6,7 +6,7 @@
运营概览
-
+
+
+
+ 时间范围
+
+
+
+ {{firsTime}}
+
+ -
+
+ {{lasTime}}
+
+
@@ -63,14 +77,54 @@
+
+ 车辆统计
+
+
+
+
+ 车辆总数
+
+
+ 390
+
+
+
+
+
+ 车辆总数
+
+
+ 390
+
+
+
+
+
+ 车辆总数
+
+
+ 390
+
+
+
更多功能
-
+
+
+
+
+
+
+
+
@@ -97,7 +151,20 @@
chartday: [], // 保存日期的数组
chartData1: [], // 保存温度数据的数组
chartData2: [120, 90, 150, 80, 130, 110, 160],
- info:{}
+ info:{},
+ AccountInfo:{},
+ time1: false,
+ time2: false,
+ lasTime: '',
+ firsTime: '',
+ params: {
+ year: true,
+ month: true,
+ day: true,
+ hour: false,
+ minute: false,
+ second: false
+ },
}
},
@@ -110,11 +177,59 @@
onShow() {
this.$refs.canvas1.init(this.initChart)
this.getIndexInfo()
+ this.getAccountInfo()
},
watch: {
},
+
methods: {
+ topages(num ){
+ if(this.AccountInfo.userId){
+ if(num==0){
+ uni.navigateTo({
+ url:'/page_Operator/deviceMgmt'
+ })
+ }else if(num==1){
+ uni.navigateTo({
+ url:'/page_Operator/CarModel'
+ })
+ }else if(num==2){
+ uni.navigateTo({
+ url:'/page_Operator/order'
+ })
+ }
+ }else{
+ uni.navigateTo({
+ url:'/pages/login/login'
+ })
+ }
+
+ },
+ callPhone(phone) {
+ uni.makePhoneCall({
+ phoneNumber: phone
+ })
+
+ },
+ getAccountInfo(){
+ this.$u.get(`appAdmin/myAccountInfo`).then((res) => {
+ if (res.code === 200) {
+ this.AccountInfo=res.data
+ if(this.AccountInfo.userType=='04'){
+ uni.redirectTo({
+ url:'/page_Delivery/orerList'
+ })
+ }
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ });
+ },
topage(num){
if(num==0){
uni.navigateTo({
@@ -129,11 +244,30 @@
url:'/page_Merchant/order'
})
}
+ },
+ confirm1(e) {
+ console.log(e, 'eeeeeeee');
+ this.firsTime = e.year + '-' + e.month + '-' + e.day
+ if (this.firsTime != '' && this.lasTime != '') {
+ this.getIndexInfo()
+ }
+
+ },
+ confirm2(e) {
+ this.lasTime = e.year + '-' + e.month + '-' + e.day
+ // this.pageNum=1
+ if (this.firsTime != '' && this.lasTime != '') {
+ this.getIndexInfo()
+ }
+
+
+
},
getIndexInfo(){
this.$u.get(`appAdmin/index`).then((res) => {
if (res.code === 200) {
this.info=res.data
+
} else {
uni.showToast({
title: res.msg,
@@ -326,6 +460,42 @@
.page {
width: 100%;
padding-bottom: 200rpx;
+ .info_cont{
+ display: flex;
+ flex-wrap: nowrap;
+ align-items: center;
+ justify-content: space-around;
+ margin: 0 auto;
+ margin-top: 18rpx;
+ width: 680rpx;
+ // height: 172rpx;
+ padding: 40rpx 0rpx;
+ background: #FFFFFF;
+ box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42,130,228,0.1);
+ border-radius: 24rpx 24rpx 24rpx 24rpx;
+ .li{
+ width: 110rpx;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ .top{
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #3D3D3D;
+ }
+ .bot{
+ font-weight: 600;
+ font-size: 40rpx;
+ color: #3D3D3D;
+ }
+ }
+ .line{
+ width: 2rpx;
+ height: 74rpx;
+ background: #C7C7C7;
+ border-radius: 0rpx 0rpx 0rpx 0rpx;
+ }
+ }
.feature{
margin: 0 auto;
margin-top: 24rpx;
@@ -354,6 +524,69 @@
background: #FFFFFF;
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1);
border-radius: 24rpx 24rpx 24rpx 24rpx;
+ .top_box {
+
+ display: flex;
+ flex-wrap: nowrap;
+ align-items: center;
+ // padding: 28rpx 30rpx;
+ // padding: 20rpx 0;
+
+ margin: 0 auto;
+ // width: 672rpx;
+ height: 100rpx;
+ background: #FFFFFF;
+ // box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.07);
+ border-radius: 10rpx 10rpx 10rpx 10rpx;
+
+ .left_text {
+ display: flex;
+ flex-wrap: nowrap;
+ align-items: center;
+ width: 25%;
+ font-weight: 400;
+ font-size: 32rpx;
+ color: #3D3D3D;
+
+ .icon-xiangxia1 {
+ font-size: 26rpx;
+ }
+ }
+
+ .timebox {
+ width: 75%;
+ display: flex;
+ flex-wrap: nowrap;
+ align-items: center;
+ margin-left: 34rpx;
+
+ .left_time {
+ text-align: center;
+ margin-right: 6rpx;
+ height: 50rpx;
+ width: 45%;
+ border: 2rpx solid #ccc;
+ border-radius: 12rpx;
+ font-weight: 400;
+ font-size: 32rpx;
+ color: #979797;
+ }
+
+ .right_time {
+ text-align: center;
+ margin-left: 6rpx;
+ height: 50rpx;
+ width: 45%;
+ border: 2rpx solid #ccc;
+ border-radius: 12rpx;
+ font-weight: 400;
+ font-size: 32rpx;
+ color: #979797;
+ }
+ }
+ }
+
+
.info_boxs{
margin-top: 26rpx;
width: 636rpx;
diff --git a/pages/login/login.vue b/pages/login/login.vue
index db3dcea..62c886c 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -17,7 +17,7 @@
-->
-
+
@@ -641,15 +641,9 @@
async ceshi() {
this.$u.get("/getInfo").then((res) => {
console.log('进入跳转',res);
- if(res.user.isAuthentication){
- uni.navigateTo({
- url: '/pages/index/index'
- })
- }else{
- uni.navigateTo({
- url:"/page_user/idcard_test"
- })
- }
+ uni.navigateTo({
+ url: '/pages/index/index'
+ })
});
},