3 Commits

Author SHA1 Message Date
  主管理员 355662530d feat: 添加免费用户字段并优化请求体处理 4 days ago
  主管理员 ef29e9ff4d Merge remote-tracking branch 'origin/master' 4 days ago
  主管理员 d36e48d78a style(ContentEditor): 将默认字体大小从30rpx调整为40rpx 1 week ago
4 changed files with 26 additions and 18 deletions
Unified View
  1. +2
    -0
      jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/vo/AppletUser.java
  2. +12
    -12
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/pom.xml
  3. +7
    -1
      jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/controller/AppletApiTTSController.java
  4. +5
    -5
      jeecgboot-vue3/src/views/applet/course-page/components/ContentEditor.vue

+ 2
- 0
jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/vo/AppletUser.java View File

@ -83,6 +83,8 @@ public class AppletUser implements Serializable {
private String unionId;//同平id private String unionId;//同平id
private String freeUser;//免费用户
/** /**
* 手机号 * 手机号
*/ */


+ 12
- 12
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/pom.xml View File

@ -3,18 +3,18 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>jeecgboot-boot-applet</artifactId> <artifactId>jeecgboot-boot-applet</artifactId>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>9</source>
<target>9</target>
</configuration>
</plugin>
</plugins>
</build>
<!-- <build>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-compiler-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <source>8</source>-->
<!-- <target>8</target>-->
<!-- </configuration>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </build>-->
<parent> <parent>
<artifactId>jeecg-boot-module</artifactId> <artifactId>jeecg-boot-module</artifactId>


+ 7
- 1
jeecg-boot/jeecg-boot-module/jeecgboot-boot-applet/src/main/java/org/jeecg/modules/applet/controller/AppletApiTTSController.java View File

@ -134,7 +134,13 @@ public class AppletApiTTSController {
// 直接从 InputStream 读取原始字节避免 Spring 的参数解析 // 直接从 InputStream 读取原始字节避免 Spring 的参数解析
try (java.io.InputStream is = request.getInputStream()) { try (java.io.InputStream is = request.getInputStream()) {
byte[] bytes = is.readAllBytes();
java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int length;
while ((length = is.read(buffer)) != -1) {
baos.write(buffer, 0, length);
}
byte[] bytes = baos.toByteArray();
raw = new String(bytes, java.nio.charset.StandardCharsets.UTF_8); raw = new String(bytes, java.nio.charset.StandardCharsets.UTF_8);
log.info("原始请求体长度: {} 字节", bytes.length); log.info("原始请求体长度: {} 字节", bytes.length);
} }


+ 5
- 5
jeecgboot-vue3/src/views/applet/course-page/components/ContentEditor.vue View File

@ -176,7 +176,7 @@ watch(
componentsRef.value = cloned.map((c: any) => { componentsRef.value = cloned.map((c: any) => {
if (c?.type === 'text') { if (c?.type === 'text') {
if (!c.style) c.style = {}; if (!c.style) c.style = {};
if (!c.style.fontSize) c.style.fontSize = '30rpx';
if (!c.style.fontSize) c.style.fontSize = '40rpx';
if (!c.style.color) c.style.color = '#333333'; if (!c.style.color) c.style.color = '#333333';
if (!c.style.fontFamily) c.style.fontFamily = 'SimSun'; if (!c.style.fontFamily) c.style.fontFamily = 'SimSun';
if (!c.style.fontWeight) c.style.fontWeight = 'normal'; if (!c.style.fontWeight) c.style.fontWeight = 'normal';
@ -208,7 +208,7 @@ function addTextContent() {
content: '', content: '',
language: 'zh', language: 'zh',
style: { style: {
fontSize: '30rpx',
fontSize: '40rpx',
color: '#333333', color: '#333333',
fontFamily: 'SimSun', fontFamily: 'SimSun',
}, },
@ -272,9 +272,9 @@ function ensureStyle(component: any) {
function getFontSizeNumber(component: any) { function getFontSizeNumber(component: any) {
const s = component.style?.fontSize; const s = component.style?.fontSize;
if (!s) return 30;
if (!s) return 40;
const m = typeof s === 'string' ? s.match(/(\d+)/) : null; const m = typeof s === 'string' ? s.match(/(\d+)/) : null;
return m ? Number(m[1]) : 30;
return m ? Number(m[1]) : 40;
} }
function setFontSizeNumber(component: any, value: number) { function setFontSizeNumber(component: any, value: number) {
@ -282,7 +282,7 @@ function setFontSizeNumber(component: any, value: number) {
// value rpx // value rpx
const numValue = Number(value); const numValue = Number(value);
if (isNaN(numValue) || numValue <= 0) { if (isNaN(numValue) || numValue <= 0) {
component.style.fontSize = '30rpx'; //
component.style.fontSize = '40rpx'; //
} else { } else {
component.style.fontSize = `${numValue}rpx`; component.style.fontSize = `${numValue}rpx`;
} }


Loading…
Cancel
Save