Commit 8f2d6e84 authored by 黄奎's avatar 黄奎

页面修改

parent 39eaf48d
...@@ -39,16 +39,9 @@ module.exports = function () { ...@@ -39,16 +39,9 @@ module.exports = function () {
} }
if (warnings.length) { if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (let i = 0; i < warnings.length; i++) { for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i] const warning = warnings[i]
console.log(' ' + warning)
} }
console.log()
process.exit(1) process.exit(1)
} }
} }
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
}, },
"dependencies": { "dependencies": {
"axios": "^0.19.2", "axios": "^0.19.2",
"cos-js-sdk-v5": "^0.5.26",
"element-ui": "^2.13.1", "element-ui": "^2.13.1",
"js-md5": "^0.7.3", "js-md5": "^0.7.3",
"vue": "^2.5.2", "vue": "^2.5.2",
......
...@@ -395,7 +395,7 @@ ...@@ -395,7 +395,7 @@
img:[], img:[],
}, },
//第几步 //第几步
StepIndex:1, StepIndex:2,
//协议 //协议
checkedDeal:false, checkedDeal:false,
agreeVisible:false, agreeVisible:false,
...@@ -436,6 +436,7 @@ ...@@ -436,6 +436,7 @@
}, },
methods: { methods: {
submitFormOne(addMsg){ submitFormOne(addMsg){
if(!this.checkedDeal){ if(!this.checkedDeal){
this.Error('请先阅读并同意《注册协议》'); this.Error('请先阅读并同意《注册协议》');
...@@ -466,12 +467,17 @@ ...@@ -466,12 +467,17 @@
}, },
//传正面 //传正面
UploadImage(){ UploadImage(file){
console.log(file);
var fileName=file.file.name;
this.UploadFileToTencent(fileName,file.file,res=>{
console.log("aaaaa");
})
}, },
//传反面 //传反面
UploadImage2(){ UploadImage2(file){
}, },
//传营业执照 //传营业执照
UploadImage3(){ UploadImage3(){
......
...@@ -113,6 +113,37 @@ export default { ...@@ -113,6 +113,37 @@ export default {
Vue.prototype.isOnline = function () { Vue.prototype.isOnline = function () {
return process.env.NODE_ENV !== 'development'; return process.env.NODE_ENV !== 'development';
}, },
//上传文件到云存储
Vue.prototype.UploadFileToTencent=function(fileName,fileObj,callback)
{
var uploadMsg={
Bucket:"viitto-1301420277",
Region:"ap-chengdu",/* 存储桶所在地域,必须字段 */
SecretId:"AKIDDPnbIzi8C1eqEOPP8dw6MNAg9H9ldDKd",
SecretKey:"PdcLtOjslUzNFYdU4OSI1fKtdHpFT2Ob",
AppId:"1301420277"
};
var COS = require('cos-js-sdk-v5');
var cos = new COS({
SecretId: uploadMsg.SecretId,
SecretKey: uploadMsg.SecretKey,
});
cos.putObject({
Bucket: uploadMsg.Bucket, /* 必须 */
Region: uploadMsg.Region, /* 存储桶所在地域,必须字段 */
Key: fileName, /* 必须 */
StorageClass: 'STANDARD',
Body: fileObj, // 上传文件对象
onProgress: function(progressData) {
console.log(JSON.stringify(progressData));
}
}, function(err, data) {
console.log(err || data);
});
},
//HTTP提交数据 //HTTP提交数据
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall, isOnline) { Vue.prototype.apipost = function (cmd, msg, successCall, faildCall, isOnline) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment