|
|
|
@ -1,12 +1,7 @@ |
|
|
|
<template> |
|
|
|
<view style="position: relative"> |
|
|
|
<view v-if="hasCompany && hasLogin" class="wrapper"> |
|
|
|
<uni-nav-bar |
|
|
|
:fixed="true" |
|
|
|
color="#ffffff" |
|
|
|
background-color="#ffffff" |
|
|
|
:status-bar="true" |
|
|
|
> |
|
|
|
<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> |
|
|
|
</uni-nav-bar> |
|
|
|
@ -14,42 +9,23 @@ |
|
|
|
<view class=""><image class="image" :src="logo" mode=""></image></view> |
|
|
|
<view class="center"> |
|
|
|
<view class="title">{{ storeInformation.name }}</view> |
|
|
|
<view class="desc" |
|
|
|
>全部商品 {{ storeInformation.productNumber }} | 上新 |
|
|
|
{{ storeInformation.currentProductNumber }}</view |
|
|
|
> |
|
|
|
<view class="desc">全部商品 {{ storeInformation.productNumber }} | 上新 {{ storeInformation.currentProductNumber }}</view> |
|
|
|
</view> |
|
|
|
<view class="right"> |
|
|
|
<view class="cut" @click="checkMall()"> |
|
|
|
切换商城 |
|
|
|
<image |
|
|
|
class="cut-icon" |
|
|
|
src="/static/imgs/mall/cut-icon.png" |
|
|
|
mode="" |
|
|
|
></image> |
|
|
|
<image class="cut-icon" src="/static/imgs/mall/cut-icon.png" mode=""></image> |
|
|
|
</view> |
|
|
|
<view class="set" @click="setting">设置</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<scroll-list |
|
|
|
ref="list" |
|
|
|
:option="option" |
|
|
|
@load="upCallback" |
|
|
|
@refresh="downCallback" |
|
|
|
> |
|
|
|
<view |
|
|
|
v-for="(item, index) in listData" |
|
|
|
:key="index" |
|
|
|
style="margin-bottom: 20rpx" |
|
|
|
> |
|
|
|
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback"> |
|
|
|
<view v-for="(item, index) in listData" :key="index" style="margin-bottom: 20rpx"> |
|
|
|
<view class="content" @click="detailInfo(item)"> |
|
|
|
<image |
|
|
|
class="image" |
|
|
|
:src=" |
|
|
|
item.litPicUrl || |
|
|
|
'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png' |
|
|
|
" |
|
|
|
:src="item.litPicUrl || 'https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png'" |
|
|
|
mode="" |
|
|
|
></image> |
|
|
|
<view class="" style="width: 100%"> |
|
|
|
@ -58,47 +34,24 @@ |
|
|
|
<view class=""> |
|
|
|
<image |
|
|
|
class="icon" |
|
|
|
:src=" |
|
|
|
item.status === 30111 |
|
|
|
? '/static/imgs/mall/grounding-icon.png' |
|
|
|
: '/static/imgs/mall/sold-out-icon.png' |
|
|
|
" |
|
|
|
:src="item.status === 30111 ? '/static/imgs/mall/grounding-icon.png' : '/static/imgs/mall/sold-out-icon.png'" |
|
|
|
mode="" |
|
|
|
></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="sub-title" |
|
|
|
>{{ item.manufacturerName }}/{{ item.categoryName }}/{{ |
|
|
|
item.brandName |
|
|
|
}}</view |
|
|
|
> |
|
|
|
<view |
|
|
|
class="desc flex-row-center-start" |
|
|
|
style="flex-wrap: wrap" |
|
|
|
> |
|
|
|
<view class="sub-title">{{ item.manufacturerName }}/{{ item.categoryName }}/{{ item.brandName }}</view> |
|
|
|
<view class="desc flex-row-center-start" style="flex-wrap: wrap"> |
|
|
|
克重(价格): |
|
|
|
<text |
|
|
|
style="margin-right: 8rpx" |
|
|
|
v-for="(sku, index) in item.skuList" |
|
|
|
:key="index" |
|
|
|
>{{ sku.weight }}g({{ sku.listPrice }}元)</text |
|
|
|
> |
|
|
|
<text style="margin-right: 8rpx" v-for="(sku, index) in item.skuList" :key="index">{{ sku.weight }}g({{ sku.listPrice }}元)</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="other"> |
|
|
|
<view class="time">{{ item.updateTime | timeFilter }}</view> |
|
|
|
<view class="btn"> |
|
|
|
<view |
|
|
|
class="" |
|
|
|
@click="editPaper(item)" |
|
|
|
v-if="item.status === 30112" |
|
|
|
>编辑</view |
|
|
|
> |
|
|
|
<view class="" @click="editPaper(item)" v-if="item.status === 30112">编辑</view> |
|
|
|
<view class="divide"></view> |
|
|
|
<view class="" @click="productStatusChange(item)">{{ |
|
|
|
item.status === 30111 ? '下架' : '上架' |
|
|
|
}}</view> |
|
|
|
<view class="" @click="productStatusChange(item)">{{ item.status === 30111 ? '下架' : '上架' }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -108,37 +61,20 @@ |
|
|
|
</scroll-list> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<view class="offer-prices" @click="nativeTo()" |
|
|
|
><image |
|
|
|
class="my-image" |
|
|
|
src="../../static/imgs/trade/camera.png" |
|
|
|
></image |
|
|
|
></view> |
|
|
|
<view class="offer-prices" @click="nativeTo()"><image class="my-image" src="../../static/imgs/trade/camera.png"></image></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-else> |
|
|
|
<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" |
|
|
|
> |
|
|
|
<text style="font-size: 30rpx; text-align: center; font-weight: 600" |
|
|
|
>请先完善企业基本信息</text |
|
|
|
> |
|
|
|
<view v-if="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-if="!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" |
|
|
|
/> |
|
|
|
<image src="/static/imgs/mall/close-icon.png" class="image_9" @click="closeShare" /> |
|
|
|
<!-- <view class="flex-col section_5"> |
|
|
|
<view class="flex-col section_6"> |
|
|
|
<view class="flex-col items-center group_13"> |
|
|
|
@ -151,10 +87,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
<image |
|
|
|
style="width: 560rpx; height: 710rpx" |
|
|
|
:src="shareInfo.storeCodeImg" |
|
|
|
></image> |
|
|
|
<image style="width: 560rpx; height: 710rpx" :src="shareInfo.storeCodeImg"></image> |
|
|
|
<view class="bottom-group flex-row view_3"> |
|
|
|
<text>下载海报</text> |
|
|
|
<text class="text_18">下载二维码</text> |
|
|
|
@ -186,12 +119,7 @@ |
|
|
|
import notLogged from '@/components/not-logged/not-logged.vue' |
|
|
|
import uGap from '@/components/u-gap/u-gap.vue' |
|
|
|
import { back, go2, loginGo2, saveImage } from '@/utils/hook.js' |
|
|
|
import { |
|
|
|
SupplierList, |
|
|
|
productStatus, |
|
|
|
storeDetail, |
|
|
|
getSupplierQrCode, |
|
|
|
} from '@/apis/add-paper.js' |
|
|
|
import { SupplierList, productStatus, storeDetail, getSupplierQrCode } from '@/apis/add-paper.js' |
|
|
|
import { getTimer } from '@/utils/index.js' |
|
|
|
import noData from './no-data.vue' |
|
|
|
export default { |
|
|
|
@ -203,13 +131,13 @@ export default { |
|
|
|
abs = getTimer(value) |
|
|
|
} |
|
|
|
return abs |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
shareInfo: { |
|
|
|
storeCodeImg: '', |
|
|
|
storeName: '', |
|
|
|
storeName: '' |
|
|
|
}, |
|
|
|
visible: false, // 分享弹窗 |
|
|
|
canvasReady: false, |
|
|
|
@ -217,17 +145,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', |
|
|
|
@ -238,13 +166,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: '', |
|
|
|
backgroundStyle: 'background: url("/static/imgs/mall/top-bg.png") no-repeat;', |
|
|
|
storeInfo: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -253,12 +180,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) |
|
|
|
@ -276,11 +203,7 @@ export default { |
|
|
|
if (res) { |
|
|
|
this.storeInfo = res |
|
|
|
this.$set(this.storeInformation, 'productNumber', res.productNumber) |
|
|
|
this.$set( |
|
|
|
this.storeInformation, |
|
|
|
'currentProductNumber', |
|
|
|
res.currentProductNumber |
|
|
|
) |
|
|
|
this.$set(this.storeInformation, 'currentProductNumber', res.currentProductNumber) |
|
|
|
this.$set(this.storeInformation, 'name', res.name) |
|
|
|
if (!res.logo) { |
|
|
|
this.logo = '/static/imgs/mine/user-avatar.png' |
|
|
|
@ -288,11 +211,9 @@ export default { |
|
|
|
this.logo = res.logo |
|
|
|
} |
|
|
|
if (!res.backgroundImg) { |
|
|
|
this.backgroundStyle = |
|
|
|
'background: url("/static/imgs/mall/top-bg.png") no-repeat;' |
|
|
|
this.backgroundStyle = 'background: url("/static/imgs/mall/top-bg.png") no-repeat;' |
|
|
|
} else { |
|
|
|
this.backgroundStyle = |
|
|
|
'background: url(' + res.backgroundImg + ') no-repeat;' |
|
|
|
this.backgroundStyle = 'background: url(' + res.backgroundImg + ') no-repeat;' |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
@ -346,7 +267,7 @@ export default { |
|
|
|
// 按钮点击事件 |
|
|
|
nativeTo() { |
|
|
|
var params = { |
|
|
|
title: '添加纸品', |
|
|
|
title: '添加纸品' |
|
|
|
} |
|
|
|
go2('add-paper', params) |
|
|
|
}, |
|
|
|
@ -354,7 +275,7 @@ export default { |
|
|
|
editPaper(item) { |
|
|
|
var params = { |
|
|
|
...item, |
|
|
|
title: '编辑纸品', |
|
|
|
title: '编辑纸品' |
|
|
|
} |
|
|
|
go2('add-paper', params) |
|
|
|
}, |
|
|
|
@ -370,13 +291,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 |
|
|
|
@ -392,7 +313,7 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
getSupplierQrCode({ |
|
|
|
mallSupplierId: this.$store.state.supplierInfo.supplierId, |
|
|
|
mallSupplierId: this.$store.state.supplierInfo.supplierId |
|
|
|
}).then((res) => { |
|
|
|
if (res) { |
|
|
|
this.visible = true |
|
|
|
@ -404,14 +325,14 @@ export default { |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: '请先完善企业信息', |
|
|
|
icon: 'none', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
closeShare() { |
|
|
|
this.visible = false |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
@ -624,8 +545,7 @@ export default { |
|
|
|
.border { |
|
|
|
width: 540rpx; |
|
|
|
height: 540rpx; |
|
|
|
background: url('https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/qrCode-border.png') |
|
|
|
no-repeat center/cover; |
|
|
|
background: url('https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/qrCode-border.png') no-repeat center/cover; |
|
|
|
} |
|
|
|
} |
|
|
|
.down-button { |
|
|
|
|