Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
h5-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
new-sing
h5-base
Commits
53c6e662
Commit
53c6e662
authored
Mar 13, 2019
by
chenyishuai@singsingenglish.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
3d6a7f90
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
10 deletions
+22
-10
dev.env.js
config/dev.env.js
+3
-3
index.js
config/index.js
+2
-2
share.vue
src/components/newLesson/share.vue
+1
-1
shareTime.vue
src/components/shareTime.vue
+16
-4
No files found.
config/dev.env.js
View file @
53c6e662
...
...
@@ -4,11 +4,11 @@ const prodEnv = require('./prod.env');
module
.
exports
=
merge
(
prodEnv
,
{
NODE_ENV
:
'"development"'
,
API_URL
:
'"http://
localhost
:8085/"'
,
API_URL
:
'"http://
10.1.23.97
:8085/"'
,
// API_URL: '"https://wechat-test.changchangenglish.com/"',
MAX_FILESIZE
:
'1024*1024*10'
,
IMAGE_URL_HEAD
:
'"http://cdn.singsingenglish.com/"'
,
BUY_URL
:
'"https://wechat-test.changchangenglish.com/#/buyDetail?"'
,
AUTHOR_UEL
:
'"https://wechat-test.changchangenglish.com/api/client/login?redirect_url=http://
localhost:8085/
"'
,
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://
10.1.23.97
:8085/"'
,
});
config/index.js
View file @
53c6e662
...
...
@@ -19,8 +19,8 @@ module.exports = {
},
// Various Dev Server settings
// 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
:
'localhost'
,
// 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
port
:
8085
,
// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser
:
false
,
errorOverlay
:
true
,
...
...
src/components/newLesson/share.vue
View file @
53c6e662
...
...
@@ -96,8 +96,8 @@
});
},
shareImg
(
icon
){
console
.
log
(
icon
)
let
URL
=
process
.
env
.
API_URL
+
'#/shareGoods?userID='
+
this
.
userDetail
.
user_id
;
console
.
log
(
icon
)
this
.
onShare
(
URL
,
icon
);
},
initPage
(){
...
...
src/components/shareTime.vue
View file @
53c6e662
<
template
>
<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]"
>
</div>
</div>
...
...
@@ -26,7 +26,6 @@
},
methods
:{
initPage
(){
debugger
let
str
=
this
.
day
.
toString
();
for
(
let
i
=
0
;
i
<
str
.
length
;
i
++
){
this
.
imgList
.
push
(
str
[
i
])
...
...
@@ -42,8 +41,10 @@
}).
then
((
canvas
)
=>
{
this
.
divShow
=
false
;
let
dataURL
=
canvas
.
toDataURL
(
"image/jpg"
);
// console.log(dataURL)
this
.
dataURL
=
dataURL
;
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
url
=
"https://upload.qiniup.com/putb64/-1/key/"
+
window
.
btoa
(
res
.
new_name
);
//非华东空间需要根据注意事项 1 修改上传域名
var
xhr
=
new
XMLHttpRequest
();
...
...
@@ -73,17 +74,28 @@
<
style
scoped
lang=
"less"
>
@import "../util/public";
.share
-time-block
{
.share
TimeBlock2
{
background-repeat: no-repeat;
background-size: 100% 100%;
width: 200*@toVw;
height: 200*@toVw;
text-align: center;
line-height: 200*@toVw;
font-size: 12px;
img{
width:90*@toVw;
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
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment