四端上传
This commit is contained in:
1 parent
25bbb5f9c8
commit
c6e2cb4d5b
276 files changed
+17812
-3
No files matched your search
@@ -0,0 +1,84 @@
|
||||
// pages/ChangeUserInfo/ChangeUserInfo.js
|
||||
const api = require('../../utils/api');
|
||||
const store = require('../../utils/store');
|
||||
const config = require('../../config/index');
|
||||
|
||||
const app = getApp();
|
||||
|
||||
Page({
|
||||
data: {
|
||||
// wxml 里直接用它拼头像路径,保持不变
|
||||
BaseURL: config.STATIC_BASE_URL,
|
||||
activeNames: [],
|
||||
username: '',
|
||||
HeadiconID: 0,
|
||||
list: 50,
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
app.ready().then(() => this.applyUser());
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.applyUser();
|
||||
},
|
||||
|
||||
applyUser() {
|
||||
const user = store.getUser() || {};
|
||||
this.setData({
|
||||
username: user.nickname || '',
|
||||
HeadiconID: user.headiconId || 0,
|
||||
list: parseInt(store.cfg('profile.headicon_count', '50'), 10) || 50,
|
||||
});
|
||||
},
|
||||
|
||||
onChange(event) {
|
||||
let inputVal = event.detail;
|
||||
// 只保留中英文与数字
|
||||
inputVal = inputVal.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]/g, '');
|
||||
// 去掉开头的数字
|
||||
inputVal = inputVal.replace(/^[0-9]+/, '');
|
||||
inputVal = inputVal.substring(0, 8);
|
||||
this.setData({ username: inputVal });
|
||||
},
|
||||
|
||||
selectHeadicon(event) {
|
||||
this.setData({ HeadiconID: event.currentTarget.dataset.index });
|
||||
},
|
||||
|
||||
onChange2(event) {
|
||||
this.setData({ activeNames: event.detail });
|
||||
},
|
||||
|
||||
onConfirm() {
|
||||
const nickname = (this.data.username || '').trim();
|
||||
if (!nickname) {
|
||||
wx.showToast({ title: '请输入用户名', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '确定修改个人资料吗?',
|
||||
confirmColor: '#ff0000',
|
||||
success: (res) => {
|
||||
if (!res.confirm) return;
|
||||
wx.showLoading({ title: '提交中', mask: true });
|
||||
|
||||
api
|
||||
.updateMe({ nickname: nickname, headiconId: this.data.HeadiconID })
|
||||
.then((user) => {
|
||||
store.setUser(user);
|
||||
wx.hideLoading();
|
||||
wx.showToast({ title: '成功', icon: 'success', mask: true, duration: 1500 });
|
||||
setTimeout(() => wx.switchTab({ url: '/pages/wode/wode' }), 1500);
|
||||
})
|
||||
.catch((err) => {
|
||||
wx.hideLoading();
|
||||
wx.showToast({ title: err.message || '修改失败', icon: 'none', mask: true });
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-field": "@vant/weapp/field/index",
|
||||
"van-collapse": "@vant/weapp/collapse/index",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item/index",
|
||||
"van-grid": "@vant/weapp/grid/index",
|
||||
"van-grid-item": "@vant/weapp/grid-item/index",
|
||||
"van-image": "@vant/weapp/image/index",
|
||||
"van-button": "@vant/weapp/button/index"
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
label="用户名"
|
||||
value="{{username}}"
|
||||
placeholder="请输入用户名"
|
||||
border="true"
|
||||
bind:change="onChange"
|
||||
/>
|
||||
</van-cell-group>
|
||||
|
||||
<van-collapse value="{{ activeNames }}" bind:change="onChange2">
|
||||
<van-collapse-item title="头像" name="1">
|
||||
<view style="display: flex; justify-content: center; padding: 20rpx 0;">
|
||||
<van-image width="120rpx" height="120rpx" src="{{BaseURL}}/Images/Headicons/Headicon{{HeadiconID}}.png" />
|
||||
</view>
|
||||
<van-grid icon-size="80rpx">
|
||||
<scroll-view scroll-y style="min-height: 200rpx;max-height: 620rpx;" class="scroll-area">
|
||||
<van-grid-item wx:for="{{ list }}" wx:key="index" icon="{{BaseURL}}/Images/Headicons/Headicon{{index + 1}}.png" text="{{index + 1}}" bind:click="selectHeadicon" data-index="{{index + 1}}"/>
|
||||
</scroll-view>
|
||||
</van-grid>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
|
||||
<view class="button-container" style="text-align: center;padding: 20rpx;">
|
||||
<van-button type="primary" bind:click="onConfirm">确认修改</van-button>
|
||||
</view>
|
||||
@@ -0,0 +1 @@
|
||||
/* pages/ChangeUserInfo/ChangeUserInfo.wxss */
|
||||
@@ -0,0 +1,56 @@
|
||||
// pages/IndexFreeCourseDetails/IndexFreeCourseDetails.js
|
||||
const api = require('../../utils/api');
|
||||
const format = require('../../utils/format');
|
||||
|
||||
Page({
|
||||
data: {
|
||||
VideoTitle: '',
|
||||
playdata: [],
|
||||
VideoPlayerSrc: '',
|
||||
HiddenVideoControl: true,
|
||||
top: 0,
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
const seriesNo = options.seriesNo;
|
||||
if (!seriesNo) {
|
||||
wx.switchTab({ url: '/pages/index/index' });
|
||||
return;
|
||||
}
|
||||
|
||||
api
|
||||
.getFreeLessons(Number(seriesNo))
|
||||
.then((list) => {
|
||||
const rows = (list || []).map((item) => ({
|
||||
coverUrl: item.coverUrl,
|
||||
videoTitle: item.videoTitle,
|
||||
intro: item.intro,
|
||||
publishedAt: format.toDateString(item.publishedAt),
|
||||
duration: item.duration,
|
||||
videoUrl: item.videoUrl,
|
||||
}));
|
||||
this.setData({
|
||||
playdata: rows,
|
||||
VideoTitle: rows.length ? rows[0].videoTitle || '' : '',
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('[IndexFreeCourseDetails] 加载失败', err);
|
||||
this.setData({ playdata: [] });
|
||||
});
|
||||
},
|
||||
|
||||
onTapLesson(e) {
|
||||
const item = this.data.playdata[e.currentTarget.dataset.index];
|
||||
if (!item || !item.videoUrl) {
|
||||
wx.showToast({ title: '该课时暂无视频', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
this.setData({ VideoPlayerSrc: item.videoUrl, HiddenVideoControl: false, top: 420 });
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return { title: '叶雷讲数学', path: '/pages/index/index' };
|
||||
},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<video hidden="{{HiddenVideoControl}}" class="videoplayer" src="{{VideoPlayerSrc}}" />
|
||||
<scroll-view class="scrollarea" scroll-y type="list" style="top:{{top}}rpx;">
|
||||
<view class="jieshao">
|
||||
<text decode class="video_biaoti"> {{VideoTitle}}</text>
|
||||
<text decode class="video_info"> 已更新{{playdata.length}}期</text>
|
||||
</view>
|
||||
|
||||
<view class="videolistcontainer" bind:tap="onTapLesson"
|
||||
wx:for="{{playdata}}" wx:for-item="item" wx:for-index="index" wx:key="index" data-index="{{index}}">
|
||||
<view class="videoimage">
|
||||
<image class="coverimage" src="{{item.coverUrl}}" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="videoinfo">
|
||||
<text class="videotitle">{{item.videoTitle}}</text>
|
||||
<text class="videodetails">{{item.intro}}</text>
|
||||
<view class="videoinfo2">
|
||||
<text class="videodata">{{item.publishedAt}}</text>
|
||||
<text class="videotime">{{item.duration}}min</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
.videoplayer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 420rpx;
|
||||
width: 750rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
.scrollarea {
|
||||
position: relative;
|
||||
top: 420rpx;
|
||||
flex: 1;
|
||||
overflow-y: hidden;
|
||||
|
||||
}
|
||||
|
||||
.jieshao {
|
||||
margin-bottom: 10rpx;
|
||||
/* box-shadow: 0 4rpx 4rpx rgba(150, 150, 150, 0.5); */
|
||||
position: relative;
|
||||
/* height: 100rpx; */
|
||||
display: block;
|
||||
}
|
||||
.video_biaoti {
|
||||
text-align: center;
|
||||
display: block;
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
.video_miaoshu {
|
||||
text-align: center;
|
||||
display: block;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.video_info {
|
||||
position: absolute;
|
||||
bottom: 10rpx;
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
right: 30rpx;
|
||||
}
|
||||
.video_list_content {
|
||||
margin: 10rpx 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.videolistcontainer {
|
||||
border-radius: 20rpx;
|
||||
margin: 10rpx 10rpx;
|
||||
box-shadow: 0 0 4rpx rgba(0, 0, 0, 0.5);
|
||||
width: 730rpx;
|
||||
height: 200rpx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
align-items: center;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.videoimage {
|
||||
width: 320rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-left: 10rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 5rpx 10rpx rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.videoinfo{
|
||||
position: relative;
|
||||
width: 390rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-left: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.videotitle {
|
||||
text-align: left;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.videodetails {
|
||||
display: block;
|
||||
margin: 10rpx 0rpx;
|
||||
font-size: 25rpx;
|
||||
line-height: 30rpx;
|
||||
}
|
||||
|
||||
.videoinfo2 {
|
||||
position:absolute;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
justify-content:left;
|
||||
}
|
||||
.videodata {
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
.videotime {
|
||||
font-size: 20rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
.coverimage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
// pages/IndexNewCourseDetails/IndexNewCourseDetails.js
|
||||
const api = require('../../utils/api');
|
||||
|
||||
Page({
|
||||
data: {
|
||||
html: ' ',
|
||||
courseCode: '',
|
||||
courseTitle: '',
|
||||
priceYuan: '',
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
const id = options.id;
|
||||
if (!id) return;
|
||||
|
||||
api
|
||||
.getHomeCourses()
|
||||
.then((list) => {
|
||||
const item = (list || []).filter((c) => String(c.id) === String(id))[0];
|
||||
if (!item) return;
|
||||
this.setData({
|
||||
html: item.content || ' ',
|
||||
courseCode: item.courseCode || '',
|
||||
courseTitle: item.courseTitle || '',
|
||||
});
|
||||
})
|
||||
.catch((err) => console.error('[IndexNewCourseDetails] 加载失败', err));
|
||||
},
|
||||
|
||||
/** 复用付费课页面完成购买:未拥有时那里会展示价格与购买按钮。 */
|
||||
toBuy() {
|
||||
if (!this.data.courseCode) return;
|
||||
wx.navigateTo({ url: '/pages/VideoDetails/VideoDetails?code=' + this.data.courseCode });
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"Parser":"/Parser/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<!--pages/IndexNewCourseDetails/IndexNewCourseDetails.wxml-->
|
||||
<Parser html="{{html}}">加载中...</Parser>
|
||||
|
||||
<view class="fixed-btn-wrapper">
|
||||
<view class="btn-group">
|
||||
<button wx:if="{{courseCode}}" class="DianJiXiangQing1" bind:tap="toBuy">
|
||||
<text class="DianJiXiangQing2">立即购买</text>
|
||||
</button>
|
||||
<button class="DianJiXiangQing1" open-type="contact" bindcontact="handleContact">
|
||||
<text class="DianJiXiangQing2">咨询客服</text>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,46 @@
|
||||
/* pages/IndexNewCourseDetails/IndexNewCourseDetails.wxss */
|
||||
@keyframes breathe {
|
||||
0%, 100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
}
|
||||
|
||||
.fixed-btn-wrapper {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 60rpx;
|
||||
padding: 0 20rpx; /* 调整为左右边距 */
|
||||
display: flex;
|
||||
justify-content: center; /* 水平居中 */
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
max-width: 700rpx;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.DianJiXiangQing1 {
|
||||
flex: 1;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
border: none;
|
||||
margin: 0 10rpx;
|
||||
border-radius: 45rpx;
|
||||
height: 90rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
animation: breathe 1s linear infinite;
|
||||
}
|
||||
|
||||
.DianJiXiangQing2 {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
// pages/LoginOrOutDetails/LoginOrOutDetails.js
|
||||
const api = require('../../utils/api');
|
||||
const store = require('../../utils/store');
|
||||
const config = require('../../config/index');
|
||||
|
||||
const app = getApp();
|
||||
|
||||
/** 未填昵称时自动生成,与旧版行为一致:用户 + 8 位小写字母数字 */
|
||||
function randomNickname() {
|
||||
const chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
||||
let s = '';
|
||||
for (let i = 0; i < 8; i++) s += chars[Math.floor(Math.random() * chars.length)];
|
||||
return '用户' + s;
|
||||
}
|
||||
|
||||
Page({
|
||||
data: {
|
||||
userInfo: { avatarUrl: '', nickName: '' },
|
||||
loginStatue: false,
|
||||
LoginTag: '一键登录',
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
app.ready().then(() => this.refresh());
|
||||
},
|
||||
|
||||
onShow() {
|
||||
this.refresh();
|
||||
},
|
||||
|
||||
refresh() {
|
||||
const user = store.getUser();
|
||||
const registered = !!(user && user.nickname);
|
||||
this.setData({
|
||||
loginStatue: registered,
|
||||
LoginTag: registered ? '退出登录' : '一键登录',
|
||||
userInfo: {
|
||||
avatarUrl: config.STATIC_BASE_URL + config.PLACEHOLDER.WECHAT,
|
||||
nickName: registered ? user.nickname : '',
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
onLoginBtnClick() {
|
||||
const nickname = this.data.userInfo.nickName || randomNickname();
|
||||
wx.showLoading({ title: '请稍候', mask: true });
|
||||
|
||||
api
|
||||
.updateMe({ nickname: nickname })
|
||||
.then((user) => {
|
||||
store.setUser(user);
|
||||
wx.hideLoading();
|
||||
wx.showToast({ title: '成功', icon: 'success', mask: true, duration: 1500 });
|
||||
setTimeout(() => wx.switchTab({ url: '/pages/wode/wode' }), 1500);
|
||||
})
|
||||
.catch((err) => {
|
||||
wx.hideLoading();
|
||||
wx.showToast({ title: err.message || '登录失败', icon: 'none', mask: true });
|
||||
});
|
||||
},
|
||||
|
||||
onlogout() {
|
||||
if (!this.data.loginStatue) return;
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '确定退出登录吗?',
|
||||
confirmColor: '#ff0000',
|
||||
success: (res) => {
|
||||
if (!res.confirm) return;
|
||||
wx.showLoading({ title: '请稍候', mask: true });
|
||||
api.logout().then(() => {
|
||||
wx.hideLoading();
|
||||
wx.switchTab({ url: '/pages/wode/wode' });
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "个人信息"
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<scroll-view class="scrollarea" scroll-y type="list">
|
||||
|
||||
<view class="imgview">
|
||||
<image class="touxiang_img" src="{{userInfo.avatarUrl}}" mode="" />
|
||||
</view>
|
||||
<view class="imgview2">
|
||||
<text class="imgtext2">叶雷讲数学</text>
|
||||
</view>
|
||||
<view class="imgview3">
|
||||
<text class="imgtext3">让数学不再难学</text>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{!loginStatue}}" class="btn_wrapper">
|
||||
<button plain class="btn1" bind:tap="onLoginBtnClick">
|
||||
<text class="btn_text">{{LoginTag}}</text>
|
||||
</button>
|
||||
</view>
|
||||
<view wx:else="{{loginStatue}}" class="btn_wrapper">
|
||||
<button plain class="btn2" bind:tap="onlogout">
|
||||
<text class="btn_text">退出登录</text>
|
||||
</button>
|
||||
</view>
|
||||
|
||||
|
||||
</scroll-view>
|
||||
@@ -0,0 +1,117 @@
|
||||
/* pages/LoginOrOutDetails/LoginOrOutDetails.wxss */
|
||||
page {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.scrollarea {
|
||||
flex: 1;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.warp {
|
||||
|
||||
/* border: 1px solid #353535; */
|
||||
padding: 10rpx 0;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
margin: 50rpx 100rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
.userinfo1 {
|
||||
margin-top: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.userinfo2 {
|
||||
margin-top: 80rpx;
|
||||
margin-bottom: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.touxiang_btn[plain] {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
padding: 0;
|
||||
margin-left: 50rpx;
|
||||
margin-right: 50rpx;
|
||||
border-radius: 8px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.touxiang_text {
|
||||
margin-right: 50rpx;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
.imgview {
|
||||
margin-top: 300rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.imgview2 {
|
||||
margin-top: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.imgview3 {
|
||||
color: rgb(95, 95, 95);
|
||||
font-size: 25rpx;
|
||||
margin-top: 15rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.imgtext {
|
||||
display: block;
|
||||
|
||||
}
|
||||
|
||||
.touxiang_img {
|
||||
display: block;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.nickname_label {
|
||||
margin-right: 50rpx;
|
||||
font-size: 34rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.nickname_input {
|
||||
width: 160rpx;
|
||||
padding-left: 40rpx;
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
width: 546rpx;
|
||||
margin-top: 30rpx;
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
.btn1[plain] {
|
||||
border: 0px solid #d10000;
|
||||
background-color: #d10000;
|
||||
/* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); */
|
||||
}
|
||||
.btn2 {
|
||||
width: 546rpx;
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 100rpx;
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
.btn2[plain] {
|
||||
border: 0px solid #d10000;
|
||||
background-color: #d10000;
|
||||
/* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); */
|
||||
}
|
||||
.btn_text {
|
||||
|
||||
color: rgb(255, 255, 255);
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
// pages/VideoDetails/VideoDetails.js
|
||||
const api = require('../../utils/api');
|
||||
const store = require('../../utils/store');
|
||||
const format = require('../../utils/format');
|
||||
|
||||
const POLL_INTERVAL = 1500;
|
||||
const POLL_MAX = 8;
|
||||
|
||||
Page({
|
||||
data: {
|
||||
code: '',
|
||||
owned: false,
|
||||
loading: true,
|
||||
buying: false,
|
||||
VideoTitle: '',
|
||||
VideoDetails: '',
|
||||
coverUrl: '',
|
||||
priceYuan: '',
|
||||
playdata: [],
|
||||
VideoPlayerSrc: '',
|
||||
HiddenVideoControl: true,
|
||||
top: 0,
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
const code = options.code;
|
||||
if (!code) {
|
||||
wx.switchTab({ url: '/pages/kecheng/kecheng' });
|
||||
return;
|
||||
}
|
||||
this.setData({ code: code });
|
||||
this.load(code);
|
||||
},
|
||||
|
||||
onShow() {
|
||||
if (this.data.code && this.data.owned) this.load(this.data.code);
|
||||
},
|
||||
|
||||
load(code) {
|
||||
api
|
||||
.getCourse(code)
|
||||
.then((course) => {
|
||||
this.setData({
|
||||
loading: false,
|
||||
owned: course.owned,
|
||||
VideoTitle: course.title || '',
|
||||
VideoDetails: course.intro || '',
|
||||
coverUrl: course.coverUrl || '',
|
||||
priceYuan: format.fenToYuan(course.priceFen),
|
||||
});
|
||||
if (course.owned) this.loadLessons(code);
|
||||
})
|
||||
.catch((err) => {
|
||||
this.setData({ loading: false });
|
||||
wx.showToast({ title: err.message || '课程加载失败', icon: 'none' });
|
||||
setTimeout(() => wx.switchTab({ url: '/pages/kecheng/kecheng' }), 1500);
|
||||
});
|
||||
},
|
||||
|
||||
loadLessons(code) {
|
||||
api
|
||||
.getLessons(code)
|
||||
.then((list) => {
|
||||
const rows = (list || []).map((item) => ({
|
||||
chapterId: item.chapterId,
|
||||
playId: item.playId,
|
||||
chapterTitle: item.chapterTitle,
|
||||
lessonTitle: item.lessonTitle,
|
||||
duration: item.duration,
|
||||
publishedAt: format.toDateString(item.publishedAt),
|
||||
coverUrl: item.coverUrl,
|
||||
}));
|
||||
this.setData({ playdata: rows });
|
||||
})
|
||||
.catch((err) => {
|
||||
this.setData({ playdata: [] });
|
||||
console.warn('[VideoDetails] 课时加载失败', err);
|
||||
});
|
||||
},
|
||||
|
||||
/** 点课时:向后端换一次性播放地址,视频本身不直接暴露。 */
|
||||
onTapLesson(e) {
|
||||
const item = this.data.playdata[e.currentTarget.dataset.index];
|
||||
if (!item) return;
|
||||
|
||||
wx.showLoading({ title: '加载中', mask: true });
|
||||
api
|
||||
.getPlayUrl(this.data.code, item.chapterId, item.playId)
|
||||
.then((res) => {
|
||||
wx.hideLoading();
|
||||
this.setData({ VideoPlayerSrc: res.url, HiddenVideoControl: false, top: 420 });
|
||||
})
|
||||
.catch((err) => {
|
||||
wx.hideLoading();
|
||||
wx.showToast({ title: err.message || '无法播放', icon: 'none' });
|
||||
});
|
||||
},
|
||||
|
||||
/** 购买:下单 → 拉起支付 → 轮询订单状态确认发货。 */
|
||||
buyNow() {
|
||||
if (this.data.buying) return;
|
||||
if (typeof wx.requestVirtualPayment !== 'function') {
|
||||
wx.showToast({ title: '当前微信版本不支持支付,请升级微信', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
|
||||
this.setData({ buying: true });
|
||||
wx.showLoading({ title: '发起支付', mask: true });
|
||||
|
||||
api
|
||||
.createOrder(this.data.code)
|
||||
.then((order) => {
|
||||
wx.hideLoading();
|
||||
return api.requestVirtualPayment(order.payData).then(() => order.outTradeNo);
|
||||
})
|
||||
.then((outTradeNo) => this.waitForDelivery(outTradeNo))
|
||||
.catch((err) => {
|
||||
wx.hideLoading();
|
||||
this.setData({ buying: false });
|
||||
// 用户主动取消不算错误
|
||||
if (err && err.errMsg && err.errMsg.indexOf('cancel') >= 0) return;
|
||||
wx.showToast({ title: (err && err.message) || '支付失败', icon: 'none' });
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 支付成功后权益由服务端发货推送发放,存在秒级延迟,这里轮询确认。
|
||||
* 即便轮询全部超时也不会丢单:服务端有定时查单兜底。
|
||||
*/
|
||||
waitForDelivery(outTradeNo) {
|
||||
let attempts = 0;
|
||||
const poll = () => {
|
||||
attempts += 1;
|
||||
return api.getOrder(outTradeNo).then((order) => {
|
||||
if (order.status === 2) {
|
||||
this.setData({ buying: false, owned: true });
|
||||
wx.showToast({ title: '购买成功', icon: 'success', mask: true });
|
||||
this.load(this.data.code);
|
||||
return;
|
||||
}
|
||||
if (attempts >= POLL_MAX || order.status === 3 || order.status === 4) {
|
||||
this.setData({ buying: false });
|
||||
wx.showToast({ title: '支付已提交,开通可能稍有延迟', icon: 'none', duration: 3000 });
|
||||
return;
|
||||
}
|
||||
return new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL)).then(poll);
|
||||
});
|
||||
};
|
||||
return poll();
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return { title: '叶雷讲数学', path: '/pages/index/index' };
|
||||
},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<!--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;">
|
||||
<view class="jieshao">
|
||||
<text decode class="video_biaoti"> {{VideoTitle}}</text>
|
||||
<text decode class="video_miaoshu"> {{VideoDetails}}</text>
|
||||
<text decode class="video_info"> 已更新{{playdata.length}}期</text>
|
||||
</view>
|
||||
|
||||
<view class="videolistcontainer" bind:tap="onTapLesson"
|
||||
wx:for="{{playdata}}" wx:for-item="item" wx:for-index="index" wx:key="index" data-index="{{index}}">
|
||||
<view class="videoimage">
|
||||
<image class="coverimage" src="{{item.coverUrl}}" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="videoinfo">
|
||||
<text class="videotitle">{{item.chapterTitle}}</text>
|
||||
<text class="videodetails">{{item.lessonTitle}}</text>
|
||||
<view class="videoinfo2">
|
||||
<text class="videodata">{{item.publishedAt}}</text>
|
||||
<text class="videotime">{{item.duration}}min</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</block>
|
||||
|
||||
<!-- 未拥有:展示介绍与购买入口 -->
|
||||
<block wx:else>
|
||||
<scroll-view class="scrollarea" scroll-y type="list">
|
||||
<view class="jieshao">
|
||||
<text decode class="video_biaoti"> {{VideoTitle}}</text>
|
||||
<text decode class="video_miaoshu"> {{VideoDetails}}</text>
|
||||
</view>
|
||||
|
||||
<view style="padding: 0 40rpx;">
|
||||
<image style="width: 100%; border-radius: 16rpx;" src="{{coverUrl}}" mode="widthFix" />
|
||||
</view>
|
||||
|
||||
<view class="fixed-btn-wrapper">
|
||||
<view class="btn-group">
|
||||
<button class="DianJiXiangQing1" bind:tap="buyNow" disabled="{{buying}}">
|
||||
<text class="DianJiXiangQing2">{{buying ? '处理中…' : '立即购买 ¥' + priceYuan}}</text>
|
||||
</button>
|
||||
<button class="DianJiXiangQing1" open-type="contact">
|
||||
<text class="DianJiXiangQing2">咨询客服</text>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</block>
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
.videoplayer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 420rpx;
|
||||
width: 750rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
.scrollarea {
|
||||
position: relative;
|
||||
top: 420rpx;
|
||||
flex: 1;
|
||||
overflow-y: hidden;
|
||||
|
||||
}
|
||||
|
||||
.jieshao {
|
||||
margin-bottom: 10rpx;
|
||||
/* box-shadow: 0 4rpx 4rpx rgba(150, 150, 150, 0.5); */
|
||||
position: relative;
|
||||
height: 200rpx;
|
||||
}
|
||||
.video_biaoti {
|
||||
text-align: center;
|
||||
display: block;
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
.video_miaoshu {
|
||||
text-align: center;
|
||||
display: block;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.video_info {
|
||||
position:absolute;
|
||||
bottom: 10rpx;
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
right: 30rpx;
|
||||
}
|
||||
.video_list_content {
|
||||
margin: 10rpx 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.videolistcontainer {
|
||||
border-radius: 20rpx;
|
||||
margin: 10rpx 10rpx;
|
||||
box-shadow: 0 0 4rpx rgba(0, 0, 0, 0.5);
|
||||
width: 730rpx;
|
||||
height: 200rpx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
align-items: center;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.videoimage {
|
||||
width: 320rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-left: 10rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 5rpx 10rpx rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.videoinfo{
|
||||
position: relative;
|
||||
width: 390rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-left: 20rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.videotitle {
|
||||
text-align: left;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.videodetails {
|
||||
display: block;
|
||||
margin: 10rpx 0rpx;
|
||||
font-size: 25rpx;
|
||||
line-height: 30rpx;
|
||||
}
|
||||
|
||||
.videoinfo2 {
|
||||
position:absolute;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
justify-content:left;
|
||||
}
|
||||
.videodata {
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
.videotime {
|
||||
font-size: 20rpx;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
.coverimage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
// pages/VideoDetailsPage/VideoDetailsPage.js
|
||||
const htmlSnip =
|
||||
`<p>
|
||||
在初中数学的考试当中,解所有题型都需要用到公式,公式的重要性不言而喻!为了更好的帮助孩子们记住初中数学常用的公式、定理,在此老师给大家总结了初中三年所有的公式及定理!这份资料十分珍贵,每次考试都能用的上!
|
||||
</p>
|
||||
<p>
|
||||
<img src="https://api.yeomai.site/WebPages/2/1.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/2.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/3.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/4.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/5.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/6.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/7.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/8.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/9.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/10.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/11.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/12.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/13.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/14.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/15.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/16.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/17.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/18.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/19.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/20.jpg"/><br/><img src="https://api.yeomai.site/WebPages/2/21.jpg"/>
|
||||
</p>
|
||||
<p>
|
||||
<br/>
|
||||
</p>
|
||||
`
|
||||
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
htmlSnip,
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
},
|
||||
//允许分享到朋友圈
|
||||
onShareTimeline(){
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"Parser":"/Parser/index"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<text>VideoDetailsPage</text>
|
||||
<text>富文本测试</text>
|
||||
<Parser html="{{htmlSnip}}" />
|
||||
@@ -0,0 +1,7 @@
|
||||
/* pages/VideoDetailsPage/VideoDetailsPage.wxss */
|
||||
text {
|
||||
/* display:inherit; */
|
||||
left: 400rpx;
|
||||
top: 100 px;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
// pages/WebPageDetails/WebPageDetails.js
|
||||
const api = require('../../utils/api');
|
||||
const format = require('../../utils/format');
|
||||
|
||||
Page({
|
||||
data: {
|
||||
htmlcontent: ' ',
|
||||
author: '',
|
||||
title: '',
|
||||
date: '',
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
const id = options.id;
|
||||
if (!id) return;
|
||||
|
||||
api
|
||||
.getArticle(id)
|
||||
.then((article) => {
|
||||
if (!article) return;
|
||||
this.setData({
|
||||
htmlcontent: article.content || ' ',
|
||||
author: article.publisher || '',
|
||||
title: article.title || '',
|
||||
date: format.toDateString(article.publishedAt),
|
||||
});
|
||||
})
|
||||
.catch((err) => console.error('[WebPageDetails] 加载失败', err));
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return { title: '叶雷讲数学', path: '/pages/index/index' };
|
||||
},
|
||||
|
||||
onShareTimeline() {
|
||||
return { title: '叶雷讲数学' };
|
||||
},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"Parser":"/Parser/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<scroll-view class="scrollarea" scroll-y type="list">
|
||||
<text class="pagetitle">{{title}}</text>
|
||||
|
||||
<view class="pageauthoranddate">
|
||||
<text class="pageauthor">{{author}}</text>
|
||||
<text class="pagedate">{{date}}</text>
|
||||
</view>
|
||||
|
||||
<Parser html="{{htmlcontent}}" />
|
||||
|
||||
|
||||
</scroll-view>
|
||||
@@ -0,0 +1,63 @@
|
||||
/**index.wxss**/
|
||||
page {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.scrollarea {
|
||||
flex: 1;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.pagetitle {
|
||||
display: block;
|
||||
font-size: 40rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.pagecontent {
|
||||
display: block;
|
||||
font-size: 30rpx;
|
||||
text-align: left;
|
||||
text-indent: 0rem;
|
||||
margin-bottom: 30rpx;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
.pagecontent:first-child {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.pageimg {
|
||||
width: 100%;
|
||||
}
|
||||
.pagevideo {
|
||||
width: 750rpx;
|
||||
height: 421rpx;
|
||||
}
|
||||
.pageauthor {
|
||||
color: rgb(165, 165, 165);
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.pagedate {
|
||||
color: rgb(151, 151, 151);
|
||||
padding-left: 60rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.pageauthoranddate {
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.sharebtn[plain] {
|
||||
display: inline;
|
||||
color: cadetblue;
|
||||
border:none;
|
||||
font-size: 30rpx;
|
||||
margin:0 rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-right: 0rpx;
|
||||
padding:0 ;
|
||||
width: 120rpx;
|
||||
}
|
||||
.content123 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
// pages/index/index.js
|
||||
const api = require('../../utils/api');
|
||||
const store = require('../../utils/store');
|
||||
const config = require('../../config/index');
|
||||
|
||||
const app = getApp();
|
||||
const updateManager = wx.getUpdateManager();
|
||||
|
||||
const PAGE_SIZE = 10;
|
||||
|
||||
Page({
|
||||
data: {
|
||||
staticBase: config.STATIC_BASE_URL,
|
||||
banners: [],
|
||||
courseList: [],
|
||||
freeCourseList: [],
|
||||
articles: [],
|
||||
page: 1,
|
||||
articleTotal: 0,
|
||||
loadingMore: false,
|
||||
noMore: false,
|
||||
title1: '',
|
||||
title2: '',
|
||||
title3: '',
|
||||
footerText: '',
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
// 等应用初始化完成再取配置,避免首屏读到空缓存
|
||||
app.ready().then(() => this.applyConfig());
|
||||
this.loadAll();
|
||||
},
|
||||
|
||||
applyConfig() {
|
||||
this.setData({
|
||||
title1: store.cfg('home.title.paid', '付费课程'),
|
||||
title2: store.cfg('home.title.trial', '试听课程'),
|
||||
title3: store.cfg('home.title.public', '公开课程'),
|
||||
footerText: store.cfg('home.footer_text', '我是有底线的!'),
|
||||
});
|
||||
},
|
||||
|
||||
loadAll() {
|
||||
this.setData({ page: 1, noMore: false });
|
||||
|
||||
api
|
||||
.getBanners()
|
||||
.then((list) => this.setData({ banners: list || [] }))
|
||||
.catch((err) => console.error('[index] 轮播加载失败', err));
|
||||
|
||||
api
|
||||
.getHomeCourses()
|
||||
.then((list) => this.setData({ courseList: list || [] }))
|
||||
.catch((err) => console.error('[index] 新课加载失败', err));
|
||||
|
||||
api
|
||||
.getHomeFreeCourses()
|
||||
.then((list) => this.setData({ freeCourseList: list || [] }))
|
||||
.catch((err) => console.error('[index] 试听列表加载失败', err));
|
||||
|
||||
api
|
||||
.getArticles(1, PAGE_SIZE)
|
||||
.then((res) => this.setData({ articles: res.items || [], articleTotal: res.total || 0, page: 1 }))
|
||||
.catch((err) => console.error('[index] 文章加载失败', err));
|
||||
},
|
||||
|
||||
onShow() {
|
||||
updateManager.onCheckForUpdate(() => {});
|
||||
updateManager.onUpdateReady(() => {
|
||||
wx.showModal({
|
||||
title: '更新提示',
|
||||
showCancel: false,
|
||||
content: '新版本已准备好,即将重启应用',
|
||||
success: (res) => {
|
||||
if (res.confirm) updateManager.applyUpdate();
|
||||
},
|
||||
});
|
||||
});
|
||||
updateManager.onUpdateFailed(() => {});
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
Promise.all([this.reload()]).then(() => wx.stopPullDownRefresh());
|
||||
},
|
||||
|
||||
async reload() {
|
||||
try {
|
||||
const cfg = await api.getConfig();
|
||||
store.setSiteConfig(cfg);
|
||||
this.applyConfig();
|
||||
} catch (err) {
|
||||
console.warn('[index] 配置刷新失败', err);
|
||||
}
|
||||
this.loadAll();
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
if (this.data.loadingMore || this.data.noMore) return;
|
||||
const next = this.data.page + 1;
|
||||
this.setData({ loadingMore: true });
|
||||
|
||||
api
|
||||
.getArticles(next, PAGE_SIZE)
|
||||
.then((res) => {
|
||||
const merged = this.data.articles.concat(res.items || []);
|
||||
this.setData({
|
||||
articles: merged,
|
||||
page: next,
|
||||
loadingMore: false,
|
||||
noMore: merged.length >= (res.total || 0),
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error('[index] 加载更多失败', err);
|
||||
this.setData({ loadingMore: false });
|
||||
});
|
||||
},
|
||||
|
||||
toArticle(e) {
|
||||
wx.navigateTo({ url: '/pages/WebPageDetails/WebPageDetails?id=' + e.currentTarget.dataset.id });
|
||||
},
|
||||
|
||||
toNewCourse(e) {
|
||||
wx.navigateTo({ url: '/pages/IndexNewCourseDetails/IndexNewCourseDetails?id=' + e.currentTarget.dataset.id });
|
||||
},
|
||||
|
||||
toFreeCourse(e) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/IndexFreeCourseDetails/IndexFreeCourseDetails?seriesNo=' + e.currentTarget.dataset.series,
|
||||
});
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return { title: '叶雷讲数学', path: '/pages/index/index' };
|
||||
},
|
||||
|
||||
onShareTimeline() {
|
||||
return { title: '叶雷讲数学' };
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-loading": "@vant/weapp/loading/index"
|
||||
},
|
||||
"onReachBottomDistance":50,
|
||||
"enablePullDownRefresh":true
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<!--index.wxml-->
|
||||
|
||||
<scroll-view class="container" scroll-y enable-flex type="custom">
|
||||
<view class="banner">
|
||||
<swiper class="bannerswiper" autoplay interval="20000" circular indicator-dots indicator-color="rgba(255, 255, 255, .3)" indicator-active-color="rgba(255, 255, 255, 1.0)" indicator-type="normal" duration="1000" easing-function="easeOutCubic">
|
||||
<swiper-item wx:for="{{banners}}" wx:for-item="item" wx:key="id" class="bannerswiperitem">
|
||||
<image class="indeximage" src="{{item.imageUrl}}" mode="aspectFill" />
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
<!-- 新课上线 -->
|
||||
<view class="shouyetupianlist">
|
||||
<view wx:if="{{courseList.length > 0}}" class="biaoti01">
|
||||
<image class="biaoti01img" src="{{staticBase}}/Images/Icon/xinke.png" mode="aspectFill" />
|
||||
<text decode> {{title1}}</text>
|
||||
</view>
|
||||
<view class="shouyetupianlistcontent" wx:for="{{courseList}}" wx:for-item="item" wx:for-index="index" wx:key="id" data-id="{{item.id}}" bind:tap="toNewCourse">
|
||||
<view class="hengxianglist">
|
||||
<image class="indeximagelist" src="{{item.coverUrl}}" mode="aspectFill" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 自我学习 -->
|
||||
<view class="shouyetupianlist">
|
||||
<view wx:if="{{freeCourseList.length > 0}}" class="biaoti01">
|
||||
<image class="biaoti01img" src="{{staticBase}}/Images/Icon/ziwoxuexi.png" mode="aspectFill" />
|
||||
<text decode> {{title2}}</text>
|
||||
</view>
|
||||
<view class="shouyetupianlistcontent" wx:for="{{freeCourseList}}" wx:for-item="item" wx:for-index="index" wx:key="id" data-series="{{item.seriesNo}}" bind:tap="toFreeCourse">
|
||||
<view class="hengxianglist">
|
||||
<image class="indeximagelist" src="{{item.coverUrl}}" mode="aspectFill" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 知识速通 -->
|
||||
<view class="shouyetupianlist">
|
||||
<view wx:if="{{articles.length > 0}}" class="biaoti01">
|
||||
<image class="biaoti01img" src="{{staticBase}}/Images/Icon/sutong.png" mode="aspectFill" />
|
||||
<text decode> {{title3}}</text>
|
||||
</view>
|
||||
|
||||
<view class="shouyetupianlistcontent01" wx:for="{{articles}}" wx:for-item="item" wx:for-index="index" wx:key="id" bind:tap="toArticle" data-id="{{item.id}}">
|
||||
<view class="hengxianglist01">
|
||||
<image class="indeximagelist01" src="{{item.thumbUrl}}" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="indeximagelistmiaosu">{{item.title}}</view>
|
||||
<view class="indeximagelistmiaosu01">
|
||||
<text class="indeximagelistmiaosu0102">{{item.intro}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: auto; margin: 0px auto; margin-bottom: 10px;">
|
||||
<text wx:if="{{noMore}}">{{footerText}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
/**index.wxss**/
|
||||
/* 暂时未用到
|
||||
page {
|
||||
|
||||
} */
|
||||
|
||||
|
||||
.container {
|
||||
padding:0;
|
||||
align-items:center;
|
||||
flex-direction:column;
|
||||
justify-content:space-between;
|
||||
}
|
||||
.mulucontainer {
|
||||
width: 710rpx;
|
||||
height: 150rpx;
|
||||
white-space: nowrap; /*强制子元素为一行 */
|
||||
margin-left: 25rpx;
|
||||
}
|
||||
.navpage001 {
|
||||
display: inline-block;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
margin-right: 25rpx;
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
.navpage001img {
|
||||
margin:0 auto;
|
||||
width: 60%;
|
||||
height: 60%;
|
||||
}
|
||||
.mulucontainer .navpage001:last-child{
|
||||
margin-right: 0;
|
||||
}
|
||||
.banner{
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.shouyetupianlist {
|
||||
display: flex;
|
||||
flex-wrap: wrap;/* 允许内容换行 */
|
||||
justify-content:space-between;/* 水平方向上两端对齐 */
|
||||
}
|
||||
.shouyetupianlistcontent {
|
||||
/* display: inline; */
|
||||
padding: 0;
|
||||
margin: 20rpx;
|
||||
height: 204rpx;
|
||||
width: 334rpx; /* 每行两个图片,设置宽度为 48% 可以有一定的间距 */
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.shouyetupianlistcontent01 {
|
||||
position: relative;
|
||||
padding: 0;
|
||||
margin: 20rpx;
|
||||
height: 260rpx;
|
||||
width: 730rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.indeximagelist {
|
||||
width: 100%;
|
||||
height: 204rpx;
|
||||
}
|
||||
.indeximagelist01 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tupianwenzi {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.biaoti01 {
|
||||
display: flex;
|
||||
width: 750rpx;
|
||||
height: 60rpx;
|
||||
align-items: center;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.biaoti01img {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
.hengxianglist01 {
|
||||
display: flex;
|
||||
width: 300rpx;
|
||||
height: inherit; /* 推荐尺寸在300*250rpx 即150*125px */
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.indeximage{
|
||||
border-radius: 20rpx;
|
||||
height: 350rpx;
|
||||
width: 710rpx;
|
||||
transform: translate(20rpx, 30rpx);
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.bannerswiper {
|
||||
height: 390rpx;
|
||||
}
|
||||
.indeximagelistmiaosu {
|
||||
font-size: 28rpx;
|
||||
display:flex;
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
left: 300rpx;
|
||||
height: 70rpx;
|
||||
align-items: center;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.indeximagelistmiaosu01 {
|
||||
display: inline;
|
||||
position: absolute;
|
||||
left: 300rpx;
|
||||
top: 35px;
|
||||
align-items: center;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.indeximagelistmiaosu0102 {
|
||||
font-size: 20rpx;
|
||||
position: relative;
|
||||
top: -15px;
|
||||
width: 370rpx;
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
// pages/kecheng/kecheng.js
|
||||
const api = require('../../utils/api');
|
||||
const store = require('../../utils/store');
|
||||
const config = require('../../config/index');
|
||||
|
||||
const app = getApp();
|
||||
|
||||
Page({
|
||||
data: {
|
||||
staticBase: config.STATIC_BASE_URL,
|
||||
hasCourse: false,
|
||||
ownedCourses: [],
|
||||
otherCourses: [],
|
||||
tipsHtml: '',
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
// 旧版本用 10ms 轮询最多 5 秒等登录数据,这里改为等初始化完成
|
||||
app.ready().then(() => this.refresh());
|
||||
},
|
||||
|
||||
onShow() {
|
||||
if (store.isLoggedIn()) this.refresh();
|
||||
},
|
||||
|
||||
refresh() {
|
||||
this.loadTips();
|
||||
|
||||
api
|
||||
.getEntitlements()
|
||||
.then((list) => {
|
||||
store.setEntitlements(list);
|
||||
this.setData({ ownedCourses: list || [], hasCourse: (list || []).length > 0 });
|
||||
})
|
||||
.catch((err) => console.warn('[kecheng] 已购课程加载失败', err));
|
||||
|
||||
api
|
||||
.getCourses()
|
||||
.then((list) => {
|
||||
this.setData({ otherCourses: (list || []).filter((c) => !c.owned) });
|
||||
})
|
||||
.catch((err) => console.warn('[kecheng] 课程列表加载失败', err));
|
||||
},
|
||||
|
||||
loadTips() {
|
||||
if (this.data.tipsHtml) return;
|
||||
api
|
||||
.getTips()
|
||||
.then((tip) => this.setData({ tipsHtml: (tip && tip.content) || ' ' }))
|
||||
.catch((err) => console.warn('[kecheng] 文案加载失败', err));
|
||||
},
|
||||
|
||||
toMyCourse(e) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/VideoDetails/VideoDetails?code=' + e.currentTarget.dataset.code,
|
||||
});
|
||||
},
|
||||
|
||||
toStoreCourse(e) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/VideoDetails/VideoDetails?code=' + e.currentTarget.dataset.code,
|
||||
});
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return { title: '叶雷讲数学', path: '/pages/index/index' };
|
||||
},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"Parser":"/Parser/index"
|
||||
},
|
||||
"navigationBarTitleText": "知识"
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<scroll-view class="container" scroll-y enable-flex type="custom">
|
||||
<block wx:if="{{!hasCourse}}">
|
||||
<view style="width: 100%;height: 400rpx;">
|
||||
<image style="margin-top: 30rpx; margin-left: 20rpx; height: 350rpx; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); width: 710rpx; border-radius: 20rpx; background-color: rgb(0, 255, 255);"
|
||||
src="{{staticBase}}/Images/Banner/BGbanner.png" mode="aspectFill" />
|
||||
</view>
|
||||
<Parser html="{{tipsHtml}}" />
|
||||
</block>
|
||||
|
||||
<block wx:if="{{hasCourse}}">
|
||||
<view wx:for="{{ownedCourses}}" wx:for-item="item" wx:for-index="index" wx:key="courseId"
|
||||
class="kecheng" bind:tap="toMyCourse" data-code="{{item.code}}">
|
||||
<view class="kecheng_video_up">
|
||||
<image class="kecheng_img" src="{{item.coverUrl}}" mode="aspectFit" />
|
||||
</view>
|
||||
<view class="kecheng_video_right">
|
||||
<text class="kecheng_title">{{item.title}}</text>
|
||||
<text class="kecheng_details">{{item.intro}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<block wx:if="{{otherCourses.length > 0}}">
|
||||
<view wx:for="{{otherCourses}}" wx:for-item="item" wx:for-index="index" wx:key="code"
|
||||
class="kecheng" bind:tap="toStoreCourse" data-code="{{item.code}}">
|
||||
<view class="kecheng_video_up">
|
||||
<image class="kecheng_img" src="{{item.coverUrl}}" mode="aspectFit" />
|
||||
</view>
|
||||
<view class="kecheng_video_right">
|
||||
<text class="kecheng_title">{{item.title}}</text>
|
||||
<text class="kecheng_details">{{item.intro}}</text>
|
||||
</view>
|
||||
<text style="position: absolute; right: 24rpx; bottom: 24rpx; font-size: 24rpx; color: #ff6b00;">未开通</text>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* pages/kecheng/kecheng.wxss */
|
||||
.container {
|
||||
padding:0;
|
||||
align-items:center;
|
||||
flex-direction:column;
|
||||
justify-content:space-between;
|
||||
}
|
||||
.kecheng {
|
||||
width: 710rpx;
|
||||
height: 275rpx;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
align-items: center;
|
||||
margin: 6px 0;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
|
||||
.kecheng_video_up {
|
||||
width: 400rpx;
|
||||
height: 225rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.kecheng_video_right {
|
||||
margin-left: 5rpx;
|
||||
width: 290rpx;
|
||||
height: 225rpx;
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
.kecheng_img {
|
||||
background-color: #15457b;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
.kecheng_title {
|
||||
display: block;
|
||||
font-size: 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.kecheng_details {
|
||||
display: block;
|
||||
font-size: 25rpx;
|
||||
margin-top: 15rpx;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
// pages/wode/wode.js
|
||||
const api = require('../../utils/api');
|
||||
const store = require('../../utils/store');
|
||||
const config = require('../../config/index');
|
||||
|
||||
const app = getApp();
|
||||
|
||||
Page({
|
||||
data: {
|
||||
showCode: false,
|
||||
headiconUrl: '',
|
||||
isLoggedIn: false,
|
||||
userNameText: '未登录',
|
||||
loginBtnText: '登录注册',
|
||||
version: '',
|
||||
qrcodeUrl: '',
|
||||
text2: '',
|
||||
text3: '',
|
||||
text4: '',
|
||||
text5: '',
|
||||
text6: '',
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
app.ready().then(() => {
|
||||
this.applyConfig();
|
||||
this.applyUser();
|
||||
});
|
||||
},
|
||||
|
||||
onShow() {
|
||||
if (store.getSiteConfig() && Object.keys(store.getSiteConfig()).length) this.applyConfig();
|
||||
this.applyUser();
|
||||
},
|
||||
|
||||
applyConfig() {
|
||||
const qrcodeName = store.cfg('profile.qrcode_image', '');
|
||||
this.setData({
|
||||
version: store.cfg('site.version', 'V0.0.9'),
|
||||
text2: store.cfg('profile.menu.change_info', '修改资料'),
|
||||
text3: store.cfg('profile.menu.share', '好友分享'),
|
||||
text4: store.cfg('profile.menu.contact', '在线沟通'),
|
||||
text5: store.cfg('profile.menu.wechat', '添加微信:叶雷讲数学'),
|
||||
text6: store.cfg('profile.qrcode_caption', '长按识别二维码'),
|
||||
qrcodeUrl: qrcodeName ? config.STATIC_BASE_URL + '/Images/WXCode/' + qrcodeName + '.png' : '',
|
||||
});
|
||||
},
|
||||
|
||||
applyUser() {
|
||||
const user = store.getUser();
|
||||
// 已登录 = 有 token 且设置过昵称;未设置昵称的仍是游客,与旧版语义一致
|
||||
const registered = !!(user && user.nickname);
|
||||
this.setData({
|
||||
isLoggedIn: registered,
|
||||
userNameText: registered ? user.nickname : '未登录',
|
||||
loginBtnText: registered ? '退出登录' : '登录注册',
|
||||
headiconUrl: user && user.headiconUrl ? user.headiconUrl : config.STATIC_BASE_URL + config.PLACEHOLDER.USER,
|
||||
});
|
||||
},
|
||||
|
||||
toLoginOrOut() {
|
||||
wx.navigateTo({ url: '/pages/LoginOrOutDetails/LoginOrOutDetails' });
|
||||
},
|
||||
|
||||
toChangeUserInfo() {
|
||||
if (!this.data.isLoggedIn) {
|
||||
wx.showToast({ mask: true, icon: 'error', title: '请先登录' });
|
||||
return;
|
||||
}
|
||||
wx.navigateTo({ url: '/pages/ChangeUserInfo/ChangeUserInfo' });
|
||||
},
|
||||
|
||||
showQrcode() {
|
||||
this.setData({ showCode: true });
|
||||
},
|
||||
|
||||
onCodeClose() {
|
||||
this.setData({ showCode: false });
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
return { title: '叶雷讲数学', path: '/pages/index/index' };
|
||||
},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"van-field": "@vant/weapp/field/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-image": "@vant/weapp/image/index"
|
||||
},
|
||||
"navigationBarTitleText": "个人中心"
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<!--pages/wode/wode.wxml-->
|
||||
<van-popup show="{{ showCode }}" bind:close="onCodeClose">
|
||||
<view class="code-container">
|
||||
<text class="tip-text">{{text6}}</text>
|
||||
<van-image
|
||||
show-menu-by-longpress="true"
|
||||
use-loading-slot
|
||||
use-error-slot
|
||||
width="600rpx"
|
||||
height="816rpx"
|
||||
src="{{qrcodeUrl}}"
|
||||
/>
|
||||
<van-loading slot="loading" type="spinner" size="20" vertical />
|
||||
</view>
|
||||
</van-popup>
|
||||
|
||||
<scroll-view class="container" scroll-y enable-flex type="custom">
|
||||
<view class="login">
|
||||
<view class="touxiangimg">
|
||||
<image class="loginuserimg" src="{{headiconUrl}}" mode="aspectFill" />
|
||||
</view>
|
||||
|
||||
<view class="userinfo_name">
|
||||
<text>{{userNameText}}</text>
|
||||
<button class="loginbtn" bindtap="toLoginOrOut" plain>{{loginBtnText}}</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<button wx:if="{{isLoggedIn}}" class="functions2" bind:tap="toChangeUserInfo">
|
||||
<text class="zuobianwenzi">{{text2}}</text>
|
||||
<text class="jiantou"> > </text>
|
||||
</button>
|
||||
|
||||
<button class="functions2" open-type="share">
|
||||
<text class="zuobianwenzi">{{text3}}</text>
|
||||
<text class="jiantou"> > </text>
|
||||
</button>
|
||||
|
||||
<button class="functions2" open-type="contact">
|
||||
<text class="zuobianwenzi">{{text4}}</text>
|
||||
<text class="jiantou"> > </text>
|
||||
</button>
|
||||
|
||||
<button class="functions2" bind:tap="showQrcode">
|
||||
<text class="zuobianwenzi">{{text5}}</text>
|
||||
<text class="jiantou"> > </text>
|
||||
</button>
|
||||
|
||||
<view class="version">
|
||||
<text style="display: block;">Version {{version}}</text>
|
||||
<text style="font-size: 20rpx;display: block;">Copyright<text style="font-size: 15rpx;position: relative;top: -10rpx;right: 0rpx;">©</text> 2026 YelayMaths. All Rights Reserved.</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
/* pages/wode/wode.wxss */
|
||||
.container {
|
||||
padding:0;
|
||||
align-items:center;
|
||||
flex-direction:column;
|
||||
justify-content:space-between;
|
||||
}
|
||||
.code-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center; /* 水平居中 */
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: rgb(0, 201, 77);
|
||||
}
|
||||
|
||||
/* 文字样式:可选加粗、颜色、间距等 */
|
||||
.tip-text {
|
||||
font-size: 34rpx;
|
||||
color: #ffffff;
|
||||
margin-bottom: 20rpx; /* 与图片保持间距 */
|
||||
text-align: center; /* 冗余保险,虽然 flex 已居中 */
|
||||
}
|
||||
|
||||
.login {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
/* border: 3rpx solid rgb(110, 110, 110); */
|
||||
width: 710rpx;
|
||||
height: 150rpx;
|
||||
border-radius: 20rpx;
|
||||
margin: 20rpx;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.touxiangimg {
|
||||
display: flex;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
.userinfo_name {
|
||||
width: 500rpx;
|
||||
height: 150rpx;
|
||||
margin-left: 30rpx;
|
||||
border-radius: 75rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.loginbtn {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
.loginbtn[plain] {
|
||||
color: #353535;
|
||||
background-color: transparent;
|
||||
border: 0px solid #353535;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
padding: 0rpx 20rpx;
|
||||
}
|
||||
.loginuserimg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.functions1 {
|
||||
border: 3rpx solid rgb(110, 110, 110);
|
||||
width: 670rpx;
|
||||
border-radius: 20rpx;
|
||||
margin: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
padding: 20rpx;
|
||||
}
|
||||
.functions2 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
/* border: 3rpx solid rgb(110, 110, 110); */
|
||||
background-color: white;
|
||||
width: 710rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 20rpx;
|
||||
margin: 8rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.jiantou {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
.zuobianwenzi {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.function001 {
|
||||
height: 150rpx;
|
||||
width: 75rpx;
|
||||
|
||||
padding: 10rpx 47rpx;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
.functionimg001 {
|
||||
width: 75rpx;
|
||||
height: 75rpx;
|
||||
}
|
||||
|
||||
.functionimg002 {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
.functiontext001 {
|
||||
font-size: 25rpx;
|
||||
}
|
||||
.functionstools {
|
||||
position: relative;
|
||||
top: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
.version {
|
||||
position: fixed;
|
||||
bottom: 10rpx;
|
||||
color: rgb(197, 197, 197);
|
||||
font-size: 25rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user