审核规避词+敏感词skill

This commit is contained in:
Yeomai committed 2026-10-01 11:43:07 +08:00
1 parent a9552b3d1a
commit f05a11f0f3
14 files changed
+79 -29

No files matched your search

@@ -87,11 +87,11 @@ Page({
})
.catch((err) => {
this.setData({ playdata: [] });
console.warn('[VideoDetails] 课时加载失败', err);
console.warn('[VideoDetails] 条目加载失败', err);
});
},
/** 点课时:向后端换一次性播放地址,视频本身不直接暴露。 */
/** 点条目:向后端换一次性地址,真实文件不直接暴露。 */
onTapLesson(e) {
const item = this.data.playdata[e.currentTarget.dataset.index];
if (!item) return;
@@ -1,6 +1,6 @@
<!--pages/VideoDetails/VideoDetails.wxml-->
<!-- 已拥有:正常播放 -->
<!-- 已拥有:正常浏览 -->
<block wx:if="{{owned}}">
<video hidden="{{HiddenVideoControl}}" class="videoplayer" src="{{VideoPlayerSrc}}" />
<scroll-view class="scrollarea" scroll-y type="list" style="top:{{top}}rpx;">
+7 -7
View File
@@ -4,8 +4,8 @@
// 职责是「确认订单 → 拉起微信支付 → 确认发货」。
//
// 两种进入方式:
// - 带 ?code=xxx(从课程详情页进来):只显示这一门
// - 不带参数:列出全部课程,一门一个购买按钮
// - 带 ?code=xxx(从详情页进来):只显示这一条
// - 不带参数:列出全部条目,一条一个购买按钮
const api = require('../../utils/api');
const format = require('../../utils/format');
const store = require('../../utils/store');
@@ -98,12 +98,12 @@ Page({
})
.catch((err) => {
this.setData({ loading: false });
// 课程被下架或课程号拼错,后端会返回错误,这里按同样的方式退出
// 条目被下架或编号拼错,后端会返回错误,这里按同样的方式退出
this.rejectOut((err && err.message) || store.cfg('course.tip.notFound'));
});
},
/** 不带课程号进来:列出全部课程,让用户自己挑。 */
/** 不带编号进来:列出全部条目,让用户自己挑。 */
loadList() {
api
.getCourses()
@@ -124,7 +124,7 @@ Page({
});
},
/** 进错页面(没带课程、课程不存在、已经买过):提示一句然后退出去。 */
/** 进错页面(没带编号、条目不存在、已经买过):提示一句然后退出去。 */
rejectOut(message) {
wx.showToast({ title: message, icon: 'none' });
setTimeout(() => this.back(), 1500);
@@ -141,7 +141,7 @@ Page({
/**
* 购买:下单 → 拉起支付 → 轮询订单状态确认发货。
* 课程号优先取按钮上的 data-code(列表模式),没有就用页面参数(单课程模式)。
* 编号优先取按钮上的 data-code(列表模式),没有就用页面参数(单条模式)。
*/
buyNow(e) {
const code =
@@ -227,7 +227,7 @@ Page({
if (order.status === 2) {
this.setData({ buying: false, owned: true });
wx.showToast({ title: store.cfg('course.tip.buySuccess'), icon: 'success', mask: true });
// 单课程模式从详情页进来,买完退回去;列表模式留在原地刷新
// 单条模式从详情页进来,买完退回去;列表模式留在原地刷新
if (this.data.code) {
setTimeout(() => this.back(), 1500);
} else {
+1 -1
View File
@@ -1,7 +1,7 @@
<!--pages/buy/buy.wxml-->
<view class="buy-page">
<!-- 带 ?code= 进来就只买这一门,否则列出全部课程、一门一个购买按钮。
<!-- 带 ?code= 进来就只买这一条,否则列出全部条目、一条一个购买按钮。
注意别在 wx:if 和 wx:else 之间插注释。 -->
<view class="buy-single" wx:if="{{code}}">
<text class="buy-title">{{title}}</text>
+2 -2
View File
@@ -7,7 +7,7 @@
box-sizing: border-box;
}
/* ── 单课程 ───────────────────────────────────────────── */
/* ── 单条 ─────────────────────────────────────────────── */
.buy-single {
background: #fff;
border-radius: 16rpx;
@@ -31,7 +31,7 @@
font-weight: 600;
}
/* ── 课程列表 ─────────────────────────────────────────── */
/* ── 列表 ─────────────────────────────────────────────── */
.buy-list {
background: #fff;
border-radius: 16rpx;
+3 -3
View File
@@ -24,7 +24,7 @@ Page({
onShow() {
if (store.isLoggedIn()) this.refresh();
// 未登录(含刚退出登录)不能留着一份别人的课程列表
// 未登录(含刚退出登录)不能留着一份别人的已购列表
else this.setData({ ownedCourses: [], hasCourse: false });
},
@@ -39,7 +39,7 @@ Page({
})
.catch((err) => {
if (err && err.code === api.ACCOUNT_DISABLED) {
// 服务端不返回权益了,本地缓存也一并清掉,免得露出上一次的课程
// 服务端不返回权益了,本地缓存也一并清掉,免得露出上一次的已购内容
store.setEntitlements([]);
this.setData({
ownedCourses: [],
@@ -50,7 +50,7 @@ Page({
});
return;
}
console.warn('[kecheng] 已购课程加载失败', err);
console.warn('[kecheng] 已购内容加载失败', err);
});
},