diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js index bbf13c05..14677c2f 100644 --- a/jiuyi2/common/js/config.js +++ b/jiuyi2/common/js/config.js @@ -6,9 +6,9 @@ const config = { // host: 'h5api', // #endif // #ifndef H5 - // host: 'http://91f.xyz:8080', + host: 'http://91f.xyz:8080', // host: 'https://1a880cd5.r24.cpolar.top/', - host: 'http://6mkwby.natappfree.cc', + // host: 'http://6mkwby.natappfree.cc', // #endif // 支付方式配置 payType: { diff --git a/jiuyi2/pages/index/search.vue b/jiuyi2/pages/index/search.vue index b87755b7..e1e491f7 100644 --- a/jiuyi2/pages/index/search.vue +++ b/jiuyi2/pages/index/search.vue @@ -94,17 +94,6 @@ onPullDownRefresh(() => { // 获取用户搜索记录 function getSearchLog() { - // api.video.videoSearchLog().then(rs => { - // if (rs.code == 200) { - // searchLog.push(...rs.data) - // return - // } - // util.alert({ - // content: rs.msg, - // showCancel: false, - // }) - // }) - let searchList = uni.getStorageSync('searchLog'); if (searchList) { searchList = Array.from(new Set(searchList)) @@ -163,6 +152,7 @@ function handleSearch() { searchList = searchList == '' ? [] : searchList; searchList.push(keyword.value) searchList = Array.from(new Set(searchList)) + searchList = searchList.reverse() uni.setStorageSync("searchLog", searchList) } @@ -230,18 +220,18 @@ function getMoreFriendList() { // 获取朋友列表 function getFriendList() { - api.video.searchFriendByName({ - path: [keyword.value], - query: { - pageNum: userList.pageNum, - pageSize: userList.pageSize, - } - }).then(rs => { + let obj = { + content: keyword.value, + type: +tabIndex.value + 1, + userId: userinfo.value.id, + } + api.video.videoSearch({ query: obj }).then(rs => { if (rs.code == 200) { if (userList.pageNum) userList.data.length = 0 // 追加朋友列表 userList.data.push(...rs.rows.map(item => { - item.format_userPortrait = util.format_url(item.userPortrait, 'img') + item.userId = item.id + item.format_userPortrait = util.format_url(item.avatar, 'img') return item })) // 视频列表 @@ -288,7 +278,7 @@ function deleteSearch() { content: '确认删除历史记录吗?', }).then(rs => { uni.removeStorageSync('searchLog') - searchLog.value = [] + searchLog = searchLog.splice(0, searchLog.length) }) } @@ -474,10 +464,11 @@ function deleteSearch() { - 取消关注 + 取消关注 关注 + 暂无更多 diff --git a/jiuyi2/vite.config.js b/jiuyi2/vite.config.js index d46a3a52..d348874f 100644 --- a/jiuyi2/vite.config.js +++ b/jiuyi2/vite.config.js @@ -3,9 +3,9 @@ import { } from 'vite'; import uni from '@dcloudio/vite-plugin-uni'; -// let target = 'http://91f.xyz:8080' +let target = 'http://91f.xyz:8080' // let target = 'https://1a880cd5.r24.cpolar.top/' -let target = 'http://6mkwby.natappfree.cc' +// let target = 'http://6mkwby.natappfree.cc' export default defineConfig({ plugins: [uni()],