Commit 0667be6b by huahua

提交

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