..
This commit is contained in:
+3
-3
@@ -67,9 +67,8 @@ public class ClientAuthController {
|
||||
@ApiOperation(value = "注册", nickname = "/register", httpMethod = "POST")
|
||||
public Result register(ClientRegisterBody registerBody) {
|
||||
try {
|
||||
// String token = clientAuthService.doRegister(registerBody);
|
||||
// return Result.success().addData(token);
|
||||
return Result.success();
|
||||
String token = clientAuthService.doRegister(registerBody);
|
||||
return Result.success().addData(token);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
return Result.error(e.getMessage());
|
||||
@@ -130,6 +129,7 @@ public class ClientAuthController {
|
||||
@SaCheckLogin(type = StpClientUtil.TYPE)
|
||||
public Result info() {
|
||||
Client_user user = dao.fetch(Client_user.class, StpClientUtil.STP.getLoginIdAsLong());
|
||||
dao.fetchLinks(user, "unit");
|
||||
return Result.success(user);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.client.auth.models;
|
||||
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import com.budwk.app.sys.models.Sys_unit;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
@@ -62,4 +63,7 @@ public class Client_user extends BaseModel implements Serializable {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||
@Comment("openId")
|
||||
private String openId;
|
||||
|
||||
@One(field = "unitId")
|
||||
private Sys_unit unit;
|
||||
}
|
||||
|
||||
+4
-1
@@ -92,7 +92,10 @@ public class ClientActivityController {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.or(ActUser::getUserId, "=", StpClientUtil.STP.getLoginIdAsLong());
|
||||
group.or(ActUser::getSignUpUserId, "=", StpClientUtil.STP.getLoginIdAsLong());
|
||||
List<ActUser> list = dao.query(ActUser.class, Cnd.where(ActUser::getActivityId, "=", activityId).and(group));
|
||||
ActUser actUser = dao.fetch(ActUser.class, Cnd.where(ActUser::getActivityId, "=", activityId).and(group));
|
||||
|
||||
List<ActUser> list = dao.query(ActUser.class, Cnd.where(ActUser::getActivityId, "=", activityId)
|
||||
.and(ActUser::getSignUpUserId, "=", actUser.getSignUpUserId()));
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ jetty:
|
||||
#结合ftp使用,或用nginx代理ftp路径
|
||||
#staticPath: E:/project/NutzWk/upload
|
||||
#开发模式静态资源
|
||||
staticPathLocal: E:/projects/hmc_gbhd/src/main/resources/static
|
||||
staticPathLocal: E:/project/hmd_gbhd/src/main/resources/static
|
||||
|
||||
security:
|
||||
tokenName: token
|
||||
@@ -69,7 +69,7 @@ xsssql:
|
||||
beetl:
|
||||
RESOURCE:
|
||||
#本地路径,开发时设置本地路径,便于调试
|
||||
rootLocal: E:/projects/hmc_gbhd/src/main/resources/views/
|
||||
rootLocal: E:/project/hmd_gbhd/src/main/resources/views/
|
||||
root: views/
|
||||
DELIMITER_STATEMENT_START: '<!--#'
|
||||
DELIMITER_STATEMENT_END: '#-->'
|
||||
|
||||
+1
File diff suppressed because one or more lines are too long
@@ -37,6 +37,8 @@
|
||||
<script src="${base!}/assets/platform/plugins/adminLte/adminlte.min.js"></script>
|
||||
<!-- echarts -->
|
||||
<script src="${base!}/assets/platform/plugins/echarts/echarts.min.js"></script>
|
||||
<!-- qrcode -->
|
||||
<script src="${base!}/assets/platform/plugins/qrcode/qrcode.min.js"></script>
|
||||
<!-- 自定义工具类 -->
|
||||
<script src="${base!}/assets/platform/module/mixins/initTableMixins.js?v=1.0.0"></script>
|
||||
<!-- main -->
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
const actQrCode = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog title="二维码" :visible.sync="visible" width="500px">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="活动报名二维码" name="signUp">
|
||||
<div id="signUpCode" style="width:150px; height:150px;margin: 0 auto"></div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="活动签到二维码" name="signIn">
|
||||
<div id="signInCode" style="width:150px; height:150px;margin: 0 auto"></div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button size="small" @click="visible = false">取 消</el-button>
|
||||
<el-button size="small" type="primary" @click="download">下载</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
actId: "",
|
||||
activeName: "signUp"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
|
||||
},
|
||||
onOpen(id) {
|
||||
this.visible = true
|
||||
this.actId = id
|
||||
this.$nextTick(() => {
|
||||
this.renderCode()
|
||||
})
|
||||
},
|
||||
renderCode() {
|
||||
let signUpCode = new QRCode(document.getElementById("signUpCode"), {
|
||||
width: 150,
|
||||
height: 150
|
||||
})
|
||||
signUpCode.makeCode("/pages/activity/detail/index?id=" + this.actId)
|
||||
|
||||
let signInCode = new QRCode(document.getElementById("signInCode"), {
|
||||
width: 150,
|
||||
height: 150
|
||||
})
|
||||
signInCode.makeCode("/pages/activity/scan-sign/index?id=" + this.actId)
|
||||
},
|
||||
download() {
|
||||
// 获取base64
|
||||
const src = $("#" + this.activeName + "Code img").attr("src")
|
||||
// 利用a标签进行下载
|
||||
const a = document.createElement("a")
|
||||
a.href = src
|
||||
a.download = (this.activeName === "signUp" ? "报名" : "签到") + "二维码.png"
|
||||
a.click()
|
||||
a.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,7 @@ layout("/layouts/platform_1.html"){
|
||||
<el-table-column label="活动结束时间" prop="endTime"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="250">
|
||||
<template #default="scope">
|
||||
<el-button type="text" @click="$refs.actQrCodeRef.onOpen(scope.row.id)">二维码</el-button>
|
||||
<el-button type="text" @click="$refs.addOrUpdateRef.onOpen(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" @click="$refs.itemFormRef.onOpen(scope.row.id)">项目管理</el-button>
|
||||
<el-button type="text" class="text-danger" @click="onTableRowDelete(scope.row.id)">删除</el-button>
|
||||
@@ -47,17 +48,20 @@ layout("/layouts/platform_1.html"){
|
||||
</el-card>
|
||||
<add-or-update ref="addOrUpdateRef" @refresh="doSearch"></add-or-update>
|
||||
<item-form ref="itemFormRef"></item-form>
|
||||
<act-qr-code ref="actQrCodeRef"></act-qr-code>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('addOrUpdate.js'){}#-->
|
||||
<!--#include('itemForm.js'){}#-->
|
||||
<!--#include('actQrCode.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"add-or-update": addOrUpdate,
|
||||
"item-form": itemForm
|
||||
"item-form": itemForm,
|
||||
"act-qr-code": actQrCode
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user