Browse Source

修复bug

宇宙无敌M1处理器的MacBook Pro 4 years ago
parent
commit
d308f55fe2

+ 7 - 10
components/page-component/goods/u-attr.vue

xqd xqd xqd xqd xqd xqd
@@ -62,7 +62,8 @@
 							</view>
 							<view class="service_value">
 								<view class="service_block" v-for="(item,index) of service_screen.screenList"
-									:class="{service_block_active:index == serviceId}" @click="select_service(index)">
+									:key="index" :class="{service_block_active:index == serviceId}"
+									@click="select_service(index)">
 									{{item.name}} ¥{{item.price}}
 								</view>
 							</view>
@@ -354,15 +355,11 @@
 				}
 			},
 			firstSelect: function() {
-				console.log("ddddd")
-				console.log(this.copyAttr)
-				console.log(this.copyGroup)
 				if (!this.copyGroup || !this.copyAttr) return;
 				let copyGroup = this.copyGroup;
 				let copyAttr = this.copyAttr;
 				let groupLength = copyGroup.length;
 				let select = [];
-
 				copyAttr.forEach(i => {
 					let attr_list = i.attr_list || [];
 					attr_list.forEach(j => {
@@ -396,7 +393,7 @@
 				this.identifier(copyGroup, attrNum_0, select);
 				this.getservice(copyGroup, attrNum_0, select); //getservice
 				this.newGroup = copyGroup;
-				console.log(this.newGroup)
+				console.log(this.newGroup, ">>>>>>>>>>>+++++++++++")
 			},
 			numberBlur: function(e) {
 				let value = parseInt(e.detail.value);
@@ -439,7 +436,7 @@
 			},
 			rightSubmit: function() {
 
-
+				console.log(this.checked)
 				let _this = this
 				if (!this.checked) {
 					uni.showToast({
@@ -618,7 +615,8 @@
 				if (!this.goods) return;
 				return this.$utils.deepClone(this.goods.attr);
 			},
-			cartClass: function() {
+			cartClass: function() {
+				console.log(this.themeObject)
 				if (!this.$slots.left_slot) {
 					if (this.themeObject.theme === 'a' || this.themeObject.theme === 'b' || this.themeObject.theme ===
 						'f') {
@@ -636,8 +634,7 @@
 				handler(newVal) {
 					this.newValue = newVal;
 					if (newVal === false) return;
-					if (this.$validation.isEmpty(this.checked) || this.checked.first) this.$utils.throttle(this
-						.firstSelect, 800);
+					this.$utils.throttle(this.firstSelect, 800);
 				},
 				immediate: true
 			},

+ 890 - 871
plugins/bargain/goods/goods.vue

xqd
@@ -1,872 +1,891 @@
-<template>
-    <app-layout>
-        <view v-if="!bargain" class="u-goods-detail"></view>
-        <template v-if="bargain">
-            <app-goods-banner :pic-list="bargain.pic_url" :share="bargain.share"
-                              :goods_id="bargain.goods_id"
-                              sign="bargain"
-                              :video-url="bargain.video_url"></app-goods-banner>
-            <view v-if="begin_list || end_list" class="main-center cross-center time-bg">
-                <app-plugin-time-bar
-                    :theme="getTheme"
-                    :day="begin_list ? begin_list.d : end_list.d"
-                    :hour="begin_list ? begin_list.h : end_list.h"
-                    :minute="begin_list ? begin_list.m : end_list.m"
-                    :second="begin_list ? begin_list.s : end_list.s"
-                    :start_begin="begin_list ? '距活动开始' : '距活动结束'"
-                >
-                </app-plugin-time-bar>
-            </view>
-            <view class="goods" v-if="bargain">
-                <view class="t-omit-three name">{{bargain.name}}</view>
-                <view v-if="bargain.subtitle" class="goods-subtitle">
-                    <view class="t-omit-three">{{bargain.subtitle}}</view>
-                </view>
-                <view class="dir-left-nowrap cross-center">
-                    <view class="detail box-grow-1 dir-top-nowrap">
-                        <view class="box-grow-0 dir-left-nowrap cross-bottom end">
-                            <view>最低</view>
-                            <view :class="getTheme + '-m-text ' + getTheme">¥</view>
-                            <view class="price" :class="getTheme + '-m-text ' + getTheme">{{bargain.min_price}}</view>
-                            <view class="del" v-if="isUnderlinePirce == 1">原价{{bargain.price}}</view>
-                        </view>
-                        <view class="box-grow-0 num dir-left-nowrap">
-                            <view>库存:{{bargain.stock}}{{bargain.unit}}</view>
-                            <view>已有{{bargain.join_num}}人参与砍价</view>
-                        </view>
-                    </view>
-                    <view @click="shareClick" class="share box-grow-0 cross-center dir-top-nowrap">
-                        <icon class="icon"></icon>
-                        <view class="share">分享</view>
-                    </view>
-                    <view>
-                        <app-share-qr-code :url="poster + `&goods_id=` + goods_id"
-                                           v-model="shareShow"
-                                           :has-poster-nav="true"
-                                           :poster-config="poster_config + `&goods_id=` + goods_id"
-                                           :poster-generate="poster_generate + `&goods_id=` + goods_id"
-                        ></app-share-qr-code>
-                    </view>
-                </view>
-            </view>
-            <view class="attr-box">
-                <view class="attr dir-left-nowrap">
-                    <view class="box-grow-0 left cross-center dir-top-nowrap">
-                        <view>商品信息</view>
-                    </view>
-                    <view class="box-grow-1 right dir-left-wrap">
-                        <view class="attr-item" v-for="(item, index) in bargain.select_attr_group" :key="index">
-                            {{item.attr_group_name + ':' + item.attr_name}}
-                        </view>
-                    </view>
-                </view>
-            </view>
-            <bd-coupon @change="setCoupon" :theme="themeObject" :coupons="bargain.goods_coupon_center"></bd-coupon>
-            <bd-xbc
-                :guarantee-title="bargain.guarantee_title"
-                :guarantee-pic="bargain.guarantee_pic"
-                :param_content="bargain.param_content"
-                :param_name="bargain.param_name"
-                :services="bargain.service"
-            ></bd-xbc>
-            <bd-hc
-                :integral="bargain.goods_marketing_award.integral"
-                :coupon="bargain.goods_marketing_award.coupon"
-                :card="bargain.goods_marketing_award.card"
-                :balance="bargain.goods_marketing_award.balance"
-                :theme="themeObject"
-            ></bd-hc>
-            <bd-kb
-                :limit="bargain.goods_marketing.limit"
-                :express="bargain.express"
-                :shipping="bargain.goods_marketing.shipping"
-                :pickup="bargain.goods_marketing.pickup"
-            ></bd-kb>
-            <view class="activity goods-margin" v-if="bargain.bargain_info">
-                <view class="dir-left-nowrap cross-center">
-                    <image class="box-grow-0 user-img" :src="userInfo.avatar" load-lazy></image>
-                    <view class="dir-top-nowrap">
-                        <view class="dir-left-nowrap">
-                            <view>距本次砍价结束仅剩</view>
-                            <view class="yellow">
-                                <block v-if="finish_list">
-                                    {{finish_list.d}}天{{finish_list.h}}:{{finish_list.m}}:{{finish_list.s}}
-                                </block>
-                                <block v-else>0天0:0:0</block>
-                            </view>
-                        </view>
-
-                        <view v-if="bargain.bargain_info.now_price == bargain.bargain_info.min_price"
-                              class="yellow">已砍至最低价,赶快优惠购买吧!
-                        </view>
-                        <view class="yellow" v-else>快让你的好友助你一臂之力!</view>
-                    </view>
-                </view>
-                <view class="main-center">
-                    <view class="current">当前价¥{{bargain.bargain_info.now_price}}</view>
-                </view>
-                <view class='progress-box'>
-                    <view class='progress-view' :style="{width:bargain.bargain_info.bargain_price_per+'%'}"></view>
-                </view>
-                <view class='dir-left-nowrap price'>
-                    <view class='box-grow-1'>原价¥{{bargain.bargain_info.price}}</view>
-                    <view class='box-grow-0'>底价¥{{bargain.bargain_info.min_price}}</view>
-                </view>
-                <view class='info'>
-                    <scroll-view class="user-scroll" scroll-y :scroll-into-view="'user-'+user_index"
-                                 scroll-with-animation="true">
-                        <block v-for="(v,k) in bargain.bargain_info.list" :key="k">
-                            <view class="item dir-left-nowrap cross-center">
-                                <image class='box-grow-0' :src="v.avatar" load-lazy></image>
-                                <view class="box-grow-1 dir-left-nowrap cross-center">
-                                    <view class="nickname">{{v.nickname}}</view>
-                                    <view> 小刀一挥帮忙砍了</view>
-                                    <view class="red">{{v.price}}</view>
-                                    <view>元</view>
-                                </view>
-                            </view>
-                        </block>
-                    </scroll-view>
-                </view>
-            </view>
-            <view class="circuit-label goods-margin dir-left-nowrap cross-center">
-                <icon class="icon-circuit"></icon>
-                <view>砍价流程</view>
-            </view>
-            <view class="circuit-value dir-left-nowrap main-center">
-                <block v-for="(v,k) in circuit" :key="k">
-                    <view class="cross-center dir-top-nowrap">
-                        <image :src="v.url" :class="v.name ? 'icon-circuit-i' : 'icon-circuit-j'"></image>
-                        <view class="box-grow-0 name">{{v.name}}</view>
-                    </view>
-                </block>
-            </view>
-            <view class="circuit-label goods-margin dir-left-nowrap cross-center">
-                <icon class="icon-circuit"></icon>
-                <view>活动说明</view>
-            </view>
-            <view class="activity-time">
-                <view>本活动开始时间{{bargain.begin_time}}</view>
-                <view>本活动结束时间{{bargain.end_time}}</view>
-            </view>
-            <view class="circuit-label goods-margin dir-left-nowrap cross-center">
-                <icon class="icon-circuit"></icon>
-                <view>商品详情</view>
-            </view>
-            <view class="bd-detail">
-                <app-rich-text :content="bargain.detail"></app-rich-text>
-            </view>
-            <!-- 底部空格 -->
-            <view class="safe-area-inset-bottom">
-                <view class="u-bottom-height"></view>
-            </view>
-            <!-- 底部按钮 -->
-            <view v-if="is_open" class="safe-area-inset-bottom u-bottom-fixed">
-                <view class="bargain-goods-bottom main-center cross-center">
-                    <block v-if="bargain.bargain_info">
-                        <block v-if="bargain.bargain_info.min_price < bargain.bargain_info.now_price">
-                            <view @click="submit" class="btn shop" :class="getTheme === 'a' ? 'default-btn text' : getTheme === 'b' || getTheme === 'f' ?  getTheme + '-s-back text ' + getTheme : getTheme + '-s-back ' + getTheme + '-m-text ' + getTheme">立即购买</view>
-                            <view @click="bargainFriend" class="btn friend" :class="getTheme === 'a' ? 'default-friend' : getTheme + '-m-back '+ getTheme + '-s-text ' + getTheme">找人帮砍</view>
-                        </block>
-                        <view v-else @click="submit" class="btn" style="color: #ffffff;" :class="getTheme === 'a' ? 'default-btn' : getTheme + '-m-back ' + getTheme">立即购买</view>
-                    </block>
-                    <block v-else>
-                        <view v-if="bargain.stock == 0" class="btn" style="background: #CDCDCD;color: #fff;">已售罄</view>
-                        <view v-else-if="compareTime === 'no-start'" class="btn" style="background: #CDCDCD;color: #fff;">未开始
-                        </view>
-                        <view v-else-if="compareTime === 'end'" class="btn" style="background: #CDCDCD;color: #fff;">已结束</view>
-                        <view v-else @click="subscribe" class="btn" style="color: #ffffff;"
-                              :class="getTheme === 'a' ? 'default-btn' : getTheme + '-m-back ' + getTheme">立即砍价
-                        </view>
-                    </block>
-                </view>
-            </view>
-        </template>
-        <app-close v-if="showClose" :modal="false" @update="getMall"></app-close>
-    </app-layout>
-</template>
-
-<script>
-
-import {mapGetters, mapState} from 'vuex';
-import appQuickNavigation from "../../../components/page-component/app-quick-navigation/app-quick-navigation";
-import appRichText from "../../../components/basic-component/app-rich/parse.vue";
-import appGoodsBanner from "../../../components/page-component/goods/app-goods-banner.vue";
-import appService from "../../../components/page-component/goods/app-goods-service.vue";
-import appShareQrCode from '../../../components/page-component/app-share-qr-code-poster/app-share-qr-code-poster.vue';
-import appGoodsMarketing from '../../../components/page-component/goods/app-goods-marketing.vue';
-import appPluginTimeBar from '../components/app-plugin-time-bar.vue';
-import appGoodsCoupon from "../../../components/page-component/goods/app-goods-coupon";
-import bdCoupon from '@/components/page-component/goods/bd-coupon.vue';
-import bdXbc from '@/components/page-component/goods/bd-xbc.vue';
-import bdKb from '@/components/page-component/goods/bd-kb.vue';
-import bdHc from '@/components/page-component/goods/bd-hc.vue';
-import bdComments from '@/components/page-component/goods/bd-comments.vue';
-import appClose from '@/components/basic-component/app-close/app-close.vue';
-
-export default {
-    name: "goods",
-    components: {
-        appQuickNavigation,
-        appRichText,
-        appGoodsBanner,
-        appService,
-        appShareQrCode,
-        appGoodsMarketing,
-        appPluginTimeBar,
-        appGoodsCoupon,
-        appClose,
-        bdCoupon,
-        bdXbc,
-        bdKb,
-        bdHc,
-        bdComments
-    },
-    computed: {
-        ...mapState({
-            appImg: state => state.mallConfig.plugin.bargain.app_image,
-            userInfo: state => state.user.info,
-            isUnderlinePrice: state => state.mallConfig.mall.setting.is_underline_price,
-        }),
-        ...mapState('gConfig', {
-            iphone: (data) => {
-                return data.iphone;
-            },
-            iphoneHeight: (state) => {
-                return state.iphoneHeight;
-            },
-        }),
-        ...mapGetters('mallConfig', {
-            getTheme: 'getTheme',
-        }),
-        ...mapState({
-            themeObject: function (state) {
-                let theme = state.mallConfig.mall.setting.theme_color;
-                return {
-                    back: theme + '-m-back ' + theme,
-                    backO: theme + '-m-back-o ' + theme,
-                    theme: theme,
-                    color: theme + '-m-text ' + theme,
-                    sBack: theme + '-s-back ' + theme
-                }
-            }
-        }),
-        compareTime() {
-            if (this.bargain) {
-                let {begin_time, end_time} = this.bargain;
-
-                function getStamp(time = '') {
-                    if (time) {
-                        time = time.trim().substring(0, 19);
-                        time = time.replace(/-/g, '/');
-                        return new Date(time).getTime();
-                    }
-                    return new Date().getTime();
-                }
-
-                let begin_time_stamp = getStamp(begin_time)
-                let end_time_stamp = getStamp(end_time)
-                let time_stamp = getStamp();
-                if (begin_time_stamp <= time_stamp && time_stamp < end_time_stamp) {
-                    return '';
-                }
-                if (time_stamp >= end_time_stamp) {
-                    return 'end';
-                }
-                if (time_stamp < begin_time_stamp) {
-                    return 'no-start';
-                }
-            }
-            return '';
-        },
-    },
-
-    data() {
-        return {
-            showClose: false,
-            is_open: false,
-            timeIntegral: null,
-            goods_id: '',
-            bargain: null,
-            finish_list: null,
-            begin_list: null,
-            end_list: null,
-
-            shareShow: false,
-            title: '砍价',
-            page: 1,
-
-            circuit: [{
-                name: '点击砍价',
-                url: '/static/image/bargain-click.png',
-            }, {
-                name: '',
-                url: '/static/image/bargain-jiantou.png',
-            }, {
-                name: '找人砍价',
-                url: '/static/image/bargain-help.png',
-            }, {
-                name: '',
-                url: '/static/image/bargain-jiantou.png',
-            }, {
-                name: '价格合适',
-                url: '/static/image/bargain-price.png',
-            }, {
-                name: '',
-                url: '/static/image/bargain-jiantou.png',
-            }, {
-                name: '优惠购买',
-                url: '/static/image/bargain-buy.png'
-            }],
-            poster: this.$api.bargain.poster,
-
-            poster_config: this.$api.bargain.poster_config,
-            poster_generate: this.$api.bargain.poster_generate,
-        }
-        },
-        onLoad(options) {
-            // #ifdef MP-WEIXIN
-            wx.showShareMenu({
-                menus: ['shareAppMessage', 'shareTimeline']
-            })
-            // #endif
-            const self = this;
-            this.$store.dispatch('user/info');
-            this.goods_id = options.goods_id;
-
-            this.$showLoading();
-            this.$request({
-                url: this.$api.bargain.goods_detail,
-                data: {
-                    goods_id: this.goods_id,
-                }
-            }).then(info => {
-                self.$hideLoading();
-                if (info.code === 0) {
-                    self.bargain = info.data.bargain;
-                    //定时器
-                    let func = function () {
-                        self.begin_list = self.setTimeStart(self.bargain.begin_time);
-                        self.end_list = self.setTimeStart(self.bargain.end_time);
-                        if (self.bargain.bargain_info) {
-                            self.finish_list = self.setTimeStart(self.bargain.bargain_info.finish_at);
-                        }
-                    };
-                    func();
-                    self.timeIntegral = setInterval(() => {
-                        func();
-                    }, 1000);
-                } else {
-                    uni.showToast({icon: 'none', title: info.msg});
-                    uni.navigateBack();
-                }
-            }).catch(() => {
-                self.$hideLoading();
-            });
-        },
-
-        onShow() {
-            this.showClose = false;
-            setTimeout(()=>{
-                this.showClose = true;
-            })
-        },
-
-        onUnload() {
-            clearInterval(this.timeIntegral);
-        },
-
-        /**
-         * 用户点击右上角分享
-         */
-        onShareAppMessage: function () {
-            return this.$shareAppMessage({
-                title: this.bargain.goods.app_share_title ? this.bargain.goods.app_share_title : this.bargain.name,
-                path: '/plugins/bargain/goods/goods',
-                imageUrl: this.bargain.goods.app_share_pic ? this.bargain.goods.app_share_pic : this.bargain.cover_pic,
-                params: {
-                    goods_id: this.bargain.goods_id
-                }
-            });
-        },
-        // #ifdef MP-WEIXIN
-        onShareTimeline() {
-            // 分享朋友圈beta
-            return this.$shareTimeline({
-                title: this.bargain.goods.app_share_title ? this.bargain.goods.app_share_title : this.bargain.name,
-                query: {
-                    goods_id: this.bargain.goods_id
-                } // 此处填写页面的参数
-            });
-        },
-        // #endif
-        methods: {
-            getMall(e) {
-                this.is_open = e.is_open == 1 ? true : false;
-            },
-            bargainFriend() {
-                uni.navigateTo({url: '/plugins/bargain/activity/activity?id=' + this.bargain.bargain_info.bargain_order_id});
-            },
-            setTimeStart: function (e) {
-                let time = e.replace(/-/g, '/');
-                let diff_time = parseInt((new Date(time).getTime() - new Date().getTime()) / 1000)
-                let day = 0, hour = 0, minute = 0, second = 0;
-
-                if (diff_time > 0) {
-                    day = Math.floor(diff_time / (60 * 60 * 24));
-                    hour = Math.floor(diff_time / (60 * 60)) - (day * 24);
-                    minute = Math.floor(diff_time / 60) - (day * 24 * 60) - (hour * 60);
-                    second = Math.floor(diff_time) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
-                } else {
-                    return null;
-                }
-                return {
-                    d: day,
-                    h: hour < 10 ? ('0' + hour) : hour,
-                    m: minute < 10 ? ('0' + minute) : minute,
-                    s: second < 10 ? ('0' + second) : second,
-                };
-            },
-
-            subscribe: function () {
-                const self = this;
-                this.$subscribe(this.bargain.template_message).then(res => {
-                    self.save();
-                }).catch(() => {
-                    self.save();
-                });
-            },
-
-            save: function () {
-                const self = this;
-                self.$showLoading();
-                self.$request({
-                    url: self.$api.bargain.bargain_submit,
-                    data: {
-                        goods_id: self.bargain.goods_id
-                    },
-                }).then(info => {
-                    self.$hideLoading();
-                    if (info.code == 0) {
-                        self.bargainResult(info);
-                    } else {
-                        uni.showToast({icon: 'none', title: info.msg});
-                    }
-                }).catch(e => {
-                    self.$hideLoading();
-                });
-            },
-
-            bargainResult(data) {
-                const self = this;
-                self.$showLoading();
-                self.$request({
-                    url: self.$api.bargain.bargain_result,
-                    data: {
-                        queueId: data.data.queueId,
-                        token: data.data.token,
-                    },
-                }).then(info => {
-                    if (info.code === 0) {
-                        if (info.data.retry) {
-                            setTimeout(() => {
-                                self.bargainResult(data);
-                            }, 1000);
-                            return;
-                        }
-                        self.$hideLoading();
-                        uni.redirectTo({
-                            url: '/plugins/bargain/activity/activity?order_id=' + info.data.bargain_order_id,
-                        })
-                    } else {
-                        self.$hideLoading();
-                        uni.showToast({icon: 'none', title: info.msg});
-                    }
-                }).catch(e => {
-                    self.$hideLoading();
-                });
-            },
-
-            submit: function () {
-                const bargain = this.bargain;
-                const mchList = [{
-                    "mch_id": 0,
-                    "bargain_order_id": bargain.bargain_info.bargain_order_id,
-                    "goods_list": [{
-                        "id": bargain.goods_id,
-                        "attr": [],
-                        "num": 1,
-                        "cart_id": 0,
-                        "goods_attr_id": bargain.goods_attr_id
-                    }]
-                }];
-                uni.navigateTo({
-                    url: '/pages/order-submit/order-submit?mch_list=' +
-                        JSON.stringify(mchList) +
-                        '&preview_url=' + encodeURIComponent(this.$api.bargain.order_preview) +
-                        '&submit_url=' + encodeURIComponent(this.$api.bargain.order_submit)
-                });
-            },
-
-            shareClick() {
-                this.shareShow = true;
-            },
-
-            setCoupon(index) {
-                this.$set(this.bargain.goods_coupon_center[index], 'is_receive', 1);
-            }
-        }
-    }
-</script>
-
-<style scoped lang="scss">
-    .time-bg {
-        width: 100%;
-        height: #{88rpx};
-        .icon-time {
-            position: relative;
-            height: 100%;
-            width: #{710rpx};
-            background-repeat: no-repeat;
-            background-size: 100% auto;
-        }
-
-        .time-desc {
-            position: absolute;
-            font-size: #{26rpx};
-            left: 0;
-            right: 0;
-            margin: 0 auto;
-            color: #353535;
-        }
-
-        .time-box {
-            height: #{42rpx};
-            color: #fff;
-            width: #{46rpx};
-            line-height: #{42rpx};
-            text-align: center;
-            background-color: #666;
-            border-radius: #{4rpx};
-            margin: 0 #{10rpx};
-        }
-    }
-
-    .activity {
-        font-size: #{28rpx};
-        color: #353535;
-        padding: #{24rpx};
-        background: #FFFFFF;
-        width: 702upx;
-        border-radius: 15upx 15upx 0 0;
-        margin: 24upx 24upx 0 24upx;
-        .user-img {
-            height: #{96rpx};
-            width: #{96rpx};
-            display: block;
-            margin-right: #{34rpx};
-        }
-
-        .yellow {
-            color: #ff8c40;
-        }
-
-        .current {
-            margin-top: #{20rpx};
-            font-size: #{38rpx};
-            color: #ff4544;
-        }
-
-        .progress-box {
-            width: 100%;
-            height: #{40rpx};
-            border-radius: #{20rpx};
-            border: #{1px} solid #ff5c5c;
-            overflow: hidden;
-            margin-top: #{28rpx};
-            margin-bottom: #{16rpx};
-        }
-
-        .progress-view {
-            width: 50%;
-            height: 100%;
-            border-radius: #{20rpx};
-            background-color: #ff9f9f;
-        }
-
-        .price {
-            font-size: #{26rpx};
-            color: #666666;
-            padding-bottom: #{20rpx};
-        }
-    }
-
-    .goods {
-        width: 702upx;
-        border-radius: 15upx 15upx 0 0;
-        margin: 24upx 24upx 0 24upx;
-        background: #FFFFFF;
-        padding: #{32rpx} #{24rpx} #{40rpx};
-        color: #999999;
-
-        .name {
-            color: #353535;
-            margin-bottom:#{32rpx};
-            font-size: #{32rpx};
-        }
-        .goods-subtitle {
-            font-size: 24rpx;
-            background-color: #ffffff;
-            color: #999999;
-            margin-bottom:#{24rpx};
-        }
-
-        .detail {
-            color: #999999;
-            font-size: #{28rpx};
-
-            .end {
-                line-height: 1;
-            }
-
-            .red {
-                color: #ff4544;
-            }
-
-            .price {
-                font-size: #{46rpx};
-            }
-
-            .del {
-                margin-left: #{16rpx};
-                text-decoration: line-through;
-            }
-
-            .num {
-                margin-top: #{32rpx};
-            }
-
-            .num view:first-child {
-                margin-right: #{32rpx};
-            }
-        }
-
-        .share {
-            margin-top: #{24rpx};
-
-            .icon {
-                height: #{40rpx};
-                width: #{40rpx};
-                background-image: url('../../../static/image/icon/icon-share.png');
-                background-repeat: no-repeat;
-                background-size: 100% 100%;
-            }
-
-            view {
-                font-size: #{22rpx};
-                color: #999999;
-                margin-top: #{10rpx};
-            }
-        }
-    }
-
-    .circuit-label {
-        height: #{88rpx};
-        color: #ff4544;
-        width: 702upx;
-        margin: 24upx 24upx 0 24upx;
-        font-size: #{32rpx};
-        background: #FFFFFF;
-        border-bottom: #{1px} solid #e2e2e2;
-
-        .icon-circuit {
-            height: #{34}rpx;
-            width: #{34rpx};
-            background-image: url("./../image/bargain-flow.png");
-            background-repeat: no-repeat;
-            background-size: 100% auto;
-            margin: 0 #{16rpx};
-        }
-    }
-
-    .user-scroll {
-        max-height: #{264rpx};
-    }
-
-    .info {
-        width: 100%;
-        border-radius: #{16rpx};
-        background-color: #fff7f7;
-        padding: #{32rpx} #{24rpx};
-
-        .nickname {
-            max-width: #{200rpx};
-            word-break: break-all;
-            text-overflow: ellipsis;
-            display: -webkit-box;
-            -webkit-box-orient: vertical;
-            -webkit-line-clamp: 1;
-            overflow: hidden;
-        }
-
-        .red {
-            color: #ff4544;
-        }
-
-        image {
-            width: #{64rpx};
-            height: #{64rpx};
-            margin-right: #{24rpx};
-        }
-
-
-        .item {
-            margin-bottom: #{32rpx};
-        }
-
-        .item:last-child {
-            margin-bottom: 0;
-        }
-    }
-
-    .circuit-value {
-        padding-top: #{20rpx};
-        background: #FFFFFF;
-        padding-bottom: #{30rpx};
-        width: 702upx;
-        border-radius: 0 0 15upx 15upx;
-        margin: 0 24upx;
-        .icon-circuit-i {
-            height: #{72rpx};
-            width: #{72rpx};
-        }
-
-        .name {
-            font-size: #{25rpx};
-            color: #999999;
-            margin-top: #{20rpx};
-        }
-
-        .icon-circuit-j {
-            margin-top: #{19rpx};
-            height: #{34rpx};
-            width: #{52rpx};
-        }
-
-        > view {
-            margin: 0 #{10rpx}
-        }
-    }
-
-    .activity-time {
-        padding-bottom: #{40rpx};
-        background: #FFFFFF;
-        padding-left: #{20rpx};
-        width: 702upx;
-        border-radius: 0 0 15upx 15upx;
-        margin: 0 24upx;
-        view {
-            padding-top: #{28rpx};
-            font-size: #{28rpx};
-            color: #666666;
-        }
-
-        view:before {
-            content: '●';
-            margin-right: #{20rpx};
-        }
-    }
-
-    .bargain-goods-bottom {
-        height: #{120rpx};
-        width: 100%;
-        background: #FFFFFF;
-        .btn {
-            font-size: #{32rpx};
-            height: #{80rpx};
-            line-height: #{80rpx};
-            text-align: center;
-            width: #{702rpx};
-            border-radius: #{40rpx};
-        }
-
-        .default-btn {
-            background: linear-gradient(#ff9292, #fc6969);
-        }
-
-        .btn.shop {
-            width: #{346rpx};
-        }
-
-        .btn.friend {
-            width: #{346rpx};
-            margin-left: #{12rpx};
-        }
-        .default-friend {
-            background: linear-gradient(#ffc46b, #ffa13c);
-            color: #ffffff;
-        }
-    }
-    .attr-box {
-        width: 702upx;
-        margin: 0 24upx 0 24upx;
-        border-radius: 0 0 15upx 15upx;
-        padding: #{0 24rpx};
-        background: #ffffff;
-        .attr {
-            padding: #{28rpx 0};
-            border-top: #{1rpx solid #eeeeee};
-
-            .left {
-                color: #666666;
-                margin-right: #{24rpx};
-                font-size: $uni-font-size-weak-one;
-
-                view {
-                    border: #{1rpx solid #666666};
-                    padding: #{8rpx 16px};
-                    -webkit-border-radius: #{30rpx};
-                    -moz-border-radius: #{30rpx};
-                    border-radius: #{30rpx};
-                }
-            }
-
-            .right {
-                font-size: $uni-font-size-general-two;
-                margin-top: #{10rpx};
-
-                .attr-item {
-                    margin-right: #{10rpx};
-                }
-            }
-        }
-    }
-
-    .text {
-        color: #ffffff;
-    }
-
-    .goods-margin {
-        margin-top: 20upx;
-    }
-    .u-bottom-fixed {
-        position: fixed;
-        bottom: 0;
-        left: 0;
-        width: 100%;
-        z-index: 1602;
-        background-color: #ffffff;
-    }
-    .u-bottom-height {
-        height: 110upx;
-    }
-
-    .bd-detail {
-        width: 702upx;
-        background-color: #ffffff;
-        padding: 20upx;
-        margin: 0 24upx;
-        border-radius: 0 0 15upx 15upx;
-    }
-
+<template>
+	<app-layout>
+		<view v-if="!bargain" class="u-goods-detail"></view>
+		<template v-if="bargain">
+			<app-goods-banner :pic-list="bargain.pic_url" :share="bargain.share" :goods_id="bargain.goods_id"
+				sign="bargain" :video-url="bargain.video_url"></app-goods-banner>
+			<view v-if="begin_list || end_list" class="main-center cross-center time-bg">
+				<app-plugin-time-bar :theme="getTheme" :day="begin_list ? begin_list.d : end_list.d"
+					:hour="begin_list ? begin_list.h : end_list.h" :minute="begin_list ? begin_list.m : end_list.m"
+					:second="begin_list ? begin_list.s : end_list.s" :start_begin="begin_list ? '距活动开始' : '距活动结束'">
+				</app-plugin-time-bar>
+			</view>
+			<view class="goods" v-if="bargain">
+				<view class="t-omit-three name">{{bargain.name}}</view>
+				<view v-if="bargain.subtitle" class="goods-subtitle">
+					<view class="t-omit-three">{{bargain.subtitle}}</view>
+				</view>
+				<view class="dir-left-nowrap cross-center">
+					<view class="detail box-grow-1 dir-top-nowrap">
+						<view class="box-grow-0 dir-left-nowrap cross-bottom end">
+							<view>最低</view>
+							<view :class="getTheme + '-m-text ' + getTheme">¥</view>
+							<view class="price" :class="getTheme + '-m-text ' + getTheme">{{bargain.min_price}}</view>
+							<view class="del" v-if="isUnderlinePirce == 1">原价{{bargain.price}}</view>
+						</view>
+						<view class="box-grow-0 num dir-left-nowrap">
+							<view>库存:{{bargain.stock}}{{bargain.unit}}</view>
+							<view>已有{{bargain.join_num}}人参与砍价</view>
+						</view>
+					</view>
+					<view @click="shareClick" class="share box-grow-0 cross-center dir-top-nowrap">
+						<icon class="icon"></icon>
+						<view class="share">分享</view>
+					</view>
+					<view>
+						<app-share-qr-code :url="poster + `&goods_id=` + goods_id" v-model="shareShow"
+							:has-poster-nav="true" :poster-config="poster_config + `&goods_id=` + goods_id"
+							:poster-generate="poster_generate + `&goods_id=` + goods_id"></app-share-qr-code>
+					</view>
+				</view>
+			</view>
+			<view class="attr-box">
+				<view class="attr dir-left-nowrap">
+					<view class="box-grow-0 left cross-center dir-top-nowrap">
+						<view>商品信息</view>
+					</view>
+					<view class="box-grow-1 right dir-left-wrap">
+						<view class="attr-item" v-for="(item, index) in bargain.select_attr_group" :key="index">
+							{{item.attr_group_name + ':' + item.attr_name}}
+						</view>
+					</view>
+				</view>
+			</view>
+			<bd-coupon @change="setCoupon" :theme="themeObject" :coupons="bargain.goods_coupon_center"></bd-coupon>
+			<bd-xbc :guarantee-title="bargain.guarantee_title" :guarantee-pic="bargain.guarantee_pic"
+				:param_content="bargain.param_content" :param_name="bargain.param_name" :services="bargain.service">
+			</bd-xbc>
+			<bd-hc :integral="bargain.goods_marketing_award.integral" :coupon="bargain.goods_marketing_award.coupon"
+				:card="bargain.goods_marketing_award.card" :balance="bargain.goods_marketing_award.balance"
+				:theme="themeObject"></bd-hc>
+			<bd-kb :limit="bargain.goods_marketing.limit" :express="bargain.express"
+				:shipping="bargain.goods_marketing.shipping" :pickup="bargain.goods_marketing.pickup"></bd-kb>
+			<view class="activity goods-margin" v-if="bargain.bargain_info">
+				<view class="dir-left-nowrap cross-center">
+					<image class="box-grow-0 user-img" :src="userInfo.avatar" load-lazy></image>
+					<view class="dir-top-nowrap">
+						<view class="dir-left-nowrap">
+							<view>距本次砍价结束仅剩</view>
+							<view class="yellow">
+								<block v-if="finish_list">
+									{{finish_list.d}}天{{finish_list.h}}:{{finish_list.m}}:{{finish_list.s}}
+								</block>
+								<block v-else>0天0:0:0</block>
+							</view>
+						</view>
+
+						<view v-if="bargain.bargain_info.now_price == bargain.bargain_info.min_price" class="yellow">
+							已砍至最低价,赶快优惠购买吧!
+						</view>
+						<view class="yellow" v-else>快让你的好友助你一臂之力!</view>
+					</view>
+				</view>
+				<view class="main-center">
+					<view class="current">当前价¥{{bargain.bargain_info.now_price}}</view>
+				</view>
+				<view class='progress-box'>
+					<view class='progress-view' :style="{width:bargain.bargain_info.bargain_price_per+'%'}"></view>
+				</view>
+				<view class='dir-left-nowrap price'>
+					<view class='box-grow-1'>原价¥{{bargain.bargain_info.price}}</view>
+					<view class='box-grow-0'>底价¥{{bargain.bargain_info.min_price}}</view>
+				</view>
+				<view class='info'>
+					<scroll-view class="user-scroll" scroll-y :scroll-into-view="'user-'+user_index"
+						scroll-with-animation="true">
+						<block v-for="(v,k) in bargain.bargain_info.list" :key="k">
+							<view class="item dir-left-nowrap cross-center">
+								<image class='box-grow-0' :src="v.avatar" load-lazy></image>
+								<view class="box-grow-1 dir-left-nowrap cross-center">
+									<view class="nickname">{{v.nickname}}</view>
+									<view> 小刀一挥帮忙砍了</view>
+									<view class="red">{{v.price}}</view>
+									<view>元</view>
+								</view>
+							</view>
+						</block>
+					</scroll-view>
+				</view>
+			</view>
+			<view class="circuit-label goods-margin dir-left-nowrap cross-center">
+				<icon class="icon-circuit"></icon>
+				<view>砍价流程</view>
+			</view>
+			<view class="circuit-value dir-left-nowrap main-center">
+				<block v-for="(v,k) in circuit" :key="k">
+					<view class="cross-center dir-top-nowrap">
+						<image :src="v.url" :class="v.name ? 'icon-circuit-i' : 'icon-circuit-j'"></image>
+						<view class="box-grow-0 name">{{v.name}}</view>
+					</view>
+				</block>
+			</view>
+			<view class="circuit-label goods-margin dir-left-nowrap cross-center">
+				<icon class="icon-circuit"></icon>
+				<view>活动说明</view>
+			</view>
+			<view class="activity-time">
+				<view>本活动开始时间{{bargain.begin_time}}</view>
+				<view>本活动结束时间{{bargain.end_time}}</view>
+			</view>
+			<view class="circuit-label goods-margin dir-left-nowrap cross-center">
+				<icon class="icon-circuit"></icon>
+				<view>商品详情</view>
+			</view>
+			<view class="bd-detail">
+				<app-rich-text :content="bargain.detail"></app-rich-text>
+			</view>
+			<!-- 底部空格 -->
+			<view class="safe-area-inset-bottom">
+				<view class="u-bottom-height"></view>
+			</view>
+			<!-- 底部按钮 -->
+			<view v-if="is_open" class="safe-area-inset-bottom u-bottom-fixed">
+				<view class="bargain-goods-bottom main-center cross-center">
+					<block v-if="bargain.bargain_info">
+						<block v-if="bargain.bargain_info.min_price < bargain.bargain_info.now_price">
+							<view @click="submit" class="btn shop"
+								:class="getTheme === 'a' ? 'default-btn text' : getTheme === 'b' || getTheme === 'f' ?  getTheme + '-s-back text ' + getTheme : getTheme + '-s-back ' + getTheme + '-m-text ' + getTheme">
+								立即购买</view>
+							<view @click="bargainFriend" class="btn friend"
+								:class="getTheme === 'a' ? 'default-friend' : getTheme + '-m-back '+ getTheme + '-s-text ' + getTheme">
+								找人帮砍</view>
+						</block>
+						<view v-else @click="submit" class="btn" style="color: #ffffff;"
+							:class="getTheme === 'a' ? 'default-btn' : getTheme + '-m-back ' + getTheme">立即购买</view>
+					</block>
+					<block v-else>
+						<view v-if="bargain.stock == 0" class="btn" style="background: #CDCDCD;color: #fff;">已售罄</view>
+						<view v-else-if="compareTime === 'no-start'" class="btn"
+							style="background: #CDCDCD;color: #fff;">未开始
+						</view>
+						<view v-else-if="compareTime === 'end'" class="btn" style="background: #CDCDCD;color: #fff;">已结束
+						</view>
+						<view v-else @click="subscribe" class="btn" style="color: #ffffff;"
+							:class="getTheme === 'a' ? 'default-btn' : getTheme + '-m-back ' + getTheme">立即砍价
+						</view>
+					</block>
+				</view>
+			</view>
+		</template>
+		<app-close v-if="showClose" :modal="false" @update="getMall"></app-close>
+	</app-layout>
+</template>
+
+<script>
+	import {
+		mapGetters,
+		mapState
+	} from 'vuex';
+	import appQuickNavigation from "../../../components/page-component/app-quick-navigation/app-quick-navigation";
+	import appRichText from "../../../components/basic-component/app-rich/parse.vue";
+	import appGoodsBanner from "../../../components/page-component/goods/app-goods-banner.vue";
+	import appService from "../../../components/page-component/goods/app-goods-service.vue";
+	import appShareQrCode from '../../../components/page-component/app-share-qr-code-poster/app-share-qr-code-poster.vue';
+	import appGoodsMarketing from '../../../components/page-component/goods/app-goods-marketing.vue';
+	import appPluginTimeBar from '../components/app-plugin-time-bar.vue';
+	import appGoodsCoupon from "../../../components/page-component/goods/app-goods-coupon";
+	import bdCoupon from '@/components/page-component/goods/bd-coupon.vue';
+	import bdXbc from '@/components/page-component/goods/bd-xbc.vue';
+	import bdKb from '@/components/page-component/goods/bd-kb.vue';
+	import bdHc from '@/components/page-component/goods/bd-hc.vue';
+	import bdComments from '@/components/page-component/goods/bd-comments.vue';
+	import appClose from '@/components/basic-component/app-close/app-close.vue';
+
+	export default {
+		name: "goods",
+		components: {
+			appQuickNavigation,
+			appRichText,
+			appGoodsBanner,
+			appService,
+			appShareQrCode,
+			appGoodsMarketing,
+			appPluginTimeBar,
+			appGoodsCoupon,
+			appClose,
+			bdCoupon,
+			bdXbc,
+			bdKb,
+			bdHc,
+			bdComments
+		},
+		computed: {
+			...mapState({
+				appImg: state => state.mallConfig.plugin.bargain.app_image,
+				userInfo: state => state.user.info,
+				isUnderlinePrice: state => state.mallConfig.mall.setting.is_underline_price,
+			}),
+			...mapState('gConfig', {
+				iphone: (data) => {
+					return data.iphone;
+				},
+				iphoneHeight: (state) => {
+					return state.iphoneHeight;
+				},
+			}),
+			...mapGetters('mallConfig', {
+				getTheme: 'getTheme',
+			}),
+			...mapState({
+				themeObject: function(state) {
+					let theme = state.mallConfig.mall.setting.theme_color;
+					return {
+						back: theme + '-m-back ' + theme,
+						backO: theme + '-m-back-o ' + theme,
+						theme: theme,
+						color: theme + '-m-text ' + theme,
+						sBack: theme + '-s-back ' + theme
+					}
+				}
+			}),
+			compareTime() {
+				if (this.bargain) {
+					let {
+						begin_time,
+						end_time
+					} = this.bargain;
+
+					function getStamp(time = '') {
+						if (time) {
+							time = time.trim().substring(0, 19);
+							time = time.replace(/-/g, '/');
+							return new Date(time).getTime();
+						}
+						return new Date().getTime();
+					}
+
+					let begin_time_stamp = getStamp(begin_time)
+					let end_time_stamp = getStamp(end_time)
+					let time_stamp = getStamp();
+					if (begin_time_stamp <= time_stamp && time_stamp < end_time_stamp) {
+						return '';
+					}
+					if (time_stamp >= end_time_stamp) {
+						return 'end';
+					}
+					if (time_stamp < begin_time_stamp) {
+						return 'no-start';
+					}
+				}
+				return '';
+			},
+		},
+
+		data() {
+			return {
+				showClose: false,
+				is_open: false,
+				timeIntegral: null,
+				goods_id: '',
+				bargain: null,
+				finish_list: null,
+				begin_list: null,
+				end_list: null,
+
+				shareShow: false,
+				title: '砍价',
+				page: 1,
+
+				circuit: [{
+					name: '点击砍价',
+					url: '/static/image/bargain-click.png',
+				}, {
+					name: '',
+					url: '/static/image/bargain-jiantou.png',
+				}, {
+					name: '找人砍价',
+					url: '/static/image/bargain-help.png',
+				}, {
+					name: '',
+					url: '/static/image/bargain-jiantou.png',
+				}, {
+					name: '价格合适',
+					url: '/static/image/bargain-price.png',
+				}, {
+					name: '',
+					url: '/static/image/bargain-jiantou.png',
+				}, {
+					name: '优惠购买',
+					url: '/static/image/bargain-buy.png'
+				}],
+				poster: this.$api.bargain.poster,
+
+				poster_config: this.$api.bargain.poster_config,
+				poster_generate: this.$api.bargain.poster_generate,
+			}
+		},
+		onLoad(options) {
+			// #ifdef MP-WEIXIN
+			wx.showShareMenu({
+				menus: ['shareAppMessage', 'shareTimeline']
+			})
+			// #endif
+			const self = this;
+			this.$store.dispatch('user/info');
+			this.goods_id = options.goods_id;
+			this.$showLoading();
+			this.$request({
+				url: this.$api.bargain.goods_detail,
+				data: {
+					goods_id: this.goods_id,
+				}
+			}).then(info => {
+				self.$hideLoading();
+				if (info.code === 0) {
+					self.bargain = info.data.bargain;
+					//定时器
+					let func = function() {
+						self.begin_list = self.setTimeStart(self.bargain.begin_time);
+						self.end_list = self.setTimeStart(self.bargain.end_time);
+						if (self.bargain.bargain_info) {
+							self.finish_list = self.setTimeStart(self.bargain.bargain_info.finish_at);
+						}
+					};
+					func();
+					self.timeIntegral = setInterval(() => {
+						func();
+					}, 1000);
+				} else {
+					uni.showToast({
+						icon: 'none',
+						title: info.msg,
+						duration: 1500
+					});
+					// setTimeout(()=>{
+					// 	uni.navigateBack();
+					// },1500)
+				}
+			}).catch(() => {
+				self.$hideLoading();
+			});
+		},
+
+		onShow() {
+			this.showClose = false;
+			setTimeout(() => {
+				this.showClose = true;
+			})
+		},
+
+		onUnload() {
+			clearInterval(this.timeIntegral);
+		},
+
+		/**
+		 * 用户点击右上角分享
+		 */
+		onShareAppMessage: function() {
+			return this.$shareAppMessage({
+				title: this.bargain.goods.app_share_title ? this.bargain.goods.app_share_title : this.bargain
+					.name,
+				path: '/plugins/bargain/goods/goods',
+				imageUrl: this.bargain.goods.app_share_pic ? this.bargain.goods.app_share_pic : this.bargain
+					.cover_pic,
+				params: {
+					goods_id: this.bargain.goods_id
+				}
+			});
+		},
+		// #ifdef MP-WEIXIN
+		onShareTimeline() {
+			// 分享朋友圈beta
+			return this.$shareTimeline({
+				title: this.bargain.goods.app_share_title ? this.bargain.goods.app_share_title : this.bargain.name,
+				query: {
+					goods_id: this.bargain.goods_id
+				} // 此处填写页面的参数
+			});
+		},
+		// #endif
+		methods: {
+			getMall(e) {
+				this.is_open = e.is_open == 1 ? true : false;
+			},
+			bargainFriend() {
+				uni.navigateTo({
+					url: '/plugins/bargain/activity/activity?id=' + this.bargain.bargain_info.bargain_order_id
+				});
+			},
+			setTimeStart: function(e) {
+				let time = e.replace(/-/g, '/');
+				let diff_time = parseInt((new Date(time).getTime() - new Date().getTime()) / 1000)
+				let day = 0,
+					hour = 0,
+					minute = 0,
+					second = 0;
+
+				if (diff_time > 0) {
+					day = Math.floor(diff_time / (60 * 60 * 24));
+					hour = Math.floor(diff_time / (60 * 60)) - (day * 24);
+					minute = Math.floor(diff_time / 60) - (day * 24 * 60) - (hour * 60);
+					second = Math.floor(diff_time) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
+				} else {
+					return null;
+				}
+				return {
+					d: day,
+					h: hour < 10 ? ('0' + hour) : hour,
+					m: minute < 10 ? ('0' + minute) : minute,
+					s: second < 10 ? ('0' + second) : second,
+				};
+			},
+
+			subscribe: function() {
+				const self = this;
+				this.$subscribe(this.bargain.template_message).then(res => {
+					self.save();
+				}).catch(() => {
+					self.save();
+				});
+			},
+
+			save: function() {
+				const self = this;
+				self.$showLoading();
+				self.$request({
+					url: self.$api.bargain.bargain_submit,
+					data: {
+						goods_id: self.bargain.goods_id
+					},
+				}).then(info => {
+					self.$hideLoading();
+					if (info.code == 0) {
+						self.bargainResult(info);
+					} else {
+						uni.showToast({
+							icon: 'none',
+							title: info.msg
+						});
+					}
+				}).catch(e => {
+					self.$hideLoading();
+				});
+			},
+
+			bargainResult(data) {
+				const self = this;
+				self.$showLoading();
+				self.$request({
+					url: self.$api.bargain.bargain_result,
+					data: {
+						queueId: data.data.queueId,
+						token: data.data.token,
+					},
+				}).then(info => {
+					if (info.code === 0) {
+						if (info.data.retry) {
+							setTimeout(() => {
+								self.bargainResult(data);
+							}, 1000);
+							return;
+						}
+						self.$hideLoading();
+						uni.redirectTo({
+							url: '/plugins/bargain/activity/activity?order_id=' + info.data
+								.bargain_order_id,
+						})
+					} else {
+						self.$hideLoading();
+						uni.showToast({
+							icon: 'none',
+							title: info.msg
+						});
+					}
+				}).catch(e => {
+					self.$hideLoading();
+				});
+			},
+
+			submit: function() {
+				const bargain = this.bargain;
+				const mchList = [{
+					"mch_id": 0,
+					"bargain_order_id": bargain.bargain_info.bargain_order_id,
+					"goods_list": [{
+						"id": bargain.goods_id,
+						"attr": [],
+						"num": 1,
+						"cart_id": 0,
+						"goods_attr_id": bargain.goods_attr_id
+					}]
+				}];
+				uni.navigateTo({
+					url: '/pages/order-submit/order-submit?mch_list=' +
+						JSON.stringify(mchList) +
+						'&preview_url=' + encodeURIComponent(this.$api.bargain.order_preview) +
+						'&submit_url=' + encodeURIComponent(this.$api.bargain.order_submit)
+				});
+			},
+
+			shareClick() {
+				this.shareShow = true;
+			},
+
+			setCoupon(index) {
+				this.$set(this.bargain.goods_coupon_center[index], 'is_receive', 1);
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.time-bg {
+		width: 100%;
+		height: #{88rpx};
+
+		.icon-time {
+			position: relative;
+			height: 100%;
+			width: #{710rpx};
+			background-repeat: no-repeat;
+			background-size: 100% auto;
+		}
+
+		.time-desc {
+			position: absolute;
+			font-size: #{26rpx};
+			left: 0;
+			right: 0;
+			margin: 0 auto;
+			color: #353535;
+		}
+
+		.time-box {
+			height: #{42rpx};
+			color: #fff;
+			width: #{46rpx};
+			line-height: #{42rpx};
+			text-align: center;
+			background-color: #666;
+			border-radius: #{4rpx};
+			margin: 0 #{10rpx};
+		}
+	}
+
+	.activity {
+		font-size: #{28rpx};
+		color: #353535;
+		padding: #{24rpx};
+		background: #FFFFFF;
+		width: 702upx;
+		border-radius: 15upx 15upx 0 0;
+		margin: 24upx 24upx 0 24upx;
+
+		.user-img {
+			height: #{96rpx};
+			width: #{96rpx};
+			display: block;
+			margin-right: #{34rpx};
+		}
+
+		.yellow {
+			color: #ff8c40;
+		}
+
+		.current {
+			margin-top: #{20rpx};
+			font-size: #{38rpx};
+			color: #ff4544;
+		}
+
+		.progress-box {
+			width: 100%;
+			height: #{40rpx};
+			border-radius: #{20rpx};
+			border: #{1px} solid #ff5c5c;
+			overflow: hidden;
+			margin-top: #{28rpx};
+			margin-bottom: #{16rpx};
+		}
+
+		.progress-view {
+			width: 50%;
+			height: 100%;
+			border-radius: #{20rpx};
+			background-color: #ff9f9f;
+		}
+
+		.price {
+			font-size: #{26rpx};
+			color: #666666;
+			padding-bottom: #{20rpx};
+		}
+	}
+
+	.goods {
+		width: 702upx;
+		border-radius: 15upx 15upx 0 0;
+		margin: 24upx 24upx 0 24upx;
+		background: #FFFFFF;
+		padding: #{32rpx} #{24rpx} #{40rpx};
+		color: #999999;
+
+		.name {
+			color: #353535;
+			margin-bottom:#{32rpx};
+			font-size: #{32rpx};
+		}
+
+		.goods-subtitle {
+			font-size: 24rpx;
+			background-color: #ffffff;
+			color: #999999;
+			margin-bottom:#{24rpx};
+		}
+
+		.detail {
+			color: #999999;
+			font-size: #{28rpx};
+
+			.end {
+				line-height: 1;
+			}
+
+			.red {
+				color: #ff4544;
+			}
+
+			.price {
+				font-size: #{46rpx};
+			}
+
+			.del {
+				margin-left: #{16rpx};
+				text-decoration: line-through;
+			}
+
+			.num {
+				margin-top: #{32rpx};
+			}
+
+			.num view:first-child {
+				margin-right: #{32rpx};
+			}
+		}
+
+		.share {
+			margin-top: #{24rpx};
+
+			.icon {
+				height: #{40rpx};
+				width: #{40rpx};
+				background-image: url('../../../static/image/icon/icon-share.png');
+				background-repeat: no-repeat;
+				background-size: 100% 100%;
+			}
+
+			view {
+				font-size: #{22rpx};
+				color: #999999;
+				margin-top: #{10rpx};
+			}
+		}
+	}
+
+	.circuit-label {
+		height: #{88rpx};
+		color: #ff4544;
+		width: 702upx;
+		margin: 24upx 24upx 0 24upx;
+		font-size: #{32rpx};
+		background: #FFFFFF;
+		border-bottom: #{1px} solid #e2e2e2;
+
+		.icon-circuit {
+			height: #{34}rpx;
+			width: #{34rpx};
+			background-image: url("./../image/bargain-flow.png");
+			background-repeat: no-repeat;
+			background-size: 100% auto;
+			margin: 0 #{16rpx};
+		}
+	}
+
+	.user-scroll {
+		max-height: #{264rpx};
+	}
+
+	.info {
+		width: 100%;
+		border-radius: #{16rpx};
+		background-color: #fff7f7;
+		padding: #{32rpx} #{24rpx};
+
+		.nickname {
+			max-width: #{200rpx};
+			word-break: break-all;
+			text-overflow: ellipsis;
+			display: -webkit-box;
+			-webkit-box-orient: vertical;
+			-webkit-line-clamp: 1;
+			overflow: hidden;
+		}
+
+		.red {
+			color: #ff4544;
+		}
+
+		image {
+			width: #{64rpx};
+			height: #{64rpx};
+			margin-right: #{24rpx};
+		}
+
+
+		.item {
+			margin-bottom: #{32rpx};
+		}
+
+		.item:last-child {
+			margin-bottom: 0;
+		}
+	}
+
+	.circuit-value {
+		padding-top: #{20rpx};
+		background: #FFFFFF;
+		padding-bottom: #{30rpx};
+		width: 702upx;
+		border-radius: 0 0 15upx 15upx;
+		margin: 0 24upx;
+
+		.icon-circuit-i {
+			height: #{72rpx};
+			width: #{72rpx};
+		}
+
+		.name {
+			font-size: #{25rpx};
+			color: #999999;
+			margin-top: #{20rpx};
+		}
+
+		.icon-circuit-j {
+			margin-top: #{19rpx};
+			height: #{34rpx};
+			width: #{52rpx};
+		}
+
+		>view {
+			margin: 0 #{10rpx}
+		}
+	}
+
+	.activity-time {
+		padding-bottom: #{40rpx};
+		background: #FFFFFF;
+		padding-left: #{20rpx};
+		width: 702upx;
+		border-radius: 0 0 15upx 15upx;
+		margin: 0 24upx;
+
+		view {
+			padding-top: #{28rpx};
+			font-size: #{28rpx};
+			color: #666666;
+		}
+
+		view:before {
+			content: '●';
+			margin-right: #{20rpx};
+		}
+	}
+
+	.bargain-goods-bottom {
+		height: #{120rpx};
+		width: 100%;
+		background: #FFFFFF;
+
+		.btn {
+			font-size: #{32rpx};
+			height: #{80rpx};
+			line-height: #{80rpx};
+			text-align: center;
+			width: #{702rpx};
+			border-radius: #{40rpx};
+		}
+
+		.default-btn {
+			background: linear-gradient(#ff9292, #fc6969);
+		}
+
+		.btn.shop {
+			width: #{346rpx};
+		}
+
+		.btn.friend {
+			width: #{346rpx};
+			margin-left: #{12rpx};
+		}
+
+		.default-friend {
+			background: linear-gradient(#ffc46b, #ffa13c);
+			color: #ffffff;
+		}
+	}
+
+	.attr-box {
+		width: 702upx;
+		margin: 0 24upx 0 24upx;
+		border-radius: 0 0 15upx 15upx;
+		padding: #{0 24rpx};
+		background: #ffffff;
+
+		.attr {
+			padding: #{28rpx 0};
+			border-top: #{1rpx solid #eeeeee};
+
+			.left {
+				color: #666666;
+				margin-right: #{24rpx};
+				font-size: $uni-font-size-weak-one;
+
+				view {
+					border: #{1rpx solid #666666};
+					padding: #{8rpx 16px};
+					-webkit-border-radius: #{30rpx};
+					-moz-border-radius: #{30rpx};
+					border-radius: #{30rpx};
+				}
+			}
+
+			.right {
+				font-size: $uni-font-size-general-two;
+				margin-top: #{10rpx};
+
+				.attr-item {
+					margin-right: #{10rpx};
+				}
+			}
+		}
+	}
+
+	.text {
+		color: #ffffff;
+	}
+
+	.goods-margin {
+		margin-top: 20upx;
+	}
+
+	.u-bottom-fixed {
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		width: 100%;
+		z-index: 1602;
+		background-color: #ffffff;
+	}
+
+	.u-bottom-height {
+		height: 110upx;
+	}
+
+	.bd-detail {
+		width: 702upx;
+		background-color: #ffffff;
+		padding: 20upx;
+		margin: 0 24upx;
+		border-radius: 0 0 15upx 15upx;
+	}
 </style>

+ 1 - 0
plugins/bargain/order-list/order-list.vue

xqd
@@ -127,6 +127,7 @@
         },
         methods: {
             navGoods(v) {
+				console.log(v.goods_id)
                 uni.navigateTo({url: '/plugins/bargain/goods/goods?goods_id=' + v.goods_id});
             },
             goto(v) {

+ 391 - 390
plugins/step/goods/goods.vue

xqd
@@ -1,391 +1,392 @@
-<template>
-    <app-layout>
-        <view v-if="!goods" class="u-goods-detail"></view>
-        <template v-if="goods">
-            <app-goods-banner
-                :pic-list="goods.pic_url"
-                :share="goods.share"
-                :goods_id="goods.id"
-                :video-url="goods.video_url"
-            ></app-goods-banner>
-            <view class="bd-info">
-                <view class="goods-name u-line-2">{{goods.name}}</view>
-                <view v-if="goods.subtitle" class="goods-subtitle">
-                    <view class="t-omit-three">{{goods.subtitle}}</view>
-                </view>
-                <view class='price main-between' :style="{'color': getTheme.color}">
-                    <view class="dir-left-nowrap cross-bottom">
-                        <image class="detail-price" src='./../image/detail-price.png'></image>
-                        <view class="cross-bottom">{{goods.min_currency}}</view>
-                        <view class="goods-currency" v-if="goods.max_currency > goods.min_currency">起</view>
-                        <view>+</view>
-                        <view style="font-size: 14px">¥</view>
-                        <view>{{goods.min_price}}</view>
-                        <view class="goods-currency" v-if="goods.max_price > goods.min_price">起</view>
-                    </view>
-                    <view @click="shareClick"
-                          :style="{'background-color': getTheme.background}"
-                          class="share dir-left-nowrap main-center cross-center">
-                        <image class="share-image box-grow-0" src="/static/image/icon/icon-share-white.png"></image>
-                        <view class="share-text box-grow-0">分享</view>
-                    </view>
-                </view>
-                <app-share-qr-code :url="shareUrl"
-                                   :has-poster-nav="true"
-                                   :poster-config="poster_config + `&goods_id=` + goods.id"
-                                   :poster-generate="poster_generate + `&goods_id=` + goods.id"
-                                   v-model="shareShow"
-                                   :goods="goods"
-                                   @share="hShareAppMessage"
-                ></app-share-qr-code>
-				<view style="background-color: #FFFFFF;padding: 24upx; 0 0 24upx">
-					<bd-info-extra :goods="goods" :theme="getTheme" :unit="goods.unit" :min-number="goods.min_number" :limit-buy="goods.limit_buy"></bd-info-extra>
-				</view>
-            </view>
-            <bd-coupon  @change="setCoupon" :theme="getTheme" :coupons="goods.goods_coupon_center"></bd-coupon>
-            <bd-xbc
-                :coAttr="is_open"
-                :attr-list="selectAttr.attr_list"
-                :type="goods.type"
-                :guarantee-title="goods.guarantee_title"
-                :guarantee-pic="goods.guarantee_pic"
-                :param_content="goods.param_content"
-                :param_name="goods.param_name"
-                :services="goods.services"
-                :attr-groups="goods.attr_groups"
-                :goods-stock="goods.goods_stock"
-                @openAttr="clickAttr"
-            ></bd-xbc>
-            <bd-hc
-                :integral="goods.goods_marketing_award.integral"
-                :coupon="goods.goods_marketing_award.coupon"
-                :card="goods.goods_marketing_award.card"
-                :balance="goods.goods_marketing_award.balance"
-                :theme="getTheme"
-            ></bd-hc>
-            <bd-kb
-                :limit="goods.goods_marketing.limit"
-                :express="goods.express"
-                :shipping="goods.goods_marketing.shipping"
-                :pickup="goods.goods_marketing.pickup"
-            ></bd-kb>
-            <bd-detail :detail="goods.detail"></bd-detail>
-            <!--空格区域-->
-            <view class="safe-area-inset-bottom u-bottom">
-                <view class="u-bottom-height"></view>
-            </view>
-            <!--底部按钮-->
-            <view v-if="is_open == 1" class="safe-area-inset-bottom u-bottom-fixed">
-                <view class="bd-bottom dir-left-nowrap cross-center">
-                    <view class="bd-back dir-top-nowrap main-center cross-center box-grow-0" @click="back">
-                        <image class="bd-icon" src="/static/image/icon/index.png"></image>
-                        <text class="bd-text">首页</text>
-                    </view>
-                    <bd-service :name="goods.name" :url="webUrl"></bd-service>
-                    <view v-if="goods.goods_stock === 0" class="box-grow-1 bd-btn bd-oversell-btn bd-btn-color" >
-                        已售罄
-                    </view>
-                    <view
-                        v-else
-                        @click="clickAttr"
-                        :style="{'background': goods.buy_goods_auth ? getTheme.background_gradient_btn : '#999999','color': goods.buy_goods_auth ? getTheme.main_text : ''}"
-                        class="bd-btn box-grow-1 bd-btn-color">
-                        立即兑换
-                    </view>
-                </view>
-            </view>
-            <u-attr
-                :goods="goods"
-                v-model="attrShow"
-                :theme="getTheme"
-                :checked="selectAttr"
-                :is_show_left="false"
-                rightText="立即兑换"
-                @check="onAttr"
-                :rightFunc="true"
-                @rightFunc="rightFunc"
-            >
-                <view slot="priceBefore" v-if="selectAttr">
-                    {{selectAttr.extra.value}}{{selectAttr.extra.name}} +
-                </view>
-            </u-attr>
-        </template>
-        <app-close v-if="showClose" :modal="false" @update="getMall"></app-close>
-    </app-layout>
-</template>
-
-<script>
-    import {mapGetters, mapState} from "vuex";
-    import appGoodsBanner from "../../../components/page-component/goods/app-goods-banner.vue";
-    import appShareQrCode from '../../../components/page-component/app-share-qr-code-poster/app-share-qr-code-poster.vue';
-    import uAttr from '../../../components/page-component/goods/u-attr.vue';
-    import bdCoupon from '@/components/page-component/goods/bd-coupon.vue';
-    import bdXbc from '@/components/page-component/goods/bd-xbc.vue';
-    import bdDetail from '@/components/page-component/goods/bd-detail.vue';
-    import bdKb from '@/components/page-component/goods/bd-kb.vue';
-    import bdHc from '@/components/page-component/goods/bd-hc.vue';
-    import appClose from '@/components/basic-component/app-close/app-close.vue';
-    import bdService from '@/components/page-component/goods/bd-service.vue';
-	import bdInfoExtra from '@/components/page-component/goods/bd-info-extra.vue';
-
-    export default {
-        name: "goods",
-        components: {
-            appGoodsBanner,
-            appShareQrCode,
-            uAttr,
-            bdCoupon,
-            bdXbc,
-            bdDetail,
-            bdHc,
-            bdKb,
-            appClose,
-            bdService,
-			bdInfoExtra
-        },
-        data() {
-            return {
-                showClose: false,
-                is_open: 0,
-                goods: {
-                    id: '',
-                    name: '',
-                    cover_pic: '',
-                    price: '',
-                },
-                webUrl: '',
-                selectAttr: null,
-                shareShow: false,
-                shareUrl: null,
-                attrShow: false,
-                poster_config: this.$api.step.poster_config,
-                poster_generate: this.$api.step.poster_generate,
-				disable: 'disable'
-            };
-        },
-        computed: {
-            ...mapState({
-                mall: state => state.mallConfig.mall,
-            }),
-            ...mapGetters('mallConfig', {
-                getTheme: 'getTheme',
-            })
-        },
-        onShow() {
-            this.showClose = false;
-            setTimeout(()=>{
-                this.showClose = true;
-            })
-        },
-        onLoad(options) { this.$commonLoad.onload(options);
-            this.webUrl = '/plugins/step/goods/goods?goods_id=' + options.goods_id;
-            // #ifdef MP-WEIXIN
-            wx.showShareMenu({
-              menus: ['shareAppMessage', 'shareTimeline']
-            })
-            // #endif
-            this.loadData(options.goods_id);
-        },
-        // #ifdef MP-WEIXIN
-        onShareTimeline() {
-            let { app_share_title, name, app_share_pic, cover_pic, id, pic_url } = this.goods;
-            return this.$shareTimeline({
-                title: app_share_title ? app_share_title: name,
-                imageUrl: pic_url[0].pic_url,
-                query: {
-                    goods_id: id
-                }
-            });
-        },
-        // #endif
-        // #ifdef MP
-        onShareAppMessage() {
-            return this.hShareAppMessage();
-        },
-        // #endif
-        methods: {
-            hShareAppMessage(s = false){
-                let { app_share_title, name, app_share_pic, cover_pic, id , subtitle} = this.goods;
-                return this.$shareAppMessage({
-                    title: app_share_title ? app_share_title: name,
-                    imageUrl: app_share_pic ? app_share_pic: cover_pic,
-                    path: "/plugins/step/goods/goods",
-                    desc: subtitle,
-                    params: {
-                        goods_id: id
-                    }
-                }, s);
-            },
-            getMall(e) {
-                this.is_open = e.is_open;
-            },
-            loadData(id) {
-                this.$showLoading();
-                this.$request({
-                    url: this.$api.step.goods_detail,
-                    data: {
-                        id: id
-                    }
-                }).then(response => {
-                    this.$hideLoading();
-                    if (response.code === 0) {
-                        this.goods = response.data.detail;
-                        this.shareUrl = this.$api.step.goods_poster + '&goods_id=' + id;
-                        this.goods.id = id;
-                        // #ifdef H5
-                        this.hShareAppMessage();
-                        // #endif
-                    } else {
-                        uni.showToast({
-                            title: response.msg,
-                            icon: 'none'
-                        });
-                    }
-                }).catch(() => {
-                    this.$hideLoading();
-                });
-            },
-            onAttr({item}) {
-                this.selectAttr = item;
-            },
-            shareClick() {
-                this.shareShow = true;
-            },
-            back() {
-                uni.redirectTo({
-                    url: '/pages/index/index'
-                });
-            },
-            clickAttr() {
-				if (!this.goods.buy_goods_auth) {
-                    this.$tips.showToast({
-                        title: '您暂无权限购买该商品',
-                        icon: 'none'
-                    });
-                    return;
-				}
-                this.attrShow = true;
-            },
-            setCoupon(index) {
-                this.$set(this.goods.goods_coupon_center[index], 'is_receive', 1);
-            },
-            rightFunc(data) {
-                uni.navigateTo({
-                    url: `/pages/order-submit/order-submit?mch_list=${JSON.stringify([data])}&preview_url=${encodeURIComponent(this.$api.step.order_preview)}&submit_url=${encodeURIComponent(this.$api.step.order_submit)}`
-                });
-            }
-        }
-    }
-</script>
-
-<style scoped lang="scss">
-    .goods-currency {
-        font-size: #{22rpx};
-        padding-bottom:#{2rpx};
-    }
-
-    .goods-currency+view {
-        font-size: #{32rpx};
-        padding: 0 #{5rpx};
-    }
-
-    .goods-name {
-        padding: 24upx 24upx 0 24upx;
-        background-color: #ffffff;
-        color: $uni-important-color-black;
-    }
-
-    .goods-subtitle {
-        padding: #{24rpx};
-        padding-bottom: #{30rpx};
-        font-size: 24rpx;
-        background-color: #ffffff;
-        color: #999999;
-    }
-    .bd-bottom {
-        width: 750upx;
-        height: 110upx;
-        padding: 20upx 24upx;
-    }
-    .bd-back {
-        width: 66upx;
-        height: 100%;
-        margin-right: 20upx;
-    }
-    .bd-icon {
-        width: 30upx;
-        height: 30upx;
-        margin-bottom: 8upx;
-    }
-    .bd-text {
-        font-size: 20upx;
-        color: #888888;
-        line-height: 1;
-    }
-    .bd-btn {
-        text-align: center;
-        line-height: 70upx;
-        font-size: 28upx;
-        border-radius: 35upx;
-    }
-    .bd-btn-color {
-        color: #ffffff;
-    }
-    .bd-oversell-btn {
-        background-color: #CDCDCD;
-    }
-    .price {
-        height: #{106rpx};
-        font-size: #{40rpx};
-        font-family: DIN;
-        padding-left: #{24rpx};
-        padding-bottom: #{24rpx};
-        background-color: #fff;
-        position: relative;
-    }
-
-    .price .detail-price {
-        height: #{44rpx};
-        width: #{44rpx};
-        display: block;
-        float: left;
-        margin-right: #{16rpx};
-    }
-
-    .share {
-        margin-top: #{10rpx};
-        height: #{48rpx};
-        border-radius: #{40rpx} 0 0 #{40rpx};
-        padding: 0 #{14rpx};
-        width: #{103rpx};
-
-        .share-image {
-            width: #{22rpx};
-            height: #{22rpx};
-        }
-        .share-text {
-            font-size: #{22rpx};
-            color: #ffffff;
-            margin-left: #{10rpx};
-        }
-    }
-
-    .u-bottom-fixed {
-        position: fixed;
-        bottom: 0;
-        left: 0;
-        width: 100%;
-        z-index: 1500;
-        background-color: #ffffff;
-    }
-    .u-bottom-height {
-        height: 110upx;
-    }
-
-    .bd-info {
-        width: 702upx;
-        border-radius: 15upx;
-        overflow: hidden;
-        margin: 24upx 24upx 0 24upx;
-    }
+<template>
+	<app-layout>
+		<view v-if="!goods" class="u-goods-detail"></view>
+		<template v-if="goods">
+			<app-goods-banner :pic-list="goods.pic_url" :share="goods.share" :goods_id="goods.id"
+				:video-url="goods.video_url"></app-goods-banner>
+			<view class="bd-info">
+				<view class="goods-name u-line-2">{{goods.name}}</view>
+				<view v-if="goods.subtitle" class="goods-subtitle">
+					<view class="t-omit-three">{{goods.subtitle}}</view>
+				</view>
+				<view class='price main-between' :style="{'color': getTheme.color}">
+					<view class="dir-left-nowrap cross-bottom">
+						<image class="detail-price" src='./../image/detail-price.png'></image>
+						<view class="cross-bottom">{{goods.min_currency}}</view>
+						<view class="goods-currency" v-if="goods.max_currency > goods.min_currency">起</view>
+						<view>+</view>
+						<view style="font-size: 14px">¥</view>
+						<view>{{goods.min_price}}</view>
+						<view class="goods-currency" v-if="goods.max_price > goods.min_price">起</view>
+					</view>
+					<view @click="shareClick" :style="{'background-color': getTheme.background}"
+						class="share dir-left-nowrap main-center cross-center">
+						<image class="share-image box-grow-0" src="/static/image/icon/icon-share-white.png"></image>
+						<view class="share-text box-grow-0">分享</view>
+					</view>
+				</view>
+				<app-share-qr-code :url="shareUrl" :has-poster-nav="true"
+					:poster-config="poster_config + `&goods_id=` + goods.id"
+					:poster-generate="poster_generate + `&goods_id=` + goods.id" v-model="shareShow" :goods="goods"
+					@share="hShareAppMessage"></app-share-qr-code>
+				<view style="background-color: #FFFFFF;padding: 24upx; 0 0 24upx">
+					<bd-info-extra :goods="goods" :theme="getTheme" :unit="goods.unit" :min-number="goods.min_number"
+						:limit-buy="goods.limit_buy"></bd-info-extra>
+				</view>
+			</view>
+			<bd-coupon @change="setCoupon" :theme="getTheme" :coupons="goods.goods_coupon_center"></bd-coupon>
+			<bd-xbc :coAttr="is_open" :attr-list="selectAttr.attr_list" :type="goods.type"
+				:guarantee-title="goods.guarantee_title" :guarantee-pic="goods.guarantee_pic"
+				:param_content="goods.param_content" :param_name="goods.param_name" :services="goods.services"
+				:attr-groups="goods.attr_groups" :goods-stock="goods.goods_stock" @openAttr="clickAttr"></bd-xbc>
+			<bd-hc :integral="goods.goods_marketing_award.integral" :coupon="goods.goods_marketing_award.coupon"
+				:card="goods.goods_marketing_award.card" :balance="goods.goods_marketing_award.balance"
+				:theme="getTheme"></bd-hc>
+			<bd-kb :limit="goods.goods_marketing.limit" :express="goods.express"
+				:shipping="goods.goods_marketing.shipping" :pickup="goods.goods_marketing.pickup"></bd-kb>
+			<bd-detail :detail="goods.detail"></bd-detail>
+			<!--空格区域-->
+			<view class="safe-area-inset-bottom u-bottom">
+				<view class="u-bottom-height"></view>
+			</view>
+			<!--底部按钮-->
+			<view v-if="is_open == 1" class="safe-area-inset-bottom u-bottom-fixed">
+				<view class="bd-bottom dir-left-nowrap cross-center">
+					<view class="bd-back dir-top-nowrap main-center cross-center box-grow-0" @click="back">
+						<image class="bd-icon" src="/static/image/icon/index.png"></image>
+						<text class="bd-text">首页</text>
+					</view>
+					<bd-service :name="goods.name" :url="webUrl"></bd-service>
+					<view v-if="goods.goods_stock === 0" class="box-grow-1 bd-btn bd-oversell-btn bd-btn-color">
+						已售罄
+					</view>
+					<view v-else @click="clickAttr"
+						:style="{'background': goods.buy_goods_auth ? 'red' : '#999999','color': goods.buy_goods_auth ? getTheme.main_text : ''}"
+						class="bd-btn box-grow-1 bd-btn-color">
+						立即兑换
+					</view>
+				</view>
+			</view>
+			<u-attr :goods="goods" v-model="attrShow" :theme-object="themeinfo" :checked="selectAttr"
+				:is_show_left="false" rightText="立即兑换" @check="onAttr" :rightFunc="true" @rightFunc="rightFunc">
+				<view slot="priceBefore" v-if="selectAttr">
+					{{selectAttr.extra.value}}{{selectAttr.extra.name}} +
+				</view>
+			</u-attr>
+		</template>
+		<app-close v-if="showClose" :modal="false" @update="getMall"></app-close>
+	</app-layout>
+</template>
+
+<script>
+	import {
+		mapGetters,
+		mapState
+	} from "vuex";
+	import appGoodsBanner from "../../../components/page-component/goods/app-goods-banner.vue";
+	import appShareQrCode from '../../../components/page-component/app-share-qr-code-poster/app-share-qr-code-poster.vue';
+	import uAttr from '../../../components/page-component/goods/u-attr.vue';
+	import bdCoupon from '@/components/page-component/goods/bd-coupon.vue';
+	import bdXbc from '@/components/page-component/goods/bd-xbc.vue';
+	import bdDetail from '@/components/page-component/goods/bd-detail.vue';
+	import bdKb from '@/components/page-component/goods/bd-kb.vue';
+	import bdHc from '@/components/page-component/goods/bd-hc.vue';
+	import appClose from '@/components/basic-component/app-close/app-close.vue';
+	import bdService from '@/components/page-component/goods/bd-service.vue';
+	import bdInfoExtra from '@/components/page-component/goods/bd-info-extra.vue';
+
+	export default {
+		name: "goods",
+		components: {
+			appGoodsBanner,
+			appShareQrCode,
+			uAttr,
+			bdCoupon,
+			bdXbc,
+			bdDetail,
+			bdHc,
+			bdKb,
+			appClose,
+			bdService,
+			bdInfoExtra
+		},
+		data() {
+			return {
+				showClose: false,
+				is_open: 0,
+				goods: {
+					id: '',
+					name: '',
+					cover_pic: '',
+					price: '',
+				},
+				webUrl: '',
+				selectAttr: null,
+				shareShow: false,
+				shareUrl: null,
+				attrShow: false,
+				poster_config: this.$api.step.poster_config,
+				poster_generate: this.$api.step.poster_generate,
+				disable: 'disable',
+				themeinfo: {
+					back: "f-m-back f",
+					backO: "f-m-back-o f",
+					backP: "f-m-back-p f",
+					border: "f-m-border f",
+					color: "f-m-text f",
+					sBack: "f-s-back f",
+					theme: "f"
+				}
+			};
+		},
+		computed: {
+			...mapState({
+				mall: state => state.mallConfig.mall,
+			}),
+			...mapGetters('mallConfig', {
+				getTheme: 'getTheme',
+			})
+		},
+		onShow() {
+			this.showClose = false;
+			setTimeout(() => {
+				this.showClose = true;
+			})
+		},
+		onLoad(options) {
+			this.$commonLoad.onload(options);
+			this.webUrl = '/plugins/step/goods/goods?goods_id=' + options.goods_id;
+			// #ifdef MP-WEIXIN
+			wx.showShareMenu({
+				menus: ['shareAppMessage', 'shareTimeline']
+			})
+			// #endif
+			this.loadData(options.goods_id);
+		},
+		// #ifdef MP-WEIXIN
+		onShareTimeline() {
+			let {
+				app_share_title,
+				name,
+				app_share_pic,
+				cover_pic,
+				id,
+				pic_url
+			} = this.goods;
+			return this.$shareTimeline({
+				title: app_share_title ? app_share_title : name,
+				imageUrl: pic_url[0].pic_url,
+				query: {
+					goods_id: id
+				}
+			});
+		},
+		// #endif
+		// #ifdef MP
+		onShareAppMessage() {
+			return this.hShareAppMessage();
+		},
+		// #endif
+		methods: {
+			hShareAppMessage(s = false) {
+				let {
+					app_share_title,
+					name,
+					app_share_pic,
+					cover_pic,
+					id,
+					subtitle
+				} = this.goods;
+				return this.$shareAppMessage({
+					title: app_share_title ? app_share_title : name,
+					imageUrl: app_share_pic ? app_share_pic : cover_pic,
+					path: "/plugins/step/goods/goods",
+					desc: subtitle,
+					params: {
+						goods_id: id
+					}
+				}, s);
+			},
+			getMall(e) {
+				this.is_open = e.is_open;
+			},
+			loadData(id) {
+				this.$showLoading();
+				this.$request({
+					url: this.$api.step.goods_detail,
+					data: {
+						id: id
+					}
+				}).then(response => {
+					this.$hideLoading();
+					if (response.code === 0) {
+						this.goods = response.data.detail;
+						this.shareUrl = this.$api.step.goods_poster + '&goods_id=' + id;
+						this.goods.id = id;
+						// #ifdef H5
+						this.hShareAppMessage();
+						// #endif
+					} else {
+						uni.showToast({
+							title: response.msg,
+							icon: 'none'
+						});
+					}
+				}).catch(() => {
+					this.$hideLoading();
+				});
+			},
+			onAttr(item) {
+				this.selectAttr = item;
+			},
+			shareClick() {
+				this.shareShow = true;
+			},
+			back() {
+				uni.redirectTo({
+					url: '/pages/index/index'
+				});
+			},
+			clickAttr() {
+				if (!this.goods.buy_goods_auth) {
+					uni.showToast({
+						title: '您暂无权限购买该商品',
+						icon: 'none'
+					})
+					return;
+				}
+				this.attrShow = true;
+			},
+			setCoupon(index) {
+				this.$set(this.goods.goods_coupon_center[index], 'is_receive', 1);
+			},
+			rightFunc(data) {
+				uni.navigateTo({
+					url: `/pages/order-submit/order-submit?mch_list=${JSON.stringify([data])}&preview_url=${encodeURIComponent(this.$api.step.order_preview)}&submit_url=${encodeURIComponent(this.$api.step.order_submit)}`
+				});
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.goods-currency {
+		font-size: #{22rpx};
+		padding-bottom:#{2rpx};
+	}
+
+	.goods-currency+view {
+		font-size: #{32rpx};
+		padding: 0 #{5rpx};
+	}
+
+	.goods-name {
+		padding: 24upx 24upx 0 24upx;
+		background-color: #ffffff;
+		color: $uni-important-color-black;
+	}
+
+	.goods-subtitle {
+		padding: #{24rpx};
+		padding-bottom: #{30rpx};
+		font-size: 24rpx;
+		background-color: #ffffff;
+		color: #999999;
+	}
+
+	.bd-bottom {
+		width: 750upx;
+		height: 110upx;
+		padding: 20upx 24upx;
+	}
+
+	.bd-back {
+		width: 66upx;
+		height: 100%;
+		margin-right: 20upx;
+	}
+
+	.bd-icon {
+		width: 30upx;
+		height: 30upx;
+		margin-bottom: 8upx;
+	}
+
+	.bd-text {
+		font-size: 20upx;
+		color: #888888;
+		line-height: 1;
+	}
+
+	.bd-btn {
+		text-align: center;
+		line-height: 70upx;
+		font-size: 28upx;
+		border-radius: 35upx;
+	}
+
+	.bd-btn-color {
+		color: #ffffff;
+	}
+
+	.bd-oversell-btn {
+		background-color: #CDCDCD;
+	}
+
+	.price {
+		height: #{106rpx};
+		font-size: #{40rpx};
+		font-family: DIN;
+		padding-left: #{24rpx};
+		padding-bottom: #{24rpx};
+		background-color: #fff;
+		position: relative;
+	}
+
+	.price .detail-price {
+		height: #{44rpx};
+		width: #{44rpx};
+		display: block;
+		float: left;
+		margin-right: #{16rpx};
+	}
+
+	.share {
+		margin-top: #{10rpx};
+		height: #{48rpx};
+		border-radius: #{40rpx} 0 0 #{40rpx};
+		padding: 0 #{14rpx};
+		width: #{103rpx};
+
+		.share-image {
+			width: #{22rpx};
+			height: #{22rpx};
+		}
+
+		.share-text {
+			font-size: #{22rpx};
+			color: #ffffff;
+			margin-left: #{10rpx};
+		}
+	}
+
+	.u-bottom-fixed {
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		width: 100%;
+		z-index: 1500;
+		background-color: #ffffff;
+	}
+
+	.u-bottom-height {
+		height: 110upx;
+	}
+
+	.bd-info {
+		width: 702upx;
+		border-radius: 15upx;
+		overflow: hidden;
+		margin: 24upx 24upx 0 24upx;
+	}
 </style>

+ 1 - 1
plugins/step/index/index.vue

xqd
@@ -163,7 +163,7 @@
                         <view>¥{{good.original_price}}</view>
                         <view>仅剩{{good.count_stock}}件</view>
                     </view>
-                    <button v-if="good.count_stock > 0" :style="{'background': good.buy_goods_auth ? getTheme.background_gradient_btn : '#999999','color': good.buy_goods_auth ? getTheme.main_text : ''}" class="good-exchange">立即兑换</button>
+                    <button v-if="good.count_stock > 0" :style="{'background': good.buy_goods_auth ? 'red' : '#999999','color': good.buy_goods_auth ? getTheme.main_text : ''}" class="good-exchange">立即兑换</button>
                     <button v-else class="good-exchange" style="background: #CDCDCD;color: #fff;">已售罄</button>
                 </view>
             </view>