Commit b4466495 authored by zhangyanni's avatar zhangyanni

需求报错

parent 349c05bc
This diff is collapsed.
import EXIF from 'exif-js'
export default {
getOrientation: (file) => {
return new Promise((resolve) => {
EXIF.getData(file, function () {
const orient = EXIF.getTag(this, 'Orientation')
resolve(orient)
})
})
},
dataURLtoFile: (dataurl, filename) => {
const arr = dataurl.split(',')
const mime = arr[0].match(/:(.*?);/)[1]
const bstr = atob(arr[1])
let n = bstr.length
let u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = bstr.charCodeAt(n);
}
return new File([u8arr], filename, {type: mime});
},
rotateImage: (image, width, height) => {
let canvas = document.createElement('canvas')
let ctx = canvas.getContext('2d')
ctx.save()
canvas.width = height
canvas.height = width
ctx.rotate(90 * Math.PI / 180)
ctx.drawImage(image, 0, -height)
ctx.restore()
return canvas.toDataURL("image/jpeg")
},
}
\ No newline at end of file
This diff is collapsed.
......@@ -13,8 +13,7 @@
<page-left v-show="isLeftShow" :documentFront="documentFront" :pathfrom="pathfrom"></page-left>
</div>
<div class="loginformWrap" :style="{height:visible?'calc(100vh - 2.2rem)':'calc(100vh - 1rem)'}"
v-if="isMobile==1">
<div class="loginformWrap" :style="{height:visible?'calc(100vh - 2.2rem)':'calc(100vh - 1rem)'}" v-if="isMobile==1">
<router-view></router-view>
</div>
<div class="page-content popper-boundaries" v-if="isMobile==0&&!isLeftShow">
......
......@@ -120,7 +120,8 @@
pathfrom: "",
configVal:{},
shareVisible:false,//分享弹框
dialogVisible:false
dialogVisible:false,
lang: this.publicFun.getCookie("language") == "zh-CN" ? 1 : 2,
}
},
methods: {
......@@ -129,7 +130,7 @@
api.getCompanyInfoById(data).then((res) => {
if (res.code == 0) {
this.companyInfo = res.result;
if(this.$i18n.locale&&this.$i18n.locale=="en"){
if(this.lang==2){
this.handleTrans(true);
}
} else {
......@@ -247,8 +248,8 @@
};
let params = {
cacheType:"demandDetails",
from:this.$i18n.locale&&this.$i18n.locale=="zh-CN"?'en':'zh',
to:this.$i18n.locale&&this.$i18n.locale=="zh-CN"?'zh':'en',
from:this.lang==1?'en':'zh',
to:this.lang==1?'zh':'en',
transType:"baidu",
detailId:this.$route.query.id,
isHideInfo:this.companyInfo.isHideInfo,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment