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
3d6a7f90
Commit
3d6a7f90
authored
Mar 13, 2019
by
chenyishuai@singsingenglish.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5a1b8956
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
366 additions
and
362 deletions
+366
-362
dev.env.js
config/dev.env.js
+2
-2
index.js
config/index.js
+1
-0
index.vue
src/components/index.vue
+316
-325
share.vue
src/components/newLesson/share.vue
+1
-1
shareTime.vue
src/components/shareTime.vue
+2
-0
common.js
src/util/common.js
+44
-34
No files found.
config/dev.env.js
View file @
3d6a7f90
...
...
@@ -8,7 +8,7 @@ module.exports = merge(prodEnv, {
// API_URL: '"https://wechat-test.changchangenglish.com/"',
MAX_FILESIZE
:
'1024*1024*10'
,
IMAGE_URL_HEAD
:
'"http://cdn.singsingenglish.com/"'
,
BUY_URL
:
'"http://wechat-test.changchangenglish.com/#/buyDetail?"'
,
AUTHOR_UEL
:
'"http
://wechat-test.changchangenglish.com/api/client/login?redirect_url=http://localhost:8085/#
/"'
,
BUY_URL
:
'"http
s
://wechat-test.changchangenglish.com/#/buyDetail?"'
,
AUTHOR_UEL
:
'"http
s://wechat-test.changchangenglish.com/api/client/login?redirect_url=http://localhost:8085
/"'
,
REDIRECT_URL
:
'"http://localhost:8085/"'
,
});
config/index.js
View file @
3d6a7f90
...
...
@@ -19,6 +19,7 @@ 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
port
:
8085
,
// can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser
:
false
,
...
...
src/components/index.vue
View file @
3d6a7f90
This diff is collapsed.
Click to expand it.
src/components/newLesson/share.vue
View file @
3d6a7f90
...
...
@@ -96,8 +96,8 @@
});
},
shareImg
(
icon
){
let
URL
=
process
.
env
.
API_URL
+
'#/shareGoods?userID='
+
this
.
userDetail
.
user_id
;
console
.
log
(
icon
)
let
URL
=
process
.
env
.
API_URL
+
'#/shareGoods?userID='
+
this
.
userDetail
.
user_id
;
this
.
onShare
(
URL
,
icon
);
},
initPage
(){
...
...
src/components/shareTime.vue
View file @
3d6a7f90
...
...
@@ -26,6 +26,7 @@
},
methods
:{
initPage
(){
debugger
let
str
=
this
.
day
.
toString
();
for
(
let
i
=
0
;
i
<
str
.
length
;
i
++
){
this
.
imgList
.
push
(
str
[
i
])
...
...
@@ -79,6 +80,7 @@
height: 200*@toVw;
text-align: center;
line-height: 200*@toVw;
font-size: 12px;
img{
width:90*@toVw;
vertical-align: middle;
...
...
src/util/common.js
View file @
3d6a7f90
export
default
{
dateFmt
:
function
(
date
,
format
)
{
var
o
=
{
"M+"
:
date
.
getMonth
()
+
1
,
//month
"d+"
:
date
.
getDate
(),
//day
"h+"
:
date
.
getHours
(),
//hour
"m+"
:
date
.
getMinutes
(),
//minute
"s+"
:
date
.
getSeconds
(),
//second
"q+"
:
Math
.
floor
((
date
.
getMonth
()
+
3
)
/
3
),
//quarter
"S"
:
date
.
getMilliseconds
()
//millisecond
}
if
(
/
(
y+
)
/
.
test
(
format
))
format
=
format
.
replace
(
RegExp
.
$1
,
(
date
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
for
(
var
k
in
o
)
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
format
))
format
=
format
.
replace
(
RegExp
.
$1
,
RegExp
.
$1
.
length
==
1
?
o
[
k
]
:
(
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
));
return
format
;
},
getUrlParam
()
{
export
default
{
dateFmt
:
function
(
date
,
format
)
{
var
o
=
{
"M+"
:
date
.
getMonth
()
+
1
,
//month
"d+"
:
date
.
getDate
(),
//day
"h+"
:
date
.
getHours
(),
//hour
"m+"
:
date
.
getMinutes
(),
//minute
"s+"
:
date
.
getSeconds
(),
//second
"q+"
:
Math
.
floor
((
date
.
getMonth
()
+
3
)
/
3
),
//quarter
"S"
:
date
.
getMilliseconds
()
//millisecond
}
if
(
/
(
y+
)
/
.
test
(
format
))
format
=
format
.
replace
(
RegExp
.
$1
,
(
date
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
for
(
var
k
in
o
)
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
format
))
format
=
format
.
replace
(
RegExp
.
$1
,
RegExp
.
$1
.
length
==
1
?
o
[
k
]
:
(
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
));
return
format
;
},
getUrlParam
()
{
var
url
=
location
.
search
;
//获取url中"?"符后的字串
var
theRequest
=
new
Object
();
if
(
url
.
indexOf
(
"?"
)
!=
-
1
)
{
var
str
=
url
.
substr
(
1
);
var
strs
=
str
.
split
(
"&"
);
for
(
var
i
=
0
;
i
<
strs
.
length
;
i
++
)
{
theRequest
[
strs
[
i
].
split
(
"="
)[
0
]]
=
unescape
(
strs
[
i
].
split
(
"="
)[
1
]);
for
(
var
i
=
0
;
i
<
strs
.
length
;
i
++
)
{
theRequest
[
strs
[
i
].
split
(
"="
)[
0
]]
=
unescape
(
strs
[
i
].
split
(
"="
)[
1
]);
}
}
return
theRequest
;
},
toDataURL
(
src
,
callback
)
{
var
xhttp
=
new
XMLHttpRequest
()
xhttp
.
onload
=
function
()
{
var
fileReader
=
new
FileReader
()
fileReader
.
onloadend
=
function
()
{
callback
(
fileReader
.
result
)
}
fileReader
.
readAsDataURL
(
xhttp
.
response
)
};
xhttp
.
responseType
=
'blob'
xhttp
.
open
(
'GET'
,
src
,
true
)
xhttp
.
send
()
toDataURL
(
src
,
callback
)
{
var
xhttp
=
new
XMLHttpRequest
()
xhttp
.
onload
=
function
()
{
var
fileReader
=
new
FileReader
()
fileReader
.
onloadend
=
function
()
{
callback
(
fileReader
.
result
)
}
fileReader
.
readAsDataURL
(
xhttp
.
response
)
};
xhttp
.
responseType
=
'blob'
xhttp
.
open
(
'GET'
,
src
,
true
)
xhttp
.
send
()
},
getParam
(
paramName
)
{
let
paramValue
=
""
,
isFound
=
!
1
;
let
arrSource
=
[]
let
i
=
0
if
(
location
.
search
.
indexOf
(
"?"
)
==
0
&&
location
.
search
.
indexOf
(
"="
)
>
1
)
{
arrSource
=
unescape
(
location
.
search
).
substring
(
1
,
location
.
search
.
length
).
split
(
"&"
);
while
(
i
<
arrSource
.
length
&&
!
isFound
)
arrSource
[
i
].
indexOf
(
"="
)
>
0
&&
arrSource
[
i
].
split
(
"="
)[
0
].
toLowerCase
()
==
paramName
.
toLowerCase
()
&&
(
paramValue
=
arrSource
[
i
].
split
(
"="
)[
1
],
isFound
=
!
0
),
i
++
}
return
paramValue
==
""
&&
(
paramValue
=
null
),
paramValue
}
}
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