究极更新

This commit is contained in:
lxz 2024-01-09 18:17:29 +08:00
parent 0813c46109
commit 38881b3947
6 changed files with 16 additions and 26 deletions

View File

@ -2,8 +2,8 @@
"name": "种植溯源", "name": "种植溯源",
"appid": "__UNI__D087881", "appid": "__UNI__D087881",
"description": "", "description": "",
"versionName": "1.0.4", "versionName": "1.0.7",
"versionCode": 104, "versionCode": 107,
"transformPx": false, "transformPx": false,
/* 5+App */ /* 5+App */
"app-plus": { "app-plus": {

View File

@ -42,7 +42,7 @@
<view class="get-code" :style="{color: countDown?'#ADADAD':''}" @click="getCode"><text <view class="get-code" :style="{color: countDown?'#ADADAD':''}" @click="getCode"><text
class="lineY"></text> class="lineY"></text>
获取验证码 <text v-if='countDown'>{{countDown}}s</text> </view> 验证码 <text v-if='countDown'>{{countDown}}s</text> </view>
</view> </view>
<view class="" style="margin: 30rpx 0;"> <view class="" style="margin: 30rpx 0;">

View File

@ -32,7 +32,7 @@
shwovideo: false, shwovideo: false,
shwovideoTimer: "", shwovideoTimer: "",
initFailTimer: "", initFailTimer: "",
flag: true flag: true,
} }
}, },
@ -49,7 +49,7 @@
scene: 'app', scene: 'app',
} }
this.openScoket(data) this.openScoket(data)
this.canplay(option.device) // this.canplay(option.device)
this.platform = uni.getSystemInfoSync().platform this.platform = uni.getSystemInfoSync().platform
this.windowWidth = uni.getSystemInfoSync().screenWidth // this.windowWidth = uni.getSystemInfoSync().screenWidth //
this.boxStyle.width = this.windowWidth + 'px' //px this.boxStyle.width = this.windowWidth + 'px' //px
@ -95,22 +95,7 @@
} }
}, },
plusDownloader(url, options = {}) {
return new Promise((result, reject) => {
let dtask = plus.downloader.createDownload(url, options, function(d, status) {
if (status == 200) {
console.log("Download success: " + JSON.stringify(d));
plus.runtime.openFile(d.filename, (err) => {
console.log(err);
});
} else {
console.log("Download failed: " + status);
}
});
dtask.start();
})
},
// base64 // base64
receiveImg(data) { receiveImg(data) {
@ -134,16 +119,21 @@
this.vsrc = options; this.vsrc = options;
}, },
openScoket(scoketData) { openScoket(scoketData) {
let that = this
uni.connectSocket({ uni.connectSocket({
url: 'wss://iot.lihaink.cn/test' url: 'wss://iot.lihaink.cn/test'
}); });
uni.onSocketOpen(function(res) { uni.onSocketOpen(function(res) {
console.log("scoket open")
uni.sendSocketMessage({ uni.sendSocketMessage({
data: JSON.stringify(scoketData) data: JSON.stringify(scoketData)
}); });
uni.onSocketMessage(function(res) { uni.onSocketMessage(function(res) {
console.log(res); console.log(JSON.parse(res.data).code, "收到消息")
if (JSON.parse(res.data).code == 200) {
that.shwovideo = true
}
}); });
}); });
uni.onSocketError(function(res) { uni.onSocketError(function(res) {

View File

@ -2,7 +2,7 @@
<view id="subNvue"> <view id="subNvue">
<view class="" style="background-color: white;width: 750rpx;height:1000px;position: relative;"> <view class="" style="background-color: white;width: 750rpx;height:1000px;position: relative;">
<view class="" style="margin-top: 350px;"> <view class="" style="margin-top: 350px;">
<u-loading-icon mode="semicircle" text="疯狂加载中..." textSize="18"></u-loading-icon> <u-loading-icon mode="semicircle" text="初始化中,请稍等..." textSize="18"></u-loading-icon>
</view> </view>
</view> </view>

File diff suppressed because one or more lines are too long

View File

@ -7,8 +7,8 @@
"id": "__UNI__D087881", "id": "__UNI__D087881",
"name": "种植溯源", "name": "种植溯源",
"version": { "version": {
"name": "1.0.4", "name": "1.0.7",
"code": 104 "code": 107
}, },
"description": "", "description": "",
"developer": { "developer": {