diff --git a/api/api.js b/api/api.js
index 56ad30e..cd9f84d 100644
--- a/api/api.js
+++ b/api/api.js
@@ -6,57 +6,151 @@ const config = {
// auth : false, showLoading : true, loadingTitle : '加载中...',
// limit : 1000
// },
-
- getConfig : {url : '/api/getConfig', method : 'GET', limit : 500},
-
-
+
+ // getConfig: {
+ // url: '/api/getConfig',
+ // method: 'GET',
+ // limit: 500
+ // },
+
+
// 微信登录接口
wxLogin: {
url: '/login/login',
- method: 'POST',
- limit : 500,
- showLoading : true,
+ method: 'POST',
+ limit: 500,
+ showLoading: true,
},
-
+
// 修改个人信息接口
updateInfo: {
url: '/info/updateInfo',
method: 'POST',
- auth: true,
- limit : 500,
- showLoading : true,
+ auth: true,
+ limit: 500,
+ showLoading: true,
+ },
+
+ //隐私政策
+ getPrivacyPolicy: {
+ url: '/login/getPrivacyPolicy',
+ method: 'GET',
+ },
+ //用户协议
+ getUserAgreement: {
+ url: '/login/getUserAgreement',
+ method: 'GET',
+ },
+
+ /**
+ * 首页相关接口
+ */
+
+ // 添加建议
+ addAdvice: {
+ url: '/info/addAdvice',
+ method: 'POST',
+ limit: 500,
+ showLoading: true,
+ },
+ // 添加志愿者
+ addVolunteer: {
+ url: '/info/addVolunteer',
+ method: 'POST',
+ limit: 500,
+ showLoading: true,
+ },
+ // 获取景区列表
+ queryAreaList: {
+ url: '/info/queryAreaList',
+ method: 'GET',
+ showLoading: true,
+ },
+ // 根据id获取文章详情
+ queryArticleById: {
+ url: '/info/queryArticleById',
+ method: 'GET',
+ showLoading: true,
+ },
+ // 获取文章列表
+ queryArticleList: {
+ url: '/info/queryArticleList',
+ method: 'GET',
+ showLoading: true,
+ },
+ // 根据分类获取文章列表
+ queryArticleListByType: {
+ url: '/info/queryArticleListByType',
+ method: 'GET',
+ showLoading: true,
+ },
+ // 获取banner图列表
+ queryBannerList: {
+ url: '/info/queryBannerList',
+ method: 'GET',
+ showLoading: true,
+ },
+ // 根据角色Id获取角色信息详情
+ queryRoleInfoById: {
+ url: '/info/queryRoleInfoById',
+ method: 'GET',
+ showLoading: true,
+ },
+ // 根据角色类型获取角色信息列表-讲解员-达人-摄影师
+ queryRoleInfoList: {
+ url: '/info/queryRoleInfoList',
+ method: 'GET',
+ showLoading: true,
+ },
+ // 根据景区id获取该景区下的地点列表:景点-厕所-美食店铺-民宿
+ querySpotList: {
+ url: '/info/querySpotList',
+ method: 'GET',
+ showLoading: true,
+ },
+ // 根据角色id获取视频列表
+ queryVedioBySpot: {
+ url: '/info/queryVedioBySpot',
+ method: 'GET',
+ showLoading: true,
+ },
+ // 获取视频列表
+ queryVideoList: {
+ url: '/info/queryVideoList',
+ method: 'GET',
+ showLoading: true,
},
}
-export function api(key, data, callback, loadingTitle){
+export function api(key, data, callback, loadingTitle) {
let req = config[key]
-
+
if (!req) {
console.error('无效key' + key);
return
}
-
- if(typeof callback == 'string'){
+
+ if (typeof callback == 'string') {
loadingTitle = callback
}
-
- if(typeof data == 'function'){
+
+ if (typeof data == 'function') {
callback = data
data = {}
}
-
+
// 接口限流
- if(req.limit){
+ if (req.limit) {
let storageKey = 'limit:' + req.url
let storage = uni.getStorageSync(storageKey)
- if(storage && new Date().getTime() - parseInt(storage) < req.limit){
+ if (storage && new Date().getTime() - parseInt(storage) < req.limit) {
return
}
uni.setStorageSync(storageKey, new Date().getTime())
}
-
+
//必须登录
if (req.auth) {
if (!uni.getStorageSync('token')) {
@@ -67,9 +161,9 @@ export function api(key, data, callback, loadingTitle){
return
}
}
-
- http.http(req.url, data, callback, req.method,
- loadingTitle || req.showLoading, loadingTitle || req.loadingTitle)
+
+ http.http(req.url, data, callback, req.method,
+ loadingTitle || req.showLoading, loadingTitle || req.loadingTitle)
}
diff --git a/components/list/videoList.vue b/components/list/videoList.vue
index b5dd8cc..ad093a3 100644
--- a/components/list/videoList.vue
+++ b/components/list/videoList.vue
@@ -1,41 +1,70 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
- 爱旅行的小张
+
+
+
+
-
-
-
- 300
+
+
+
+ {{ item.videoTitle }}
+
+
+
+
+ {{ item.videoThumpup }}
+
-
+
diff --git a/config.js b/config.js
index bc0bb92..b82aa87 100644
--- a/config.js
+++ b/config.js
@@ -13,10 +13,10 @@ const type = 'dev'
// 环境配置
const config = {
dev : {
- baseUrl : 'http://www.gcosc.fun:82',
+ baseUrl : 'http://8.138.162.67:8001/travel-api/api',
},
prod : {
- baseUrl : 'http://xxx.xxx.xxx/xxx',
+ baseUrl : 'http://8.138.162.67:8001/travel-api/api',
}
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 4c93890..0e6616b 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -40,7 +40,7 @@
视频中的景徳镇
-
+
@@ -61,11 +61,6 @@
},
data() {
return {
- queryParams: {
- pageNo: 1,
- pageSize: 10,
- title: ''
- },
baseList : [
{
icon : '/static/image/home/g1.png',
@@ -135,8 +130,22 @@
},
computed : {
},
+ onShow() {
+ this.$refs.videoList.queryVideoList()
+ this.queryBannerList()
+ },
+ //滚动到屏幕底部
+ onReachBottom() {
+ this.$refs.videoList.loadMoreData()
+ },
methods: {
-
+ queryBannerList(){
+ this.$api('queryBannerList', res => {
+ if(res.code == 200){
+ this.bannerList = res.result
+ }
+ })
+ },
}
}
diff --git a/pages_order/service/applyRelic.vue b/pages_order/service/applyRelic.vue
index 21fd3d3..9c51fd4 100644
--- a/pages_order/service/applyRelic.vue
+++ b/pages_order/service/applyRelic.vue
@@ -1,7 +1,7 @@
-
+
-
+
@@ -20,7 +20,7 @@
- 申请历程
+ 申遗历程
申遗缘由
@@ -34,13 +34,14 @@
-
@@ -54,11 +55,34 @@
export default {
data() {
return {
-
+ queryParams: {
+ pageNo: 1,
+ pageSize: 10,
+ },
+ total : 0,
+ list : [],
}
},
+ onShow() {
+ this.queryArticleList()
+ },
+ onReachBottom() {
+ this.loadMoreData()
+ },
methods: {
-
+ queryArticleList(){
+ this.$api('queryArticleList', res => {
+ if(res.code == 200){
+ this.list = res.result
+ }
+ })
+ },
+ loadMoreData(){
+ if(this.queryParams.pageSize < this.total){
+ this.queryParams.pageSize += 10
+ this.queryArticleList()
+ }
+ },
}
}
diff --git a/pages_order/service/reservationDetail.vue b/pages_order/service/reservationDetail.vue
index cc7e89a..635d583 100644
--- a/pages_order/service/reservationDetail.vue
+++ b/pages_order/service/reservationDetail.vue
@@ -98,14 +98,15 @@
讲解现场
-
+
+
@@ -113,7 +114,11 @@
@@ -125,7 +148,7 @@
left: 0;
width: 100%;
height: 100%;
- background-color: #00000066;
+ background-color: #00000036;
color: #fff;
display: flex;
flex-direction: column;