sc
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = 寻驾-无人机
|
VITE_APP_TITLE = 耕读社
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
VITE_APP_ENV = 'development'
|
VITE_APP_ENV = 'development'
|
||||||
|
|
||||||
# 寻驾-无人机/开发环境
|
# 耕读社/开发环境
|
||||||
VITE_APP_BASE_API = 'https://cloud.ahfkbg.com/'
|
VITE_APP_BASE_API = 'https://cloud.ahfkbg.com/'
|
||||||
# VITE_APP_BASE_API = 'https://xj.ahduima.com/'
|
# VITE_APP_BASE_API = 'https://xj.ahduima.com/'
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VITE_APP_TITLE = 寻驾-无人机
|
VITE_APP_TITLE = 耕读社
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
VITE_APP_ENV = 'production'
|
VITE_APP_ENV = 'production'
|
||||||
|
|||||||
18
src/App.vue
18
src/App.vue
@@ -1,29 +1,11 @@
|
|||||||
<script>
|
<script>
|
||||||
import useUserStore from '@/jtools/store/user'
|
import useUserStore from '@/jtools/store/user'
|
||||||
import { getSysConfig } from '@/jtools/api/index';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function (options) {
|
onLaunch: function (options) {
|
||||||
if (useUserStore().isLogin) {
|
if (useUserStore().isLogin) {
|
||||||
useUserStore().getUserInfo()
|
useUserStore().getUserInfo()
|
||||||
}
|
}
|
||||||
getSysConfig({ configKey: 'AppletShowAll', driverTypeId: -1 }).then(res => {
|
|
||||||
let arr = []
|
|
||||||
if(res?.data?.configValue == 1) {
|
|
||||||
arr = [
|
|
||||||
{ text: '首页', icon: 'home', name: '/pages/index/index' },
|
|
||||||
{ text: '题库', icon: 'grid', name: '/pages/questionBank/index' },
|
|
||||||
{ text: '我', icon: 'account', name: '/pages/me/index' }
|
|
||||||
|
|
||||||
]
|
|
||||||
} else {
|
|
||||||
arr = [
|
|
||||||
{ text: '题库', icon: 'grid', name: '/pages/questionBank/index' },
|
|
||||||
{ text: '我', icon: 'account', name: '/pages/me/index' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
useUserStore().setTabbarList(arr)
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
onShow: function (options) {
|
onShow: function (options) {
|
||||||
// 如果是二维码扫描过来的,需要保存公司id
|
// 如果是二维码扫描过来的,需要保存公司id
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
import request from '../request/index.js';
|
|
||||||
|
|
||||||
export function getExamQuestion(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjQuestionTest/test',
|
|
||||||
method: 'GET',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getCurrentTest(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjQuestionTest/getCurrentTest',
|
|
||||||
method: 'GET',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getExamInfo(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjQuestionTest/getQuestionTestMessageById',
|
|
||||||
method: 'GET',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 交卷
|
|
||||||
export function submitExam(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjQuestionTest/testSubmit',
|
|
||||||
method: 'POST',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取考试记录
|
|
||||||
export function getExamRecord(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjQuestionTest/getTestScore',
|
|
||||||
method: 'POST',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,94 +1,36 @@
|
|||||||
import request from '../request/index.js';
|
import request from '../request/index.js';
|
||||||
|
|
||||||
export function getCarTypeList(data) {
|
export function getCourseList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'wrj-api/wrjModel/list',
|
url: 'sinology-api/sinologyLesson/page',
|
||||||
method: 'GET',
|
method: 'POST',
|
||||||
data,
|
|
||||||
noToken: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
export function getDriverTypeList(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjDriverType/list',
|
|
||||||
method: 'GET',
|
|
||||||
data,
|
data,
|
||||||
noToken: true
|
noToken: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取章节列表
|
export function getCourseChapter(data) {
|
||||||
export function getChapterOptions(data) {
|
|
||||||
return request({
|
return request({
|
||||||
url: 'wrj-api/wrjChapter/queryChapter',
|
url: 'sinology-api/sinologyChapter/queryChapter',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data,
|
||||||
|
noToken: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getChapterInfo(data) {
|
export function getChapterDetail(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'wrj-api/wrjChapter/queryChapterInfo',
|
url: 'sinology-api/sinologyChapter/getInfo',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data,
|
||||||
});
|
noToken: true
|
||||||
}
|
|
||||||
|
|
||||||
export function getChapterDoneList(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjChapter/queryChapterQuestionNumWithUser',
|
|
||||||
method: 'GET',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function uploadFile(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/system/file/upload',
|
|
||||||
method: 'POST',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询考点列表
|
|
||||||
export function queryExamPoint(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjExamPlace/pageList',
|
|
||||||
method: 'POST',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询考点时间
|
|
||||||
export function queryExamPointTime(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjExamPlace/queryDate',
|
|
||||||
method: 'POST',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据时间查询考点
|
|
||||||
export function queryExamPointByTime(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjExamPlace/query',
|
|
||||||
method: 'POST',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 收藏考点
|
|
||||||
export function collectExamPoint(placeId) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjUserCollectPlace/update?placeId=' + placeId,
|
|
||||||
method: 'POST'
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取配置项
|
// 获取配置项
|
||||||
export function getSysConfig(data) {
|
export function getSysConfig(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'wrj-api/wrjSysConfig/queryConfigByKey',
|
url: 'sinology-api/sysConfig/queryConfigByKey',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data,
|
data,
|
||||||
noToken: true
|
noToken: true
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import request from '../request/index.js';
|
|||||||
|
|
||||||
export function login(data) {
|
export function login(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'wrj-api/sysUser/login',
|
url: 'sinology-api/sysUser/login',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data,
|
data,
|
||||||
noToken: true
|
noToken: true
|
||||||
@@ -11,14 +11,14 @@ export function login(data) {
|
|||||||
|
|
||||||
export function logout() {
|
export function logout() {
|
||||||
return request({
|
return request({
|
||||||
url: 'wrj-api/sysUser/loginOut',
|
url: 'sinology-api/sysUser/loginOut',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getInfo() {
|
export function getInfo() {
|
||||||
return request({
|
return request({
|
||||||
url: 'wrj-api/sysUser/queryUserMessage',
|
url: 'sinology-api/sysUser/queryUserMessage',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,93 +0,0 @@
|
|||||||
import request from '../request/index.js';
|
|
||||||
|
|
||||||
export function queryQuestion(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjQuestion/queryQuestionWithUser',
|
|
||||||
method: 'POST',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function queryQuestionEmpty(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjQuestion/queryQuestion',
|
|
||||||
method: 'POST',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function doExercise(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjQuestionPractice/insert',
|
|
||||||
method: 'POST',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function clearPractice(params) {
|
|
||||||
return request({
|
|
||||||
url: `wrj-api/wrjQuestionPractice/clear?practiceType=${params.practiceType}&businessCode=${params.businessCode}`,
|
|
||||||
method: 'POST'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 收藏
|
|
||||||
export function collectQuestion(questionId) {
|
|
||||||
return request({
|
|
||||||
url: `wrj-api/wrjUserCollectQuestion/update?questionId=${questionId}`,
|
|
||||||
method: 'POST'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取收藏题目
|
|
||||||
export function queryLikeQuestion(data) {
|
|
||||||
return request({
|
|
||||||
url: `wrj-api/wrjUserCollectQuestion/getUserCollectQuestion`,
|
|
||||||
method: 'GET',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取错题
|
|
||||||
export function queryErrorQuestion(data) {
|
|
||||||
return request({
|
|
||||||
url: `wrj-api/wrjUserErrorQuestion/getUserErrorQuestion`,
|
|
||||||
method: 'GET',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取收藏的列表
|
|
||||||
export function queryCollectList(driverTypeId) {
|
|
||||||
return request({
|
|
||||||
url: `wrj-api/wrjUserCollectQuestion/getUserCollectQuestionId?driverTypeId=${driverTypeId}`,
|
|
||||||
method: 'GET'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 移除错题
|
|
||||||
export function removeErrorQuestion(questionId) {
|
|
||||||
return request({
|
|
||||||
url: `wrj-api/wrjUserErrorQuestion/remove?questionId=${questionId}`,
|
|
||||||
method: 'POST'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取首页信息
|
|
||||||
export function queryIndexInfo(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjQuestion/getIndexData',
|
|
||||||
method: 'GET',
|
|
||||||
data,
|
|
||||||
publicApi: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取考试信息
|
|
||||||
export function queryIndexDetail(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjDriverType/detail',
|
|
||||||
method: 'GET',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
import request from '../request/index.js';
|
|
||||||
|
|
||||||
export function getStationList(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjSchool/pageList',
|
|
||||||
method: 'POST',
|
|
||||||
data,
|
|
||||||
noToken: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 培训机构注册
|
|
||||||
export function registerStation(data) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjSchool/insert',
|
|
||||||
method: 'POST',
|
|
||||||
data,
|
|
||||||
noToken: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getStationDetail(schoolId) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjSchool/detail?schoolId=' + schoolId,
|
|
||||||
method: 'GET',
|
|
||||||
publicApi: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 收藏
|
|
||||||
export function collectStation(schoolId) {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjUserCollectSchool/update?schoolId=' + schoolId,
|
|
||||||
method: 'POST',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取驾培机型
|
|
||||||
export function getCarTypeList() {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjSchoolDriverType/list',
|
|
||||||
method: 'GET',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 查询收藏的机构
|
|
||||||
export function queryCollectList() {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjUserCollectSchool/myList',
|
|
||||||
method: 'POST',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,45 +1,33 @@
|
|||||||
import request from '../request/index.js';
|
import request from '../request/index.js';
|
||||||
|
|
||||||
export function chooseType(data) {
|
export function userGood(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'wrj-api/sysUser/driverTypeChoose',
|
url: 'sinology-api/sinologyUserGood/click',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改用户资料
|
export function getUserGoodList(data) {
|
||||||
export function updateUserInfo(data) {
|
|
||||||
return request({
|
return request({
|
||||||
url: 'wrj-api/sysUser/update',
|
url: 'sinology-api/sinologyUserGood/query',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 教员入驻
|
export function userLike(data) {
|
||||||
export function teacherRegister(data) {
|
|
||||||
return request({
|
return request({
|
||||||
url: 'wrj-api/wrjTeacher/apply',
|
url: 'sinology-api/sinologyUserCollect/click',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 报名咨询
|
export function getUserLikeList(data) {
|
||||||
export function applyConsult(data) {
|
|
||||||
return request({
|
return request({
|
||||||
url: 'wrj-api/wrjClue/consult',
|
url: 'sinology-api/sinologyUserCollect/query',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 获取收藏的考点
|
|
||||||
export function getCollecRoomList() {
|
|
||||||
return request({
|
|
||||||
url: 'wrj-api/wrjUserCollectPlace/myList',
|
|
||||||
method: 'POST',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -9,11 +9,6 @@ const useUserStore = defineStore({
|
|||||||
isLogin: storage.get('isLogin'), // 是否登陆
|
isLogin: storage.get('isLogin'), // 是否登陆
|
||||||
userInfo: {}, // 用户信息
|
userInfo: {}, // 用户信息
|
||||||
sellManId: '', // 分销人id
|
sellManId: '', // 分销人id
|
||||||
currentType: {
|
|
||||||
modelId: '10001',
|
|
||||||
typeId: '20021',
|
|
||||||
showName: '多旋翼 - 视距内驾驶员'
|
|
||||||
},
|
|
||||||
tabbarList: []
|
tabbarList: []
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@@ -87,13 +82,6 @@ const useUserStore = defineStore({
|
|||||||
storage.remove('token');
|
storage.remove('token');
|
||||||
storage.remove('userInfo');
|
storage.remove('userInfo');
|
||||||
},
|
},
|
||||||
setType(modelId, typeId, showName) {
|
|
||||||
this.currentType = {
|
|
||||||
modelId,
|
|
||||||
typeId,
|
|
||||||
showName
|
|
||||||
};
|
|
||||||
},
|
|
||||||
setTabbarList(list) {
|
setTabbarList(list) {
|
||||||
this.tabbarList = list;
|
this.tabbarList = list;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "寻驾-无人机",
|
"name": "耕读社",
|
||||||
"appid": "__UNI__59447F7",
|
"appid": "__UNI__59447F7",
|
||||||
"description": "",
|
"description": "",
|
||||||
"versionName": "1.0.2",
|
"versionName": "1.0.2",
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
"navigationBarTitleText": "寻驾-无人机",
|
"navigationBarTitleText": "耕读社",
|
||||||
"navigationBarBackgroundColor": "#FFF",
|
"navigationBarBackgroundColor": "#FFF",
|
||||||
"backgroundColor": "#FFF"
|
"backgroundColor": "#FFF"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,46 +2,70 @@
|
|||||||
<view class="p15">
|
<view class="p15">
|
||||||
<view class="chapter_item" v-for="(item, index) of chapterList" :key="index" @tap="toDetail(item)">
|
<view class="chapter_item" v-for="(item, index) of chapterList" :key="index" @tap="toDetail(item)">
|
||||||
<view style="line-height: 20px;">
|
<view style="line-height: 20px;">
|
||||||
<text class="j-tag" style="background: #DDEEFF;color: #1A8CFE">第{{ String(index+1).padStart(2,'0') }}讲·庄子</text>
|
<text class="j-tag" style="background: #DDEEFF;color: #1A8CFE">{{ item.chapterIndex }}</text>
|
||||||
<text class="fs14 ml5 ">阴极阳转,阳转阴转,实现生命永恒的自然轮转</text>
|
<text class="fs14 ml5 ">{{ item.chapterName }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt10 flex ai-c jc-sb fs12 mt8 cor-999">
|
<view class="mt10 flex ai-c jc-sb fs12 mt8 cor-999">
|
||||||
<text>郭老师</text>
|
|
||||||
<text>2020-01-01 19:00</text>
|
|
||||||
<view class="flex ai-c">
|
<view class="flex ai-c">
|
||||||
<u-icon name="eye" color="#999" size="14" :label="index*7" label-color="#999" label-size="12"></u-icon>
|
<u-icon name="eye" color="#999" size="14" :label="item.browseCount" label-color="#999" label-size="12"></u-icon>
|
||||||
<u-icon class="ml20" name="thumb-up" color="#999" size="14" :label="index*3" label-color="#999" label-size="12"></u-icon>
|
<u-icon class="ml20" name="thumb-up" color="#999" size="14" :label="item.goodCount" label-color="#999" label-size="12"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
<text>{{ item.author }}</text>
|
||||||
|
<text>{{ item.publicTime }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import { getChapterDoneList } from '@/jtools/api/index'
|
import { getCourseChapter } from '@/jtools/api/index'
|
||||||
|
import { mapState } from 'pinia'; //引入映射函数
|
||||||
|
import useUserStore from '@/jtools/store/user'; //引入store
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
computed: {
|
||||||
|
...mapState(useUserStore, ['isLogin'])
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chapterList: [],
|
chapterList: [],
|
||||||
|
lessonId: undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(op){
|
||||||
this.getChapterList()
|
this.lessonId = op.id
|
||||||
|
this.getChapterList(op.id)
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
if(this.lessonId) {
|
||||||
|
this.getChapterList(this.lessonId)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
getChapterList(){
|
getChapterList(lessonId){
|
||||||
this.chapterList = [1,2,3]
|
getCourseChapter({lessonId}).then(resp=>{
|
||||||
// getChapterDoneList({driverTypeId}).then(resp=>{
|
if(resp.code==='0000'){
|
||||||
// if(resp.code==='0000'){
|
this.chapterList=resp.data
|
||||||
// this.chapterList=resp.data
|
}
|
||||||
// }
|
})
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
toDetail(chapter){
|
toDetail(chapter){
|
||||||
uni.navigateTo({
|
if(!this.isLogin){
|
||||||
url: `/pages/course/detail?id=${chapter.id}`
|
uni.showToast({
|
||||||
|
title: '请先登录',
|
||||||
|
icon: 'none'
|
||||||
});
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/me/login'
|
||||||
|
});
|
||||||
|
}, 1500);
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/course/detail?id=${chapter.chapterId}`
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -59,11 +83,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.j-tag {
|
.j-tag {
|
||||||
// display: inline-flex;
|
|
||||||
// align-items: center;
|
|
||||||
// justify-content: center;
|
|
||||||
padding: 1px 3px;
|
padding: 1px 3px;
|
||||||
// height: 16px;
|
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 14px;
|
line-height: 14px;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,22 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="wp100 hp100">
|
<view class="wp100 hp100">
|
||||||
<view class="p5" style="background-color: #fff;">
|
<view class="p5" style="background-color: #fff;">
|
||||||
<u-search v-model="queryParams.placeName" placeholder="搜索标题/作者" :showAction="false"
|
<u-search v-model="queryParams.searchValue" placeholder="搜索标题/作者" :showAction="false"
|
||||||
@search="handleSearch">搜索</u-search>
|
@search="handleSearch">搜索</u-search>
|
||||||
</view>
|
</view>
|
||||||
<u-list v-if="pageList.length > 0" @scrolltolower="scrolltolower" class="course-list">
|
<u-list v-if="pageList.length > 0" @scrolltolower="scrolltolower" class="course-list">
|
||||||
<u-list-item v-for="(item, index) in pageList" :key="index">
|
<u-list-item v-for="(item, index) in pageList" :key="index">
|
||||||
<view class="flex ai-c jc-sb p10lr p5tb bc-fff" @click="handleClick(item)">
|
<view class="flex ai-c jc-sb p10lr p5tb bc-fff" @click="handleClick(item)">
|
||||||
<view class="flex ai-c">
|
<view class="flex ai-c">
|
||||||
<image src="https://ss-cloud.ahduima.com/wrj/file/1949715991365947392.jpg" mode="aspectFill" style="width: 160px;height: 100px;border-radius: 6px;" />
|
<image :src="item.image" mode="aspectFill" style="width: 160px;height: 100px;border-radius: 6px;" />
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1 ml10 overflow-h">
|
<view class="fl1 ml10 overflow-h">
|
||||||
<view class="fs14">课程标题 {{ index + 1 }}</view>
|
<view class="fs14">{{ item.lessonName }}</view>
|
||||||
<view class="fs13 mt8 cor-999 text-ellipsis">课程简介内容,简要描述课程内容和目标。</view>
|
<view class="fs13 mt8 cor-999 text-ellipsis">{{ item.introduction }}</view>
|
||||||
<view class="flex ai-c jc-sb fs12 mt8 cor-999">
|
<view class="flex ai-c jc-sb fs12 mt8 cor-999">
|
||||||
<u-icon name="eye" color="#999" size="14" :label="index*7" label-color="#999" label-size="12"></u-icon>
|
<u-icon name="eye" color="#999" size="14" :label="item.browseCount" label-color="#999" label-size="12"></u-icon>
|
||||||
<u-icon name="thumb-up" color="#999" size="14" :label="index*3" label-color="#999" label-size="12"></u-icon>
|
<u-icon name="thumb-up" color="#999" size="14" :label="item.goodCount" label-color="#999" label-size="12"></u-icon>
|
||||||
<text>2020-01-01 19:00</text>
|
<text>{{ item.author }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -27,13 +27,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getCourseList } from '@/jtools/api/index'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageList: [],
|
pageList: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
queryParams: {
|
queryParams: {
|
||||||
placeName: '',
|
searchValue: '',
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
}
|
}
|
||||||
@@ -55,18 +57,16 @@
|
|||||||
this.getPageList()
|
this.getPageList()
|
||||||
},
|
},
|
||||||
getPageList() {
|
getPageList() {
|
||||||
this.pageList = [1,2,3]
|
const _this = this
|
||||||
this.total = 3
|
const params = { ...this.queryParams }
|
||||||
// const _this = this
|
getCourseList(params).then(res => {
|
||||||
// const params = { ...this.queryParams }
|
_this.pageList = [..._this.pageList, ...res.data.records]
|
||||||
// queryExamPoint(params).then(res => {
|
_this.total = res.data.total
|
||||||
// _this.pageList = [..._this.pageList, ...res.data.records]
|
});
|
||||||
// _this.total = res.data.total
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
handleClick(item) {
|
handleClick(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/course/chapter`
|
url: `/pages/course/chapter?id=${item.lessonId}`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,82 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>我的点赞</view>
|
<view>
|
||||||
|
<u-list v-if="pageList.length > 0" @scrolltolower="scrolltolower" class="course-list">
|
||||||
|
<u-list-item v-for="(item, index) in pageList" :key="index">
|
||||||
|
<view class="flex ai-c jc-sb p10lr p5tb bc-fff" @click="handleClick(item)">
|
||||||
|
<view class="flex ai-c">
|
||||||
|
<image :src="item.image" mode="aspectFill" style="width: 150px;height: 100px;border-radius: 6px;" />
|
||||||
|
</view>
|
||||||
|
<view class="fl1 ml10">
|
||||||
|
<view class="fs14">{{ item.lessonName }}</view>
|
||||||
|
<view class="fs13 mt8 cor-999">
|
||||||
|
<text class="j-tag" style="background: #DDEEFF;color: #1A8CFE">{{ item.chapterIndex }}</text>
|
||||||
|
<text>{{ item.chapterName }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-list-item>
|
||||||
|
</u-list>
|
||||||
|
<u-empty v-else mode="list" text="暂无数据"></u-empty>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
import { getUserGoodList } from '@/jtools/api/user'
|
||||||
|
import { mapState } from 'pinia'; //引入映射函数
|
||||||
|
import useUserStore from '@/jtools/store/user'; //引入store
|
||||||
|
|
||||||
|
export default {
|
||||||
|
computed: {
|
||||||
|
...mapState(useUserStore, ['userInfo'])
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageList: [],
|
||||||
|
total: 0,
|
||||||
|
queryParams: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 20
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.handleSearch()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
scrolltolower() {
|
||||||
|
if (this.pageList.length < this.total) {
|
||||||
|
this.queryParams.pageNo++
|
||||||
|
this.getPageList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSearch() {
|
||||||
|
this.pageList = []
|
||||||
|
this.queryParams.pageNo = 1
|
||||||
|
this.getPageList()
|
||||||
|
},
|
||||||
|
getPageList() {
|
||||||
|
const _this = this
|
||||||
|
const params = { ...this.queryParams, userId: this.userInfo.userId }
|
||||||
|
getUserGoodList(params).then(res => {
|
||||||
|
_this.pageList = [..._this.pageList, ...res.data.records]
|
||||||
|
_this.total = res.data.total
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleClick(item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/course/detail?id=${chapter.chapterId}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.j-tag {
|
||||||
|
padding: 1px 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 14px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -17,10 +17,6 @@
|
|||||||
<u-cell-group :customStyle="{ 'background-color': '#fff', 'margin-top': '10px', 'border-radius': '8px' }">
|
<u-cell-group :customStyle="{ 'background-color': '#fff', 'margin-top': '10px', 'border-radius': '8px' }">
|
||||||
<u-cell icon="thumb-up" size="large" title="我的点赞" isLink @tap="next('/pages/me/good')"></u-cell>
|
<u-cell icon="thumb-up" size="large" title="我的点赞" isLink @tap="next('/pages/me/good')"></u-cell>
|
||||||
<u-cell icon="heart" size="large" title="我的收藏" isLink @tap="next('/pages/me/like')"></u-cell>
|
<u-cell icon="heart" size="large" title="我的收藏" isLink @tap="next('/pages/me/like')"></u-cell>
|
||||||
<!-- <button open-type="share" class="share">
|
|
||||||
<u-cell icon="share" title="分享" size="large" isLink></u-cell>
|
|
||||||
</button> -->
|
|
||||||
<!-- <u-cell v-if="isLogin" icon="thumb-up" size="large" title="我的关注" isLink @tap="next('/pages/me/look')"></u-cell> -->
|
|
||||||
|
|
||||||
<u-cell icon="level" size="large" title="当前版本" :value="version"></u-cell>
|
<u-cell icon="level" size="large" title="当前版本" :value="version"></u-cell>
|
||||||
<u-cell icon="phone" size="large" title="联系我们" :value="contactInfo.configDesc" isLink @tap="makePhone"></u-cell>
|
<u-cell icon="phone" size="large" title="联系我们" :value="contactInfo.configDesc" isLink @tap="makePhone"></u-cell>
|
||||||
|
|||||||
@@ -1,13 +1,86 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>我的收藏</view>
|
<view>
|
||||||
|
<u-list v-if="pageList.length > 0" @scrolltolower="scrolltolower" class="course-list">
|
||||||
|
<u-list-item v-for="(item, index) in pageList" :key="index">
|
||||||
|
<view class="flex ai-c jc-sb p10lr p5tb bc-fff" @click="handleClick(item)">
|
||||||
|
<view class="flex ai-c">
|
||||||
|
<image :src="item.image" mode="aspectFill" style="width: 150px;height: 100px;border-radius: 6px;" />
|
||||||
|
</view>
|
||||||
|
<view class="fl1 ml10">
|
||||||
|
<view class="fs14">{{ item.lessonName }}</view>
|
||||||
|
<view class="fs13 mt8 cor-999">
|
||||||
|
<text class="j-tag" style="background: #DDEEFF;color: #1A8CFE">{{ item.chapterIndex }}</text>
|
||||||
|
<text>{{ item.chapterName }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="mt5 flex ai-c jc-sb fs13 cor-999">
|
||||||
|
<text>{{ item.author }}</text>
|
||||||
|
<text>{{ item.publicTime }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-list-item>
|
||||||
|
</u-list>
|
||||||
|
<u-empty v-else mode="list" text="暂无数据"></u-empty>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
import { getUserLikeList } from '@/jtools/api/user'
|
||||||
|
import { mapState } from 'pinia'; //引入映射函数
|
||||||
|
import useUserStore from '@/jtools/store/user'; //引入store
|
||||||
|
|
||||||
|
export default {
|
||||||
|
computed: {
|
||||||
|
...mapState(useUserStore, ['userInfo'])
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageList: [],
|
||||||
|
total: 0,
|
||||||
|
queryParams: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 20
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.handleSearch()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
scrolltolower() {
|
||||||
|
if (this.pageList.length < this.total) {
|
||||||
|
this.queryParams.pageNo++
|
||||||
|
this.getPageList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSearch() {
|
||||||
|
this.pageList = []
|
||||||
|
this.queryParams.pageNo = 1
|
||||||
|
this.getPageList()
|
||||||
|
},
|
||||||
|
getPageList() {
|
||||||
|
const _this = this
|
||||||
|
const params = { ...this.queryParams, userId: this.userInfo.userId }
|
||||||
|
getUserLikeList(params).then(res => {
|
||||||
|
_this.pageList = [..._this.pageList, ...res.data.records]
|
||||||
|
_this.total = res.data.total
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleClick(chapter) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/course/detail?id=${chapter.chapterId}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.j-tag {
|
||||||
|
padding: 1px 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 14px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user