| | |
| | | </view> |
| | | <view class="userinfo-value-box"> |
| | | <view class="user-nickname">{{ vuex_is_login ? vuex_user :'昵称' }}</view> |
| | | <view class="user-nickname">{{ vuex_is_login ? company :'昵称' }}</view> |
| | | <view class="user-nickname">{{ vuex_is_login ? company :'公司' }}</view> |
| | | <!-- <view class="user-company">{{ vuex_is_login ? usercode :'暂未登录' }}</view> --> |
| | | </view> |
| | | </view> |
| | | <view style="margin:0 15px;margin-top:20px;"> |
| | | <u-notice-bar v-if="text1.length!=0" mode="closable" direction="row" step :text="text1">{{text1}}</u-notice-bar> |
| | | <u-notice-bar v-if="text1.length!=0" mode="closable" direction="row" step |
| | | :text="text1">{{text1}}</u-notice-bar> |
| | | <u-cell-group> |
| | | <u-cell size="large" icon="level" title="当前版本" :value="appversion" isLink @click="update"> |
| | | </u-cell> |
| | |
| | | <u-switch slot="value" v-model="isoffline" @change="changelixian"></u-switch></u-cell> |
| | | <u-cell size="large" icon="../../static/my/3wei.png" title="显示3维"> |
| | | <u-switch slot="value" v-model="is3wei" @change="change3wei"></u-switch></u-cell> |
| | | <u-cell size="large" icon="../../static/my/ceju.png" title="寻物防丢"> |
| | | <u-switch slot="value" v-model="isceju" @change="changeceju"></u-switch></u-cell> |
| | | </u-cell-group> |
| | | <image v-if="imageSrc" :src="imageSrc" mode="aspectFit"></image> |
| | | </view> |
| | |
| | | <u-icon name="close" style="position: absolute;right: 10px;top:10px" @click="closemodal"></u-icon> |
| | | <uni-data-select style="position: absolute; width: 85%;" placeholder="选择柜子" v-model="value" |
| | | :localdata="guizi" @change="change"></uni-data-select> |
| | | <uni-grid style="margin-top: 50px;margin-bottom: 120px;" v-if="isguizi" :column="3" :highlight="true"> |
| | | <uni-grid style="margin-top: 50px;" v-if="isguizi" :column="3" :highlight="true"> |
| | | <view v-for="(locker,index) in lockers" :key="index"> |
| | | <uni-grid-item v-for="(item, index) in locker" :index="index" :key="index" |
| | | style="height: 20px; padding:0"> |
| | |
| | | <u-modal :show="show" :title="title" @cancel="cancel" @confirm="confirm" ref="uModal" :showCancelButton="true" |
| | | :content='content'></u-modal> |
| | | <successCom ref="refSuccess"></successCom> |
| | | |
| | | <!-- <bleCom></bleCom> --> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | // const content = require('./content') |
| | | const http = uni.$u.http |
| | | |
| | | import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'; |
| | | var url = http.config.baseURL.split(":")[0] + ":" + http.config.baseURL.split(":")[1] |
| | | import successCom from '@/components/success.vue' |
| | | import { |
| | |
| | | get_time_cha_s |
| | | } from '@/js/tools.js' |
| | | import store from '@/store/index.js' |
| | | import bleCom from './ble.vue'; |
| | | import linkCom from '@/components/linkBox.vue' |
| | | import { |
| | | updateBaseURL |
| | |
| | | export default { |
| | | mixins: [pagesPerson, minLogin], |
| | | components: { |
| | | bleCom, |
| | | successCom, |
| | | linkCom |
| | | }, |
| | |
| | | tag: '', |
| | | value: 0, |
| | | guizi: [], |
| | | appversion: 'v1.0.7', |
| | | appversion: 'v1.1.0', |
| | | downloadUrl: '', |
| | | text1: [], |
| | | isguizi: false, |
| | |
| | | }, |
| | | mounted() { |
| | | this.lunbo() |
| | | if (this.vuex_is_login) { |
| | | findFakagui().then((res) => { |
| | | if (res.code == 0) { |
| | | this.guizi = res.data.map(item => ({ |
| | |
| | | })); |
| | | } |
| | | }) |
| | | |
| | | } |
| | | setTimeout(() => { |
| | | this.paddingTop = this.vuex_padding_top |
| | | this.paddingTop += 5 |
| | |
| | | }, |
| | | methods: { |
| | | lunbo() { |
| | | // const params = { |
| | | // name: '定位app', |
| | | // // deviceid: this.value, |
| | | // } |
| | | if (this.vuex_is_login) { |
| | | findTbUpapp().then((res) => { |
| | | console.log(res); |
| | | if (res.code == 0) { |
| | | if (this.appversion != res.data.version) { |
| | | for (var i = 0; i < res.data.info.split(",").length; i++) { |
| | |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | change(e) { |
| | | if (this.value != 0) { |
| | |
| | | const params = { |
| | | deviceid: this.value, |
| | | } |
| | | if (this.vuex_is_login) { |
| | | findFakaji(params).then((res) => { |
| | | |
| | | if (res.data != 0) { |
| | |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | this.isguizi = false |
| | | this.this.kalist = [] |
| | | } |
| | | }, |
| | | update() { |
| | | if (this.info == '') { |
| | | if (this.info == undefined) { |
| | | this.$refs.refSuccess.showBox({ |
| | | type: 'error', |
| | | txt: '未检测到新版本' |
| | | }); |
| | | } else { |
| | | console.log("更新版本========》》》》》》》》"); |
| | | // const downloadUrl = 'http://39.106.210.13:8081/version/latest.apk'; // 替换为实际的下载链接 |
| | | console.log(this.downloadUrl); |
| | | uni.showLoading({ |
| | | title: '正在下载' |
| | | }); |
| | | |
| | | uni.downloadFile({ |
| | | url: this.downloadUrl, |
| | | header: { |
| | |
| | | uni.openDocument({ |
| | | filePath: res.tempFilePath, |
| | | showMenu: true, |
| | | success: () => { |
| | | console.log('文件打开成功'); |
| | | }, |
| | | success: () => {}, |
| | | fail: (err) => { |
| | | console.error('文件打开失败', err); |
| | | uni.showToast({ |
| | | title: '文件打开失败', |
| | | icon: 'none' |
| | |
| | | this.model2.userInfo.yzm = '' |
| | | }, |
| | | check1(rowIndex) { |
| | | console.log("取卡===》》》》》》"); |
| | | // 遍历每个子数组 |
| | | if (this.rowindex != 0) { |
| | | for (let i = 0; i < this.lockers.length; i++) { //3 |
| | |
| | | slotnumber: this.rowindex, |
| | | deviceid: this.value, |
| | | } |
| | | if (this.vuex_is_login) { |
| | | findFakaTag(params).then((res) => { |
| | | this.tag = res.data.tagid |
| | | }) |
| | | } |
| | | }, |
| | | faka() { |
| | | console.log("发卡====》》》》》》》》》"); |
| | | this.showfaka = true |
| | | |
| | | }, |
| | |
| | | // }, |
| | | timeout: 5000, //设置超时时间,默认5秒 |
| | | success: (rep) => { //具体捕获请看自己接口返回的形式 |
| | | console.log(rep); |
| | | if (rep.data > 0) { |
| | | |
| | | for (var i = 0; i < this.kalist.length; i++) { |
| | |
| | | slotnumber: this.kalist[i], |
| | | deviceid: this.value, |
| | | } |
| | | |
| | | if (this.vuex_is_login) { |
| | | undateFaka(params).then((res) => { |
| | | console.log(res); |
| | | if (res.data > 0) { |
| | | this.$refs.refSuccess.showBox({ |
| | | type: 'success', |
| | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | }, |
| | | fail(error) { |
| | | console.log(error); |
| | | // uni.hideLoading(); |
| | | // uni.$u.toast('网络不通'); |
| | | // reject(error) |
| | |
| | | |
| | | |
| | | data.tagid = this.tag |
| | | // data.slotnumber = cabinet.slotNumber; |
| | | // const deviceid = cabinet.deviceId; |
| | | // const tagname = sessionStorage.getItem("username"); |
| | | // const tagid = cabinet.tagid; |
| | | |
| | | console.log(data); |
| | | var method = 'POST' |
| | | var contentType = 'application/x-www-form-urlencoded' |
| | | uni.request({ |
| | |
| | | // }, |
| | | timeout: 5000, //设置超时时间,默认5秒 |
| | | success: (rep) => { //具体捕获请看自己接口返回的形式 |
| | | console.log(rep); |
| | | if (rep.data > 0) { |
| | | const params = { |
| | | slotnumber: this.rowindex, |
| | | deviceid: this.value, |
| | | } |
| | | if (this.vuex_is_login) { |
| | | undateFaka(params).then((res) => { |
| | | console.log(res); |
| | | if (res.data > 0) { |
| | | this.$refs.refSuccess.showBox({ |
| | | type: 'success', |
| | |
| | | }); |
| | | } |
| | | }) |
| | | |
| | | } |
| | | } |
| | | }, |
| | | fail(error) {}, |
| | |
| | | |
| | | } |
| | | }, |
| | | groupChange(n) { |
| | | console.log('groupChange', n); |
| | | }, |
| | | groupChange(n) {}, |
| | | radioChange(n) { |
| | | if (n == "固定卡") { |
| | | this.tagshow = true |
| | |
| | | title: '正在获取验证码' |
| | | }) |
| | | this.yzm = this.generateRandomCode(); |
| | | console.log(this.yzm); |
| | | const params = { |
| | | phone: this.model2.userInfo.phone, |
| | | randomNumber: this.yzm, |
| | | } |
| | | if (this.vuex_is_login) { |
| | | sms(params).then((res) => { |
| | | uni.hideLoading(); |
| | | // 这里此提示会被this.start()方法中的提示覆盖 |
| | |
| | | // 通知验证码组件内部开始倒计时 |
| | | this.$refs.uCode.start(); |
| | | }) |
| | | } |
| | | } else { |
| | | uni.$u.toast('倒计时结束后再发送'); |
| | | } |
| | |
| | | title: '正在获取验证码' |
| | | }) |
| | | this.yzm = this.generateRandomCode(); |
| | | console.log(this.yzm); |
| | | const params = { |
| | | phone: this.model1.userInfo.phone, |
| | | randomNumber: this.yzm, |
| | | } |
| | | if (this.vuex_is_login) { |
| | | sms(params).then((res) => { |
| | | uni.hideLoading(); |
| | | // 这里此提示会被this.start()方法中的提示覆盖 |
| | |
| | | this.$refs.uCode.start(); |
| | | |
| | | }) |
| | | } |
| | | } else { |
| | | uni.$u.toast('倒计时结束后再发送'); |
| | | } |
| | |
| | | value: e |
| | | }) |
| | | }, |
| | | changeceju(e) { |
| | | console.log(e); |
| | | // checkUpdate() |
| | | if (e==true) { |
| | | uni.reLaunch({ |
| | | url: '/pages/index/ble' |
| | | }); |
| | | }else{ |
| | | // closeBle() { //关闭蓝牙 |
| | | uni.closeBLEConnection({ |
| | | deviceId: this.GET_CONNECT_DEVICEId, |
| | | success(res) { |
| | | store.commit('$tStore', { |
| | | name: 'GET_CONNECT_DEVICEId', |
| | | value: "" |
| | | }) |
| | | store.commit('$tStore', { |
| | | name: 'GET_BLE_DATA', |
| | | value: '请先连接蓝牙' |
| | | }) |
| | | store.commit('$tStore', { |
| | | name: 'isceju', |
| | | value: false |
| | | }) |
| | | } |
| | | }) |
| | | // }, |
| | | } |
| | | |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | cancelinfo() { |
| | |
| | | baoliu38: this.model1.userInfo.images, |
| | | ptagid: this.model1.userInfo.tagId, |
| | | } |
| | | console.log(params); |
| | | var method = 'POST' |
| | | var contentType = 'application/x-www-form-urlencoded' |
| | | uni.request({ |
| | |
| | | // }, |
| | | timeout: 5000, //设置超时时间,默认5秒 |
| | | success: (rep) => { //具体捕获请看自己接口返回的形式 |
| | | console.log(rep); |
| | | if (rep.data > 0) { |
| | | this.model1.userInfo.phone='' |
| | | this.model1.userInfo.name='' |
| | |
| | | uni.hideLoading(); |
| | | } |
| | | }); |
| | | // updateTagApi(params).then((res) => { |
| | | // console.log(res); |
| | | // }) |
| | | this.showinfo = false |
| | | }).catch(errors => { |
| | | uni.$u.toast('校验失败', errors) |
| | |
| | | submitForm() { |
| | | // 更新 baseURL |
| | | updateBaseURL("http://" + this.form.url + ':' + this.form.port); // 调用 updateBaseURL 函数 |
| | | if (this.vuex_is_login) { |
| | | earlyWarning().then((res) => { |
| | | if (res.code == 0) { |
| | | this.$refs.refSuccess.showBox({ |
| | |
| | | this.form.url = '' |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | camera() { |
| | | this.showinfo = true |
| | |
| | | plus.push.createMessage(content, payload, options); |
| | | |
| | | uni.getPushClientId({ |
| | | success: (res) => { |
| | | console.log(res.cid); |
| | | }, |
| | | fail(err) { |
| | | console.log(err) |
| | | } |
| | | success: (res) => {}, |
| | | fail(err) {} |
| | | }); |
| | | }, |
| | | cancel() { |