|
|
@@ -3,9 +3,9 @@
|
|
|
<!-- 导航区域 -->
|
|
|
<customNavbarVue title="个人信息" :show-back-btn="true" @back="handleBack"></customNavbarVue>
|
|
|
<!-- 头像 -->
|
|
|
- <view class="user-img-box">
|
|
|
+ <view class="user-img-box" @click="openFilePicker">
|
|
|
<view class="user-title">头像</view>
|
|
|
- <uni-file-picker return-type="object" v-model="data.images" :del-icon="false" mode="grid" disable-preview :auto-upload="false"
|
|
|
+ <uni-file-picker ref="filePicker" return-type="object" v-model="data.images" :del-icon="false" mode="grid" disable-preview :auto-upload="false"
|
|
|
@select="handleSelect" file-mediatype="image" class="phone-file-picker user-file-picker">
|
|
|
</uni-file-picker>
|
|
|
<icon class="user-jt-icon" :style="{ backgroundImage: 'url(' + data.jtIcon + ')' }"></icon>
|
|
|
@@ -50,6 +50,7 @@
|
|
|
import {ref,reactive} from "vue"
|
|
|
import {onLoad} from "@dcloudio/uni-app"
|
|
|
import cacheManager from '@/utils/cacheManager.js';
|
|
|
+ const filePicker = ref(null)
|
|
|
const defaultImage1 = ref({
|
|
|
url:'', extname: 'png', name: 'moren.png'
|
|
|
})
|
|
|
@@ -78,6 +79,10 @@
|
|
|
defaultImage1.url= cacheManager.get('projectImg').user_default_img;
|
|
|
initPage();
|
|
|
})
|
|
|
+
|
|
|
+ function openFilePicker(){
|
|
|
+ filePicker.value.upload()
|
|
|
+ }
|
|
|
|
|
|
function handleSelect(e) {
|
|
|
console.log('eee',e)
|