Merge branch 'dev' of gitee.com:zongzhige/shopxo-uniapp into dev-sws
commit
2fecf2b5ac
40
App.vue
40
App.vue
|
|
@ -108,7 +108,7 @@
|
|||
is_home_logo_use_text: 0,
|
||||
|
||||
// 首页开启地理位置选择(0否, 1是)优先级高于logo展示
|
||||
is_home_location_choice: 0,
|
||||
is_home_location_choice: 1,
|
||||
|
||||
// 门店详情顶部导航返回按钮(0否, 1是)
|
||||
is_realstore_top_nav_back: 1,
|
||||
|
|
@ -1642,9 +1642,18 @@
|
|||
// web地址
|
||||
this.open_web_view(value, is_redirect);
|
||||
} else if (value.substr(0, 8) == 'appid://') {
|
||||
// 打开外部小程序协议
|
||||
// 打开外部小程序协议(appid|/pages/index/index?pv=hello|extraData|envVersion)
|
||||
var values = value.substr(8).split('|');
|
||||
uni.navigateToMiniProgram({
|
||||
appId: value.substr(8),
|
||||
appId: values[0],
|
||||
path: values[1] || '',
|
||||
extraData: values[2] || '',
|
||||
envVersion: values[3] || 'release'
|
||||
});
|
||||
} else if (value.substr(0, 12) == 'shortlink://') {
|
||||
// 小程序分享链接
|
||||
uni.navigateToMiniProgram({
|
||||
shortLink: value.substr(12)
|
||||
});
|
||||
} else if (value.substr(0, 6) == 'map://') {
|
||||
// 地图协议(名称|地址|lng|lat)
|
||||
|
|
@ -2583,6 +2592,10 @@
|
|||
|
||||
// 扫码解析处理
|
||||
scan_handle() {
|
||||
// #ifdef H5
|
||||
this.showToast(i18n.t('common.not_supported_scan_tips'));
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
var self = this;
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
|
|
@ -2653,6 +2666,7 @@
|
|||
}
|
||||
},
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
|
||||
// 获取当前语言
|
||||
|
|
@ -2662,6 +2676,15 @@
|
|||
|
||||
// 选择用户地理位置
|
||||
choose_user_location_event() {
|
||||
// 存在数据则改变状态值
|
||||
var key = this.data.cache_userlocation_key;
|
||||
var result = uni.getStorageSync(key) || null;
|
||||
if(result != null) {
|
||||
result['status'] = 2;
|
||||
uni.setStorageSync(key, result);
|
||||
}
|
||||
|
||||
// 进入页面选择位置
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/open-setting-location/open-setting-location',
|
||||
});
|
||||
|
|
@ -2674,6 +2697,7 @@
|
|||
|
||||
// 地址信息初始化
|
||||
choice_user_location_init() {
|
||||
// status 0未选择,1已选择,2选择中,3选择失败
|
||||
var result = uni.getStorageSync(this.data.cache_userlocation_key) || null;
|
||||
var user_location = { status: 0 };
|
||||
if (result != null) {
|
||||
|
|
@ -2684,11 +2708,17 @@
|
|||
address: result.address || null,
|
||||
lat: result.latitude || null,
|
||||
lng: result.longitude || null,
|
||||
status: 1,
|
||||
status: result.status || 1,
|
||||
},
|
||||
};
|
||||
}
|
||||
user_location['text'] = user_location.status == 0 ? i18n.t('shopxo-uniapp.app.4v6q86') : (user_location.name || user_location.address || '');
|
||||
// 默认名称
|
||||
var default_name = i18n.t('shopxo-uniapp.app.4v6q86');
|
||||
// 位置选择失败的状态,名称和默认名称不一致则认为是成功的
|
||||
if(user_location.status == 3 && user_location.name != default_name) {
|
||||
user_location.status = 1;
|
||||
}
|
||||
user_location['text'] = user_location.name || user_location.address || default_name;
|
||||
return user_location;
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ uni-page-head {
|
|||
.uni-page-head-btn {
|
||||
position: fixed;
|
||||
left: auto;
|
||||
bottom: 140rpx;
|
||||
bottom: 180rpx;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
box-shadow: 0 0 20rpx rgb(0 0 0 / 30%);
|
||||
margin: 0 0 0 20rpx;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,94 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<view v-if="propIsShowAddressChoice" class="choice-location padding-right-xxxl pr" @tap="choose_user_location">
|
||||
<view class="dis-inline-block va-m lh">
|
||||
<iconfont name="icon-location" :size="propIconLocationSize" propClass="lh" :color="propIconLocationColor"></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 lh dis-inline-block margin-left-xs">
|
||||
<iconfont name="icon-arrow-bottom" :size="propIconArrowSize" propClass="lh-xs" :color="propIconArrowColor"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
location: {},
|
||||
cloice_location_timer: null
|
||||
};
|
||||
},
|
||||
props: {
|
||||
propIsShowAddressChoice: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
propTextMaxWidth: {
|
||||
type: String,
|
||||
default: '100%',
|
||||
},
|
||||
propIconLocationColor: {
|
||||
type: String,
|
||||
default: '#fff',
|
||||
},
|
||||
propIconLocationSize: {
|
||||
type: String,
|
||||
default: '32rpx',
|
||||
},
|
||||
propIconArrowColor: {
|
||||
type: String,
|
||||
default: '#fff',
|
||||
},
|
||||
propIconArrowSize: {
|
||||
type: String,
|
||||
default: '24rpx',
|
||||
},
|
||||
},
|
||||
// 页面被展示
|
||||
created: function () {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化
|
||||
init() {
|
||||
this.setData({
|
||||
location: app.globalData.choice_user_location_init()
|
||||
});
|
||||
},
|
||||
|
||||
// 选择位置监听
|
||||
choose_user_location(e) {
|
||||
// 定时任务
|
||||
clearInterval(this.cloice_location_timer);
|
||||
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)) {
|
||||
self.setData({
|
||||
location: result
|
||||
});
|
||||
clearInterval(self.cloice_location_timer);
|
||||
|
||||
// 回调事件
|
||||
self.$emit('onback', result);
|
||||
}
|
||||
}, 1000);
|
||||
this.setData({
|
||||
cloice_location_timer: timer
|
||||
});
|
||||
|
||||
// 进入位置选择
|
||||
app.globalData.choose_user_location_event();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.choice-location {
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
// 底部菜单高度
|
||||
footer_height_value_event(value) {
|
||||
this.setData({
|
||||
footer_height_value: (value*2)+40
|
||||
footer_height_value: (value*2)+20
|
||||
});
|
||||
this.$emit('footer-height', value);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<scroll-view :scroll-y="true" class="ht" @scroll="on_scroll_event">
|
||||
<!-- 头部小程序兼容 -->
|
||||
<view class="pr header">
|
||||
<componentDiyHeader v-if="hackReset" :propValue="header_data.com_data"></componentDiyHeader>
|
||||
<componentDiyHeader v-if="hack_reset" :propValue="header_data.com_data"></componentDiyHeader>
|
||||
</view>
|
||||
<view class="content flex-col" :style="'padding-top:' + temp_is_header_top ? temp_header_top : '0'">
|
||||
<view v-for="(item, index) in tabs_data" :key="item.key">
|
||||
|
|
@ -39,26 +39,34 @@
|
|||
<componentDiyAuxiliaryBlank v-else-if="item.key == 'auxiliary-blank'" :propValue="item.com_data"></componentDiyAuxiliaryBlank>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- diy底部卡槽 -->
|
||||
<slot name="diy-bottom"></slot>
|
||||
</template>
|
||||
<template v-else>
|
||||
<!-- goods九宫格数据 -->
|
||||
<!-- 列表 -->
|
||||
<!-- 商品九宫格列表 -->
|
||||
<scroll-view :scroll-y="true" class="scroll-box" @scrolltolower="scroll_lower" lower-threshold="60">
|
||||
<view v-if="goods_list.length > 0" class="padding-horizontal-main padding-top-main oh">
|
||||
<component-goods-list :propData="{ style_type: goods_show_type_value, goods_list: goods_list, random: random_value }" :propLabel="plugins_label_data" :propCurrencySymbol="currency_symbol" :propIsCartParaCurve="true"></component-goods-list>
|
||||
</view>
|
||||
<view v-else>
|
||||
<template v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="goods_list_loding_status" :propMsg="goods_list_loding_msg"></component-no-data>
|
||||
</view>
|
||||
</template>
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="goods_bottom_line_status"></component-bottom-line>
|
||||
</scroll-view>
|
||||
</template>
|
||||
</view>
|
||||
<view v-if="is_show_footer == 1" class="footer">
|
||||
<componentDiyFooter v-if="hackReset" :propValue="footer_data.com_data"></componentDiyFooter>
|
||||
</view>
|
||||
|
||||
<!-- 当前diy页面底部菜单(非公共底部菜单) -->
|
||||
<block v-if="is_show_footer == 1">
|
||||
<componentDiyFooter v-if="hack_reset" :propValue="footer_data.com_data" @footer-height="footer_height_value_event"></componentDiyFooter>
|
||||
<view v-if="footer_height_value > 0" :style="'height:'+footer_height_value+'rpx;'"></view>
|
||||
</block>
|
||||
|
||||
<!-- 底部卡槽 -->
|
||||
<slot name="bottom"></slot>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
|
|
@ -107,7 +115,7 @@
|
|||
propDataId: {
|
||||
type: [String, Number],
|
||||
default: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
componentDiyHeader,
|
||||
|
|
@ -194,7 +202,10 @@
|
|||
data_is_loading: 0,
|
||||
// 缓存key
|
||||
cache_key: app.globalData.data.cache_diy_data_key,
|
||||
hackReset: false,
|
||||
// 重置
|
||||
hack_reset: false,
|
||||
// 底部导航高度
|
||||
footer_height_value: 0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -209,7 +220,7 @@
|
|||
init_config(status) {
|
||||
if ((status || false) == true) {
|
||||
// 是否显示底部菜单,如果当前地址已经存在系统底部菜单中则不显示当前diy页面自定义的底部菜单
|
||||
var is_show_footer = this.propValue.header.com_data.content.bottom_navigation_show;
|
||||
var is_show_footer = parseInt(this.propValue.header.com_data.content.bottom_navigation_show || 0) == 1;
|
||||
var is_tabbar = app.globalData.is_tabbar_pages();
|
||||
this.setData({
|
||||
is_show_footer: is_show_footer && !is_tabbar,
|
||||
|
|
@ -223,7 +234,7 @@
|
|||
init() {
|
||||
// tabs选项卡数据过滤
|
||||
this.setData({
|
||||
hackReset: true,
|
||||
hack_reset: true,
|
||||
header_data: this.propValue.header,
|
||||
footer_data: this.propValue.footer,
|
||||
diy_data: this.propValue.diy_data,
|
||||
|
|
@ -242,7 +253,7 @@
|
|||
this.setData({
|
||||
is_tabs_type: bool,
|
||||
});
|
||||
const new_params = {
|
||||
let new_params = {
|
||||
...params,
|
||||
id: tabs_id,
|
||||
};
|
||||
|
|
@ -265,7 +276,7 @@
|
|||
dataType: 'json',
|
||||
success: (res) => {
|
||||
// 数据处理
|
||||
const data = res.data.data.data;
|
||||
let data = res.data.data.data;
|
||||
if (res.data.code == 0) {
|
||||
new_data = data?.config.diy_data || [];
|
||||
uni.setStorageSync(this.cache_key + tabs_id, new_data);
|
||||
|
|
@ -329,7 +340,7 @@
|
|||
title: this.$t('common.loading_in_text'),
|
||||
});
|
||||
}
|
||||
const new_data = {
|
||||
let new_data = {
|
||||
category_id: this.tabs_id,
|
||||
page: this.goods_page,
|
||||
};
|
||||
|
|
@ -407,6 +418,8 @@
|
|||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 页面滚动事件
|
||||
on_scroll_event(e) {
|
||||
this.setData({
|
||||
scroll_top: e.detail.scrollTop,
|
||||
|
|
@ -430,6 +443,13 @@
|
|||
}
|
||||
// #endif
|
||||
},
|
||||
|
||||
// 底部菜单高度
|
||||
footer_height_value_event(value) {
|
||||
this.setData({
|
||||
footer_height_value: (value*2)+20
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@
|
|||
"service_time": "service time ",
|
||||
"apply_time": "Application time",
|
||||
"verification_text": "Verification code",
|
||||
"verification_message": "Please enter the verification code"
|
||||
"verification_message": "Please enter the verification code",
|
||||
"not_supported_scan_tips": "H5 webpage does not support scanning codes"
|
||||
},
|
||||
"pages": {
|
||||
"goods-category": "Product classification",
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@
|
|||
"service_time": "服务时间",
|
||||
"apply_time": "申请时间",
|
||||
"verification_text": "核销码",
|
||||
"verification_message": "请输入核销码"
|
||||
"verification_message": "请输入核销码",
|
||||
"not_supported_scan_tips": "H5网页不支持扫码"
|
||||
},
|
||||
"pages": {
|
||||
"goods-category": "商品分类",
|
||||
|
|
|
|||
|
|
@ -1,12 +1,7 @@
|
|||
{
|
||||
"name": "shopxo-uniapp",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"node_modules/jweixin-module": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
|
||||
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
|
||||
}
|
||||
}
|
||||
"name": "jin-edit—仿简书非常好用的富文本编辑器",
|
||||
"version": "1.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,12 @@
|
|||
{
|
||||
"name": "shopxo-uniapp",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"jweixin-module": "^1.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/jweixin-module": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
|
||||
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
|
||||
"name": "jin-edit—仿简书非常好用的富文本编辑器",
|
||||
"version": "1.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "jin-edit—仿简书非常好用的富文本编辑器",
|
||||
"version": "1.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"jweixin-module": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
|
||||
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,7 +103,8 @@ export default {
|
|||
// 调用位置选择组件
|
||||
uni.chooseLocation({
|
||||
success: (res) => {
|
||||
// 位置数据存储缓存中
|
||||
// 位置数据存储缓存中,改变状态值(成功)
|
||||
res['status'] = 1;
|
||||
uni.setStorageSync(this.cache_key, res);
|
||||
|
||||
// 触发自定义事件并传递参数给上一页
|
||||
|
|
@ -116,7 +117,11 @@ export default {
|
|||
}, 500);
|
||||
// #endif
|
||||
},
|
||||
fail: (res) => {
|
||||
fail: (res) => {
|
||||
// 存在数据则改变状态值(失败)
|
||||
var result = {...(uni.getStorageSync(this.cache_key) || {}), ...{status: 3}};
|
||||
uni.setStorageSync(this.cache_key, result);
|
||||
|
||||
// 取消则自动返回、则显示错误
|
||||
// error=11 支付宝取消、msg包含cancel则其他平台
|
||||
var msg = res.errorMessage || res.chooseLocation || res.errMsg || this.$t('open-setting-location.open-setting-location.hwn386');
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<view v-if="(data || null) != null">
|
||||
<block v-if="(data || null) != null">
|
||||
<!-- diy模块 -->
|
||||
<componentDiy :propValue="data.config" :propDataId="data.id"></componentDiy>
|
||||
<componentDiy :propValue="data.config" :propDataId="data.id">
|
||||
<template slot="diy-bottom">
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 公共 -->
|
||||
<component-common></component-common>
|
||||
</template>
|
||||
</componentDiy>
|
||||
</block>
|
||||
<block v-else>
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common></component-common>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
</block>
|
||||
<view class="category-container">
|
||||
<!-- 分类内容 -->
|
||||
<view :class="'category-content bs-bb pr ' + (category_show_level == 0 ? 'goods-model' : '')" :style="'height:calc(100vh - ' + (search_height + window_bottom_height) + 'px);'">
|
||||
<view :class="'category-content bs-bb pr ' + (category_show_level == 0 ? 'goods-model' : '')" :style="'height:calc(100vh - ' + search_height + 'px);'">
|
||||
<block v-if="category_show_level == 1">
|
||||
<!-- 一级模式 -->
|
||||
<scroll-view scroll-y class="ht-auto" :show-scrollbar="false">
|
||||
|
|
@ -452,11 +452,6 @@
|
|||
popup_status: false,
|
||||
// 获取搜索框高度
|
||||
search_height: 0,
|
||||
// 底部tab高度 - 只有H5下有值
|
||||
window_bottom_height: 0,
|
||||
// #ifdef H5
|
||||
window_bottom_height: uni.getWindowInfo().windowBottom || 50,
|
||||
// #endif
|
||||
// 样式
|
||||
left_content_actual_style: '',
|
||||
right_content_actual_style: '',
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@
|
|||
}
|
||||
.home-top-nav-location {
|
||||
max-width: calc(100% - 200rpx);
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
}
|
||||
.home-top-nav-logo {
|
||||
text-align: left;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,18 @@
|
|||
<!-- diy模式 -->
|
||||
<block v-if="data_mode == 3">
|
||||
<block v-if="data_list !== null">
|
||||
<componentDiy :propValue="data_list.config" :propDataId="data_list.id"></componentDiy>
|
||||
<componentDiy :propValue="data_list.config" :propDataId="data_list.id">
|
||||
<template slot="diy-bottom">
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
|
||||
<!-- 版权信息 -->
|
||||
<component-copyright></component-copyright>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common></component-common>
|
||||
</template>
|
||||
</componentDiy>
|
||||
</block>
|
||||
</block>
|
||||
<!-- 自动和手动模式 -->
|
||||
|
|
@ -22,14 +33,8 @@
|
|||
<view :class="'search-content-fixed-content ' + (common_app_is_enable_search == 1 ? 'nav-enable-search' : '')" :style="(common_app_is_header_nav_fixed == 1 ? top_content_style : '') + (common_app_is_header_nav_fixed == 1 ? top_content_search_content_style : '')">
|
||||
<view class="home-top-nav margin-bottom-sm pr padding-right-main">
|
||||
<!-- 定位 -->
|
||||
<view v-if="is_home_location_choice == 1" class="home-top-nav-location dis-inline-block va-m single-text cr-white pr bs-bb padding-left-main padding-right-lg" @tap="choose_user_location_event">
|
||||
<view class="dis-inline-block va-m lh">
|
||||
<iconfont name="icon-location" size="32rpx" propClass="lh" color="#fff"></iconfont>
|
||||
</view>
|
||||
<text class="va-m margin-left-xs text-size-md">{{ user_location.text || '' }}</text>
|
||||
<view class="lh pa right-0 top-xxxl">
|
||||
<iconfont name="icon-arrow-bottom" size="24rpx" propClass="lh-xs" color="#fff"></iconfont>
|
||||
</view>
|
||||
<view v-if="is_home_location_choice == 1" class="home-top-nav-location dis-inline-block va-m single-text cr-white pr bs-bb padding-left-main padding-right-lg" >
|
||||
<component-choice-location @onback="user_back_choice_location"></component-choice-location>
|
||||
</view>
|
||||
<block v-else>
|
||||
<!-- logo/标题 -->
|
||||
|
|
@ -264,41 +269,38 @@
|
|||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 提示信息 -->
|
||||
<block v-if="load_status == 0">
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg" propPage="home" :propIsHeader="true"></component-no-data>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<!-- 页面已加载 -->
|
||||
<block v-if="load_status == 1">
|
||||
<!-- 页面已加载、模式 -->
|
||||
<block v-if="load_status == 1 && data_mode != 3">
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
|
||||
<!-- 版权信息 -->
|
||||
<component-copyright></component-copyright>
|
||||
|
||||
<!-- 非diy模式 -->
|
||||
<block v-if="data_mode != 3">
|
||||
<!-- 在线客服 -->
|
||||
<component-online-service :propIsNav="true" :propIsBar="true" :propIsGrayscale="plugins_mourning_data_is_app"></component-online-service>
|
||||
|
||||
<!-- 快捷导航 -->
|
||||
<component-quick-nav :propIsNav="true" :propIsBar="true" :propIsGrayscale="plugins_mourning_data_is_app"></component-quick-nav>
|
||||
|
||||
<!-- 用户基础 -->
|
||||
<component-user-base ref="user_base" :propIsGrayscale="plugins_mourning_data_is_app"></component-user-base>
|
||||
|
||||
<!-- app管理 -->
|
||||
<component-app-admin ref="app_admin"></component-app-admin>
|
||||
</block>
|
||||
</block>
|
||||
<!-- 在线客服 -->
|
||||
<component-online-service :propIsNav="true" :propIsBar="true" :propIsGrayscale="plugins_mourning_data_is_app"></component-online-service>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common></component-common>
|
||||
<!-- 快捷导航 -->
|
||||
<component-quick-nav :propIsNav="true" :propIsBar="true" :propIsGrayscale="plugins_mourning_data_is_app"></component-quick-nav>
|
||||
|
||||
<!-- 用户基础 -->
|
||||
<component-user-base ref="user_base" :propIsGrayscale="plugins_mourning_data_is_app"></component-user-base>
|
||||
|
||||
<!-- app管理 -->
|
||||
<component-app-admin ref="app_admin"></component-app-admin>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common></component-common>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
|
|
@ -323,6 +325,7 @@
|
|||
import componentMagicList from '@/components/magic-list/magic-list';
|
||||
import componentAppAdmin from '@/components/app-admin/app-admin';
|
||||
import componentDiy from '@/components/diy/diy';
|
||||
import componentChoiceLocation from '@/components/choice-location/choice-location';
|
||||
|
||||
// 状态栏高度
|
||||
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0, true));
|
||||
|
|
@ -437,7 +440,8 @@
|
|||
componentBindingList,
|
||||
componentMagicList,
|
||||
componentAppAdmin,
|
||||
componentDiy
|
||||
componentDiy,
|
||||
componentChoiceLocation
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
|
|
@ -453,20 +457,6 @@
|
|||
if (this.is_home_location_choice == 1) {
|
||||
// 用户位置初始化
|
||||
this.user_location_init();
|
||||
// 先解绑自定义事件
|
||||
uni.$off('refresh');
|
||||
// 监听自定义事件并进行页面刷新操作
|
||||
uni.$on('refresh', (data) => {
|
||||
// 初始位置数据
|
||||
if ((data.location_success || false) == true) {
|
||||
// 用户位置初始化
|
||||
this.user_location_init();
|
||||
// 重新请求数据
|
||||
// #ifdef APP
|
||||
this.init();
|
||||
// #endif
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 数据加载
|
||||
|
|
@ -667,15 +657,17 @@
|
|||
}, 3000);
|
||||
},
|
||||
|
||||
// 选择用户地理位置
|
||||
choose_user_location_event(e) {
|
||||
app.globalData.choose_user_location_event();
|
||||
// 选择用户地理位置回调
|
||||
user_back_choice_location(e) {
|
||||
this.setData({
|
||||
user_location: e
|
||||
});
|
||||
},
|
||||
|
||||
// 用户地理位置初始化
|
||||
user_location_init() {
|
||||
this.setData({
|
||||
user_location: app.globalData.choice_user_location_init(),
|
||||
user_location: app.globalData.choice_user_location_init()
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@
|
|||
<view class="form-gorup bg-white">
|
||||
<view class="form-gorup-title">{{$t('extraction-apply.extraction-apply.47v7m0')}}<text class="form-group-tips-must">*</text></view>
|
||||
<view @tap="choose_location_event" class="form-gorup-text">
|
||||
<view v-if="(user_location.status || 0) == 0" class="cr-grey">{{$t('extraction-apply.extraction-apply.8831v6')}}</view>
|
||||
<view v-else class="cr-base">{{ user_location.lng }}, {{ user_location.lat }}</view>
|
||||
<view v-if="(user_location.status || 0) == 1" class="cr-base">{{ user_location.lng }}, {{ user_location.lat }}</view>
|
||||
<view v-else class="cr-grey">{{$t('extraction-apply.extraction-apply.8831v6')}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -77,6 +77,9 @@
|
|||
</form>
|
||||
</view>
|
||||
|
||||
<!-- 位置选择 -->
|
||||
<component-choice-location ref="choice_location" :propIsShowAddressChoice="false" @onback="user_back_choice_location"></component-choice-location>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common></component-common>
|
||||
</view>
|
||||
|
|
@ -84,6 +87,7 @@
|
|||
<script>
|
||||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentChoiceLocation from '@/components/choice-location/choice-location';
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -113,7 +117,8 @@
|
|||
},
|
||||
|
||||
components: {
|
||||
componentCommon
|
||||
componentCommon,
|
||||
componentChoiceLocation
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
|
|
@ -136,15 +141,8 @@
|
|||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 先解绑自定义事件
|
||||
uni.$off('refresh');
|
||||
// 监听自定义事件并进行页面刷新操作
|
||||
uni.$on('refresh', (data) => {
|
||||
// 初始位置数据
|
||||
if((data.location_success || false) == true) {
|
||||
this.user_location_init();
|
||||
}
|
||||
});
|
||||
// 用户位置初始化
|
||||
this.user_location_init();
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
|
|
@ -383,7 +381,16 @@
|
|||
|
||||
// 选择地理位置
|
||||
choose_location_event(e) {
|
||||
app.globalData.choose_user_location_event();
|
||||
if ((this.$refs.choice_location || null) != null) {
|
||||
this.$refs.choice_location.choose_user_location();
|
||||
}
|
||||
},
|
||||
|
||||
// 选择用户地理位置回调
|
||||
user_back_choice_location(e) {
|
||||
this.setData({
|
||||
user_location: e
|
||||
});
|
||||
},
|
||||
|
||||
// 地址信息初始化
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@
|
|||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</view>
|
||||
|
||||
<!-- 位置选择 -->
|
||||
<component-choice-location ref="choice_location" :propIsShowAddressChoice="false" @onback="user_back_choice_location"></component-choice-location>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common></component-common>
|
||||
</view>
|
||||
|
|
@ -50,7 +53,7 @@ const app = getApp();
|
|||
import componentCommon from '@/components/common/common';
|
||||
import componentNoData from "@/components/no-data/no-data";
|
||||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
|
||||
import componentChoiceLocation from '@/components/choice-location/choice-location';
|
||||
var common_static_url = app.globalData.get_static_url("common");
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -70,7 +73,8 @@ const app = getApp();
|
|||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
componentBottomLine
|
||||
componentBottomLine,
|
||||
componentChoiceLocation
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
|
|
@ -85,11 +89,6 @@ const app = getApp();
|
|||
|
||||
// 清除位置缓存信息
|
||||
app.globalData.choice_user_location_remove();
|
||||
|
||||
// 是否获取位置
|
||||
if (this.home_extraction_address_position == 1) {
|
||||
app.globalData.choose_user_location_event();
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
|
|
@ -98,21 +97,8 @@ const app = getApp();
|
|||
|
||||
// 是否需要选择地理位置
|
||||
if (this.home_extraction_address_position == 1) {
|
||||
// 首次不请求数据
|
||||
if (this.is_first == 0) {
|
||||
// 先解绑自定义事件
|
||||
uni.$off('refresh');
|
||||
// 监听自定义事件并进行页面刷新操作
|
||||
uni.$on('refresh', (data) => {
|
||||
// 初始位置数据
|
||||
if((data.location_success || false) == true) {
|
||||
this.user_location_init();
|
||||
}
|
||||
});
|
||||
|
||||
// 初始化数据
|
||||
this.init();
|
||||
}
|
||||
// 用户位置初始化
|
||||
this.user_location_init();
|
||||
} else {
|
||||
this.init();
|
||||
}
|
||||
|
|
@ -120,6 +106,13 @@ const app = getApp();
|
|||
is_first: 0,
|
||||
});
|
||||
|
||||
// 是否获取位置
|
||||
if (this.home_extraction_address_position == 1) {
|
||||
if((this.user_location || null) == null || this.user_location.status != 1) {
|
||||
this.$refs.choice_location.choose_user_location();
|
||||
}
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
|
|
@ -143,6 +136,14 @@ const app = getApp();
|
|||
}
|
||||
},
|
||||
|
||||
// 选择用户地理位置回调
|
||||
user_back_choice_location(e) {
|
||||
this.setData({
|
||||
user_location: e
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
|
||||
// 地址信息初始化
|
||||
user_location_init() {
|
||||
this.setData({
|
||||
|
|
|
|||
|
|
@ -6,14 +6,8 @@
|
|||
<!-- 顶部 -->
|
||||
<view class="spacing-mb pr z-i cr-white">
|
||||
<!-- 位置 -->
|
||||
<view class="nav-location single-text dis-inline-block bs-bb pr padding-left-main padding-right-xxxxl" @tap="choose_user_location_event">
|
||||
<view class="dis-inline-block va-m">
|
||||
<iconfont name="icon-mendian-dingwei" size="28rpx" propClass="lh-il"></iconfont>
|
||||
</view>
|
||||
<text class="va-m margin-left-xs text-size-md">{{user_location.text || ''}}</text>
|
||||
<view class="icon-arrow-down lh pa right-xxxxxl">
|
||||
<iconfont name="icon-arrow-bottom" size="24rpx" propClass="lh-il" color="#fff"></iconfont>
|
||||
</view>
|
||||
<view class="nav-location single-text dis-inline-block bs-bb pr padding-left-main padding-right-xl margin-top">
|
||||
<component-choice-location ref="choice_location" @onback="user_back_choice_location"></component-choice-location>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 搜索 -->
|
||||
|
|
@ -80,7 +74,7 @@
|
|||
import componentIconNav from '@/components/icon-nav/icon-nav';
|
||||
import componentRealstoreList from '@/components/realstore-list/realstore-list';
|
||||
import componentTitle from '@/components/title/title';
|
||||
|
||||
import componentChoiceLocation from '@/components/choice-location/choice-location';
|
||||
var realstore_static_url = app.globalData.get_static_url('realstore', true);
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -118,6 +112,7 @@
|
|||
componentIconNav,
|
||||
componentRealstoreList,
|
||||
componentTitle,
|
||||
componentChoiceLocation
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
|
|
@ -141,20 +136,6 @@
|
|||
|
||||
// 用户位置初始化
|
||||
this.user_location_init();
|
||||
// 先解绑自定义事件
|
||||
uni.$off('refresh');
|
||||
// 监听自定义事件并进行页面刷新操作
|
||||
uni.$on('refresh', (data) => {
|
||||
// 初始位置数据
|
||||
if((data.location_success || false) == true) {
|
||||
// 用户位置初始化
|
||||
this.user_location_init();
|
||||
// 重新请求数据
|
||||
// #ifdef APP
|
||||
this.get_data();
|
||||
// #endif
|
||||
}
|
||||
});
|
||||
|
||||
// 数据加载
|
||||
this.get_data();
|
||||
|
|
@ -262,7 +243,18 @@
|
|||
|
||||
// 选择地理位置
|
||||
choose_user_location_event(e) {
|
||||
app.globalData.choose_user_location_event();
|
||||
if ((this.$refs.choice_location || null) != null) {
|
||||
this.$refs.choice_location.choose_user_location();
|
||||
}
|
||||
},
|
||||
|
||||
// 选择用户地理位置回调
|
||||
user_back_choice_location(e) {
|
||||
this.setData({
|
||||
user_location: e,
|
||||
location_tips_close_status: e.status != 1
|
||||
});
|
||||
this.get_data();
|
||||
},
|
||||
|
||||
// 地址信息初始化
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
.nav-search {
|
||||
width: calc(100% - 260rpx);
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据列表
|
||||
|
|
|
|||
|
|
@ -4,14 +4,11 @@
|
|||
<!-- 顶部 -->
|
||||
<view class="bg-white padding-top-main padding-horizontal-main oh flex-row jc-sb align-c cr-grey">
|
||||
<!-- 位置 -->
|
||||
<view class="nav-location flex-row align-c margin-right-sm" @tap="choose_user_location_event">
|
||||
<view class="dis-inline-block va-m">
|
||||
<iconfont name="icon-mendian-dingwei" size="28rpx" propClass="lh-md"></iconfont>
|
||||
</view>
|
||||
<text class="va-m margin-left-xs text-size-md single-text">{{user_location.text || ''}}</text>
|
||||
<view class="nav-location flex-row align-c single-text margin-right-sm">
|
||||
<component-choice-location ref="choice_location" propIconLocationColor="#999" propIconArrowColor="#999" propTextMaxWidth="180rpx" @onback="user_back_choice_location"></component-choice-location>
|
||||
</view>
|
||||
<!-- 搜索 -->
|
||||
<view class="nav-search wh-auto">
|
||||
<view class="nav-search">
|
||||
<component-search @onsearch="search_button_event" :propIsOnEvent="true" :propIsRequired="false" :propDefaultValue="search_keywords_value" :propPlaceholder="$t('index.index.c5273j')" propPlaceholderClass="cr-grey-c" propBgColor="#f5f5f5"></component-search>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -50,7 +47,7 @@
|
|||
import componentBottomLine from "@/components/bottom-line/bottom-line";
|
||||
import componentSearch from "@/components/search/search";
|
||||
import componentRealstoreList from "@/components/realstore-list/realstore-list";
|
||||
|
||||
import componentChoiceLocation from '@/components/choice-location/choice-location';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -83,6 +80,7 @@
|
|||
componentBottomLine,
|
||||
componentSearch,
|
||||
componentRealstoreList,
|
||||
componentChoiceLocation
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
|
|
@ -107,23 +105,6 @@
|
|||
|
||||
// 用户位置初始化
|
||||
this.user_location_init();
|
||||
|
||||
// 先解绑自定义事件
|
||||
uni.$off('refresh');
|
||||
// 监听自定义事件并进行页面刷新操作
|
||||
uni.$on('refresh', (data) => {
|
||||
// 初始位置数据
|
||||
if((data.location_success || false) == true) {
|
||||
// 用户位置初始化
|
||||
this.user_location_init();
|
||||
|
||||
// 重新请求数据
|
||||
this.setData({
|
||||
data_page: 1,
|
||||
});
|
||||
this.get_data_list(1);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
|
|
@ -328,9 +309,14 @@
|
|||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
// 选择地理位置
|
||||
choose_user_location_event(e) {
|
||||
app.globalData.choose_user_location_event();
|
||||
// 选择用户地理位置回调
|
||||
user_back_choice_location(e) {
|
||||
this.setData({
|
||||
user_location: e,
|
||||
data_page: 1,
|
||||
});
|
||||
// 重新请求数据
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
// 地址信息初始化
|
||||
|
|
|
|||
|
|
@ -153,9 +153,12 @@
|
|||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
<component-no-data :propIsShowAddressChoice="false" :propStatus="data_list_loding_status"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 位置选择 -->
|
||||
<component-choice-location ref="choice_location" @onback="user_back_choice_location"></component-choice-location>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common></component-common>
|
||||
</view>
|
||||
|
|
@ -165,7 +168,7 @@
|
|||
import componentCommon from '@/components/common/common';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentRegionPicker from '@/components/region-picker/region-picker';
|
||||
|
||||
import componentChoiceLocation from '@/components/choice-location/choice-location';
|
||||
var common_static_url = app.globalData.get_static_url('common');
|
||||
const theme_color = app.globalData.get_theme_color();
|
||||
const theme_color_light = app.globalData.get_theme_color(null, true);
|
||||
|
|
@ -214,7 +217,8 @@
|
|||
components: {
|
||||
componentCommon,
|
||||
componentNoData,
|
||||
componentRegionPicker
|
||||
componentRegionPicker,
|
||||
componentChoiceLocation
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
|
|
@ -245,15 +249,8 @@
|
|||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 先解绑自定义事件
|
||||
uni.$off('refresh');
|
||||
// 监听自定义事件并进行页面刷新操作
|
||||
uni.$on('refresh', (data) => {
|
||||
// 初始位置数据
|
||||
if((data.location_success || false) == true) {
|
||||
this.user_location_init();
|
||||
}
|
||||
});
|
||||
// 用户位置初始化
|
||||
this.user_location_init();
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
|
|
@ -353,7 +350,9 @@
|
|||
|
||||
// 选择地理位置
|
||||
choose_user_location_event(e) {
|
||||
app.globalData.choose_user_location_event();
|
||||
if ((this.$refs.choice_location || null) != null) {
|
||||
this.$refs.choice_location.choose_user_location();
|
||||
}
|
||||
},
|
||||
|
||||
// 清除位置缓存信息
|
||||
|
|
@ -361,6 +360,18 @@
|
|||
app.globalData.choice_user_location_remove();
|
||||
},
|
||||
|
||||
// 选择用户地理位置回调
|
||||
user_back_choice_location(e) {
|
||||
this.setData({
|
||||
user_location: e
|
||||
});
|
||||
|
||||
// 是否开启地理位置选择后自动识别
|
||||
if (this.user_location.status == 1 && this.is_user_address_location_discern == 1) {
|
||||
this.address_discern_handle(this.user_location, 0, 1);
|
||||
}
|
||||
},
|
||||
|
||||
// 地址信息初始化
|
||||
user_location_init() {
|
||||
this.setData({
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@
|
|||
});
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
},
|
||||
// H5通过创建元素的形式嗅探是否支持css sticky
|
||||
// 判断浏览器是否支持sticky属性
|
||||
checkCssStickyForH5() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue