|
|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<view style="position: relative"> |
|
|
|
<view v-if="hasCompany && hasLogin" class="wrapper"> |
|
|
|
<view v-show="hasCompany && hasLogin" class="wrapper"> |
|
|
|
<uni-nav-bar :fixed="true" color="#ffffff" background-color="#ffffff" :status-bar="true"> |
|
|
|
<view slot="left" class="left-title">纸商城</view> |
|
|
|
<view slot="right" class="right-title" @tap="shareTap">分享</view> |
|
|
|
@ -64,14 +64,14 @@ |
|
|
|
<view class="offer-prices" @click="nativeTo()"><image class="my-image" src="../../static/imgs/trade/camera.png"></image></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-else> |
|
|
|
<view v-show="!hasCompany || !hasLogin"> |
|
|
|
<uni-nav-bar :fixed="true" :status-bar="true"> |
|
|
|
<view slot="left" style="font-size: 40rpx; color: #000000">纸商城</view> |
|
|
|
</uni-nav-bar> |
|
|
|
<view v-if="hasLogin && !hasCompany" class="flex-col-center-center" style="margin-top: 100rpx"> |
|
|
|
<view v-show="hasLogin && !hasCompany" class="flex-col-center-center" style="margin-top: 100rpx"> |
|
|
|
<text style="font-size: 30rpx; text-align: center; font-weight: 600">请先完善企业基本信息</text> |
|
|
|
</view> |
|
|
|
<view class="" v-if="!hasLogin"><not-logged @loginChange="loginChange()"></not-logged></view> |
|
|
|
<view class="" v-show="!hasLogin"><not-logged @loginChange="loginChange()"></not-logged></view> |
|
|
|
</view> |
|
|
|
<view class="flex-col section_4" v-show="visible"> |
|
|
|
<image src="/static/imgs/mall/close-icon.png" class="image_9" @click="closeShare" /> |
|
|
|
@ -113,13 +113,13 @@ export default { |
|
|
|
abs = getTimer(value) |
|
|
|
} |
|
|
|
return abs |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
shareInfo: { |
|
|
|
storeCodeImg: '', |
|
|
|
storeName: '', |
|
|
|
storeName: '' |
|
|
|
}, |
|
|
|
visible: false, // 分享弹窗 |
|
|
|
shareAreaVisible: false, // 底部弹窗 |
|
|
|
@ -127,17 +127,17 @@ export default { |
|
|
|
supplierId: null, |
|
|
|
name: null, |
|
|
|
productNumber: 0, |
|
|
|
currentProductNumber: 0, |
|
|
|
currentProductNumber: 0 |
|
|
|
}, |
|
|
|
option: { |
|
|
|
size: 10, |
|
|
|
auto: true, |
|
|
|
emptyText: '暂无数据~', |
|
|
|
disabled: false, |
|
|
|
disabled: false |
|
|
|
}, |
|
|
|
pattern: { |
|
|
|
backgroundColor: '#007AFF', |
|
|
|
buttonColor: '#007AFF', |
|
|
|
buttonColor: '#007AFF' |
|
|
|
}, |
|
|
|
content: [], |
|
|
|
horizontal: 'right', |
|
|
|
@ -148,12 +148,12 @@ export default { |
|
|
|
pageSize: 10, |
|
|
|
storeId: null, |
|
|
|
name: null, |
|
|
|
supplierId: this.$store.state.supplierInfo.supplierId, |
|
|
|
supplierId: this.$store.state.supplierInfo.supplierId |
|
|
|
}, |
|
|
|
listData: [], |
|
|
|
logo: '/static/imgs/mine/user-avatar.png', |
|
|
|
backgroundStyle: 'background: url("/static/imgs/mall/top-bg.png") no-repeat;', |
|
|
|
storeInfo: '', |
|
|
|
storeInfo: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -162,12 +162,12 @@ export default { |
|
|
|
}, |
|
|
|
hasLogin() { |
|
|
|
return this.$store.state.qnToken != '' |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
if (this.hasCompany) { |
|
|
|
this.storeInformation = { |
|
|
|
supplierId: this.$store.state.supplierInfo.supplierId, |
|
|
|
supplierId: this.$store.state.supplierInfo.supplierId |
|
|
|
} |
|
|
|
this.downCallback() |
|
|
|
this.getSupplier(this.$store.state.supplierInfo.supplierId) |
|
|
|
@ -176,7 +176,8 @@ export default { |
|
|
|
methods: { |
|
|
|
back, |
|
|
|
loginChange() { |
|
|
|
go2('login') |
|
|
|
this.$store.commit('setNextPage', { name: 'mall' }) |
|
|
|
go2('login', {}, true) |
|
|
|
}, |
|
|
|
// 获取上新商品数量 |
|
|
|
getSupplier(id) { |
|
|
|
@ -205,6 +206,9 @@ export default { |
|
|
|
}, |
|
|
|
// 获取纸品列表 |
|
|
|
queryData() { |
|
|
|
if (!hasCompany || !hasLogin) { |
|
|
|
return |
|
|
|
} |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
SupplierList({ ...this.orderPagination }) |
|
|
|
.then((res) => { |
|
|
|
@ -249,7 +253,7 @@ export default { |
|
|
|
// 按钮点击事件 |
|
|
|
nativeTo() { |
|
|
|
var params = { |
|
|
|
title: '添加纸品', |
|
|
|
title: '添加纸品' |
|
|
|
} |
|
|
|
go2('add-paper', params) |
|
|
|
}, |
|
|
|
@ -257,7 +261,7 @@ export default { |
|
|
|
editPaper(item) { |
|
|
|
var params = { |
|
|
|
...item, |
|
|
|
title: '编辑纸品', |
|
|
|
title: '编辑纸品' |
|
|
|
} |
|
|
|
go2('add-paper', params) |
|
|
|
}, |
|
|
|
@ -273,13 +277,13 @@ export default { |
|
|
|
productStatusChange(item) { |
|
|
|
var params = { |
|
|
|
id: item.id, |
|
|
|
status: item.status === 30111 ? 30112 : 30111, |
|
|
|
status: item.status === 30111 ? 30112 : 30111 |
|
|
|
} |
|
|
|
productStatus(params).then((res) => { |
|
|
|
if (res) { |
|
|
|
uni.showToast({ |
|
|
|
title: '状态修改成功', |
|
|
|
icon: 'success', |
|
|
|
icon: 'success' |
|
|
|
}) |
|
|
|
setTimeout(() => { |
|
|
|
this.orderPagination.pageNum = 1 |
|
|
|
@ -295,7 +299,7 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
getSupplierQrCode({ |
|
|
|
mallSupplierId: this.$store.state.supplierInfo.supplierId, |
|
|
|
mallSupplierId: this.$store.state.supplierInfo.supplierId |
|
|
|
}).then((res) => { |
|
|
|
if (res) { |
|
|
|
this.visible = true |
|
|
|
@ -306,7 +310,7 @@ export default { |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: '请先完善企业信息', |
|
|
|
icon: 'none', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -331,13 +335,13 @@ export default { |
|
|
|
}, |
|
|
|
fail: (err) => { |
|
|
|
console.log('err', err) |
|
|
|
}, |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
showShareArea() { |
|
|
|
this.shareAreaVisible = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
|