7 files modified
5 files added
| | |
| | | public FebsResponse touristLogin(@RequestBody TouristLoginDto touristLoginDto) { |
| | | return dappMemberService.touristLogin(touristLoginDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "IGT获取版本信息") |
| | | @GetMapping(value = "/appVersion") |
| | | public FebsResponse appVersion() { |
| | | return new FebsResponse().success().data(dappMemberService.findAppVersion()); |
| | | } |
| | | } |
| | |
| | | import cc.mrbird.febs.common.controller.BaseController; |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.utils.FebsUtil; |
| | | import cc.mrbird.febs.dapp.chain.ChainService; |
| | | import cc.mrbird.febs.dapp.dto.PriceSettingDto; |
| | | import cc.mrbird.febs.dapp.entity.AppVersion; |
| | | import cc.mrbird.febs.dapp.entity.DappMemberEntity; |
| | | import cc.mrbird.febs.dapp.entity.DappTransferRecordEntity; |
| | | import cc.mrbird.febs.dapp.service.DappMemberService; |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.math.BigDecimal; |
| | | import java.util.HashMap; |
| | |
| | | dappMemberService.resetPassword(id); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | /** |
| | | * App版本-列表 |
| | | * |
| | | * @param appVersion |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @GetMapping("getAppVersionList") |
| | | public FebsResponse getAppVersionList(AppVersion appVersion, QueryRequest request) { |
| | | Map<String, Object> data = getDataTable(dappMemberService.getAppVersionList(appVersion, request)); |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | | |
| | | /** |
| | | * App版本-删除 |
| | | */ |
| | | @GetMapping("delAppVersion/{id}") |
| | | @ControllerEndpoint(operation = " App版本-删除", exceptionMessage = "操作失败") |
| | | public FebsResponse delAppVersion(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return dappMemberService.delCategary(id); |
| | | } |
| | | |
| | | /** |
| | | * App版本-新增 |
| | | */ |
| | | @PostMapping("addAppVersion") |
| | | @ControllerEndpoint(operation = " App版本-新增", exceptionMessage = "操作失败") |
| | | public FebsResponse addAppVersion(@Valid AppVersion appVersion) { |
| | | return dappMemberService.addAppVersion(appVersion); |
| | | } |
| | | |
| | | /** |
| | | * App版本-更新 |
| | | */ |
| | | @PostMapping("updateAppVersion") |
| | | @ControllerEndpoint(operation = "App版本-更新", exceptionMessage = "操作失败") |
| | | public FebsResponse updateAppVersion(@Valid AppVersion appVersion) { |
| | | return dappMemberService.updateAppVersion(appVersion); |
| | | } |
| | | } |
| | |
| | | import cc.mrbird.febs.common.entity.FebsConstant; |
| | | import cc.mrbird.febs.common.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.utils.RedisUtils; |
| | | import cc.mrbird.febs.dapp.entity.AppVersion; |
| | | import cc.mrbird.febs.dapp.service.DappMemberService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | |
| | | public class ViewController { |
| | | |
| | | private final RedisUtils redisUtils; |
| | | |
| | | private final DappMemberService dappMemberService; |
| | | |
| | | @GetMapping(value = "admin") |
| | | @RequiresPermissions("admin:view") |
| | |
| | | return FebsUtil.view("dapp/on-hook-plan-set"); |
| | | } |
| | | |
| | | /** |
| | | * App版本-列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("appVersionList") |
| | | @RequiresPermissions("appVersionList:view") |
| | | public String appVersionList() { |
| | | return FebsUtil.view("dapp/appVersionList"); |
| | | } |
| | | |
| | | /** |
| | | * App版本-新增 |
| | | * @return |
| | | */ |
| | | @GetMapping("appVersionAdd") |
| | | @RequiresPermissions("appVersionAdd:add") |
| | | public String appVersionAdd() { |
| | | return FebsUtil.view("dapp/appVersionAdd"); |
| | | } |
| | | |
| | | /** |
| | | * App版本-详情 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @GetMapping("appVerSionUpdate/{id}") |
| | | @RequiresPermissions("appVerSionUpdate:update") |
| | | public String appVerSionUpdate(@PathVariable long id, Model model) { |
| | | AppVersion data = dappMemberService.getAppVersionInfoById(id); |
| | | model.addAttribute("appVersion", data); |
| | | return FebsUtil.view("dapp/appVerSionUpdate"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cc.mrbird.febs.dapp.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 版本表 |
| | | **/ |
| | | @Data |
| | | @TableName("app_version") |
| | | public class AppVersion implements Serializable { |
| | | /** |
| | | * 账号状态 - 禁用 |
| | | */ |
| | | public static final Integer type_and = 1; |
| | | |
| | | /** |
| | | * 账号状态 - 启用 |
| | | */ |
| | | public static final Integer type_app = 2; |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createtime; |
| | | |
| | | private String version; |
| | | private String content; |
| | | private String address; |
| | | private Integer type; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cc.mrbird.febs.dapp.mapper; |
| | | |
| | | import cc.mrbird.febs.dapp.entity.AppVersion; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-09-27 |
| | | **/ |
| | | public interface AppVersionMapper extends BaseMapper<AppVersion> { |
| | | } |
| | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.dapp.dto.ApiMyTeammateInfoDto; |
| | | import cc.mrbird.febs.dapp.dto.TeamListDto; |
| | | import cc.mrbird.febs.dapp.entity.AppVersion; |
| | | import cc.mrbird.febs.dapp.entity.DappMemberEntity; |
| | | import cc.mrbird.febs.dapp.vo.ApiMyTeammateInfoListVo; |
| | | import cc.mrbird.febs.dapp.vo.TeamListVo; |
| | |
| | | void updateIdentityByMemberId(@Param("identity")String code, @Param("id")Long memberEntityId); |
| | | |
| | | List<DappMemberEntity> selectTotalAmountByRefererIdAndIdentity(@Param("inviteId")String inviteId, @Param("identity")String identity); |
| | | |
| | | IPage<AppVersion> getAppVersionListInPage(Page<AppVersion> page, AppVersion appVersion); |
| | | } |
| | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | | import cc.mrbird.febs.dapp.dto.*; |
| | | import cc.mrbird.febs.dapp.entity.AppVersion; |
| | | import cc.mrbird.febs.dapp.entity.DappFundFlowEntity; |
| | | import cc.mrbird.febs.dapp.entity.DappMemberEntity; |
| | | import cc.mrbird.febs.dapp.entity.DappTransferRecordEntity; |
| | |
| | | FebsResponse getBankListInPage(); |
| | | |
| | | FebsResponse addAddress(ApiAddAddressDto apiAddAddressDto); |
| | | |
| | | List<AppVersion> findAppVersion(); |
| | | |
| | | AppVersion getAppVersionInfoById(long id); |
| | | |
| | | IPage<AppVersion> getAppVersionList(AppVersion appVersion, QueryRequest request); |
| | | |
| | | FebsResponse delCategary(Long id); |
| | | |
| | | FebsResponse addAppVersion(AppVersion appVersion); |
| | | |
| | | FebsResponse updateAppVersion(AppVersion appVersion); |
| | | } |
| | |
| | | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | |
| | | // private final DappMemberService dappMemberService; |
| | | private final DappMemberAddressDao dappMemberAddressDao; |
| | | private final IgtOnHookPlanOrderDao igtOnHookPlanOrderDao; |
| | | private final AppVersionMapper appVersionMapper; |
| | | |
| | | private final RedisTemplate<String, Object> redisTemplate; |
| | | |
| | |
| | | return new FebsResponse().success().message(MessageSourceUtils.getString("Operation_001")); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<AppVersion> findAppVersion() { |
| | | return appVersionMapper.selectList(null); |
| | | } |
| | | |
| | | @Override |
| | | public AppVersion getAppVersionInfoById(long id) { |
| | | return appVersionMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<AppVersion> getAppVersionList(AppVersion appVersion, QueryRequest request) { |
| | | Page<AppVersion> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | IPage<AppVersion> appVersions = this.baseMapper.getAppVersionListInPage(page, appVersion); |
| | | return appVersions; |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse delCategary(Long id) { |
| | | AppVersion appVersion = appVersionMapper.selectById(id); |
| | | if(ObjectUtil.isEmpty(appVersion)){ |
| | | return new FebsResponse().fail().message("系统繁忙,请刷新页面重试"); |
| | | } |
| | | appVersionMapper.deleteById(id); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse addAppVersion(AppVersion appVersion) { |
| | | appVersion.setCreatetime(new Date()); |
| | | appVersionMapper.insert(appVersion); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse updateAppVersion(AppVersion appVersion) { |
| | | AppVersion appVersionBefore = appVersionMapper.selectById(appVersion.getId()); |
| | | if(ObjectUtil.isEmpty(appVersionBefore)){ |
| | | return new FebsResponse().fail().message("系统繁忙,请刷新页面重试"); |
| | | } |
| | | appVersion.setCreatetime(new Date()); |
| | | appVersionMapper.updateById(appVersion); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | public String generateAsaToken(String token) { |
| | | RSA rsa = new RSA(null, AppContants.PUBLIC_KEY); |
| | | return rsa.encryptBase64(token + "_" + System.currentTimeMillis(), KeyType.PublicKey); |
| | |
| | | and b.identity = #{identity} |
| | | |
| | | </select> |
| | | |
| | | <select id="getAppVersionListInPage" resultType="cc.mrbird.febs.dapp.entity.AppVersion"> |
| | | select a.* from app_version a |
| | | </select> |
| | | </mapper> |
| New file |
| | |
| | | <style> |
| | | #appVersion-update { |
| | | padding: 20px 25px 25px 0; |
| | | } |
| | | |
| | | #appVersion-update .layui-treeSelect .ztree li a, .ztree li span { |
| | | margin: 0 0 2px 3px !important; |
| | | } |
| | | #appVersion-update #data-permission-tree-block { |
| | | border: 1px solid #eee; |
| | | border-radius: 2px; |
| | | padding: 3px 0; |
| | | } |
| | | #appVersion-update .layui-treeSelect .ztree li span.button.switch { |
| | | top: 1px; |
| | | left: 3px; |
| | | } |
| | | #appVersion-update img{ |
| | | max-width:100px |
| | | } |
| | | |
| | | </style> |
| | | <div class="layui-fluid" id="appVersion-update"> |
| | | <form class="layui-form" action="" lay-filter="appVersion-update-form"> |
| | | <div class="layui-form-item febs-hide"> |
| | | <label class="layui-form-label febs-form-item-require">id:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="id" data-th-value="${appVersion.id}"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">版本号:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="version" lay-verify="required" |
| | | autocomplete="off" class="layui-input" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">更新内容:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="content" lay-verify="required" |
| | | autocomplete="off" class="layui-input" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">下载地址:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="address" lay-verify="required" |
| | | autocomplete="off" class="layui-input" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">类型:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="radio" name="type" value="1" title="安卓" checked=""> |
| | | <input type="radio" name="type" value="2" title="苹果"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item febs-hide"> |
| | | <button class="layui-btn" lay-submit="" lay-filter="appVersion-update-form-submit" id="submit"></button> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <script data-th-inline="javascript"> |
| | | layui.use(['febs', 'form', 'formSelects', 'validate', 'treeSelect', 'eleTree', 'laydate'], function () { |
| | | var $ = layui.$, |
| | | febs = layui.febs, |
| | | layer = layui.layer, |
| | | formSelects = layui.formSelects, |
| | | treeSelect = layui.treeSelect, |
| | | form = layui.form, |
| | | laydate = layui.laydate, |
| | | eleTree = layui.eleTree, |
| | | appVersion = [[${appVersion}]], |
| | | $view = $('#appVersion-update'), |
| | | validate = layui.validate; |
| | | |
| | | form.render(); |
| | | laydate.render({ |
| | | elem: '#febs-form-group-date' |
| | | }); |
| | | |
| | | formSelects.render(); |
| | | |
| | | |
| | | initUserValue(); |
| | | |
| | | function initUserValue() { |
| | | form.val("appVersion-update-form", { |
| | | "id": appVersion.id, |
| | | "version": appVersion.version, |
| | | "content": appVersion.content, |
| | | "address": appVersion.address, |
| | | "type": appVersion.type |
| | | }); |
| | | } |
| | | |
| | | form.on('submit(appVersion-update-form-submit)', function (data) { |
| | | febs.post(ctx + 'member/updateAppVersion', data.field, function () { |
| | | layer.closeAll(); |
| | | febs.alert.success('操作成功'); |
| | | $('#febs-appVersion').find('#reset').click(); |
| | | }); |
| | | return false; |
| | | }); |
| | | }); |
| | | </script> |
| New file |
| | |
| | | <style> |
| | | #appVersion-add { |
| | | padding: 20px 25px 25px 0; |
| | | } |
| | | |
| | | #appVersion-add .layui-treeSelect .ztree li a, .ztree li span { |
| | | margin: 0 0 2px 3px !important; |
| | | } |
| | | #appVersion-add #data-permission-tree-block { |
| | | border: 1px solid #eee; |
| | | border-radius: 2px; |
| | | padding: 3px 0; |
| | | } |
| | | #appVersion-add .layui-treeSelect .ztree li span.button.switch { |
| | | top: 1px; |
| | | left: 3px; |
| | | } |
| | | #appVersion-add img{ |
| | | max-width:100px |
| | | } |
| | | |
| | | </style> |
| | | <div class="layui-fluid" id="appVersion-add"> |
| | | <form class="layui-form" action="" lay-filter="appVersion-add-form"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">版本号:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="version" lay-verify="required" |
| | | autocomplete="off" class="layui-input" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">更新内容:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="content" lay-verify="required" |
| | | autocomplete="off" class="layui-input" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">下载地址:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" name="address" lay-verify="required" |
| | | autocomplete="off" class="layui-input" > |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label febs-form-item-require">类型:</label> |
| | | <div class="layui-input-block"> |
| | | <input type="radio" name="type" value="1" title="安卓" checked=""> |
| | | <input type="radio" name="type" value="2" title="苹果"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item febs-hide"> |
| | | <button class="layui-btn" lay-submit="" lay-filter="appVersion-add-form-submit" id="submit"></button> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <script data-th-inline="javascript"> |
| | | layui.use(['febs', 'form', 'formSelects', 'validate', 'treeSelect', 'eleTree', 'laydate'], function () { |
| | | var $ = layui.$, |
| | | febs = layui.febs, |
| | | layer = layui.layer, |
| | | formSelects = layui.formSelects, |
| | | treeSelect = layui.treeSelect, |
| | | form = layui.form, |
| | | laydate = layui.laydate, |
| | | eleTree = layui.eleTree, |
| | | $view = $('#appVersion-add'), |
| | | validate = layui.validate; |
| | | |
| | | form.render(); |
| | | laydate.render({ |
| | | elem: '#febs-form-group-date' |
| | | }); |
| | | |
| | | formSelects.render(); |
| | | |
| | | form.on('submit(appVersion-add-form-submit)', function (data) { |
| | | febs.post(ctx + 'member/addAppVersion', data.field, function () { |
| | | layer.closeAll(); |
| | | febs.alert.success('操作成功'); |
| | | $('#febs-appVersion').find('#reset').click(); |
| | | }); |
| | | return false; |
| | | }); |
| | | }); |
| | | </script> |
| New file |
| | |
| | | <div class="layui-fluid layui-anim febs-anim" id="febs-appVersion" lay-title="版本管理"> |
| | | <div class="layui-row febs-container"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body febs-table-full"> |
| | | <form class="layui-form layui-table-form" lay-filter="user-table-form"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area"> |
| | | <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="add"> |
| | | 新增 |
| | | </div> |
| | | <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain table-action" id="query"> |
| | | <i class="layui-icon"></i> |
| | | </div> |
| | | <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="reset"> |
| | | <i class="layui-icon"></i> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | <table lay-filter="appVersionTable" lay-data="{id: 'appVersionTable'}"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 表格操作栏 start --> |
| | | <script type="text/html" id="user-option"> |
| | | <span shiro:lacksPermission="user:view,user:update,user:delete"> |
| | | <span class="layui-badge-dot febs-bg-orange"></span> 无权限 |
| | | </span> |
| | | <a lay-event="edit" shiro:hasPermission="user:update"><i |
| | | class="layui-icon febs-edit-area febs-blue"></i></a> |
| | | </script> |
| | | <!-- 表格操作栏 end --> |
| | | <script data-th-inline="none" type="text/javascript"> |
| | | // 引入组件并初始化 |
| | | layui.use([ 'jquery', 'form', 'table', 'febs'], function () { |
| | | var $ = layui.jquery, |
| | | febs = layui.febs, |
| | | form = layui.form, |
| | | table = layui.table, |
| | | $view = $('#febs-appVersion'), |
| | | $query = $view.find('#query'), |
| | | $add = $view.find('#add'), |
| | | $reset = $view.find('#reset'), |
| | | $searchForm = $view.find('form'), |
| | | sortObject = {field: 'phone', type: null}, |
| | | tableIns; |
| | | |
| | | form.render(); |
| | | |
| | | // 表格初始化 |
| | | initTable(); |
| | | |
| | | // 初始化表格操作栏各个按钮功能 |
| | | table.on('tool(appVersionTable)', function (obj) { |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | if (layEvent === 'appVerSionUpdate') { |
| | | febs.modal.open('编辑', 'dappView/appVerSionUpdate/' + data.id, { |
| | | btn: ['提交', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#appVersion-update').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | } |
| | | if (layEvent === 'delAppVersion') { |
| | | febs.modal.confirm('删除', '确认删除?', function () { |
| | | delAppVersion(data.id); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | function delAppVersion(id) { |
| | | febs.get(ctx + 'member/delAppVersion/' + id, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | |
| | | // 查询按钮 |
| | | $query.on('click', function () { |
| | | var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type}); |
| | | tableIns.reload({where: params, page: {curr: 1}}); |
| | | }); |
| | | |
| | | // 刷新按钮 |
| | | $reset.on('click', function () { |
| | | $searchForm[0].reset(); |
| | | sortObject.type = 'null'; |
| | | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); |
| | | }); |
| | | |
| | | $add.on('click', function () { |
| | | febs.modal.open('新增', 'dappView/appVersionAdd/', { |
| | | btn: ['提交', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#appVersion-add').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | function initTable() { |
| | | tableIns = febs.table.init({ |
| | | elem: $view.find('table'), |
| | | id: 'appVersionTable', |
| | | url: ctx + 'member/getAppVersionList', |
| | | cols: [[ |
| | | {field: 'id', title: '', minWidth: 10,align:'center'}, |
| | | {field: 'version', title: '版本号', minWidth: 120,align:'center'}, |
| | | {field: 'content', title: '更新内容', minWidth: 120,align:'center'}, |
| | | {field: 'address', title: '下载地址', minWidth: 200,align:'center'}, |
| | | {field: 'createtime', title: '更新时间', minWidth: 200,align:'center'}, |
| | | {field: 'type', title: '类型', |
| | | templet: function (d) { |
| | | if(d.type === 1){ |
| | | return '<span>安卓</span>' |
| | | }else if(d.type === 2){ |
| | | return '<span>苹果</span>' |
| | | }else{ |
| | | return '' |
| | | } |
| | | }, minWidth: 100,align:'center'}, |
| | | {title: '操作', |
| | | templet: function (d) { |
| | | return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="appVerSionUpdate" shiro:hasPermission="user:update">编辑</button>' |
| | | +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="delAppVersion" shiro:hasPermission="user:update">删除</button>' |
| | | },minWidth: 300,align:'center'} |
| | | ]] |
| | | }); |
| | | } |
| | | |
| | | // 获取查询参数 |
| | | function getQueryParams() { |
| | | return { |
| | | }; |
| | | } |
| | | |
| | | }) |
| | | </script> |