diff --git a/App.vue b/App.vue
index e829d070..ddc3cb9d 100644
--- a/App.vue
+++ b/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;
},
diff --git a/common/css/page.css b/common/css/page.css
index 43ed5f8e..112448e3 100644
--- a/common/css/page.css
+++ b/common/css/page.css
@@ -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;
diff --git a/components/choice-location/choice-location.vue b/components/choice-location/choice-location.vue
new file mode 100644
index 00000000..f5b57894
--- /dev/null
+++ b/components/choice-location/choice-location.vue
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+ {{ location.text || '' }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/common/common.vue b/components/common/common.vue
index 3c97a728..1ad69567 100644
--- a/components/common/common.vue
+++ b/components/common/common.vue
@@ -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);
diff --git a/components/diy/diy.vue b/components/diy/diy.vue
index 94a59014..12c21bd0 100644
--- a/components/diy/diy.vue
+++ b/components/diy/diy.vue
@@ -2,7 +2,7 @@
@@ -39,26 +39,34 @@
+
+
+
-
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
@@ -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
+ });
+ }
},
};
diff --git a/locale/en.json b/locale/en.json
index 62d7ac8e..088b0296 100644
--- a/locale/en.json
+++ b/locale/en.json
@@ -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",
diff --git a/locale/zh.json b/locale/zh.json
index f6700916..bc9470f1 100644
--- a/locale/zh.json
+++ b/locale/zh.json
@@ -63,7 +63,8 @@
"service_time": "服务时间",
"apply_time": "申请时间",
"verification_text": "核销码",
- "verification_message": "请输入核销码"
+ "verification_message": "请输入核销码",
+ "not_supported_scan_tips": "H5网页不支持扫码"
},
"pages": {
"goods-category": "商品分类",
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
index 7dd9930e..877c987a 100644
--- a/node_modules/.package-lock.json
+++ b/node_modules/.package-lock.json
@@ -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": {}
}
diff --git a/package-lock.json b/package-lock.json
index 61a05534..645fa1c5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -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=="
- }
- }
}
diff --git a/pages/common/open-setting-location/open-setting-location.vue b/pages/common/open-setting-location/open-setting-location.vue
index 5860105c..51ee6ce3 100644
--- a/pages/common/open-setting-location/open-setting-location.vue
+++ b/pages/common/open-setting-location/open-setting-location.vue
@@ -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');
diff --git a/pages/diy/diy.vue b/pages/diy/diy.vue
index 1f08479f..8722e726 100644
--- a/pages/diy/diy.vue
+++ b/pages/diy/diy.vue
@@ -1,18 +1,20 @@
-
+
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+