Commit 966e0069 authored by Mac's avatar Mac

1

parent 5ce8e94a
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<q-separator /> <q-separator />
<q-card-section class="q-pt-none" style="margin-top: 15px;"> <q-card-section class="q-pt-none" style="margin-top: 15px;">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="msg.AppletId" <q-select filled stack-label option-value="Id" option-label="Name" v-model="msg.AppletId"
@input="getroute" ref="ID" :options="AppletList" label="分组" :dense="false" emit-value map-options /> @input="getroute" ref="ID" :options="AppletList" label="选择小程序" :dense="false" emit-value map-options />
<q-input clearable standout="bg-primary text-white" v-model="msg.route" @input="$forceUpdate()" <q-input clearable standout="bg-primary text-white" v-model="msg.route" @input="$forceUpdate()"
label="小程序路径" style="margin-top: 20px;" /> label="小程序路径" style="margin-top: 20px;" />
<div style="display: flex;align-items: center;margin: 10px 0 ;"> <div style="display: flex;align-items: center;margin: 10px 0 ;">
...@@ -179,19 +179,25 @@ ...@@ -179,19 +179,25 @@
this.getImgChoice = true; this.getImgChoice = true;
}, },
SelectId(obj) { SelectId(obj) {
this.getNaturalImgSize(obj[0].ImageUrl, k => {//获取图片比例 if(this.msg.type==2){
let qualified = k.qualified this.msg.imgUrl = obj[0].ImageUrl;
if (qualified == true) { this.getImgChoice = false;
this.msg.imgUrl = obj[0].ImageUrl; }else{
this.getImgChoice = false; this.getNaturalImgSize(obj[0].ImageUrl, k => {//获取图片比例
} else { let qualified = k.qualified
this.$q.notify({ if (qualified == true) {
type: 'negative', this.msg.imgUrl = obj[0].ImageUrl;
message: `请上传图片尺寸为1080*864像素,`, this.getImgChoice = false;
position: 'top' } else {
}) this.$q.notify({
} type: 'negative',
}) message: `请上传图片尺寸为1080*864像素,`,
position: 'top'
})
}
})
}
}, },
getNaturalImgSize(img_url, callback) { getNaturalImgSize(img_url, callback) {
...@@ -201,12 +207,12 @@ ...@@ -201,12 +207,12 @@
img.onload = function () { img.onload = function () {
// 打印 // 打印
let qualified = false let qualified = false
// if (Number(img.height) / img.width == 0.8) { if (Number(img.height) / img.width == 0.8) {
// qualified = true
// }
if (img.width == 1080 && img.height==864) {
qualified = true qualified = true
} }
// if (img.width == 1080 && img.height==864) {
// qualified = true
// }
callback({ qualified: qualified }) callback({ qualified: qualified })
}; };
......
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