前端完成
parent
8db1aa1b64
commit
49e772e168
|
|
@ -69,7 +69,6 @@ public class AppInformController extends BaseController
|
|||
/**
|
||||
* 获取举报详细信息
|
||||
*/
|
||||
@RequiresPermissions("app:inform:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation(value = "获取举报详细信息", notes = "获取举报详细信息", httpMethod = "GET")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
|
|
@ -80,7 +79,6 @@ public class AppInformController extends BaseController
|
|||
/**
|
||||
* 新增举报
|
||||
*/
|
||||
@RequiresPermissions("app:inform:add")
|
||||
@ApiOperation(value = "新增举报", notes = "新增举报", httpMethod = "POST")
|
||||
@Log(title = "举报", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ public class AppMessageController extends BaseController
|
|||
/**
|
||||
* 查询系统消息列表
|
||||
*/
|
||||
@RequiresPermissions("app:message:list")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value = "查询系统消息", notes = "查询系统消息", httpMethod = "GET")
|
||||
public TableDataInfo list(AppMessage appMessage)
|
||||
|
|
@ -56,7 +55,6 @@ public class AppMessageController extends BaseController
|
|||
/**
|
||||
* 导出系统消息列表
|
||||
*/
|
||||
@RequiresPermissions("app:message:export")
|
||||
@Log(title = "系统消息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AppMessage appMessage)
|
||||
|
|
@ -69,7 +67,6 @@ public class AppMessageController extends BaseController
|
|||
/**
|
||||
* 获取系统消息详细信息
|
||||
*/
|
||||
@RequiresPermissions("app:message:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation(value = "获取系统消息详细信息", notes = "获取系统消息详细信息", httpMethod = "GET")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
|
|
@ -80,7 +77,6 @@ public class AppMessageController extends BaseController
|
|||
/**
|
||||
* 新增系统消息
|
||||
*/
|
||||
@RequiresPermissions("app:message:add")
|
||||
@ApiOperation(value = "新增系统消息", notes = "新增系统消息", httpMethod = "POST")
|
||||
@Log(title = "系统消息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
|
|
@ -92,7 +88,6 @@ public class AppMessageController extends BaseController
|
|||
/**
|
||||
* 修改系统消息
|
||||
*/
|
||||
@RequiresPermissions("app:message:edit")
|
||||
@ApiOperation(value = "修改系统消息", notes = "修改系统消息", httpMethod = "PUT")
|
||||
@Log(title = "系统消息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/edit")
|
||||
|
|
@ -104,7 +99,6 @@ public class AppMessageController extends BaseController
|
|||
/**
|
||||
* 删除系统消息
|
||||
*/
|
||||
@RequiresPermissions("app:message:remove")
|
||||
@Log(title = "系统消息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
|
|
|
|||
|
|
@ -51,7 +51,10 @@ public class AppOrderController extends BaseController
|
|||
{
|
||||
startPage();
|
||||
List<AppOrderVo> list = appOrderService.selectAppOrderList(appOrder);
|
||||
return getDataTable(list);
|
||||
|
||||
TableDataInfo dataTable = getDataTable(list);
|
||||
dataTable.setTotal(appOrderService.selectAppOrderList(new AppOrder()).size());
|
||||
return dataTable;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import java.io.IOException;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.app.domain.vo.AppUserDynamicVo;
|
||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||
import com.ruoyi.system.api.domain.SysUser;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -122,4 +124,12 @@ public class AppUserDynamicController extends BaseController
|
|||
{
|
||||
return toAjax(appUserDynamicService.deleteAppUserDynamicByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
@PutMapping("/changeStatus")
|
||||
public AjaxResult changeStatus(@RequestBody AppUserDynamic appUserDynamic)
|
||||
{
|
||||
return toAjax(appUserDynamicService.updateAppUserDynamicStatus(appUserDynamic));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ public class PayController extends BaseController
|
|||
|
||||
@RequestMapping("/generateCode")
|
||||
@ApiOperation(value = "生成兑换码", notes = "生成兑换码", httpMethod = "GET")
|
||||
public String generateCode(Integer num,Integer level,HttpServletResponse response){
|
||||
public String generateCode(@RequestParam("num") Integer num,
|
||||
@RequestParam("level") Integer level,HttpServletResponse response){
|
||||
if(num>10000){
|
||||
return "------num error------";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class PhoneCodeController {
|
|||
}
|
||||
send = sendNoteUtil.sendNoteMessgae(phoneNum);
|
||||
}else {
|
||||
send = sendNoteUtil.sendMessage(phoneNum);
|
||||
send = sendNoteUtil.sendNoteMessgae(phoneNum);
|
||||
}
|
||||
|
||||
if ("OK".equals(send)) {
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ public class AppExchangeCode extends BaseEntity
|
|||
@Excel(name = "会员等级,1-7天,2-一个月,3-一年")
|
||||
private Integer level;
|
||||
|
||||
private String userName;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
|
|
@ -75,6 +77,14 @@ public class AppExchangeCode extends BaseEntity
|
|||
return userTime;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
@ -87,6 +97,7 @@ public class AppExchangeCode extends BaseEntity
|
|||
.append("updateBy", getUpdateBy())
|
||||
.append("remark", getRemark())
|
||||
.append("userTime", getUserTime())
|
||||
.append("userName", getUserName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ public class AppMessage extends BaseEntity
|
|||
@Excel(name = "管理员id")
|
||||
private Long userId;
|
||||
|
||||
private String title;
|
||||
|
||||
/** 通知内容 */
|
||||
@Excel(name = "通知内容")
|
||||
private String content;
|
||||
|
|
@ -32,6 +34,8 @@ public class AppMessage extends BaseEntity
|
|||
@Excel(name = "图片")
|
||||
private String imgUrl;
|
||||
|
||||
private Integer type;
|
||||
|
||||
|
||||
@Excel(name = "头像")
|
||||
private String avatarUrl;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class AppUserDynamic extends BaseEntity
|
|||
|
||||
/** 是否置顶:0是1否 */
|
||||
@Excel(name = "是否置顶:0是1否")
|
||||
private Long isTop;
|
||||
private Boolean isTop;
|
||||
|
||||
@Excel(name = "用户名字")
|
||||
private String username;
|
||||
|
|
@ -80,12 +80,12 @@ public class AppUserDynamic extends BaseEntity
|
|||
|
||||
private Boolean isOwner;
|
||||
|
||||
public void setIsTop(Long isTop)
|
||||
public void setIsTop(Boolean isTop)
|
||||
{
|
||||
this.isTop = isTop;
|
||||
}
|
||||
|
||||
public Long getIsTop()
|
||||
public Boolean getIsTop()
|
||||
{
|
||||
return isTop;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,4 +61,7 @@ public interface IAppUserDynamicService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteAppUserDynamicById(Long id);
|
||||
|
||||
int updateAppUserDynamicStatus(AppUserDynamic appUserDynamic);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,13 +10,11 @@ import com.ruoyi.app.domain.AppUser;
|
|||
import com.ruoyi.app.domain.vo.AppRegisterVo;
|
||||
import com.ruoyi.app.mapper.AppSchoolMapper;
|
||||
import com.ruoyi.app.mapper.AppUserMapper;
|
||||
import com.ruoyi.app.utils.aliyun.sms.SendNoteUtil;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.common.core.utils.bean.BeanUtils;
|
||||
import com.ruoyi.common.core.utils.mail.ALiYunMailUtil;
|
||||
import com.ruoyi.common.core.utils.mail.AliMailUtil;
|
||||
import com.ruoyi.common.core.utils.mail.MailUtil;
|
||||
import com.ruoyi.common.core.utils.uuid.IdUtils;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
|
|
@ -47,6 +45,9 @@ public class AppRegisterServiceImpl implements IAppRegisterService {
|
|||
@Autowired
|
||||
private AppUserMapper appUserMapper;
|
||||
|
||||
@Autowired
|
||||
private SendNoteUtil sendNoteUtil;
|
||||
|
||||
/**
|
||||
* 查询注册审核
|
||||
*
|
||||
|
|
@ -161,6 +162,7 @@ public class AppRegisterServiceImpl implements IAppRegisterService {
|
|||
appUser.setCityId(appRegister.getCityId() != null ? appRegister.getCityId() : null);
|
||||
appUser.setTownId(appRegister.getTownId() != null ? appRegister.getTownId() : null);
|
||||
appUserMapper.insertAppUser(appUser);
|
||||
sendNoteUtil.sendMessage(appRegister.getPhone());
|
||||
HttpClient httpClient = HttpClients.createDefault();
|
||||
String pushId = appRegister.getPushId() != null ? appRegister.getPushId() : null;
|
||||
String url = "https://tcb-am7ffkwasxkewhf-3cpy096b83a1.service.tcloudbase.com/urlPush/pushId?pushId=" + pushId + "&title=审核完成&content=审核已通过!";
|
||||
|
|
@ -223,19 +225,7 @@ public class AppRegisterServiceImpl implements IAppRegisterService {
|
|||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
String token = "4e290542-53f3-4a33-96ff-9510dd050100";
|
||||
String email = "653809315@qq.com";
|
||||
String EM = "<html><body><h2>欢迎来到我们的服务!!</h2>"
|
||||
+ "<p>请点击下面的网址确认您的注册:</p>"
|
||||
+ "<p>http://127.0.0.1:9204/app/activation/" + token + "/" + email + "</p>"
|
||||
+ "</body></html>";
|
||||
try {
|
||||
AliMailUtil.sendMail(EM, email);
|
||||
} catch (MessagingException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
SendNoteUtil sendNoteUtil = new SendNoteUtil();
|
||||
sendNoteUtil.sendMessage("17647557909");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,6 +155,12 @@ public class AppUserDynamicServiceImpl implements IAppUserDynamicService
|
|||
return appUserDynamicMapper.deleteAppUserDynamicById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateAppUserDynamicStatus(AppUserDynamic appUserDynamic) {
|
||||
|
||||
return appUserDynamicMapper.updateAppUserDynamic(appUserDynamic);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppUserDynamicVo> selectDynamicList(AppUserDynamic appUserDynamic) {
|
||||
// 收藏评论
|
||||
|
|
|
|||
|
|
@ -51,8 +51,6 @@ public class AppUserServiceImpl implements IAppUserService {
|
|||
@Autowired
|
||||
private AppProvinceMapper appProvinceMapper;
|
||||
|
||||
@Autowired
|
||||
private AppProvinceMapper appProvinceMapper;
|
||||
@Autowired
|
||||
private AppCityMapper appCityMapper;
|
||||
|
||||
|
|
@ -152,9 +150,9 @@ public class AppUserServiceImpl implements IAppUserService {
|
|||
appUserVo.setSchoolName(appSchool.getName());
|
||||
}
|
||||
}
|
||||
AppProvince appProvince = appProvinceMapper.selectAppProvinceById(appUserSource.getProvinceId());
|
||||
AppCity appCity = appCityMapper.selectAppCityById(Long.valueOf(appUserSource.getCityId()));
|
||||
AppTown appTown = appTownMapper.selectAppTownById(Long.valueOf(appUserSource.getTownId()));
|
||||
AppProvince appProvince = appProvinceMapper.selectAppProvinceById(Objects.nonNull(appUserSource.getProvinceId()) ? appUserSource.getProvinceId() : 0);
|
||||
AppCity appCity = appCityMapper.selectAppCityById(Objects.nonNull(appUserSource.getCityId()) ? Long.valueOf(appUserSource.getCityId()) : 0L);
|
||||
AppTown appTown = appTownMapper.selectAppTownById(Objects.nonNull(appUserSource.getTownId()) ? Long.valueOf(appUserSource.getTownId()) : 0L);
|
||||
String province = appProvince != null ? appProvince.getName() + "-" : "";
|
||||
String cityName = appCity != null ? appCity.getName() + "-" : "";
|
||||
String townName = appTown != null ? appTown.getName() : "";
|
||||
|
|
|
|||
|
|
@ -39,13 +39,13 @@ public class SendNoteUtil {
|
|||
* 阿里云签名
|
||||
*/
|
||||
// @Value("${alisms.signName}")
|
||||
private String signName = "丙煜";
|
||||
private String signName = "干杯GoBig";
|
||||
|
||||
/**
|
||||
* 阿里云短信模板Code
|
||||
*/
|
||||
// @Value("${alisms.templateCode}")
|
||||
private String templateCode = "SMS_465690552";
|
||||
private String templateCode = "SMS_299115021";
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -58,7 +58,7 @@ public class SendNoteUtil {
|
|||
//验证平台信息 开发者无需任何更改
|
||||
private static final String dysmsapi = "dysmsapi.aliyuncs.com";
|
||||
|
||||
DefaultProfile profile = DefaultProfile.getProfile("default","LTAI5tM1LeE2pkiS3qEFQkfb", "fEZZyFvWkETS8Clm73f7qmY9ohcTpc");
|
||||
DefaultProfile profile = DefaultProfile.getProfile("default","LTAI5tQMf7PG2rH4U2mZBQnK", "3l8t7cVJGTGGu89AepWtq0CddgZNfU");
|
||||
IAcsClient client = new DefaultAcsClient(profile);
|
||||
//这一步的两个参数,一个是要发送验证码的手机号 一个是模板Code用来区分登录注册
|
||||
|
||||
|
|
@ -83,12 +83,12 @@ public class SendNoteUtil {
|
|||
//模板代码,我暂时用的参数,你可以直接写成模板码,模板码参考第八步
|
||||
request.putQueryParameter("TemplateCode", templateCode);
|
||||
//用户定义的验证码内容
|
||||
request.putQueryParameter("TemplateParam", "{\"code\": 1234}");
|
||||
request.putQueryParameter("TemplateParam", "{\"code\": \"" + randomNumber + "\"}");
|
||||
try {
|
||||
// redisService.setCacheObject(PhoneNumber, randomNumber, 300L, TimeUnit.SECONDS);
|
||||
// if (!redisService.hasKey(PhoneNumber)) {
|
||||
// return "Redis存入失败";
|
||||
// }
|
||||
redisService.setCacheObject(PhoneNumber, randomNumber, 300L, TimeUnit.SECONDS);
|
||||
if (!redisService.hasKey(PhoneNumber)) {
|
||||
return "Redis存入失败";
|
||||
}
|
||||
CommonResponse response = client.getCommonResponse(request);
|
||||
String returnStr = response.getData();
|
||||
System.out.println(returnStr);
|
||||
|
|
@ -109,14 +109,14 @@ public class SendNoteUtil {
|
|||
* @return 返回校验结果
|
||||
*/
|
||||
public String check(String phoneNumber, String code) {
|
||||
// String verification = redisService.getCacheObject(phoneNumber);
|
||||
// // 手机号不存在,从新发送验证码
|
||||
// if (verification == null) {
|
||||
// return null;
|
||||
// }
|
||||
if ("1234".equals(code)) {
|
||||
String verification = redisService.getCacheObject(phoneNumber);
|
||||
// 手机号不存在,从新发送验证码
|
||||
if (verification == null) {
|
||||
return null;
|
||||
}
|
||||
if (verification.equals(code)) {
|
||||
// 校验通过后删除Redis中的验证码缓存
|
||||
// redisService.deleteObject(phoneNumber);
|
||||
redisService.deleteObject(phoneNumber);
|
||||
return "OK";
|
||||
}
|
||||
// 验证码校验错误
|
||||
|
|
@ -150,9 +150,9 @@ public class SendNoteUtil {
|
|||
request.putQueryParameter("PhoneNumbers", PhoneNumber);//接受验证码的手机号
|
||||
request.putQueryParameter("SignName", signName);//签名
|
||||
//模板代码,我暂时用的参数,你可以直接写成模板码,模板码参考第八步,此模板代码是发送通过申请的模板代码
|
||||
request.putQueryParameter("TemplateCode", "20042795554");
|
||||
request.putQueryParameter("TemplateCode", "SMS_467520300");
|
||||
|
||||
request.putQueryParameter("TemplateParam", "{\"phone\":\"17647557909\"}");
|
||||
request.putQueryParameter("TemplateParam", "{\"phone\":\"" + PhoneNumber + "\"}");
|
||||
try {
|
||||
CommonResponse response = client.getCommonResponse(request);
|
||||
String returnStr = response.getData();
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</sql>
|
||||
|
||||
<select id="selectAppExchangeCodeList" parameterType="AppExchangeCode" resultMap="AppExchangeCodeResult">
|
||||
<include refid="selectAppExchangeCodeVo"/>
|
||||
u.username
|
||||
left join sys_user u on u.user_id = app_exchange_code.user_id
|
||||
select e.id, e.code, e.user_id, e.create_time, e.update_time, e.create_by, e.updateBy, e.remark, e.user_time , u.username as userName
|
||||
|
||||
from app_exchange_code e left join app_user u on u.id = e.user_id
|
||||
<where>
|
||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectAppMessageVo">
|
||||
select id, user_id, content, img_url, create_time, update_time, remark from app_message
|
||||
select id, user_id, title, type, content, img_url, create_time, update_time, remark from app_message
|
||||
</sql>
|
||||
|
||||
<select id="selectAppMessageList" parameterType="AppMessage" resultMap="AppMessageResult">
|
||||
|
|
@ -28,13 +28,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="selectList" parameterType="AppMessage" resultType="AppMessage">
|
||||
select a.id, a.user_id as "userId", a.content, a.img_url as "imgUrl", a.create_time as "createTime",
|
||||
u.username as "username",
|
||||
u.avatar_url as "avatarUrl"
|
||||
select a.id, a.content, a.title, a.type, a.img_url as "imgUrl", a.create_time as "createTime"
|
||||
from app_message a
|
||||
LEFT JOIN app_user u on u.id = a.user_id
|
||||
<where>
|
||||
<if test="userId != null "> and a.user_id = #{userId}</if>
|
||||
<if test="username != null "> and u.username like concat('%',#{username},'%')</if>
|
||||
<if test="content != null and content != ''"> and a.content like concat('%',#{content},'%')</if>
|
||||
<if test="imgUrl != null and imgUrl != ''"> and a.img_url = #{imgUrl}</if>
|
||||
|
|
@ -50,6 +46,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
insert into app_message
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="title != null">title,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="imgUrl != null">img_url,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
|
|
@ -58,6 +56,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="imgUrl != null">#{imgUrl},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
|
|
@ -70,6 +70,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update app_message
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="imgUrl != null">img_url = #{imgUrl},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="orderStartTime != null">order_start_time = #{orderStartTime},</if>
|
||||
<if test="orderEndTime != null">order_end_time = #{orderEndTime},</if>
|
||||
<if test="check != null">`check` = #{check},</if>
|
||||
<if test="backGroundImg != null">background_img = #{backGroundImg},</if>
|
||||
<if test="backGroundImg != null">back_ground_img = #{backGroundImg},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
|
|||
|
|
@ -51,3 +51,16 @@ export function delDynamic(id) {
|
|||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 用户动态置顶状态修改
|
||||
export function changeDynamicStatus(id, isTop) {
|
||||
const data = {
|
||||
id,
|
||||
isTop
|
||||
}
|
||||
return request({
|
||||
url: '/app/dynamic/changeStatus',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
|
||||
export function generCode(num) {
|
||||
export function generCode(num , level) {
|
||||
return request({
|
||||
url: '/app/pay/generateCode/' ,
|
||||
url: '/app/pay/generateCode?num=' + num + '&level=' + level,
|
||||
method: 'get',
|
||||
pararm: {num: num},
|
||||
// param: {num: num,level:level},
|
||||
responseType: 'blob',
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询系统消息列表
|
||||
export function listMessage(query) {
|
||||
return request({
|
||||
url: '/app/message/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询系统消息详细
|
||||
export function getMessage(id) {
|
||||
return request({
|
||||
url: '/app/message/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增系统消息
|
||||
export function addMessage(data) {
|
||||
return request({
|
||||
url: '/app/message/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改系统消息
|
||||
export function updateMessage(data) {
|
||||
return request({
|
||||
url: '/app/message',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除系统消息
|
||||
export function delMessage(id) {
|
||||
return request({
|
||||
url: '/app/message/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
|
@ -9,9 +9,9 @@
|
|||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="用户" prop="userId">
|
||||
<el-select
|
||||
v-model="queryParams.userId"
|
||||
placeholder="请选择用户"
|
||||
<el-input
|
||||
v-model="queryParams.username"
|
||||
placeholder="输入用户名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
@ -42,52 +42,6 @@
|
|||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['app:dynamic:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['app:dynamic:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['app:dynamic:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['app:dynamic:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
|
|
@ -108,15 +62,20 @@
|
|||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="地区" align="center" prop="cityName" />
|
||||
<el-table-column label="地区" align="center" prop="cityName" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.provinceName }} {{ scope.row.cityName }} {{ scope.row.townName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="置顶" align="center" key="isTop" prop="isTop">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.isTop"
|
||||
active-value="0"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
inactive-value="1"
|
||||
active-text="置顶"
|
||||
inactive-text="非置顶"
|
||||
@change="handleStatusChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -204,8 +163,9 @@ import {
|
|||
getDynamic,
|
||||
delDynamic,
|
||||
addDynamic,
|
||||
updateDynamic,
|
||||
updateDynamic, changeDynamicStatus,
|
||||
} from "@/api/app/dynamic";
|
||||
import {changeUserStatus} from "@/api/system/user";
|
||||
|
||||
export default {
|
||||
name: "Dynamic",
|
||||
|
|
@ -371,6 +331,16 @@ export default {
|
|||
`dynamic_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
handleStatusChange(row) {
|
||||
let text = row.isTop === "0" ? "置顶" : "取消";
|
||||
this.$modal.confirm('确认要"' + text + '""' + row.username + '"的动态吗?').then(function() {
|
||||
return changeDynamicStatus(row.id, row.isTop);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess(text + "成功");
|
||||
}).catch(function() {
|
||||
row.isTop = row.isTop === "0" ? "1" : "0";
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -81,6 +81,27 @@
|
|||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||
<!-- <el-table-column label="id" align="center" prop="id" />-->
|
||||
<el-table-column label="举报时间" align="center" prop="createTime" />
|
||||
<el-table-column prop="imgUrl" label="举报截图">
|
||||
<template slot-scope="scope">
|
||||
<image-preview
|
||||
v-for="(imgUrl, index) in (scope.row.imgUrl ? scope.row.imgUrl : '') .split(',')"
|
||||
:key="index"
|
||||
style="width: 40px; height: 40px"
|
||||
:src="imgUrl"
|
||||
></image-preview>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="举报截图" align="center" prop="imgUrl">
|
||||
<template slot-scope="scope">
|
||||
<el-image
|
||||
v-for="(imgUrl, index) in imgUrlArray"
|
||||
:key="index"
|
||||
style="width: 40px; height: 40px"
|
||||
:src="imgUrl"
|
||||
:preview-src-list="[imgUrl]"
|
||||
></el-image>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="举报内容" height="100px" align="center" prop="content" />
|
||||
<el-table-column label="举报人" align="center" prop="username"/>
|
||||
|
||||
|
|
@ -169,6 +190,17 @@
|
|||
import { listInform, getInform, delInform, addInform, updateInform } from "@/api/app/inform";
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
imgUrlArray: function() {
|
||||
|
||||
// if (this.scope && this.scope.row && this.scope.row.imgUrl) {
|
||||
//
|
||||
// return this.scope.row.imgUrl.split(',');
|
||||
// } else {
|
||||
// return [];
|
||||
// }
|
||||
}
|
||||
},
|
||||
name: "Inform",
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,318 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['app:message:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="messageList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="通知内容" align="center" prop="content"/>
|
||||
<el-table-column
|
||||
prop="imgUrl"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="头像"
|
||||
>
|
||||
<template slot-scope="scope" class="demo-image__preview">
|
||||
<img
|
||||
:src="scope.row.imgUrl"
|
||||
width="40"
|
||||
height="40"
|
||||
class="head_pic"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" align="center" prop="type">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type === 0">系统通知</span>
|
||||
<span v-if="scope.row.type === 1">活动通知</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['app:message:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['app:message:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改系统消息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-select v-model="form.type" @change="handelShow" placeholder="请选择类型" >
|
||||
<el-option label="系统通知" :value=0></el-option>
|
||||
<el-option label="广播" :value=1></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="通知标题" prop="title" v-if="isShow">
|
||||
<el-input v-model="form.title" placeholder="请输入通知标题" :min-height="192"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="通知内容" prop="content">
|
||||
<el-input v-model="form.content" placeholder="请输入通知内容" :min-height="192"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片" prop="imgUrl" v-if="isShow">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
:action="upload.uploadUrl"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload">
|
||||
<img v-if="this.form.imgUrl" :src="this.form.imgUrl" class="avatar">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listMessage, getMessage, delMessage, addMessage, updateMessage} from "@/api/app/message";
|
||||
import {getToken} from "@/utils/auth";
|
||||
|
||||
export default {
|
||||
name: "Message",
|
||||
data() {
|
||||
return {
|
||||
isShow: true,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 系统消息表格数据
|
||||
messageList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userId: null,
|
||||
content: null,
|
||||
imgUrl: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
},
|
||||
// 表单校验
|
||||
rules: {},
|
||||
upload: {
|
||||
// 是否显示弹出层(学校导入)
|
||||
open: false,
|
||||
// 弹出层标题(学校导入)
|
||||
title: "",
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的用户数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: {Authorization: "Bearer " + getToken()},
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + "app/school/importData",
|
||||
uploadUrl: process.env.VUE_APP_BASE_API + "/app/api/oss/upload",
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
/** 查询系统消息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listMessage(this.queryParams).then(response => {
|
||||
this.messageList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
handelShow(val) {
|
||||
console.log(val);
|
||||
if (val === 0) {
|
||||
this.isShow = true;
|
||||
} else {
|
||||
this.isShow = false;
|
||||
}
|
||||
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
console.log(res);
|
||||
this.form.imgUrl = res.data;
|
||||
console.log(this.schoolImg);
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
const isJPG = file.type === 'image/jpeg';
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
|
||||
if (!isJPG) {
|
||||
this.$message.error('上传头像图片只能是 JPG 格式!');
|
||||
}
|
||||
return isJPG ;
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
userId: null,
|
||||
content: null,
|
||||
imgUrl: null,
|
||||
type:0,
|
||||
createTime: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加系统消息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getMessage(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改系统消息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateMessage(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addMessage(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除系统消息编号为"' + ids + '"的数据项?').then(function () {
|
||||
return delMessage(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('app/message/export', {
|
||||
...this.queryParams
|
||||
}, `message_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409EFF;
|
||||
}
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
line-height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
.avatar {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -4,8 +4,8 @@
|
|||
<div slot="header" class="clearfix">
|
||||
<span>今日收入总计</span>
|
||||
</div>
|
||||
<div v-model="sumCount"class="text item">
|
||||
{{ sumCount + '元' }}
|
||||
<div v-model="sumCount" class="text item">
|
||||
{{ sumCount ? sumCount : 0 + '元' }}
|
||||
</div>
|
||||
</el-card>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" style="padding-top: 30px">
|
||||
|
|
@ -37,27 +37,27 @@
|
|||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['app:order:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['app:order:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
<!-- v-hasPermi="['app:order:add']"-->
|
||||
<!-- >新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="single"-->
|
||||
<!-- @click="handleUpdate"-->
|
||||
<!-- v-hasPermi="['app:order:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
|
|
|
|||
|
|
@ -17,14 +17,6 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input
|
||||
v-model="queryParams.address"
|
||||
placeholder="请输入地址"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="学校" prop="schoolId">
|
||||
<el-select
|
||||
v-model="queryParams.schoolId"
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@
|
|||
</el-form>
|
||||
<div class="demo-drawer__footer" >
|
||||
<el-button @click="drawer = false">关闭</el-button>
|
||||
<el-button type="primary" @click="drawer = false" :loading="loading">查看动态</el-button>
|
||||
<el-button type="primary" @click="handleDynamicDetail(userDetail.username)" :loading="loading">查看动态</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
|
||||
|
|
@ -583,6 +583,16 @@ export default {
|
|||
this.download('app/user/export', {
|
||||
...this.queryParams
|
||||
}, `user_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
/** 跳转到该用户的动态列表 */
|
||||
handleDynamicDetail(row) {
|
||||
this.drawer = false;
|
||||
this.$router.push({
|
||||
path: "/app/content/dynamic",
|
||||
query: {
|
||||
username: row.username,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,14 +1,6 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="使用者" prop="userId">
|
||||
<el-input
|
||||
v-model="queryParams.userId"
|
||||
placeholder="请输入使用者"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用时间" prop="userTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.userTime"
|
||||
|
|
@ -72,9 +64,7 @@
|
|||
<el-table v-loading="loading" :data="codeList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="兑换码" align="center" prop="code" />
|
||||
<el-table-column label="使用者" align="center" prop="userId" />
|
||||
<el-table-column label="更新人" align="center" prop="updateBy" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="使用者" align="center" prop="userName" />
|
||||
<el-table-column label="使用时间" align="center" prop="userTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.userTime, '{y}-{m}-{d}') }}</span>
|
||||
|
|
@ -111,20 +101,17 @@
|
|||
<!-- 添加或修改兑换码对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="兑换码" prop="code">
|
||||
<el-input v-model="form.code" placeholder="请输入兑换码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="使用者" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入使用者" />
|
||||
</el-form-item>
|
||||
<el-form-item label="使用时间" prop="userTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.userTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择使用时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员级别" prop="level" width="500px">
|
||||
<el-select v-model="form.level" placeholder="请输入会员级别">
|
||||
<el-option label="7天试用" value="1"></el-option>
|
||||
<el-option label="连续包月" value="2"></el-option>
|
||||
<el-option label="连续包年" value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="level" width="500px">
|
||||
<el-input v-model="form.num" placeholder="请输入生成数量" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
|
|
@ -136,11 +123,12 @@
|
|||
|
||||
<script>
|
||||
import { listCode, getCode, delCode, addCode, updateCode } from "@/api/app/code";
|
||||
|
||||
import { generCode } from "@/api/app/gener"
|
||||
export default {
|
||||
name: "Code",
|
||||
data() {
|
||||
return {
|
||||
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
|
|
@ -169,10 +157,14 @@ export default {
|
|||
userTime: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
form: {
|
||||
level: null,
|
||||
num: null,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
},
|
||||
vipOptions: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -251,7 +243,7 @@ export default {
|
|||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCode(this.form).then(response => {
|
||||
generCode(this.form.num,this.form.level).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
|
|
|||
|
|
@ -28,53 +28,52 @@
|
|||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['app:vip:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['app:vip:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['app:vip:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['app:vip:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-plus"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleAdd"-->
|
||||
<!-- v-hasPermi="['app:vip:add']"-->
|
||||
<!-- >新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="single"-->
|
||||
<!-- @click="handleUpdate"-->
|
||||
<!-- v-hasPermi="['app:vip:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="danger"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="multiple"-->
|
||||
<!-- @click="handleDelete"-->
|
||||
<!-- v-hasPermi="['app:vip:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="warning"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-download"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handleExport"-->
|
||||
<!-- v-hasPermi="['app:vip:export']"-->
|
||||
<!-- >导出</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="vipList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="会员级别" align="center" prop="level" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.level === 1 ? 'primary' : scope.row.level === 2 ? 'warning' : scope.row.level === 3 ? 'success' : 'danger'">{{scope.row.level === 1 ? '7天试用' : scope.row.level === 2 ? '连续包月' : scope.row.level === 3 ? '连续包年' : '等级不存在'}}</el-tag>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,27 @@
|
|||
<template>
|
||||
<div class="home">
|
||||
<h1>欢迎来到干杯 gobig管理后台</h1>
|
||||
<p>当前版本号: {{ version }}</p>
|
||||
<hr>
|
||||
<div class="col-item">
|
||||
<h2>Latest Updates</h2>
|
||||
<ul class="update-log">
|
||||
<li>Update 1</li>
|
||||
<li>Update 2</li>
|
||||
<li>Update 3</li>
|
||||
</ul>
|
||||
</div>
|
||||
<blockquote>Thank you for visiting the management dashboard!</blockquote>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Index",
|
||||
data() {
|
||||
return {
|
||||
// 版本号
|
||||
version: "3.6.4",
|
||||
version: "1.0.0",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -18,18 +34,29 @@ export default {
|
|||
|
||||
<style scoped lang="scss">
|
||||
.home {
|
||||
blockquote {
|
||||
padding: 10px 20px;
|
||||
margin: 0 0 20px;
|
||||
font-size: 17.5px;
|
||||
border-left: 5px solid #eee;
|
||||
padding: 20px;
|
||||
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
color: #676a6c;
|
||||
overflow-x: hidden;
|
||||
h1 {
|
||||
font-size: 24px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
hr {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
border: 0;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.col-item {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
|
@ -39,31 +66,15 @@ export default {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
color: #676a6c;
|
||||
overflow-x: hidden;
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 10px;
|
||||
font-size: 26px;
|
||||
font-weight: 100;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 10px;
|
||||
|
||||
b {
|
||||
font-weight: 700;
|
||||
}
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.update-log {
|
||||
|
|
@ -75,8 +86,15 @@ export default {
|
|||
margin-inline-start: 0;
|
||||
margin-inline-end: 0;
|
||||
padding-inline-start: 40px;
|
||||
color: #555;
|
||||
}
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding: 10px 20px;
|
||||
margin: 0 0 20px;
|
||||
font-size: 17.5px;
|
||||
border-left: 5px solid #3498db;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue