|
@@ -183,9 +183,11 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <tabBar :currentIndex="typeNum"></tabBar>
|
|
|
+
|
|
|
<uni-load-more :status="more"> </uni-load-more>
|
|
|
<rf-loading v-if="loading"></rf-loading>
|
|
|
+ <tabBar :currentIndex="typeNum"></tabBar>
|
|
|
+ <view style="height: 100upx;"></view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -197,10 +199,10 @@ export default {
|
|
|
data() {
|
|
|
//这里存放数据
|
|
|
return {
|
|
|
- typeNum: 2,
|
|
|
+ typeNum: null,
|
|
|
|
|
|
deleteId: '',
|
|
|
- scenicID: 0, // 景区id 唯一(一个账号代表一个景区)
|
|
|
+ // scenicID: 0, // 景区id 唯一(一个账号代表一个景区)
|
|
|
loading: false,
|
|
|
more: 'loading', // more loading noMore
|
|
|
shopArray: [{ name: '全部', id: '' }],
|
|
@@ -220,7 +222,7 @@ export default {
|
|
|
params: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- mid: 0, // 景区id
|
|
|
+ mid: uni.getStorageSync('scenicMessage').id, // 景区id
|
|
|
status: '1', // 审核状态
|
|
|
upDown: '', // 上下架状态
|
|
|
shopId: '', // 商铺id 选择框
|
|
@@ -260,13 +262,13 @@ export default {
|
|
|
this.params = {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- mid: 0, // 景区id
|
|
|
+ mid: uni.getStorageSync('scenicMessage').id,
|
|
|
status: '1', // 审核状态
|
|
|
upDown: '', // 上下架状态
|
|
|
shopId: '', // 商铺id 选择框
|
|
|
name: '',
|
|
|
};
|
|
|
- this.getShopMessage();
|
|
|
+ this.getTicketShopList();
|
|
|
},
|
|
|
// 上拉加载
|
|
|
onReachBottom() {
|
|
@@ -277,18 +279,30 @@ export default {
|
|
|
this.getMoreByStatus();
|
|
|
}
|
|
|
},
|
|
|
- onShow() {
|
|
|
- this.getShopList();
|
|
|
- this.getShopMessage();
|
|
|
+ // 监听页面返回
|
|
|
+ onBackPress (options) {
|
|
|
+ console.log(options);
|
|
|
+ this.getTicketShopList().then(()=>{
|
|
|
+ this.getShopList()
|
|
|
+ })
|
|
|
},
|
|
|
+ onLoad () {
|
|
|
+ this.typeNum = this.$mStore.state.roleIndex
|
|
|
+
|
|
|
+ // this.params.mid = uni.getStorageSync('scenicMessage').id
|
|
|
+ // console.log(this.params.mid);
|
|
|
+
|
|
|
+ this.getTicketShopList().then(()=>{
|
|
|
+ this.getShopList()
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
+
|
|
|
// 跳转详情
|
|
|
topage(id) {
|
|
|
-
|
|
|
- // if (id) {
|
|
|
- // uni.setStorageSync('Id', id);
|
|
|
- // }
|
|
|
this.$mRouter.push({ route: '/pages/goods/shopdetail', query:{id: id}});
|
|
|
},
|
|
|
// 删除商品
|
|
@@ -328,6 +342,7 @@ export default {
|
|
|
this.params.shopId = this.shopArray[this.index].id;
|
|
|
this.getTicketShopList();
|
|
|
},
|
|
|
+
|
|
|
// 获取店铺列表
|
|
|
async getShopList() {
|
|
|
await this.$http.get('/homePage/getShopByMerId').then((res) => {
|
|
@@ -337,18 +352,20 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
// 商家信息
|
|
|
- async getShopMessage() {
|
|
|
- await this.$http.get('/getUserInfo').then(async (res) => {
|
|
|
- if (res.data) {
|
|
|
- uni.setStorageSync('scenicId', res.data.id);
|
|
|
+ // async getShopMessage() {
|
|
|
+ // await this.$http.get('/getUserInfo').then(async (res) => {
|
|
|
+ // if (res.data) {
|
|
|
+ // uni.setStorageSync('scenicId', res.data.id);
|
|
|
+
|
|
|
+ // this.params.mid = res.data.id;
|
|
|
+ // this.getTicketShopList();
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // uni.stopPullDownRefresh(); // 关闭下拉刷新
|
|
|
+ // },
|
|
|
|
|
|
- this.params.mid = res.data.id;
|
|
|
- this.getTicketShopList();
|
|
|
- }
|
|
|
- });
|
|
|
- uni.stopPullDownRefresh(); // 关闭下拉刷新
|
|
|
- },
|
|
|
// 待审核tab切换
|
|
|
changeTabByStatus(type, status) {
|
|
|
this.more = 'loading';
|
|
@@ -393,6 +410,7 @@ export default {
|
|
|
|
|
|
// 商品列表(待审核状态)
|
|
|
async getTicketShopList() {
|
|
|
+ this.more = 'loading'
|
|
|
this.soleStatus = 1;
|
|
|
this.shoplist = [];
|
|
|
|
|
@@ -402,6 +420,7 @@ export default {
|
|
|
} else {
|
|
|
delete this.params.upDown;
|
|
|
}
|
|
|
+ console.log(this.params.mid);
|
|
|
await this.$http.get('/goods/list', this.params).then((res) => {
|
|
|
if (res.data.list.length > 0) {
|
|
|
this.shoplist = res.data.list;
|
|
@@ -411,6 +430,8 @@ export default {
|
|
|
} else {
|
|
|
this.more = 'noMore';
|
|
|
}
|
|
|
+
|
|
|
+ uni.stopPullDownRefresh(); // 关闭下拉刷新
|
|
|
});
|
|
|
},
|
|
|
// 更多(待审核状态)
|
|
@@ -479,7 +500,7 @@ export default {
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.shop {
|
|
|
- background-color: #f4f4f4;
|
|
|
+ // background-color: #f4f4f4;
|
|
|
|
|
|
.header-warp {
|
|
|
width: 100%;
|
|
@@ -607,7 +628,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
.order-content {
|
|
|
- padding: 24upx 32upx 0;
|
|
|
+ padding: 24upx 32upx 30upx;
|
|
|
|
|
|
.order-list {
|
|
|
background-color: #fff;
|
|
@@ -636,7 +657,7 @@ export default {
|
|
|
width: 120upx;
|
|
|
height: 120upx;
|
|
|
border-radius: 5upx;
|
|
|
- background-color: pink;
|
|
|
+ background-color: #ccc;
|
|
|
}
|
|
|
}
|
|
|
.center {
|