1

parent 3d6a7f90
...@@ -4,11 +4,11 @@ const prodEnv = require('./prod.env'); ...@@ -4,11 +4,11 @@ const prodEnv = require('./prod.env');
module.exports = merge(prodEnv, { module.exports = merge(prodEnv, {
NODE_ENV: '"development"', NODE_ENV: '"development"',
API_URL: '"http://localhost:8085/"', API_URL: '"http://10.1.23.97:8085/"',
// API_URL: '"https://wechat-test.changchangenglish.com/"', // API_URL: '"https://wechat-test.changchangenglish.com/"',
MAX_FILESIZE:'1024*1024*10', MAX_FILESIZE:'1024*1024*10',
IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"', IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"',
BUY_URL:'"https://wechat-test.changchangenglish.com/#/buyDetail?"', BUY_URL:'"https://wechat-test.changchangenglish.com/#/buyDetail?"',
AUTHOR_UEL:'"https://wechat-test.changchangenglish.com/api/client/login?redirect_url=http://localhost:8085/"', AUTHOR_UEL:'"https://wechat-test.changchangenglish.com/api/client/login?redirect_url=http://10.1.23.97:8085"',
REDIRECT_URL:'"http://localhost:8085/"', REDIRECT_URL:'"http://10.1.23.97:8085/"',
}); });
...@@ -19,8 +19,8 @@ module.exports = { ...@@ -19,8 +19,8 @@ module.exports = {
}, },
// Various Dev Server settings // Various Dev Server settings
// host: '192.168.31.242', // can be overwritten by process.env.HOST // host: '192.168.31.242', // can be overwritten by process.env.HOST
// host: '10.1.23.97', // can be overwritten by process.env.HOST host: '10.1.23.97', // can be overwritten by process.env.HOST
host: 'localhost', // can be overwritten by process.env.HOST // host: 'localhost', // can be overwritten by process.env.HOST
port: 8085, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined port: 8085, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false, autoOpenBrowser: false,
errorOverlay: true, errorOverlay: true,
......
...@@ -96,8 +96,8 @@ ...@@ -96,8 +96,8 @@
}); });
}, },
shareImg(icon){ shareImg(icon){
console.log(icon)
let URL = process.env.API_URL+'#/shareGoods?userID='+ this.userDetail.user_id; let URL = process.env.API_URL+'#/shareGoods?userID='+ this.userDetail.user_id;
console.log(icon)
this.onShare(URL,icon); this.onShare(URL,icon);
}, },
initPage(){ initPage(){
......
<template> <template>
<div v-show="divShow" style="z-index: -1;position: absolute"> <div v-show="divShow" style="z-index: -1;position: absolute">
<div class="share-time-block" :style="{backgroundImage:`url('${imgUrl.bg}')`}" id="capture33"> <div :class="{shareTimeBlock2:imgList.length<3,shareTimeBlock3:imgList.length==3}" :style="{backgroundImage:`url('${imgUrl.bg}')`}" id="capture33">
<img v-for="i in imgList" :src="imgUrl[i]"> <img v-for="i in imgList" :src="imgUrl[i]">
</div> </div>
</div> </div>
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
}, },
methods:{ methods:{
initPage(){ initPage(){
debugger
let str = this.day.toString(); let str = this.day.toString();
for(let i=0;i<str.length;i++){ for(let i=0;i<str.length;i++){
this.imgList.push(str[i]) this.imgList.push(str[i])
...@@ -42,8 +41,10 @@ ...@@ -42,8 +41,10 @@
}).then((canvas) => { }).then((canvas) => {
this.divShow = false; this.divShow = false;
let dataURL = canvas.toDataURL("image/jpg"); let dataURL = canvas.toDataURL("image/jpg");
// console.log(dataURL)
this.dataURL = dataURL; this.dataURL = dataURL;
this.$fetch('/api/public/qiniu/token',{file_name: `Day${this.day}.jpg`,is_rand : 0}).then(res=>{ this.$fetch('/api/public/qiniu/token',{file_name: `Day${this.day}.jpg`,is_rand : 0}).then(res=>{
debugger
var pic = dataURL.replace('data:image/png;base64,',''); var pic = dataURL.replace('data:image/png;base64,','');
var url = "https://upload.qiniup.com/putb64/-1/key/"+ window.btoa(res.new_name); //非华东空间需要根据注意事项 1 修改上传域名 var url = "https://upload.qiniup.com/putb64/-1/key/"+ window.btoa(res.new_name); //非华东空间需要根据注意事项 1 修改上传域名
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
...@@ -73,17 +74,28 @@ ...@@ -73,17 +74,28 @@
<style scoped lang="less"> <style scoped lang="less">
@import "../util/public"; @import "../util/public";
.share-time-block{ .shareTimeBlock2{
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
width: 200*@toVw; width: 200*@toVw;
height: 200*@toVw; height: 200*@toVw;
text-align: center; text-align: center;
line-height: 200*@toVw; line-height: 200*@toVw;
font-size: 12px;
img{ img{
width:90*@toVw; width:90*@toVw;
vertical-align: middle; vertical-align: middle;
} }
} }
.shareTimeBlock3{
background-repeat: no-repeat;
background-size: 100% 100%;
width: 200*@toVw;
height: 200*@toVw;
text-align: center;
line-height: 200*@toVw;
img{
width:60*@toVw;
vertical-align: middle;
}
}
</style> </style>
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