Browse Source

对接登录

master
前端-胡立永 3 months ago
parent
commit
fb34ed582f
4 changed files with 40 additions and 11 deletions
  1. +6
    -3
      components/user/visualization.vue
  2. +17
    -0
      config.js
  3. +4
    -0
      manifest.json
  4. +13
    -8
      utils/oss-upload/oss/index.js

+ 6
- 3
components/user/visualization.vue View File

@ -120,9 +120,12 @@
let data = res.result
data.length = 4
this.dates = data[0].map(n => this.$dayjs(n.priceDate)
.format('MM-DD'))
for(let i = 0;i < data.length;i++){
this.dates.push(data[i].map(n => this.$dayjs(n.priceDate)
.format('MM-DD')))
}
this.series.forEach((s, i) => {
if(data[i]){
@ -183,7 +186,7 @@
},
xAxis: {
type: 'category',
data: this.dates,
data: this.dates[this.index],
axisLine: {
lineStyle: {
color: '#fff'


+ 17
- 0
config.js View File

@ -24,6 +24,7 @@ const config = {
// 默认配置
const defaultConfig = {
mapKey : 'JYTBZ-DOY3Q-UCM5O-4FWQR-LCI7S-ZIBD3',
aliOss: {
url: 'https://image.hhlm1688.com/',
config: {
@ -40,6 +41,22 @@ const defaultConfig = {
},
// aliOss : {
// url : 'https://tennis-oss.xzaiyp.top/',
// config : {
// //桶的地址
// region: 'oss-cn-guangzhou',
// //id
// accessKeyId:'LTAI5tNycA46YTwm383dRvMV',
// //密钥
// accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG',
// //桶的名字
// bucket: 'zhuoqiu-image',
// endpoint:'oss-cn-guangzhou.aliyuncs.com',
// }
// },
// aliOss : {
// url : 'https://image.hhlm1688.com/',
// config : {


+ 4
- 0
manifest.json View File

@ -98,6 +98,10 @@
"/ws/location/v1/" : {
"target" : "https://apis.map.qq.com",
"changeOrigin" : true
},
"/oss" : {
"target" : "https://image.hhlm1688.com/",
"changeOrigin" : true
}
}
}


+ 13
- 8
utils/oss-upload/oss/index.js View File

@ -57,6 +57,7 @@ export function ossUpload(filePath, key = storeKey(), folder = storeFolder()) {
const filePrefixArr = filePath.split(".")
key += `.${filePrefixArr[filePrefixArr.length - 1]}`
let config = {
// url: '/oss',
url: OSSConfig.host,
name: 'file',
filePath,
@ -100,10 +101,12 @@ export function ossUploadImage({
count: 1,
sizeType,
success(res) {
// #ifdef H5
return uploadFileToOSS(res.tempFiles[0]).then(success).catch(fail)
// #endif
ossUpload(res.tempFilePaths[0], key, folder).then(success).catch(fail)
// // #ifdef H5
// return uploadFileToOSS(res.tempFiles[0]).then(success).catch(fail)
// // #endif
// ossUpload(res.tempFilePaths[0], key, folder).then(success).catch(fail)
uploadFileToOSS(res.tempFile).then(success).catch(fail)
},
fail
})
@ -130,10 +133,12 @@ export function ossUploadVideo({
maxDuration,
camera,
success(res) {
// #ifdef H5
return uploadFileToOSS(res.tempFile).then(success).catch(fail)
// #endif
ossUpload(res.tempFilePath, key, folder).then(success).catch(fail)
// // #ifdef H5
// return uploadFileToOSS(res.tempFile).then(success).catch(fail)
// // #endif
// ossUpload(res.tempFilePath, key, folder).then(success).catch(fail)
uploadFileToOSS(res.tempFile).then(success).catch(fail)
},
fail
})


Loading…
Cancel
Save