diff --git a/.gitignore b/.gitignore index e4dfe26..d8d2075 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /log/ -/target/ \ No newline at end of file +/target/ +.idea/ \ No newline at end of file diff --git a/README.md b/README.md index e69de29..c5238b1 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,2 @@ + +面板网站 https://zuramai.github.io/mazer/demo/account-profile.html \ No newline at end of file diff --git a/pom.xml b/pom.xml index b870633..9a021c0 100644 --- a/pom.xml +++ b/pom.xml @@ -50,6 +50,12 @@ jfinal 5.1.2 + + + cn.hutool + hutool-all + 5.8.27 + @@ -115,7 +121,7 @@ mysql mysql-connector-java - 8.0.33 + 8.0.24 diff --git a/src/main/java/com/bt/common/JFinalClubConfig.java b/src/main/java/com/bt/common/JFinalClubConfig.java index 4ba3114..ef88d9e 100644 --- a/src/main/java/com/bt/common/JFinalClubConfig.java +++ b/src/main/java/com/bt/common/JFinalClubConfig.java @@ -171,6 +171,7 @@ public class JFinalClubConfig extends JFinalConfig { me.addSharedMethod(AdminAuthKit.class); me.addSharedFunction("/_view/common/__layout.html"); + me.addSharedFunction("/_view/common/__official_layout.html"); me.addSharedFunction("/_view/common/__front_layout.html"); me.addSharedFunction("/_view/common/__b5layout.html"); me.addSharedFunction("/_view/common/_paginate.html"); diff --git a/src/main/java/com/bt/common/_all_sqls.sql b/src/main/java/com/bt/common/_all_sqls.sql index 5f19e99..e274291 100644 --- a/src/main/java/com/bt/common/_all_sqls.sql +++ b/src/main/java/com/bt/common/_all_sqls.sql @@ -8,6 +8,11 @@ #include("/com/bt/index/index.sql") #end +#namespace("product") +#include("/com/bt/product/product.sql") +#end + + #namespace("project") #include("/com/bt/project/project.sql") #end diff --git a/src/main/java/com/bt/common/model/Account.java b/src/main/java/com/bt/common/model/Account.java index a8754a8..59873eb 100644 --- a/src/main/java/com/bt/common/model/Account.java +++ b/src/main/java/com/bt/common/model/Account.java @@ -29,6 +29,11 @@ public class Account extends BaseAccount { public static final int STATUS_REG = 0; // 注册、未激活 public static final int STATUS_OK = 1; // 正常、已激活 + public static final int REAL_NAME_YES = 1; //实名认证 + public static final int REAL_NAME_NO = 0; //实名认证 + + + public boolean isStatusOk() { return getStatus() == STATUS_OK; } diff --git a/src/main/java/com/bt/common/model/_Generator.java b/src/main/java/com/bt/common/model/_Generator.java index 1c43147..e5572fc 100644 --- a/src/main/java/com/bt/common/model/_Generator.java +++ b/src/main/java/com/bt/common/model/_Generator.java @@ -14,9 +14,14 @@ package com.bt.common.model; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.Date; + import com.jfinal.kit.PathKit; import com.jfinal.plugin.activerecord.dialect.MysqlDialect; import com.jfinal.plugin.activerecord.generator.Generator; +import com.jfinal.plugin.activerecord.generator.TypeMapping; import com.jfinal.plugin.druid.DruidPlugin; import com.bt.common.JFinalClubConfig; import javax.sql.DataSource; @@ -56,18 +61,15 @@ public class _Generator { } public static void main(String[] args) { - // base model 所使用的包名 - String baseModelPackageName = "com.bt.common.model.base"; - // base model 文件保存路径 - String baseModelOutputDir = PathKit.getWebRootPath() - + "/src/main/java/com/bt/common/model/base"; - - System.out.println("输出路径:"+ baseModelOutputDir); - // model 所使用的包名 (MappingKit 默认使用的包名) String modelPackageName = "com.bt.common.model"; + // base model 所使用的包名 + String baseModelPackageName = modelPackageName + ".base"; + // base model 文件保存路径 + String baseModelOutputDir = System.getProperty("user.dir") + "/src/main/java/" + baseModelPackageName.replace('.', '/');; // model 文件保存路径 (MappingKit 与 DataDictionary 文件默认保存路径) String modelOutputDir = baseModelOutputDir + "/.."; + System.out.println("输出路径:"+ baseModelOutputDir); // 创建生成器 Generator gen = new Generator(getDataSource(), baseModelPackageName, baseModelOutputDir, modelPackageName, modelOutputDir); @@ -91,6 +93,13 @@ public class _Generator { // 设置需要被移除的表名前缀用于生成modelName。例如表名 "osc_user",移除前缀 "osc_"后生成的model名为 "User"而非 OscUser // gernerator.setRemovedTableNamePrefixes("t_"); + + // 将 mysql 8 以及其它原因之下生成 jdk 8 日期类型映射为 java.util.Date,便于兼容老项目,也便于习惯使用 java.util.Date 的同学 + TypeMapping tm = new TypeMapping(); + tm.addMapping(LocalDateTime.class, LocalDateTime.class); + tm.addMapping(LocalDate.class, LocalDateTime.class); + //tm.addMapping(LocalTime.class, LocalDateTime.class); // LocalTime 暂时不变 + gen.setTypeMapping(tm); // 生成 gen.generate(); diff --git a/src/main/java/com/bt/common/model/_MappingKit.java b/src/main/java/com/bt/common/model/_MappingKit.java index 5474682..a2ce878 100644 --- a/src/main/java/com/bt/common/model/_MappingKit.java +++ b/src/main/java/com/bt/common/model/_MappingKit.java @@ -18,6 +18,7 @@ public class _MappingKit { public static void mapping(ActiveRecordPlugin arp) { arp.addMapping("account", "id", Account.class); arp.addMapping("auth_code", "id", AuthCode.class); + arp.addMapping("device", "id", Device.class); // Composite Primary Key order: mainMenu,subMenu arp.addMapping("document", "mainMenu,subMenu", Document.class); arp.addMapping("download", "id", Download.class); @@ -27,8 +28,12 @@ public class _MappingKit { arp.addMapping("feedback_reply", "id", FeedbackReply.class); arp.addMapping("message", "id", Message.class); arp.addMapping("news_feed", "id", NewsFeed.class); + arp.addMapping("order", "id", Order.class); + arp.addMapping("order_detail", "id", OrderDetail.class); arp.addMapping("permission", "id", Permission.class); + arp.addMapping("product", "id", Product.class); arp.addMapping("project", "id", Project.class); + arp.addMapping("realname_verification", "id", RealnameVerification.class); arp.addMapping("refer_me", "id", ReferMe.class); arp.addMapping("remind", "accountId", Remind.class); arp.addMapping("role", "id", Role.class); @@ -39,3 +44,4 @@ public class _MappingKit { } } + diff --git a/src/main/java/com/bt/common/model/base/BaseAccount.java b/src/main/java/com/bt/common/model/base/BaseAccount.java index 6559b1c..b308d6a 100644 --- a/src/main/java/com/bt/common/model/base/BaseAccount.java +++ b/src/main/java/com/bt/common/model/base/BaseAccount.java @@ -95,4 +95,19 @@ public abstract class BaseAccount> extends Model imp return getInt("likeCount"); } + /** + * 是否实名认知 0:未完成 1完成 + */ + public void setRealnameVerified(java.lang.Integer realnameVerified) { + set("realnameVerified", realnameVerified); + } + + /** + * 是否实名认知 0:未完成 1完成 + */ + public java.lang.Integer getRealnameVerified() { + return getInt("realnameVerified"); + } + } + diff --git a/src/main/java/com/bt/common/model/base/BaseAuthCode.java b/src/main/java/com/bt/common/model/base/BaseAuthCode.java index 40117ec..7a4c659 100644 --- a/src/main/java/com/bt/common/model/base/BaseAuthCode.java +++ b/src/main/java/com/bt/common/model/base/BaseAuthCode.java @@ -42,3 +42,4 @@ public abstract class BaseAuthCode> extends Model i } } + diff --git a/src/main/java/com/bt/common/model/base/BaseDocument.java b/src/main/java/com/bt/common/model/base/BaseDocument.java index 4cb4eef..b60f2cc 100644 --- a/src/main/java/com/bt/common/model/base/BaseDocument.java +++ b/src/main/java/com/bt/common/model/base/BaseDocument.java @@ -78,3 +78,4 @@ public abstract class BaseDocument> extends Model i } } + diff --git a/src/main/java/com/bt/common/model/base/BaseDownload.java b/src/main/java/com/bt/common/model/base/BaseDownload.java index 1e197bc..6796b94 100644 --- a/src/main/java/com/bt/common/model/base/BaseDownload.java +++ b/src/main/java/com/bt/common/model/base/BaseDownload.java @@ -94,3 +94,4 @@ public abstract class BaseDownload> extends Model i } } + diff --git a/src/main/java/com/bt/common/model/base/BaseDownloadLog.java b/src/main/java/com/bt/common/model/base/BaseDownloadLog.java index aee9d3d..ac8f250 100644 --- a/src/main/java/com/bt/common/model/base/BaseDownloadLog.java +++ b/src/main/java/com/bt/common/model/base/BaseDownloadLog.java @@ -50,3 +50,4 @@ public abstract class BaseDownloadLog> extends Mode } } + diff --git a/src/main/java/com/bt/common/model/base/BaseFavorite.java b/src/main/java/com/bt/common/model/base/BaseFavorite.java index 3a48140..8ddeef8 100644 --- a/src/main/java/com/bt/common/model/base/BaseFavorite.java +++ b/src/main/java/com/bt/common/model/base/BaseFavorite.java @@ -68,3 +68,4 @@ public abstract class BaseFavorite> extends Model i } } + diff --git a/src/main/java/com/bt/common/model/base/BaseFeedback.java b/src/main/java/com/bt/common/model/base/BaseFeedback.java index 378f09b..b36a39a 100644 --- a/src/main/java/com/bt/common/model/base/BaseFeedback.java +++ b/src/main/java/com/bt/common/model/base/BaseFeedback.java @@ -90,3 +90,4 @@ public abstract class BaseFeedback> extends Model i } } + diff --git a/src/main/java/com/bt/common/model/base/BaseFeedbackReply.java b/src/main/java/com/bt/common/model/base/BaseFeedbackReply.java index 1a62c05..279a219 100644 --- a/src/main/java/com/bt/common/model/base/BaseFeedbackReply.java +++ b/src/main/java/com/bt/common/model/base/BaseFeedbackReply.java @@ -58,3 +58,4 @@ public abstract class BaseFeedbackReply> extends } } + diff --git a/src/main/java/com/bt/common/model/base/BaseMessage.java b/src/main/java/com/bt/common/model/base/BaseMessage.java index 0d587db..db685f9 100644 --- a/src/main/java/com/bt/common/model/base/BaseMessage.java +++ b/src/main/java/com/bt/common/model/base/BaseMessage.java @@ -110,3 +110,4 @@ public abstract class BaseMessage> extends Model imp } } + diff --git a/src/main/java/com/bt/common/model/base/BaseNewsFeed.java b/src/main/java/com/bt/common/model/base/BaseNewsFeed.java index 2443ab1..afb6fa5 100644 --- a/src/main/java/com/bt/common/model/base/BaseNewsFeed.java +++ b/src/main/java/com/bt/common/model/base/BaseNewsFeed.java @@ -96,3 +96,4 @@ public abstract class BaseNewsFeed> extends Model i } } + diff --git a/src/main/java/com/bt/common/model/base/BasePermission.java b/src/main/java/com/bt/common/model/base/BasePermission.java index f23bbe4..a0f679e 100644 --- a/src/main/java/com/bt/common/model/base/BasePermission.java +++ b/src/main/java/com/bt/common/model/base/BasePermission.java @@ -42,3 +42,4 @@ public abstract class BasePermission> extends Model< } } + diff --git a/src/main/java/com/bt/common/model/base/BaseProject.java b/src/main/java/com/bt/common/model/base/BaseProject.java index f22d4ef..ad87433 100644 --- a/src/main/java/com/bt/common/model/base/BaseProject.java +++ b/src/main/java/com/bt/common/model/base/BaseProject.java @@ -90,3 +90,4 @@ public abstract class BaseProject> extends Model imp } } + diff --git a/src/main/java/com/bt/common/model/base/BaseReferMe.java b/src/main/java/com/bt/common/model/base/BaseReferMe.java index 53eba29..086350e 100644 --- a/src/main/java/com/bt/common/model/base/BaseReferMe.java +++ b/src/main/java/com/bt/common/model/base/BaseReferMe.java @@ -68,3 +68,4 @@ public abstract class BaseReferMe> extends Model imp } } + diff --git a/src/main/java/com/bt/common/model/base/BaseRemind.java b/src/main/java/com/bt/common/model/base/BaseRemind.java index ebfd93e..d577030 100644 --- a/src/main/java/com/bt/common/model/base/BaseRemind.java +++ b/src/main/java/com/bt/common/model/base/BaseRemind.java @@ -66,3 +66,4 @@ public abstract class BaseRemind> extends Model imple } } + diff --git a/src/main/java/com/bt/common/model/base/BaseRole.java b/src/main/java/com/bt/common/model/base/BaseRole.java index 4768c50..ff7be65 100644 --- a/src/main/java/com/bt/common/model/base/BaseRole.java +++ b/src/main/java/com/bt/common/model/base/BaseRole.java @@ -34,3 +34,4 @@ public abstract class BaseRole> extends Model implement } } + diff --git a/src/main/java/com/bt/common/model/base/BaseSession.java b/src/main/java/com/bt/common/model/base/BaseSession.java index 341d66f..a915014 100644 --- a/src/main/java/com/bt/common/model/base/BaseSession.java +++ b/src/main/java/com/bt/common/model/base/BaseSession.java @@ -34,3 +34,4 @@ public abstract class BaseSession> extends Model imp } } + diff --git a/src/main/java/com/bt/common/model/base/BaseShare.java b/src/main/java/com/bt/common/model/base/BaseShare.java index 7baf730..d813306 100644 --- a/src/main/java/com/bt/common/model/base/BaseShare.java +++ b/src/main/java/com/bt/common/model/base/BaseShare.java @@ -90,3 +90,4 @@ public abstract class BaseShare> extends Model impleme } } + diff --git a/src/main/java/com/bt/common/model/base/BaseShareReply.java b/src/main/java/com/bt/common/model/base/BaseShareReply.java index 93975b4..0d39e1b 100644 --- a/src/main/java/com/bt/common/model/base/BaseShareReply.java +++ b/src/main/java/com/bt/common/model/base/BaseShareReply.java @@ -58,3 +58,4 @@ public abstract class BaseShareReply> extends Model< } } + diff --git a/src/main/java/com/bt/common/model/base/BaseTaskList.java b/src/main/java/com/bt/common/model/base/BaseTaskList.java index a53d754..63f7406 100644 --- a/src/main/java/com/bt/common/model/base/BaseTaskList.java +++ b/src/main/java/com/bt/common/model/base/BaseTaskList.java @@ -62,3 +62,4 @@ public abstract class BaseTaskList> extends Model i } } + diff --git a/src/main/java/com/bt/common/realname/RealnameService.java b/src/main/java/com/bt/common/realname/RealnameService.java new file mode 100644 index 0000000..8005ff7 --- /dev/null +++ b/src/main/java/com/bt/common/realname/RealnameService.java @@ -0,0 +1,225 @@ +package com.bt.common.realname; + +import java.time.LocalDateTime; + +import cn.hutool.core.date.DatePattern; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.text.StrFormatter; +import cn.hutool.core.util.RandomUtil; +import cn.hutool.core.util.StrUtil; +import com.alipay.api.AlipayApiException; +import com.alipay.api.AlipayClient; +import com.alipay.api.AlipayConfig; +import com.alipay.api.DefaultAlipayClient; +import com.alipay.api.domain.DatadigitalFincloudGeneralsaasFaceCertifyInitializeModel; +import com.alipay.api.domain.DatadigitalFincloudGeneralsaasFaceCertifyQueryModel; +import com.alipay.api.domain.OpenCertifyIdentifyInfo; +import com.alipay.api.domain.OpenCertifyMerchantConfigs; +import com.alipay.api.request.DatadigitalFincloudGeneralsaasFaceCertifyInitializeRequest; +import com.alipay.api.request.DatadigitalFincloudGeneralsaasFaceCertifyQueryRequest; +import com.alipay.api.request.DatadigitalFincloudGeneralsaasFaceCertifyVerifyRequest; +import com.alipay.api.response.DatadigitalFincloudGeneralsaasFaceCertifyInitializeResponse; +import com.alipay.api.response.DatadigitalFincloudGeneralsaasFaceCertifyQueryResponse; +import com.alipay.api.response.DatadigitalFincloudGeneralsaasFaceCertifyVerifyResponse; +import com.bt.common.model.Account; +import com.bt.common.model.RealnameVerification; +import com.jfinal.kit.PropKit; +import com.jfinal.kit.Ret; + +/** + * 实名认证业务 + */ +public class RealnameService { + private RealnameVerification dao = new RealnameVerification().dao(); + + public RealnameVerification getByAccountId(Integer accountId, String columns) { + return dao.findFirst("select " + columns +" from realname_verification where yn=1 and accountId=? limit 1", accountId); + } + public Ret doRealName(RealnameVerification realnameVerification){ + realnameVerification.setRealname(realnameVerification.getRealname().trim()); + RealnameVerification oldRealName = getByAccountId(realnameVerification.getAccountId(), "id, realname, idCard, status, submitDate, certifyId, certifyUrl," + + "certifyUrlExpireAt"); + if (oldRealName != null) { + if (oldRealName.getStatus() == RealnameVerification.STATUS_WAIT) { + System.out.println(StrUtil.equals(realnameVerification.getRealname(), oldRealName.getRealname())); + if (StrUtil.equals(realnameVerification.getRealname(), oldRealName.getRealname())&&StrUtil.equals(realnameVerification.getIdCard(), + oldRealName.getIdCard())&&oldRealName.getCertifyUrlExpireAt()>System.currentTimeMillis()){ + return Ret.ok("certifyUrl", oldRealName.getCertifyUrl()).set("certifyId", oldRealName.getCertifyId()); + } else { + Ret ret = alipayFaceVerify(realnameVerification.getRealname(), realnameVerification.getIdCard()); + if (ret.isOk()){ + RealnameVerification upRealName = new RealnameVerification(); + upRealName.setId(oldRealName.getId()); + String certifyId = ret.getStr("certifyId"); + String certifyUrl = ret.getStr("certifyUrl"); + long et = 3600*1000; // 使用 long et 3600秒(1小时) x 20 + long expireAt = System.currentTimeMillis() + (et * 20); + System.out.println(expireAt); + upRealName.setSubmitDate(LocalDateTime.now()); + upRealName.setCertifyId(certifyId); + upRealName.setCertifyUrl(certifyUrl); + upRealName.setCertifyUrlExpireAt(expireAt); + upRealName.update(); + return Ret.ok("certifyUrl", certifyUrl).set("certifyId", certifyId); + }else { + return Ret.fail("实名认证异常,请重试或联系管理员"); + } + } + } else { + return Ret.ok("msg", "已认证过无须再次认证"); + } + } else { + //调用支付宝实名获取链接 + Ret ret = alipayFaceVerify(realnameVerification.getRealname(), realnameVerification.getIdCard()); + System.out.println(ret); + if (ret.isOk()){ + String certifyId = ret.getStr("certifyId"); + String certifyUrl = ret.getStr("certifyUrl"); + long et = 3600*1000; // 使用 long et 3600秒(1小时) x 20 + long expireAt = System.currentTimeMillis() + (et * 20); + realnameVerification.setStatus(RealnameVerification.STATUS_WAIT); + realnameVerification.setSubmitDate(LocalDateTime.now()); + realnameVerification.setCertifyId(certifyId); + realnameVerification.setCertifyUrl(certifyUrl); + realnameVerification.setCertifyUrlExpireAt(expireAt); + realnameVerification.setCreateTime(LocalDateTime.now()); + realnameVerification.save(); + return Ret.ok("certifyUrl", certifyUrl).set("certifyId", certifyId); + } else { + return Ret.fail("实名认证异常,请重试或联系管理员"); + } + } + } + + public Ret queryRealName(Integer accountId){ + RealnameVerification realName = getByAccountId(accountId, "id, realname,idCard,status,submitDate, certifyId, certifyUrl"); + if (realName==null){ + return Ret.fail("实名认证查询异常,请联系管理员"); + } + if(StrUtil.isBlank(realName.getCertifyId())){ + return Ret.fail("实名认证查询异常,请联系管理员"); + } + Ret ret = alipayFaceQuery(realName.getCertifyId()); + if (ret.isOk()){ + String passed = ret.getStr("passed"); + if ("T".equals(passed)){ + RealnameVerification upRealName = new RealnameVerification(); + upRealName.setId(realName.getId()); + upRealName.setStatus(RealnameVerification.STATUS_SUCCESS); + Account account = new Account(); + account.setRealnameVerified(Account.REAL_NAME_YES); + account.setId(accountId); + account.update(); + upRealName.update(); + return Ret.ok(); + }else { + return Ret.fail("未完成实名认证或认证不通过,请重新扫码认证"); + } + }else { + return Ret.fail("实名认证查询异常,请重试或联系管理员"); + } + } + + + + + private Ret alipayFaceVerify(String realName, String idCard) { + try{ + String randomStr = RandomUtil.randomString(6); + String outerOrderNo = StrFormatter.format("BT{}{}", DateUtil.format(DateUtil.date(), DatePattern.PURE_DATETIME_MS_PATTERN), randomStr); + System.out.println("outerOrderNo"+ outerOrderNo); + DatadigitalFincloudGeneralsaasFaceCertifyInitializeResponse response = getDatadigitalFincloudGeneralsaasFaceCertifyInitializeResponse( + realName, idCard, outerOrderNo); + if (response.isSuccess()) { + String certifyId = response.getCertifyId(); + DatadigitalFincloudGeneralsaasFaceCertifyVerifyResponse verifyResponse = + getDatadigitalFincloudGeneralsaasFaceCertifyVerifyResponse(certifyId); + if (verifyResponse.isSuccess()){ + return Ret.ok("certifyUrl", verifyResponse.getCertifyUrl()).set("certifyId", certifyId); + }else { + return Ret.fail(); + } + } else { + return Ret.fail(); + } + }catch (AlipayApiException e){ + return Ret.fail(); + } + } + + private Ret alipayFaceQuery(String certifyId) { + try{ + DatadigitalFincloudGeneralsaasFaceCertifyQueryResponse response = getDatadigitalFincloudGeneralsaasFaceCertifyQueryResponse(certifyId); + if (response.isSuccess()) { + String passed = response.getPassed(); + return Ret.ok("passed", passed); + } else { + return Ret.fail("实名认证查询异常,请重试或联系管理员"); + } + } catch (AlipayApiException e){ + return Ret.fail(); + } + } + + private DatadigitalFincloudGeneralsaasFaceCertifyInitializeResponse getDatadigitalFincloudGeneralsaasFaceCertifyInitializeResponse (String realName, + String idCard, String outerOrderNo) throws AlipayApiException { + AlipayClient alipayClient = new DefaultAlipayClient(getAlipayConfig()); + // 构造请求参数以调用接口 + DatadigitalFincloudGeneralsaasFaceCertifyInitializeRequest request = new DatadigitalFincloudGeneralsaasFaceCertifyInitializeRequest(); + DatadigitalFincloudGeneralsaasFaceCertifyInitializeModel model = new DatadigitalFincloudGeneralsaasFaceCertifyInitializeModel(); + // 设置H5人脸核身场景码 + model.setBizCode("FUTURE_TECH_BIZ_FACE_SDK"); + // 设置认证信息 + OpenCertifyIdentifyInfo identityParam = new OpenCertifyIdentifyInfo(); + identityParam.setCertType("IDENTITY_CARD"); + identityParam.setCertName(realName); + identityParam.setCertNo(idCard); + identityParam.setIdentityType("CERT_INFO"); + model.setIdentityParam(identityParam); + // 设置商户请求的唯一标识 "BT20240411224901000001231" + model.setOuterOrderNo(outerOrderNo); + // 设置商户配置信息 + OpenCertifyMerchantConfigs merchantConfig = new OpenCertifyMerchantConfigs(); + merchantConfig.setFaceReserveStrategy("reserve"); + merchantConfig.setReturnUrl(""); + model.setMerchantConfig(merchantConfig); + request.setBizModel(model); + return alipayClient.execute(request); + } + + private DatadigitalFincloudGeneralsaasFaceCertifyVerifyResponse getDatadigitalFincloudGeneralsaasFaceCertifyVerifyResponse(String certifyId) + throws AlipayApiException { + AlipayClient alipayClient = new DefaultAlipayClient(getAlipayConfig()); + DatadigitalFincloudGeneralsaasFaceCertifyVerifyRequest request = new DatadigitalFincloudGeneralsaasFaceCertifyVerifyRequest(); + request.setBizContent("{\"certify_id\":\"" + certifyId + "\"}"); + return alipayClient.execute(request); + } + + private DatadigitalFincloudGeneralsaasFaceCertifyQueryResponse getDatadigitalFincloudGeneralsaasFaceCertifyQueryResponse(String certifyId) + throws AlipayApiException { + AlipayClient alipayClient = new DefaultAlipayClient(getAlipayConfig()); + DatadigitalFincloudGeneralsaasFaceCertifyQueryRequest request = new DatadigitalFincloudGeneralsaasFaceCertifyQueryRequest(); + DatadigitalFincloudGeneralsaasFaceCertifyQueryModel model = new DatadigitalFincloudGeneralsaasFaceCertifyQueryModel(); + // 设置本次申请操作的唯一标识 + model.setCertifyId(certifyId); + request.setBizModel(model); + return alipayClient.execute(request); + } + + + + private AlipayConfig getAlipayConfig() { + String appId = PropKit.get("alipayAppId"); + String privateKey = PropKit.get("alipayPrivateKey"); + String alipayPublicKey = PropKit.get("alipayPublicKey"); + AlipayConfig alipayConfig = new AlipayConfig(); + alipayConfig.setServerUrl("https://openapi.alipay.com/gateway.do"); + alipayConfig.setAppId(appId); + alipayConfig.setPrivateKey(privateKey); + alipayConfig.setFormat("json"); + alipayConfig.setAlipayPublicKey(alipayPublicKey); + alipayConfig.setCharset("UTF-8"); + alipayConfig.setSignType("RSA2"); + return alipayConfig; + } +} diff --git a/src/main/java/com/bt/common/safe/JsoupFilter.java b/src/main/java/com/bt/common/safe/JsoupFilter.java index 2d4cc78..34177f8 100644 --- a/src/main/java/com/bt/common/safe/JsoupFilter.java +++ b/src/main/java/com/bt/common/safe/JsoupFilter.java @@ -112,7 +112,7 @@ public class JsoupFilter { */ public static void filterArticleList(List modelList, int titleLen, int contentLen) { for (Model m : modelList) { - String title = getText(m.getStr("title")); + String title = getText(m.getStr("name")); if (title.length() > titleLen) { title = title.substring(0, titleLen - 1); } diff --git a/src/main/java/com/bt/index/IndexController.java b/src/main/java/com/bt/index/IndexController.java index 59222a5..4c2d584 100644 --- a/src/main/java/com/bt/index/IndexController.java +++ b/src/main/java/com/bt/index/IndexController.java @@ -39,16 +39,6 @@ public class IndexController extends BaseController { DownloadService downloadSrv; public void index() { - List projectList = srv.getProjectList(); - List shareList = srv.getShareList(); - List feedbackList = srv.getFeedbackList(); - List downloadList = downloadSrv.getDownloadList(); - - setAttr("projectList", projectList); - setAttr("shareList", shareList); - setAttr("feedbackList", feedbackList); - setAttr("downloadList", downloadList); - render("index.html"); } diff --git a/src/main/java/com/bt/login/LoginController.java b/src/main/java/com/bt/login/LoginController.java index b75804c..e449c72 100644 --- a/src/main/java/com/bt/login/LoginController.java +++ b/src/main/java/com/bt/login/LoginController.java @@ -67,7 +67,8 @@ public class LoginController extends Controller { public void logout() { srv.logout(getCookie(LoginService.sessionIdName)); removeCookie(LoginService.sessionIdName); - redirect("/"); + Ret ret = Ret.ok(); + renderJson(ret); } /** diff --git a/src/main/java/com/bt/my/setting/MySettingController.java b/src/main/java/com/bt/my/setting/MySettingController.java index eedfde0..751966e 100644 --- a/src/main/java/com/bt/my/setting/MySettingController.java +++ b/src/main/java/com/bt/my/setting/MySettingController.java @@ -14,17 +14,19 @@ package com.bt.my.setting; -import com.bt.my.like.LikeInterceptor; -import com.jfinal.aop.Before; -import com.jfinal.aop.Inject; -import com.jfinal.upload.UploadFile; import com.bt.common.controller.BaseController; import com.bt.common.interceptor.FrontAuthInterceptor; -import com.jfinal.kit.Ret; import com.bt.common.model.Account; +import com.bt.common.model.RealnameVerification; +import com.bt.common.realname.RealnameService; import com.bt.login.LoginService; import com.bt.my.friend.FriendInterceptor; +import com.bt.my.like.LikeInterceptor; +import com.jfinal.aop.Before; +import com.jfinal.aop.Inject; import com.jfinal.core.Path; +import com.jfinal.kit.Ret; +import com.jfinal.upload.UploadFile; /** * 我的设置 @@ -36,10 +38,11 @@ public class MySettingController extends BaseController { @Inject MySettingService srv; + @Inject + RealnameService realNameSrv; + + - public void realName(){ - render("realName.html"); - } public void info() { render("info.html"); @@ -106,4 +109,23 @@ public class MySettingController extends BaseController { public void notice() { } + + public void realName(){ + RealnameVerification realnameVerification = realNameSrv.getByAccountId(getLoginAccountId(), "realname,idCard,status"); + setAttr("realName", realnameVerification); + render("realName.html"); + } + + public void doRealName(){ + RealnameVerification realnameVerification = getBean(RealnameVerification.class, "realName"); + realnameVerification.setAccountId(getLoginAccountId()); + Ret ret = realNameSrv.doRealName(realnameVerification); + renderJson(ret); + } + + public void queryRealName(){ + Ret ret = realNameSrv.queryRealName(getLoginAccountId()); + System.out.println(ret); + renderJson(ret); + } } diff --git a/src/main/java/com/bt/product/ProductController.java b/src/main/java/com/bt/product/ProductController.java index c97fb0a..5b98c0c 100644 --- a/src/main/java/com/bt/product/ProductController.java +++ b/src/main/java/com/bt/product/ProductController.java @@ -15,6 +15,7 @@ package com.bt.product; import com.bt.common.controller.BaseController; +import com.bt.common.model.Product; import com.bt.common.model.Project; import com.bt.common.pageview.PageViewInterceptor; import com.bt.my.favorite.FavoriteService; @@ -36,7 +37,7 @@ import com.jfinal.kit.Ret; public class ProductController extends BaseController { @Inject - ProjectService srv; + ProductService srv; @Inject FavoriteService favoriteSrv; @@ -45,8 +46,7 @@ public class ProductController extends BaseController { LikeService likeSrv; public void index() { - setAttr("projectPage", srv.paginate(getParaToInt("p", 1))); - setAttr("hotProject", srv.getHotProject()); + setAttr("productPage", srv.paginate(getParaToInt("p", 1))); render("index.html"); } @@ -55,13 +55,13 @@ public class ProductController extends BaseController { */ @Before(PageViewInterceptor.class) public void detail() { - Project project = srv.findById(getParaToInt()); - if (project != null) { - setAttr("project", project); + Product product = srv.findById(getParaToInt()); + if (product != null) { + setAttr("product", product); setAttr("hotProject", srv.getHotProject()); render("detail.html"); - setLikeAndFavoriteStatus(project); + setLikeAndFavoriteStatus(product); } else { renderError(404); } @@ -70,10 +70,10 @@ public class ProductController extends BaseController { /** * 如果用户已登录,则需要显示当前 article 是否已经被该用户点赞、收藏了 */ - private void setLikeAndFavoriteStatus(Project project) { + private void setLikeAndFavoriteStatus(Product product) { Ret ret = Ret.create(); - likeSrv.setLikeStatus(getLoginAccount(), "project", project, ret); - favoriteSrv.setFavoriteStatus(getLoginAccount(), "project", project, ret); + likeSrv.setLikeStatus(getLoginAccount(), "product", product, ret); + favoriteSrv.setFavoriteStatus(getLoginAccount(), "product", product, ret); setAttr("ret", ret); } } diff --git a/src/main/java/com/bt/product/ProductService.java b/src/main/java/com/bt/product/ProductService.java new file mode 100644 index 0000000..6f35f97 --- /dev/null +++ b/src/main/java/com/bt/product/ProductService.java @@ -0,0 +1,51 @@ +package com.bt.product; + +import java.util.List; + +import com.bt.common.model.Product; +import com.bt.common.model.Project; +import com.bt.common.safe.JsoupFilter; +import com.jfinal.kit.Kv; +import com.jfinal.plugin.activerecord.Page; +import com.jfinal.plugin.ehcache.CacheKit; + + +/** + * ProductService + */ +public class ProductService { + private Product dao = new Product().dao(); + + public Page paginate(int pageNumber) { + Page productPage = dao.template("product.paginate").paginate(pageNumber, 16); + // 列表页显示 content 的摘要信息需要过滤为纯文本,去除所有标记 + //JsoupFilter.filterArticleList(productPage.getList(), 50, 120); + return productPage; + } + + public Product findById(int projectId) { + return dao.template("project.findById", projectId, Project.REPORT_BLOCK_NUM).findFirst(); + } + + public Product findById(int projectId, String columns) { + Kv para = Kv.by("columns", columns).set("id", projectId).set("report", Project.REPORT_BLOCK_NUM); + return dao.template("project.findByIdWithColumns", para).findFirst(); + } + + public List getHotProject() { + return dao.template("project.getHotProject", Project.REPORT_BLOCK_NUM).findByCache("hotProject", "hotProject"); + } + + public void clearHotProjectCache() { + CacheKit.remove("hotProject", "hotProject"); + } + + /** + * 暂时用于个人空间的创建、更新 share、feedback 模块,用于显示关联项目的下拉列表,将来改成按热度排序 + * 项目数量多了以后考虑用输入框配合 autocomplete 提示输入来实现 + */ + public List getAllProject(String columns) { + Kv para = Kv.by("columns", columns).set("report", Project.REPORT_BLOCK_NUM); + return dao.template("project.getAllProject", para).find(); + } +} diff --git a/src/main/java/com/bt/product/product.sql b/src/main/java/com/bt/product/product.sql new file mode 100644 index 0000000..e661325 --- /dev/null +++ b/src/main/java/com/bt/product/product.sql @@ -0,0 +1,30 @@ +#sql("paginate") + select p.id, + substring(p.name, 1, 100) as name, + p.cpuName, p.memoryCapacity, p.graphicsCardModel, p.dataDiskCapacity, p.downloadSpeed, + substring(p.content, 1, 180) as content, p.createAt as createAt + from product p +#end + +#sql("findById") + select p.* , a.avatar, a.nickName + from product p inner join account a on p.accountId = a.id + where p.id = #para(0) and p.report < #para(1) limit 1 +#end + +#sql("findByIdWithColumns") + select #(columns) from product where id = #para(id) and report < #para(report) limit 1 +#end + +#sql("getHotproduct") + select id, title from product where report < #para(0) order by createAt asc limit 10 +#end + +#sql("getAllproduct") + select #(columns) from product where report < #para(report) order by createAt asc +#end + + + + + diff --git a/src/main/java/com/bt/reg/RegService.java b/src/main/java/com/bt/reg/RegService.java index feebc7e..2c45e31 100644 --- a/src/main/java/com/bt/reg/RegService.java +++ b/src/main/java/com/bt/reg/RegService.java @@ -103,6 +103,7 @@ public class RegService { account.setStatus(Account.STATUS_REG); account.setCreateAt(LocalDateTime.now()); account.setIp(ip); + account.setRealnameVerified(Account.REAL_NAME_NO); account.setAvatar(Account.AVATAR_NO_AVATAR); // 注册时设置默认头像 if (account.save()) { @@ -121,9 +122,9 @@ public class RegService { * 发送账号激活授权邮件 */ private boolean sendRegActivateAuthEmail(String authCode, Account reg) { - String title = "JFinal 会员激活邮件"; + String title = "贝塔网络账号激活邮件"; String content = "在浏览器地址栏里输入并访问下面激活链接即可完成账户激活:\n\n" - + " https://jfinal.com/reg/activate?authCode=" + + " https://bt.plus/reg/activate?authCode=" + authCode; String emailServer = PropKit.get("emailServer"); @@ -131,7 +132,7 @@ public class RegService { String emailPass = PropKit.get("emailPass"); String toEmail = reg.getStr("userName"); try { - EmailKit.sendEmail(emailServer, fromEmail, emailPass, toEmail, title, content); + //EmailKit.sendEmail(emailServer, fromEmail, emailPass, toEmail, title, content); return true; } catch (Exception e) { return false; diff --git a/src/main/resources/jfinal-club-config-dev.txt b/src/main/resources/jfinal-club-config-dev.txt index 4718bcd..d8e9693 100644 --- a/src/main/resources/jfinal-club-config-dev.txt +++ b/src/main/resources/jfinal-club-config-dev.txt @@ -1,5 +1,6 @@ #主要配置 -jdbcUrl=jdbc:mysql://localhost/bt_plus?characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull +jdbcUrl=jdbc:mysql://localhost/bt_plus?characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true + user=root password=123456 devMode=true @@ -22,5 +23,10 @@ pvUpdate.cron=0 * * * * pvUpdate.class=com.bt.common.pageview.PageViewUpdateTask pvUpdate.enable=true +# 支付宝 +alipayAppId=2021004142623011 +alipayPrivateKey=MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCFD94dfCfNEzRrkSEgHzO3/nqY0bpIHbGFzVj0kED+nLJtIAO2UosKKETblVlkj111O+8YHSbH3Dz5IOembiSvTWF9mkYwAuC6Zhw7p/6wniKIDPFaLukE3dIuH8eLHC2dFtX2qMgnI2d0qUyjz3kP/Uror0qlOVkBFdPRVem7EPC//ZNs7ITfJG6703tbIc9paRQ+mnyEZj1MZRK0ARNIgQflPOedQgQJTCzShCOnuMPaflyNnYSD4zcEmByuhOFw3hBrcDPq+Jh5kixzEdriJnfbdqRaivlI/xtK819kxRD169DUCmP7nqDqyqf0BaK+rBq8q6L0PeeK2v9eACcdAgMBAAECggEAWrN7Q3v7IXZC2EQAYYYDWhtUdFEZ+siK1tsoFOUz+JrVoT8eaKyRbGYQseF3Iu361cv56eUNJ1VAFs3QOgmAZiKIHvcHevirOUQbYKreGIRio3y3FDM/0XpnJ9uvyGp3yUnkpZNdhBhFECfLPypQqo6M/llmt4OE4RGA5oP6o/EfxqXWoIgHI3s/81UaZvekEIvenXiCjpzGB+W2sDDUQtpldMGle9N95Y+YvvDUIO0j6CvL1ATaSCvLRfswlCZdFr+pj2vie7Bzzx4eKgUzyfI/BELDGzz5hFah7qkqKMqwr41N99eJy1VwYWo2V+AKEZ+3nKoZOLkOGvwr34ySPQKBgQDsug4KV4ySp3cF6WOLQAeJRaL2lT5iMvIu1fnG67xNNFPsLBaZE3SWZpciL0uJiInfeAFVS2wW5FcqE1n+ZdgYX20k/GThP/fSiVgDQ9G13RPAecXA9+8LwXUVHGz9EVBs5FRd5DDZOKShUJ09fuzM8rfQ/iOo6sbB98PPUyX8fwKBgQCP5TGSkjXtEwRW0a+uHNgu/7Bp1ecInDHcBMLgyzj+ssJXTAXF79oVNpMx/eXRgkBEnxifrK9zy30ETseJ+FbGRtbwQ52fuR+YSSR8hGSHYi69JMPmZ7napUM3VigfpVKmf0BHZT+NpRLEdsm5Ixi+aBbqkz0YtTJFw0KEW3d+YwKBgFYxMCeH1QEYxHd8kOgEujm7ByjtEjfDAPcYpcdN0dPyd5QIQXoe4VZZqDGkMsay1jBti165BXQYU7xYK247OsE1DZJn63swRVV8+HTH3rVu92AfdmdaXslS+QRkwzIpebUMNcOx8C9HNnod1gKsEiBVR6RqxCUexpudUMhOKAiVAoGAHs4EFMq0PLKLhUKSh4WpSjZ2v9GJCjDWA7IJPjKDWxNNw36E5eD5IP1z+YnPP1DRDV+518USMonnk5qB4SmG+h+EOB9hiSYKe4F9DCMTmmAMfXV3csXV5dbnUttg75Vm4jnvutkUB/DE2cZMXRQEYg7KiSFIPRfdUU4B2W/zXt0CgYEArUNBURVNwvETHlbazMLJS8HkW3kDnzSm9a7gF1qqBKO0LV7KK6dY7BgWJv1MDfFijhW4Qum3jtgnojI37lF2j6a4pYGOPk/sLEmhch9EmUgY3iTbNPpt1/uwObKlNBQtdyFIehNCCZgDyWbhbu0AXfA/ZtmBiDi0CE8tLzstIQQ= +alipayPublicKey=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqE34W1o4gIUgF26apGHT+xZHcdqQhRYFSsSGle8s6BCz7pEwHtG3bm6OHBr8VF4qbXWD7XXxi+g4hbeOwGreFU7mQd2iwyEmqsuiG4m4tzttjhMHN2yiDsTPr5dZWPCyl14RtKfDUaI/cvq565wNyaBPWASOu6Ecl4zF8qa2axLrL6pMPDNxqLpQ7NJMveeiQK//XK1KZJkm+n2yTqWzMRo9HevD1IpfH5r5LSh5s7mkJeYZRMaZ0ZjEScOk1ylkMgyOgD1OJoSqq2cJTNnv2yoJGd4mSPe2LJBu9ZJPM9CXVsiwWaTZGY0HcHKYf6F613G07QoZdUA+QjETEnOXmQIDAQAB +alipayReturnUrl=https://l9r51q8n-8087.asse.devtunnels.ms/ diff --git a/src/main/webapp/_view/_admin/common/_menu.html b/src/main/webapp/_view/_admin/common/_menu.html index da956df..5ca53df 100644 --- a/src/main/webapp/_view/_admin/common/_menu.html +++ b/src/main/webapp/_view/_admin/common/_menu.html @@ -15,6 +15,9 @@ #permission("/admin/project")
  • 项目管理
  • #end + #permission("/admin/product") +
  • 产品管理
  • + #end
  • 分享管理
  • 反馈管理
  • diff --git a/src/main/webapp/_view/_admin/product/add_edit.html b/src/main/webapp/_view/_admin/product/add_edit.html new file mode 100644 index 0000000..158a2a3 --- /dev/null +++ b/src/main/webapp/_view/_admin/product/add_edit.html @@ -0,0 +1,183 @@ +#@adminLayout() + +#define main() +### isAdd 表示创建,isEdit 表示修改 +#set(isAdd = product == null ? true : false, isEdit = !isAdd) + +
    +
    + 产品管理 / #(isAdd ? "创建" : "修改") +
    + + #include("/_view/_admin/common/_header_right.html") +
    + +### 内容区域 +
    +
    +
    + + #if (isEdit) + + #end + +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    + + + + + +#end diff --git a/src/main/webapp/_view/_admin/product/index.html b/src/main/webapp/_view/_admin/product/index.html new file mode 100644 index 0000000..5820491 --- /dev/null +++ b/src/main/webapp/_view/_admin/product/index.html @@ -0,0 +1,136 @@ +#@adminLayout() + +#define main() +
    +
    + 产品管理 +
    + + #include("/_view/_admin/common/_header_right.html") +
    + +### 内容区域 +
    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #for(x : productPage.getList()) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #end + +
    id名称CPU数CPU名称单U核心数双U核心数总线程数内存容量内存速度物理盘系统盘颗粒数据盘容量数据盘读取速度数据盘写入速度显卡型号显存容量下载速度上传速度上传速度内网带宽日租费用月租费用单价/核心单UTDP总TDP创建时间操作
    #(x.id)#(x.name)#(x.cpuCount)#(x.cpuName)#(x.cpuFrequency)#(x.singleCoreCount)#(x.dualCoreCount)#(x.totalThreadCount)#(x.memoryCapacity)#(x.memorySpeed)#(x.physicalDisk)#(x.systemDiskParticle)#(x.dataDiskCapacity)#(x.dataDiskReadSpeed)#(x.dataDiskWriteSpeed)#(x.graphicsCardModel)#(x.graphicsMemoryCapacity)#(x.downloadSpeed)#(x.uploadSpeed)#(x.internalNetworkBandwidth)#(x.dailyRentalFee)#(x.monthlyRentalFee)#(x.pricePerCore)#(x.singleUtdp)#(x.totalTdp)#date(x.createAt) + + #permission("/admin/product/edit") + + + + #end + + #permission("/admin/product/delete") + + + + #end +
    + +
    + #@adminPaginate(productPage.pageNumber, productPage.totalPage, "/admin/product?p=") +
    +
    +
    +
    + + + +#end + + + diff --git a/src/main/webapp/_view/common/__b5layout.html b/src/main/webapp/_view/common/__b5layout.html index 7464ff1..c7ad41e 100644 --- a/src/main/webapp/_view/common/__b5layout.html +++ b/src/main/webapp/_view/common/__b5layout.html @@ -8,23 +8,72 @@ #(seoTitle ?? "贝塔网络官方网站") - - - + + + #@css?() - - -#@main() + + +
    + + + #@main() +
    - - - - + + + + + + - - + #@js?() diff --git a/src/main/webapp/_view/common/__official_layout.html b/src/main/webapp/_view/common/__official_layout.html new file mode 100644 index 0000000..3cf16d7 --- /dev/null +++ b/src/main/webapp/_view/common/__official_layout.html @@ -0,0 +1,244 @@ +#define officialLayout() + + + + + + + + + + #(seoTitle ?? "贝塔网络官方网站") + + + + + + + + + + #@css?() + + + + + +
    +
    +
    + + +
    +
    +
    + + + + + + + +#@main() + + + + + + + + + + +#@js?() + + +#end diff --git a/src/main/webapp/_view/index/index.html b/src/main/webapp/_view/index/index.html index e078842..4a21362 100644 --- a/src/main/webapp/_view/index/index.html +++ b/src/main/webapp/_view/index/index.html @@ -1,120 +1,113 @@ -#set(seoTitle="JFinal 极速开发官方社区") -#@layout() +#set(seoTitle="贝塔网络官方网站") +#@officialLayout() #define main() -
    - - ### 首页轮播广告 - #include("_carousel.html") - ### 分享 -
    -
    - 更多» -

    分享

    -
    -
    -
    - - #for(x : shareList) -
    -
    - -
    - -

    - #date(x.createAt) - ###  #(x.clickCount) -  #(x.likeCount) -

    -
    -
    -
    - #end - -
    -
    -
    - - ### 反馈 -
    -
    - 更多» -

    反馈

    -
    -
    -
    - - #for(x : feedbackList) -
    -
    - -
    - -

    - #date(x.createAt) - ###  #(x.clickCount) -  #(x.likeCount) -

    -
    + +
    +
    +
    +
    +
    +

    Powerful solutions for your startup.

    +

    We are a digital agency that helps brands to + achieve their business outcomes. We see technology as a tool to create amazing things.

    +
    - #end -
    -
    -
    - - ### 项目 -
    -
    - 更多» -

    项目

    -
    -
    - -
    - - #setLocal(i=0, j=0) - #for(x : projectList) - #if(for.first || ++i % 4 == 0) -
    - #end -
    -
    - -

    - #(x.title) -

    - - #-- -

    - ### 305 -  25 -  99 -

    - --# - -
    -
    - #if(for.last || ++j % 4 == 0) +
    +
    + #
    - #end - #end -
    - - +
    + +#end + + +#define js() + + + + + + + + #end \ No newline at end of file diff --git a/src/main/webapp/_view/my/dashboard/_left_menu.html b/src/main/webapp/_view/my/dashboard/_left_menu.html index 951532d..7046b17 100644 --- a/src/main/webapp/_view/my/dashboard/_left_menu.html +++ b/src/main/webapp/_view/my/dashboard/_left_menu.html @@ -1,159 +1,31 @@ - - + \ No newline at end of file diff --git a/src/main/webapp/_view/my/dashboard/index.html b/src/main/webapp/_view/my/dashboard/index.html index df45e40..abc6b51 100644 --- a/src/main/webapp/_view/my/dashboard/index.html +++ b/src/main/webapp/_view/my/dashboard/index.html @@ -1,179 +1,330 @@ - - - - - - - - 贝塔网络用户面板 - - - - - - - - - -
      - -
    • -
      - -
      -
    • - -
    • - -
    • -
      - -
      -
    • - -
    • -
      - -
      -
    • - - - - -
    - -#include("_left_menu.html") - - -
    -
    -
    - - - - - -
    -
    - Loading... +
    + #include("_footer.html")
    - - - - - - - + +#end - $.toasts({ - type: 'success', - content: '退出成功', - onHidden: function () { - top.location.replace('/pages/login.html'); - } - }) - } - }); - } - }) - }); - }); - - - \ No newline at end of file diff --git a/src/main/webapp/_view/my/order/index.html b/src/main/webapp/_view/my/order/index.html index b5870b9..df69c0e 100644 --- a/src/main/webapp/_view/my/order/index.html +++ b/src/main/webapp/_view/my/order/index.html @@ -1,124 +1,157 @@ #set(seoTitle="贝塔网络订单页") #@b5Layout() - +#define menu() +#include("../dashboard/_left_menu.html", sidebar="order", submenu="") +#end #define css() - - - - + #end - - #define main() -
    -
    -
    -
    -
    -
    - -
    - -
    -
    +
    +
    + + + +
    +
    +
    +
    +
    +

    我的订单

    -
    -
    - -
    - -
    -
    +
    +
    +
    +
    +
    +
    -
    - -
    -
    - - - +
    +
    +

    Basic Buttons

    +
    +
    -
    -
    - -
    - +
    +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    +
    + + + +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + + +
    + + + + +
    + + +
    +
    + +
    +
    + +
    - - -
    - - - - -
    - - -
    -
    - -
    - - - -
    - -
    -
    +
    + + #include("../dashboard/_footer.html")
    #end #define js() - - + - - - - - + #end \ No newline at end of file diff --git a/src/main/webapp/_view/product/index.html b/src/main/webapp/_view/product/index.html index 03ba037..2b78f31 100644 --- a/src/main/webapp/_view/product/index.html +++ b/src/main/webapp/_view/product/index.html @@ -1,55 +1,138 @@ -#@layout() +#set(seoTitle="贝塔网络官方产品") +#@officialLayout() #define main() - -
    -
    -
    -

    产品

    + +