diff --git a/pages/login/login.vue b/pages/login/login.vue index d8a35bf..3de891b 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -389,6 +389,7 @@ uni.setStorageSync('schoolShop', res.result.shop) uni.setStorageSync('shopTakeaway', item.shopTakeaway) uni.setStorageSync('printingMethod', item.printingMethod || (res.result.shop && res.result.shop.printingMethod) || 'bluetooth') + uni.setStorageSync('cloudPrinterBrand', (res.result.shop && res.result.shop.printerBrand) || 'daqu') uni.setStorageSync('cloudPrinterSn', (res.result.shop && res.result.shop.printerSn) || '') uni.setStorageSync('cloudPrinterName', (res.result.shop && res.result.shop.printerName) || '') uni.setStorageSync('attrId', item.attrId) diff --git a/pages/myCenter/setPrint.vue b/pages/myCenter/setPrint.vue index ce1d597..baba091 100644 --- a/pages/myCenter/setPrint.vue +++ b/pages/myCenter/setPrint.vue @@ -10,7 +10,7 @@ {{cloudPrinterSn ? '已绑定云打印机' : '未绑定云打印机'}} - {{cloudPrinterName || cloudPrinterSn || '请到后台绑定'}} + {{cloudPrinterBrandName}} {{cloudPrinterName || cloudPrinterSn || '请到后台绑定'}} @@ -96,10 +96,21 @@ isPrint: false, isCloudPrint: false, printingMethod: uni.getStorageSync('printingMethod') || 'bluetooth', + cloudPrinterBrand: uni.getStorageSync('cloudPrinterBrand') || 'daqu', cloudPrinterSn: '', cloudPrinterName: '', } }, + computed: { + cloudPrinterBrandName() { + const names = { + daqu: '大趋智能', + yilianyun: '易联云', + feieyun: '飞鹅云' + }; + return names[this.cloudPrinterBrand || 'daqu'] || '大趋智能'; + } + }, //页面卸载是关闭蓝牙链接 // onUnload() { // uni.hideLoading() @@ -153,9 +164,11 @@ }, false, 'GET', 'application/x-www-form-urlencoded').then(res => { if (res.code == 200 && res.result) { this.printingMethod = res.result.printingMethod || 'bluetooth'; + this.cloudPrinterBrand = res.result.printerBrand || 'daqu'; this.cloudPrinterSn = res.result.printerSn || ''; this.cloudPrinterName = res.result.printerName || ''; uni.setStorageSync('printingMethod', this.printingMethod); + uni.setStorageSync('cloudPrinterBrand', this.cloudPrinterBrand); uni.setStorageSync('cloudPrinterSn', this.cloudPrinterSn); uni.setStorageSync('cloudPrinterName', this.cloudPrinterName); } @@ -177,9 +190,11 @@ }, false, 'POST', 'application/x-www-form-urlencoded').then(res => { if (res.code == 200 && res.result) { this.printingMethod = res.result.printingMethod || method; + this.cloudPrinterBrand = res.result.printerBrand || 'daqu'; this.cloudPrinterSn = res.result.printerSn || ''; this.cloudPrinterName = res.result.printerName || ''; uni.setStorageSync('printingMethod', this.printingMethod); + uni.setStorageSync('cloudPrinterBrand', this.cloudPrinterBrand); uni.setStorageSync('cloudPrinterSn', this.cloudPrinterSn); uni.setStorageSync('cloudPrinterName', this.cloudPrinterName); uni.showToast({ diff --git a/pages/shop/addType.vue b/pages/shop/addType.vue index d10e4f6..70e8e0d 100644 --- a/pages/shop/addType.vue +++ b/pages/shop/addType.vue @@ -315,13 +315,28 @@ } .bj-btn { + float: right; + display: flex; + align-items: center; + justify-content: center; width: 88rpx; height: 50rpx; + margin: 25rpx 25rpx 0 0; font-size: 24rpx; padding: 0; - line-height: 50rpx; + line-height: 1; + color: #00231C; + background: transparent; border-radius: 50rpx; - border: none; + border: 0; + box-sizing: border-box; + -webkit-appearance: none; + appearance: none; + overflow: hidden; + } + + .bj-btn::after { + border: 0; } .type-popup {