Skip to content

Commit

Permalink
优化页面
Browse files Browse the repository at this point in the history
  • Loading branch information
weiyunpeng committed Aug 21, 2017
1 parent f5dba6c commit 611f7dc
Show file tree
Hide file tree
Showing 8 changed files with 161 additions and 11 deletions.
133 changes: 132 additions & 1 deletion server/server/site/data/photo_flow.json
Original file line number Diff line number Diff line change
@@ -1 +1,132 @@
{"code":0,"msg":"成功","data":{"photo":[{"id":156,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c788c60819144524.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":1,"tag":["韩式"],"is_fav":0},{"id":27,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992be916ee53544570815.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":1,"tag":["韩式"],"is_fav":0},{"id":24,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992ba4aaed68335122442.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":1,"tag":["韩式"],"is_fav":0},{"id":25,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992ba4ac8064687373954.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":1,"tag":["韩式"],"is_fav":0},{"id":18,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992b9176c5d7886460548.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":1,"tag":["韩式"],"is_fav":0},{"id":164,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c7a0b3e353441482.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0},{"id":163,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c768225758371186.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0},{"id":162,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c734711494067837.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0},{"id":161,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c712758142119866.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0},{"id":160,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c81b095957444391.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0},{"id":159,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c80a78b019034251.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0},{"id":158,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c78d100098469652.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0},{"id":157,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c772c1d608857404.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0},{"id":29,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992be91dea9f093382392.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0},{"id":28,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992be9239cf6433770821.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0},{"id":26,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992ba4b29289235680684.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0},{"id":23,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992ba4abf42b277213579.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0},{"id":22,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992b969d5b47495112678.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0},{"id":21,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992b917a53bc873802097.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0},{"id":20,"img":"http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992b917b3f37315484845.jpg/shuiyin?imageView2/2/w/580/h/","fav_num":0,"tag":["韩式"],"is_fav":0}],"page":{"totalcount":21,"pageSize":20,"currentPage":1}}}
{
"code": 0,
"msg": "成功",
"data": {
"photo": [{
"id": 156,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c788c60819144524.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 1,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 27,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992be916ee53544570815.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 1,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 24,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992ba4aaed68335122442.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 1,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 25,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992ba4ac8064687373954.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 1,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 18,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992b9176c5d7886460548.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 1,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 164,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c7a0b3e353441482.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 163,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c768225758371186.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 162,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c734711494067837.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 161,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c712758142119866.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 160,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c81b095957444391.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 159,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c80a78b019034251.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 158,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c78d100098469652.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 157,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170818/5996c1c772c1d608857404.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 29,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992be91dea9f093382392.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 28,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992be9239cf6433770821.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 26,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992ba4b29289235680684.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 23,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992ba4abf42b277213579.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 22,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992b969d5b47495112678.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 21,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992b917a53bc873802097.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}, {
"id": 20,
"img": "http://marriage-1252045209.image.myqcloud.com/none/photos/20170815/5992b917b3f37315484845.jpg/shuiyin?imageView2/2/w/580/h/",
"fav_num": 0,
"tag": ["韩式"],
"is_fav": 0
}],
"page": {
"totalcount": 21,
"pageSize": 20,
"currentPage": 1
}
}
}
1 change: 0 additions & 1 deletion src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ axios.interceptors.response.use(function (response) {
type: 'info'
};
store.dispatch('showMsg',data);
return false
}
return response;
}, function (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/message.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<style>
.message {
position: absolute;
position: fixed;
width: 350px;;
z-index: 9999;
}
Expand Down
14 changes: 12 additions & 2 deletions src/components/photoModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ export default {
computed: {
...mapGetters({
getViewPhoto: 'getViewPhoto',
getViewPhotoInfo: 'getViewPhotoInfo'
getViewPhotoInfo: 'getViewPhotoInfo',
getViewPhotoStatus: 'getViewPhotoStatus'
}),
...mapActions({
showModal: 'showModal',
Expand Down Expand Up @@ -177,9 +178,18 @@ export default {
}
},
getViewPhotoInfo() {
this.photoInfo = this.getViewPhotoInfo
if(this.getViewPhotoInfo){
self.photoInfo = this.getViewPhotoInfo
}
},
getViewPhotoStatus(){
const self = this;
if(this.getViewPhotoStatus == -1){
setTimeout(() => self.close(), 2000)
}
},
photoModal(){
console.log(this.photoModal)
if(this.photoModal.src){
this.isCase = false
}
Expand Down
12 changes: 8 additions & 4 deletions src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@ export const qryIndex = ({ commit },data) => {
//----------------------------------------查看图组详情------------------------------------------------------
export const qryViewPhoto = ({ commit },data) => {
api.qryViewPhoto(data).then(function (response) {
if(response.data.code == -1){
commit(types.HIDE_PHOTO_MODAL)
return false
}
let photoCount = 0;
for(let i=0;i < response.data.data.list.length;i++){
const tempImage = new Image();
Expand All @@ -349,12 +353,12 @@ export const qryViewPhoto = ({ commit },data) => {
}
})
.catch(function (error) {
showMsg({commit}, {
content: error.response.data.errorMsg,
type: 'danger'
})
console.log(error)
});
};
export const hidePhotoModal = ({ commit }) => {
commit(types.HIDE_MSG)
};
//----------------------------------------------------------------------------------------------

//----------------------------------------首页已登录状态------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src/store/getters.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const makeupmanPackages = state => state.makeupman.packages;
export const getIndexPhoto = state => state.index;
export const getViewPhoto = state => state.viewPhoto.list;
export const getViewPhotoInfo = state => state.viewPhoto.photoInfo;
export const getViewPhotoStatus = state => state.viewPhoto.photoModelStatus;
export const getPhotoList = state => state.viewPhoto.photoList;
export const getPhotoListFill = state => state.viewPhoto.photoListFill;
export const getPhotoStatus = state => state.viewPhoto.status;
Expand Down
8 changes: 6 additions & 2 deletions src/store/modules/viewPhoto.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
import { PHOTO_LIST,VIEW_PHOTO_MODAL,PHOTO_STATUS,PHOTO_CLEAR,PHOTO_LIKE_USER,CANCEL_PHOTO_LIKE_USER} from '../types'
import { PHOTO_LIST,VIEW_PHOTO_MODAL,HIDE_PHOTO_MODAL,PHOTO_STATUS,PHOTO_CLEAR,PHOTO_LIKE_USER,CANCEL_PHOTO_LIKE_USER} from '../types'

const state = {
list: [],
photoInfo:null,
photoList: [],
photoListFill: [],
status: 0
status: 0,
photoModelStatus:0
};

const mutations = {
[VIEW_PHOTO_MODAL](state, data) {
state.list = data.data.list;
state.photoInfo = data.data;
},
[HIDE_PHOTO_MODAL](state, data) {
state.photoModelStatus = -1;
},
[PHOTO_LIST](state, data) {
for(var i=0;i<Math.floor(data.list.length/4);i++){
state.photoListFill = state.photoListFill.concat(data.list[i]);
Expand Down
1 change: 1 addition & 0 deletions src/store/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const PHOTO_STATUS = 'PHOTO_STATUS'
export const PHOTO_CLEAR = 'PHOTO_CLEAR'

export const VIEW_PHOTO_MODAL = 'VIEW_PHOTO_MODAL'
export const HIDE_PHOTO_MODAL = 'HIDE_PHOTO_MODAL'
export const PHOTO_LIKE_USER = 'PHOTO_LIKE_USER'
export const CANCEL_PHOTO_LIKE_USER = 'CANCEL_PHOTO_LIKE_USER'

Expand Down

0 comments on commit 611f7dc

Please sign in to comment.