7.15(优化华为审核
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
"name" : "滴友之家",
|
||||
"appid" : "__UNI__F2BE74F",
|
||||
"description" : "",
|
||||
"versionName" : "1.5.5",
|
||||
"versionCode" : 155,
|
||||
"versionName" : "1.5.6",
|
||||
"versionCode" : 156,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
|
||||
@@ -289,7 +289,10 @@
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getAddressFn()
|
||||
let deviceBrand=uni.getSystemInfoSync().deviceBrand
|
||||
if(deviceBrand!='huawei'){
|
||||
this.getAddressFn()
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// uni.hideTabBar();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<view class="container-title">
|
||||
头像
|
||||
</view>
|
||||
<view class="flex align-center" @click="getImage('avatar')">
|
||||
<view class="flex align-center" @click="scanQRCode('avatar')">
|
||||
<u-avatar :src="userInfo.avatar" size="30" mode="aspectFill" />
|
||||
<u-icon name="arrow-right" />
|
||||
</view>
|
||||
@@ -21,7 +21,7 @@
|
||||
<view class="container-title">
|
||||
背景图
|
||||
</view>
|
||||
<view class="flex align-center" @click="getImage('backGround')">
|
||||
<view class="flex align-center" @click="scanQRCode('backGround')">
|
||||
<u-avatar :src="userInfo.backGround" mode="aspectFill" shape="square" size="30" />
|
||||
<u-icon name="arrow-right" />
|
||||
</view>
|
||||
@@ -99,10 +99,12 @@
|
||||
<u-button type="primary" color="#13AFA8" shape="circle" @click="changeNickname">保存</u-button>
|
||||
</view>
|
||||
</u-popup>
|
||||
<yk-authpup ref="authpup" type="top" @changeAuth="getImage" permissionID="CAMERA"></yk-authpup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ykAuthpup from "@/components/yk-authpup/yk-authpup";
|
||||
import {
|
||||
getUserEdit
|
||||
} from "@/api/system/user.js"
|
||||
@@ -129,6 +131,9 @@
|
||||
sexColumns: [
|
||||
['男', '女', '未知', '保密']
|
||||
],
|
||||
//上传类型
|
||||
imageType: '',
|
||||
mobileType: {}
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
@@ -140,8 +145,20 @@
|
||||
}
|
||||
// console.log(this.userInfo);
|
||||
},
|
||||
onLoad() {
|
||||
this.mobileType = uni.getStorageSync('appDetail')
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
//上传图片
|
||||
scanQRCode(type) {
|
||||
this.imageType = type
|
||||
if (this.mobileType.platform != 'ios') {
|
||||
this.$refs['authpup'].open()
|
||||
} else {
|
||||
this.getImage()
|
||||
}
|
||||
},
|
||||
//去认证
|
||||
navAuthenticationFn(type) {
|
||||
if (type == 'wx') {
|
||||
@@ -168,23 +185,23 @@
|
||||
}
|
||||
},
|
||||
//传图片
|
||||
getImage(type) {
|
||||
this.type=type
|
||||
uni.showToast({
|
||||
title: "如需上传图片,需要授权访问相册权限,如果您拒绝开启,将无法使用上述功能",
|
||||
icon: 'none',
|
||||
duration: 8000,
|
||||
mask: true,
|
||||
position: 'top'
|
||||
});
|
||||
getImage() {
|
||||
// this.type=type
|
||||
// uni.showToast({
|
||||
// title: "如需上传图片,需要授权访问相册权限,如果您拒绝开启,将无法使用上述功能",
|
||||
// icon: 'none',
|
||||
// duration: 8000,
|
||||
// mask: true,
|
||||
// position: 'top'
|
||||
// });
|
||||
this.$util.uploadImageOne({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
dir: 'lxkimage/public/product/'
|
||||
}, null, res => {
|
||||
console.log(this.type);
|
||||
if (this.type == 'avatar') {
|
||||
console.log(this.imageType);
|
||||
if (this.imageType == 'avatar') {
|
||||
console.log('更换头像');
|
||||
this.userInfo.avatar = res.data
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user