@@ -5,11 +5,13 @@ | |||||
# 开发 | # 开发 | ||||
NODE_ENV=development | NODE_ENV=development | ||||
VUE_APP_ENV=development | VUE_APP_ENV=development | ||||
# VUE_APP_API_ROOT=https://smapitest.malls.iformall.com/C | |||||
VUE_APP_API_ROOT=https://mtest.metavatar.cc/C | VUE_APP_API_ROOT=https://mtest.metavatar.cc/C | ||||
# VUE_APP_API_ROOT=https://smapitest.malls.iformall.com/C 已废弃 | |||||
# 正式 | # 正式 | ||||
# NODE_ENV=production | # NODE_ENV=production | ||||
# VUE_APP_ENV=production | # VUE_APP_ENV=production | ||||
# VUE_APP_API_ROOT=http://m.metavatar.cc/C | # VUE_APP_API_ROOT=http://m.metavatar.cc/C | ||||
# VUE_APP_API_ROOT=https://smapitest.malls.iformall.com/C |
@@ -5,7 +5,6 @@ | |||||
"scripts": { | "scripts": { | ||||
"dev": "vue-cli-service serve", | "dev": "vue-cli-service serve", | ||||
"build": "vue-cli-service build" | "build": "vue-cli-service build" | ||||
}, | }, | ||||
"dependencies": { | "dependencies": { | ||||
"axios": "0.18.1", | "axios": "0.18.1", | ||||
@@ -37,4 +36,4 @@ | |||||
"uglifyjs-webpack-plugin": "^2.2.0", | "uglifyjs-webpack-plugin": "^2.2.0", | ||||
"vue-template-compiler": "^2.6.11" | "vue-template-compiler": "^2.6.11" | ||||
} | } | ||||
} | |||||
} |
@@ -151,7 +151,9 @@ export default { | |||||
onClickRight() { | onClickRight() { | ||||
let that = this; | let that = this; | ||||
this.loadingShow = true; | this.loadingShow = true; | ||||
console.log(this.$refs.cropper); | |||||
this.$refs.cropper.getCropBlob(async data => { | this.$refs.cropper.getCropBlob(async data => { | ||||
console.log(data, '图片数据'); | |||||
let formData = new FormData(); | let formData = new FormData(); | ||||
formData.append('file', data); | formData.append('file', data); | ||||
let file = formData.get('file'); | let file = formData.get('file'); | ||||
@@ -248,7 +250,8 @@ export default { | |||||
} | } | ||||
return bytes; | return bytes; | ||||
} | } | ||||
} | |||||
}, | |||||
mounted() {} | |||||
}; | }; | ||||
</script> | </script> | ||||
@@ -415,13 +415,24 @@ export default { | |||||
methods: { | methods: { | ||||
...mapActions(['setCharacters']), | ...mapActions(['setCharacters']), | ||||
// aaa() { | |||||
// console.log('aaa') | |||||
// this.$nextTick(() => { | |||||
// // document.getDetailById | |||||
// // this.$refs.CutImgBg.$refs.uploader.clickUpload() | |||||
// this.$refs.CutImgBg.$refs.uploader.beforeRead() | |||||
// 离开页面前 | |||||
// beforeUnloadHandler(event) { | |||||
// let that = this; | |||||
// event.preventDefault(); | |||||
// event.returnValue = ''; | |||||
// Dialog.confirm({ | |||||
// message: '弹窗内容' | |||||
// }) | // }) | ||||
// .then(async () => { | |||||
// await that.submit(2); // 保存草稿 | |||||
// console.log('保存了'); | |||||
// }) | |||||
// .catch(err => { | |||||
// console.log(err); | |||||
// }); | |||||
// console.log('11111'); | |||||
// window.removeEventListener('beforeunload', this.beforeUnloadHandler); | |||||
// }, | // }, | ||||
// 禁止滚动 | // 禁止滚动 | ||||
noScroll(e) { | noScroll(e) { | ||||
@@ -976,6 +987,7 @@ export default { | |||||
this.proportion = 1920 / elementWidth; | this.proportion = 1920 / elementWidth; | ||||
console.log(this.proportion); | console.log(this.proportion); | ||||
} | } | ||||
// window.addEventListener('beforeunload', this.beforeUnloadHandler); | |||||
}, | }, | ||||
async beforeDestroy() { | async beforeDestroy() { | ||||
this.timeOuter = null; // 清除定时器 | this.timeOuter = null; // 清除定时器 | ||||
@@ -359,8 +359,6 @@ export default { | |||||
}, | }, | ||||
mounted() { | mounted() { | ||||
console.log(process.env.NODE_ENV); | |||||
console.log(process.env.VUE_APP_ENV); | |||||
this.inPage = true; | this.inPage = true; | ||||
scrollToID('top'); | scrollToID('top'); | ||||
}, | }, | ||||