Преглед изворни кода

计件宝声音改成网页播放

zh пре 10 месеци
родитељ
комит
aa53c63dac
1 измењених фајлова са 39 додато и 0 уклоњено
  1. 39 0
      src/views/piece/dashboard/index.vue

+ 39 - 0
src/views/piece/dashboard/index.vue

@@ -103,7 +103,44 @@
     </van-col>
   </van-row>
   <van-button class="add" icon="setting-o" type="primary" @click="_openSetting" />
+  <van-sticky>
+    <van-dialog
+      v-model:show="setting.show"
+      title="设置"
+      class="setting-dialog"
+      show-cancel-button
+      :before-close="_verifyMac"
+      @confirm="_saveMac"
+      @closed="_closeSetting"
+      width="380px">
+
+      <van-notice-bar
+        wrapable
+        left-icon="volume-o"
+        :scrollable="false"
+        :text="hintMessage"
+      />
+
+      <van-cell-group inset>
+        <van-field
+          v-model="setting.mac"
+          label="MAC地址"
+          placeholder="请输入MAC地址"
+        />
+        <van-field
+          v-model="setting.password"
+          type="password"
+          label="密码"
+          placeholder="设置密码"
+        />
+      </van-cell-group>
 
+      <van-notice-bar color="#1989fa" background="#ecf9ff" @click="checkUpdate"
+                      style="font-size: 16px; padding-left: 10px" left-icon="info-o">
+        版本号:{{ versionName }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(点击检查更新)
+      </van-notice-bar>
+    </van-dialog>
+  </van-sticky>
   <audio ref="errorAudio" controls hidden="true"  :src="errorPath" />
   <audio ref="tipAudio" controls hidden="true"  :src="tipPath" />
   <audio ref="repeatAudio" controls hidden="true"  :src="repeatPath" />
@@ -488,6 +525,7 @@ const _rePush = (item) => {
 const getUserName = (userId) => {
   getUserNameById(userId, mac.value).then(res => {
     if (res && res.data) {
+      scanSuccess()
       saveUserId(userInfo.value.userId)
       userInfo.value.name = res.data
       showNotify({ type: 'success', style: 'font-size: 30px !important;height:50px', message: '登录成功!' })
@@ -832,6 +870,7 @@ span
   .van-cell__title
     flex: 0 0 30px !important
     font-size: 10px
+    line-height: 24px
     max-width: 70px
     min-width: 70px
   .van-cell__value