bug
This commit is contained in:
parent
a96bb9cd86
commit
17c34c7ebf
@ -1,11 +1,11 @@
|
|||||||
// 请求地址
|
// 请求地址
|
||||||
// export const URL_BASE = 'http://192.168.3.106:9090/server'
|
// export const URL_BASE = 'http://192.168.3.106:9090/server'
|
||||||
//export const URL_BASE = 'http://192.168.3.131:9090/server'
|
//export const URL_BASE = 'http://192.168.3.131:9090/server'
|
||||||
// export const URL_BASE = 'http://192.168.3.196:9090/server'
|
export const URL_BASE = 'http://192.168.3.196:9090/server'
|
||||||
// export const URL_KAOSHI = 'http://192.168.3.196:8090/practice_api'
|
export const URL_KAOSHI = 'http://192.168.3.196:8090/practice_api'
|
||||||
// 生产
|
// 生产
|
||||||
export const URL_BASE = 'http://1.30.216.250:19090/server'
|
// export const URL_BASE = 'https://1.30.216.250:1443/server'
|
||||||
export const URL_KAOSHI = 'http://1.30.216.250:19091/practice_api'
|
// export const URL_KAOSHI = 'http://1.30.216.250:19091/practice_api'
|
||||||
// 测试
|
// 测试
|
||||||
// export const URL_BASE = 'http://117.15.170.44:29279/server'
|
// export const URL_BASE = 'http://117.15.170.44:29279/server'
|
||||||
// export const URL_KAOSHI = 'http://117.15.170.44:29285/practice_api'
|
// export const URL_KAOSHI = 'http://117.15.170.44:29285/practice_api'
|
||||||
|
|||||||
@ -61,6 +61,7 @@ export default {
|
|||||||
options.header = headerObj;
|
options.header = headerObj;
|
||||||
options.method = options.method || 'GET';
|
options.method = options.method || 'GET';
|
||||||
options.timeout = 10000;
|
options.timeout = 10000;
|
||||||
|
options.sslVerify = false;
|
||||||
resolve(options);
|
resolve(options);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@ -64,7 +64,8 @@
|
|||||||
password: '',
|
password: '',
|
||||||
passwordBox: false,
|
passwordBox: false,
|
||||||
imageVerifyCode:'',
|
imageVerifyCode:'',
|
||||||
messageVerifyCode:""
|
messageVerifyCode:"",
|
||||||
|
type:"app"
|
||||||
});
|
});
|
||||||
const tiaozhuan = ref('1');
|
const tiaozhuan = ref('1');
|
||||||
const examType = ref('examinee');
|
const examType = ref('examinee');
|
||||||
@ -104,6 +105,7 @@
|
|||||||
url: `${URL_BASE}/code/getOneDataApp`,
|
url: `${URL_BASE}/code/getOneDataApp`,
|
||||||
data: {},
|
data: {},
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
sslVerify:false,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res) {
|
if (res) {
|
||||||
@ -145,6 +147,7 @@
|
|||||||
url: `${URL_BASE}/lianlu/createCaptcha`,
|
url: `${URL_BASE}/lianlu/createCaptcha`,
|
||||||
data: {},
|
data: {},
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
sslVerify:false,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
imageVerifyCode.value = "data:image/png;base64,"+res.data.data.imageBase64;
|
imageVerifyCode.value = "data:image/png;base64,"+res.data.data.imageBase64;
|
||||||
@ -184,6 +187,7 @@
|
|||||||
url: `${URL_BASE}/lianlu/sendVerificationApp`,
|
url: `${URL_BASE}/lianlu/sendVerificationApp`,
|
||||||
data: {phone:loginData.telephone,type:(tiaozhuan.value==='1'?0:1),captcha:loginData.imageVerifyCode,oldCaptcha:captcha.value},
|
data: {phone:loginData.telephone,type:(tiaozhuan.value==='1'?0:1),captcha:loginData.imageVerifyCode,oldCaptcha:captcha.value},
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
sslVerify:false,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if(res.data.code==="0"){
|
if(res.data.code==="0"){
|
||||||
messageCode.value = res.data.data+"";
|
messageCode.value = res.data.data+"";
|
||||||
@ -260,6 +264,7 @@
|
|||||||
url: `${URL_BASE}/basic_functions/login_and_index/login`,
|
url: `${URL_BASE}/basic_functions/login_and_index/login`,
|
||||||
data: toRaw(loginData),
|
data: toRaw(loginData),
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
sslVerify:false,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.data.code === "200" && res.data.data.code === "1") {
|
if (res.data.code === "200" && res.data.data.code === "1") {
|
||||||
@ -317,6 +322,7 @@
|
|||||||
url: `${URL_KAOSHI}/loginApp`,
|
url: `${URL_KAOSHI}/loginApp`,
|
||||||
data: {username:lgData.telephone,password:lgData.password,loginType:examType.value},
|
data: {username:lgData.telephone,password:lgData.password,loginType:examType.value},
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
sslVerify:false,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
if (res.statusCode === 200 && res.data.code === 0 && res.data.flag) {
|
if (res.statusCode === 200 && res.data.code === 0 && res.data.flag) {
|
||||||
|
|||||||
@ -60,6 +60,7 @@
|
|||||||
url: `${URL_BASE}//basic_functions/user/pwdForPhone`,
|
url: `${URL_BASE}//basic_functions/user/pwdForPhone`,
|
||||||
data: toRaw(upData),
|
data: toRaw(upData),
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
sslVerify:false,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.data.code === "200") {
|
if (res.data.code === "200") {
|
||||||
if (res.data.data.code === "0") {
|
if (res.data.data.code === "0") {
|
||||||
|
|||||||
@ -77,6 +77,7 @@
|
|||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
},
|
},
|
||||||
fail: function(err) {
|
fail: function(err) {
|
||||||
|
console.log(err);
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
let title = '数据中心',
|
let title = '数据中心',
|
||||||
content = '请打开系统定位开关'
|
content = '请打开系统定位开关'
|
||||||
@ -119,6 +120,7 @@
|
|||||||
data: { id: clear.erWeiMa.data },
|
data: { id: clear.erWeiMa.data },
|
||||||
header:{'token':token},
|
header:{'token':token},
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
sslVerify:false,
|
||||||
success: (data) => {
|
success: (data) => {
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
if(data.data.code=='200'){
|
if(data.data.code=='200'){
|
||||||
|
|||||||
@ -97,6 +97,7 @@
|
|||||||
data: { id: clear.erWeiMa.data },
|
data: { id: clear.erWeiMa.data },
|
||||||
header:{'token':token},
|
header:{'token':token},
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
sslVerify:false,
|
||||||
success: (data) => {
|
success: (data) => {
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
if(data.data.code=='200'){
|
if(data.data.code=='200'){
|
||||||
|
|||||||
@ -102,6 +102,7 @@
|
|||||||
data: { id: clear.erWeiMa.data },
|
data: { id: clear.erWeiMa.data },
|
||||||
header:{'token':token},
|
header:{'token':token},
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
sslVerify:false,
|
||||||
success: (data) => {
|
success: (data) => {
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
if(data.data.code=='200'){
|
if(data.data.code=='200'){
|
||||||
|
|||||||
@ -79,6 +79,7 @@
|
|||||||
url: `${URL_BASE}/code/getOneDataApp`,
|
url: `${URL_BASE}/code/getOneDataApp`,
|
||||||
data: {},
|
data: {},
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
sslVerify:false,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
if (res) {
|
if (res) {
|
||||||
|
|||||||
@ -50,7 +50,8 @@
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
const data = await HTTP.get('/station/getTodayStation')
|
const data = await HTTP.get('/station/getTodayStation')
|
||||||
if (!data.id) {
|
console.log(data);
|
||||||
|
if (!data || !data.id) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
formData.id = data.id
|
formData.id = data.id
|
||||||
@ -66,7 +67,7 @@
|
|||||||
for (let str of picUrl) {
|
for (let str of picUrl) {
|
||||||
imgSZ.push({
|
imgSZ.push({
|
||||||
url: `${URL_BASE}/imgFile/stationPic/${str}`,
|
url: `${URL_BASE}/imgFile/stationPic/${str}`,
|
||||||
name: str.split('_')[1],
|
name: str,
|
||||||
extname: str.split('.')[1]
|
extname: str.split('.')[1]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -74,7 +75,7 @@
|
|||||||
// 控制视频回显
|
// 控制视频回显
|
||||||
formData.videoValue = {
|
formData.videoValue = {
|
||||||
url: `${URL_BASE}/imgFile/stationFile/${data.videoUrl}`,
|
url: `${URL_BASE}/imgFile/stationFile/${data.videoUrl}`,
|
||||||
name: data.videoUrl.split('_')[1],
|
name: data.videoUrl,
|
||||||
extname: data.videoUrl.split('.')[1]
|
extname: data.videoUrl.split('.')[1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -85,20 +86,25 @@
|
|||||||
const selectImg = (e) => {
|
const selectImg = (e) => {
|
||||||
uni.showLoading({ title: '上传图片中' })
|
uni.showLoading({ title: '上传图片中' })
|
||||||
let files = []
|
let files = []
|
||||||
for (const obj of e.tempFilePaths) {
|
// console.log(e);
|
||||||
files.push({ uri: obj })
|
console.log(e.tempFiles);
|
||||||
|
let i=1;
|
||||||
|
for (const obj of e.tempFiles) {
|
||||||
|
files.push({ uri: obj.url,name:`file${i}`,file:obj.file });
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url: `${URL_BASE}/station/fileUpload`,
|
url: `${URL_BASE}/station/fileUpload`,
|
||||||
header: { token },
|
header: { token },
|
||||||
files,
|
files:files,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
// console.log(res);
|
||||||
const data = JSON.parse(res.data)
|
const data = JSON.parse(res.data)
|
||||||
if (data.code === '200') {
|
if (data.code === '200') {
|
||||||
for (let file of data.data) {
|
for (let file of data.data) {
|
||||||
formData.imageValue.push({
|
formData.imageValue.push({
|
||||||
url: `${URL_BASE}/imgFile/stationPic/${file}`,
|
url: `${URL_BASE}/imgFile/stationPic/${file}`,
|
||||||
name: file.split('_')[1],
|
name: file,
|
||||||
extname: file.split('.')[1]
|
extname: file.split('.')[1]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -125,13 +131,16 @@
|
|||||||
filePath: e.tempFilePaths[0],
|
filePath: e.tempFilePaths[0],
|
||||||
name: 'file',
|
name: 'file',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
const data = JSON.parse(res.data)
|
// console.log(res);
|
||||||
|
const data = JSON.parse(res.data);
|
||||||
if (data.code === '200') {
|
if (data.code === '200') {
|
||||||
|
console.log(data.data);
|
||||||
formData.videoValue = {
|
formData.videoValue = {
|
||||||
url: `${URL_BASE}/imgFile/stationPic/${data.data}`,
|
url: `${URL_BASE}/imgFile/stationPic/${data.data}`,
|
||||||
name: data.data.split('_')[1],
|
name: data.data,
|
||||||
extname: data.data.split('.')[1]
|
extname: data.data.split('.')[1]
|
||||||
}
|
}
|
||||||
|
console.log(formData.videoValue);
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({ title: '上传失败请重试', duration: 2000, icon: 'error' })
|
uni.showToast({ title: '上传失败请重试', duration: 2000, icon: 'error' })
|
||||||
}
|
}
|
||||||
@ -166,7 +175,13 @@
|
|||||||
uni.showToast({ title: '请选视频', icon: 'error', duration: 1000 })
|
uni.showToast({ title: '请选视频', icon: 'error', duration: 1000 })
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
// console.log(formData.imageValue);
|
||||||
|
// console.log(formData.videoValue);
|
||||||
const videoUrl = formData.videoValue.url.substring(formData.videoValue.url.lastIndexOf('/') + 1)
|
const videoUrl = formData.videoValue.url.substring(formData.videoValue.url.lastIndexOf('/') + 1)
|
||||||
|
// console.log("planId:"+planId);
|
||||||
|
// console.log("videoUrl:"+videoUrl);
|
||||||
|
// console.log("picUrl:"+picUrl);
|
||||||
|
// console.log("id:"+formData.id);
|
||||||
await HTTP.post('/station/addOrUpdateStation', { planId, videoUrl, picUrl, id: formData.id })
|
await HTTP.post('/station/addOrUpdateStation', { planId, videoUrl, picUrl, id: formData.id })
|
||||||
uni.showToast({ title: '站班会提交成功', duration: 1000 })
|
uni.showToast({ title: '站班会提交成功', duration: 1000 })
|
||||||
setTimeout(() => uni.switchTab({ url: '/pages/tabBar/gongzuotai' }) , 1000);
|
setTimeout(() => uni.switchTab({ url: '/pages/tabBar/gongzuotai' }) , 1000);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user