diff --git a/application/service/ToutiaoService.php b/application/service/ToutiaoService.php
index 25142abd7..047c39b5c 100644
--- a/application/service/ToutiaoService.php
+++ b/application/service/ToutiaoService.php
@@ -109,12 +109,9 @@ class ToutiaoService
}
// 返回数据
- $result = [
- 'order_info' => $order_info,
- 'service' => $service,
- 'is_payment_type' => $ret['data']['is_payment_type'],
- ];
- return DataReturn('success', 0, $result);
+ $ret['data']['order_info'] = $order_info;
+ $ret['data']['service'] = $service;
+ return $ret;
}
}
?>
\ No newline at end of file
diff --git a/sourcecode/baidu/app.js b/sourcecode/baidu/app.js
index e7d6e9d59..3095ee1b4 100755
--- a/sourcecode/baidu/app.js
+++ b/sourcecode/baidu/app.js
@@ -532,7 +532,7 @@ App({
// 拨打电话
case 4:
- swan.makePhoneCall({ phoneNumber: value });
+ this.call_tel(value);
break;
}
}
diff --git a/sourcecode/qq/app.js b/sourcecode/qq/app.js
index e6eea2027..7530d1984 100755
--- a/sourcecode/qq/app.js
+++ b/sourcecode/qq/app.js
@@ -65,15 +65,13 @@ App({
"user_orderaftersale": "退款/售后",
"user_orderaftersale_detail": "订单售后",
"user_order_comments": "订单评论",
- "coupon": "领劵中心",
- "user_coupon": "优惠劵",
"extraction_address": "自提地址",
},
// 请求地址
request_url: "{{request_url}}",
- // request_url: 'http://shopxo.com/',
- // request_url: 'https://dev.shopxo.net/',
+ request_url: 'http://shopxo.com/',
+ request_url: 'https://dev.shopxo.net/',
// 基础信息
application_title: "{{application_title}}",
@@ -86,19 +84,13 @@ App({
/**
* 小程序初始化
*/
- onLaunch(options) {
+ onLaunch(params) {
// 启动参数处理
- options = this.launch_params_handle(options);
+ params = this.launch_params_handle(params);
// 设置设备信息
this.set_system_info();
- // 缓存启动参数
- qq.setStorage({
- key: this.data.cache_launch_info_key,
- data: options
- });
-
// 初始化配置
this.init_config();
},
@@ -114,6 +106,12 @@ App({
if ((params.scene || null) != null) {
params = this.url_params_to_json(decodeURIComponent(params.scene));
}
+ // 缓存启动参数
+ qq.setStorage({
+ key: this.data.cache_launch_info_key,
+ data: params
+ });
+
return params;
},
@@ -171,12 +169,13 @@ App({
// 用户信息
var user = this.get_user_cache_info();
var token = (user == false) ? '' : user.token || '';
+ var uuid = this.request_uuid();
return this.data.request_url +
"index.php?s=/api/" + c + "/" + a + plugins_params+
"&application=app&application_client_type=qq" +
- "&token=" +
- token +
+ "&token=" + token +
"&ajax=ajax" +
+ "&uuid="+ uuid +
params;
},
@@ -525,17 +524,12 @@ App({
return false;
}
- qq.openLocation({
- name: values[0],
- address: values[1],
- longitude: parseFloat(values[2]),
- latitude: parseFloat(values[3])
- });
+ this.open_location(values[2], values[3], values[0], values[1]);
break;
// 拨打电话
case 4:
- qq.makePhoneCall({ phoneNumber: value });
+ this.call_tel(value);
break;
}
}
@@ -701,4 +695,159 @@ App({
}
},
+ /**
+ * 获取配置信息、可指定默认值
+ * key 数据key(支持多级读取、以 . 分割key名称)
+ * default_value 默认值
+ */
+ get_config(key, default_value) {
+ var value = null;
+ var config = qq.getStorageSync(this.data.cache_config_info_key) || null;
+ if(config != null)
+ {
+ // 数据读取
+ var arr = key.split('.');
+ if(arr.length == 1)
+ {
+ value = config[key] == undefined ? null : config[key];
+ } else {
+ value = config;
+ for(var i in arr)
+ {
+ if(value[arr[i]] != undefined)
+ {
+ value = value[arr[i]];
+ } else {
+ value = null;
+ break;
+ }
+ }
+ }
+ }
+ return (value === null) ? ((default_value === undefined) ? value : default_value) : value;
+ },
+
+ // 初始化 配置信息
+ init_config() {
+ var self = this;
+ qq.request({
+ url: this.get_request_url('common', 'base'),
+ method: 'POST',
+ data: {},
+ dataType: 'json',
+ header: { 'content-type': 'application/x-www-form-urlencoded' },
+ success: (res) => {
+ if (res.data.code == 0) {
+ qq.setStorage({
+ key: this.data.cache_config_info_key,
+ data: res.data.data,
+ fail: () => {
+ this.showToast('配置信息缓存失败');
+ }
+ });
+ } else {
+ this.showToast(res.data.msg);
+ }
+ },
+ fail: () => {
+ this.showToast('服务器请求出错');
+ },
+ });
+ },
+
+ /**
+ * 配置是否有效(100毫秒检验一次、最多检验100次)
+ * object 回调操作对象
+ * method 回调操作对象的函数
+ */
+ is_config(object, method) {
+ var self = this;
+ var count = 0;
+ var timer = setInterval(function()
+ {
+ if(self.get_config('status') == 1)
+ {
+ clearInterval(timer);
+ if (typeof object === 'object' && (method || null) != null) {
+ object[method](true);
+ }
+ }
+ count++;
+ if(count >= 100)
+ {
+ clearInterval(timer);
+ }
+ }, 100);
+ },
+
+ /**
+ * 百度坐标BD-09到火星坐标GCJ02(高德,谷歌,腾讯坐标)
+ * object 回调操作对象
+ * method 回调操作对象的函数
+ */
+ map_bd_to_gcj(lng, lat) {
+ let x_pi = 3.14159265358979324 * 3000.0 / 180.0;
+ let x = lng - 0.0065;
+ let y = lat - 0.006;
+ let z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi);
+ let theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi);
+ let lngs = z * Math.cos(theta);
+ let lats = z * Math.sin(theta);
+ return {
+ lng: lngs,
+ lat: lats
+ };
+ },
+
+ /**
+ * 百度坐标BD-09到火星坐标GCJ02(高德,谷歌,腾讯坐标)
+ * lng 经度
+ * lat 纬度
+ * name 地图上面显示的名称
+ * address 地图上面显示的详细地址
+ * scale 缩放比例,范围5~18
+ */
+ open_location(lng, lat, name, address, scale) {
+ if(lng == undefined || lat == undefined || lng == '' || lat == '') {
+ this.showToast('坐标有误');
+ return false;
+ }
+
+ // 转换坐标打开位置
+ var position = this.map_bd_to_gcj(parseFloat(lng), parseFloat(lat));
+ qq.openLocation({
+ name: name || '',
+ address: address || '',
+ scale: scale || 18,
+ longitude: position.lng,
+ latitude: position.lat
+ });
+ },
+
+ // uuid生成
+ uuid() {
+ var d = new Date().getTime();
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+ var r = (d + Math.random() * 16) % 16 | 0;
+ d = Math.floor(d / 16);
+ return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);
+ });
+ },
+
+ // 获取当前uuid
+ request_uuid() {
+ var uuid = qq.getStorageSync(this.data.cache_user_uuid_key) || null;
+ if(uuid == null) {
+ uuid = this.uuid();
+ qq.setStorage({
+ key: this.data.cache_user_uuid_key,
+ data: uuid,
+ fail: () => {
+ this.showToast('uuid缓存失败');
+ }
+ });
+ }
+ return uuid;
+ },
+
});
\ No newline at end of file
diff --git a/sourcecode/qq/app.json b/sourcecode/qq/app.json
index 03f9a021e..debee2e50 100755
--- a/sourcecode/qq/app.json
+++ b/sourcecode/qq/app.json
@@ -39,7 +39,8 @@
"pages/plugins/wallet/user-cash/user-cash",
"pages/plugins/wallet/user-cash-detail/user-cash-detail",
"pages/plugins/excellentbuyreturntocash/profit/profit",
- "pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail"
+ "pages/plugins/excellentbuyreturntocash/profit-detail/profit-detail",
+ "pages/plugins/exchangerate/currency/currency"
],
"window": {
"navigationBarTitleText": "{{application_title}}",
diff --git a/sourcecode/qq/components/quick-nav/quick-nav.js b/sourcecode/qq/components/quick-nav/quick-nav.js
new file mode 100644
index 000000000..9158b4ede
--- /dev/null
+++ b/sourcecode/qq/components/quick-nav/quick-nav.js
@@ -0,0 +1,56 @@
+const app = getApp();
+Component({
+ data: {
+ popup_status: false,
+ data_list: [],
+ system: null,
+ x: 0,
+ y: 0,
+ is_first: 1,
+ },
+ pageLifetimes: {
+ // 页面被展示
+ show: function() {
+ this.init_config();
+
+ // 非首次进入则重新初始化配置接口
+ if(this.data.is_first == 0) {
+ app.init_config();
+ }
+
+ // 数据设置
+ var system = app.get_system_info();
+ this.setData({
+ is_first: 0,
+ system: system,
+ x: 5,
+ y: (system.windowHeight || 450)-160,
+ });
+ },
+ },
+ methods: {
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({ data_list: app.get_config('quick_nav') || [] });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 弹层开启
+ quick_open_event(e) {
+ this.setData({popup_status: true, data_list: app.get_config('quick_nav') || []});
+ },
+
+ // 弹层关闭
+ quick_close_event(e) {
+ this.setData({ popup_status: false });
+ },
+
+ // 操作事件
+ navigation_event(e) {
+ app.operation_event(e);
+ },
+ },
+});
diff --git a/sourcecode/qq/components/quick-nav/quick-nav.json b/sourcecode/qq/components/quick-nav/quick-nav.json
new file mode 100644
index 000000000..66d926bfe
--- /dev/null
+++ b/sourcecode/qq/components/quick-nav/quick-nav.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "component-popup": "/components/popup/popup"
+ }
+}
\ No newline at end of file
diff --git a/sourcecode/qq/components/quick-nav/quick-nav.qml b/sourcecode/qq/components/quick-nav/quick-nav.qml
new file mode 100644
index 000000000..68e65603f
--- /dev/null
+++ b/sourcecode/qq/components/quick-nav/quick-nav.qml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/qq/components/quick-nav/quick-nav.qss b/sourcecode/qq/components/quick-nav/quick-nav.qss
new file mode 100644
index 000000000..3171674c0
--- /dev/null
+++ b/sourcecode/qq/components/quick-nav/quick-nav.qss
@@ -0,0 +1,101 @@
+/**
+ * 按钮
+ */
+ .quick-nav-movable-container {
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ top: 150rpx;
+ left: 0;
+ background:transparent;
+ pointer-events: none;
+ z-index: 2;
+}
+.quick-nav-event-submit {
+ pointer-events: auto;
+ position: fixed;
+ bottom: 150rpx;
+ width: 100rpx;
+ height: 100rpx;
+ border-radius: 50%;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
+ background-color: rgb(210 54 76 / 80%);
+}
+.quick-nav-event-submit image {
+ width: 50rpx;
+ height: 50rpx;
+ margin: 25rpx auto 25rpx auto;
+ display: block;
+}
+
+/**
+ * 弹窗
+ */
+.quick-nav-popup-container {
+ padding: 20rpx 10rpx 0 10rpx;
+ background: #fff;
+}
+.quick-nav-popup-container .close {
+ overflow: hidden;
+}
+.quick-nav-popup-container .close .icon-right {
+ float: right;
+}
+.quick-nav-popup-content {
+ max-height: 80vh;
+ overflow-y: scroll;
+ overflow-x: hidden;
+ padding-bottom: 20rpx;
+}
+
+/**
+ * 内容
+ */
+.quick-nav-data-list {
+ overflow: hidden;
+ background: #fff;
+}
+.quick-nav-data-list .items {
+ width: calc(25% - 60rpx);
+ float: left;
+ padding: 30rpx;
+}
+.quick-nav-data-list .items-content {
+ border-radius: 50%;
+ padding: 20rpx;
+ text-align: center;
+ width: 70rpx;
+ height: 70rpx;
+ margin: 0 auto;
+}
+.quick-nav-data-list .items image {
+ width: 60rpx !important;
+ height: 60rpx !important;
+ margin-top: 5rpx;
+}
+.quick-nav-data-list .items .title {
+ margin-top: 10rpx;
+ font-size: 28rpx !important;
+ text-align:center;
+ -o-text-overflow: ellipsis;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ max-width: 100%;
+}
+
+/*
+ * 没有数据
+ */
+.quick-nav-popup-container .no-data-box {
+ padding: 80rpx 0;
+ text-align: center;
+}
+.quick-nav-popup-container .no-data-box image {
+ width: 160rpx;
+ margin-bottom: 30rpx;
+}
+.quick-nav-popup-container .no-data-box .no-data-tips {
+ font-size: 28rpx;
+ color: #a6a6a6;
+}
\ No newline at end of file
diff --git a/sourcecode/qq/pages/buy/buy.js b/sourcecode/qq/pages/buy/buy.js
index be0470d54..b677f18c8 100755
--- a/sourcecode/qq/pages/buy/buy.js
+++ b/sourcecode/qq/pages/buy/buy.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_list_loding_status: 1,
buy_submit_disabled_status: false,
data_list_loding_msg: '',
@@ -16,7 +15,6 @@ Page({
is_first: 1,
extension_data: [],
payment_id: 0,
- common_order_is_booking: 0,
common_site_type: 0,
extraction_address: [],
site_model: 0,
@@ -25,6 +23,10 @@ Page({
{ name: "自提点取货", value: 2 }
],
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
+ common_order_is_booking: 0,
+
// 优惠劵
plugins_coupon_data: null,
plugins_use_coupon_ids: [],
@@ -44,11 +46,29 @@ Page({
},
onShow() {
+ qq.setNavigationBarTitle({ title: app.data.common_pages_title.buy });
+
+ // 数据加载
this.init();
this.setData({ is_first: 0 });
+
+ // 初始化配置
+ this.init_config();
},
- // 获取数据列表
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ common_order_is_booking: app.get_config('config.common_order_is_booking'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
// 订单参数信息是否正确
if (this.data.params == null) {
@@ -102,7 +122,6 @@ Page({
total_price: data.base.actual_price,
extension_data: data.extension_data || [],
data_list_loding_status: 3,
- common_order_is_booking: data.common_order_is_booking || 0,
common_site_type: data.common_site_type || 0,
extraction_address: data.base.extraction_address || [],
plugins_coupon_data: data.plugins_coupon_data || null,
@@ -359,14 +378,9 @@ Page({
return false;
}
- var lng = parseFloat(data.lng || 0);
- var lat = parseFloat(data.lat || 0);
- qq.openLocation({
- latitude: lat,
- longitude: lng,
- scale: 18,
- name: data.name || data.alias || '',
- address: (data.province_name || '') + (data.city_name || '') + (data.county_name || '') + (data.address || ''),
- });
+ // 打开地图
+ var name = data.name || data.alias || '';
+ var address = (data.province_name || '') + (data.city_name || '') + (data.county_name || '') + (data.address || '');
+ app.open_location(data.lng, data.lat, name, address);
},
});
diff --git a/sourcecode/qq/pages/buy/buy.json b/sourcecode/qq/pages/buy/buy.json
index 7d179bfd5..1ea7faef3 100755
--- a/sourcecode/qq/pages/buy/buy.json
+++ b/sourcecode/qq/pages/buy/buy.json
@@ -1,6 +1,7 @@
{
"enablePullDownRefresh": true,
"usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav",
"component-popup": "/components/popup/popup"
}
}
\ No newline at end of file
diff --git a/sourcecode/qq/pages/buy/buy.qml b/sourcecode/qq/pages/buy/buy.qml
index 341cdb7fe..e343a3149 100755
--- a/sourcecode/qq/pages/buy/buy.qml
+++ b/sourcecode/qq/pages/buy/buy.qml
@@ -2,7 +2,7 @@
-
+
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/qq/pages/cart/cart.js b/sourcecode/qq/pages/cart/cart.js
index 99d08fe09..9a00e01d8 100755
--- a/sourcecode/qq/pages/cart/cart.js
+++ b/sourcecode/qq/pages/cart/cart.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_bottom_line_status: false,
@@ -11,17 +10,38 @@ Page({
is_selected_all: false,
buy_submit_disabled_status: true,
- // 站点模式
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
common_site_type: 0,
common_is_exhibition_mode_btn_text: null,
- customer_service_tel: null,
+ common_app_customer_service_tel: null,
},
onShow() {
qq.setNavigationBarTitle({ title: app.data.common_pages_title.cart });
+
+ // 数据加载
this.init();
+
+ // 初始化配置
+ this.init_config();
},
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ common_site_type: app.get_config('config.common_site_type'),
+ common_is_exhibition_mode_btn_text: app.get_config('config.common_is_exhibition_mode_btn_text', '立即咨询'),
+ common_app_customer_service_tel: app.get_config('config.common_app_customer_service_tel'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init(e) {
var user = app.get_user_info(this, "init");
if (user != false) {
@@ -84,11 +104,6 @@ Page({
data_list_loding_status: data.data.length == 0 ? 0 : 3,
data_bottom_line_status: true,
data_list_loding_msg: '购物车空空如也',
-
- // 站点模式
- common_site_type: data.common_site_type || 0,
- common_is_exhibition_mode_btn_text: data.common_is_exhibition_mode_btn_text || '立即咨询',
- customer_service_tel: data.customer_service_tel || null,
});
// 导航购物车处理
@@ -384,7 +399,7 @@ Page({
// 展示型事件
exhibition_submit_event(e) {
- app.call_tel(this.data.customer_service_tel);
+ app.call_tel(this.data.common_app_customer_service_tel);
},
});
diff --git a/sourcecode/qq/pages/cart/cart.json b/sourcecode/qq/pages/cart/cart.json
index 312ca36b1..057eb057a 100755
--- a/sourcecode/qq/pages/cart/cart.json
+++ b/sourcecode/qq/pages/cart/cart.json
@@ -1,5 +1,6 @@
{
"enablePullDownRefresh": true,
"usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav"
}
}
\ No newline at end of file
diff --git a/sourcecode/qq/pages/cart/cart.qml b/sourcecode/qq/pages/cart/cart.qml
index 511c10df6..fa79c8f27 100755
--- a/sourcecode/qq/pages/cart/cart.qml
+++ b/sourcecode/qq/pages/cart/cart.qml
@@ -81,4 +81,7 @@
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/qq/pages/extraction-address/extraction-address.js b/sourcecode/qq/pages/extraction-address/extraction-address.js
index 7e5d03d2a..1cbe3228d 100644
--- a/sourcecode/qq/pages/extraction-address/extraction-address.js
+++ b/sourcecode/qq/pages/extraction-address/extraction-address.js
@@ -107,22 +107,17 @@ Page({
// 地图查看
address_map_event(e) {
var index = e.currentTarget.dataset.index || 0;
- var ads = this.data.data_list[index] || null;
- if (ads == null)
+ var data = this.data.data_list[index] || null;
+ if (data == null)
{
app.showToast("地址有误");
return false;
}
- var lng = parseFloat(ads.lng || 0);
- var lat = parseFloat(ads.lat || 0);
- qq.openLocation({
- latitude: lat,
- longitude: lng,
- scale: 18,
- name: ads.alias || '',
- address: (ads.province_name || '') + (ads.city_name || '') + (ads.county_name || '') + (ads.address || ''),
- });
+ // 打开地图
+ var name = data.name || data.alias || '';
+ var address = (data.province_name || '') + (data.city_name || '') + (data.county_name || '') + (data.address || '');
+ app.open_location(data.lng, data.lat, name, address);
},
// 地址内容事件
diff --git a/sourcecode/qq/pages/goods-category/goods-category.js b/sourcecode/qq/pages/goods-category/goods-category.js
index 758745886..41874e108 100755
--- a/sourcecode/qq/pages/goods-category/goods-category.js
+++ b/sourcecode/qq/pages/goods-category/goods-category.js
@@ -4,16 +4,31 @@ Page({
data_list_loding_status: 1,
nav_active_index: 0,
data_list: [],
- category_show_level: 3,
data_content: null,
+
+ // 基础配置
+ category_show_level: 3,
},
onShow() {
qq.setNavigationBarTitle({title: app.data.common_pages_title.goods_category});
+
+ // 数据加载
this.init();
- // 显示分享菜单
- app.show_share_menu();
+ // 初始化配置
+ this.init_config();
+ },
+
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ category_show_level: app.get_config('config.category_show_level'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
},
// 获取数据
@@ -43,7 +58,6 @@ Page({
}
this.setData({
data_list: category,
- category_show_level: res.data.data.category_show_level || 3,
data_content: data_content,
data_list_loding_status: category.length == 0 ? 0 : 3,
data_bottom_line_status: true,
diff --git a/sourcecode/qq/pages/goods-category/goods-category.json b/sourcecode/qq/pages/goods-category/goods-category.json
index 1e3ffd8f1..6e46c5533 100755
--- a/sourcecode/qq/pages/goods-category/goods-category.json
+++ b/sourcecode/qq/pages/goods-category/goods-category.json
@@ -1,5 +1,6 @@
{
"enablePullDownRefresh": true,
"usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav"
}
}
\ No newline at end of file
diff --git a/sourcecode/qq/pages/goods-category/goods-category.qml b/sourcecode/qq/pages/goods-category/goods-category.qml
index e5b56c242..62a1f1542 100755
--- a/sourcecode/qq/pages/goods-category/goods-category.qml
+++ b/sourcecode/qq/pages/goods-category/goods-category.qml
@@ -12,7 +12,7 @@
-
+
@@ -62,7 +62,7 @@
-
+
@@ -74,4 +74,7 @@
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/qq/pages/goods-detail/goods-detail.js b/sourcecode/qq/pages/goods-detail/goods-detail.js
index 16a3ef64c..e11244564 100755
--- a/sourcecode/qq/pages/goods-detail/goods-detail.js
+++ b/sourcecode/qq/pages/goods-detail/goods-detail.js
@@ -1,8 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
-
indicator_dots: false,
indicator_color: 'rgba(0, 0, 0, .3)',
indicator_active_color: '#e31c55',
@@ -17,7 +15,6 @@ Page({
goods_photo: [],
goods_specifications_choose: [],
goods_content_app: [],
-
popup_status: false,
goods_favor_text: '收藏',
goods_favor_icon: '/images/goods-detail-favor-icon-0.png',
@@ -25,6 +22,8 @@ Page({
buy_event_type: 'buy',
nav_submit_text: '立即购买',
nav_submit_is_disabled: true,
+ common_site_type: 0,
+ is_goods_site_type_consistent: 0,
goods_spec_base_price: 0,
goods_spec_base_original_price: 0,
@@ -32,12 +31,18 @@ Page({
goods_spec_base_images: '',
show_field_price_text: null,
-
goods_video_is_autoplay: false,
- common_app_is_use_mobile_detail: 1,
- common_is_goods_detail_show_photo: 0,
+ popup_share_status: false,
+ // 购物车快捷导航
+ quick_nav_cart_count: 0,
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
common_app_is_online_service: 0,
+ common_app_is_use_mobile_detail: 0,
+ common_is_goods_detail_show_photo: 0,
+ common_app_customer_service_tel: null,
// 限时秒杀插件
plugins_limitedtimediscount_is_valid: 0,
@@ -47,33 +52,8 @@ Page({
plugins_limitedtimediscount_timer: null,
plugins_limitedtimediscount_timers: null,
- // 好物圈分享信息
- common_app_is_good_thing : 0,
- share_product: {
- "item_code": "",
- "title": "",
- "desc": "",
- "category_list": [],
- "image_list": [],
- "src_mini_program_path": "",
- "brand_info": {},
- },
-
- // 海报分享
- common_app_is_poster_share: 0,
-
// 优惠劵
plugins_coupon_data: null,
-
- // 购物车快捷导航
- quick_nav_cart_count: 0,
-
- // 站点模式
- common_site_type: 0,
- is_goods_site_type_consistent: 0,
- customer_service_tel: null,
-
- // 优惠劵领取
temp_coupon_receive_index: null,
temp_coupon_receive_value: null,
},
@@ -85,14 +65,37 @@ Page({
// 参数赋值,初始化
//params['goods_id']=2;
this.setData({params: params});
- this.init();
},
onShow() {
qq.setNavigationBarTitle({title: (this.data.goods == null) ? app.data.common_pages_title.goods_detail : this.data.goods.title});
+
+ // 数据加载
+ this.init();
+
+ // 初始化配置
+ this.init_config();
+
+ // 显示分享菜单
+ app.show_share_menu();
},
- // 获取数据列表
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ common_app_is_use_mobile_detail: app.get_config('config.common_app_is_use_mobile_detail'),
+ common_is_goods_detail_show_photo: app.get_config('config.common_is_goods_detail_show_photo'),
+ common_app_is_online_service: app.get_config('config.common_app_is_online_service'),
+ common_app_customer_service_tel: app.get_config('config.common_app_customer_service_tel'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
// 参数校验
if((this.data.params.goods_id || null) == null)
@@ -124,6 +127,8 @@ Page({
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
+ data_bottom_line_status: true,
+ data_list_loding_status: 3,
goods: data.goods,
indicator_dots: (data.goods.photo.length > 1),
autoplay: (data.goods.photo.length > 1),
@@ -133,23 +138,18 @@ Page({
temp_buy_number: data.goods.buy_min_number || 1,
goods_favor_text: (data.goods.is_favor == 1) ? '已收藏' : '收藏',
goods_favor_icon: '/images/goods-detail-favor-icon-' + data.goods.is_favor+'.png',
- data_bottom_line_status: true,
- data_list_loding_status: 3,
+
+ nav_submit_text: data.nav_submit_text,
+ nav_submit_is_disabled: data.nav_submit_is_disabled,
+ common_site_type: data.common_site_type || 0,
+ is_goods_site_type_consistent: data.is_goods_site_type_consistent || 0,
goods_spec_base_price: data.goods.price,
goods_spec_base_original_price: data.goods.original_price,
goods_spec_base_inventory: data.goods.inventory,
goods_spec_base_images: data.goods.images,
-
show_field_price_text: (data.goods.show_field_price_text == '销售价') ? null : (data.goods.show_field_price_text.replace(/<[^>]+>/g, "") || null),
- common_app_is_use_mobile_detail: data.common_app_is_use_mobile_detail || 0,
- common_is_goods_detail_show_photo: data.common_is_goods_detail_show_photo || 0,
- //common_app_is_online_service: data.common_app_is_online_service || 0,
- plugins_limitedtimediscount_data: data.plugins_limitedtimediscount_data || null,
- plugins_limitedtimediscount_is_valid: ((data.plugins_limitedtimediscount_data || null) != null && (data.plugins_limitedtimediscount_data.is_valid || 0) == 1) ? 1 : 0,
-
- common_app_is_good_thing: data.common_app_is_good_thing || 0,
'share_product.item_code': data.goods.id.toString(),
'share_product.title': data.goods.title,
'share_product.image_list': data.goods.photo.map(function (v) { return v.images;}),
@@ -158,7 +158,9 @@ Page({
'share_product.src_mini_program_path': '/pages/goods-detail/goods-detail?goods_id='+data.goods.id,
'share_product.brand_info.name': data.goods.brand_name,
- common_app_is_poster_share: data.common_app_is_poster_share || 0,
+ plugins_limitedtimediscount_data: data.plugins_limitedtimediscount_data || null,
+ plugins_limitedtimediscount_is_valid: ((data.plugins_limitedtimediscount_data || null) != null && (data.plugins_limitedtimediscount_data.is_valid || 0) == 1) ? 1 : 0,
+
plugins_coupon_data: data.plugins_coupon_data || null,
quick_nav_cart_count: data.common_cart_total || 0,
});
@@ -173,34 +175,6 @@ Page({
// 不能选择规格处理
this.goods_specifications_choose_handle_dont(0);
-
- // 购买按钮处理
- var nav_submit_text = ((data.common_order_is_booking || 0) == 0) ? '立即购买' : '立即预约';
- var nav_submit_is_disabled = (data.goods.is_shelves == 1 && data.goods.inventory > 0) ? false : true;
- if (data.goods.is_shelves != 1) {
- nav_submit_text = '已下架';
- nav_submit_is_disabled = true;
- } else {
- if(data.goods.inventory <= 0) {
- nav_submit_text = '卖光了';
- nav_submit_is_disabled = true;
- }
- }
-
- // 站点模式 - 是否展示型
- var common_site_type = data.common_site_type || 0;
- if (common_site_type == 1) {
- nav_submit_text = data.common_is_exhibition_mode_btn_text || '立即咨询';
- }
-
- // 数据赋值
- this.setData({
- nav_submit_text: nav_submit_text,
- nav_submit_is_disabled: nav_submit_is_disabled,
- common_site_type: common_site_type,
- is_goods_site_type_consistent: data.is_goods_site_type_consistent || 0,
- customer_service_tel: data.customer_service_tel || null,
- });
} else {
self.setData({
data_bottom_line_status: false,
@@ -867,7 +841,7 @@ Page({
// 展示型事件
exhibition_submit_event(e) {
- app.call_tel(this.data.customer_service_tel);
+ app.call_tel(this.data.common_app_customer_service_tel);
},
// 自定义分享
diff --git a/sourcecode/qq/pages/goods-detail/goods-detail.json b/sourcecode/qq/pages/goods-detail/goods-detail.json
index bdfdb2f27..0b69a1075 100755
--- a/sourcecode/qq/pages/goods-detail/goods-detail.json
+++ b/sourcecode/qq/pages/goods-detail/goods-detail.json
@@ -1,6 +1,7 @@
{
"enablePullDownRefresh": true,
"usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav",
"component-popup": "/components/popup/popup",
"component-badge": "/components/badge/badge"
}
diff --git a/sourcecode/qq/pages/goods-detail/goods-detail.qml b/sourcecode/qq/pages/goods-detail/goods-detail.qml
index a4746fc13..0c51fe065 100755
--- a/sourcecode/qq/pages/goods-detail/goods-detail.qml
+++ b/sourcecode/qq/pages/goods-detail/goods-detail.qml
@@ -248,4 +248,7 @@
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/qq/pages/goods-search/goods-search.js b/sourcecode/qq/pages/goods-search/goods-search.js
index 84f512a79..6c332a0fc 100755
--- a/sourcecode/qq/pages/goods-search/goods-search.js
+++ b/sourcecode/qq/pages/goods-search/goods-search.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_list_loding_status: 1,
data_bottom_line_status: false,
data_list: [],
@@ -18,18 +17,46 @@ Page({
{ name: "价格", field: "min_price", sort: "asc", "icon": "default" },
{ name: "最新", field: "id", sort: "asc", "icon": "default" }
],
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
},
onLoad(params) {
- this.setData({params: params, post_data: params});
- this.init();
+ // 启动参数处理
+ params = app.launch_params_handle(params);
+
+ // 初始参数
+ this.setData({
+ params: params,
+ post_data: {
+ keywords: params.keywords || ''
+ }
+ });
},
onShow() {
qq.setNavigationBarTitle({title: app.data.common_pages_title.goods_search});
+
+ // 数据加载
+ this.init();
+
+ // 初始化配置
+ this.init_config();
},
- // 初始化
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
// 获取数据
this.get_data_list();
diff --git a/sourcecode/qq/pages/goods-search/goods-search.json b/sourcecode/qq/pages/goods-search/goods-search.json
index 7d179bfd5..1ea7faef3 100755
--- a/sourcecode/qq/pages/goods-search/goods-search.json
+++ b/sourcecode/qq/pages/goods-search/goods-search.json
@@ -1,6 +1,7 @@
{
"enablePullDownRefresh": true,
"usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav",
"component-popup": "/components/popup/popup"
}
}
\ No newline at end of file
diff --git a/sourcecode/qq/pages/goods-search/goods-search.qml b/sourcecode/qq/pages/goods-search/goods-search.qml
index 003a7373a..8c7e30cc1 100755
--- a/sourcecode/qq/pages/goods-search/goods-search.qml
+++ b/sourcecode/qq/pages/goods-search/goods-search.qml
@@ -53,4 +53,7 @@
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/qq/pages/index/index.js b/sourcecode/qq/pages/index/index.js
index 1c9177752..a95fe2a10 100755
--- a/sourcecode/qq/pages/index/index.js
+++ b/sourcecode/qq/pages/index/index.js
@@ -1,16 +1,18 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
load_status: 0,
data_list_loding_status: 1,
data_bottom_line_status: false,
data_list: [],
banner_list: [],
navigation: [],
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
common_shop_notice: null,
- common_app_is_enable_search: 1,
- common_app_is_enable_answer: 1,
+ common_app_is_enable_search: 0,
+ common_app_is_enable_answer: 0,
common_app_is_header_nav_fixed: 0,
common_app_is_online_service: 0,
@@ -23,10 +25,30 @@ Page({
},
onShow() {
+ // 数据加载
this.init();
+
+ // 初始化配置
+ this.init_config();
},
- // 获取数据列表
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ common_shop_notice: app.get_config('config.common_shop_notice'),
+ common_app_is_enable_search: app.get_config('config.common_app_is_enable_search'),
+ common_app_is_enable_answer: app.get_config('config.common_app_is_enable_answer'),
+ common_app_is_header_nav_fixed: app.get_config('config.common_app_is_header_nav_fixed'),
+ common_app_is_online_service: app.get_config('config.common_app_is_online_service'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
var self = this;
@@ -52,10 +74,6 @@ Page({
banner_list: data.banner_list || [],
navigation: data.navigation || [],
data_list: data.data_list,
- common_shop_notice: data.common_shop_notice || null,
- common_app_is_enable_search: data.common_app_is_enable_search,
- common_app_is_enable_answer: data.common_app_is_enable_answer,
- common_app_is_header_nav_fixed: data.common_app_is_header_nav_fixed,
data_list_loding_status: data.data_list.length == 0 ? 0 : 3,
plugins_limitedtimediscount_data: data.plugins_limitedtimediscount_data || null,
plugins_limitedtimediscount_is_valid: ((data.plugins_limitedtimediscount_data || null) != null && (data.plugins_limitedtimediscount_data.is_valid || 0) == 1) ? 1 : 0,
diff --git a/sourcecode/qq/pages/index/index.json b/sourcecode/qq/pages/index/index.json
index 7d3a94bab..56fe01f9c 100755
--- a/sourcecode/qq/pages/index/index.json
+++ b/sourcecode/qq/pages/index/index.json
@@ -5,6 +5,7 @@
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav",
"component-icon-nav": "/components/icon-nav/icon-nav",
"component-banner": "/components/slider/slider"
}
diff --git a/sourcecode/qq/pages/index/index.qml b/sourcecode/qq/pages/index/index.qml
index 3a70f0434..ab9c6d409 100755
--- a/sourcecode/qq/pages/index/index.qml
+++ b/sourcecode/qq/pages/index/index.qml
@@ -8,7 +8,7 @@
-
+
{{common_shop_notice}}
@@ -81,6 +81,9 @@
+
+
+
diff --git a/sourcecode/qq/pages/plugins/coupon/index/index.js b/sourcecode/qq/pages/plugins/coupon/index/index.js
index 1465c42ce..8efda4861 100644
--- a/sourcecode/qq/pages/plugins/coupon/index/index.js
+++ b/sourcecode/qq/pages/plugins/coupon/index/index.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',
@@ -11,16 +10,31 @@ Page({
// 优惠劵领取
temp_coupon_receive_index: null,
temp_coupon_receive_value: null,
- },
- onLoad(params) {
- this.init();
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
},
onShow() {
- qq.setNavigationBarTitle({ title: app.data.common_pages_title.coupon });
+ // 数据加载
+ this.init();
+
+ // 初始化配置
+ this.init_config();
},
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
// 获取数据
this.get_data_list();
diff --git a/sourcecode/qq/pages/plugins/coupon/index/index.json b/sourcecode/qq/pages/plugins/coupon/index/index.json
index 331ad4f3d..2ba4ed159 100644
--- a/sourcecode/qq/pages/plugins/coupon/index/index.json
+++ b/sourcecode/qq/pages/plugins/coupon/index/index.json
@@ -1,3 +1,4 @@
{
- "enablePullDownRefresh": true
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": "领劵中心"
}
\ No newline at end of file
diff --git a/sourcecode/qq/pages/plugins/coupon/user/user.js b/sourcecode/qq/pages/plugins/coupon/user/user.js
index 838761f99..58dd153ef 100644
--- a/sourcecode/qq/pages/plugins/coupon/user/user.js
+++ b/sourcecode/qq/pages/plugins/coupon/user/user.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',
@@ -13,16 +12,31 @@ Page({
{ name: "已过期", value: "already_expire" },
],
nav_tabs_value: 'not_use',
- },
- onLoad(params) {
- this.init();
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
},
onShow() {
- qq.setNavigationBarTitle({ title: app.data.common_pages_title.user_coupon });
+ // 数据加载
+ this.init();
+
+ // 初始化配置
+ this.init_config();
},
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
var user = app.get_user_info(this, "init");
if (user != false) {
diff --git a/sourcecode/qq/pages/plugins/coupon/user/user.json b/sourcecode/qq/pages/plugins/coupon/user/user.json
index 331ad4f3d..2a5d55f78 100644
--- a/sourcecode/qq/pages/plugins/coupon/user/user.json
+++ b/sourcecode/qq/pages/plugins/coupon/user/user.json
@@ -1,3 +1,4 @@
{
- "enablePullDownRefresh": true
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": "优惠券"
}
\ No newline at end of file
diff --git a/sourcecode/qq/pages/plugins/exchangerate/currency/currency.js b/sourcecode/qq/pages/plugins/exchangerate/currency/currency.js
new file mode 100644
index 000000000..72ab73ea7
--- /dev/null
+++ b/sourcecode/qq/pages/plugins/exchangerate/currency/currency.js
@@ -0,0 +1,126 @@
+const app = getApp();
+Page({
+ data: {
+ data_bottom_line_status: false,
+ data_list_loding_status: 1,
+ data_list_loding_msg: '',
+ data_list: [],
+ data_default: null,
+ data_base: null,
+ },
+
+ onShow() {
+ // 数据加载
+ this.init();
+ },
+
+ // 获取数据
+ init() {
+ this.get_data_list();
+ },
+
+ // 获取数据
+ get_data_list() {
+ var self = this;
+ qq.showLoading({ title: "加载中..." });
+ if (self.data.data_list.length <= 0)
+ {
+ self.setData({
+ data_list_loding_status: 1
+ });
+ }
+
+ qq.request({
+ url: app.get_request_url("index", "index", "exchangerate"),
+ method: "POST",
+ data: {},
+ dataType: "json",
+ success: res => {
+ qq.hideLoading();
+ qq.stopPullDownRefresh();
+ if (res.data.code == 0) {
+ var data = res.data.data;
+ var status = ((data.data.data || []).length > 0);
+ this.setData({
+ data_base: data.base || null,
+ data_default: data.data.default || null,
+ data_list: data.data.data || [],
+ data_list_loding_msg: '',
+ data_list_loding_status: status ? 3 : 0,
+ data_bottom_line_status: status,
+ });
+ } else {
+ self.setData({
+ data_bottom_line_status: false,
+ data_list_loding_status: 2,
+ data_list_loding_msg: res.data.msg,
+ });
+ app.showToast(res.data.msg);
+ }
+ },
+ fail: () => {
+ qq.hideLoading();
+ qq.stopPullDownRefresh();
+ self.setData({
+ data_bottom_line_status: false,
+ data_list_loding_status: 2,
+ data_list_loding_msg: '服务器请求出错',
+ });
+ app.showToast("服务器请求出错");
+ }
+ });
+ },
+
+ // 选择事件
+ selected_event(e) {
+ // 参数处理
+ var index = e.currentTarget.dataset.index;
+ var temp_list = this.data.data_list;
+ var data = temp_list[index] || null;
+ if(data == null)
+ {
+ app.showToast('数据有误');
+ return false;
+ }
+
+ // id与当前默认一致则不处理
+ if (data.id != this.data.data_default.id)
+ {
+ var self = this;
+ qq.showLoading({ title: "处理中..." });
+ qq.request({
+ url: app.get_request_url("setcurrency", "index", "exchangerate"),
+ method: "POST",
+ data: { "currency": data.id },
+ dataType: "json",
+ header: { 'content-type': 'application/x-www-form-urlencoded' },
+ success: res => {
+ qq.hideLoading();
+ if (res.data.code == 0) {
+ app.showToast(res.data.msg, "success");
+ self.setData({ data_default: data });
+ // 重新初始化配置
+ app.init_config();
+
+ // 返回上一页
+ setTimeout(function () {
+ qq.navigateBack();
+ }, 1500);
+ } else {
+ app.showToast(res.data.msg);
+ }
+ },
+ fail: () => {
+ qq.hideLoading();
+ app.showToast("服务器请求出错");
+ }
+ });
+ }
+ },
+
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.get_data_list();
+ },
+
+});
diff --git a/sourcecode/qq/pages/plugins/exchangerate/currency/currency.json b/sourcecode/qq/pages/plugins/exchangerate/currency/currency.json
new file mode 100644
index 000000000..eac1d0379
--- /dev/null
+++ b/sourcecode/qq/pages/plugins/exchangerate/currency/currency.json
@@ -0,0 +1,4 @@
+{
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": "货币切换"
+}
\ No newline at end of file
diff --git a/sourcecode/qq/pages/plugins/exchangerate/currency/currency.qml b/sourcecode/qq/pages/plugins/exchangerate/currency/currency.qml
new file mode 100644
index 000000000..e515555bd
--- /dev/null
+++ b/sourcecode/qq/pages/plugins/exchangerate/currency/currency.qml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+ {{item.name}} / {{item.symbol}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/qq/pages/plugins/exchangerate/currency/currency.qss b/sourcecode/qq/pages/plugins/exchangerate/currency/currency.qss
new file mode 100644
index 000000000..b0fc4eb85
--- /dev/null
+++ b/sourcecode/qq/pages/plugins/exchangerate/currency/currency.qss
@@ -0,0 +1,14 @@
+.exchangerate-container .item {
+ padding: 20rpx 10rpx;
+ font-size: 36rpx;
+}
+.exchangerate-container .item .icon image {
+ width: 50rpx;
+ height: 50rpx !important;
+ margin: 0 10rpx;
+ vertical-align: middle;
+}
+.exchangerate-container .item .single-text {
+ width: calc(100% - 80rpx);
+ line-height: 50rpx;
+}
\ No newline at end of file
diff --git a/sourcecode/qq/pages/plugins/wallet/cash-auth/cash-auth.qml b/sourcecode/qq/pages/plugins/wallet/cash-auth/cash-auth.qml
index 6e59e0df7..5e53c1b0c 100644
--- a/sourcecode/qq/pages/plugins/wallet/cash-auth/cash-auth.qml
+++ b/sourcecode/qq/pages/plugins/wallet/cash-auth/cash-auth.qml
@@ -8,7 +8,7 @@
请选择认证账号
-
+
{{check_account_list[check_account_value]['msg']}}
@@ -40,7 +40,7 @@
-
+
\ No newline at end of file
diff --git a/sourcecode/qq/pages/plugins/wallet/cash-create/cash-create.qml b/sourcecode/qq/pages/plugins/wallet/cash-create/cash-create.qml
index 43f747388..580bd9b30 100644
--- a/sourcecode/qq/pages/plugins/wallet/cash-create/cash-create.qml
+++ b/sourcecode/qq/pages/plugins/wallet/cash-create/cash-create.qml
@@ -45,7 +45,7 @@
-
+
\ No newline at end of file
diff --git a/sourcecode/qq/pages/plugins/wallet/user-recharge/user-recharge.qml b/sourcecode/qq/pages/plugins/wallet/user-recharge/user-recharge.qml
index c48c1b5e0..71796b1ba 100644
--- a/sourcecode/qq/pages/plugins/wallet/user-recharge/user-recharge.qml
+++ b/sourcecode/qq/pages/plugins/wallet/user-recharge/user-recharge.qml
@@ -59,5 +59,5 @@
- 没有支付方式
+ 没有支付方式
\ No newline at end of file
diff --git a/sourcecode/qq/pages/user-faovr/user-faovr.js b/sourcecode/qq/pages/user-faovr/user-faovr.js
index 49344e52d..8ebebaf5a 100755
--- a/sourcecode/qq/pages/user-faovr/user-faovr.js
+++ b/sourcecode/qq/pages/user-faovr/user-faovr.js
@@ -1,19 +1,38 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_list: [],
data_page_total: 0,
data_page: 1,
data_list_loding_status: 1,
data_bottom_line_status: false,
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
},
onShow() {
qq.setNavigationBarTitle({title: app.data.common_pages_title.user_favor});
+
+ // 数据加载
this.init();
+
+ // 初始化配置
+ this.init_config();
},
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
var user = app.get_user_info(this, "init");
if (user != false) {
diff --git a/sourcecode/qq/pages/user-goods-browse/user-goods-browse.js b/sourcecode/qq/pages/user-goods-browse/user-goods-browse.js
index b0ad5242d..f32d8e7f5 100755
--- a/sourcecode/qq/pages/user-goods-browse/user-goods-browse.js
+++ b/sourcecode/qq/pages/user-goods-browse/user-goods-browse.js
@@ -1,19 +1,38 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_list: [],
data_page_total: 0,
data_page: 1,
data_list_loding_status: 1,
data_bottom_line_status: false,
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
},
onShow() {
qq.setNavigationBarTitle({ title: app.data.common_pages_title.user_goods_browse });
+
+ // 数据加载
this.init();
+
+ // 初始化配置
+ this.init_config();
},
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
var user = app.get_user_info(this, "init");
if (user != false) {
diff --git a/sourcecode/qq/pages/user-order-detail/user-order-detail.js b/sourcecode/qq/pages/user-order-detail/user-order-detail.js
index a84f5b4d4..52f01ebc4 100755
--- a/sourcecode/qq/pages/user-order-detail/user-order-detail.js
+++ b/sourcecode/qq/pages/user-order-detail/user-order-detail.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
@@ -16,13 +15,16 @@ Page({
onLoad(params) {
//params['id'] = 5;
this.setData({params: params});
- this.init();
},
onShow() {
qq.setNavigationBarTitle({title: app.data.common_pages_title.user_order_detail});
+
+ // 数据加载
+ this.init();
},
+ // 获取数据
init() {
var self = this;
qq.showLoading({title: "加载中..." });
@@ -105,17 +107,12 @@ Page({
app.showToast("地址有误");
return false;
}
+ var data = this.data.detail.address_data;
- var ads = this.data.detail.address_data;
- var lng = parseFloat(ads.lng || 0);
- var lat = parseFloat(ads.lat || 0);
- qq.openLocation({
- latitude: lat,
- longitude: lng,
- scale: 18,
- name: ads.alias || '',
- address: (ads.province_name || '') + (ads.city_name || '') + (ads.county_name || '') + (ads.address || ''),
- });
+ // 打开地图
+ var name = data.name || data.alias || '';
+ var address = (data.province_name || '') + (data.city_name || '') + (data.county_name || '') + (data.address || '');
+ app.open_location(data.lng, data.lat, name, address);
},
// 下拉刷新
diff --git a/sourcecode/qq/pages/user-order-detail/user-order-detail.qml b/sourcecode/qq/pages/user-order-detail/user-order-detail.qml
index 9f7971fec..ff6af409a 100755
--- a/sourcecode/qq/pages/user-order-detail/user-order-detail.qml
+++ b/sourcecode/qq/pages/user-order-detail/user-order-detail.qml
@@ -29,8 +29,8 @@
- {{currency_symbol}}{{item.price}}
- {{currency_symbol}}{{item.original_price}}
+ {{detail.currency_data.currency_symbol}}{{item.price}}
+ {{detail.currency_data.currency_symbol}}{{item.original_price}}
x{{item.buy_number}}
diff --git a/sourcecode/qq/pages/user-order/user-order.js b/sourcecode/qq/pages/user-order/user-order.js
index d29b261ea..5fde76f75 100755
--- a/sourcecode/qq/pages/user-order/user-order.js
+++ b/sourcecode/qq/pages/user-order/user-order.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_list: [],
data_page_total: 0,
data_page: 1,
@@ -42,13 +41,16 @@ Page({
params: params,
nav_status_index: nav_status_index,
});
- this.init();
},
onShow() {
qq.setNavigationBarTitle({title: app.data.common_pages_title.user_order});
+
+ // 数据加载
+ this.init();
},
+ // 获取数据
init() {
var user = app.get_user_info(this, 'init');
if (user != false) {
diff --git a/sourcecode/qq/pages/user-order/user-order.qml b/sourcecode/qq/pages/user-order/user-order.qml
index 209f3277f..1f278bd7d 100755
--- a/sourcecode/qq/pages/user-order/user-order.qml
+++ b/sourcecode/qq/pages/user-order/user-order.qml
@@ -3,7 +3,7 @@
{{item.name}}
- {{item.name}}
+ {{item.name}}
@@ -33,8 +33,8 @@
{{detail.orderaftersale_btn_text}}
- {{currency_symbol}}{{detail.price}}
- {{currency_symbol}}{{detail.original_price}}
+ {{item.currency_data.currency_symbol}}{{detail.price}}
+ {{item.currency_data.currency_symbol}}{{detail.original_price}}
x{{detail.buy_number}}
@@ -76,5 +76,5 @@
- 没有支付方式
+ 没有支付方式
\ No newline at end of file
diff --git a/sourcecode/qq/pages/user-orderaftersale-detail/user-orderaftersale-detail.js b/sourcecode/qq/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
index 82c0c2bd7..d5bdf2863 100644
--- a/sourcecode/qq/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
+++ b/sourcecode/qq/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
@@ -117,13 +116,16 @@ Page({
params: params,
popup_delivery_status: ((params.is_delivery_popup || 0) == 1),
});
- this.init();
},
onShow() {
qq.setNavigationBarTitle({ title: app.data.common_pages_title.user_orderaftersale_detail });
+
+ // 数据加载
+ this.init();
},
+ // 获取数据
init() {
var self = this;
qq.showLoading({ title: "加载中..." });
diff --git a/sourcecode/qq/pages/user-orderaftersale-detail/user-orderaftersale-detail.qml b/sourcecode/qq/pages/user-orderaftersale-detail/user-orderaftersale-detail.qml
index cfae5cf39..8d6c7b493 100644
--- a/sourcecode/qq/pages/user-orderaftersale-detail/user-orderaftersale-detail.qml
+++ b/sourcecode/qq/pages/user-orderaftersale-detail/user-orderaftersale-detail.qml
@@ -13,8 +13,8 @@
- {{currency_symbol}}{{order_data.items.price}}
- {{currency_symbol}}{{order_data.items.original_price}}
+ {{order_data.currency_data.currency_symbol}}{{order_data.items.price}}
+ {{order_data.currency_data.currency_symbol}}{{order_data.items.original_price}}
x{{order_data.items.buy_number}}
diff --git a/sourcecode/qq/pages/user-orderaftersale/user-orderaftersale.js b/sourcecode/qq/pages/user-orderaftersale/user-orderaftersale.js
index eaeac5d5d..a44027393 100644
--- a/sourcecode/qq/pages/user-orderaftersale/user-orderaftersale.js
+++ b/sourcecode/qq/pages/user-orderaftersale/user-orderaftersale.js
@@ -44,13 +44,16 @@ Page({
form_keyword_value: params.keywords || '',
nav_status_index: nav_status_index,
});
- this.init();
},
onShow() {
qq.setNavigationBarTitle({ title: app.data.common_pages_title.user_orderaftersale });
+
+ // 数据加载
+ this.init();
},
+ // 获取数据
init() {
var user = app.get_user_info(this, "init");
if (user != false) {
diff --git a/sourcecode/qq/pages/user-orderaftersale/user-orderaftersale.qml b/sourcecode/qq/pages/user-orderaftersale/user-orderaftersale.qml
index 7fe2ab481..bc2f35d70 100644
--- a/sourcecode/qq/pages/user-orderaftersale/user-orderaftersale.qml
+++ b/sourcecode/qq/pages/user-orderaftersale/user-orderaftersale.qml
@@ -27,8 +27,8 @@
{{item.order_data.items.orderaftersale_btn_text}}
- {{currency_symbol}}{{item.order_data.items.price}}
- {{currency_symbol}}{{item.order_data.items.original_price}}
+ {{item.order_data.currency_data.currency_symbol}}{{item.order_data.items.price}}
+ {{item.order_data.currency_data.currency_symbol}}{{item.order_data.items.original_price}}
x{{item.order_data.items.buy_number}}
@@ -38,7 +38,7 @@
/
{{item.reason}}
/
- {{currency_symbol}}{{item.price}}
+ {{item.order_data.currency_data.currency_symbol}}{{item.price}}
x{{item.number}}
diff --git a/sourcecode/qq/pages/user/user.js b/sourcecode/qq/pages/user/user.js
index 3380e0531..bb8da2f03 100755
--- a/sourcecode/qq/pages/user/user.js
+++ b/sourcecode/qq/pages/user/user.js
@@ -3,8 +3,6 @@ Page({
data: {
avatar: app.data.default_user_head_src,
nickname: "用户名",
- customer_service_tel: null,
- common_user_center_notice: null,
message_total: 0,
head_nav_list: [
{ name: "订单总数", url: "user-order", count: 0 },
@@ -22,16 +20,39 @@ Page({
// 远程自定义导航
navigation: [],
-
+
+ // 基础配置
+ common_app_customer_service_tel: null,
+ common_user_center_notice: null,
common_app_is_online_service: 0,
common_app_is_head_vice_nav: 0,
},
onShow() {
qq.setNavigationBarTitle({title: app.data.common_pages_title.user});
+
+ // 数据加载
this.init();
+
+ // 初始化配置
+ this.init_config();
},
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ common_app_customer_service_tel: app.get_config('config.common_app_customer_service_tel'),
+ common_user_center_notice: app.get_config('config.common_user_center_notice'),
+ common_app_is_online_service: app.get_config('config.common_app_is_online_service'),
+ common_app_is_head_vice_nav: app.get_config('config.common_app_is_head_vice_nav'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init(e) {
var user = app.get_user_info(this, "init"),
self = this;
@@ -102,14 +123,11 @@ Page({
this.setData({
user_order_status_list: temp_user_order_status_list,
- customer_service_tel: data.customer_service_tel || null,
- common_user_center_notice: data.common_user_center_notice || null,
avatar: ((data.avatar || null) != null) ? data.avatar : ((this.data.avatar || null) == null ? app.data.default_user_head_src : this.data.avatar),
nickname: (data.nickname != null) ? data.nickname : this.data.nickname,
message_total: ((data.common_message_total || 0) == 0) ? 0 : data.common_message_total,
head_nav_list: temp_head_nav_list,
navigation: data.navigation || [],
- common_app_is_head_vice_nav: data.common_app_is_head_vice_nav || 0,
});
// 导航购物车处理
@@ -135,17 +153,29 @@ Page({
// 清除缓存
clear_storage(e) {
+ // 获取uuid重新存储缓存,一定情况下确保用户的uuid不改变
+ var uuid = qq.getStorageSync(app.data.cache_user_uuid_key) || null;
+
+ // 清除所有缓存
qq.clearStorage();
app.showToast("清除缓存成功", "success");
+
+ // 重新存储用户uuid缓存
+ if(uuid != null) {
+ qq.setStorage({
+ key: app.data.cache_user_uuid_key,
+ data: uuid
+ });
+ }
},
// 客服电话
call_event() {
- if(this.data.customer_service_tel == null)
+ if(this.data.common_app_customer_service_tel == null)
{
app.showToast("客服电话有误");
} else {
- app.call_tel(this.data.customer_service_tel);
+ app.call_tel(this.data.common_app_customer_service_tel);
}
},
diff --git a/sourcecode/qq/pages/user/user.json b/sourcecode/qq/pages/user/user.json
index ae3d41bb5..c96acc38a 100755
--- a/sourcecode/qq/pages/user/user.json
+++ b/sourcecode/qq/pages/user/user.json
@@ -5,6 +5,7 @@
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav",
"component-badge": "/components/badge/badge"
}
}
\ No newline at end of file
diff --git a/sourcecode/qq/pages/user/user.qml b/sourcecode/qq/pages/user/user.qml
index dbc19538b..a0b879ae0 100755
--- a/sourcecode/qq/pages/user/user.qml
+++ b/sourcecode/qq/pages/user/user.qml
@@ -68,7 +68,7 @@
-
+
{{common_user_center_notice}}
@@ -78,6 +78,9 @@
+
+
+
diff --git a/sourcecode/toutiao/app.js b/sourcecode/toutiao/app.js
index 57bf126a9..1712fb2f6 100755
--- a/sourcecode/toutiao/app.js
+++ b/sourcecode/toutiao/app.js
@@ -65,15 +65,13 @@ App({
"user_orderaftersale": "退款/售后",
"user_orderaftersale_detail": "订单售后",
"user_order_comments": "订单评论",
- "coupon": "领劵中心",
- "user_coupon": "优惠劵",
"extraction_address": "自提地址",
},
// 请求地址
request_url: "{{request_url}}",
// request_url: 'http://shopxo.com/',
- // request_url: 'https://dev.shopxo.net/',
+ request_url: 'https://dev.shopxo.net/',
// 基础信息
application_title: "{{application_title}}",
@@ -86,19 +84,13 @@ App({
/**
* 小程序初始化
*/
- onLaunch(options) {
+ onLaunch(params) {
// 启动参数处理
- options = this.launch_params_handle(options);
+ params = this.launch_params_handle(params);
// 设置设备信息
this.set_system_info();
- // 缓存启动参数
- tt.setStorage({
- key: this.data.cache_launch_info_key,
- data: options
- });
-
// 初始化配置
this.init_config();
},
@@ -114,6 +106,13 @@ App({
if ((params.scene || null) != null) {
params = this.url_params_to_json(decodeURIComponent(params.scene));
}
+
+ // 缓存启动参数
+ tt.setStorage({
+ key: this.data.cache_launch_info_key,
+ data: params
+ });
+
return params;
},
@@ -171,12 +170,13 @@ App({
// 用户信息
var user = this.get_user_cache_info();
var token = (user == false) ? '' : user.token || '';
+ var uuid = this.request_uuid();
return this.data.request_url +
"index.php?s=/api/" + c + "/" + a + plugins_params+
"&application=app&application_client_type=toutiao" +
- "&token=" +
- token +
+ "&token=" + token +
"&ajax=ajax" +
+ "&uuid="+ uuid +
params;
},
@@ -530,18 +530,12 @@ App({
this.showToast('事件值格式有误');
return false;
}
-
- tt.openLocation({
- name: values[0],
- address: values[1],
- longitude: parseFloat(values[2]),
- latitude: parseFloat(values[3])
- });
+ this.open_location(values[2], values[3], values[0], values[1]);
break;
// 拨打电话
case 4:
- tt.makePhoneCall({ phoneNumber: value });
+ this.call_tel(value);
break;
}
}
@@ -797,4 +791,159 @@ App({
}
},
+ /**
+ * 获取配置信息、可指定默认值
+ * key 数据key(支持多级读取、以 . 分割key名称)
+ * default_value 默认值
+ */
+ get_config(key, default_value) {
+ var value = null;
+ var config = tt.getStorageSync(this.data.cache_config_info_key) || null;
+ if(config != null)
+ {
+ // 数据读取
+ var arr = key.split('.');
+ if(arr.length == 1)
+ {
+ value = config[key] == undefined ? null : config[key];
+ } else {
+ value = config;
+ for(var i in arr)
+ {
+ if(value[arr[i]] != undefined)
+ {
+ value = value[arr[i]];
+ } else {
+ value = null;
+ break;
+ }
+ }
+ }
+ }
+ return (value === null) ? ((default_value === undefined) ? value : default_value) : value;
+ },
+
+ // 初始化 配置信息
+ init_config() {
+ var self = this;
+ tt.request({
+ url: this.get_request_url('common', 'base'),
+ method: 'POST',
+ data: {},
+ dataType: 'json',
+ header: { 'content-type': 'application/x-www-form-urlencoded' },
+ success: (res) => {
+ if (res.data.code == 0) {
+ tt.setStorage({
+ key: this.data.cache_config_info_key,
+ data: res.data.data,
+ fail: () => {
+ this.showToast('配置信息缓存失败');
+ }
+ });
+ } else {
+ this.showToast(res.data.msg);
+ }
+ },
+ fail: () => {
+ this.showToast('服务器请求出错');
+ },
+ });
+ },
+
+ /**
+ * 配置是否有效(100毫秒检验一次、最多检验100次)
+ * object 回调操作对象
+ * method 回调操作对象的函数
+ */
+ is_config(object, method) {
+ var self = this;
+ var count = 0;
+ var timer = setInterval(function()
+ {
+ if(self.get_config('status') == 1)
+ {
+ clearInterval(timer);
+ if (typeof object === 'object' && (method || null) != null) {
+ object[method](true);
+ }
+ }
+ count++;
+ if(count >= 100)
+ {
+ clearInterval(timer);
+ }
+ }, 100);
+ },
+
+ /**
+ * 百度坐标BD-09到火星坐标GCJ02(高德,谷歌,腾讯坐标)
+ * object 回调操作对象
+ * method 回调操作对象的函数
+ */
+ map_bd_to_gcj(lng, lat) {
+ let x_pi = 3.14159265358979324 * 3000.0 / 180.0;
+ let x = lng - 0.0065;
+ let y = lat - 0.006;
+ let z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi);
+ let theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi);
+ let lngs = z * Math.cos(theta);
+ let lats = z * Math.sin(theta);
+ return {
+ lng: lngs,
+ lat: lats
+ };
+ },
+
+ /**
+ * 百度坐标BD-09到火星坐标GCJ02(高德,谷歌,腾讯坐标)
+ * lng 经度
+ * lat 纬度
+ * name 地图上面显示的名称
+ * address 地图上面显示的详细地址
+ * scale 缩放比例,范围5~18
+ */
+ open_location(lng, lat, name, address, scale) {
+ if(lng == undefined || lat == undefined || lng == '' || lat == '') {
+ this.showToast('坐标有误');
+ return false;
+ }
+
+ // 转换坐标打开位置
+ var position = this.map_bd_to_gcj(parseFloat(lng), parseFloat(lat));
+ tt.openLocation({
+ name: name || '',
+ address: address || '',
+ scale: scale || 18,
+ longitude: position.lng,
+ latitude: position.lat
+ });
+ },
+
+ // uuid生成
+ uuid() {
+ var d = new Date().getTime();
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+ var r = (d + Math.random() * 16) % 16 | 0;
+ d = Math.floor(d / 16);
+ return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);
+ });
+ },
+
+ // 获取当前uuid
+ request_uuid() {
+ var uuid = tt.getStorageSync(this.data.cache_user_uuid_key) || null;
+ if(uuid == null) {
+ uuid = this.uuid();
+ tt.setStorage({
+ key: this.data.cache_user_uuid_key,
+ data: uuid,
+ fail: () => {
+ this.showToast('uuid缓存失败');
+ }
+ });
+ }
+ return uuid;
+ },
+
});
\ No newline at end of file
diff --git a/sourcecode/toutiao/app.json b/sourcecode/toutiao/app.json
index cfce989cd..4d72d6449 100755
--- a/sourcecode/toutiao/app.json
+++ b/sourcecode/toutiao/app.json
@@ -59,7 +59,8 @@
"pages/plugins/wallet/user-recharge/user-recharge",
"pages/plugins/wallet/user-recharge-detail/user-recharge-detail",
"pages/plugins/wallet/user-cash/user-cash",
- "pages/plugins/wallet/user-cash-detail/user-cash-detail"
+ "pages/plugins/wallet/user-cash-detail/user-cash-detail",
+ "pages/plugins/exchangerate/currency/currency"
],
"window": {
"navigationBarTitleText": "{{application_title}}",
diff --git a/sourcecode/toutiao/components/quick-nav/quick-nav.js b/sourcecode/toutiao/components/quick-nav/quick-nav.js
new file mode 100644
index 000000000..1fc075b71
--- /dev/null
+++ b/sourcecode/toutiao/components/quick-nav/quick-nav.js
@@ -0,0 +1,56 @@
+const app = getApp();
+Component({
+ data: {
+ popup_status: false,
+ data_list: [],
+ system: null,
+ x: 0,
+ y: 0,
+ is_first: 1,
+ },
+ lifetimes: {
+ // 页面被展示
+ attached: function() {
+ this.init_config();
+
+ // 非首次进入则重新初始化配置接口
+ if(this.data.is_first == 0) {
+ app.init_config();
+ }
+
+ // 数据设置
+ var system = app.get_system_info();
+ this.setData({
+ is_first: 0,
+ system: system,
+ x: 5,
+ y: (system.windowHeight || 450)-160,
+ });
+ },
+ },
+ methods: {
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({ data_list: app.get_config('quick_nav') || [] });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 弹层开启
+ quick_open_event(e) {
+ this.setData({popup_status: true, data_list: app.get_config('quick_nav') || []});
+ },
+
+ // 弹层关闭
+ quick_close_event(e) {
+ this.setData({ popup_status: false });
+ },
+
+ // 操作事件
+ navigation_event(e) {
+ app.operation_event(e);
+ },
+ },
+});
diff --git a/sourcecode/toutiao/components/quick-nav/quick-nav.json b/sourcecode/toutiao/components/quick-nav/quick-nav.json
new file mode 100644
index 000000000..66d926bfe
--- /dev/null
+++ b/sourcecode/toutiao/components/quick-nav/quick-nav.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "component-popup": "/components/popup/popup"
+ }
+}
\ No newline at end of file
diff --git a/sourcecode/toutiao/components/quick-nav/quick-nav.ttml b/sourcecode/toutiao/components/quick-nav/quick-nav.ttml
new file mode 100644
index 000000000..bba85e9cf
--- /dev/null
+++ b/sourcecode/toutiao/components/quick-nav/quick-nav.ttml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/toutiao/components/quick-nav/quick-nav.ttss b/sourcecode/toutiao/components/quick-nav/quick-nav.ttss
new file mode 100644
index 000000000..45da1a3f9
--- /dev/null
+++ b/sourcecode/toutiao/components/quick-nav/quick-nav.ttss
@@ -0,0 +1,102 @@
+/**
+ * 按钮
+ */
+ .quick-nav-movable-container {
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ top: 150rpx;
+ left: 0;
+ background:transparent;
+ pointer-events: none;
+ z-index: 2;
+}
+.quick-nav-event-submit {
+ pointer-events: auto;
+ position: fixed;
+ left: 10rpx;
+ bottom: 150rpx;
+ width: 100rpx;
+ height: 100rpx;
+ border-radius: 50%;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
+ background-color: rgb(210 54 76 / 80%);
+}
+.quick-nav-event-submit image {
+ width: 50rpx;
+ height: 50rpx;
+ margin: 25rpx auto 25rpx auto;
+ display: block;
+}
+
+/**
+ * 弹窗
+ */
+.quick-nav-popup-container {
+ padding: 20rpx 10rpx 0 10rpx;
+ background: #fff;
+}
+.quick-nav-popup-container .close {
+ overflow: hidden;
+}
+.quick-nav-popup-container .close .icon-right {
+ float: right;
+}
+.quick-nav-popup-content {
+ max-height: 80vh;
+ overflow-y: scroll;
+ overflow-x: hidden;
+ padding-bottom: 20rpx;
+}
+
+/**
+ * 内容
+ */
+.quick-nav-data-list {
+ overflow: hidden;
+ background: #fff;
+}
+.quick-nav-data-list .items {
+ width: calc(25% - 60rpx);
+ float: left;
+ padding: 30rpx;
+}
+.quick-nav-data-list .items-content {
+ border-radius: 50%;
+ padding: 20rpx;
+ text-align: center;
+ width: 70rpx;
+ height: 70rpx;
+ margin: 0 auto;
+}
+.quick-nav-data-list .items image {
+ width: 60rpx !important;
+ height: 60rpx !important;
+ margin-top: 5rpx;
+}
+.quick-nav-data-list .items .title {
+ margin-top: 10rpx;
+ font-size: 28rpx !important;
+ text-align:center;
+ -o-text-overflow: ellipsis;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ max-width: 100%;
+}
+
+/*
+ * 没有数据
+ */
+.quick-nav-popup-container .no-data-box {
+ padding: 80rpx 0;
+ text-align: center;
+}
+.quick-nav-popup-container .no-data-box image {
+ width: 160rpx;
+ margin-bottom: 30rpx;
+}
+.quick-nav-popup-container .no-data-box .no-data-tips {
+ font-size: 28rpx;
+ color: #a6a6a6;
+}
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/buy/buy.js b/sourcecode/toutiao/pages/buy/buy.js
index b2d0436e7..13381d833 100755
--- a/sourcecode/toutiao/pages/buy/buy.js
+++ b/sourcecode/toutiao/pages/buy/buy.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_list_loding_status: 1,
buy_submit_disabled_status: false,
data_list_loding_msg: '',
@@ -16,44 +15,61 @@ Page({
is_first: 1,
extension_data: [],
payment_id: 0,
- common_order_is_booking: 0,
common_site_type: 0,
extraction_address: [],
site_model: 0,
- buy_header_nav: [{
- name: "快递邮寄",
- value: 0
- }, {
- name: "自提点取货",
- value: 2
- }],
+ buy_header_nav: [
+ { name: "快递邮寄", value: 0 },
+ { name: "自提点取货", value: 2 }
+ ],
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
+ common_order_is_booking: 0,
+
// 优惠劵
plugins_coupon_data: null,
plugins_use_coupon_ids: [],
plugins_choice_coupon_value: [],
popup_plugins_coupon_status: false,
- popup_plugins_coupon_index: null
+ popup_plugins_coupon_index: null,
},
onLoad(params) {
//params['data'] = '{"buy_type":"goods","goods_id":"1","stock":"1","spec":"[]"}';
- if ((params.data || null) != null && app.get_length(JSON.parse(params.data)) > 0) {
- this.setData({
- params: JSON.parse(params.data)
- }); // 删除地址缓存
+ if((params.data || null) != null && app.get_length(JSON.parse(params.data)) > 0)
+ {
+ this.setData({ params: JSON.parse(params.data)});
+ // 删除地址缓存
tt.removeStorageSync(app.data.cache_buy_user_address_select_key);
}
},
onShow() {
+ tt.setNavigationBarTitle({ title: app.data.common_pages_title.buy });
+
+ // 数据加载
this.init();
- this.setData({
- is_first: 0
- });
+ this.setData({ is_first: 0 });
+
+ // 初始化配置
+ this.init_config();
},
- // 获取数据列表
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ common_order_is_booking: app.get_config('config.common_order_is_booking'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
// 订单参数信息是否正确
if (this.data.params == null) {
@@ -110,12 +126,12 @@ Page({
total_price: data.base.actual_price,
extension_data: data.extension_data || [],
data_list_loding_status: 3,
- common_order_is_booking: data.common_order_is_booking || 0,
common_site_type: data.common_site_type || 0,
extraction_address: data.base.extraction_address || [],
plugins_coupon_data: data.plugins_coupon_data || null
- }); // 优惠劵选择处理
+ });
+ // 优惠劵选择处理
if ((data.plugins_coupon_data || null) != null) {
var plugins_choice_coupon_value = [];
@@ -393,15 +409,10 @@ Page({
return false;
}
- var lng = parseFloat(data.lng || 0);
- var lat = parseFloat(data.lat || 0);
- tt.openLocation({
- latitude: lat,
- longitude: lng,
- scale: 18,
- name: data.name || data.alias || '',
- address: (data.province_name || '') + (data.city_name || '') + (data.county_name || '') + (data.address || '')
- });
+ // 打开地图
+ var name = data.name || data.alias || '';
+ var address = (data.province_name || '') + (data.city_name || '') + (data.county_name || '') + (data.address || '');
+ app.open_location(data.lng, data.lat, name, address);
}
});
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/buy/buy.json b/sourcecode/toutiao/pages/buy/buy.json
index 7d179bfd5..1ea7faef3 100755
--- a/sourcecode/toutiao/pages/buy/buy.json
+++ b/sourcecode/toutiao/pages/buy/buy.json
@@ -1,6 +1,7 @@
{
"enablePullDownRefresh": true,
"usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav",
"component-popup": "/components/popup/popup"
}
}
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/buy/buy.ttml b/sourcecode/toutiao/pages/buy/buy.ttml
index 59934e4f9..a7a73f9a6 100755
--- a/sourcecode/toutiao/pages/buy/buy.ttml
+++ b/sourcecode/toutiao/pages/buy/buy.ttml
@@ -151,4 +151,7 @@
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/cart/cart.js b/sourcecode/toutiao/pages/cart/cart.js
index c9eef822f..54301648d 100755
--- a/sourcecode/toutiao/pages/cart/cart.js
+++ b/sourcecode/toutiao/pages/cart/cart.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_bottom_line_status: false,
@@ -11,17 +10,38 @@ Page({
is_selected_all: false,
buy_submit_disabled_status: true,
- // 站点模式
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
common_site_type: 0,
common_is_exhibition_mode_btn_text: null,
- customer_service_tel: null,
+ common_app_customer_service_tel: null,
},
onShow() {
tt.setNavigationBarTitle({ title: app.data.common_pages_title.cart });
+
+ // 数据加载
this.init();
+
+ // 初始化配置
+ this.init_config();
},
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ common_site_type: app.get_config('config.common_site_type'),
+ common_is_exhibition_mode_btn_text: app.get_config('config.common_is_exhibition_mode_btn_text', '立即咨询'),
+ common_app_customer_service_tel: app.get_config('config.common_app_customer_service_tel'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init(e) {
var user = app.get_user_info(this, "init");
if (user != false) {
@@ -84,11 +104,6 @@ Page({
data_list_loding_status: data.data.length == 0 ? 0 : 3,
data_bottom_line_status: true,
data_list_loding_msg: '购物车空空如也',
-
- // 站点模式
- common_site_type: data.common_site_type || 0,
- common_is_exhibition_mode_btn_text: data.common_is_exhibition_mode_btn_text || '立即咨询',
- customer_service_tel: data.customer_service_tel || null,
});
// 导航购物车处理
@@ -384,7 +399,7 @@ Page({
// 展示型事件
exhibition_submit_event(e) {
- app.call_tel(this.data.customer_service_tel);
+ app.call_tel(this.data.common_app_customer_service_tel);
},
});
diff --git a/sourcecode/toutiao/pages/cart/cart.json b/sourcecode/toutiao/pages/cart/cart.json
index 312ca36b1..057eb057a 100755
--- a/sourcecode/toutiao/pages/cart/cart.json
+++ b/sourcecode/toutiao/pages/cart/cart.json
@@ -1,5 +1,6 @@
{
"enablePullDownRefresh": true,
"usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav"
}
}
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/cart/cart.ttml b/sourcecode/toutiao/pages/cart/cart.ttml
index f93f8831d..a9b734cb2 100755
--- a/sourcecode/toutiao/pages/cart/cart.ttml
+++ b/sourcecode/toutiao/pages/cart/cart.ttml
@@ -81,4 +81,7 @@
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/goods-category/goods-category.js b/sourcecode/toutiao/pages/goods-category/goods-category.js
index f8beb98c2..37ab2f538 100755
--- a/sourcecode/toutiao/pages/goods-category/goods-category.js
+++ b/sourcecode/toutiao/pages/goods-category/goods-category.js
@@ -4,17 +4,31 @@ Page({
data_list_loding_status: 1,
nav_active_index: 0,
data_list: [],
+ data_content: null,
+
+ // 基础配置
category_show_level: 3,
- data_content: null
},
onShow() {
- tt.setNavigationBarTitle({
- title: app.data.common_pages_title.goods_category
- });
- this.init(); // 显示分享菜单
+ tt.setNavigationBarTitle({title: app.data.common_pages_title.goods_categor });
+
+ // 数据加载
+ this.init();
- app.show_share_menu();
+ // 初始化配置
+ this.init_config();
+ },
+
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ category_show_level: app.get_config('config.category_show_level'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
},
// 获取数据
@@ -47,7 +61,6 @@ Page({
this.setData({
data_list: category,
- category_show_level: res.data.data.category_show_level || 3,
data_content: data_content,
data_list_loding_status: category.length == 0 ? 0 : 3,
data_bottom_line_status: true
diff --git a/sourcecode/toutiao/pages/goods-category/goods-category.json b/sourcecode/toutiao/pages/goods-category/goods-category.json
index 1e3ffd8f1..6e46c5533 100755
--- a/sourcecode/toutiao/pages/goods-category/goods-category.json
+++ b/sourcecode/toutiao/pages/goods-category/goods-category.json
@@ -1,5 +1,6 @@
{
"enablePullDownRefresh": true,
"usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav"
}
}
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/goods-category/goods-category.ttml b/sourcecode/toutiao/pages/goods-category/goods-category.ttml
index 44ffe2b19..8f3f98f96 100755
--- a/sourcecode/toutiao/pages/goods-category/goods-category.ttml
+++ b/sourcecode/toutiao/pages/goods-category/goods-category.ttml
@@ -74,4 +74,7 @@
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/goods-detail/goods-detail.js b/sourcecode/toutiao/pages/goods-detail/goods-detail.js
index e80fb5106..f5810ca15 100755
--- a/sourcecode/toutiao/pages/goods-detail/goods-detail.js
+++ b/sourcecode/toutiao/pages/goods-detail/goods-detail.js
@@ -1,8 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
-
indicator_dots: false,
indicator_color: 'rgba(0, 0, 0, .3)',
indicator_active_color: '#e31c55',
@@ -17,7 +15,6 @@ Page({
goods_photo: [],
goods_specifications_choose: [],
goods_content_app: [],
-
popup_status: false,
goods_favor_text: '收藏',
goods_favor_icon: '/images/goods-detail-favor-icon-0.png',
@@ -25,6 +22,8 @@ Page({
buy_event_type: 'buy',
nav_submit_text: '立即购买',
nav_submit_is_disabled: true,
+ common_site_type: 0,
+ is_goods_site_type_consistent: 0,
goods_spec_base_price: 0,
goods_spec_base_original_price: 0,
@@ -32,12 +31,18 @@ Page({
goods_spec_base_images: '',
show_field_price_text: null,
-
goods_video_is_autoplay: false,
- common_app_is_use_mobile_detail: 1,
- common_is_goods_detail_show_photo: 0,
+ popup_share_status: false,
+ // 购物车快捷导航
+ quick_nav_cart_count: 0,
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
common_app_is_online_service: 0,
+ common_app_is_use_mobile_detail: 0,
+ common_is_goods_detail_show_photo: 0,
+ common_app_customer_service_tel: null,
// 限时秒杀插件
plugins_limitedtimediscount_is_valid: 0,
@@ -47,33 +52,8 @@ Page({
plugins_limitedtimediscount_timer: null,
plugins_limitedtimediscount_timers: null,
- // 好物圈分享信息
- common_app_is_good_thing : 0,
- share_product: {
- "item_code": "",
- "title": "",
- "desc": "",
- "category_list": [],
- "image_list": [],
- "src_mini_program_path": "",
- "brand_info": {},
- },
-
- // 海报分享
- common_app_is_poster_share: 0,
-
// 优惠劵
plugins_coupon_data: null,
-
- // 购物车快捷导航
- quick_nav_cart_count: 0,
-
- // 站点模式
- common_site_type: 0,
- is_goods_site_type_consistent: 0,
- customer_service_tel: null,
-
- // 优惠劵领取
temp_coupon_receive_index: null,
temp_coupon_receive_value: null,
},
@@ -83,16 +63,39 @@ Page({
params = app.launch_params_handle(params);
// 参数赋值,初始化
- //params['goods_id']=2;
+ //params['goods_id']=12;
this.setData({params: params});
- this.init();
},
onShow() {
tt.setNavigationBarTitle({title: (this.data.goods == null) ? app.data.common_pages_title.goods_detail : this.data.goods.title});
+
+ // 数据加载
+ this.init();
+
+ // 初始化配置
+ this.init_config();
+
+ // 显示分享菜单
+ app.show_share_menu();
},
- // 获取数据列表
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ common_app_is_use_mobile_detail: app.get_config('config.common_app_is_use_mobile_detail'),
+ common_is_goods_detail_show_photo: app.get_config('config.common_is_goods_detail_show_photo'),
+ common_app_is_online_service: app.get_config('config.common_app_is_online_service'),
+ common_app_customer_service_tel: app.get_config('config.common_app_customer_service_tel'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
// 参数校验
if((this.data.params.goods_id || null) == null)
@@ -124,6 +127,8 @@ Page({
if (res.data.code == 0) {
var data = res.data.data;
self.setData({
+ data_bottom_line_status: true,
+ data_list_loding_status: 3,
goods: data.goods,
indicator_dots: (data.goods.photo.length > 1),
autoplay: (data.goods.photo.length > 1),
@@ -133,23 +138,21 @@ Page({
temp_buy_number: data.goods.buy_min_number || 1,
goods_favor_text: (data.goods.is_favor == 1) ? '已收藏' : '收藏',
goods_favor_icon: '/images/goods-detail-favor-icon-' + data.goods.is_favor+'.png',
- data_bottom_line_status: true,
- data_list_loding_status: 3,
+
+ nav_submit_text: data.nav_submit_text,
+ nav_submit_is_disabled: data.nav_submit_is_disabled,
+ common_site_type: data.common_site_type || 0,
+ is_goods_site_type_consistent: data.is_goods_site_type_consistent || 0,
goods_spec_base_price: data.goods.price,
goods_spec_base_original_price: data.goods.original_price,
goods_spec_base_inventory: data.goods.inventory,
goods_spec_base_images: data.goods.images,
-
show_field_price_text: (data.goods.show_field_price_text == '销售价') ? null : (data.goods.show_field_price_text.replace(/<[^>]+>/g, "") || null),
- common_app_is_use_mobile_detail: data.common_app_is_use_mobile_detail || 0,
- common_is_goods_detail_show_photo: data.common_is_goods_detail_show_photo || 0,
- common_app_is_online_service: data.common_app_is_online_service || 0,
plugins_limitedtimediscount_data: data.plugins_limitedtimediscount_data || null,
plugins_limitedtimediscount_is_valid: ((data.plugins_limitedtimediscount_data || null) != null && (data.plugins_limitedtimediscount_data.is_valid || 0) == 1) ? 1 : 0,
- common_app_is_good_thing: data.common_app_is_good_thing || 0,
'share_product.item_code': data.goods.id.toString(),
'share_product.title': data.goods.title,
'share_product.image_list': data.goods.photo.map(function (v) { return v.images;}),
@@ -158,7 +161,6 @@ Page({
'share_product.src_mini_program_path': '/pages/goods-detail/goods-detail?goods_id='+data.goods.id,
'share_product.brand_info.name': data.goods.brand_name,
- common_app_is_poster_share: data.common_app_is_poster_share || 0,
plugins_coupon_data: data.plugins_coupon_data || null,
quick_nav_cart_count: data.common_cart_total || 0,
});
@@ -173,34 +175,6 @@ Page({
// 不能选择规格处理
this.goods_specifications_choose_handle_dont(0);
-
- // 购买按钮处理
- var nav_submit_text = ((data.common_order_is_booking || 0) == 0) ? '立即购买' : '立即预约';
- var nav_submit_is_disabled = (data.goods.is_shelves == 1 && data.goods.inventory > 0) ? false : true;
- if (data.goods.is_shelves != 1) {
- nav_submit_text = '已下架';
- nav_submit_is_disabled = true;
- } else {
- if(data.goods.inventory <= 0) {
- nav_submit_text = '卖光了';
- nav_submit_is_disabled = true;
- }
- }
-
- // 站点模式 - 是否展示型
- var common_site_type = data.common_site_type || 0;
- if (common_site_type == 1) {
- nav_submit_text = data.common_is_exhibition_mode_btn_text || '立即咨询';
- }
-
- // 数据赋值
- this.setData({
- nav_submit_text: nav_submit_text,
- nav_submit_is_disabled: nav_submit_is_disabled,
- common_site_type: common_site_type,
- is_goods_site_type_consistent: data.is_goods_site_type_consistent || 0,
- customer_service_tel: data.customer_service_tel || null,
- });
} else {
self.setData({
data_bottom_line_status: false,
@@ -867,7 +841,7 @@ Page({
// 展示型事件
exhibition_submit_event(e) {
- app.call_tel(this.data.customer_service_tel);
+ app.call_tel(this.data.common_app_customer_service_tel);
},
// 自定义分享
diff --git a/sourcecode/toutiao/pages/goods-detail/goods-detail.json b/sourcecode/toutiao/pages/goods-detail/goods-detail.json
index bdfdb2f27..0b69a1075 100755
--- a/sourcecode/toutiao/pages/goods-detail/goods-detail.json
+++ b/sourcecode/toutiao/pages/goods-detail/goods-detail.json
@@ -1,6 +1,7 @@
{
"enablePullDownRefresh": true,
"usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav",
"component-popup": "/components/popup/popup",
"component-badge": "/components/badge/badge"
}
diff --git a/sourcecode/toutiao/pages/goods-detail/goods-detail.ttml b/sourcecode/toutiao/pages/goods-detail/goods-detail.ttml
index 2569c331b..e68ceeaab 100755
--- a/sourcecode/toutiao/pages/goods-detail/goods-detail.ttml
+++ b/sourcecode/toutiao/pages/goods-detail/goods-detail.ttml
@@ -248,4 +248,7 @@
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/goods-search/goods-search.js b/sourcecode/toutiao/pages/goods-search/goods-search.js
index b60065668..266975be1 100755
--- a/sourcecode/toutiao/pages/goods-search/goods-search.js
+++ b/sourcecode/toutiao/pages/goods-search/goods-search.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_list_loding_status: 1,
data_bottom_line_status: false,
data_list: [],
@@ -18,18 +17,46 @@ Page({
{ name: "价格", field: "min_price", sort: "asc", "icon": "default" },
{ name: "最新", field: "id", sort: "asc", "icon": "default" }
],
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
},
onLoad(params) {
- this.setData({params: params, post_data: params});
- this.init();
+ // 启动参数处理
+ params = app.launch_params_handle(params);
+
+ // 初始参数
+ this.setData({
+ params: params,
+ post_data: {
+ keywords: params.keywords || ''
+ }
+ });
},
onShow() {
tt.setNavigationBarTitle({title: app.data.common_pages_title.goods_search});
+
+ // 数据加载
+ this.init();
+
+ // 初始化配置
+ this.init_config();
},
- // 初始化
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
// 获取数据
this.get_data_list();
diff --git a/sourcecode/toutiao/pages/goods-search/goods-search.json b/sourcecode/toutiao/pages/goods-search/goods-search.json
index 7d179bfd5..1ea7faef3 100755
--- a/sourcecode/toutiao/pages/goods-search/goods-search.json
+++ b/sourcecode/toutiao/pages/goods-search/goods-search.json
@@ -1,6 +1,7 @@
{
"enablePullDownRefresh": true,
"usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav",
"component-popup": "/components/popup/popup"
}
}
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/goods-search/goods-search.ttml b/sourcecode/toutiao/pages/goods-search/goods-search.ttml
index 0578d8214..d9b23a027 100755
--- a/sourcecode/toutiao/pages/goods-search/goods-search.ttml
+++ b/sourcecode/toutiao/pages/goods-search/goods-search.ttml
@@ -53,4 +53,7 @@
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/index/index.js b/sourcecode/toutiao/pages/index/index.js
index fbde56d46..83ad60497 100755
--- a/sourcecode/toutiao/pages/index/index.js
+++ b/sourcecode/toutiao/pages/index/index.js
@@ -1,21 +1,23 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
load_status: 0,
data_list_loding_status: 1,
data_bottom_line_status: false,
data_list: [],
banner_list: [],
navigation: [],
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
common_shop_notice: null,
- common_app_is_enable_search: 1,
- common_app_is_enable_answer: 1,
+ common_app_is_enable_search: 0,
+ common_app_is_enable_answer: 0,
common_app_is_header_nav_fixed: 0,
common_app_is_online_service: 0,
// 限时秒杀插件
- plugins_limitedtimediscount_is_valid : 0,
+ plugins_limitedtimediscount_is_valid: 0,
plugins_limitedtimediscount_data: null,
plugins_limitedtimediscount_timer_title: '距离结束',
plugins_limitedtimediscount_is_show_time: true,
@@ -23,10 +25,30 @@ Page({
},
onShow() {
+ // 数据加载
this.init();
+
+ // 初始化配置
+ this.init_config();
},
- // 获取数据列表
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ common_shop_notice: app.get_config('config.common_shop_notice'),
+ common_app_is_enable_search: app.get_config('config.common_app_is_enable_search'),
+ common_app_is_enable_answer: app.get_config('config.common_app_is_enable_answer'),
+ common_app_is_header_nav_fixed: app.get_config('config.common_app_is_header_nav_fixed'),
+ common_app_is_online_service: app.get_config('config.common_app_is_online_service'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
var self = this;
@@ -52,12 +74,7 @@ Page({
banner_list: data.banner_list || [],
navigation: data.navigation || [],
data_list: data.data_list,
- common_shop_notice: data.common_shop_notice || null,
- common_app_is_enable_search: data.common_app_is_enable_search,
- common_app_is_enable_answer: data.common_app_is_enable_answer,
- common_app_is_header_nav_fixed: data.common_app_is_header_nav_fixed,
data_list_loding_status: data.data_list.length == 0 ? 0 : 3,
- common_app_is_online_service: data.common_app_is_online_service || 0,
plugins_limitedtimediscount_data: data.plugins_limitedtimediscount_data || null,
plugins_limitedtimediscount_is_valid: ((data.plugins_limitedtimediscount_data || null) != null && (data.plugins_limitedtimediscount_data.is_valid || 0) == 1) ? 1 : 0,
});
diff --git a/sourcecode/toutiao/pages/index/index.json b/sourcecode/toutiao/pages/index/index.json
index 7d3a94bab..56fe01f9c 100755
--- a/sourcecode/toutiao/pages/index/index.json
+++ b/sourcecode/toutiao/pages/index/index.json
@@ -5,6 +5,7 @@
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav",
"component-icon-nav": "/components/icon-nav/icon-nav",
"component-banner": "/components/slider/slider"
}
diff --git a/sourcecode/toutiao/pages/index/index.ttml b/sourcecode/toutiao/pages/index/index.ttml
index acf373199..c45256aff 100755
--- a/sourcecode/toutiao/pages/index/index.ttml
+++ b/sourcecode/toutiao/pages/index/index.ttml
@@ -8,7 +8,7 @@
-
+
{{common_shop_notice}}
@@ -84,6 +84,9 @@
+
+
+
diff --git a/sourcecode/toutiao/pages/paytips/paytips.js b/sourcecode/toutiao/pages/paytips/paytips.js
index 453ba18ae..431f5cf85 100755
--- a/sourcecode/toutiao/pages/paytips/paytips.js
+++ b/sourcecode/toutiao/pages/paytips/paytips.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
params: {},
default_round_success_icon: app.data.default_round_success_icon,
default_round_error_icon: app.data.default_round_error_icon,
diff --git a/sourcecode/toutiao/pages/paytips/paytips.ttml b/sourcecode/toutiao/pages/paytips/paytips.ttml
index a44962638..a243c4e59 100755
--- a/sourcecode/toutiao/pages/paytips/paytips.ttml
+++ b/sourcecode/toutiao/pages/paytips/paytips.ttml
@@ -2,10 +2,6 @@
{{params.msg}}
-
- {{currency_symbol}}{{params.total_price}}
- 元
-
diff --git a/sourcecode/toutiao/pages/plugins/coupon/index/index.js b/sourcecode/toutiao/pages/plugins/coupon/index/index.js
index de430eb4b..0e8459f1f 100644
--- a/sourcecode/toutiao/pages/plugins/coupon/index/index.js
+++ b/sourcecode/toutiao/pages/plugins/coupon/index/index.js
@@ -1,29 +1,41 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_list: [],
data_base: null,
+
// 优惠劵领取
temp_coupon_receive_index: null,
- temp_coupon_receive_value: null
- },
+ temp_coupon_receive_value: null,
- onLoad(params) {
- this.init();
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
},
onShow() {
- tt.setNavigationBarTitle({
- title: app.data.common_pages_title.coupon
- });
+ // 数据加载
+ this.init();
+
+ // 初始化配置
+ this.init_config();
},
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
- // 获取数据
this.get_data_list();
},
diff --git a/sourcecode/toutiao/pages/plugins/coupon/index/index.json b/sourcecode/toutiao/pages/plugins/coupon/index/index.json
index 331ad4f3d..2ba4ed159 100644
--- a/sourcecode/toutiao/pages/plugins/coupon/index/index.json
+++ b/sourcecode/toutiao/pages/plugins/coupon/index/index.json
@@ -1,3 +1,4 @@
{
- "enablePullDownRefresh": true
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": "领劵中心"
}
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/plugins/coupon/user/user.js b/sourcecode/toutiao/pages/plugins/coupon/user/user.js
index e922b218d..8a3ef1d81 100644
--- a/sourcecode/toutiao/pages/plugins/coupon/user/user.js
+++ b/sourcecode/toutiao/pages/plugins/coupon/user/user.js
@@ -1,34 +1,42 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_bottom_line_status: false,
data_list_loding_status: 1,
data_list_loding_msg: '',
data_list: null,
- nav_tabs_list: [{
- name: "未使用",
- value: "not_use"
- }, {
- name: "已使用",
- value: "already_use"
- }, {
- name: "已过期",
- value: "already_expire"
- }],
- nav_tabs_value: 'not_use'
- },
- onLoad(params) {
- this.init();
+ nav_tabs_list: [
+ { name: "未使用", value: "not_use" },
+ { name: "已使用", value: "already_use" },
+ { name: "已过期", value: "already_expire" },
+ ],
+ nav_tabs_value: 'not_use',
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
},
onShow() {
- tt.setNavigationBarTitle({
- title: app.data.common_pages_title.user_coupon
- });
+ // 数据加载
+ this.init();
+
+ // 初始化配置
+ this.init_config();
},
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
var user = app.get_user_info(this, "init");
diff --git a/sourcecode/toutiao/pages/plugins/coupon/user/user.json b/sourcecode/toutiao/pages/plugins/coupon/user/user.json
index 331ad4f3d..2a5d55f78 100644
--- a/sourcecode/toutiao/pages/plugins/coupon/user/user.json
+++ b/sourcecode/toutiao/pages/plugins/coupon/user/user.json
@@ -1,3 +1,4 @@
{
- "enablePullDownRefresh": true
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": "优惠券"
}
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/plugins/distribution/statistics/statistics.js b/sourcecode/toutiao/pages/plugins/distribution/statistics/statistics.js
index 3a7fbc135..4c08f7221 100644
--- a/sourcecode/toutiao/pages/plugins/distribution/statistics/statistics.js
+++ b/sourcecode/toutiao/pages/plugins/distribution/statistics/statistics.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_list_loding_status: 1,
data_list_loding_msg: '加载中...',
data_bottom_line_status: false,
@@ -12,12 +11,31 @@ Page({
user_profit_total_price: 0.00,
user_data: null,
profit_data: null,
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
},
onShow() {
+ // 数据加载
this.init();
+
+ // 初始化配置
+ this.init_config();
},
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
var self = this;
tt.showLoading({
diff --git a/sourcecode/toutiao/pages/plugins/exchangerate/currency/currency.js b/sourcecode/toutiao/pages/plugins/exchangerate/currency/currency.js
new file mode 100644
index 000000000..5bf131a39
--- /dev/null
+++ b/sourcecode/toutiao/pages/plugins/exchangerate/currency/currency.js
@@ -0,0 +1,126 @@
+const app = getApp();
+Page({
+ data: {
+ data_bottom_line_status: false,
+ data_list_loding_status: 1,
+ data_list_loding_msg: '',
+ data_list: [],
+ data_default: null,
+ data_base: null,
+ },
+
+ onShow() {
+ // 数据加载
+ this.init();
+ },
+
+ // 获取数据
+ init() {
+ this.get_data_list();
+ },
+
+ // 获取数据
+ get_data_list() {
+ var self = this;
+ tt.showLoading({ title: "加载中..." });
+ if (self.data.data_list.length <= 0)
+ {
+ self.setData({
+ data_list_loding_status: 1
+ });
+ }
+
+ tt.request({
+ url: app.get_request_url("index", "index", "exchangerate"),
+ method: "POST",
+ data: {},
+ dataType: "json",
+ success: res => {
+ tt.hideLoading();
+ tt.stopPullDownRefresh();
+ if (res.data.code == 0) {
+ var data = res.data.data;
+ var status = ((data.data.data || []).length > 0);
+ this.setData({
+ data_base: data.base || null,
+ data_default: data.data.default || null,
+ data_list: data.data.data || [],
+ data_list_loding_msg: '',
+ data_list_loding_status: status ? 3 : 0,
+ data_bottom_line_status: status,
+ });
+ } else {
+ self.setData({
+ data_bottom_line_status: false,
+ data_list_loding_status: 2,
+ data_list_loding_msg: res.data.msg,
+ });
+ app.showToast(res.data.msg);
+ }
+ },
+ fail: () => {
+ tt.hideLoading();
+ tt.stopPullDownRefresh();
+ self.setData({
+ data_bottom_line_status: false,
+ data_list_loding_status: 2,
+ data_list_loding_msg: '服务器请求出错',
+ });
+ app.showToast("服务器请求出错");
+ }
+ });
+ },
+
+ // 选择事件
+ selected_event(e) {
+ // 参数处理
+ var index = e.currentTarget.dataset.index;
+ var temp_list = this.data.data_list;
+ var data = temp_list[index] || null;
+ if(data == null)
+ {
+ app.showToast('数据有误');
+ return false;
+ }
+
+ // id与当前默认一致则不处理
+ if (data.id != this.data.data_default.id)
+ {
+ var self = this;
+ tt.showLoading({ title: "处理中..." });
+ tt.request({
+ url: app.get_request_url("setcurrency", "index", "exchangerate"),
+ method: "POST",
+ data: { "currency": data.id },
+ dataType: "json",
+ header: { 'content-type': 'application/x-www-form-urlencoded' },
+ success: res => {
+ tt.hideLoading();
+ if (res.data.code == 0) {
+ app.showToast(res.data.msg, "success");
+ self.setData({ data_default: data });
+ // 重新初始化配置
+ app.init_config();
+
+ // 返回上一页
+ setTimeout(function () {
+ tt.navigateBack();
+ }, 1500);
+ } else {
+ app.showToast(res.data.msg);
+ }
+ },
+ fail: () => {
+ tt.hideLoading();
+ app.showToast("服务器请求出错");
+ }
+ });
+ }
+ },
+
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.get_data_list();
+ },
+
+});
diff --git a/sourcecode/toutiao/pages/plugins/exchangerate/currency/currency.json b/sourcecode/toutiao/pages/plugins/exchangerate/currency/currency.json
new file mode 100644
index 000000000..eac1d0379
--- /dev/null
+++ b/sourcecode/toutiao/pages/plugins/exchangerate/currency/currency.json
@@ -0,0 +1,4 @@
+{
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": "货币切换"
+}
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/plugins/exchangerate/currency/currency.ttml b/sourcecode/toutiao/pages/plugins/exchangerate/currency/currency.ttml
new file mode 100644
index 000000000..46a7b1ffc
--- /dev/null
+++ b/sourcecode/toutiao/pages/plugins/exchangerate/currency/currency.ttml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+ {{item.name}} / {{item.symbol}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/plugins/exchangerate/currency/currency.ttss b/sourcecode/toutiao/pages/plugins/exchangerate/currency/currency.ttss
new file mode 100644
index 000000000..b0fc4eb85
--- /dev/null
+++ b/sourcecode/toutiao/pages/plugins/exchangerate/currency/currency.ttss
@@ -0,0 +1,14 @@
+.exchangerate-container .item {
+ padding: 20rpx 10rpx;
+ font-size: 36rpx;
+}
+.exchangerate-container .item .icon image {
+ width: 50rpx;
+ height: 50rpx !important;
+ margin: 0 10rpx;
+ vertical-align: middle;
+}
+.exchangerate-container .item .single-text {
+ width: calc(100% - 80rpx);
+ line-height: 50rpx;
+}
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/plugins/membershiplevelvip/statistics/statistics.js b/sourcecode/toutiao/pages/plugins/membershiplevelvip/statistics/statistics.js
index d92d86a3e..066636cab 100644
--- a/sourcecode/toutiao/pages/plugins/membershiplevelvip/statistics/statistics.js
+++ b/sourcecode/toutiao/pages/plugins/membershiplevelvip/statistics/statistics.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_list_loding_status: 1,
data_list_loding_msg: '加载中...',
data_bottom_line_status: false,
@@ -11,12 +10,31 @@ Page({
user_profit_total_price: 0.00,
user_data: null,
profit_data: null,
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
},
onShow() {
+ // 数据加载
this.init();
+
+ // 初始化配置
+ this.init_config();
},
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
var self = this;
tt.showLoading({
diff --git a/sourcecode/toutiao/pages/user-faovr/user-faovr.js b/sourcecode/toutiao/pages/user-faovr/user-faovr.js
index 5a0a6cd19..8ec6cc8ef 100755
--- a/sourcecode/toutiao/pages/user-faovr/user-faovr.js
+++ b/sourcecode/toutiao/pages/user-faovr/user-faovr.js
@@ -1,19 +1,38 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_list: [],
data_page_total: 0,
data_page: 1,
data_list_loding_status: 1,
data_bottom_line_status: false,
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
},
onShow() {
tt.setNavigationBarTitle({title: app.data.common_pages_title.user_favor});
+
+ // 数据加载
this.init();
+
+ // 初始化配置
+ this.init_config();
},
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
var user = app.get_user_info(this, "init");
if (user != false) {
diff --git a/sourcecode/toutiao/pages/user-goods-browse/user-goods-browse.js b/sourcecode/toutiao/pages/user-goods-browse/user-goods-browse.js
index c678ce8fe..e516e1a24 100755
--- a/sourcecode/toutiao/pages/user-goods-browse/user-goods-browse.js
+++ b/sourcecode/toutiao/pages/user-goods-browse/user-goods-browse.js
@@ -1,19 +1,38 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_list: [],
data_page_total: 0,
data_page: 1,
data_list_loding_status: 1,
data_bottom_line_status: false,
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
},
onShow() {
- tt.setNavigationBarTitle({ title: app.data.common_pages_title.user_goods_browse });
+ tt.setNavigationBarTitle({title: app.data.common_pages_title.user_goods_browse});
+
+ // 数据加载
this.init();
+
+ // 初始化配置
+ this.init_config();
},
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init() {
var user = app.get_user_info(this, "init");
if (user != false) {
diff --git a/sourcecode/toutiao/pages/user-order-detail/user-order-detail.js b/sourcecode/toutiao/pages/user-order-detail/user-order-detail.js
index 5f43970a8..a67736d4e 100755
--- a/sourcecode/toutiao/pages/user-order-detail/user-order-detail.js
+++ b/sourcecode/toutiao/pages/user-order-detail/user-order-detail.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
@@ -16,13 +15,16 @@ Page({
onLoad(params) {
//params['id'] = 5;
this.setData({params: params});
- this.init();
},
onShow() {
tt.setNavigationBarTitle({title: app.data.common_pages_title.user_order_detail});
+
+ // 数据加载
+ this.init();
},
+ // 获取数据
init() {
var self = this;
tt.showLoading({title: "加载中..." });
@@ -112,17 +114,12 @@ Page({
app.showToast("地址有误");
return false;
}
+ var data = this.data.detail.address_data;
- var ads = this.data.detail.address_data;
- var lng = parseFloat(ads.lng || 0);
- var lat = parseFloat(ads.lat || 0);
- tt.openLocation({
- latitude: lat,
- longitude: lng,
- scale: 18,
- name: ads.alias || '',
- address: (ads.province_name || '') + (ads.city_name || '') + (ads.county_name || '') + (ads.address || ''),
- });
+ // 打开地图
+ var name = data.alias || '';
+ var address = (data.province_name || '') + (data.city_name || '') + (data.county_name || '') + (data.address || '');
+ app.open_location(data.lng, data.lat, name, address);
},
// 下拉刷新
diff --git a/sourcecode/toutiao/pages/user-order-detail/user-order-detail.ttml b/sourcecode/toutiao/pages/user-order-detail/user-order-detail.ttml
index d7ab1f561..b7e086598 100755
--- a/sourcecode/toutiao/pages/user-order-detail/user-order-detail.ttml
+++ b/sourcecode/toutiao/pages/user-order-detail/user-order-detail.ttml
@@ -29,8 +29,8 @@
- {{currency_symbol}}{{item.price}}
- {{currency_symbol}}{{item.original_price}}
+ {{detail.currency_data.currency_symbol}}{{item.price}}
+ {{detail.currency_data.currency_symbol}}{{item.original_price}}
x{{item.buy_number}}
diff --git a/sourcecode/toutiao/pages/user-order/user-order.js b/sourcecode/toutiao/pages/user-order/user-order.js
index abdfa7394..aa8d50387 100755
--- a/sourcecode/toutiao/pages/user-order/user-order.js
+++ b/sourcecode/toutiao/pages/user-order/user-order.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
data_list: [],
data_page_total: 0,
data_page: 1,
@@ -54,15 +53,16 @@ Page({
params: params,
nav_status_index: nav_status_index
});
- this.init();
},
onShow() {
- tt.setNavigationBarTitle({
- title: app.data.common_pages_title.user_order
- });
+ tt.setNavigationBarTitle({title: app.data.common_pages_title.user_order});
+
+ // 数据加载
+ this.init();
},
+ // 获取数据
init() {
var user = app.get_user_info(this, 'init');
@@ -265,7 +265,7 @@ Page({
// self.order_item_pay_success_handle(index);
// // 跳转支付页面
- // wx.navigateTo({
+ // tt.navigateTo({
// url: "/pages/paytips/paytips?code=9000&total_price=" +
// self.data.data_list[index]['total_price']
// });
diff --git a/sourcecode/toutiao/pages/user-order/user-order.ttml b/sourcecode/toutiao/pages/user-order/user-order.ttml
index 61c69e58c..af3f1b9f6 100755
--- a/sourcecode/toutiao/pages/user-order/user-order.ttml
+++ b/sourcecode/toutiao/pages/user-order/user-order.ttml
@@ -33,8 +33,8 @@
{{detail.orderaftersale_btn_text}}
- {{currency_symbol}}{{detail.price}}
- {{currency_symbol}}{{detail.original_price}}
+ {{item.currency_data.currency_symbol}}{{detail.price}}
+ {{item.currency_data.currency_symbol}}{{detail.original_price}}
x{{detail.buy_number}}
diff --git a/sourcecode/toutiao/pages/user-orderaftersale-detail/user-orderaftersale-detail.js b/sourcecode/toutiao/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
index 6b674dd57..3df92651b 100644
--- a/sourcecode/toutiao/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
+++ b/sourcecode/toutiao/pages/user-orderaftersale-detail/user-orderaftersale-detail.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
@@ -117,13 +116,16 @@ Page({
params: params,
popup_delivery_status: ((params.is_delivery_popup || 0) == 1),
});
- this.init();
},
onShow() {
tt.setNavigationBarTitle({ title: app.data.common_pages_title.user_orderaftersale_detail });
+
+ // 数据加载
+ this.init();
},
+ // 获取数据
init() {
var self = this;
tt.showLoading({ title: "加载中..." });
diff --git a/sourcecode/toutiao/pages/user-orderaftersale-detail/user-orderaftersale-detail.ttml b/sourcecode/toutiao/pages/user-orderaftersale-detail/user-orderaftersale-detail.ttml
index 0d26ee35d..3cd0ca7f2 100644
--- a/sourcecode/toutiao/pages/user-orderaftersale-detail/user-orderaftersale-detail.ttml
+++ b/sourcecode/toutiao/pages/user-orderaftersale-detail/user-orderaftersale-detail.ttml
@@ -13,8 +13,8 @@
- {{currency_symbol}}{{order_data.items.price}}
- {{currency_symbol}}{{order_data.items.original_price}}
+ {{order_data.currency_data.currency_symbol}}{{order_data.items.price}}
+ {{order_data.currency_data.currency_symbol}}{{order_data.items.original_price}}
x{{order_data.items.buy_number}}
diff --git a/sourcecode/toutiao/pages/user-orderaftersale/user-orderaftersale.js b/sourcecode/toutiao/pages/user-orderaftersale/user-orderaftersale.js
index ef76652b5..d2b0b5e1c 100644
--- a/sourcecode/toutiao/pages/user-orderaftersale/user-orderaftersale.js
+++ b/sourcecode/toutiao/pages/user-orderaftersale/user-orderaftersale.js
@@ -1,7 +1,6 @@
const app = getApp();
Page({
data: {
- currency_symbol: app.data.currency_symbol,
params: null,
data_list_loding_status: 1,
data_list_loding_msg: '',
@@ -44,13 +43,16 @@ Page({
form_keyword_value: params.keywords || '',
nav_status_index: nav_status_index,
});
- this.init();
},
onShow() {
tt.setNavigationBarTitle({ title: app.data.common_pages_title.user_orderaftersale });
+
+ // 数据加载
+ this.init();
},
+ // 获取数据
init() {
var user = app.get_user_info(this, "init");
if (user != false) {
diff --git a/sourcecode/toutiao/pages/user-orderaftersale/user-orderaftersale.ttml b/sourcecode/toutiao/pages/user-orderaftersale/user-orderaftersale.ttml
index 03bc13087..138d1590a 100644
--- a/sourcecode/toutiao/pages/user-orderaftersale/user-orderaftersale.ttml
+++ b/sourcecode/toutiao/pages/user-orderaftersale/user-orderaftersale.ttml
@@ -27,8 +27,8 @@
{{item.order_data.items.orderaftersale_btn_text}}
- {{currency_symbol}}{{item.order_data.items.price}}
- {{currency_symbol}}{{item.order_data.items.original_price}}
+ {{item.order_data.currency_data.currency_symbol}}{{item.order_data.items.price}}
+ {{item.order_data.currency_data.currency_symbol}}{{item.order_data.items.original_price}}
x{{item.order_data.items.buy_number}}
@@ -38,7 +38,7 @@
/
{{item.reason}}
/
- {{currency_symbol}}{{item.price}}
+ {{item.order_data.currency_data.currency_symbol}}{{item.price}}
x{{item.number}}
diff --git a/sourcecode/toutiao/pages/user/user.js b/sourcecode/toutiao/pages/user/user.js
index 12fb4e62a..c9985bcae 100755
--- a/sourcecode/toutiao/pages/user/user.js
+++ b/sourcecode/toutiao/pages/user/user.js
@@ -3,8 +3,6 @@ Page({
data: {
avatar: app.data.default_user_head_src,
nickname: "用户名",
- customer_service_tel: null,
- common_user_center_notice: null,
message_total: 0,
head_nav_list: [
{ name: "订单总数", url: "user-order", count: 0 },
@@ -22,16 +20,39 @@ Page({
// 远程自定义导航
navigation: [],
-
+
+ // 基础配置
+ common_app_customer_service_tel: null,
+ common_user_center_notice: null,
common_app_is_online_service: 0,
common_app_is_head_vice_nav: 0,
},
onShow() {
tt.setNavigationBarTitle({title: app.data.common_pages_title.user});
+
+ // 数据加载
this.init();
+
+ // 初始化配置
+ this.init_config();
},
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ common_app_customer_service_tel: app.get_config('config.common_app_customer_service_tel'),
+ common_user_center_notice: app.get_config('config.common_user_center_notice'),
+ common_app_is_online_service: app.get_config('config.common_app_is_online_service'),
+ common_app_is_head_vice_nav: app.get_config('config.common_app_is_head_vice_nav'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
init(e) {
var user = app.get_user_info(this, "init"),
self = this;
@@ -102,15 +123,11 @@ Page({
this.setData({
user_order_status_list: temp_user_order_status_list,
- customer_service_tel: data.customer_service_tel || null,
- common_user_center_notice: data.common_user_center_notice || null,
avatar: ((data.avatar || null) != null) ? data.avatar : ((this.data.avatar || null) == null ? app.data.default_user_head_src : this.data.avatar),
nickname: (data.nickname != null) ? data.nickname : this.data.nickname,
message_total: ((data.common_message_total || 0) == 0) ? 0 : data.common_message_total,
head_nav_list: temp_head_nav_list,
navigation: data.navigation || [],
- common_app_is_online_service: data.common_app_is_online_service || 0,
- common_app_is_head_vice_nav: data.common_app_is_head_vice_nav || 0,
});
// 导航购物车处理
@@ -133,17 +150,29 @@ Page({
// 清除缓存
clear_storage(e) {
+ // 获取uuid重新存储缓存,一定情况下确保用户的uuid不改变
+ var uuid = tt.getStorageSync(app.data.cache_user_uuid_key) || null;
+
+ // 清除所有缓存
tt.clearStorage();
app.showToast("清除缓存成功", "success");
+
+ // 重新存储用户uuid缓存
+ if(uuid != null) {
+ tt.setStorage({
+ key: app.data.cache_user_uuid_key,
+ data: uuid
+ });
+ }
},
// 客服电话
call_event() {
- if(this.data.customer_service_tel == null)
+ if(this.data.common_app_customer_service_tel == null)
{
app.showToast("客服电话有误");
} else {
- app.call_tel(this.data.customer_service_tel);
+ app.call_tel(this.data.common_app_customer_service_tel);
}
},
diff --git a/sourcecode/toutiao/pages/user/user.json b/sourcecode/toutiao/pages/user/user.json
index ae3d41bb5..c96acc38a 100755
--- a/sourcecode/toutiao/pages/user/user.json
+++ b/sourcecode/toutiao/pages/user/user.json
@@ -5,6 +5,7 @@
"backgroundColorBottom": "#f5f5f5",
"backgroundTextStyle": "light",
"usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav",
"component-badge": "/components/badge/badge"
}
}
\ No newline at end of file
diff --git a/sourcecode/toutiao/pages/user/user.ttml b/sourcecode/toutiao/pages/user/user.ttml
index 8ab95846b..d71153565 100755
--- a/sourcecode/toutiao/pages/user/user.ttml
+++ b/sourcecode/toutiao/pages/user/user.ttml
@@ -68,7 +68,7 @@
-
+
{{common_user_center_notice}}
@@ -81,5 +81,8 @@
+
+
+
diff --git a/sourcecode/weixin/pages/buy/buy.js b/sourcecode/weixin/pages/buy/buy.js
index 132e85e3d..e06bdc98f 100755
--- a/sourcecode/weixin/pages/buy/buy.js
+++ b/sourcecode/weixin/pages/buy/buy.js
@@ -34,6 +34,7 @@ Page({
popup_plugins_coupon_status: false,
popup_plugins_coupon_index: null,
},
+
onLoad(params) {
//params['data'] = '{"buy_type":"goods","goods_id":"1","stock":"1","spec":"[]"}';
if((params.data || null) != null && app.get_length(JSON.parse(params.data)) > 0)