美化了样式3.0

This commit is contained in:
2025-08-15 14:15:10 +08:00
parent 23ab2798d8
commit f47e375bfa
12 changed files with 103 additions and 42 deletions

View File

@ -1,5 +1,6 @@
import { baseUrl, globalImgUrl } from "../../../request";
const { notLogin } = require('../../../utils/util')
import { decodeBase64 } from "../../../utils/decodebase64";
// pages/course/createCourseOrder/createCourseOrder.js
Page({
@ -13,21 +14,7 @@ Page({
globalImgUrl, // 全局图片
isMaskVisible: false,
isNoticeVisible: true,
noticeHtml: `
<h3>一、购买与使用</h3>
<p>1购买后请在 <strong>「我的订单」</strong> 中查看并进入课程学习;</p>
<p>2课程为虚拟内容服务一经购买概不支持无理由退款</p>
<h3>二、账号与权益</h3>
<p>1课程仅限购买账号本人使用不可转借、分享或用于商业用途</p>
<p>2如发现恶意盗链、传播等行为我们有权封禁账号并追究法律责任。</p>
<h3>三、发票与售后</h3>
<p>如需发票或遇到问题,请在课程详情页联系客服。</p>
<h3>四、其他</h3>
<p>购买即视为同意本须知及平台服务协议。</p>
`,
noticeHtml: '',
},
// 打开/关闭弹窗
@ -164,6 +151,27 @@ noop() {},
} else {
notLogin(res.data.message)
}
},
fail: () => {
wx.showToast({ title: '网络错误', icon: 'none' });
}
})
},
getCourseDesc() {
wx.request({
url: baseUrl + '/userInfo/query/courseDesc',
method: 'POST',
success: res => {
console.log('====>购买须知', res.data)
if (res.data.code === 1) {
this.setData({noticeHtml: decodeBase64(res.data.data)})
} else {
notLogin(res.data.message)
}
},
fail: () => {
wx.showToast({ title: '网络错误', icon: 'none' });
}
})
},
@ -177,6 +185,7 @@ noop() {},
courseId: options.id,
})
this.getCourseDetail()
this.getCourseDesc()
},
/**