头像裁切
This commit is contained in:
@@ -509,6 +509,9 @@
|
||||
<a-modal v-model:visible="huobi" :footer="null" :title="lan.$t('tishi')" >
|
||||
<p>{{lan.$t('huobitishi')}}</p>
|
||||
</a-modal>
|
||||
<a-modal v-model:visible="touxiang" width="6rem" :footer="null">
|
||||
<imghead @upload="imgupload" v-if="touxiang" :url="imgfire"></imghead>
|
||||
</a-modal>
|
||||
<nav-bottom></nav-bottom>
|
||||
</div>
|
||||
</template>
|
||||
@@ -530,6 +533,7 @@ import { uploadflie } from "@/utils/vod";
|
||||
import store from "@/store";
|
||||
import smile from "@/static/images/smile.png";
|
||||
import smilet from "@/static/images/smilet.png";
|
||||
import imghead from "@/components/imghead.vue"
|
||||
import {
|
||||
changetel,
|
||||
checksmscode,
|
||||
@@ -556,10 +560,12 @@ export default defineComponent({
|
||||
UserOutlined,
|
||||
PlaySquareOutlined,
|
||||
NavBottom,
|
||||
imghead
|
||||
},
|
||||
setup() {
|
||||
let issum = true;
|
||||
const lan: any = useI18n();
|
||||
const touxiang = ref(false);
|
||||
interface SpeakItem {
|
||||
lang: string;
|
||||
proficiency: number;
|
||||
@@ -996,17 +1002,27 @@ export default defineComponent({
|
||||
userinfo.value.currencyValue = e;
|
||||
// editsystemsetting({currency:e})
|
||||
}
|
||||
const imgfire = ref<any>()
|
||||
async function uploadspic(file: AntUpload) {
|
||||
const res = await uploadflie(file.file, (info: any) => {
|
||||
console.log(info);
|
||||
// uploadpicprogress.value = info.percent.toFixed(2) * 100;
|
||||
});
|
||||
console.log(res);
|
||||
// const res = await uploadflie(file.file, (info: any) => {
|
||||
// console.log(info);
|
||||
// // uploadpicprogress.value = info.percent.toFixed(2) * 100;
|
||||
// });
|
||||
// console.log(res);
|
||||
|
||||
// picinfo.fileId=res.fileId
|
||||
// picinfo.url=res.video.url
|
||||
// // picinfo.fileId=res.fileId
|
||||
// // picinfo.url=res.video.url
|
||||
// formData.value.img = res.video.url;
|
||||
// setheadimg(res.video.url);
|
||||
console.log(file.file)
|
||||
imgfire.value = file.file;
|
||||
touxiang.value = true;
|
||||
|
||||
}
|
||||
function imgupload(res: any){
|
||||
formData.value.img = res.video.url;
|
||||
setheadimg(res.video.url);
|
||||
touxiang.value = false;
|
||||
}
|
||||
|
||||
// function beforeVideoUpload(file: any){
|
||||
@@ -1081,7 +1097,10 @@ export default defineComponent({
|
||||
video,
|
||||
imgs,
|
||||
mrqh,
|
||||
huobi
|
||||
huobi,
|
||||
touxiang,
|
||||
imgfire,
|
||||
imgupload
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user