diff --git a/api/api.js b/api/api.js
index 92f4c18..077b278 100644
--- a/api/api.js
+++ b/api/api.js
@@ -60,6 +60,12 @@ const config = {
method: 'GET',
showLoading : true,
},
+ //获取作品详情
+ indexGetGetWorkDetail: {
+ url: '/api/index/getWorkDetail',
+ method: 'GET',
+ showLoading : true,
+ },
//获取置顶列表
indexTopPayList: {
url: '/api/index/getTopPayList',
diff --git a/pages.json b/pages.json
index 8faaa54..508a03c 100644
--- a/pages.json
+++ b/pages.json
@@ -5,12 +5,6 @@
"navigationBarTitleText": ""
}
},
- {
- "path": "pages/publish/competition",
- "style": {
- "navigationBarTitleText": ""
- }
- },
{
"path": "pages/auth/login",
"style": {
@@ -72,6 +66,12 @@
}
}
],
+ "preloadRule" : {
+ "pages/index/index" : {
+ "network" : "all",
+ "packages" : ["pages_mine"]
+ }
+ },
"subPackages": [{
"root": "pages_mine",
"pages": [{
@@ -170,6 +170,24 @@
"style": {
"navigationBarTitleText": ""
}
+ },
+ {
+ "path": "publish/worksDetail",
+ "style": {
+ "navigationBarTitleText": ""
+ }
+ },
+ {
+ "path": "publish/competition",
+ "style": {
+ "navigationBarTitleText": ""
+ }
+ },
+ {
+ "path": "publish/addWorks",
+ "style": {
+ "navigationBarTitleText": ""
+ }
}
]
}],
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 745c235..60bb20e 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -162,7 +162,7 @@
bannerClick(index){
console.log(index);
uni.navigateTo({
- url: '/pages/publish/competition'
+ url: '/pages_mine/publish/competition'
})
}
}
diff --git a/pages/publish/actorDetail.vue b/pages/publish/actorDetail.vue
index 1dcb6cf..e2dc506 100644
--- a/pages/publish/actorDetail.vue
+++ b/pages/publish/actorDetail.vue
@@ -53,7 +53,7 @@
v-for="(t, index) in item.isImage && item.isImage.split(',')"
:key="index">
-
+
@@ -82,14 +82,10 @@
onLoad(options) {
// this.$route.query的参数
this.getData(options.id)
- // this.getList()
},
//滚动到屏幕底部
onReachBottom() {
- // if(this.queryParams.pageSize < this.total){
- // this.queryParams.pageSize += 10
- // this.getList()
- // }
+
},
methods: {
leftClick(){
@@ -104,17 +100,6 @@
}
})
},
- getList(){
- this.$api('indexGetGetWorkPage', {
- token : uni.getStorageSync('token'),
- ...this.queryParams
- }, res => {
- if(res.code == 200){
- this.list = res.result.records
- this.total = res.result.total
- }
- })
- }
}
}
diff --git a/pages/publish/actorList.vue b/pages/publish/actorList.vue
index 337a157..7b82b37 100644
--- a/pages/publish/actorList.vue
+++ b/pages/publish/actorList.vue
@@ -39,14 +39,17 @@
return {
actorList : [],
total : 0,
+ queryParams: {
+ pageNo: 1,
+ pageSize: 10
+ },
}
},
onShow() {
this.getData()
},
onReachBottom(){
- let allTotal = this.queryParams.pageNo * this.queryParams.pageSize
- if(allTotal < this.total){
+ if(this.queryParams.pageSize < this.total){
//当前条数小于总条数 则增加请求数
this.queryParams.pageSize += 10
this.getData() //调用加载数据方法
diff --git a/pages_mine/publish/addWorks.vue b/pages_mine/publish/addWorks.vue
new file mode 100644
index 0000000..f3081a8
--- /dev/null
+++ b/pages_mine/publish/addWorks.vue
@@ -0,0 +1,365 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 标题:
+
+
+
+
+
+
+
+
+ 详情介绍:
+
+
+
+
+
+
+
+
+
+
+ 作品
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/publish/competition.vue b/pages_mine/publish/competition.vue
similarity index 95%
rename from pages/publish/competition.vue
rename to pages_mine/publish/competition.vue
index 3be92f6..e59ff5f 100644
--- a/pages/publish/competition.vue
+++ b/pages_mine/publish/competition.vue
@@ -15,7 +15,7 @@
-
+
@@ -36,7 +36,7 @@
-
+
暂无作品,发布第一个作品吧 ~
@@ -47,6 +47,7 @@
{{ index + 1 }}
@@ -88,7 +89,9 @@
-
+
发布作品
diff --git a/pages_mine/publish/worksDetail.vue b/pages_mine/publish/worksDetail.vue
new file mode 100644
index 0000000..3de003d
--- /dev/null
+++ b/pages_mine/publish/worksDetail.vue
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.title }}
+
+
+
+ 排名{{ item.money || 0 }}
+
+
+ 投票200
+
+
+
+
+
+
+
+ 发布人:{{ item.userId }}
+
+
+ 发布时间:{{ item.createTime }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/static/image/competition/1.png b/pages_mine/static/competition/1.png
similarity index 100%
rename from static/image/competition/1.png
rename to pages_mine/static/competition/1.png
diff --git a/static/image/competition/k.png b/pages_mine/static/competition/k.png
similarity index 100%
rename from static/image/competition/k.png
rename to pages_mine/static/competition/k.png
diff --git a/utils/utils.js b/utils/utils.js
index 0314556..5e2d81e 100644
--- a/utils/utils.js
+++ b/utils/utils.js
@@ -118,7 +118,9 @@ function params(url){
url
}
- data.url = '/pages' + data.url
+ if(!data.url.includes('/pages')){
+ data.url = '/pages' + data.url
+ }
return data
}