mirror of
https://gitee.com/niucloud-team/niucloud.git
synced 2025-12-10 17:22:47 +00:00
fix uni-app
This commit is contained in:
parent
231f476a6f
commit
e879cf0b7a
@ -1,137 +1,141 @@
|
||||
<template>
|
||||
<view class="diy-group" id="componentList">
|
||||
<top-tabbar v-if="data.global && Object.keys(data.global).length && data.global.topStatusBar && data.global.topStatusBar.isShow"
|
||||
:scrollBool="diyGroup.componentsScrollBool.TopTabbar" ref="topTabbarRef" :data="data.global" />
|
||||
<pop-ads v-if="data.global && Object.keys(data.global).length && data.global.popWindow && data.global.popWindow.show" ref="popAbsRef" :data="data.global" />
|
||||
<template v-for="(component, index) in data.value" :key="component.id">
|
||||
<view
|
||||
v-show="component.componentIsShow"
|
||||
@click="diyStore.changeCurrentIndex(index, component)"
|
||||
:class="diyGroup.getComponentClass(index,component)" :style="component.pageStyle"
|
||||
>
|
||||
<view class="relative" :style="{ marginTop : component.margin.top < 0 ? (component.margin.top * 2) + 'rpx' : '0', marginBottom : component.margin.bottom < 0 ? (component.margin.bottom * 2) + 'rpx' : '0' }">
|
||||
<view class="diy-group" id="componentList">
|
||||
<top-tabbar v-if="data.global && Object.keys(data.global).length && data.global.topStatusBar && data.global.topStatusBar.isShow"
|
||||
:scrollBool="diyGroup.componentsScrollBool.TopTabbar" ref="topTabbarRef" :data="data.global" />
|
||||
<pop-ads v-if="data.global && Object.keys(data.global).length && data.global.popWindow && data.global.popWindow.show" ref="popAbsRef" :data="data.global" />
|
||||
<template v-for="(component, index) in data.value" :key="component.id">
|
||||
<view
|
||||
v-show="component.componentIsShow"
|
||||
@click="diyStore.changeCurrentIndex(index, component)"
|
||||
:class="diyGroup.getComponentClass(index,component)" :style="component.pageStyle"
|
||||
>
|
||||
<view class="relative" :style="{ marginTop : component.margin.top < 0 ? (component.margin.top * 2) + 'rpx' : '0', marginBottom : component.margin.bottom < 0 ? (component.margin.bottom * 2) + 'rpx' : '0' }">
|
||||
|
||||
<!-- 装修模式下,设置负上边距后超出的内容,禁止选中设置 -->
|
||||
<view v-if="diyGroup.isShowPlaceHolder(index,component)" class="absolute w-full z-1"
|
||||
:style="{ height : (component.margin.top * 2 * -1) + 'rpx' }"
|
||||
@click.stop="diyGroup.placeholderEvent"></view>
|
||||
<!-- 装修模式下,设置负上边距后超出的内容,禁止选中设置 -->
|
||||
<view v-if="diyGroup.isShowPlaceHolder(index,component)" class="absolute w-full z-1"
|
||||
:style="{ height : (component.margin.top * 2 * -1) + 'rpx' }"
|
||||
@click.stop="diyGroup.placeholderEvent"></view>
|
||||
|
||||
<template v-if="component.componentName == 'GraphicNav'">
|
||||
<diy-graphic-nav :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'HorzBlank'">
|
||||
<diy-horz-blank :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'HorzLine'">
|
||||
<diy-horz-line :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'HotArea'">
|
||||
<diy-hot-area :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'ImageAds'">
|
||||
<diy-image-ads :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'MemberInfo'">
|
||||
<diy-member-info :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'MemberLevel'">
|
||||
<diy-member-level :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'Notice'">
|
||||
<diy-notice :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'RubikCube'">
|
||||
<diy-rubik-cube :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'Text'">
|
||||
<diy-text :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'RichText'">
|
||||
<diy-rich-text :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'ActiveCube'">
|
||||
<diy-active-cube :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FloatBtn'">
|
||||
<diy-float-btn :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'CarouselSearch'">
|
||||
<diy-carousel-search :scrollBool="diyGroup.componentsScrollBool.CarouselSearch" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'PictureShow'">
|
||||
<diy-picture-show :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormSubmit'">
|
||||
<diy-form-submit :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormInput'">
|
||||
<diy-form-input ref="diyFormInputRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormTextarea'">
|
||||
<diy-form-textarea ref="diyFormTextareaRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormIdentity'">
|
||||
<diy-form-identity ref="diyFormIdentityRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormEmail'">
|
||||
<diy-form-email ref="diyFormEmailRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormMobile'">
|
||||
<diy-form-mobile ref="diyFormMobileRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormWechatName'">
|
||||
<diy-form-wechat-name ref="diyFormWechatNameRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormNumber'">
|
||||
<diy-form-number ref="diyFormNumberRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormRadio'">
|
||||
<diy-form-radio ref="diyFormRadioRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormCheckbox'">
|
||||
<diy-form-checkbox ref="diyFormCheckboxRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormTable'">
|
||||
<diy-form-table ref="diyFormTableRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormDate'">
|
||||
<diy-form-date ref="diyFormDateRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormDateScope'">
|
||||
<diy-form-date-scope ref="diyFormDateScopeRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormTime'">
|
||||
<diy-form-time ref="diyFormTimeRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormTimeScope'">
|
||||
<diy-form-time-scope ref="diyFormTimeScopeRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormLocation'">
|
||||
<diy-form-location ref="diyFormLocationRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormAddress'">
|
||||
<diy-form-address ref="diyFormAddressRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormImage'">
|
||||
<diy-form-image ref="diyFormImageRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormVideo'">
|
||||
<diy-form-video ref="diyFormVideoRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormFile'">
|
||||
<diy-form-file ref="diyFormFileRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'GraphicNav'">
|
||||
<diy-graphic-nav :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'HorzBlank'">
|
||||
<diy-horz-blank :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'HorzLine'">
|
||||
<diy-horz-line :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'HotArea'">
|
||||
<diy-hot-area :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'ImageAds'">
|
||||
<diy-image-ads :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'MemberInfo'">
|
||||
<diy-member-info :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'MemberLevel'">
|
||||
<diy-member-level :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'Notice'">
|
||||
<diy-notice :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'RubikCube'">
|
||||
<diy-rubik-cube :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'Text'">
|
||||
<diy-text :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'RichText'">
|
||||
<diy-rich-text :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'ActiveCube'">
|
||||
<diy-active-cube :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FloatBtn'">
|
||||
<diy-float-btn :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'CarouselSearch'">
|
||||
<diy-carousel-search :scrollBool="diyGroup.componentsScrollBool.CarouselSearch" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'PictureShow'">
|
||||
<diy-picture-show :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormSubmit'">
|
||||
<diy-form-submit :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormInput'">
|
||||
<diy-form-input ref="diyFormInputRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormTextarea'">
|
||||
<diy-form-textarea ref="diyFormTextareaRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormIdentity'">
|
||||
<diy-form-identity ref="diyFormIdentityRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormEmail'">
|
||||
<diy-form-email ref="diyFormEmailRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormMobile'">
|
||||
<diy-form-mobile ref="diyFormMobileRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormWechatName'">
|
||||
<diy-form-wechat-name ref="diyFormWechatNameRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormNumber'">
|
||||
<diy-form-number ref="diyFormNumberRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormRadio'">
|
||||
<diy-form-radio ref="diyFormRadioRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormCheckbox'">
|
||||
<diy-form-checkbox ref="diyFormCheckboxRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormTable'">
|
||||
<diy-form-table ref="diyFormTableRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormDate'">
|
||||
<diy-form-date ref="diyFormDateRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormDateScope'">
|
||||
<diy-form-date-scope ref="diyFormDateScopeRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormTime'">
|
||||
<diy-form-time ref="diyFormTimeRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormTimeScope'">
|
||||
<diy-form-time-scope ref="diyFormTimeScopeRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormLocation'">
|
||||
<diy-form-location ref="diyFormLocationRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormAddress'">
|
||||
<diy-form-address ref="diyFormAddressRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormImage'">
|
||||
<diy-form-image ref="diyFormImageRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormVideo'">
|
||||
<diy-form-video ref="diyFormVideoRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
<template v-if="component.componentName == 'FormFile'">
|
||||
<diy-form-file ref="diyFormFileRef" :component="component" :global="data.global" :index="index" />
|
||||
</template>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="diyStore.mode == '' && data.global && data.global.bottomTabBar && data.global.bottomTabBar.isShow">
|
||||
<view class="pt-[20rpx]"></view>
|
||||
<tabbar />
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<!-- 以下是addon文件夹下的自定义组件 -->
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="diyStore.mode == '' && data.global && data.global.bottomTabBar && data.global.bottomTabBar.isShow">
|
||||
<view class="pt-[20rpx]"></view>
|
||||
<tabbar />
|
||||
</template>
|
||||
</view>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
|
||||
import topTabbar from '@/components/top-tabbar/top-tabbar.vue'
|
||||
import popAds from '@/components/pop-ads/pop-ads.vue'
|
||||
import { useDiyGroup } from './useDiyGroup'
|
||||
@ -141,16 +145,16 @@ import { ref, getCurrentInstance } from 'vue';
|
||||
const props = defineProps(['data']);
|
||||
const instance: any = getCurrentInstance();
|
||||
const getFormRef = () => {
|
||||
return {
|
||||
componentRefs: instance.refs
|
||||
}
|
||||
return {
|
||||
componentRefs: instance.refs
|
||||
}
|
||||
}
|
||||
|
||||
const diyStore = useDiyStore();
|
||||
|
||||
const diyGroup = useDiyGroup({
|
||||
...props,
|
||||
getFormRef
|
||||
...props,
|
||||
getFormRef
|
||||
});
|
||||
|
||||
const data = ref(diyGroup.data)
|
||||
@ -162,8 +166,8 @@ diyGroup.onMounted()
|
||||
diyGroup.onPageScroll()
|
||||
|
||||
defineExpose({
|
||||
refresh: diyGroup.refresh,
|
||||
getFormRef
|
||||
refresh: diyGroup.refresh,
|
||||
getFormRef
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -321,8 +321,9 @@ const calcFourSquare = () => {
|
||||
}
|
||||
});
|
||||
diyComponent.value.list.forEach((item: any, index: any) => {
|
||||
item.imgWidth = 'calc((100% - ' + upx2px(diyComponent.value.imageGap * 2) + 'px) / 2)';
|
||||
item.widthStyle = item.imgWidth;
|
||||
//影响下次计算ratio
|
||||
// item.imgWidth = 'calc((100% - ' + upx2px(diyComponent.value.imageGap * 2) + 'px) / 2)';
|
||||
item.widthStyle = 'calc((100% - ' + upx2px(diyComponent.value.imageGap * 2) + 'px) / 2)';
|
||||
if (index <= 1) {
|
||||
item.imgHeight = maxHeightFirst;
|
||||
} else if (index > 1) {
|
||||
|
||||
@ -201,7 +201,8 @@ const getFriendspayInfoFn = (tradeType : string, tradeId : number) => {
|
||||
},
|
||||
weapp: {
|
||||
...share
|
||||
}
|
||||
},
|
||||
isStop:true
|
||||
});
|
||||
// 分享 - end
|
||||
copyUrlFn();
|
||||
|
||||
@ -125,7 +125,7 @@ onLoad((data: any) => {
|
||||
if (uni.getStorageSync('addressInfo')) {
|
||||
Object.assign(formData.value, uni.getStorageSync('addressInfo'))
|
||||
}
|
||||
formData.value.address = data.name;
|
||||
// formData.value.address = data.name;
|
||||
getAddress(data.latng);
|
||||
const tempArr = getQueryVariable('latng').split(',');
|
||||
formData.value.lat = tempArr[0];
|
||||
@ -294,7 +294,7 @@ const chooseLocation = () => {
|
||||
});
|
||||
// #endif
|
||||
|
||||
// #ifndef H5
|
||||
// #ifdef H5
|
||||
const urlencode = formData.value;
|
||||
uni.setStorageSync('addressInfo', urlencode);
|
||||
let backurl = location.origin + location.pathname + '?source=' + source.value;
|
||||
@ -309,6 +309,9 @@ const chooseLocation = () => {
|
||||
const getAddress = (latlng: any) => {
|
||||
getAddressByLatlng({ latlng }).then((res: any) => {
|
||||
if (res.data) {
|
||||
// #ifdef H5
|
||||
formData.value.address = res.data.formatted_addresses.recommend;
|
||||
// #endif
|
||||
formData.value.full_address = '';
|
||||
formData.value.full_address += res.data.province != undefined ? res.data.province : '';
|
||||
formData.value.full_address += res.data.city != undefined ? '' + res.data.city : '';
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<view class="min-h-[100vh] bg-[var(--page-bg-color)] overflow-hidden" :style="themeColor()">
|
||||
<view class="fixed left-0 right-0 top-0 z-99">
|
||||
<view class="bg-[#fff] px-[var(--sidebar-m)] py-[14rpx] flex items-center">
|
||||
<view class="search-input">
|
||||
<view class="bg-[#f6f6f6] px-[var(--sidebar-m)] py-[14rpx] flex items-center">
|
||||
<view class="search-input bg-[#fff]">
|
||||
<text class="nc-iconfont nc-icon-sousuo-duanV6xx1 btn" @click="searchTypeFn()"></text>
|
||||
<input class="input" maxlength="50" type="text" v-model="keyword" placeholder="请输入搜索关键词" placeholderClass="text-[var(--text-color-light9)] text-[24rpx]" confirm-type="search" @confirm="searchTypeFn()">
|
||||
<text v-if="keyword" class="nc-iconfont nc-icon-cuohaoV6xx1 clear" @click="keyword=''"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tab-style-1 pt-[4rpx] bg-[#fff]">
|
||||
<view class="tab-style-1 pt-[4rpx] bg-[#f6f6f6]">
|
||||
<view class="tab-left">
|
||||
<view class="tab-left-item"
|
||||
:class="{'!text-primary class-select':fromType.from_type === item.from_type && fromType.account_data_gt === item.account_data_gt}"
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="bg-[var(--page-bg-color)] min-h-[100vh]" :style="themeColor()">
|
||||
<view class="fixed left-0 right-0 top-0 z-10085">
|
||||
<view class="bg-[#fff] px-[30rpx] h-[88rpx] flex-center relative z-10084">
|
||||
<view class="search-input">
|
||||
<view class="bg-[#f6f6f6] px-[30rpx] h-[88rpx] pt-[10rpx] flex-center relative z-10084">
|
||||
<view class="search-input bg-[#fff]">
|
||||
<view class="flex-1 text-[24rpx] leading-[60rpx] text-[var(--text-color-light9)]" :class="{'!text-[#333]':from_type}" @click="typePopup = true">{{ from_type_name || '请选择来源用途' }}</view>
|
||||
<text class="nc-iconfont nc-icon-shangV6xx-1 !text-[26rpx] ml-[18rpx] !text-[var(--text-color-light6)]" v-if="typePopup" @click="typePopup = false"></text>
|
||||
<text class="nc-iconfont nc-icon-xiaV6xx !text-[26rpx] ml-[18rpx] !text-[var(--text-color-light6)]" v-else @click="typePopup = true"></text>
|
||||
@ -19,7 +19,7 @@
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
<view class="px-[var(--sidebar-m)] py-[30rpx] flex items-center justify-between">
|
||||
<view class="px-[var(--sidebar-m)] pb-[30rpx] pt-[20rpx] bg-[#f6f6f6] flex items-center justify-between">
|
||||
<view class="flex items-center">
|
||||
<view class="px-[30rpx] bg-[#fff] rounded-[30rpx] text-[24rpx] leading-[54rpx] mr-[20rpx] text-[#333]"
|
||||
:class="{'!text-[var(--primary-color)] font-500':amount_type == item.status}"
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="bg-[var(--page-bg-color)] min-h-screen overflow-hidden" :style="themeColor()">
|
||||
<view class="fixed left-0 right-0 top-0 z-99 bg-[#fff]">
|
||||
<view class="fixed left-0 right-0 top-0 z-99 bg-[#f6f6f6]">
|
||||
<view class="py-[14rpx] flex items-center justify-between px-[20rpx]">
|
||||
<view class="flex-1 search-input mr-[20rpx]">
|
||||
<view class="flex-1 search-input bg-[#fff] mr-[20rpx]">
|
||||
<text @click.stop="searchTypeFn()" class="nc-iconfont nc-icon-sousuo-duanV6xx1 btn"></text>
|
||||
<input class="input" maxlength="50" type="text" v-model="keyword" placeholder="请输入搜索关键词" placeholderClass="text-[var(--text-color-light9)] text-[24rpx]" confirm-type="search" @confirm="searchTypeFn()">
|
||||
<text v-if="keyword" class="nc-iconfont nc-icon-cuohaoV6xx1 clear" @click="keyword=''"></text>
|
||||
|
||||
@ -25,8 +25,12 @@
|
||||
<u-form-item :label="t('mobile')" prop="mobile" :border-bottom="true" v-if="isBindMobile || config.login.is_bind_mobile">
|
||||
<input type="mobile" v-model="formData.mobile" :disabled="true" v-if="formData.mobile" placeholderClass="text-[28rpx]" class="text-[28rpx]">
|
||||
<template v-else>
|
||||
<u-button v-if="info" :customStyle="{border:'none',color: '#999',width:'140rpx', textAlign:'left',margin:'0rpx'}" :text="t('getMobile')" open-type="getPhoneNumber" @getphonenumber="memberStore.bindMobile" class="text-[28rpx]"></u-button>
|
||||
<u-button v-else :customStyle="{border:'none',color: '#999',width:'140rpx', textAlign:'left',margin:'0rpx'}" :text="t('getMobile')" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" class="text-[28rpx]"></u-button>
|
||||
<u-button v-if="info" :customStyle="{border:'none',color: '#999',width:'140rpx', textAlign:'left',margin:'0rpx',fontSize:'28rpx'}" open-type="getPhoneNumber" @getphonenumber="memberStore.bindMobile">
|
||||
<text class="text-[28rpx]">{{ t('getMobile') }}</text>
|
||||
</u-button>
|
||||
<u-button v-else :customStyle="{border:'none',color: '#999',width:'140rpx', textAlign:'left',margin:'0rpx',fontSize:'28rpx'}" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
||||
<text class="text-[28rpx]">{{ t('getMobile') }}</text>
|
||||
</u-button>
|
||||
</template>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
@ -11,12 +11,12 @@
|
||||
</view>
|
||||
<view v-if="data.customer_phone" class="w-full h-[1rpx] bg-dashed-style my-[40rpx]"></view>
|
||||
<view class="px-[24rpx] flex flex-col items-center justify-center" v-if="data.customer_qrcode">
|
||||
<view class="border border-[#eee] border-solid rounded-[10rpx] border-[1rpx] w-[240rpx] h-[240rpx] flex items-center justify-center">
|
||||
<view class="border border-[#eee] border-solid rounded-[10rpx] border-[1rpx] p-[10rpx] flex items-center justify-center">
|
||||
<image class="w-[226rpx] h-[226rpx]" :src="img(data.customer_qrcode)" mode="widthFix" />
|
||||
</view>
|
||||
<view class="text-[26rpx] text-[#333] mt-[20rpx]">扫描二维码添加客服</view>
|
||||
</view>
|
||||
<view class="px-[50rpx] mt-[16rpx] text-[22rpx] text-[#999] leading-[1.5]" style="text-indent: 2em;">{{ data.customer_guided_words }}</view>
|
||||
<view class="px-[50rpx] mt-[16rpx] text-center text-[22rpx] text-[#999] leading-[1.5]">{{ data.customer_guided_words }}</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- <view @click="servicesDataShow = false" class="mt-[50rpx] nc-iconfont nc-icon-cuohaoV6xx1 !text-[50rpx] text-[#fff]"></view> -->
|
||||
|
||||
@ -35,14 +35,21 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, version } from 'vue'
|
||||
import { ref, version, computed } from 'vue'
|
||||
import {onBackPress, onHide} from "@dcloudio/uni-app";
|
||||
import useSystemStore from '@/stores/system';
|
||||
import { img, getUrl } from '@/utils/common';
|
||||
|
||||
const systemStore = useSystemStore();
|
||||
|
||||
const show = ref(false)
|
||||
const show = computed({
|
||||
get() {
|
||||
return systemStore.updateVersionPopup
|
||||
},
|
||||
set(value: boolean){
|
||||
systemStore.updateVersionPopup = false
|
||||
}
|
||||
})
|
||||
const downloading = ref(false)
|
||||
const downloadProgress = ref(0)
|
||||
const versionInfo = ref({})
|
||||
@ -60,7 +67,6 @@ const closeFn = () => {
|
||||
lock[versionInfo.value.version_code] = true
|
||||
uni.setStorageSync('update_version_close_lock', lock)
|
||||
show.value = false
|
||||
systemStore.updateVersionPopup = false
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '下载过程中不允许关闭',
|
||||
|
||||
@ -87,6 +87,18 @@ export const useShare = () => {
|
||||
uni.setStorageSync('weappOptions', weappOptions)
|
||||
// #endif
|
||||
}
|
||||
|
||||
// 在这里判断isStop(关键:放在参数处理之后)
|
||||
if (options.hasOwnProperty('isStop') && options.isStop) {
|
||||
// 停止执行,更新store后返回
|
||||
useSystemStore().$patch((state) => {
|
||||
state.shareOptions = {
|
||||
wechatOptions,
|
||||
weappOptions
|
||||
}
|
||||
})
|
||||
return; // 终止整个setShare函数
|
||||
}
|
||||
}
|
||||
getShareInfo({
|
||||
route: '/' + currRoute(),
|
||||
@ -96,11 +108,11 @@ export const useShare = () => {
|
||||
|
||||
let wechat = data.wechat;
|
||||
if (wechat) {
|
||||
wechatOptions.title = wechat.title
|
||||
wechatOptions.desc = wechat.desc
|
||||
wechatOptions.title = wechat.title? wechat.title : options.wechat?.title
|
||||
wechatOptions.desc = wechat.desc? wechat.desc : options.wechat?.desc
|
||||
wechatOptions.imgUrl = wechat.url ? img(wechat.url) : ''
|
||||
} else {
|
||||
wechatOptions.title = document.title;
|
||||
wechatOptions.title = document ? document.title : ''
|
||||
wechatOptions.desc = ''
|
||||
}
|
||||
// #ifdef H5
|
||||
|
||||
@ -9,16 +9,6 @@
|
||||
import { ref, watch } from 'vue'
|
||||
import useSystemStore from '@/stores/system'
|
||||
import updateVersion from '@/components/update-version/update-version.vue'
|
||||
|
||||
const systemStore = useSystemStore()
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
const updateVersionRef = ref(null)
|
||||
watch(() => systemStore.updateVersionPopup, () => {
|
||||
if (systemStore.updateVersionPopup) updateVersionRef.value?.open()
|
||||
else updateVersionRef.value?.close()
|
||||
})
|
||||
// #endif
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@ -41,18 +41,18 @@
|
||||
"register": "注册",
|
||||
"complete": "完成",
|
||||
"close": "关闭",
|
||||
"diyForm":{
|
||||
"back":"返回",
|
||||
"hidden":"已隐藏",
|
||||
"view":"查看",
|
||||
"know":"我知道了",
|
||||
"prompt":"提示",
|
||||
"call":"拨打",
|
||||
"copy":"复制号码",
|
||||
"uploadTips":"请上传图片",
|
||||
"tips":"仅限本人和管理员能查看完整号码:",
|
||||
"viewFillingDetails":"查看填写详情",
|
||||
"detailInformation":"详细信息"
|
||||
"diyForm": {
|
||||
"back": "返回",
|
||||
"hidden": "已隐藏",
|
||||
"view": "查看",
|
||||
"know": "我知道了",
|
||||
"prompt": "提示",
|
||||
"call": "拨打",
|
||||
"copy": "复制号码",
|
||||
"uploadTips": "请上传图片",
|
||||
"tips": "仅限本人和管理员能查看完整号码:",
|
||||
"viewFillingDetails": "查看填写详情",
|
||||
"detailInformation": "详细信息"
|
||||
},
|
||||
"pay": {
|
||||
"orderInfo": "订单信息",
|
||||
@ -143,5 +143,17 @@
|
||||
"o2o.orderNo": "订单号",
|
||||
"o2o.actualPayment": "实付款",
|
||||
"o2o.orderDetail": "详情",
|
||||
"notHave": "无"
|
||||
"notHave": "无",
|
||||
"tourism.scenic": "景点",
|
||||
"tourism.way": "线路",
|
||||
"tourism.hotel": "酒店",
|
||||
"tourism.seeMore": "查看更多",
|
||||
"vipcard.seeMore": "查看更多",
|
||||
"shop.emptyAddress": "暂无收货地址,请先创建地址",
|
||||
"shop.addAddress": "新增收货地址",
|
||||
"shop.selectAddress": "选择地址",
|
||||
"shop_fenxiao.orderNo": "订单号",
|
||||
"shop_giftcard.actualPayment": "实付款",
|
||||
"shop_giftcard.orderClose": "关闭订单",
|
||||
"shop_giftcard.orderNo": "订单号"
|
||||
}
|
||||
@ -71,7 +71,7 @@
|
||||
"oauth" : {},
|
||||
"maps" : {
|
||||
"tencent" : {
|
||||
"key" : ""
|
||||
"key" : "6ZDBZ-CLSLX-66747-7MVM4-HLK47-XMBXU"
|
||||
}
|
||||
},
|
||||
"share" : {
|
||||
|
||||
@ -378,7 +378,7 @@
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
"navigationBarBackgroundColor": "#F6F6F6",
|
||||
"backgroundColor": "#F6F6F6",
|
||||
"backgroundColorTop": "#F6F6F6",
|
||||
"backgroundColorBottom": "#F6F6F6"
|
||||
|
||||
@ -279,7 +279,8 @@ button[type='primary'],uni-button[type='primary']{
|
||||
}
|
||||
//普通tab切换样式
|
||||
.tab-style-2{
|
||||
@apply box-border bg-white;
|
||||
@apply box-border ;
|
||||
background-color: #f6f6f6; /* 直接覆盖背景色 */
|
||||
padding: 0 30rpx;
|
||||
.tab-content{
|
||||
@apply flex whitespace-nowrap justify-between;
|
||||
@ -309,9 +310,9 @@ button[type='primary'],uni-button[type='primary']{
|
||||
}
|
||||
//两个tab选项卡样式
|
||||
.tab-style-3{
|
||||
@apply flex whitespace-nowrap justify-around box-border bg-white;
|
||||
@apply flex whitespace-nowrap justify-around box-border ;
|
||||
height: 88rpx;
|
||||
|
||||
background-color: #f6f6f6; /* 直接覆盖背景色 */
|
||||
.tab-items{
|
||||
@apply flex-1;
|
||||
line-height: 88rpx;
|
||||
|
||||
@ -1 +1,2 @@
|
||||
[]
|
||||
[
|
||||
]
|
||||
@ -13,6 +13,20 @@ export const redirect = (redirect: any) => {
|
||||
if (useDiyStore().mode == 'decorate') return
|
||||
|
||||
let { url, mode, param, success, fail, complete } = redirect
|
||||
// 新增:判断是否为外部链接
|
||||
if (url && (url.indexOf('https') != -1 || url.indexOf('http') != -1)) {
|
||||
|
||||
// #ifdef H5
|
||||
window.location.href = url;
|
||||
// #endif
|
||||
|
||||
// #ifdef MP
|
||||
redirect({
|
||||
url: '/app/pages/webview/index',
|
||||
param: { src: encodeURIComponent(url) }
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
let originalUrl = url; // 原始地址
|
||||
let newLogin = false; // 是否需要登录
|
||||
|
||||
@ -292,7 +306,6 @@ export function img(path: string): string {
|
||||
|
||||
if (typeof path == 'string' && path.startsWith('/')) path = path.replace(/^\//, '')
|
||||
if (typeof imgDomain == 'string' && imgDomain.endsWith('/')) imgDomain = imgDomain.slice(0, -1)
|
||||
|
||||
return isUrl(path) ? path : `${imgDomain}/${path}`
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ export function topTabar() {
|
||||
topStatusBar: {
|
||||
style: 'style-1',
|
||||
bgColor: 'transparent',
|
||||
rollBgColor: '#fff',
|
||||
rollBgColor: '#f6f6f6',
|
||||
textColor: '#fff',
|
||||
rollTextColor: '#333'
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user