From db6695d96583afe7fb2bda2882ef204a03a456d6 Mon Sep 17 00:00:00 2001 From: liudan <18634735655@163.com> Date: Fri, 24 Feb 2023 23:12:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/api.js | 2 +- pages/index/index.vue | 9 +++++++-- pages/index/searchPage.vue | 9 +++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/common/api.js b/common/api.js index 1956b45..a3c4d1b 100644 --- a/common/api.js +++ b/common/api.js @@ -17,7 +17,7 @@ export const getsmsCode = (params, config = {}) => http.post('/sms/send', params //手机验证码登录 export const mobileLogin = (params, config = {}) => http.post('/user/mobilelogin', params, config); //首页菜单导航 -export const indexNav = (params, config = {custom: { auth: true }}) => http.post('/wx_menu/index', params, config); +export const indexNav = (params, config = {}) => http.post('/wx_menu/index', params, config); // APP下载地址 export const downloadApp = (params, config = {}) => http.post('/app_url/index', params, config); //上传图片 diff --git a/pages/index/index.vue b/pages/index/index.vue index 5b29f2d..f49c90d 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -116,9 +116,14 @@ indexNavHandle(){ let params={ sort:'weigh', - order:'desc' + // order:'desc' } - indexNav(params).then(res=>{ + indexNav(params, { + custom: { auth: true }, + header: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + }).then(res=>{ this.list = res.rows }) }, diff --git a/pages/index/searchPage.vue b/pages/index/searchPage.vue index d8fea3e..c8ad6c3 100644 --- a/pages/index/searchPage.vue +++ b/pages/index/searchPage.vue @@ -127,9 +127,14 @@ export default{ limit:this.limit, wx_category_id:this.wx_category_id, sort:'weigh', - order:'desc' + order:'asc' } - listData(params).then(res=>{ + listData(params,{ + custom: { auth: true }, + header: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + }).then(res=>{ if(res.searchList.length==0){ this.noSearch = true; this.contentList = res.rows