Commit 0667be6b by huahua

提交

parent 9cdf6526
......@@ -18,6 +18,7 @@
<view class="start_title" style="margin-top: 120upx;">定制站必须扫码才能使用</view>
</view>
</view>
<!-- 扫码定制 -->
<view @click="scanning" style="width: 460upx; position: fixed; bottom: 180upx; margin: auto;
height: 164upx; background: #FAD9B1 ; left: 0; right: 0; z-index: 99; border-radius: 20upx;
......
......@@ -73,6 +73,13 @@
material_series_id: "",
},
Material_categorydatalist: [], //作品、贴图列表
historyQueryPage: {
goods_id: "", //产品Id
s: 'Works.myList',
}, //历史对象
datalist: [], //作品、贴图列表
Material_category: [], //贴图分类
currentId: 0,
......@@ -82,6 +89,7 @@
tip: '',
scrollViewTop: 0, //滑动高度
e: 0, //弹窗类型
isWork: false, //是否作品
};
},
mounted() {
......@@ -91,10 +99,10 @@
* 组件的公有方法列表
*/
methods: {
//作品详情
Worksdetail(item) {
//console.log(item)
item.isWork = this.isWork
this.$emit('Worksdetail', item)
},
......@@ -131,7 +139,6 @@
setTimeout(e, 500);
this.tip = '刷新成功';
this.queryPage.page = 1
//this.getShapeList()
if (this.type == 99) {
this.queryCollectionPage.page = 1;
this.getExcellentMaterial(this.item.queryPage)
......@@ -159,11 +166,10 @@
if (this.e != item.e) {
this.datalist = [];
}
this.isWork = false;
this.type = 0;
this.e = item.e;
this.scrollViewTop = 0;
//let loadData = true;
let loadData = false;
if (item.e == 23 || item.e == 2) {
if (this.queryPage.material_category_id == item.queryPage.material_category_id) {
......@@ -231,6 +237,9 @@
this.item = item;
this.getExcellentMaterial(item.queryPage)
} else {
if (item.queryPage.currentId == 0) {
this.isWork = true;
}
this.scrollViewTop = this.oldScrollViewTop
this.showState = true;
}
......@@ -261,13 +270,20 @@
getExcellentMaterialMore(e) {
if (e.currentId == 0) {
} else {
let url = ''
uni.showLoading({
title: '正在加载中...'
})
let url = ''
if (e.currentId == 0) url = '/douyin/Material/getMeMaterial'
else if (e.currentId == 1) url = '/douyin/Material/getMeCollection'
else if (e.currentId == 2) url = '/douyin/Material/getFollowMaterials'
if (e.currentId == 1) {
url = '/douyin/Material/getMeMaterial'
} else if (e.currentId == 2) {
url = '/douyin/Material/getMeCollection'
} else if (e.currentId == 3) {
url = '/douyin/Material/getFollowMaterials'
}
this.$http.post(url, this.queryCollectionPage).then(result => {
this.showState = true
if (result.data == null || result.data == "") {
......@@ -276,7 +292,8 @@
icon: 'none'
});
} else {
this.Material_categorydatalist = this.Material_categorydatalist.concat(result.data.data);
this.Material_categorydatalist = this.Material_categorydatalist.concat(result.data
.data);
this.datalist = this.datalist.concat(result.data.data);
this.queryCollectionPage.page += 1;
if (Math.ceil(result.total / result.per_page) <= this.queryCollectionPage.page) {
......@@ -297,36 +314,54 @@
})
uni.hideLoading();
});
}
},
//获取条件
getExcellentMaterial(e) {
this.datalist = []
uni.showLoading({
title: '正在加载中...'
})
let url = ''
this.currentId = e.currentId;
if (e.currentId == 0) url = '/douyin/Material/getMeMaterial'
else if (e.currentId == 1) url = '/douyin/Material/getMeCollection'
else if (e.currentId == 2) url = '/douyin/Material/getFollowMaterials'
if (e.currentId == 0) {
this.isWork = true;
this.historyQueryPage.goods_id = this.item.goods_id;
homeservice.WorksList(this.historyQueryPage).then(result => {
this.datalist = result.data
uni.hideLoading();
}).catch(err => {
uni.showToast({
title: err.msg,
icon: 'none'
})
uni.hideLoading();
});
} else {
this.isWork = false;
if (e.currentId == 1) {
url = '/douyin/Material/getMeMaterial'
} else if (e.currentId == 2) {
url = '/douyin/Material/getMeCollection'
} else if (e.currentId == 3) {
url = '/douyin/Material/getFollowMaterials'
}
this.$http.post(url, this.queryCollectionPage).then(result => {
this.showState = true
this.Material_categorydatalist = result.data.data
this.datalist = result.data.data;
this.queryCollectionPage.page += 1;
uni.hideLoading();
this.tip = '';
}).catch(err => {
this.showState = true
uni.showToast({
title: err.msg,
icon: 'none'
})
uni.hideLoading();
});
}
},
},
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment