1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

小程序端审核隐藏功能通过传参指定

This commit is contained in:
2023-04-26 01:01:18 +08:00
parent d96fd3d536
commit 2d145793b4
4 changed files with 138 additions and 98 deletions

View File

@@ -1,10 +1,13 @@
package com.cxyxiaomo.epp.gateway.controller;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Objects;
@RestController
public class Controller {
@@ -14,17 +17,29 @@ public class Controller {
return "[ERROR] 500 Internal Server Error";
}
@Value("${epp.miniprogram.config}")
private String miniprogramConfig;
/**
* 为了通过微信的小程序审核所特别处理的
*
* @return
*/
@RequestMapping("/getConfig")
public HashMap<String, Object> WxMiniProgramAuditSpecialHandle() {
public HashMap<String, Object> WxMiniProgramAuditSpecialHandle(@RequestParam(value = "v", required = false) String version) {
boolean showCode = true;
boolean showShop = true;
boolean showReport = true;
// 第一版提审,已通过,在线上 version == null
if (version.equals("2")) {
// 第一版提审,按照配置文件中的配置来
if (Objects.equals(miniprogramConfig, "hide")) {
showCode = false;
showShop = false;
}
}
// 底部 tabbar
LinkedList<String> tabbarItem = new LinkedList<>();
tabbarItem.push("pages/index/index");

View File

@@ -97,3 +97,9 @@ spring:
args:
status: 302
url: https://www.baidu.com/?wd=
epp:
miniprogram:
# 为了通过微信的小程序审核所特别处理的
# show / hide
config: show