feat: 添加租房模块图标和功能优化
fix: 修复投票状态显示逻辑 refactor: 重命名ajaxget为ajaxGet style: 优化CSS样式和布局 docs: 更新组件文档和注释
This commit is contained in:
@@ -34,8 +34,8 @@ const ajax = (url, data) => {
|
||||
});
|
||||
};
|
||||
|
||||
// 导出ajaxget函数
|
||||
const ajaxget = (url) => {
|
||||
// 导出ajaxGet函数
|
||||
const ajaxGet = (url) => {
|
||||
if (location.hostname == "127.0.0.1") axios.defaults.headers.common["Authorization"] = "erhvky91rk23vx7xiutj34db82kjb1vc";
|
||||
|
||||
url = url.indexOf("https://") > -1 ? url : forumBaseURL + url;
|
||||
|
||||
@@ -100,7 +100,7 @@ const appSearch = createApp({
|
||||
|
||||
let uniqid = "";
|
||||
const init = () => {
|
||||
ajaxget(`https://offer.gter.net/miniprogramApi/offer/search`).then((res) => {
|
||||
ajaxGet(`https://offer.gter.net/miniprogramApi/offer/search`).then((res) => {
|
||||
if (res.code != 200) {
|
||||
creationAlertBox("error", res.message);
|
||||
page.value = 0;
|
||||
@@ -120,7 +120,7 @@ const appSearch = createApp({
|
||||
if (loading || page.value == null) return;
|
||||
loading = true;
|
||||
const limit = 20;
|
||||
ajaxget(`/v2/api/forum/topicLists?type=${tabValue.value == "all" ? "" : tabValue.value}&page=${page.value}&limit=${limit}&keyword=${kw.value}`)
|
||||
ajaxGet(`/v2/api/forum/topicLists?type=${tabValue.value == "all" ? "" : tabValue.value}&page=${page.value}&limit=${limit}&keyword=${kw.value}`)
|
||||
.then((res) => {
|
||||
// wx.hideLoading();
|
||||
if (res.code != 200) {
|
||||
|
||||
@@ -38,7 +38,7 @@ const appSectionIndex = createApp({
|
||||
let section = 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 || [];
|
||||
|
||||
@@ -89,7 +89,7 @@ const appSectionIndex = createApp({
|
||||
let info = ref({});
|
||||
|
||||
const init = () => {
|
||||
ajaxget(`/v2/api/forum/getSectionDetails?sectionid=${section.value}`).then((res) => {
|
||||
ajaxGet(`/v2/api/forum/getSectionDetails?sectionid=${section.value}`).then((res) => {
|
||||
if (res.code != 200) return;
|
||||
const data = res.data || {};
|
||||
info.value = data;
|
||||
@@ -98,7 +98,7 @@ const appSectionIndex = createApp({
|
||||
|
||||
let handpickList = ref([]);
|
||||
const handpick = () => {
|
||||
ajaxget(`/v2/api/forum/topicHandpicked?sectionid=${section.value}`).then((res) => {
|
||||
ajaxGet(`/v2/api/forum/topicHandpicked?sectionid=${section.value}`).then((res) => {
|
||||
let data = res.data || [];
|
||||
handpickList.value = data;
|
||||
});
|
||||
@@ -106,7 +106,7 @@ const appSectionIndex = createApp({
|
||||
|
||||
let tagsList = ref([]);
|
||||
const getTags = () => {
|
||||
ajaxget(`/v2/api/forum/sectionTags?sectionid=${section.value}`).then((res) => {
|
||||
ajaxGet(`/v2/api/forum/sectionTags?sectionid=${section.value}`).then((res) => {
|
||||
if (res.code != 200) return;
|
||||
const data = res.data || {};
|
||||
tagsList.value = data;
|
||||
@@ -120,7 +120,7 @@ const appSectionIndex = createApp({
|
||||
const getList = () => {
|
||||
if (loading || page.value == 0) return;
|
||||
loading = true;
|
||||
ajaxget(`/v2/api/forum/topicLists?type=thread&page=${page.value || 1}§ionid=${section.value}`)
|
||||
ajaxGet(`/v2/api/forum/topicLists?type=thread&page=${page.value || 1}§ionid=${section.value}`)
|
||||
.then((res) => {
|
||||
if (res.code != 200) return;
|
||||
let data = res.data;
|
||||
@@ -205,7 +205,7 @@ const appSectionIndex = 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 || [];
|
||||
console.log("data99999999999999", data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user