Commit 0668d7ce authored by xinzhedeai's avatar xinzhedeai

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

parent e471aeba
...@@ -341,6 +341,12 @@ gemhoUtil.isIOSStrict = function() { ...@@ -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) { 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])+)*$/; 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,11 +154,16 @@ window.addEventListener("load", function () { ...@@ -154,11 +154,16 @@ window.addEventListener("load", function () {
return return
} }
if(gemhoUtil.isIOSStrict()){ // 如果是苹果手机,预览pdf直接调转 if(!gemhoUtil.isIOSStrict()){ // 如果是苹果手机,预览pdf直接调转
location.href = this.detailInfo.file location.href = this.detailInfo.file
return return
} }
if(!gemhoUtil.isHarmonyOS()){ // 如果是鸿蒙手机,预览pdf直接调转
location.href = this.detailInfo.file
return
}
vant.Toast.loading({ vant.Toast.loading({
message: '正在加载...', message: '正在加载...',
......
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
<img :src="previewUrl + imgItem" style="width: 1.6rem; height: 1.6rem;" <img :src="previewUrl + imgItem" style="width: 1.6rem; height: 1.6rem;"
@click="showImage4camera(item.photos, index)" /> @click="showImage4camera(item.photos, index)" />
<div class="van-uploader__preview-delete" <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> class="van-icon van-icon-cross van-uploader__preview-delete-icon"></i></div>
</div> </div>
<div v-if="item.photos.length < 4"> <div v-if="item.photos.length < 4">
......
...@@ -238,7 +238,7 @@ window.onload = function () { ...@@ -238,7 +238,7 @@ window.onload = function () {
}); });
}, },
// 处理平面图删除 // 处理平面图删除
handleDeleteFloorPlan(item, type) { handleDeleteFloorPlan(item, index) {
item.photos.splice(index, 1); item.photos.splice(index, 1);
}, },
paizhao(item) { 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