Commit 966e0069 authored by Mac's avatar Mac

1

parent 5ce8e94a
......@@ -7,7 +7,7 @@
<q-separator />
<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"
@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()"
label="小程序路径" style="margin-top: 20px;" />
<div style="display: flex;align-items: center;margin: 10px 0 ;">
......@@ -179,6 +179,10 @@
this.getImgChoice = true;
},
SelectId(obj) {
if(this.msg.type==2){
this.msg.imgUrl = obj[0].ImageUrl;
this.getImgChoice = false;
}else{
this.getNaturalImgSize(obj[0].ImageUrl, k => {//获取图片比例
let qualified = k.qualified
if (qualified == true) {
......@@ -192,6 +196,8 @@
})
}
})
}
},
getNaturalImgSize(img_url, callback) {
......@@ -201,12 +207,12 @@
img.onload = function () {
// 打印
let qualified = false
// if (Number(img.height) / img.width == 0.8) {
// qualified = true
// }
if (img.width == 1080 && img.height==864) {
if (Number(img.height) / img.width == 0.8) {
qualified = true
}
// if (img.width == 1080 && img.height==864) {
// qualified = true
// }
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