Commit 0668d7ce authored by xinzhedeai's avatar xinzhedeai

add:鸿蒙判断工具方法,整改图片删除,整改日期下拉15,30

parent e471aeba
......@@ -341,6 +341,12 @@ gemhoUtil.isIOSStrict = function() {
}
gemhoUtil.isHarmonyOS = function() {
const userAgent = navigator.userAgent.toLowerCase();
const isHarmonyOS = /harmonyos|harmony|hmos/.test(userAgent);
return isHarmonyOS;
}
gemhoUtil.validateChineseName = function(name) {
const regex = /^(?:[\u4E00-\u9FA5\u3007\u3400-\u4DBF\uF900-\uFAFF]|[\uD840-\uD87F][\uDC00-\uDFFD])+(?:·(?:[\u4E00-\u9FA5\u3007\u3400-\u4DBF\uF900-\uFAFF]|[\uD840-\uD87F][\uDC00-\uDFFD])+)*$/;
......
......@@ -154,12 +154,17 @@ window.addEventListener("load", function () {
return
}
if(gemhoUtil.isIOSStrict()){ // 如果是苹果手机,预览pdf直接调转
if(!gemhoUtil.isIOSStrict()){ // 如果是苹果手机,预览pdf直接调转
location.href = this.detailInfo.file
return
}
if(!gemhoUtil.isHarmonyOS()){ // 如果是鸿蒙手机,预览pdf直接调转
location.href = this.detailInfo.file
return
}
vant.Toast.loading({
message: '正在加载...',
forbidClick: true,
......
......@@ -232,7 +232,7 @@
<img :src="previewUrl + imgItem" style="width: 1.6rem; height: 1.6rem;"
@click="showImage4camera(item.photos, index)" />
<div class="van-uploader__preview-delete"
@click="handleDeleteFloorPlan(item, index)"><i
@click="handleDeleteFloorPlan(item,index)"><i
class="van-icon van-icon-cross van-uploader__preview-delete-icon"></i></div>
</div>
<div v-if="item.photos.length < 4">
......
......@@ -238,7 +238,7 @@ window.onload = function () {
});
},
// 处理平面图删除
handleDeleteFloorPlan(item, type) {
handleDeleteFloorPlan(item, index) {
item.photos.splice(index, 1);
},
paizhao(item) {
......
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