lilei пре 2 година
родитељ
комит
932835d2fd
2 измењених фајлова са 27 додато и 4 уклоњено
  1. 10 4
      components/kk-printer/index.vue
  2. 17 0
      pages/userCenter/index.vue

+ 10 - 4
components/kk-printer/index.vue

@@ -16,10 +16,7 @@
 						<input type="text"  placeholder-class="kk-placeholder-class" placeholder="请输入蓝牙名字或设备ID搜索" v-model="filterName" />
 					</view> -->
 					<view style="text-align: left;">
-						<view>注意事项:</view>
-						<view>1、连接打印机之前,先打开手机蓝牙开关</view>
-						<view>2、请检查打印机是否已被其它手机连接,如果是请关闭其它手机蓝牙,然后再用您的手机连接</view>
-						<view>3、如果一直处于打印中状态,但打印机没有任何反应,请关闭app应用重新打开再试试</view>
+						<u-parse :html="content"></u-parse>
 					</view>
 					<view class="kk-btn-wrap">
 						<view class="kk-btn-item confirm-btn" @tap="searchBtnTap" v-if="!isSearching">
@@ -78,6 +75,15 @@
 	export default {
 		data(){
 			return{
+				content: `
+					<div style="font-size:12px;">
+					<p>注意事项:</p>
+					<p>1、连接打印机之前,先打开手机蓝牙开关</p>
+					<p>2、如果已有其它手机连接,请手动断开或重启打印机</p>
+					<p>3、如果连接打印机没有任何反应或需要切换连接其它打印机,请在“我的”页面点击“重置打印机”后再试</p>
+					<p>4、目前仅支持“得力(DL-886BW(NEW))”、“新北洋(BTP-P39)”蓝牙打印机</p>
+					</div>
+				`,
 				//是否正在打印
 				isPrinting:false,
 				//是否正在搜索设备

+ 17 - 0
pages/userCenter/index.vue

@@ -24,6 +24,7 @@
 				</u-cell-item>
 				<u-cell-item icon="edit-pen" icon-size="38" :icon-style="{color:'#00aaff'}" index="1" @click="toPage(1)" title="修改密码"></u-cell-item>
 				<u-cell-item icon="man-delete" icon-size="38" :icon-style="{color:'#00aaff'}" index="1" @click="closeAccount" title="注销账户"></u-cell-item>
+				<u-cell-item icon="man-delete" icon-size="38" :icon-style="{color:'#00aaff'}" index="1" @click="resetPrint" title="重置打印机"></u-cell-item>
 			</u-cell-group>
 			<u-cell-group>
 				<!-- <u-cell-item icon="info-circle" icon-size="38" :icon-style="{color:'#00aaff'}" index="1" @click="toPage" title="关于我们"></u-cell-item> -->
@@ -103,6 +104,22 @@
 				data.permCodes = data.permCodes.filter(item => item.indexOf('_mobile') > 0);
 				return data;
 			},
+			// 重置打印机
+			resetPrint(){
+				const _this = this;
+				clzConfirm({
+					title: '提示',
+					content: '重置打印机后就可以重新选择其它打印机,您确定重置吗?',
+					success: function(res) {
+						if (res.confirm || res.index == 0) {
+							uni.setStorageSync('vuex_lastBuleDevice','')
+							uni.showToast({
+								title: '重置成功'
+							})
+						}
+					}
+				});
+			},
 			// 切换账户
 			changeAcount(index){
 				const _this = this