diff --git a/sourcecode/weixin/default/app.js b/sourcecode/weixin/default/app.js
index c7ba7fc73..b3bee5a59 100755
--- a/sourcecode/weixin/default/app.js
+++ b/sourcecode/weixin/default/app.js
@@ -74,7 +74,7 @@ App({
// 请求地址
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}}",
@@ -910,4 +910,59 @@ App({
return uuid;
},
+ // 链接地址事件
+ url_event(e) {
+ var value = e.currentTarget.dataset.value || null;
+ if(value != null)
+ {
+ var temp = value.substr(0, 6);
+ if(temp == 'http:/' || temp == 'https:')
+ {
+ this.open_web_view(value);
+ } else {
+ if (this.is_tabbar_pages(value))
+ {
+ wx.switchTab({ url: value });
+ } else {
+ wx.navigateTo({ url: value });
+ }
+ }
+ }
+ },
+
+ // 剪贴板
+ text_copy_event(e) {
+ var value = e.currentTarget.dataset.value || null;
+ if(value != null)
+ {
+ var self = this;
+ wx.setClipboardData({
+ data: value,
+ success (res) {
+ wx.getClipboardData({
+ success (res) {
+ self.showToast('复制成功', 'success');
+ }
+ });
+ }
+ });
+ } else {
+ this.showToast('复制内容为空');
+ }
+ },
+
+ // 图片预览
+ image_show_event(e) {
+ var value = e.currentTarget.dataset.value || null;
+ if(value != null)
+ {
+ wx.previewImage({
+ current: value,
+ urls: [value]
+ });
+ } else {
+ this.showToast('图片地址为空');
+ }
+ },
+
});
\ No newline at end of file
diff --git a/sourcecode/weixin/default/app.json b/sourcecode/weixin/default/app.json
index b8f09ae13..d6da01c42 100755
--- a/sourcecode/weixin/default/app.json
+++ b/sourcecode/weixin/default/app.json
@@ -1,5 +1,5 @@
{
- "pages": [
+ "pages": [
"pages/index/index",
"pages/goods-category/goods-category",
"pages/cart/cart",
@@ -81,7 +81,11 @@
"pages/plugins/signin/user-qrcode-saveinfo/user-qrcode-saveinfo",
"pages/plugins/signin/user-coming-list/user-coming-list",
"pages/plugins/points/index/index",
- "pages/plugins/brand/index/index"
+ "pages/plugins/brand/index/index",
+ "pages/plugins/shop/search/search",
+ "pages/plugins/shop/detail/detail",
+ "pages/plugins/shop/faovr/faovr",
+ "pages/plugins/shop/design/design"
],
"permission": {
"scope.userLocation": {
diff --git a/sourcecode/weixin/default/components/layout/layout.js b/sourcecode/weixin/default/components/layout/layout.js
index 739c2e2bb..76c4af007 100755
--- a/sourcecode/weixin/default/components/layout/layout.js
+++ b/sourcecode/weixin/default/components/layout/layout.js
@@ -45,22 +45,7 @@ Component({
// 链接地址事件
layout_url_event(e) {
- var value = e.currentTarget.dataset.value || null;
- if(value != null)
- {
- var temp = value.substr(0, 6);
- if(temp == 'http:/' || temp == 'https:')
- {
- app.open_web_view(value);
- } else {
- if (app.is_tabbar_pages(value))
- {
- wx.switchTab({ url: value });
- } else {
- wx.navigateTo({ url: value });
- }
- }
- }
+ app.url_event(e);
},
},
});
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/goods-detail/goods-detail.js b/sourcecode/weixin/default/pages/goods-detail/goods-detail.js
index 887d1496d..fb7f6fb29 100755
--- a/sourcecode/weixin/default/pages/goods-detail/goods-detail.js
+++ b/sourcecode/weixin/default/pages/goods-detail/goods-detail.js
@@ -31,6 +31,13 @@ Page({
goods_video_is_autoplay: false,
popup_share_status: false,
+ // 导航首页按钮
+ nav_home_button_info: {
+ "name": "首页",
+ "icon": "/images/goods-detail-home-icon.png",
+ "value": "/pages/index/index"
+ },
+
// 购物车快捷导航
quick_nav_cart_count: 0,
@@ -72,6 +79,9 @@ Page({
plugins_salerecords_timer: null,
plugins_salerecords_tips_content: null,
plugins_salerecords_tips_ent: '',
+
+ // 多商户
+ plugins_shop_data: null,
},
onLoad(params) {
@@ -179,6 +189,8 @@ Page({
quick_nav_cart_count: data.common_cart_total || 0,
plugins_salerecords_data: ((data.plugins_salerecords_data || null) == null || data.plugins_salerecords_data.length <= 0) ? null : data.plugins_salerecords_data,
+
+ plugins_shop_data: ((data.plugins_shop_data || null) == null || data.plugins_shop_data.length <= 0) ? null : data.plugins_shop_data,
});
// 限时秒杀倒计时
@@ -195,6 +207,18 @@ Page({
// 购买记录提示
this.plugins_salerecords_tips_handle();
+
+ // 导航首页按钮、多商户
+ if(this.data.plugins_shop_data != null)
+ {
+ this.setData({
+ nav_home_button_info: {
+ "name": "店铺",
+ "icon": this.data.plugins_shop_data.shop_icon,
+ "value": "/pages/plugins/shop/detail/detail?id="+this.data.plugins_shop_data.id
+ }
+ });
+ }
} else {
self.setData({
data_bottom_line_status: false,
@@ -261,9 +285,13 @@ Page({
// 进入店铺
shop_event(e)
{
- wx.switchTab({
- url: '/pages/index/index'
- });
+ var value = this.data.nav_home_button_info.value;
+ if(value == '/pages/index/index')
+ {
+ wx.switchTab({url: value});
+ } else {
+ wx.navigateTo({url: value});
+ }
},
// 导航购买按钮事件
diff --git a/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxml b/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxml
index 29fa83d59..05a5940de 100755
--- a/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxml
+++ b/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxml
@@ -116,6 +116,20 @@
+
+
+
+
+
+
+ {{plugins_shop_data.auth_type_name}}
+ {{plugins_shop_data.name}}
+
+ {{plugins_shop_data.describe}}
+
+
+
+
@@ -168,8 +182,8 @@
-
- 首页
+
+ {{nav_home_button_info.name}}
diff --git a/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxss b/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxss
index 5c2b8c154..bf0ff236a 100755
--- a/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxss
+++ b/sourcecode/weixin/default/pages/goods-detail/goods-detail.wxss
@@ -498,4 +498,41 @@
.plugins-salerecords-tips-bottom-center {
bottom: 10%;
top: auto;
+}
+
+/**
+ * 多商户 - 插件
+ */
+.plugins-shop-container {
+ padding: 20rpx 10rpx;
+}
+.plugins-shop-logo {
+ width: 120rpx;
+ height: 120rpx !important;
+}
+.plugins-shop-base {
+ width: calc(100% - 190rpx);
+ padding-right: 50rpx;
+}
+.plugins-shop-title {
+ font-size: 32rpx;
+ font-weight: bold;
+ line-height: 40rpx;
+}
+.plugins-shop-auth-icon {
+ background-color: #f4c985;
+ border: 1px solid #e7ba77;
+ border-radius: 6rpx;
+ color: #856651;
+ text-align: center;
+ padding: 2rpx 12rpx;
+ font-size: 24rpx;
+ font-weight: bold;
+ margin-right: 10rpx;
+}
+.plugins-shop-desc {
+ color: #888;
+ font-size: 24rpx;
+ min-height: 72rpx;
+ line-height: 36rpx;
}
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/design/design.js b/sourcecode/weixin/default/pages/plugins/shop/design/design.js
new file mode 100644
index 000000000..0250fabb9
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/design/design.js
@@ -0,0 +1,213 @@
+const app = getApp();
+Page({
+ data: {
+ data_bottom_line_status: false,
+ data_list_loding_status: 1,
+ data_list_loding_msg: '',
+ params: null,
+ user: null,
+ data_base: null,
+ shop: null,
+ shop_favor_user: [],
+ shop_navigation: [],
+ shop_goods_category: [],
+ data: null,
+ layout_data: [],
+
+ // 基础配置
+ search_keywords_value: '',
+ header_service_status: false,
+ nav_category_status: false,
+ shop_category_tab_value: 0,
+ shop_favor_info: {
+ "text": "收藏",
+ "status": 0,
+ "count": 0
+ },
+ },
+
+ onLoad(params) {
+ params['id'] = 1;
+ this.setData({
+ params: params,
+ user: app.get_user_cache_info(),
+ });
+ },
+
+ onShow() {
+ this.get_data();
+
+ // 显示分享菜单
+ app.show_share_menu();
+ },
+
+ // 获取数据
+ get_data() {
+ var self = this;
+ wx.request({
+ url: app.get_request_url("index", "design", "shop"),
+ method: "POST",
+ data: {"id": this.data.params.id || 0},
+ dataType: "json",
+ success: res => {
+ wx.stopPullDownRefresh();
+ if (res.data.code == 0) {
+ var data = res.data.data;
+ self.setData({
+ data_base: data.base || null,
+ shop: ((data.shop || null) == null || data.shop.length <= 0) ? null : data.shop,
+ shop_favor_user: data.shop_favor_user || [],
+ shop_navigation: data.shop_navigation || [],
+ shop_goods_category: data.shop_goods_category || [],
+ data: data.data || null,
+ layout_data: data.layout_data || [],
+ data_list_loding_msg: '',
+ data_list_loding_status: 0,
+ data_bottom_line_status: true,
+ });
+
+ // 收藏信息
+ if((this.data.shop || null) != null)
+ {
+ var status = (this.data.shop_favor_user.indexOf(this.data.shop.id) != -1) ? 1 : 0;
+ this.setData({
+ shop_favor_info: {
+ "count": this.data.shop.shop_favor_count || 0,
+ "status": status,
+ "text": ((status == 1) ? '已' : '')+'收藏'
+ }
+ });
+ }
+
+ // 标题名称
+ if((this.data.data || null) != null)
+ {
+ wx.setNavigationBarTitle({title: this.data.data.name});
+ }
+ } else {
+ self.setData({
+ data_bottom_line_status: false,
+ data_list_loding_status: 2,
+ data_list_loding_msg: res.data.msg,
+ });
+ }
+ },
+ fail: () => {
+ wx.stopPullDownRefresh();
+ self.setData({
+ data_bottom_line_status: false,
+ data_list_loding_status: 2,
+ data_list_loding_msg: '服务器请求出错',
+ });
+ app.showToast("服务器请求出错");
+ }
+ });
+ },
+
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.get_data();
+ },
+
+ // 店铺收藏事件
+ shop_favor_event(e) {
+ var user = app.get_user_info(this, 'shop_favor_event');
+ if (user != false) {
+ // 用户未绑定用户则转到登录页面
+ if (app.user_is_need_login(user)) {
+ wx.navigateTo({
+ url: "/pages/login/login?event_callback=shop_favor_event"
+ });
+ return false;
+ } else {
+ wx.showLoading({title: '处理中...'});
+ wx.request({
+ url: app.get_request_url("favor", "shopfavor", "shop"),
+ method: 'POST',
+ data: {"id": this.data.shop.id},
+ dataType: 'json',
+ success: (res) => {
+ wx.hideLoading();
+ if(res.data.code == 0)
+ {
+ this.setData({shop_favor_info: res.data.data});
+ app.showToast(res.data.msg, "success");
+ } else {
+ if (app.is_login_check(res.data, this, 'shop_favor_event')) {
+ app.showToast(res.data.msg);
+ }
+ }
+ },
+ fail: () => {
+ wx.hideLoading();
+ app.showToast('服务器请求出错');
+ }
+ });
+ }
+ }
+ },
+
+ // 搜索输入事件
+ search_keywords_event(e) {
+ this.setData({search_keywords_value: e.detail.value || ''});
+ },
+
+ // 搜索事件
+ search_button_event(e) {
+ var value = e.currentTarget.dataset.value || null;
+ wx.navigateTo({
+ url: value+'keywords='+this.data.search_keywords_value || '',
+ });
+ },
+
+ // 导航分类事件
+ header_service_event(e) {
+ this.setData({header_service_status: !this.data.header_service_status});
+ },
+
+ // 导航分类事件
+ nav_shop_category_event(e) {
+ this.setData({nav_category_status: !this.data.nav_category_status});
+ },
+
+ // 导航分类事件
+ shop_category_event(e) {
+ var value = e.currentTarget.dataset.value || null;
+ wx.navigateTo({ url: '/pages/plugins/shop/search/search?shop_id='+this.data.shop.id+'&category_id='+value });
+ },
+
+ // 导航事件
+ nav_event(e) {
+ app.url_event(e);
+ },
+
+ // 剪切板
+ text_copy_event(e) {
+ app.text_copy_event(e);
+ },
+
+ // 图片预览
+ image_show_event(e) {
+ app.image_show_event(e);
+ },
+
+ // 自定义分享
+ onShareAppMessage() {
+ var user_id = app.get_user_cache_info('id', 0) || 0;
+ return {
+ title: this.data.data.name || this.data.data.seo_title || app.data.application_title,
+ desc: this.data.data.seo_desc || app.data.application_describe,
+ path: '/pages/plugins/shop/design/design?id='+this.data.data.id+'&referrer=' + user_id
+ };
+ },
+
+ // 分享朋友圈
+ onShareTimeline() {
+ var user_id = app.get_user_cache_info('id', 0) || 0;
+ return {
+ title: this.data.data.name || this.data.data.seo_title || app.data.application_title,
+ query: 'id='+this.data.data.id+'&referrer=' + user_id,
+ imageUrl: ''
+ };
+ },
+});
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/design/design.json b/sourcecode/weixin/default/pages/plugins/shop/design/design.json
new file mode 100644
index 000000000..f723ed479
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/design/design.json
@@ -0,0 +1,10 @@
+{
+ "enablePullDownRefresh": true,
+ "navigationBarBackgroundColor": "#d2364c",
+ "backgroundColorTop": "#d2364c",
+ "backgroundColorBottom": "#f5f5f5",
+ "backgroundTextStyle": "light",
+ "usingComponents": {
+ "component-layout": "/components/layout/layout"
+ }
+}
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/design/design.wxml b/sourcecode/weixin/default/pages/plugins/shop/design/design.wxml
new file mode 100644
index 000000000..c6aee11e0
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/design/design.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/design/design.wxss b/sourcecode/weixin/default/pages/plugins/shop/design/design.wxss
new file mode 100644
index 000000000..ff0487a09
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/design/design.wxss
@@ -0,0 +1,155 @@
+/**
+ * 搜索
+ */
+.search {
+ background: #d2364c;
+ padding: 20rpx 10rpx 25rpx 20rpx;
+ position: relative;
+}
+.search input {
+ width: calc(100% - 328rpx);
+ padding-left: 15rpx;
+ font-size: 24rpx;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+.search input,.search-btn button {
+ height: 52rpx;
+ line-height: 52rpx;
+ border-radius: 6rpx;
+}
+.search-btn {
+ position: absolute;
+ top: 20rpx;
+ right: 20rpx;
+}
+.search-btn button {
+ color: #fff;
+ width: 150rpx;
+ font-size: 24rpx;
+}
+.search-btn button:first-child {
+ background: #ff8c00;
+ border: 1px solid #ff8c00;
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.search-btn button:last-child {
+ background: #483E39;
+ border: 1px solid #483E39;
+ margin-left: 10rpx;
+}
+
+/**
+ * 头部
+ */
+.header {
+ padding: 20rpx 10rpx;
+}
+.shop-logo {
+ width: 280rpx;
+ margin-top: 5rpx;
+}
+.base-bottom image {
+ width: 28rpx;
+ height: 28rpx;
+ margin-right: 5rpx;
+}
+.header .base {
+ width: calc(100% - 320rpx);
+}
+.shop-title {
+ font-size: 32rpx;
+ font-weight: bold;
+ line-height: 40rpx;
+}
+.shop-auth-icon {
+ background-color: #f4c985;
+ border: 1px solid #e7ba77;
+ border-radius: 6rpx;
+ color: #856651;
+ text-align: center;
+ padding: 2rpx 12rpx;
+ font-size: 24rpx;
+ font-weight: bold;
+ margin-right: 10rpx;
+}
+
+/**
+ * 客服
+ */
+.header-service {
+ width: 390rpx;
+ position: absolute;
+ left: 80rpx;
+ top: 210rpx;
+ z-index: 2;
+ font-size: 24rpx;
+ -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%);
+ box-shadow: 0 10px 10px rgb(0 0 0 / 30%);
+}
+.header-service image {
+ width: 260rpx;
+ height: 260rpx;
+}
+.header-service .item {
+ padding: 20rpx;
+}
+
+/**
+ * 滚动
+ */
+.nav-roll {
+ width: 100%;
+ white-space: nowrap;
+ box-sizing: border-box;
+}
+.nav-roll .item {
+ display: inline-block;
+}
+
+/**
+ * 导航
+ */
+.nav {
+ height: 70rpx;
+ border-bottom: 1px solid #d2364c;
+}
+.nav .nav-scroll {
+ float: right;
+ width: calc(100% - 230rpx);
+}
+.nav .item {
+ padding: 0 20rpx;
+ font-weight: bold;
+}
+.nav-shop-category {
+ padding-right: 38rpx !important;
+ background-size: 14px 14px;
+}
+
+/**
+ * 导航商品分类
+ */
+.nav-category {
+ background: #d2364c;
+ width: 220rpx;
+ z-index: 1;
+ position: absolute;
+ margin-top: 50rpx;
+ border: 1px solid #d2364c;
+ -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%);
+ box-shadow: 0 10px 10px rgb(0 0 0 / 30%);
+}
+.nav-category .category-scroll {
+ max-height: 600rpx;
+}
+.nav-category .item {
+ padding: 15rpx 20rpx;
+ display: block;
+ font-weight: inherit;
+ color: #f1f1f1;
+}
+.nav-category .item:not(:last-child) {
+ border-bottom: 1px solid #c72e44;
+}
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/detail/detail.js b/sourcecode/weixin/default/pages/plugins/shop/detail/detail.js
new file mode 100644
index 000000000..8a5f87c2c
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/detail/detail.js
@@ -0,0 +1,247 @@
+const app = getApp();
+Page({
+ data: {
+ data_bottom_line_status: false,
+ data_list_loding_status: 1,
+ data_list_loding_msg: '',
+ params: null,
+ user: null,
+ data_base: null,
+ shop: null,
+ shop_favor_user: [],
+ shop_navigation: [],
+ shop_goods_category: [],
+ data: null,
+ goods_list: [],
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
+ search_keywords_value: '',
+ header_service_status: false,
+ nav_category_status: false,
+ shop_category_tab_value: 0,
+ shop_favor_info: {
+ "text": "收藏",
+ "status": 0,
+ "count": 0
+ },
+ },
+
+ onLoad(params) {
+ this.setData({
+ params: params,
+ user: app.get_user_cache_info(),
+ });
+ },
+
+ onShow() {
+ this.get_data();
+
+ // 初始化配置
+ this.init_config();
+
+ // 显示分享菜单
+ app.show_share_menu();
+ },
+
+ // 初始化配置
+ init_config(status) {
+ if((status || false) == true) {
+ this.setData({
+ currency_symbol: app.get_config('currency_symbol'),
+ });
+ } else {
+ app.is_config(this, 'init_config');
+ }
+ },
+
+ // 获取数据
+ get_data() {
+ var self = this;
+ wx.request({
+ url: app.get_request_url("detail", "index", "shop"),
+ method: "POST",
+ data: {"id": this.data.params.id || 0},
+ dataType: "json",
+ success: res => {
+ wx.stopPullDownRefresh();
+ if (res.data.code == 0) {
+ var data = res.data.data;
+ self.setData({
+ data_base: data.base || null,
+ shop: ((data.shop || null) == null || data.shop.length <= 0) ? null : data.shop,
+ shop_favor_user: data.shop_favor_user || [],
+ shop_navigation: data.shop_navigation || [],
+ shop_goods_category: data.shop_goods_category || [],
+ data: data.data || null,
+ goods_list: ((data.data || null) != null && (data.data.goods || null) != null && data.data.goods.length > 0) ? data.data.goods : [],
+ data_list_loding_msg: '',
+ data_list_loding_status: 0,
+ data_bottom_line_status: true,
+ });
+
+ // 收藏信息
+ if((this.data.shop || null) != null)
+ {
+ var status = (this.data.shop_favor_user.indexOf(this.data.shop.id) != -1) ? 1 : 0;
+ this.setData({
+ shop_favor_info: {
+ "count": this.data.shop.shop_favor_count || 0,
+ "status": status,
+ "text": ((status == 1) ? '已' : '')+'收藏'
+ }
+ });
+ }
+
+ // 标题名称
+ if((this.data.shop || null) != null)
+ {
+ wx.setNavigationBarTitle({title: this.data.shop.name});
+ }
+ } else {
+ self.setData({
+ data_bottom_line_status: false,
+ data_list_loding_status: 2,
+ data_list_loding_msg: res.data.msg,
+ });
+ }
+ },
+ fail: () => {
+ wx.stopPullDownRefresh();
+ self.setData({
+ data_bottom_line_status: false,
+ data_list_loding_status: 2,
+ data_list_loding_msg: '服务器请求出错',
+ });
+ app.showToast("服务器请求出错");
+ }
+ });
+ },
+
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.get_data();
+ },
+
+ // 店铺收藏事件
+ shop_favor_event(e) {
+ var user = app.get_user_info(this, 'shop_favor_event');
+ if (user != false) {
+ // 用户未绑定用户则转到登录页面
+ if (app.user_is_need_login(user)) {
+ wx.navigateTo({
+ url: "/pages/login/login?event_callback=shop_favor_event"
+ });
+ return false;
+ } else {
+ wx.showLoading({title: '处理中...'});
+ wx.request({
+ url: app.get_request_url("favor", "shopfavor", "shop"),
+ method: 'POST',
+ data: {"id": this.data.shop.id},
+ dataType: 'json',
+ success: (res) => {
+ wx.hideLoading();
+ if(res.data.code == 0)
+ {
+ this.setData({shop_favor_info: res.data.data});
+ app.showToast(res.data.msg, "success");
+ } else {
+ if (app.is_login_check(res.data, this, 'shop_favor_event')) {
+ app.showToast(res.data.msg);
+ }
+ }
+ },
+ fail: () => {
+ wx.hideLoading();
+ app.showToast('服务器请求出错');
+ }
+ });
+ }
+ }
+ },
+
+ // 搜索输入事件
+ search_keywords_event(e) {
+ this.setData({search_keywords_value: e.detail.value || ''});
+ },
+
+ // 搜索事件
+ search_button_event(e) {
+ var value = e.currentTarget.dataset.value || null;
+ wx.navigateTo({
+ url: value+'keywords='+this.data.search_keywords_value || '',
+ });
+ },
+
+ // 导航分类事件
+ header_service_event(e) {
+ this.setData({header_service_status: !this.data.header_service_status});
+ },
+
+ // 导航分类事件
+ nav_shop_category_event(e) {
+ this.setData({nav_category_status: !this.data.nav_category_status});
+ },
+
+ // 导航分类事件
+ shop_category_event(e) {
+ var value = e.currentTarget.dataset.value || null;
+ wx.navigateTo({ url: '/pages/plugins/shop/search/search?shop_id='+this.data.shop.id+'&category_id='+value });
+ },
+
+ // 导航事件
+ nav_event(e) {
+ app.url_event(e);
+ },
+
+ // 剪切板
+ text_copy_event(e) {
+ app.text_copy_event(e);
+ },
+
+ // 图片预览
+ image_show_event(e) {
+ app.image_show_event(e);
+ },
+
+ // 分类切换
+ shop_category_tab_event(e) {
+ var value = e.currentTarget.dataset.value || 0;
+ var temp = this.data.data;
+ var goods = [];
+ if(temp.goods.length > 0) {
+ for(var i in temp.goods) {
+ if(temp.goods[i]['shop_category_id'] == value || value == 0) {
+ goods.push(temp.goods[i]);
+ }
+ }
+ }
+
+ this.setData({
+ shop_category_tab_value: value,
+ goods_list: goods,
+ data_bottom_line_status: (goods.length > 0)
+ });
+ },
+
+ // 自定义分享
+ onShareAppMessage() {
+ var user_id = app.get_user_cache_info('id', 0) || 0;
+ return {
+ title: this.data.shop.name || this.data.shop.seo_title || app.data.application_title,
+ desc: this.data.shop.seo_desc || app.data.application_describe,
+ path: '/pages/plugins/shop/detail/detail?id='+this.data.shop.id+'&referrer=' + user_id
+ };
+ },
+
+ // 分享朋友圈
+ onShareTimeline() {
+ var user_id = app.get_user_cache_info('id', 0) || 0;
+ return {
+ title: this.data.shop.name || this.data.shop.seo_title || app.data.application_title,
+ query: 'id='+this.data.shop.id+'&referrer=' + user_id,
+ imageUrl: this.data.shop.logo || ''
+ };
+ },
+});
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/detail/detail.json b/sourcecode/weixin/default/pages/plugins/shop/detail/detail.json
new file mode 100644
index 000000000..f723ed479
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/detail/detail.json
@@ -0,0 +1,10 @@
+{
+ "enablePullDownRefresh": true,
+ "navigationBarBackgroundColor": "#d2364c",
+ "backgroundColorTop": "#d2364c",
+ "backgroundColorBottom": "#f5f5f5",
+ "backgroundTextStyle": "light",
+ "usingComponents": {
+ "component-layout": "/components/layout/layout"
+ }
+}
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxml b/sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxml
new file mode 100644
index 000000000..ed90f90e3
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 全部商品
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+ {{currency_symbol}}{{item.min_price}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxss b/sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxss
new file mode 100644
index 000000000..23c627927
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/detail/detail.wxss
@@ -0,0 +1,198 @@
+/**
+ * 搜索
+ */
+.search {
+ background: #d2364c;
+ padding: 20rpx 10rpx 25rpx 20rpx;
+ position: relative;
+}
+.search input {
+ width: calc(100% - 328rpx);
+ padding-left: 15rpx;
+ font-size: 24rpx;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+.search input,.search-btn button {
+ height: 52rpx;
+ line-height: 52rpx;
+ border-radius: 6rpx;
+}
+.search-btn {
+ position: absolute;
+ top: 20rpx;
+ right: 20rpx;
+}
+.search-btn button {
+ color: #fff;
+ width: 150rpx;
+ font-size: 24rpx;
+}
+.search-btn button:first-child {
+ background: #ff8c00;
+ border: 1px solid #ff8c00;
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.search-btn button:last-child {
+ background: #483E39;
+ border: 1px solid #483E39;
+ margin-left: 10rpx;
+}
+
+/**
+ * 头部
+ */
+.header {
+ padding: 20rpx 10rpx;
+}
+.shop-logo {
+ width: 280rpx;
+ margin-top: 5rpx;
+}
+.base-bottom image {
+ width: 28rpx;
+ height: 28rpx;
+ margin-right: 5rpx;
+}
+.header .base {
+ width: calc(100% - 320rpx);
+}
+.shop-title {
+ font-size: 32rpx;
+ font-weight: bold;
+ line-height: 40rpx;
+}
+.shop-auth-icon {
+ background-color: #f4c985;
+ border: 1px solid #e7ba77;
+ border-radius: 6rpx;
+ color: #856651;
+ text-align: center;
+ padding: 2rpx 12rpx;
+ font-size: 24rpx;
+ font-weight: bold;
+ margin-right: 10rpx;
+}
+
+/**
+ * 客服
+ */
+.header-service {
+ width: 390rpx;
+ position: absolute;
+ left: 80rpx;
+ top: 210rpx;
+ z-index: 2;
+ font-size: 24rpx;
+ -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%);
+ box-shadow: 0 10px 10px rgb(0 0 0 / 30%);
+}
+.header-service image {
+ width: 260rpx;
+ height: 260rpx;
+}
+.header-service .item {
+ padding: 20rpx;
+}
+
+/**
+ * 滚动
+ */
+.nav-roll {
+ width: 100%;
+ white-space: nowrap;
+ box-sizing: border-box;
+}
+.nav-roll .item {
+ display: inline-block;
+}
+
+/**
+ * 导航
+ */
+.nav {
+ height: 70rpx;
+ border-bottom: 1px solid #d2364c;
+}
+.nav .nav-scroll {
+ float: right;
+ width: calc(100% - 230rpx);
+}
+.nav .item {
+ padding: 0 20rpx;
+ font-weight: bold;
+}
+.nav-shop-category {
+ padding-right: 38rpx !important;
+ background-size: 14px 14px;
+}
+
+/**
+ * 导航商品分类
+ */
+.nav-category {
+ background: #d2364c;
+ width: 220rpx;
+ z-index: 1;
+ position: absolute;
+ margin-top: 50rpx;
+ border: 1px solid #d2364c;
+ -webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%);
+ box-shadow: 0 10px 10px rgb(0 0 0 / 30%);
+}
+.nav-category .category-scroll {
+ max-height: 600rpx;
+}
+.nav-category .item {
+ padding: 15rpx 20rpx;
+ display: block;
+ font-weight: inherit;
+ color: #f1f1f1;
+}
+.nav-category .item:not(:last-child) {
+ border-bottom: 1px solid #c72e44;
+}
+
+/**
+ * 商品分类切换
+ */
+.shop-category-list {
+ padding: 20rpx 10rpx;
+}
+.shop-category-list .item {
+ border-radius: 6rpx;
+ padding: 5rpx 20rpx;
+}
+.shop-category-list .active {
+ background: #d2364c;
+ color: #fff;
+}
+
+/**
+ * 商品列表
+ */
+.data-list .items {
+ width: calc(50% - 5rpx);
+ margin-bottom: 10rpx;
+ padding-bottom: 20rpx;
+}
+.data-list .items:nth-child(2n) {
+ float: right;
+}
+.data-list .items:nth-child(2n+1) {
+ float: left;
+}
+.data-list .items image {
+ width: 100%;
+ height: 200px !important;
+}
+.data-list .items .base {
+ text-align: left;
+ font-size: 32rpx;
+ padding: 0 15rpx;
+}
+.data-list .items .base,
+.data-list .items .base .price {
+ margin-top: 15rpx;
+}
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/faovr/faovr.js b/sourcecode/weixin/default/pages/plugins/shop/faovr/faovr.js
new file mode 100755
index 000000000..4ee5d0271
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/faovr/faovr.js
@@ -0,0 +1,184 @@
+const app = getApp();
+Page({
+ data: {
+ data_list: [],
+ data_page_total: 0,
+ data_page: 1,
+ data_list_loding_status: 1,
+ data_bottom_line_status: false,
+ },
+
+ onShow() {
+ // 数据加载
+ this.init();
+ },
+
+ // 获取数据
+ init() {
+ var user = app.get_user_info(this, "init");
+ if (user != false) {
+ // 用户未绑定用户则转到登录页面
+ if (app.user_is_need_login(user)) {
+ wx.redirectTo({
+ url: "/pages/login/login?event_callback=init"
+ });
+ return false;
+ } else {
+ // 获取数据
+ this.get_data_list();
+ }
+ } else {
+ this.setData({
+ data_list_loding_status: 0,
+ data_bottom_line_status: false,
+ });
+ }
+ },
+
+ // 获取数据
+ get_data_list(is_mandatory) {
+ // 分页是否还有数据
+ if ((is_mandatory || 0) == 0) {
+ if (this.data.data_bottom_line_status == true) {
+ return false;
+ }
+ }
+
+ // 加载loding
+ wx.showLoading({title: "加载中..." });
+ this.setData({
+ data_list_loding_status: 1
+ });
+
+ // 获取数据
+ wx.request({
+ url: app.get_request_url("index", "shopfavor", "shop"),
+ method: "POST",
+ data: {
+ page: this.data.data_page
+ },
+ dataType: "json",
+ header: { 'content-type': 'application/x-www-form-urlencoded' },
+ success: res => {
+ wx.hideLoading();
+ wx.stopPullDownRefresh();
+ if (res.data.code == 0) {
+ if (res.data.data.data.length > 0) {
+ if (this.data.data_page <= 1) {
+ var temp_data_list = res.data.data.data;
+ } else {
+ var temp_data_list = this.data.data_list;
+ var temp_data = res.data.data.data;
+ for (var i in temp_data) {
+ temp_data_list.push(temp_data[i]);
+ }
+ }
+ this.setData({
+ data_list: temp_data_list,
+ data_total: res.data.data.total,
+ data_page_total: res.data.data.page_total,
+ data_list_loding_status: 3,
+ data_page: this.data.data_page + 1
+ });
+
+ // 是否还有数据
+ if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total)
+ {
+ this.setData({ data_bottom_line_status: true });
+ } else {
+ this.setData({data_bottom_line_status: false});
+ }
+ } else {
+ this.setData({
+ data_list_loding_status: 0
+ });
+ }
+ } else {
+ this.setData({
+ data_list_loding_status: 0
+ });
+ if (app.is_login_check(res.data, this, 'get_data_list')) {
+ app.showToast(res.data.msg);
+ }
+ }
+ },
+ fail: () => {
+ wx.hideLoading();
+ wx.stopPullDownRefresh();
+
+ this.setData({
+ data_list_loding_status: 2
+ });
+ app.showToast("服务器请求出错");
+ }
+ });
+ },
+
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.setData({
+ data_page: 1
+ });
+ this.get_data_list(1);
+ },
+
+ // 滚动加载
+ scroll_lower(e) {
+ this.get_data_list();
+ },
+
+ // 取消
+ cancel_event(e) {
+ wx.showModal({
+ title: "温馨提示",
+ content: "取消后不可恢复,确定继续吗?",
+ confirmText: "确认",
+ cancelText: "不了",
+ success: result => {
+ if (result.confirm) {
+ // 参数
+ var id = e.currentTarget.dataset.value;
+ var index = e.currentTarget.dataset.index;
+
+ // 加载loding
+ wx.showLoading({title: "处理中..." });
+
+ wx.request({
+ url: app.get_request_url("delete", "shopfavor", "shop"),
+ method: "POST",
+ data: {ids: id},
+ dataType: "json",
+ header: { 'content-type': 'application/x-www-form-urlencoded' },
+ success: res => {
+ wx.hideLoading();
+ if (res.data.code == 0) {
+ var temp_data_list = this.data.data_list;
+ temp_data_list.splice(index, 1);
+ this.setData({data_list: temp_data_list});
+ if(temp_data_list.length == 0)
+ {
+ this.setData({
+ data_list_loding_status: 0,
+ data_bottom_line_status: false,
+ });
+ }
+
+ app.showToast(res.data.msg, "success");
+ } else {
+ if (app.is_login_check(res.data)) {
+ app.showToast(res.data.msg);
+ } else {
+ app.showToast('提交失败,请重试!');
+ }
+ }
+ },
+ fail: () => {
+ wx.hideLoading();
+ app.showToast("服务器请求出错");
+ }
+ });
+ }
+ }
+ });
+ },
+});
diff --git a/sourcecode/weixin/default/pages/plugins/shop/faovr/faovr.json b/sourcecode/weixin/default/pages/plugins/shop/faovr/faovr.json
new file mode 100755
index 000000000..98b7f1192
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/faovr/faovr.json
@@ -0,0 +1,6 @@
+{
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": "店铺收藏",
+ "usingComponents": {
+ }
+}
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/faovr/faovr.wxml b/sourcecode/weixin/default/pages/plugins/shop/faovr/faovr.wxml
new file mode 100755
index 000000000..d6c34adf3
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/faovr/faovr.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ {{item.shop_info.name}}
+ {{item.shop_info.describe}}
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/faovr/faovr.wxss b/sourcecode/weixin/default/pages/plugins/shop/faovr/faovr.wxss
new file mode 100755
index 000000000..62987d519
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/faovr/faovr.wxss
@@ -0,0 +1,29 @@
+.item {
+ padding: 20rpx 10rpx;
+ position: relative;
+}
+.logo {
+ width: 140rpx;
+ height: 140rpx;
+ margin-right: 20rpx;
+}
+.title {
+ margin-bottom: 15rpx;
+ font-size: 32rpx;
+ font-weight: bold;
+}
+.describe {
+ font-size: 28rpx;
+ line-height: 42rpx;
+ min-height: 84rpx;
+ width: calc(100% - 325rpx);
+}
+
+.submit-cancel {
+ position: absolute;
+ right: 10rpx;
+ bottom: 20rpx;
+ border: 1px solid #f7c3b3;
+ color: #f7c3b3 !important;
+ padding: 0 35rpx;
+}
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/public/header.wxml b/sourcecode/weixin/default/pages/plugins/shop/public/header.wxml
new file mode 100644
index 000000000..2d36f6b69
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/public/header.wxml
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看商品分类
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+ 暂无数据
+
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/search/search.js b/sourcecode/weixin/default/pages/plugins/shop/search/search.js
new file mode 100755
index 000000000..9272c093a
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/search/search.js
@@ -0,0 +1,358 @@
+const app = getApp();
+Page({
+ data: {
+ data_list_loding_status: 1,
+ data_list_loding_msg: '',
+ data_bottom_line_status: false,
+ data_list: [],
+ data_total: 0,
+ data_page_total: 0,
+ data_page: 1,
+ params: null,
+ post_data: {},
+ is_show_popup_form: false,
+ popup_form_loading_status: false,
+ search_nav_sort_list: [
+ { name: "综合", field: "default", sort: "asc", "icon": null },
+ { name: "销量", field: "sales_count", sort: "asc", "icon": "default" },
+ { name: "热度", field: "access_count", sort: "asc", "icon": "default" },
+ { name: "价格", field: "min_price", sort: "asc", "icon": "default" },
+ { name: "最新", field: "id", sort: "asc", "icon": "default" }
+ ],
+
+ // 基础配置
+ currency_symbol: app.data.currency_symbol,
+
+ // 搜素条件
+ search_map_info: [],
+ category_list: [],
+ map_fields_list: {
+ "category_list": {"height":"82rpx", "default":"82rpx", "form_key":"category_ids"}
+ },
+ },
+
+ onLoad(params) {
+ // 初始参数
+ this.setData({
+ params: params,
+ post_data: {
+ wd: params.keywords || '',
+ shop_id: params.shop_id || 0,
+ category_ids: ((params.category_id || 0) == 0) ? '' : JSON.stringify({"0":params.category_id})
+ }
+ });
+
+ // 显示分享菜单
+ app.show_share_menu();
+ },
+
+ 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() {
+ // 获取数据
+ this.get_data_list();
+ },
+
+ // 搜索
+ search_event() {
+ this.setData({
+ data_list: [],
+ data_page: 1
+ });
+ this.get_data_list(1);
+ },
+
+ // 获取数据列表
+ get_data_list(is_mandatory) {
+ // 分页是否还有数据
+ if ((is_mandatory || 0) == 0) {
+ if (this.data.data_bottom_line_status == true) {
+ return false;
+ }
+ }
+
+ // 加载loding
+ wx.showLoading({title: "加载中..." });
+
+ // 参数
+ var post_data = this.request_map_handle();
+
+ // 获取数据
+ wx.request({
+ url: app.get_request_url("index", "search", "shop"),
+ method: "POST",
+ data: post_data,
+ dataType: "json",
+ header: { 'content-type': 'application/x-www-form-urlencoded' },
+ success: res => {
+ wx.hideLoading();
+ wx.stopPullDownRefresh();
+ if (res.data.code == 0) {
+ var data = res.data.data;
+
+ // 仅首次请求赋值条件数据
+ if(this.data.data_list_loding_status == 1)
+ {
+ this.setData({
+ search_map_info: data.search_map_info || [],
+ category_list: data.shop_goods_category || [],
+ });
+
+ // 指定分类id选中处理
+ if((this.data.params.category_id || 0) != 0 && this.data.category_list.length > 0)
+ {
+ var temp = this.data.category_list;
+ for(var i in temp)
+ {
+ if(temp[i]['id'] == this.data.params.category_id)
+ {
+ temp[i]['active'] = 1;
+ }
+ }
+ this.setData({category_list: temp});
+ }
+ }
+
+ // 列表数据处理
+ if (data.data.length > 0) {
+ if (this.data.data_page <= 1) {
+ var temp_data_list = data.data;
+ } else {
+ var temp_data_list = this.data.data_list;
+ var temp_data = data.data;
+ for (var i in temp_data) {
+ temp_data_list.push(temp_data[i]);
+ }
+ }
+ this.setData({
+ data_list: temp_data_list,
+ data_total: data.total,
+ data_page_total: data.page_total,
+ data_list_loding_status: 3,
+ data_page: this.data.data_page + 1
+ });
+
+ // 是否还有数据
+ if (this.data.data_page > 1 && this.data.data_page > this.data.data_page_total)
+ {
+ this.setData({ data_bottom_line_status: true });
+ } else {
+ this.setData({data_bottom_line_status: false});
+ }
+ } else {
+ this.setData({
+ data_list_loding_status: 0,
+ });
+ if (this.data.data_page <= 1) {
+ this.setData({
+ data_list: [],
+ data_bottom_line_status: false,
+ });
+ }
+ }
+ } else {
+ this.setData({
+ data_list_loding_status: 0,
+ data_list_loding_msg: res.data.msg
+ });
+ app.showToast(res.data.msg);
+ }
+ },
+ fail: () => {
+ wx.hideLoading();
+ wx.stopPullDownRefresh();
+ this.setData({
+ data_list_loding_status: 2
+ });
+ app.showToast("服务器请求出错");
+ }
+ });
+ },
+
+ // 搜索条件处理
+ request_map_handle() {
+ var params = this.data.params;
+ var post_data = this.data.post_data;
+ post_data['page'] = this.data.data_page;
+
+ // 店铺id
+ post_data['shop_id'] = params['shop_id'] || 0;
+
+ // 搜索条件
+ var data = this.data;
+ for(var i in data.map_fields_list)
+ {
+ if((data[i] != null) != null && data[i].length > 0)
+ {
+ var temp = {};
+ var index = 0;
+ for(var k in data[i])
+ {
+ if((data[i][k]['active'] || 0) == 1)
+ {
+ // 默认取值id
+ temp[index] = data[i][k]['id'];
+ index++;
+ }
+ }
+ post_data[data.map_fields_list[i]['form_key']] = (app.get_length(temp) > 0) ? JSON.stringify(temp) : '';
+ }
+ }
+
+ return post_data;
+ },
+
+ // 下拉刷新
+ onPullDownRefresh() {
+ this.setData({
+ data_page: 1
+ });
+ this.get_data_list(1);
+ },
+
+ // 滚动加载
+ scroll_lower(e) {
+ this.get_data_list();
+ },
+
+ // 搜索条件
+ form_submit_event(e) {
+ this.setData({ post_data: e.detail.value, data_page: 1});
+ this.popup_form_event_close();
+ this.get_data_list(1);
+ },
+
+ // 筛选条件关闭
+ popup_form_event_close(e) {
+ this.setData({ is_show_popup_form: false});
+ },
+
+ // 筛选条件开启
+ popup_form_event_show(e) {
+ this.setData({ is_show_popup_form: true });
+ },
+
+ // 排序事件
+ nav_sort_event(e) {
+ var index = e.currentTarget.dataset.index || 0;
+ var temp_post_data = this.data.post_data;
+ var temp_search_nav_sort = this.data.search_nav_sort_list;
+ var temp_sort = (temp_search_nav_sort[index]['sort'] == 'desc') ? 'asc' : 'desc';
+ for (var i in temp_search_nav_sort) {
+ if(i != index) {
+ if (temp_search_nav_sort[i]['icon'] != null) {
+ temp_search_nav_sort[i]['icon'] = 'default';
+ }
+ temp_search_nav_sort[i]['sort'] = 'desc';
+ }
+ }
+
+ temp_search_nav_sort[index]['sort'] = temp_sort;
+ if (temp_search_nav_sort[index]['icon'] != null) {
+ temp_search_nav_sort[index]['icon'] = temp_sort;
+ }
+
+ temp_post_data['order_by_field'] = temp_search_nav_sort[index]['field'];
+ temp_post_data['order_by_type'] = temp_sort;
+
+ this.setData({
+ post_data: temp_post_data,
+ search_nav_sort_list: temp_search_nav_sort,
+ data_page: 1,
+ });
+ this.get_data_list(1);
+ },
+
+ // 条件-更多数据展示事件
+ more_event(e) {
+ var value = e.currentTarget.dataset.value || null;
+ var temp_more = this.data.map_fields_list;
+ if(value != null && (temp_more[value] || null) != null)
+ {
+ temp_more[value]['height'] = (temp_more[value]['height'] == 'auto') ? temp_more[value]['default'] : 'auto';
+ this.setData({map_fields_list: temp_more});
+ }
+ },
+
+ // 条件-选择事件
+ map_item_event(e) {
+ var index = e.currentTarget.dataset.index;
+ var field = e.currentTarget.dataset.field;
+ var data = this.data;
+ if((data[field] || null) != null && (data[field][index] || null) != null)
+ {
+ data[field][index]['active'] = ((data[field][index]['active'] || 0) == 0) ? 1 : 0;
+ this.setData(data);
+ }
+ },
+
+ // 条件-清空
+ map_remove_event(e) {
+ var data = this.data;
+ // 关键字
+ data['post_data']['wd'] = '';
+
+ // 分类
+ for(var i in data.map_fields_list)
+ {
+ if((data[i] != null) != null && data[i].length > 0)
+ {
+ for(var k in data[i])
+ {
+ data[i][k]['active'] = 0;
+ }
+ }
+ }
+
+ // 关闭条件弹层
+ data['is_show_popup_form'] = false;
+
+ // 分页恢复1页、重新获取数据
+ data['data_page'] = 1;
+ this.setData(data);
+ this.get_data_list(1);
+ },
+
+ // 自定义分享
+ onShareAppMessage() {
+ var user_id = app.get_user_cache_info('id', 0) || 0;
+ var shop_id = this.data.params['shop_id'] || 0;
+ var category_id = this.data.params['category_id'] || 0;
+ var keywords = this.data.params['keywords'] || '';
+ return {
+ title: this.data.shop.name || app.data.application_title,
+ desc: this.data.shop.describe || app.data.application_describe,
+ path: '/pages/plugins/shop/search/search?shop_id='+shop_id+'&referrer=' + user_id+'&category_id='+category_id+'&keywords='+keywords
+ };
+ },
+
+ // 分享朋友圈
+ onShareTimeline() {
+ var user_id = app.get_user_cache_info('id', 0) || 0;
+ var shop_id = this.data.params['shop_id'] || 0;
+ var category_id = this.data.params['category_id'] || 0;
+ var keywords = this.data.params['keywords'] || '';
+ return {
+ title: this.data.shop.name || app.data.application_title,
+ query: 'shop_id='+shop_id+'&referrer=' + user_id+'&category_id='+category_id+'&keywords='+keywords
+ };
+ },
+});
diff --git a/sourcecode/weixin/default/pages/plugins/shop/search/search.json b/sourcecode/weixin/default/pages/plugins/shop/search/search.json
new file mode 100755
index 000000000..32e4acc96
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/search/search.json
@@ -0,0 +1,8 @@
+{
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": "店铺商品搜索",
+ "usingComponents": {
+ "component-quick-nav": "/components/quick-nav/quick-nav",
+ "component-popup": "/components/popup/popup"
+ }
+}
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/search/search.wxml b/sourcecode/weixin/default/pages/plugins/shop/search/search.wxml
new file mode 100755
index 000000000..c9509cc36
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/search/search.wxml
@@ -0,0 +1,72 @@
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+ {{currency_symbol}}{{item.min_price}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sourcecode/weixin/default/pages/plugins/shop/search/search.wxss b/sourcecode/weixin/default/pages/plugins/shop/search/search.wxss
new file mode 100755
index 000000000..13b24464c
--- /dev/null
+++ b/sourcecode/weixin/default/pages/plugins/shop/search/search.wxss
@@ -0,0 +1,162 @@
+/**
+ * 排序导航
+ */
+ .nav-sort {
+ background: #eee;
+ }
+.nav-sort-content .item {
+ height: 80rpx;
+ line-height: 80rpx;
+ width: 130rpx;
+}
+.nav-sort-content .item .icon {
+ width: 30rpx;
+ height: 30rpx;
+}
+.nav-sort-content .item text, .nav-sort-content .item image {
+ vertical-align:middle;
+}
+.screening-submit {
+ width: 50rpx;
+ height: 50rpx;
+ position: absolute;
+ top: 15rpx;
+ right: 20rpx;
+}
+
+/**
+ * 商品列表
+ */
+ .scroll-box {
+ height: calc(100vh - 80rpx);
+ }
+.data-list {
+ overflow: hidden;
+}
+.data-list .items {
+ width: calc(50% - 5rpx);
+ margin-bottom: 10rpx;
+ padding-bottom: 20rpx;
+}
+.data-list .items:nth-child(2n) {
+ float: right;
+}
+.data-list .items:nth-child(2n+1) {
+ float: left;
+}
+.data-list .items image {
+ width: 100%;
+ height: 200px !important;
+}
+.data-list .items .base {
+ text-align: left;
+ font-size: 32rpx;
+ padding: 0 15rpx;
+}
+.data-list .items .base,
+.data-list .items .base .price {
+ margin-top: 15rpx;
+}
+
+/**
+ * 条件
+ */
+.search-map {
+ height: calc(100vh - 80rpx);
+ width: 680rpx;
+ overflow-y: scroll;
+ overflow-x: hidden;
+}
+.map-keywords {
+ border-radius: 0 !important;
+ padding: 0 10rpx;
+ line-height: 66rpx;
+ height: 66rpx;
+ font-size: 26rpx;
+ box-sizing: border-box;
+}
+.map-nav {
+ position: relative;
+}
+.map-nav .arrow-bottom {
+ position: absolute;
+ top: 0;
+ right: 10rpx;
+ padding-right: 46rpx;
+ color: #999;
+}
+.map-item {
+ background: #f0f0f0;
+ line-height: 76rpx;
+}
+.map-base,
+.map-nav {
+ padding: 0 10rpx;
+}
+.map-content {
+ padding: 15rpx;
+ line-height: 60rpx;
+}
+.map-text-items view,
+.map-images-text-items view {
+ padding: 0 15rpx;
+ border-radius: 2px;
+ margin: 15rpx;
+ border: 1px solid transparent;
+}
+.map-images-text-items view {
+ vertical-align: middle;
+ border: 1px solid #eee;
+ width: 150rpx;
+ height: 72rpx;
+ line-height: 72rpx;
+}
+.map-images-text-items view image {
+ width: 150rpx;
+ height: calc(100% - 8rpx);
+ display: block;
+ margin: 0 auto;
+ margin-top: 4rpx;
+}
+.map-text-items view.active,
+.map-images-text-items view.active {
+ border: 1px solid #e23f36;
+ color: #e23f36;
+ font-weight: bold;
+}
+.search-map .search-submit {
+ height: 80rpx;
+ line-height: 80rpx;
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ border-radius: 0;
+}
+.map-remove-submit {
+ color: #e23f36;
+}
+
+/**
+ * 品牌基础信息
+ */
+.brand-info {
+ padding: 35rpx 15rpx;
+}
+.brand-info image,
+.brand-info .info-logo-empty {
+ width: 300rpx;
+ height: 130rpx;
+ border: 1px solid #eee;
+}
+.brand-info .info-logo-empty {
+ line-height: 130rpx;
+}
+.brand-info .info-right {
+ width: calc(100% - 330rpx);
+}
+.brand-info .info-desc {
+ color: #999;
+ font-size: 28rpx;
+ line-height: 40rpx;
+ min-height: 80rpx;
+}
\ No newline at end of file