Browse Source

对接接口

master
前端-胡立永 6 months ago
parent
commit
9340e269fc
2 changed files with 35 additions and 7 deletions
  1. +24
    -7
      config.js
  2. +11
    -0
      pages/index/index.vue

+ 24
- 7
config.js View File

@ -14,8 +14,11 @@ const config = {
dev: { dev: {
baseUrl: 'http://dev.java996.icu/clockin-api', baseUrl: 'http://dev.java996.icu/clockin-api',
}, },
prod: {
test: {
baseUrl: 'https://clockin.java996.icu/clockin-api', baseUrl: 'https://clockin.java996.icu/clockin-api',
},
prod: {
baseUrl: 'https://admin.ptchemicalscc.com/clockin-api',
} }
} }
@ -24,19 +27,33 @@ const config = {
const defaultConfig = { const defaultConfig = {
mapKey: 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU', mapKey: 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
aliOss: { aliOss: {
url: 'https://image.hhlm1688.com/',
url: 'https://image.ptchemicalscc.com/',
config: { config: {
//桶的地址 //桶的地址
region: 'oss-cn-guangzhou',
region: 'oss-cn-beijing',
//id //id
accessKeyId: 'LTAI5tQSs47izVy8DLVdwUU9',
accessKeyId: 'LTAI5tA1mo2mRHVwKLLE2V7Y',
//密钥 //密钥
accessKeySecret: 'qHI7C3PaXYZySr84HTToviC71AYlFq',
accessKeySecret: 'PBs2Dx3mTuVSH7ReWkiZGW3Vc9i22I',
//桶的名字 //桶的名字
bucket: 'hanhaiimage',
endpoint: 'oss-cn-shenzhen.aliyuncs.com',
bucket: 'ptchemicalscc',
endpoint: 'oss-cn-beijing.aliyuncs.com',
} }
}, },
// aliOss: {
// url: 'https://image.hhlm1688.com/',
// config: {
// //桶的地址
// region: 'oss-cn-guangzhou',
// //id
// accessKeyId: 'LTAI5tQSs47izVy8DLVdwUU9',
// //密钥
// accessKeySecret: 'qHI7C3PaXYZySr84HTToviC71AYlFq',
// //桶的名字
// bucket: 'hanhaiimage',
// endpoint: 'oss-cn-shenzhen.aliyuncs.com',
// }
// },
} }


+ 11
- 0
pages/index/index.vue View File

@ -49,6 +49,9 @@
</div> </div>
</div> </div>
<!-- <image
@click="upload"
:src="image" mode=""></image> -->
<!-- tab栏 --> <!-- tab栏 -->
<tabbar :select="0"></tabbar> <tabbar :select="0"></tabbar>
@ -75,6 +78,7 @@
covers: [], covers: [],
inter : null, inter : null,
date : this.$dayjs(), date : this.$dayjs(),
image : '',
} }
}, },
computed : { computed : {
@ -100,6 +104,13 @@
url: "/pages/subPack/record/record" url: "/pages/subPack/record/record"
}) })
}, },
upload(){
this.$Oss.ossUploadImage({
success : url => {
this.image = url
}
})
},
// //
openBroadside() { openBroadside() {


Loading…
Cancel
Save