diff --git a/App.vue b/App.vue
index 9cc0fd28..2d7456e7 100644
--- a/App.vue
+++ b/App.vue
@@ -7,10 +7,10 @@
data: {
// 基础配置
// 数据接口请求地址
- request_url:'https://new.shopxo.vip/',
+ request_url:'http://shopxo.com/',
// 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/)
- static_url:'https://new.shopxo.vip/',
+ static_url:'http://shopxo.com/',
// 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立)
system_type: 'default',
@@ -3223,6 +3223,9 @@
if(client_value == 'alipay') {
// 自定义头页面
var pages_always = [
+ 'pages/user-order/user-order',
+ 'pages/plugins/groupbuy/order/order',
+ 'pages/user-orderaftersale/user-orderaftersale',
'pages/plugins/shop/index/index',
'pages/plugins/shop/detail/detail',
'pages/plugins/realstore/detail/detail',
diff --git a/components/goods-buy/goods-buy.vue b/components/goods-buy/goods-buy.vue
index 191017b5..07c0e72a 100644
--- a/components/goods-buy/goods-buy.vue
+++ b/components/goods-buy/goods-buy.vue
@@ -79,6 +79,8 @@
return {
theme_view: app.globalData.get_theme_value_view(),
params: {},
+ // init 传入的 data_params,合并到下单页 data
+ buy_data_params: {},
back_data: {},
popup_status: false,
goods_spec_base_price: 0,
@@ -100,6 +102,8 @@
goods_cover_class: '',
is_exist_many_spec: false,
spec_confirm_btn_disabled_status: true,
+ // 弹窗打开时的默认价格库存(未选完规格时恢复展示)
+ default_spec_display: null,
// 选中规格临时定时变量
spec_selected_timer: null,
spec_selected_timerout: null,
@@ -127,17 +131,68 @@
type: Number,
default: 100,
},
+ // 插件名称(拼团等规格接口走插件)
+ propPluginsName: {
+ type: String,
+ default: '',
+ },
},
created: function () {},
methods: {
+ // 合并下单页扩展参数(init 传入 data_params)
+ buy_data_extend_merge(data) {
+ var extend = this.buy_data_params || {};
+ var reserve_keys = { buy_type: 1, goods_data: 1 };
+ for (var key in extend) {
+ if (reserve_keys[key] == 1) {
+ continue;
+ }
+ if (extend[key] !== undefined && extend[key] !== null) {
+ data[key] = extend[key];
+ }
+ }
+ return data;
+ },
+
+ // 规格/库存接口请求参数(拼团插件 id 为拼团活动 id)
+ get_spec_request_data(extend) {
+ extend = extend || {};
+ var plugins = this.params.plugins_name || this.propPluginsName || '';
+ var data = {};
+ if (plugins == 'groupbuy') {
+ data.id = parseInt(this.params.id || 0);
+ } else {
+ data.id = this.goods.id;
+ }
+ for (var key in extend) {
+ if (extend[key] !== undefined && extend[key] !== null) {
+ data[key] = extend[key];
+ }
+ }
+ return data;
+ },
+
+ // 规格接口地址
+ get_goods_spec_request_url(action) {
+ var plugins = this.params.plugins_name || this.propPluginsName || '';
+ if(plugins != '')
+ {
+ return app.globalData.get_request_url(action, 'goods', plugins);
+ }
+ return app.globalData.get_request_url(action, 'goods');
+ },
+
// 初始化
init(goods = {}, params = {}, back_data = null) {
if (!app.globalData.is_single_page_check()) {
return false;
}
params = params || {};
+ var buy_data_params = params.data_params || {};
+ var init_params = Object.assign({}, params);
+ delete init_params.data_params;
// 状态默认开启弹窗
var status = true;
@@ -147,12 +202,12 @@
var is_exist_many_spec = parseInt(goods.is_exist_many_spec || 0) == 1 && goods_spec_choose.length > 0;
// 无规格是否直接操作
var is_direct_cart = 0;
- if ((params.is_direct_cart || 0) == 1 && !is_exist_many_spec) {
+ if ((init_params.is_direct_cart || 0) == 1 && !is_exist_many_spec) {
status = false;
is_direct_cart = 1;
}
// 是否成功提示、默认提示
- var is_success_tips = params.is_success_tips == undefined ? 1 : params.is_success_tips || 0;
+ var is_success_tips = init_params.is_success_tips == undefined ? 1 : init_params.is_success_tips || 0;
// 直接加购、并且用户已经存在购物车则依次+1
if (is_direct_cart == 1 && parseInt(goods.user_cart_count || 0) > 0) {
var buy_number = 1;
@@ -162,7 +217,7 @@
// 购买按钮处理,仅展示购买和购物车
var opt_button = [];
- var buy_button = params.buy_button || null;
+ var buy_button = init_params.buy_button || null;
if (buy_button != null && (buy_button.data || null) != null && buy_button.data.length > 0) {
var arr = ['buy', 'cart', 'show'];
for (var i in buy_button.data) {
@@ -175,12 +230,24 @@
// 商品封面尺寸类型
var goods_cover_size_type = app.globalData.get_config('config.common_goods_cover_size_type', 0);
+ // 默认价格库存快照(未选完多层规格时恢复)
+ var default_spec_display = {
+ price: goods.price,
+ original_price: goods.original_price || 0,
+ inventory: goods.inventory,
+ inventory_unit: goods.inventory_unit,
+ show_price_unit: goods.show_price_unit,
+ show_original_price_unit: goods.show_original_price_unit,
+ };
+
// 设置数据
this.setData({
popup_status: status,
- params: params || {},
+ params: init_params || {},
+ buy_data_params: buy_data_params,
back_data: back_data,
goods: goods || {},
+ default_spec_display: default_spec_display,
goods_spec_choose: goods_spec_choose,
goods_spec_base_price: goods.price,
goods_spec_base_original_price: goods.original_price || 0,
@@ -189,7 +256,7 @@
goods_show_price_unit: goods.show_price_unit,
goods_show_original_price_unit: goods.show_original_price_unit,
buy_number: buy_number,
- buy_event_type: params.buy_event_type || 'cart',
+ buy_event_type: init_params.buy_event_type || 'cart',
opt_button: opt_button,
is_direct_cart: is_direct_cart,
is_success_tips: is_success_tips,
@@ -205,7 +272,7 @@
}
// 初始化不能选择规格处理
- var is_init = (params.is_init === undefined || parseInt(params.is_init) == 1);
+ var is_init = (init_params.is_init === undefined || parseInt(init_params.is_init) == 1);
this.spec_handle_dont(is_init ? 0 : null);
// 获取规格详情
@@ -248,126 +315,117 @@
}
},
+ // 清除自动选规格定时器
+ clear_spec_selected_timer() {
+ clearInterval(this.spec_selected_timer);
+ clearTimeout(this.spec_selected_timerout);
+ this.setData({
+ spec_selected_timer: null,
+ spec_selected_timerout: null,
+ });
+ },
+
+ // 未选完规格时恢复默认价格库存
+ restore_default_spec_display() {
+ var display = this.default_spec_display || null;
+ var goods = this.goods || {};
+ if (display == null) {
+ display = {
+ price: goods.price,
+ original_price: goods.original_price || 0,
+ inventory: goods.inventory,
+ inventory_unit: goods.inventory_unit,
+ show_price_unit: goods.show_price_unit,
+ show_original_price_unit: goods.show_original_price_unit,
+ };
+ }
+ var buy_number = parseInt(this.buy_number);
+ var buy_min_number = parseInt(goods.buy_min_number || 1);
+ var buy_max_number = parseInt(goods.buy_max_number || 0);
+ if (buy_number < buy_min_number) {
+ buy_number = buy_min_number;
+ }
+ if (buy_max_number > 0 && buy_number > buy_max_number) {
+ buy_number = buy_max_number;
+ }
+ this.setData({
+ goods_spec_base_price: display.price,
+ goods_spec_base_original_price: display.original_price,
+ goods_spec_base_inventory: display.inventory,
+ goods_spec_base_inventory_unit: display.inventory_unit,
+ goods_show_price_unit: display.show_price_unit,
+ goods_show_original_price_unit: display.show_original_price_unit,
+ goods_spec_base_buy_min_number: 0,
+ goods_spec_base_buy_max_number: 0,
+ buy_number: buy_number,
+ spec_confirm_btn_disabled_status: this.is_exist_many_spec,
+ });
+ this.$emit('BackReleaseEvent');
+ },
+
+ // 自动选中下一层规格(无法继续时停止并恢复默认展示)
+ auto_select_spec_interval_handle(spec_choose, sku_count, match_name_callback) {
+ var self = this;
+ self.clear_spec_selected_timer();
+ var num = 0;
+ var timer = setInterval(function () {
+ for (var i in spec_choose) {
+ var active =
+ spec_choose[i]['value']
+ .map(function (v) {
+ return v.is_active;
+ })
+ .join('') || null;
+ if (active == null) {
+ self.spec_handle_dont(i);
+ var status = false;
+ for (var k in spec_choose[i]['value']) {
+ if (!status && (spec_choose[i]['value'][k]['is_disabled'] || null) == null && (spec_choose[i]['value'][k]['is_dont'] || null) == null && match_name_callback(spec_choose, i, k)) {
+ self.goods_spec_choice_handle(i, k);
+ status = true;
+ num++;
+ }
+ }
+ if (!status) {
+ self.clear_spec_selected_timer();
+ self.restore_default_spec_display();
+ return;
+ }
+ break;
+ }
+ }
+ if (num >= sku_count) {
+ self.clear_spec_selected_timer();
+ }
+ }, 100);
+ var timerout = setTimeout(function () {
+ self.clear_spec_selected_timer();
+ self.restore_default_spec_display();
+ }, 20000);
+ self.setData({
+ spec_selected_timer: timer,
+ spec_selected_timerout: timerout,
+ });
+ },
+
// 指定规格初始化
appoint_selected_spec_handle(spec_choose, spec) {
spec = decodeURIComponent(spec).split('|');
if (spec.length == spec_choose.length) {
- // 选择处理
- var self = this;
- // 销毁之前的任务
- clearInterval(self.spec_selected_timer);
- clearInterval(self.spec_selected_timerout);
- // 必须存在购买和加入购物车任意一个、规格必须多个
var sku_count = app.globalData.get_length(spec_choose);
- // 先清除价格展示信息
- self.setData({
- goods_spec_base_price: '...',
- goods_spec_base_original_price: '...',
- });
- var num = 0;
- var timer = setInterval(function () {
- for (var i in spec_choose) {
- // 清除价格展示信息、避免获取价格类型赋值
- self.setData({
- goods_spec_base_price: '...',
- goods_spec_base_original_price: '...',
- });
- // 必须不存在已选择项
- var active =
- spec_choose[i]['value']
- .map(function (v) {
- return v.is_active;
- })
- .join('') || null;
- if (active == null) {
- // 不能选择规格处理
- self.spec_handle_dont(i);
-
- // 规格选择处理
- var temp_spec = spec[i];
- var status = false;
- for (var k in spec_choose[i]['value']) {
- // 必须是可选和未选
- if (!status && (spec_choose[i]['value'][k]['is_disabled'] || null) == null && (spec_choose[i]['value'][k]['is_dont'] || null) == null && temp_spec == spec_choose[i]['value'][k]['name']) {
- self.goods_spec_choice_handle(i, k);
- status = true;
- num++;
- }
- }
- }
- }
- if (num >= sku_count) {
- clearInterval(self.spec_selected_timer);
- }
- }, 100);
- var timerout = setTimeout(function () {
- clearInterval(self.spec_selected_timerout);
- }, 20000);
- self.setData({
- spec_selected_timer: timer,
- spec_selected_timerout: timerout,
+ this.auto_select_spec_interval_handle(spec_choose, sku_count, function (spec_choose, i, k) {
+ return spec[i] == spec_choose[i]['value'][k]['name'];
});
}
},
// 默认选中第一个规格 - 智能工具箱插件
plugins_intellectstools_selected_spec_handle(spec_choose) {
- // 选择处理
- var self = this;
- // 销毁之前的任务
- clearInterval(self.spec_selected_timer);
- clearInterval(self.spec_selected_timerout);
- // 读取智能工具插件配置、是否开启
- var config = self.plugins_intellectstools_config || null;
+ var config = this.plugins_intellectstools_config || null;
if (config != null && (config.is_goods_detail_selected_first_spec || 0) == 1) {
- // 必须存在购买和加入购物车任意一个、规格必须多个
var sku_count = app.globalData.get_length(spec_choose);
- // 先清除价格展示信息
- self.setData({
- goods_spec_base_price: '...',
- goods_spec_base_original_price: '...',
- });
- var num = 0;
- var timer = setInterval(function () {
- for (var i in spec_choose) {
- // 清除价格展示信息、避免获取价格类型赋值
- self.setData({
- goods_spec_base_price: '...',
- goods_spec_base_original_price: '...',
- });
- // 必须不存在已选择项
- var active =
- spec_choose[i]['value']
- .map(function (v) {
- return v.is_active;
- })
- .join('') || null;
- if (active == null) {
- // 不能选择规格处理
- self.spec_handle_dont(i);
-
- // 规格选择处理
- var status = false;
- for (var k in spec_choose[i]['value']) {
- // 必须是可选和未选
- if (!status && (spec_choose[i]['value'][k]['is_disabled'] || null) == null && (spec_choose[i]['value'][k]['is_dont'] || null) == null) {
- self.goods_spec_choice_handle(i, k);
- status = true;
- num++;
- }
- }
- }
- }
- if (num >= sku_count) {
- clearInterval(self.spec_selected_timer);
- }
- }, 100);
- var timerout = setTimeout(function () {
- clearInterval(self.spec_selected_timerout);
- }, 20000);
- self.setData({
- spec_selected_timer: timer,
- spec_selected_timerout: timerout,
+ this.auto_select_spec_interval_handle(spec_choose, sku_count, function () {
+ return true;
});
}
},
@@ -448,11 +506,11 @@
}
// 获取数据
- var data = this.params;
- data['id'] = this.goods.id;
- data['spec'] = JSON.stringify(spec);
+ var data = this.get_spec_request_data({
+ spec: JSON.stringify(spec),
+ });
uni.request({
- url: app.globalData.get_request_url('spectype', 'goods'),
+ url: this.get_goods_spec_request_url('spectype'),
method: 'POST',
data: data,
dataType: 'json',
@@ -485,6 +543,11 @@
this.setData({
goods_spec_choose: temp_spec,
});
+ // 下一层无可选规格时,保持弹窗顶部默认价格库存
+ var selected_spec = this.goods_selected_spec();
+ if (selected_spec.length > 0 && selected_spec.length < sku_count && spec_type.length <= 0) {
+ this.restore_default_spec_display();
+ }
}
} else {
app.globalData.showToast(res.data.msg);
@@ -523,39 +586,17 @@
var sku_count = this.goods_spec_choose.length;
var active_count = spec.length;
if (spec.length <= 0 || active_count < sku_count) {
- var buy_number = parseInt(this.buy_number);
- var buy_min_number = parseInt(this.goods.buy_min_number || 1);
- var buy_max_number = parseInt(this.goods.buy_max_number || 0);
- if (buy_number < buy_min_number) {
- buy_number = buy_min_number;
- }
- if (buy_max_number > 0 && buy_number > buy_max_number) {
- buy_number = buy_max_number;
- }
- this.setData({
- goods_spec_base_price: this.goods.price,
- goods_spec_base_original_price: this.goods.original_price || 0,
- goods_spec_base_inventory: this.goods.inventory,
- goods_spec_base_inventory_unit: this.goods.inventory_unit,
- goods_show_price_unit: this.goods.show_price_unit,
- goods_show_original_price_unit: this.goods.show_original_price_unit,
- goods_spec_base_buy_min_number: 0,
- goods_spec_base_buy_max_number: 0,
- buy_number: buy_number,
- spec_confirm_btn_disabled_status: this.is_exist_many_spec,
- });
- // 释放-调用父级
- this.$emit("BackReleaseEvent");
+ this.restore_default_spec_display();
return false;
}
// 获取数据
- var data = this.params;
- data['id'] = this.goods.id;
- data['spec'] = JSON.stringify(spec);
- data['stock'] = this.buy_number;
+ var data = this.get_spec_request_data({
+ spec: JSON.stringify(spec),
+ stock: this.buy_number,
+ });
uni.request({
- url: app.globalData.get_request_url('specdetail', 'goods'),
+ url: this.get_goods_spec_request_url('specdetail'),
method: 'POST',
data: data,
dataType: 'json',
@@ -564,10 +605,12 @@
this.goods_spec_detail_back_handle(res.data.data);
} else {
app.globalData.showToast(res.data.msg);
+ this.restore_default_spec_display();
}
},
fail: () => {
app.globalData.showToast(this.$t('common.internet_error_tips'));
+ this.restore_default_spec_display();
},
});
},
@@ -727,12 +770,12 @@
}
// 获取数据
- var data = this.params;
- data['id'] = this.goods.id;
- data['spec'] = spec;
- data['stock'] = this.buy_number;
+ var data = this.get_spec_request_data({
+ spec: spec,
+ stock: this.buy_number,
+ });
uni.request({
- url: app.globalData.get_request_url('stock', 'goods'),
+ url: this.get_goods_spec_request_url('stock'),
method: 'POST',
data: data,
dataType: 'json',
@@ -803,29 +846,30 @@
// 购买
case 'buy':
// 进入订单确认页面
+ var goods_item = {
+ goods_id: this.goods.id,
+ stock: this.buy_number,
+ spec: spec,
+ };
var data = {
buy_type: 'goods',
goods_data: encodeURIComponent(
base64.encode(
JSON.stringify([
- {
- goods_id: this.goods.id,
- stock: this.buy_number,
- spec: spec,
- },
+ goods_item,
])
)
)
};
- // 转换数据
- var data_params = encodeURIComponent(base64.encode(JSON.stringify(data)));
+ this.buy_data_extend_merge(data);
+ var buy_query_data = encodeURIComponent(base64.encode(JSON.stringify(data)));
// 购买链接、默认系统购买页面
if(buylink == null) {
buylink = '/pages/buy/buy';
}
// 进去订单确认页面
- app.globalData.url_open(buylink+'?data=' + data_params);
+ app.globalData.url_open(buylink+'?data=' + buy_query_data);
// 关闭弹窗
this.popup_close_event();
diff --git a/locale/en.json b/locale/en.json
index afb5d2db..55fe682f 100644
--- a/locale/en.json
+++ b/locale/en.json
@@ -367,7 +367,11 @@
"plugins-orderfeed-form": "Feed Data",
"plugins-presale-index": "Presale",
"plugins-presale-buy": "Order Confirmation",
- "plugins-presale-order": "Presale order"
+ "plugins-presale-order": "Presale order",
+ "plugins-groupbuy-index": "Group buy",
+ "plugins-groupbuy-detail": "Group buy details",
+ "plugins-groupbuy-team": "Join group",
+ "plugins-groupbuy-order": "My group buy"
},
"login": {
"login": {
@@ -2053,5 +2057,10 @@
"fsdf33": "Please choose a specific type",
"98yyuf": "Please enter your wonderful comment"
}
+ },
+ "plugins-groupbuy-order": {
+ "order": {
+ "gbo001": "Enter group buy order no."
+ }
}
}
\ No newline at end of file
diff --git a/locale/zh.json b/locale/zh.json
index e867188b..4bfd46c9 100644
--- a/locale/zh.json
+++ b/locale/zh.json
@@ -365,7 +365,11 @@
"plugins-orderfeed-form": "反馈数据",
"plugins-presale-index": "预售",
"plugins-presale-buy": "订单确认",
- "plugins-presale-order": "预售订单"
+ "plugins-presale-order": "预售订单",
+ "plugins-groupbuy-index": "拼团",
+ "plugins-groupbuy-detail": "拼团详情",
+ "plugins-groupbuy-team": "参团",
+ "plugins-groupbuy-order": "我的拼团"
},
"login": {
"login": {
@@ -2036,5 +2040,10 @@
"fsdf33": "请选择具体的类型",
"98yyuf": "请输入您的精彩评论"
}
+ },
+ "plugins-groupbuy-order": {
+ "order": {
+ "gbo001": "请输入拼团单号"
+ }
}
}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 4becf211..38cb24e3 100644
--- a/pages.json
+++ b/pages.json
@@ -2239,6 +2239,46 @@
}
]
},
+ {
+ "root": "pages/plugins/groupbuy",
+ "pages": [
+ {
+ "path": "index/index",
+ "style": {
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": ""
+ }
+ },
+ {
+ "path": "detail/detail",
+ "style": {
+ "enablePullDownRefresh": false,
+ "navigationBarTitleText": ""
+ }
+ },
+ {
+ "path": "team/team",
+ "style": {
+ "enablePullDownRefresh": false,
+ "navigationBarTitleText": ""
+ }
+ },
+ {
+ "path": "order/order",
+ "style": {
+ // #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-KUAISHOU || APP
+ "navigationStyle": "custom",
+ // #endif
+ // #ifdef MP-ALIPAY
+ "transparentTitle": "auto",
+ "titlePenetrate": "YES",
+ // #endif
+ "enablePullDownRefresh": true,
+ "navigationBarTitleText": ""
+ }
+ }
+ ]
+ },
{
"root": "pages/plugins/presale",
"pages": [
diff --git a/pages/plugins/groupbuy/components/groupbuy-play-rules/groupbuy-play-rules.vue b/pages/plugins/groupbuy/components/groupbuy-play-rules/groupbuy-play-rules.vue
new file mode 100644
index 00000000..fe8167bf
--- /dev/null
+++ b/pages/plugins/groupbuy/components/groupbuy-play-rules/groupbuy-play-rules.vue
@@ -0,0 +1,207 @@
+
+
+ 拼团玩法
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 拼团规则
+
+ {{ rule }}
+
+
+
+
+
+
diff --git a/pages/plugins/groupbuy/detail/detail.css b/pages/plugins/groupbuy/detail/detail.css
new file mode 100644
index 00000000..eb6c14cf
--- /dev/null
+++ b/pages/plugins/groupbuy/detail/detail.css
@@ -0,0 +1,133 @@
+.goods-photo-swiper-wrap,
+.goods-photo-swiper-dot,
+.goods-photo-swiper {
+ height: 750rpx;
+}
+.goods-photo-swiper-wrap {
+ position: relative;
+}
+.goods-photo-image {
+ width: 100%;
+ height: 750rpx;
+}
+
+/* 相册下方拼团价/成团信息全宽;仅约 20px 压到相册上 */
+.groupbuy-detail-hero {
+ position: relative;
+}
+.groupbuy-detail-head-float {
+ position: relative;
+ z-index: 2;
+ width: 100%;
+ margin-top: -40rpx;
+}
+.groupbuy-detail-hero-no-photo .groupbuy-detail-head-float {
+ margin-top: 0;
+}
+.groupbuy-detail-price-header {
+ background-size: 100% 100%;
+ background-repeat: no-repeat;
+ background-position: center;
+ overflow: hidden;
+ padding: 32rpx 24rpx 56rpx;
+ box-sizing: border-box;
+ border-radius: 32rpx 32rpx 0 0;
+}
+.groupbuy-detail-info-card {
+ position: relative;
+ z-index: 3;
+ width: 100%;
+ box-sizing: border-box;
+ margin-top: -48rpx;
+ padding: 24rpx;
+ border-radius: 32rpx 32rpx 0 0;
+}
+.groupbuy-detail-price-value {
+ display: flex;
+ flex-direction: row;
+ align-items: baseline;
+ flex-wrap: wrap;
+ line-height: 1.2;
+}
+.groupbuy-detail-original-price {
+ margin-left: 12rpx;
+ text-decoration: line-through;
+ opacity: 0.85;
+}
+.groupbuy-detail-team-tag {
+ flex-shrink: 0;
+ line-height: 1.4;
+ white-space: nowrap;
+ border-radius: 32rpx 0 32rpx 0;
+}
+.groupbuy-detail-status-bar {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+}
+.groupbuy-detail-status-item {
+ flex: 1;
+ width: 0;
+ box-sizing: border-box;
+ position: relative;
+ white-space: nowrap;
+}
+.groupbuy-detail-status-item:not(:last-child)::after {
+ content: '';
+ position: absolute;
+ right: 0;
+ top: 20%;
+ height: 60%;
+ width: 1rpx;
+ background: rgba(0, 0, 0, 0.08);
+}
+
+.groupbuy-detail-spec-row {
+ padding: 20rpx 24rpx;
+}
+.groupbuy-detail-spec-label {
+ flex-shrink: 0;
+}
+.groupbuy-detail-spec-value {
+ flex: 1;
+ min-width: 0;
+ justify-content: flex-end;
+ margin-left: 24rpx;
+}
+.groupbuy-detail-spec-text {
+ max-width: 480rpx;
+ text-align: right;
+}
+.groupbuy-detail-spec-arrow {
+ flex-shrink: 0;
+ margin-left: 8rpx;
+}
+
+.goods-detail .groupbuy-detail-goods-title {
+ padding: 24rpx 24rpx 0;
+}
+.bottom-nav {
+ position: fixed;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 50;
+ box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
+}
+.groupbuy-detail-buy-nav-left {
+ flex-shrink: 0;
+ gap: 28rpx;
+ margin-right: 8rpx;
+}
+.groupbuy-detail-nav-item {
+ min-width: 72rpx;
+}
+.groupbuy-detail-nav-icon {
+ width: 40rpx;
+ height: 40rpx;
+ display: block;
+ margin: 0 auto;
+}
+.page-bottom-fixed {
+ padding-bottom: 120rpx;
+}
diff --git a/pages/plugins/groupbuy/detail/detail.vue b/pages/plugins/groupbuy/detail/detail.vue
new file mode 100644
index 00000000..207ce3e7
--- /dev/null
+++ b/pages/plugins/groupbuy/detail/detail.vue
@@ -0,0 +1,364 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ groupbuy.title || goods.title }}
+
+
+ 成团
+ {{ groupbuy.group_number }}人
+
+
+ 成团数
+ {{ groupbuy.team_success_count || 0 }}
+
+
+ 限购
+ {{ limit_buy_display_text }}
+
+
+
+
+
+
+
+
+ 规格
+
+ 请选择规格
+ {{ spec_selected_text }}
+
+
+
+
+
+
+
+
+ 商品详情
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ nav.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/plugins/groupbuy/index/index.css b/pages/plugins/groupbuy/index/index.css
new file mode 100644
index 00000000..64b5495d
--- /dev/null
+++ b/pages/plugins/groupbuy/index/index.css
@@ -0,0 +1,75 @@
+.groupbuy-index-page {
+ min-height: 100vh;
+ box-sizing: border-box;
+ padding-top: 16rpx;
+ padding-bottom: 24rpx;
+}
+
+/* 商品横排列表 */
+.groupbuy-goods-list {
+ margin-top: 0;
+}
+.groupbuy-goods-card {
+ position: relative;
+ padding: 24rpx;
+ box-sizing: border-box;
+}
+.groupbuy-goods-main {
+ display: flex;
+ flex-direction: row;
+ align-items: flex-start;
+}
+.groupbuy-goods-image-wrap {
+ flex-shrink: 0;
+ width: 200rpx;
+ height: 200rpx;
+ overflow: hidden;
+}
+.groupbuy-goods-image {
+ width: 200rpx;
+ height: 200rpx;
+ display: block;
+}
+.groupbuy-goods-body {
+ flex: 1;
+ min-width: 0;
+ margin-left: 24rpx;
+ box-sizing: border-box;
+}
+.groupbuy-goods-meta {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ flex-wrap: wrap;
+ margin-top: 12rpx;
+ gap: 12rpx;
+}
+.groupbuy-tag {
+ display: inline-block;
+ line-height: 32rpx;
+}
+.groupbuy-goods-price-row {
+ margin-top: 16rpx;
+}
+.groupbuy-goods-price {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+}
+.groupbuy-current-price {
+ display: flex;
+ flex-direction: row;
+ align-items: baseline;
+ flex-wrap: wrap;
+ line-height: 1.2;
+}
+.groupbuy-goods-btn {
+ position: absolute;
+ right: 24rpx;
+ bottom: 24rpx;
+ z-index: 2;
+ padding: 0 32rpx;
+ height: 56rpx;
+ line-height: 56rpx;
+ white-space: nowrap;
+}
diff --git a/pages/plugins/groupbuy/index/index.vue b/pages/plugins/groupbuy/index/index.vue
new file mode 100644
index 00000000..df6fda14
--- /dev/null
+++ b/pages/plugins/groupbuy/index/index.vue
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.groupbuy_title || item.title }}
+
+ {{ item.group_number }}人团
+ {{ item.groupbuy_success_text }}
+
+
+
+ {{ currency_symbol }}{{ item.original_price }}
+
+ {{ currency_symbol }}
+ {{ item.groupbuy_price_text || item.groupbuy_price }}
+
+
+
+
+
+ 去拼团
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/plugins/groupbuy/order/order.css b/pages/plugins/groupbuy/order/order.css
new file mode 100644
index 00000000..1c00b1e1
--- /dev/null
+++ b/pages/plugins/groupbuy/order/order.css
@@ -0,0 +1,19 @@
+.goods-cover {
+ width: 140rpx;
+ height: 140rpx;
+}
+
+.groupbuy-order-nav.nav-base {
+ height: auto;
+ line-height: normal;
+ padding-bottom: 10rpx;
+}
+
+.groupbuy-order-nav .item {
+ display: inline-block;
+ height: 80rpx;
+ line-height: 80rpx;
+ padding: 0 28rpx;
+ white-space: nowrap;
+}
+
diff --git a/pages/plugins/groupbuy/order/order.vue b/pages/plugins/groupbuy/order/order.vue
new file mode 100644
index 00000000..2af91c23
--- /dev/null
+++ b/pages/plugins/groupbuy/order/order.vue
@@ -0,0 +1,479 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.add_time }}
+ {{ item.status_name }}
+
+
+
+
+
+ {{ items.title }}
+
+ {{ currency_symbol }}{{ items.price }} x{{ items.buy_number }}
+
+ {{ items.spec_text }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/plugins/groupbuy/team/team.css b/pages/plugins/groupbuy/team/team.css
new file mode 100644
index 00000000..525dd785
--- /dev/null
+++ b/pages/plugins/groupbuy/team/team.css
@@ -0,0 +1,142 @@
+.team-goods-image {
+ width: 180rpx;
+ height: 180rpx;
+}
+.groupbuy-tag {
+ display: inline-block;
+}
+.team-members .member-item {
+ width: 120rpx;
+ margin: 0 16rpx 20rpx;
+ position: relative;
+}
+.member-avatar {
+ width: 96rpx;
+ height: 96rpx;
+}
+.member-empty {
+ width: 96rpx;
+ height: 96rpx;
+ line-height: 96rpx;
+ text-align: center;
+ margin: 0 auto;
+}
+.leader-badge {
+ position: absolute;
+ top: 70rpx;
+ left: 50%;
+ transform: translateX(-50%);
+ white-space: nowrap;
+}
+
+/* 拼团成功:喜庆背景(对齐 PC 参团页) */
+.team-status-panel-success {
+ position: relative;
+ overflow: hidden;
+ background: linear-gradient(180deg, #ffd4b8 0%, #ffe8d6 28%, #fff3eb 55%, #fffaf6 100%);
+}
+.team-status-panel-success::before,
+.team-status-panel-success::after {
+ content: '';
+ position: absolute;
+ border-radius: 50%;
+ pointer-events: none;
+}
+.team-status-panel-success::before {
+ width: 200rpx;
+ height: 200rpx;
+ top: -70rpx;
+ right: -50rpx;
+ background: radial-gradient(circle, rgba(255, 152, 64, 0.45) 0%, rgba(255, 183, 77, 0) 70%);
+}
+.team-status-panel-success::after {
+ width: 160rpx;
+ height: 160rpx;
+ bottom: -50rpx;
+ left: -40rpx;
+ background: radial-gradient(circle, rgba(229, 77, 66, 0.18) 0%, rgba(229, 77, 66, 0) 70%);
+}
+.team-status-success {
+ position: relative;
+ z-index: 1;
+ width: 100%;
+}
+.team-success-visual {
+ margin-bottom: 16rpx;
+}
+.team-success-icon-wrap {
+ position: relative;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ width: 112rpx;
+ height: 112rpx;
+ border-radius: 50%;
+ background: linear-gradient(135deg, #ff7043 0%, #e54d42 55%, #d84315 100%);
+ box-shadow: 0 8rpx 24rpx rgba(229, 77, 66, 0.35);
+}
+.team-success-spark {
+ position: absolute;
+ border-radius: 50%;
+ background: #ffb74d;
+ opacity: 0.85;
+}
+.team-success-spark-1 {
+ width: 10rpx;
+ height: 10rpx;
+ top: 4rpx;
+ right: 8rpx;
+}
+.team-success-spark-2 {
+ width: 14rpx;
+ height: 14rpx;
+ bottom: 12rpx;
+ left: -4rpx;
+ background: #ffb74d;
+}
+.team-success-spark-3 {
+ width: 8rpx;
+ height: 8rpx;
+ top: 24rpx;
+ left: 16rpx;
+ background: #ff8a65;
+}
+.team-success-title {
+ margin-bottom: 8rpx;
+ font-size: 40rpx;
+ font-weight: 700;
+ line-height: 1.3;
+ letter-spacing: 2rpx;
+ color: #e54d42;
+}
+.team-success-desc {
+ margin-bottom: 16rpx;
+ line-height: 1.5;
+}
+.team-success-tags {
+ gap: 12rpx;
+}
+.team-success-tag {
+ display: inline-block;
+ padding: 4rpx 18rpx;
+ font-size: 24rpx;
+ line-height: 36rpx;
+ color: #e54d42;
+ background: rgba(255, 255, 255, 0.88);
+ border-radius: 100rpx;
+}
+
+/* 拼团失败 */
+.team-status-fail {
+ width: 100%;
+}
+.team-fail-icon-wrap {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ width: 88rpx;
+ height: 88rpx;
+ margin-bottom: 12rpx;
+ border-radius: 50%;
+ background: #f5f5f5;
+}
diff --git a/pages/plugins/groupbuy/team/team.vue b/pages/plugins/groupbuy/team/team.vue
new file mode 100644
index 00000000..28428dac
--- /dev/null
+++ b/pages/plugins/groupbuy/team/team.vue
@@ -0,0 +1,284 @@
+
+
+
+
+
+
+
+
+ {{ groupbuy.title || goods.title }}
+
+ {{ groupbuy.group_number }}人团
+
+
+ {{ currency_symbol }}{{ groupbuy.groupbuy_price_text || groupbuy.min_groupbuy_price }}
+
+
+
+
+
+
+
+ 拼团中,还差 {{ team.remain_number }} 人
+ 剩余 {{ countdown_text }} 结束
+
+
+
+
+
+
+
+
+
+
+
+ 拼团成功
+ 恭喜!本团已满员,拼团圆满成团啦~
+
+ 满员成团
+ {{ groupbuy.group_number }}人团
+
+
+
+
+
+
+
+
+ 拼团失败
+ 很遗憾,本次拼团未成团
+
+
+
+
+
+
+ 团长
+ {{ item.user_name_view }}
+
+
+ ?
+
+
+
+
+
+
+
+
+
+ 取消开团
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/user-order/user-order.vue b/pages/user-order/user-order.vue
index e3a7495f..46358571 100644
--- a/pages/user-order/user-order.vue
+++ b/pages/user-order/user-order.vue
@@ -70,7 +70,8 @@
(item.plugins_delivery_data || 0) +
(item.plugins_ordergoodsform_data || 0) +
(item.plugins_orderresources_data || 0) +
- (item.plugins_is_orderfeed_button || 0)
+ (item.plugins_is_orderfeed_button || 0) +
+ (item.plugins_is_groupbuy_team_button || 0)
> 0 ) ||
(item.status == 2 && item.order_model != 2) ||
((item.plugins_express_data || 0) == 1 && (item.express_data || null) != null) ||
@@ -91,6 +92,7 @@
+