diff --git a/components/nodata/nodata.vue b/components/nodata/nodata.vue new file mode 100644 index 0000000..68534fd --- /dev/null +++ b/components/nodata/nodata.vue @@ -0,0 +1,38 @@ + + + + + \ No newline at end of file diff --git a/config/api.js b/config/api.js index 5a5df9f..1249a52 100644 --- a/config/api.js +++ b/config/api.js @@ -12,7 +12,8 @@ export const loginSMS = (data) => http.post('member/auth/sms-login', data, { cus // 用户协议和隐私协议 export const getAgreement = (params={}) => http.get('app/student-record/getAgreement', {params}) // 获取个人信息 -export const getUserInfo = (data) => http.post('member/user/get', {header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'}}) +// export const getUserInfo = (data) => http.post('face/user_info', {header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'}}) +export const getUserInfo = (data) => http.post('face/user_info',) // 退出登录 export const logOut = (data={}) => http.post('member/auth/logout', data, {custom: {catch: true, toast: false }}) diff --git a/config/request.js b/config/request.js index d2c1bee..9e658d5 100644 --- a/config/request.js +++ b/config/request.js @@ -38,7 +38,8 @@ let secretKey = '22d90e09d1374f0f9e4accd07d333e55' config.header['Signature'] = hash config.data = jsonString - let token = counterStore.token + let token = uni.getStorageSync('token') + if(token) { config.header.Authorization = 'Bearer ' + token } diff --git a/config/site.config.js b/config/site.config.js index 967a0c6..434c4d1 100644 --- a/config/site.config.js +++ b/config/site.config.js @@ -16,6 +16,6 @@ let obj = { }; export default obj -// http://123.6.232.1:8099/测试地址 +// http://192.168.1.106:8518/测试地址 // http://192.168.1.43:8318/本地地址 //http://www.lyjppt.com/正式地址 diff --git a/pages/index/index - 副本.vue b/pages/index/index - 副本.vue deleted file mode 100644 index ae206ad..0000000 --- a/pages/index/index - 副本.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue deleted file mode 100644 index 3b2f5c0..0000000 --- a/pages/index/index.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - \ No newline at end of file diff --git a/pages/subPage/ballots/ballotsList/ballotsList.vue b/pages/subPage/ballots/ballotsList/ballotsList.vue index 950cb88..297c5ee 100644 --- a/pages/subPage/ballots/ballotsList/ballotsList.vue +++ b/pages/subPage/ballots/ballotsList/ballotsList.vue @@ -27,6 +27,10 @@ + + + + 暂无投票信息~ @@ -36,10 +40,11 @@ import { onLoad, onPullDownRefresh, + onReachBottom } from '@dcloudio/uni-app' import { reactive, ref } from 'vue'; import { votePage, mineVotePage } from '@/config/api.js' - + let status = ref('loading') const tabArr = reactive([ { name: '投票列表', id: 0 }, { name: '我的投票', id: 1 }, @@ -93,6 +98,7 @@ } voteList.value.push(...res.list) total.value = res.total + if(voteList.value.length>=total.value) status.value = 'nomore' console.log(voteList.value) } votePageFn() @@ -107,6 +113,12 @@ await initList() uni.stopPullDownRefresh() }) + + onReachBottom(()=>{ + if(total.value > voteList.value.length) { + votePageFn() + } + })