Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
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
陈玉桐
marketing
Commits
6f4b9f2a
Commit
6f4b9f2a
authored
Nov 13, 2019
by
陈玉桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
73b6863c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
3 deletions
+37
-3
tool.vue
src/views/tool.vue
+37
-3
No files found.
src/views/tool.vue
View file @
6f4b9f2a
...
@@ -119,6 +119,8 @@ export default {
...
@@ -119,6 +119,8 @@ export default {
enrollStatus
:
''
,
enrollStatus
:
''
,
uploadPic
:
''
,
// 上传的头像地址
uploadPic
:
''
,
// 上传的头像地址
activityId
:
''
,
applyDialogShow
:
false
,
applyDialogShow
:
false
,
createDialogShow
:
false
,
createDialogShow
:
false
,
...
@@ -181,6 +183,7 @@ export default {
...
@@ -181,6 +183,7 @@ export default {
}
}
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
loadingShow
=
false
this
.
loadingShow
=
false
this
.
activityId
=
response
.
data
.
activityId
this
.
qrcodeUrl
=
response
.
data
.
qrcodeUrl
this
.
qrcodeUrl
=
response
.
data
.
qrcodeUrl
this
.
posterText1
=
response
.
data
.
note1
this
.
posterText1
=
response
.
data
.
note1
this
.
posterText2
=
response
.
data
.
note2
this
.
posterText2
=
response
.
data
.
note2
...
@@ -193,13 +196,13 @@ export default {
...
@@ -193,13 +196,13 @@ export default {
methods
:
{
methods
:
{
create
()
{
create
()
{
if
(
!
this
.
uploadPic
){
if
(
!
this
.
uploadPic
){
this
.
tipDialogShow
=
true
this
.
tipDialogText
=
'您还未上传照片'
this
.
tipDialogText
=
'您还未上传照片'
this
.
tipDialogShow
=
true
return
return
}
}
if
(
!
this
.
currentDay
){
if
(
!
this
.
currentDay
){
this
.
tipDialogShow
=
true
this
.
tipDialogText
=
'您还未输入打卡天数'
this
.
tipDialogText
=
'您还未输入打卡天数'
this
.
tipDialogShow
=
true
return
return
}
}
if
(
this
.
enrollStatus
==
1
){
//已报名
if
(
this
.
enrollStatus
==
1
){
//已报名
...
@@ -218,7 +221,38 @@ export default {
...
@@ -218,7 +221,38 @@ export default {
},
},
upload
()
{
upload
()
{
if
(
this
.
enrollStatus
==
1
){
//已报名
if
(
this
.
enrollStatus
==
1
){
//已报名
let
me
=
this
wx
.
chooseImage
({
count
:
1
,
// 默认9
sizeType
:
[
'original'
,
'compressed'
],
// 可以指定是原图还是压缩图,默认二者都有
sourceType
:
[
'album'
,
'camera'
],
// 可以指定来源是相册还是相机,默认二者都有
success
:
function
(
res
)
{
// 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
wx
.
uploadImage
({
localId
:
res
.
localIds
[
0
],
// 需要上传的图片的本地ID,由chooseImage接口获得
isShowProgressTips
:
1
,
// 默认为1,显示进度提示
success
:
function
(
res
)
{
var
serverId
=
res
.
serverId
;
// 返回图片的服务器端ID serverId
me
.
loadingShow
=
true
request
({
url
:
'/api/MarketingToolApi/Posters/addPoster'
,
method
:
'post'
,
data
:
{
token
:
localStorage
.
getItem
(
"token"
),
activityId
:
me
.
activityId
,
day
:
me
.
currentDay
,
MediaId
:
res
.
serverId
}
}).
then
(
response
=>
{
me
.
loadingShow
=
false
me
.
tipDialogText
=
'上传成功'
me
.
tipDialogShow
=
true
})
}
})
}
})
}
else
{
}
else
{
this
.
applyDialogShow
=
true
this
.
applyDialogShow
=
true
}
}
...
@@ -239,7 +273,7 @@ export default {
...
@@ -239,7 +273,7 @@ export default {
success
:
function
(
res
)
{
success
:
function
(
res
)
{
me
.
uploadPic
=
res
.
localIds
[
0
]
// 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
me
.
uploadPic
=
res
.
localIds
[
0
]
// 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
}
}
})
;
})
}
else
{
}
else
{
this
.
applyDialogShow
=
true
this
.
applyDialogShow
=
true
}
}
...
...
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