diff --git a/apis/add-paper.js b/apis/add-paper.js index 6fc62a1..21f8e27 100644 --- a/apis/add-paper.js +++ b/apis/add-paper.js @@ -2,70 +2,90 @@ import http from '../utils/http/index.js' // 添加纸品 export function createProduct(data) { - return http.post({ - url: '/base-paper-trading/create/product', - data - }) + return http.post({ + url: '/base-paper-trading/create/product', + data + }) } // 更新纸品 export function updateProduct(data) { - return http.post({ - url: '/base-paper-trading/update/product', - data - }) + return http.post({ + url: '/base-paper-trading/update/product', + data + }) } // 纸品种类列表 export function getCategoryList(data) { - return http.get({ - url: '/base-paper-trading/get/product/category-list', - data - }) + return http.get({ + url: '/base-paper-trading/get/product/category-list', + data + }) } // 纸品详情 -export function getSupplierDteail(data) { - return http.get({ - url: '/base-paper-trading/get/product-detail/for/supplier', - data - }) +export function getSupplierDetail(data) { + return http.get({ + url: '/base-paper-trading/get/product-detail/for/supplier', + data + }) } // 店铺纸品列表(供应商端) export function SupplierList(data) { - return http.get({ - url: '/base-paper-trading/get/store/product-list/for/supplier', - data - }) + return http.get({ + url: '/base-paper-trading/get/store/product-list/for/supplier', + data + }) } // 上下架纸品 export function productStatus(data) { - return http.post({ - url: '/base-paper-trading/update/product/status', - data - }) + return http.post({ + url: '/base-paper-trading/update/product/status', + data + }) } // 编辑店铺、 export function updataStore(data) { - return http.post({ - url: '/base-paper-trading/update/store?mallSupplierId='+data.mallSupplierId, - data - }) + return http.post({ + url: '/base-paper-trading/update/store?mallSupplierId=' + data.mallSupplierId, + data + }) } /** - * 获取我店铺列表 + * 获取我店铺列表 * swagger:http://api-ops-yyt-test.qniao.cn/base-paper-trading/swagger-ui/index.html?urls.primaryName=CustomerApi#/店铺/getMyStoreListUsingGET */ export function getStoreList(data) { - return http.get({ - url: '/base-paper-trading/get/my/store-list', - data - }) + return http.get({ + url: '/base-paper-trading/get/my/store-list', + data + }) } //获取店铺信息(供应商端) export function storeDetail(data) { - return http.get({ - url: '/base-paper-trading/get/store-detail/for/supplier?supplierId='+data, - data - }) + return http.get({ + url: '/base-paper-trading/get/store-detail/for/supplier?supplierId=' + data, + data + }) +} + +/** + * 获取供应商二维码图片 mallSupplierId + */ +export function getSupplierQrCode(data) { + return http.get({ + url: '/base-paper-trading/get/supplier/store/home/img', + data + }) +} + +/** + * 获取供应商纸品二维码图片 mallSupplierId paperId + */ +export function getPaperQrCode(data) { + return http.get({ + url: '/base-paper-trading/get/supplier/store/paper/details/img', + data + }) } diff --git a/manifest.json b/manifest.json index 6b74ca8..854b740 100644 --- a/manifest.json +++ b/manifest.json @@ -40,6 +40,7 @@ "", "", "", + "", "", "", "", diff --git a/pages/add-paper/index.vue b/pages/add-paper/index.vue index 3301e1c..89402f9 100644 --- a/pages/add-paper/index.vue +++ b/pages/add-paper/index.vue @@ -201,21 +201,35 @@ 纸品图片 - + + + + + + + 上传图片 + + + + + @@ -304,10 +318,10 @@ @@ -421,7 +448,7 @@ export default { } .offer-prices { position: absolute; - z-index: 9999; + z-index: 100; right: 32rpx; bottom: 122rpx; border-radius: 50%; @@ -435,4 +462,35 @@ export default { height: 100rpx; } } +.share-area { + width: 750rpx; + height: 100vh; + background: rgba(0, 0, 0, 0.5); + position: fixed; + z-index: 1000; + top: 0; + left: 0; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + .close-icon { + width: 750rpx; + padding: 0 32rpx; + height: 70rpx; + flex-grow: 0; + flex-shrink: 0; + display: flex; + flex-direction: row; + align-items: center; + justify-content: flex-end; + } + .share-content { + width: 560rpx; + margin-top: 26rpx; + background-color: #fff; + border-radius: 20rpx; + padding: 42rpx; + } +} diff --git a/pages/mine/index.vue b/pages/mine/index.vue index cfa2262..99c53f8 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -48,7 +48,7 @@ VIP会员 立即开通会员 尊享特权 - + {{ isVip ? '续费会员' : '开通会员' }} @@ -128,6 +128,28 @@ client-credit enterprise-info + @@ -156,6 +178,8 @@ export default { components: { qnDataPicker }, data() { return { + visible: false, + customerServicer: '17606507108', fddStatus: Object.freeze(fddEnterpriseStatus), messageNum: 0, companyNum: 0, @@ -198,14 +222,40 @@ export default { }) } if (this.userInfo.fddEnterpriseStatus === fddEnterpriseStatus.UNCERTIFIED) { + // uni.showToast({ + // title: '正在跳转,请稍后~', + // icon: 'none' + // }) + } + }, + go2, + loginGo2, + makeVip() { + if (this.hasCompany) { + this.visible = true + } else { uni.showToast({ - title: '认证中,请稍后~', + title: '请先完善企业信息', icon: 'none' }) } }, - go2, - loginGo2, + closeShare() { + this.visible = false + }, + // 复制客服手机号 + copyPhone() { + uni.setClipboardData({ + data: this.customerServicer, + success: () => { + uni.showToast({ + title: '复制成功', + icon: 'none', + duration: 2000 + }) + } + }) + }, // 获取纸盘商订单统计 getStatistics() { if (!this.hasLogin) { @@ -251,6 +301,9 @@ export default { isVip() { return this.$store.state.supplierInfo.isVip == true }, + hasCompany() { + return this.$store.state.supplierInfo.id != null + }, curAvatar() { if (!this.hasLogin) { return '/static/imgs/mine/user-avatar.png' @@ -551,4 +604,58 @@ export default { align-items: center; justify-content: flex-end; } +.share-area { + width: 750rpx; + height: 100vh; + background: rgba(0, 0, 0, 0.5); + position: fixed; + z-index: 200; + top: 0; + left: 0; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + .close-icon { + width: 750rpx; + padding: 0 32rpx; + height: 70rpx; + flex-grow: 0; + flex-shrink: 0; + display: flex; + flex-direction: row; + align-items: center; + justify-content: flex-end; + } + .share-content { + width: 560rpx; + margin-top: 26rpx; + background-color: #fff; + border-radius: 20rpx; + overflow: hidden; + } +} +.vip-top { + width: 560rpx; + height: 268rpx; + background-color: #ff883b; + padding: 54rpx 20rpx; + + .text { + font-size: 40rpx; + color: #ffffff; + line-height: 72rpx; + } +} +.button { + width: 250rpx; + height: 70rpx; + background: #ff5550; + border-radius: 34rpx; + margin: 40rpx 0; + .text { + font-size: 34rpx; + color: #ffffff; + } +} diff --git a/pages/paper-detail/index.vue b/pages/paper-detail/index.vue index 0090934..fc3ac41 100644 --- a/pages/paper-detail/index.vue +++ b/pages/paper-detail/index.vue @@ -1,215 +1,281 @@ diff --git a/pages/store-settings/index.vue b/pages/store-settings/index.vue index 9fc422b..1da86fa 100644 --- a/pages/store-settings/index.vue +++ b/pages/store-settings/index.vue @@ -1,239 +1,245 @@ diff --git a/pages/switching-mall/index.vue b/pages/switching-mall/index.vue index 3b8fbef..83fc870 100644 --- a/pages/switching-mall/index.vue +++ b/pages/switching-mall/index.vue @@ -1,31 +1,33 @@ + diff --git a/pages/user-info/index.vue b/pages/user-info/index.vue index ae39d2d..b45aa67 100644 --- a/pages/user-info/index.vue +++ b/pages/user-info/index.vue @@ -1,104 +1,102 @@ diff --git a/static/imgs/mall/top-bg.png b/static/imgs/mall/top-bg.png new file mode 100644 index 0000000..d94e257 Binary files /dev/null and b/static/imgs/mall/top-bg.png differ diff --git a/utils/hook.js b/utils/hook.js index 8c3b62e..6eaf95f 100644 --- a/utils/hook.js +++ b/utils/hook.js @@ -119,7 +119,7 @@ export function uploadImage(sourceType = ['album', 'camera'], count = 1) { }, fail: (err) => { console.error('chooseImage error:', err) - reject(err) + resolve(null) } }) })