Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
tjmdp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
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
other-project
tjmdp
Commits
0be32ad9
Commit
0be32ad9
authored
Apr 30, 2019
by
liuchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
bf9321cc
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
143 additions
and
88 deletions
+143
-88
ActivityController.java
src/main/java/com/qiankun/controller/ActivityController.java
+29
-9
RainbowPlanController.java
...qiankun/controller/rainbowplan/RainbowPlanController.java
+2
-2
RainbowPlanWebController.java
...nkun/controller/rainbowplan/RainbowPlanWebController.java
+6
-8
Activity.java
src/main/java/com/qiankun/entity/Activity.java
+10
-0
system.properties
src/main/resources/system.properties
+3
-1
saveactivity.jsp
src/main/webapp/WEB-INF/pages/activity/saveactivity.jsp
+15
-1
wishlist.jsp
src/main/webapp/WEB-INF/pages/rainbow/wishlist.jsp
+5
-3
activity.js
src/main/webapp/resources/js/activity/activity.js
+72
-59
rainbowuser.js
src/main/webapp/resources/js/rainbow/rainbowuser.js
+0
-4
wish.js
src/main/webapp/resources/js/rainbow/wish.js
+1
-1
No files found.
src/main/java/com/qiankun/controller/ActivityController.java
View file @
0be32ad9
package
com
.
qiankun
.
controller
;
package
com
.
qiankun
.
controller
;
import
java.io.File
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
...
@@ -8,13 +9,17 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -8,13 +9,17 @@ import javax.servlet.http.HttpServletResponse;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.qiankun.entity.ActivityReg
;
import
com.qiankun.entity.ActivityReg
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.ModelAndView
;
import
com.qiankun.annotation.Auth
;
import
com.qiankun.annotation.Auth
;
...
@@ -32,6 +37,9 @@ public class ActivityController extends BaseController<Object>{
...
@@ -32,6 +37,9 @@ public class ActivityController extends BaseController<Object>{
@Autowired
@Autowired
private
ActivityService
activityService
;
private
ActivityService
activityService
;
private
ResourceBundle
rb
=
ResourceBundle
.
getBundle
(
"system"
);
private
String
activityImagePath
=
File
.
separator
+
rb
.
getString
(
"activityImage"
);
@Auth
(
verifyLogin
=
false
,
verifyURL
=
false
)
@Auth
(
verifyLogin
=
false
,
verifyURL
=
false
)
@RequestMapping
(
value
=
"/wx/api/activity/list"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/wx/api/activity/list"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
Map
<
String
,
Object
>
listformWX
(
@RequestBody
ActivityVo
activityVo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
public
@ResponseBody
Map
<
String
,
Object
>
listformWX
(
@RequestBody
ActivityVo
activityVo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
...
@@ -137,15 +145,8 @@ public class ActivityController extends BaseController<Object>{
...
@@ -137,15 +145,8 @@ public class ActivityController extends BaseController<Object>{
}
}
@Auth
(
verifyLogin
=
false
,
verifyURL
=
false
)
@RequestMapping
(
value
=
"/api/activity/save"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/wx/api/activity/save"
,
method
=
RequestMethod
.
POST
)
public
Map
<
String
,
Object
>
save
(
@RequestParam
(
value
=
"file"
,
required
=
false
)
MultipartFile
file
,
ActivityVo
activityVo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
public
@ResponseBody
Map
<
String
,
Object
>
saveUserFormWX
(
@RequestBody
ActivityVo
activityVo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
return
this
.
save
(
activityVo
,
response
,
request
);
}
@RequestMapping
(
"/api/activity/save"
)
public
Map
<
String
,
Object
>
save
(
ActivityVo
activityVo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Activity
activity
=
new
Activity
();
Activity
activity
=
new
Activity
();
...
@@ -158,6 +159,25 @@ public class ActivityController extends BaseController<Object>{
...
@@ -158,6 +159,25 @@ public class ActivityController extends BaseController<Object>{
map
.
put
(
"status"
,
2
);
map
.
put
(
"status"
,
2
);
}
}
if
(
file
!=
null
)
{
String
fileFullName
=
file
.
getOriginalFilename
();
String
[]
originalFileName
=
fileFullName
.
split
(
"\\."
);
String
fileName
=
System
.
currentTimeMillis
()
+
"."
+
originalFileName
[
originalFileName
.
length
-
1
];
String
rootPath
=
rb
.
getString
(
"file_path"
);
if
(
StringUtils
.
isNotBlank
(
activity
.
getUploadImage
()))
{
File
oldFile
=
new
File
(
rootPath
+
activity
.
getUploadImage
());
if
(
oldFile
.
isFile
())
FileUtils
.
forceDelete
(
oldFile
);
}
File
destFile
=
new
File
(
rootPath
+
activityImagePath
,
fileName
);
FileUtils
.
writeByteArrayToFile
(
destFile
,
file
.
getBytes
());
activity
.
setUploadImage
(
activityImagePath
+
File
.
separator
+
fileName
);
}
activity
.
setAddr
(
activityVo
.
getAddr
());
activity
.
setAddr
(
activityVo
.
getAddr
());
activity
.
setAvailable
(
activityVo
.
getAvailable
());
activity
.
setAvailable
(
activityVo
.
getAvailable
());
activity
.
setContacts
(
activityVo
.
getContacts
());
activity
.
setContacts
(
activityVo
.
getContacts
());
...
...
src/main/java/com/qiankun/controller/rainbowplan/RainbowPlanController.java
View file @
0be32ad9
...
@@ -78,8 +78,8 @@ public class RainbowPlanController extends BaseController<Object> {
...
@@ -78,8 +78,8 @@ public class RainbowPlanController extends BaseController<Object> {
@Autowired
@Autowired
private
WxMaProperties
propertis
;
private
WxMaProperties
propertis
;
private
ResourceBundle
rb
=
ResourceBundle
.
getBundle
(
"system"
);
private
ResourceBundle
rb
=
ResourceBundle
.
getBundle
(
"system"
);
private
String
uploadAvatarPath
=
File
.
separator
+
"rainbowplan"
+
File
.
separator
+
"uploadAvatar"
;
private
String
uploadAvatarPath
=
File
.
separator
+
"rainbowplan"
+
File
.
separator
+
rb
.
getString
(
"uploadAvatar"
)
;
private
String
uploadWishImagePath
=
File
.
separator
+
"rainbowplan"
+
File
.
separator
+
"wishUploadImage"
;
private
String
uploadWishImagePath
=
File
.
separator
+
"rainbowplan"
+
File
.
separator
+
rb
.
getString
(
"wishUploadImage"
)
;
private
String
getAppid
(){
private
String
getAppid
(){
return
propertis
.
getConfigs
().
get
(
0
).
getAppid
();
return
propertis
.
getConfigs
().
get
(
0
).
getAppid
();
...
...
src/main/java/com/qiankun/controller/rainbowplan/RainbowPlanWebController.java
View file @
0be32ad9
...
@@ -57,6 +57,10 @@ public class RainbowPlanWebController extends BaseController<Object>{
...
@@ -57,6 +57,10 @@ public class RainbowPlanWebController extends BaseController<Object>{
@Autowired
@Autowired
private
ActivityService
activityService
;
private
ActivityService
activityService
;
private
ResourceBundle
rb
=
ResourceBundle
.
getBundle
(
"system"
);
private
String
uploadAvatarPath
=
File
.
separator
+
"rainbowplan"
+
File
.
separator
+
rb
.
getString
(
"uploadAvatar"
);
private
String
uploadWishImagePath
=
File
.
separator
+
"rainbowplan"
+
File
.
separator
+
rb
.
getString
(
"wishUploadImage"
);
@RequestMapping
(
"/rainbow/user/view"
)
@RequestMapping
(
"/rainbow/user/view"
)
public
ModelAndView
userAdd
(
String
id
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
public
ModelAndView
userAdd
(
String
id
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
ModelAndView
view
=
new
ModelAndView
();
...
@@ -72,9 +76,6 @@ public class RainbowPlanWebController extends BaseController<Object>{
...
@@ -72,9 +76,6 @@ public class RainbowPlanWebController extends BaseController<Object>{
@RequestMapping
(
value
=
"/rainbow/user/save"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/rainbow/user/save"
,
method
=
RequestMethod
.
POST
)
public
ModelAndView
saveUser
(
@RequestParam
(
value
=
"file"
,
required
=
false
)
MultipartFile
file
,
RainbowPlanUserVo
vo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
public
ModelAndView
saveUser
(
@RequestParam
(
value
=
"file"
,
required
=
false
)
MultipartFile
file
,
RainbowPlanUserVo
vo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
ModelAndView
view
=
new
ModelAndView
();
String
uploadImagePath
=
File
.
separator
+
"rainbowplan"
+
File
.
separator
+
"uploadAvatar"
;
ResourceBundle
rb
=
ResourceBundle
.
getBundle
(
"system"
);
RainbowPlanUser
user
=
new
RainbowPlanUser
();
RainbowPlanUser
user
=
new
RainbowPlanUser
();
if
(
StringUtils
.
isBlank
(
vo
.
getId
()))
{
if
(
StringUtils
.
isBlank
(
vo
.
getId
()))
{
...
@@ -103,9 +104,9 @@ public class RainbowPlanWebController extends BaseController<Object>{
...
@@ -103,9 +104,9 @@ public class RainbowPlanWebController extends BaseController<Object>{
FileUtils
.
forceDelete
(
oldFile
);
FileUtils
.
forceDelete
(
oldFile
);
}
}
File
destFile
=
new
File
(
rootPath
+
upload
Image
Path
,
fileName
);
File
destFile
=
new
File
(
rootPath
+
upload
Avatar
Path
,
fileName
);
FileUtils
.
writeByteArrayToFile
(
destFile
,
file
.
getBytes
());
FileUtils
.
writeByteArrayToFile
(
destFile
,
file
.
getBytes
());
user
.
setAvatar
(
upload
Image
Path
+
File
.
separator
+
fileName
);
user
.
setAvatar
(
upload
Avatar
Path
+
File
.
separator
+
fileName
);
}
}
user
.
setName
(
vo
.
getName
());
user
.
setName
(
vo
.
getName
());
user
.
setConnectTel
(
vo
.
getConnectTel
());
user
.
setConnectTel
(
vo
.
getConnectTel
());
...
@@ -218,9 +219,6 @@ public class RainbowPlanWebController extends BaseController<Object>{
...
@@ -218,9 +219,6 @@ public class RainbowPlanWebController extends BaseController<Object>{
@RequestMapping
(
value
=
"/rainbow/wish/save"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/rainbow/wish/save"
,
method
=
RequestMethod
.
POST
)
public
ModelAndView
saveWish
(
@RequestParam
(
value
=
"file"
,
required
=
false
)
MultipartFile
file
,
WishVo
vo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
public
ModelAndView
saveWish
(
@RequestParam
(
value
=
"file"
,
required
=
false
)
MultipartFile
file
,
WishVo
vo
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
ModelAndView
view
=
new
ModelAndView
();
String
uploadWishImagePath
=
File
.
separator
+
"rainbowplan"
+
File
.
separator
+
"wishUploadImage"
;
ResourceBundle
rb
=
ResourceBundle
.
getBundle
(
"system"
);
Wish
wish
=
new
Wish
();
Wish
wish
=
new
Wish
();
if
(
StringUtils
.
isBlank
(
vo
.
getId
()))
{
if
(
StringUtils
.
isBlank
(
vo
.
getId
()))
{
...
...
src/main/java/com/qiankun/entity/Activity.java
View file @
0be32ad9
...
@@ -55,6 +55,8 @@ public class Activity {
...
@@ -55,6 +55,8 @@ public class Activity {
private
String
tel
;
//联系电话
private
String
tel
;
//联系电话
private
String
uploadImage
;
//活动照片路径
@OneToMany
(
fetch
=
FetchType
.
LAZY
,
cascade
=
{
CascadeType
.
ALL
},
orphanRemoval
=
true
,
mappedBy
=
"activity"
)
@OneToMany
(
fetch
=
FetchType
.
LAZY
,
cascade
=
{
CascadeType
.
ALL
},
orphanRemoval
=
true
,
mappedBy
=
"activity"
)
@JsonIgnore
@JsonIgnore
private
Set
<
ActivityReg
>
activityReg
=
new
HashSet
<
ActivityReg
>();
private
Set
<
ActivityReg
>
activityReg
=
new
HashSet
<
ActivityReg
>();
...
@@ -165,6 +167,14 @@ public class Activity {
...
@@ -165,6 +167,14 @@ public class Activity {
this
.
createTime
=
createTime
;
this
.
createTime
=
createTime
;
}
}
public
String
getUploadImage
()
{
return
uploadImage
;
}
public
void
setUploadImage
(
String
uploadImage
)
{
this
.
uploadImage
=
uploadImage
;
}
...
...
src/main/resources/system.properties
View file @
0be32ad9
...
@@ -18,7 +18,9 @@ tjmdp.secret=69ea7217fc5cee04f274c872a86be5e7
...
@@ -18,7 +18,9 @@ tjmdp.secret=69ea7217fc5cee04f274c872a86be5e7
tjmdp.token
=
tjmdp.token
=
tjmdp.aesKey
=
tjmdp.aesKey
=
tjmdp.msgDataFormat
=
JSON
tjmdp.msgDataFormat
=
JSON
wishUploadImage
=
wishUploadImage
activityImage
=
activityImage
uploadAvatar
=
uploadAvatar
nation
=
\u
6c49
\u
65cf,
\u8499\u
53e4
\u
65cf,
\u
56de
\u
65cf,
\u
85cf
\u
65cf,
\u
7ef4
\u
543e
\u
5c14
\u
65cf,
\u
82d7
\u
65cf,
\u
5f5d
\u
65cf,
\u
58ee
\u
65cf,
\u
5e03
\u
4f9d
\u
65cf,
\u
671d
\u
9c9c
\u
65cf,
\u
6ee1
\u
65cf,
\u
4f97
\u
65cf,
\u7476\u
65cf,
\u
767d
\u
65cf,
\u
571f
\u
5bb6
\u
65cf,
\u
54c8
\u
5c3c
\u
65cf,
\u
54c8
\u8428\u
514b
\u
65cf,
\u
50a3
\u
65cf,
\u
9ece
\u
65cf,
\u5088\u
50f3
\u
65cf,
\u
4f64
\u
65cf,
\u7572\u
65cf,
\u
9ad8
\u
5c71
\u
65cf,
\u
62c9
\u
795c
\u
65cf,
\u
6c34
\u
65cf,
\u
4e1c
\u
4e61
\u
65cf,
\u
7eb3
\u
897f
\u
65cf,
\u
666f
\u9887\u
65cf,
\u
67ef
\u
5c14
\u
514b
\u
5b5c
\u
65cf,
\u
571f
\u
65cf,
\u
8fbe
\u
65a1
\u
5c14
\u
65cf,
\u
4eeb
\u
4f6c
\u
65cf,
\u
7f8c
\u
65cf,
\u
5e03
\u6717\u
65cf,
\u6492\u
62c9
\u
65cf,
\u
6bdb
\u5357\u
65cf,
\u
4ee1
\u
4f6c
\u
65cf,
\u9521\u
4f2f
\u
65cf,
\u
963f
\u
660c
\u
65cf,
\u
666e
\u
7c73
\u
65cf,
\u5854\u5409\u
514b
\u
65cf,
\u6012\u
65cf,
\u
4e4c
\u
5b5c
\u
522b
\u
514b
\u
65cf,
\u
4fc4
\u
7f57
\u
65af
\u
65cf,
\u9102\u
6e29
\u
514b
\u
65cf,
\u
5fb7
\u6602\u
65cf,
\u
4fdd
\u
5b89
\u
65cf,
\u
88d5
\u
56fa
\u
65cf,
\u
4eac
\u
65cf,
\u5854\u5854\u
5c14
\u
65cf,
\u
72ec
\u
9f99
\u
65cf,
\u9102\u
4f26
\u6625\u
65cf,
\u
8d6b
\u
54f2
\u
65cf,
\u
95e8
\u
5df4
\u
65cf,
\u
73de
\u
5df4
\u
65cf,
\u
57fa
\u
8bfa
\u
65cf
nation
=
\u
6c49
\u
65cf,
\u8499\u
53e4
\u
65cf,
\u
56de
\u
65cf,
\u
85cf
\u
65cf,
\u
7ef4
\u
543e
\u
5c14
\u
65cf,
\u
82d7
\u
65cf,
\u
5f5d
\u
65cf,
\u
58ee
\u
65cf,
\u
5e03
\u
4f9d
\u
65cf,
\u
671d
\u
9c9c
\u
65cf,
\u
6ee1
\u
65cf,
\u
4f97
\u
65cf,
\u7476\u
65cf,
\u
767d
\u
65cf,
\u
571f
\u
5bb6
\u
65cf,
\u
54c8
\u
5c3c
\u
65cf,
\u
54c8
\u8428\u
514b
\u
65cf,
\u
50a3
\u
65cf,
\u
9ece
\u
65cf,
\u5088\u
50f3
\u
65cf,
\u
4f64
\u
65cf,
\u7572\u
65cf,
\u
9ad8
\u
5c71
\u
65cf,
\u
62c9
\u
795c
\u
65cf,
\u
6c34
\u
65cf,
\u
4e1c
\u
4e61
\u
65cf,
\u
7eb3
\u
897f
\u
65cf,
\u
666f
\u9887\u
65cf,
\u
67ef
\u
5c14
\u
514b
\u
5b5c
\u
65cf,
\u
571f
\u
65cf,
\u
8fbe
\u
65a1
\u
5c14
\u
65cf,
\u
4eeb
\u
4f6c
\u
65cf,
\u
7f8c
\u
65cf,
\u
5e03
\u6717\u
65cf,
\u6492\u
62c9
\u
65cf,
\u
6bdb
\u5357\u
65cf,
\u
4ee1
\u
4f6c
\u
65cf,
\u9521\u
4f2f
\u
65cf,
\u
963f
\u
660c
\u
65cf,
\u
666e
\u
7c73
\u
65cf,
\u5854\u5409\u
514b
\u
65cf,
\u6012\u
65cf,
\u
4e4c
\u
5b5c
\u
522b
\u
514b
\u
65cf,
\u
4fc4
\u
7f57
\u
65af
\u
65cf,
\u9102\u
6e29
\u
514b
\u
65cf,
\u
5fb7
\u6602\u
65cf,
\u
4fdd
\u
5b89
\u
65cf,
\u
88d5
\u
56fa
\u
65cf,
\u
4eac
\u
65cf,
\u5854\u5854\u
5c14
\u
65cf,
\u
72ec
\u
9f99
\u
65cf,
\u9102\u
4f26
\u6625\u
65cf,
\u
8d6b
\u
54f2
\u
65cf,
\u
95e8
\u
5df4
\u
65cf,
\u
73de
\u
5df4
\u
65cf,
\u
57fa
\u
8bfa
\u
65cf
...
...
src/main/webapp/WEB-INF/pages/activity/saveactivity.jsp
View file @
0be32ad9
...
@@ -42,6 +42,9 @@
...
@@ -42,6 +42,9 @@
<div class="row">
<div class="row">
<div class="col-xs-5">
<div class="col-xs-5">
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 活动类型 </label>
<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 活动类型 </label>
...
@@ -157,7 +160,18 @@
...
@@ -157,7 +160,18 @@
</div>
</div>
<div class="col-xs-5">
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1">图片</label>
<div class="col-sm-9">
<c:if test="${activity.uploadImage!=null}">
<img src="<webpath:path/>/wx/rainbowplan/loadResource?imageName=${activity.uploadImage}" width="200"/><br></c:if>
<input type="file" id="input_file" name="file" >
</div>
</div>
</div>
</div>
</div>
...
...
src/main/webapp/WEB-INF/pages/rainbow/wishlist.jsp
View file @
0be32ad9
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
<th width="">所属活动</th>
<th width="">所属活动</th>
<th width="">状态</th>
<th width="">状态</th>
<th width="5%">发布时间</th>
<th width="5%">发布时间</th>
<th width="
2
%">操作</th>
<th width="
5
%">操作</th>
</tr>
</tr>
</thead>
</thead>
...
@@ -145,10 +145,12 @@
...
@@ -145,10 +145,12 @@
<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
<button class="btn btn-xs btn-info" onclick="window.location.href='<webpath:path/>/rainbow/wish/view?id=${wish.id}'">
<button class="btn btn-xs btn-info" onclick="window.location.href='<webpath:path/>/rainbow/wish/view?id=${wish.id}'">
<i class="icon-edit
bigger-120
"></i>
<i class="icon-edit"></i>
</button>
</button>
<button class="btn btn-xs btn-info" title="修改小朋友信息" onclick="window.location.href='<webpath:path/>/rainbow/user/view?id=${wish.children.id}'">
<i class="icon-user"></i>
</button>
<%-- <a class="btn btn-xs btn-link" title="详细信息" href="<webpath:path/>/rainbow/wish/view?id=${wish.id}">
<%-- <a class="btn btn-xs btn-link" title="详细信息" href="<webpath:path/>/rainbow/wish/view?id=${wish.id}">
<i class="icon-list-alt bigger-120"></i>
<i class="icon-list-alt bigger-120"></i>
</a> --%>
</a> --%>
...
...
src/main/webapp/resources/js/activity/activity.js
View file @
0be32ad9
...
@@ -92,71 +92,84 @@ $(document).ready(function(){
...
@@ -92,71 +92,84 @@ $(document).ready(function(){
var
activity
=
{
var
activity
=
{
save
:
function
(
form
){
save
:
function
(
form
){
if
(
isSubmit
){
if
(
isSubmit
){
isSubmit
=
false
;
isSubmit
=
false
;
var
formData
=
new
FormData
();
formData
.
append
(
'file'
,
$
(
'#input_file'
)[
0
].
files
[
0
]);
formData
.
append
(
'id'
,
$
(
'#id'
).
val
());
formData
.
append
(
'name'
,
$
(
'#name'
).
val
());
formData
.
append
(
'type'
,
$
(
'#type'
).
val
());
formData
.
append
(
'addr'
,
$
(
'#addr'
).
val
());
formData
.
append
(
'content'
,
$
(
'#content'
).
val
());
formData
.
append
(
'day'
,
$
(
'#day'
).
val
());
formData
.
append
(
'max'
,
$
(
'#max'
).
val
());
formData
.
append
(
'crowd'
,
$
(
'#crowd'
).
val
());
formData
.
append
(
'available'
,
$
(
'#available'
).
val
());
formData
.
append
(
'contacts'
,
$
(
'#contacts'
).
val
());
formData
.
append
(
'tel'
,
$
(
'#tel'
).
val
());
$
.
ajax
({
$
.
ajax
({
type
:
'POST'
,
url
:
webPath
+
'/api/activity/save'
,
url
:
'/api/activity/save'
,
type
:
'POST'
,
dataType
:
'json'
,
cache
:
false
,
data
:
{
data
:
formData
,
id
:
$
(
'#id'
).
val
(),
processData
:
false
,
name
:
$
(
'#name'
).
val
(),
contentType
:
false
,
type
:
$
(
'#type'
).
val
(),
dataType
:
"json"
,
addr
:
$
(
'#addr'
).
val
(),
beforeSend
:
function
(){
content
:
$
(
'#content'
).
val
(),
day
:
$
(
'#day'
).
val
(),
},
max
:
$
(
'#max'
).
val
(),
success
:
function
(
data
){
crowd
:
$
(
'#crowd'
).
val
(),
var
status
=
data
.
status
;
available
:
$
(
'#available'
).
val
(),
contacts
:
$
(
'#contacts'
).
val
(),
if
(
status
==
1
){
//成功
tel
:
$
(
'#tel'
).
val
()
bootbox
.
dialog
({
},
message
:
"新增活动成功"
,
success
:
function
(
data
){
buttons
:{
var
status
=
data
.
status
;
"cancel"
:{
"label"
:
"返回"
,
if
(
status
==
1
){
//注册成功
"className"
:
"btn-sm btn-primary"
,
bootbox
.
dialog
({
"callback"
:
function
()
{
message
:
"新增活动成功"
,
window
.
location
.
href
=
webPath
+
'/activity/list'
;
buttons
:{
}
"cancel"
:{
},
"label"
:
"返回"
,
"success"
:{
"className"
:
"btn-sm btn-primary"
,
"label"
:
"继续添加"
,
"callback"
:
function
()
{
"className"
:
"btn-sm btn-primary"
,
window
.
location
.
href
=
webPath
+
'/activity/list'
;
"callback"
:
function
()
{
}
window
.
location
.
href
=
webPath
+
'/activity/add'
;
},
}
"success"
:{
"label"
:
"继续添加"
,
"className"
:
"btn-sm btn-primary"
,
"callback"
:
function
()
{
window
.
location
.
href
=
webPath
+
'/activity/add'
;
}
}
}
}
});
}
}
else
if
(
status
==
2
){
});
isSubmit
=
true
;
bootbox
.
dialog
({
}
else
if
(
status
==
2
){
message
:
"修改活动成功"
,
isSubmit
=
true
;
buttons
:{
bootbox
.
dialog
({
"success"
:{
message
:
"修改活动成功"
,
"label"
:
"确定"
,
buttons
:{
"className"
:
"btn-sm btn-primary"
,
"success"
:{
"callback"
:
function
()
{
"label"
:
"确定"
,
}
"className"
:
"btn-sm btn-primary"
,
}
"callback"
:
function
()
{
window
.
location
.
reload
();
}
}
}
});
}
});
}
}
}
}
});
});
}
}
...
...
src/main/webapp/resources/js/rainbow/rainbowuser.js
View file @
0be32ad9
...
@@ -118,7 +118,6 @@ var user = {
...
@@ -118,7 +118,6 @@ var user = {
formData
.
append
(
'connectTel'
,
$
(
'#connectTel'
).
val
());
formData
.
append
(
'connectTel'
,
$
(
'#connectTel'
).
val
());
formData
.
append
(
'receiveAddress'
,
$
(
'#receiveAddress'
).
val
());
formData
.
append
(
'receiveAddress'
,
$
(
'#receiveAddress'
).
val
());
alert
(
user
.
type
)
if
(
user
.
type
==
0
){
if
(
user
.
type
==
0
){
formData
.
append
(
'nickName'
,
$
(
'#nickName'
).
val
());
formData
.
append
(
'nickName'
,
$
(
'#nickName'
).
val
());
formData
.
append
(
'gender'
,
$
(
'input:radio[name="gender"]:checked'
).
val
());
formData
.
append
(
'gender'
,
$
(
'input:radio[name="gender"]:checked'
).
val
());
...
@@ -128,9 +127,6 @@ var user = {
...
@@ -128,9 +127,6 @@ var user = {
formData
.
append
(
'status'
,
$
(
'#status'
).
val
());
formData
.
append
(
'status'
,
$
(
'#status'
).
val
());
}
}
$
.
ajax
({
$
.
ajax
({
url
:
webPath
+
"/rainbow/user/save"
,
url
:
webPath
+
"/rainbow/user/save"
,
type
:
'POST'
,
type
:
'POST'
,
...
...
src/main/webapp/resources/js/rainbow/wish.js
View file @
0be32ad9
var
isSubmit
=
true
;
var
isSubmit
=
true
;
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
$
(
"#activity"
).
select2
({
$
(
"#activity"
).
select2
({
placeholder
:
"请选择"
,
placeholder
:
"请选择
所属活动
"
,
allowClear
:
true
allowClear
:
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