From e2b07afb71e112babef573c8dad089d0a2aef5da Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期二, 07 二月 2023 16:45:05 +0800 Subject: [PATCH] # --- pages/basics/pakin.vue | 18 +++++--- pages/basics/stockQuery.vue | 2 App.vue | 55 +++++++++++++++++++++++++++ pages/index/index.vue | 12 +++--- 4 files changed, 73 insertions(+), 14 deletions(-) diff --git a/App.vue b/App.vue index 6aeb746..33ce0b1 100644 --- a/App.vue +++ b/App.vue @@ -181,6 +181,61 @@ }); complete: () => {} }, + downWgt() { + let that = this; + const downloadUrl = that.baseUrll + "/static/appupload/" + that.upVersion + ".apk" + uni.showLoading({ + title: '鏇存柊涓�︹��' + }) + // return + const downloadTask = uni.downloadFile({ //鎵ц涓嬭浇 + url: downloadUrl, //涓嬭浇鍦板潃 + timeout: 1000 * 30, //30绉掕秴鏃舵椂闂� + success: downloadResult => { //涓嬭浇鎴愬姛 + console.log(downloadResult); + that.showdownLine = false + uni.hideLoading(); + console.log('downloadResult.statusCode' + downloadResult.statusCode) + if (downloadResult.statusCode == 200) { + console.log('鏇存柊涓�') + uni.showModal({ + title: '', + content: '鏇存柊鎴愬姛锛岀‘瀹氱幇鍦ㄩ噸鍚悧锛�', + confirmText: '閲嶅惎', + confirmColor: '#EE8F57', + success: function(res) { + if (res.confirm == true) { + plus.runtime.install( //瀹夎 + downloadResult.tempFilePath, { + force: true + }, + function(res) { + utils.showToast('鏇存柊鎴愬姛锛岄噸鍚腑'); + plus.runtime.restart(); + } + ); + } + } + }); + } + }, + fail: err => { + uni.hideLoading(); + that.showdownLine = false + that.$u.toast(err.errMsg) + console.log(err) + }, + complete: com => { + console.log(com) + } + }); + + // 涓嬭浇杩涘害 + downloadTask.onProgressUpdate(res => { + that.downloadNum = res.progress + console.log('涓嬭浇杩涘害' + that.downloadNum); + }); + }, } } </script> diff --git a/pages/basics/pakin.vue b/pages/basics/pakin.vue index 6911830..483f090 100644 --- a/pages/basics/pakin.vue +++ b/pages/basics/pakin.vue @@ -98,19 +98,19 @@ <!-- 寮圭獥 --> <!-- 淇敼鏁伴噺 --> - <uni-popup ref="revise" background-color="#fff"> + <uni-popup ref="revise"> <view class="revise-box "> <view class="revise-box-top"> <view class="color-block-blue"></view> <text class="title">淇敼鎵瑰彿/鏁伴噺</text> </view> - <view class="" style="position: relative;left: 50px;margin-bottom: 20px;"> + <view class="" style="position: relative;left: 75rpx;margin-bottom: 20px;"> <text style="display: inline-block;float: left;width: 60px;">鍚堝悓鍙凤細</text> <input type="text" style="width: 100px;border-bottom: 1px solid #9e9e9e;" v-model="batch"> </view> <view class="changeBox"> <view class="num-box"> - <text style="display: inline-block;float: left;width: 60px;">鏁伴噺锛�</text> + <text style="display: inline-block;float: left;width: 90rpx;">鏁伴噺锛�</text> <uni-number-box :value="count" :step='0.01' :max="99999999" color="#747474" @change="changeValue" /> </view> </view> @@ -122,8 +122,8 @@ </view> </uni-popup> <uni-popup ref="alertDialog" type="dialog"> - <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" title="缁勬墭" content="纭鏄惁鐜板湪缁勬墭!" - @confirm="comb" @close="dialogClose"></uni-popup-dialog> + <uni-popup-dialog cancelText="鍙栨秷" confirmText="纭" title="缁勬墭" content="纭鏄惁鐜板湪缁勬墭!" + @confirm="comb" @close="close"></uni-popup-dialog> </uni-popup> </view> </template> @@ -193,6 +193,9 @@ }, comb1() { this.$refs.alertDialog.open() + }, + close() { + this.$refs.alertDialog.close() }, // 鎵樼洏鐮佹湁璇噸缃� barcodeFocuss() { @@ -515,9 +518,10 @@ @import "../../colorui/icon.css"; */ .revise-box { position: relative; - width: 500rpx; + width: 550rpx; height: 400rpx; - border-radius: 25px; + background-color: #fff; + border-radius: 15px; } .revise-box-top { diff --git a/pages/basics/stockQuery.vue b/pages/basics/stockQuery.vue index ed8f478..f2cdf98 100644 --- a/pages/basics/stockQuery.vue +++ b/pages/basics/stockQuery.vue @@ -74,7 +74,7 @@ data () { return { commonUrl:null, - matList: [{}], + matList: [], locNo: null, matnr: null diff --git a/pages/index/index.vue b/pages/index/index.vue index 121374b..1395ad9 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -72,12 +72,12 @@ // color: 'blue', // cuIcon: 'video' // }, - { - title: '搴撳瓨鐩樼偣', - name: 'stoCheck', - color: 'blue', - cuIcon: 'safe' - }, + // { + // title: '搴撳瓨鐩樼偣', + // name: 'stoCheck', + // color: 'blue', + // cuIcon: 'safe' + // }, // { // title: '骞充粨搴撳瓨鐩樼偣', // name: 'manStoCheck', -- Gitblit v1.9.1