更新版本提示框, 新增权限

This commit is contained in:
weipengfei 2024-03-30 11:04:31 +08:00
parent 4b5ffc1387
commit 4843d46b80
8 changed files with 22 additions and 13 deletions

View File

@ -2,8 +2,8 @@
"name" : "惠农生活",
"appid" : "__UNI__3A527D1",
"description" : "",
"versionName" : "2.0.16",
"versionCode" : 2016,
"versionName" : "2.0.17",
"versionCode" : 2017,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -1093,7 +1093,12 @@
})
}
},
uploadImg() {
async uploadImg() {
// #ifdef APP-PLUS
let result = await this.$store.dispatch("permission/requestPermissions",
'CAMERA')
if (result !== 1) return;
// #endif
let self = this
self.$util.uploadImageOne('upload/image', function(res) {
if (res.status == 200) {

View File

@ -557,9 +557,9 @@
that.windowHeight = res.windowHeight;
}
});
this.$store.dispatch('INIT_CONFIG');
})
that.pageLoad(options);
this.$store.dispatch('INIT_CONFIG');
},
created(options) {
let routes = getCurrentPages(); //
@ -608,7 +608,6 @@
uni.reLaunch({
url: "/pages/index/index"
});
}, 50)
// #endif
},
@ -681,7 +680,7 @@
success: res => {
this.errorNetwork = res.networkType === 'none';
if (!this.errorNetwork) {
this.pageLoad(this._options);
this.pageLoad(this._options);
} else {
// uni.stopPullDownRefresh();
that.overflow = false;

View File

@ -173,7 +173,12 @@
* 上传文件
*
*/
uploadpic: function() {
uploadpic: async function() {
// #ifdef APP-PLUS
let result = await this.$store.dispatch("permission/requestPermissions",
'CAMERA')
if (result !== 1) return;
// #endif
let that = this;
that.$util.uploadImageOne('upload/image', function(res) {
console.log(res, '回调')

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@ -231,7 +231,7 @@
position: absolute;
top: 36%;
left: 24%;
background-color: #e54139;
background-color: #40ae36;
color: #fff;
font-size: 26rpx;
line-height: 26rpx;
@ -241,7 +241,7 @@
}
.title {
background-color: #ff6d20;
background-color: #40ae36;
color: #fff;
display: inline-block;
margin-top: 12rpx;
@ -263,7 +263,7 @@
.button {
margin: 20rpx 30rpx;
background-color: #ff6d20;
background-color: #40ae36;
color: #fff;
font-size: 30rpx;
text-align: center;
@ -306,7 +306,7 @@
.bar {
flex: 1;
height: 100%;
background-color: #e84116;
background-color: #40ae36;
border-top-left-radius: 5rpx;
border-bottom-left-radius: 5rpx;
}
@ -319,7 +319,7 @@
position: absolute;
top: -34rpx;
left: -50%;
color: #e84116;
color: #40ae36;
font-size: 24rpx;
font-weight: 500;
}
@ -327,7 +327,7 @@
.circle {
width: 12rpx;
height: 12rpx;
border: 6rpx solid #e84116;
border: 6rpx solid #40ae36;
border-radius: 50%;
background-color: #fff;
}