Merge branch 'dev-sws' into dev
commit
2bb8a68597
|
|
@ -1,61 +1,84 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<view v-if="propIsShowAddressChoice" class="choice-location padding-right-xxxl pr" @tap="choose_user_location">
|
||||
<template>
|
||||
<view :class="theme_view">
|
||||
<view v-if="propIsShowAddressChoice" class="choice-location pr" @tap="choose_user_location">
|
||||
<view class="dis-inline-block va-m lh">
|
||||
<iconfont name="icon-location" :size="propIconLocationSize" propClass="lh" :color="propIconLocationColor"></iconfont>
|
||||
<iconfont name="icon-location" :size="propIconLocationSize" propClass="lh" :color="propIconLocationColor || propBaseColor"></iconfont>
|
||||
</view>
|
||||
<view class="va-m dis-inline-block margin-left-xs text-size-md single-text text" :style="'max-width:'+propTextMaxWidth+';'">{{ location.text || '' }}</view>
|
||||
<view class="va-m dis-inline-block margin-left-xs text-size-md single-text text" :style="'max-width:' + propTextMaxWidth + ';color:' + (propTextColor || propBaseColor) + ';'">{{ location.text || '' }}</view>
|
||||
<view class="va-m lh dis-inline-block margin-left-xs">
|
||||
<iconfont name="icon-arrow-bottom" :size="propIconArrowSize" propClass="lh-xs" :color="propIconArrowColor"></iconfont>
|
||||
<iconfont name="icon-arrow-bottom" :size="propIconArrowSize" propClass="lh-xs" :color="propIconArrowColor || propBaseColor"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
location: {},
|
||||
cloice_location_timer: null
|
||||
};
|
||||
},
|
||||
cloice_location_timer: null,
|
||||
};
|
||||
},
|
||||
props: {
|
||||
propIsShowAddressChoice: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
propBaseColor: {
|
||||
type: String,
|
||||
default: '#fff',
|
||||
},
|
||||
propTextDefaultName: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
propTextColor: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
propTextMaxWidth: {
|
||||
type: String,
|
||||
default: '100%',
|
||||
},
|
||||
propIconLocationColor: {
|
||||
type: String,
|
||||
default: '#fff',
|
||||
default: '',
|
||||
},
|
||||
propIconLocationSize: {
|
||||
type: String,
|
||||
default: '32rpx',
|
||||
default: '28rpx',
|
||||
},
|
||||
propIconArrowColor: {
|
||||
type: String,
|
||||
default: '#fff',
|
||||
default: '',
|
||||
},
|
||||
propIconArrowSize: {
|
||||
type: String,
|
||||
default: '24rpx',
|
||||
},
|
||||
},
|
||||
// 页面被展示
|
||||
created: function () {
|
||||
this.init();
|
||||
},
|
||||
propIsIconArrow: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
// 页面被展示
|
||||
created: function () {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化
|
||||
init() {
|
||||
let location = app.globalData.choice_user_location_init();
|
||||
if ((this.propTextDefaultName || null) != null) {
|
||||
var default_name = this.$t('shopxo-uniapp.app.4v6q86');
|
||||
if (location.text == default_name) {
|
||||
location.text = this.propTextDefaultName;
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
location: app.globalData.choice_user_location_init()
|
||||
location: location,
|
||||
});
|
||||
},
|
||||
|
||||
|
|
@ -66,9 +89,9 @@
|
|||
var self = this;
|
||||
var timer = setInterval(function () {
|
||||
var result = app.globalData.choice_user_location_init() || null;
|
||||
if(result != null && (result.status == 1 || result.status == 3)) {
|
||||
if (result != null && (result.status == 1 || result.status == 3)) {
|
||||
self.setData({
|
||||
location: result
|
||||
location: result,
|
||||
});
|
||||
clearInterval(self.cloice_location_timer);
|
||||
|
||||
|
|
@ -77,18 +100,18 @@
|
|||
}
|
||||
}, 1000);
|
||||
this.setData({
|
||||
cloice_location_timer: timer
|
||||
cloice_location_timer: timer,
|
||||
});
|
||||
|
||||
// 进入位置选择
|
||||
app.globalData.choose_user_location_event();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.choice-location {
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
</swiper-item>
|
||||
</block>
|
||||
<block v-else>
|
||||
<swiper-item v-for="(item, index) in new_list" :key="index" :style="{ 'padding-right': new_style.image_spacing * 2 + 'rpx' }" :data-value="item.carousel_link.page" @tap="url_open">
|
||||
<swiper-item v-for="(item, index) in new_list" :key="index" :style="['oneDragOne', 'twoDragOne'].includes(form.carousel_type) ? 'padding-right:' + new_style.image_spacing * 2 + 'rpx;' : ''" :data-value="item.carousel_link.page" @tap="url_open">
|
||||
<view class="wh-auto ht-auto pr" :style="img_style">
|
||||
<imageEmpty :propImageSrc="item.carousel_img[0]" :propStyle="img_style" :propImgFit="img_fit" propErrorStyle="width: 100rpx;height: 100rpx;"></imageEmpty>
|
||||
</view>
|
||||
|
|
@ -138,7 +138,7 @@
|
|||
style_container: this.propIsCommon ? common_styles_computer(common_style) : '', // 用于样式显示
|
||||
img_style: radius_computer(this.new_style), // 图片的设置
|
||||
indicator_style: this.get_indicator_style(), // 指示器的样式
|
||||
dot_style: `bottom: ${common_style.padding_bottom * 2 + 12}rpx;`, // 指示器位置
|
||||
dot_style: `bottom: ${common_style.padding_bottom * 2 + 24}rpx;`, // 指示器位置
|
||||
img_fit: fit,
|
||||
video_style: this.get_video_style(), // 视频播放按钮显示逻辑
|
||||
});
|
||||
|
|
@ -264,6 +264,8 @@
|
|||
}
|
||||
.dot {
|
||||
z-index: 1;
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
.dot-item {
|
||||
margin: 0 6rpx;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,9 +22,7 @@
|
|||
</view>
|
||||
<view v-else-if="['4', '5'].includes(form.content.theme)" class="flex-1 flex-row align-c h gap-10 padding-left-main">
|
||||
<view class="flex-row align-c gap-2" @tap="go_map_event">
|
||||
<iconfont name="icon-location" size="12" color="0"></iconfont>
|
||||
<text class="size-14 cr-3 text-line-1">{{ form.content.positioning_name }}</text>
|
||||
<iconfont v-if="form.content.is_arrows_show == '1'" name="icon-arrow-right" size="24rpx" color="#000"></iconfont>
|
||||
<component-choice-location propBaseColor="#666" :propTextDefaultName="form.content.positioning_name" :propIsIconArrow="form.content.is_arrows_show == '1'" @onback="user_back_choice_location"></component-choice-location>
|
||||
</view>
|
||||
<template v-if="['5'].includes(form.content.theme)">
|
||||
<view class="flex-1">
|
||||
|
|
@ -66,6 +64,7 @@
|
|||
import componentDiySearch from '@/components/diy/search';
|
||||
import imageEmpty from '@/components/diy/modules/image-empty';
|
||||
import hotWordList from '@/components/diy/modules/hot-word-list';
|
||||
import componentChoiceLocation from '@/components/choice-location/choice-location';
|
||||
import { isEmpty, background_computer, gradient_computer } from '@/common/js/common/common.js';
|
||||
// 状态栏高度
|
||||
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0));
|
||||
|
|
@ -87,6 +86,7 @@
|
|||
componentDiySearch,
|
||||
imageEmpty,
|
||||
hotWordList,
|
||||
componentChoiceLocation,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in New Issue