feat: 添加新图片资源及更新组件样式与功能
style: 调整CSS样式及优化布局 refactor: 重构组件逻辑及API调用 fix: 修复路径引用及图片加载问题 docs: 更新注释及文档内容
This commit is contained in:
10
js/index.js
10
js/index.js
@@ -112,7 +112,7 @@ const appIndex = createApp({
|
||||
let ongoingbj = ref({}); // 话题数据
|
||||
|
||||
const getTalkingRecommend = () => {
|
||||
ajaxget("/v2/api/forum/talkingRecommend").then((res) => {
|
||||
ajaxGet("/v2/api/forum/talkingRecommend").then((res) => {
|
||||
if (res.code != 200) return;
|
||||
let data = res["data"] || [];
|
||||
|
||||
@@ -128,7 +128,7 @@ const appIndex = createApp({
|
||||
|
||||
let topicHandpickedList = ref([]); // 精选列表
|
||||
const getTopicHandpicked = (uniqid) => {
|
||||
ajaxget(`/v2/api/forum/topicHandpicked?limit=16`).then((res) => {
|
||||
ajaxGet(`/v2/api/forum/topicHandpicked?limit=16`).then((res) => {
|
||||
if (res.code != 200) return;
|
||||
let data = res["data"] || [];
|
||||
topicHandpickedList.value = data;
|
||||
@@ -139,7 +139,7 @@ const appIndex = createApp({
|
||||
let vote = ref([]); // 面经列表
|
||||
let interviewexperience = ref([]); // 面经列表
|
||||
const getTopicLatest = () => {
|
||||
ajaxget(`/v2/api/forum/getTopicLatest?limit=4`).then((res) => {
|
||||
ajaxGet(`/v2/api/forum/getTopicLatest?limit=4`).then((res) => {
|
||||
const data = res.data || [];
|
||||
|
||||
data.vote.forEach((item) => {
|
||||
@@ -238,7 +238,7 @@ const appIndex = createApp({
|
||||
|
||||
let sectionList = ref([]);
|
||||
const getSectionList = () => {
|
||||
ajaxget("/v2/api/forum/getSectionList").then((res) => {
|
||||
ajaxGet("/v2/api/forum/getSectionList").then((res) => {
|
||||
if (res.code != 200) return;
|
||||
const data = res.data || [];
|
||||
let obj = {};
|
||||
@@ -267,7 +267,7 @@ const appIndex = createApp({
|
||||
if (loading || page.value == 0) return;
|
||||
loading = true;
|
||||
// wx.showLoading();
|
||||
ajaxget(`/v2/api/forum/topicLists?type=thread&page=${page.value || 1}`)
|
||||
ajaxGet(`/v2/api/forum/topicLists?type=thread&page=${page.value || 1}`)
|
||||
.then((res) => {
|
||||
// wx.hideLoading();
|
||||
if (res.code != 200) return;
|
||||
|
||||
@@ -221,7 +221,7 @@ const managerHide = (token, state, type = "offer") => {
|
||||
|
||||
const isConfirmed = confirm(`确定要${state == 0 ? "隐藏" : "显示"}该${obj[type]}吗?`);
|
||||
if (isConfirmed) {
|
||||
ajax(`https://api.gter.net/v2/api/forum/setTopicHide`, {
|
||||
ajax(`/v2/api/forum/setTopicHide`, {
|
||||
token,
|
||||
hidden: Number(state !== 1),
|
||||
}).then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user