From 52dd0c9306f12af3f6a2eb3d5b42537dcfa923ad Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 23 Jun 2021 09:27:57 +0800
Subject: [PATCH] 我要报图片,视频上传优化
---
pages/alarm_list/alarm_list.vue | 9 ++++-----
pages/loging/loging.vue | 4 ++--
pages/reported/reported.vue | 6 ++++--
store/state.js | 3 ++-
4 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/pages/alarm_list/alarm_list.vue b/pages/alarm_list/alarm_list.vue
index 40ac425..eda608b 100644
--- a/pages/alarm_list/alarm_list.vue
+++ b/pages/alarm_list/alarm_list.vue
@@ -42,8 +42,8 @@
export default{
data(){
return{
- // pathUrl:"http://localhost:89",
- pathUrl:"http://s16s652780.51mypc.cn/api/blade-jfpts",
+ pathUrl:"http://localhost:82",
+ // pathUrl:"http://s16s652780.51mypc.cn/api/blade-jfpts",
totalColor:"#51A2FE",
loadColor:"#000000",
loadBeforeColor:"#000000",
@@ -116,7 +116,7 @@
if(this.$store.state.puserID){
//获取全部的数据
uni.request({
- url:this.pathUrl + "/alarm/alarm/APP-getAlarmListPage",
+ url:this.$store.state.piAPI + "alarm/alarm/APP-getAlarmListPage",
method:"GET",
data:{
securityId:this.$store.state.puserID,
@@ -175,7 +175,7 @@
},
//接收任务
receives() {
- var url = this.$store.state.piAPI + "blade-jfpts/alarm/alarm/APP-setAlarm",
+ var url = this.$store.state.piAPI + "alarm/alarm/APP-setAlarm",
Pid = this.itemData.id,
id = this.$store.state.puserID, //警察id
name = this.$store.state.puserName, //警察id
@@ -185,7 +185,6 @@
alarmPeople: name
},
that = this;
- console.log(data);
uni.request({
url: url,
data: data,
diff --git a/pages/loging/loging.vue b/pages/loging/loging.vue
index 137b7e8..f543777 100644
--- a/pages/loging/loging.vue
+++ b/pages/loging/loging.vue
@@ -58,7 +58,7 @@
}
this.$store.commit('getUse', data)
wx.reLaunch({
- url: '/pages/workbench/workbench?login=' + data.userName
+ url: '/pages/alarm_list/alarm_list?login=' + data.userName
})
}
},
@@ -101,7 +101,7 @@
this.passwords = '******';
uni.hideNavigationBarLoading();
uni.reLaunch({
- url: '../workbench/workbench'
+ url: '../alarm_list/alarm_list'
})
return '成功登入'
} else {
diff --git a/pages/reported/reported.vue b/pages/reported/reported.vue
index a36fefa..6611bd0 100644
--- a/pages/reported/reported.vue
+++ b/pages/reported/reported.vue
@@ -49,7 +49,7 @@
imgs: [],
videos: [],
// pathUrl:'http://s16s652780.51mypc.cn/api/blade-jfpts',
- pathUrl:'http://localhost:89',
+ pathUrl:'http://localhost:82',
}
},
methods: {
@@ -82,6 +82,7 @@
// console.log(i[k].src)
dataList.tpaddress += i[k].src + ','
}
+ dataList.tpaddress = dataList.tpaddress.substring(0,dataList.tpaddress.length-1);
}
if (this.videos.length > 0) {
var i = this.videos;
@@ -89,6 +90,7 @@
// console.log(i[k].src)
dataList.spaddress += i[k].src + ','
}
+ dataList.spaddress = dataList.spaddress.substring(0,dataList.spaddress.length-1);
}
// console.log(dataList)
uni.showLoading({
@@ -96,7 +98,7 @@
mask: true
})
uni.request({
- url: this.pathUrl + '/feedback/feedback/saves',
+ url: this.$store.state.piAPI + 'feedback/feedback/saves',
data: dataList,
method: 'POST',
header: {
diff --git a/store/state.js b/store/state.js
index 067fd27..0e18bad 100644
--- a/store/state.js
+++ b/store/state.js
@@ -4,7 +4,8 @@
useName: '过客 ',
},
logPath: '',
- piAPI: 'http://s16s652780.51mypc.cn/api/',
+ // piAPI: 'http://s16s652780.51mypc.cn/api/',
+ piAPI: 'http://localhost:82/',
puserName: '',
puserID: '',
puserIphone:'',
--
Gitblit v1.9.3