<template>
<view class="container order-detail">
	<block v-if="isload">
		<view class="order-detail__hd" :style="detail.refund_status > 0 ? 'background:url(' + pre_url + '/static/img/static/icon/order-errbg.png);background-size:100%' : 'background:url(' + pre_url + '/static/img/static/icon/order-bg.png);background-size:100%'">
			<view class="order-detail__hd-title" v-if="detail.status==1">{{detail.paytype=='货到付款' ? '已选择'+codtxt : '已成功付款'}}</view>
			<view class="order-detail__hd-title" v-if="detail.status==0||detail.status==2||detail.status==3||detail.status==4">{{detail.status==0?'等待买家付款':(detail.status==2?'订单已发货':(detail.status==3?'订单已完成':(detail.status==4?'订单已取消':'')))}}</view>

			<view class="order-detail__hd-subtitle" v-if="detail.status==0||detail.status==1">{{detail.status==0 ? (djs?'剩余时间：'+djs : (detail.paytypeid == 5?'转账汇款后请上传付款凭证':'')) : (detail.status==1?(detail.freight_type==1?'请尽快前往自提地点取货':'我们会尽快为您发货'):'')}}</view>
			<view class="order-detail__hd-subtitle" v-if="detail.status==2 && detail.freight_type!=3" user-select="true" selectable="true">发货信息：{{detail.express_com}} {{detail.express_no}}</view>
			
			<block v-if="detail.refund_status">
				<view class="order-detail__hd-title">{{detail.refund_status===1?'订单已取消':(detail.refund_status===2?'已退款':(detail.refund_status===3?'已驳回':''))}}</view>
			</block>
		</view>
		<view class="order-detail__bd">
			<view class="order-detail__userinfo common-module">
				<view class="order-detail__userinfo-top flex al-item-center" user-select="true" selectable="true">
					<view class="order-detail__userinfo-name">{{detail.linkman}}</view>
					<view class="order-detail__userinfo-tel">{{detail.tel}}</view>
				</view>
				<view class="order-detail__userinfo-bot flex">
					<view class="icon-box flex al-item-center j-center">
						<text class="iconfont icon-icon-location"></text>
					</view>
					<view class="order-detail__userinfo-address" v-if="detail.freight_type!=1 && detail.freight_type!=3" user-select="true" selectable="true">{{detail.area}}{{detail.address}}</view>
					<view class="order-detail__userinfo-address" v-if="detail.freight_type==1" @tap="openMendian" :data-storeinfo="storeinfo" user-select="true" selectable="true">取货地点：{{storeinfo.name}} - {{storeinfo.address}}</view>
				</view>
			</view>
			<view class="order-detail__list common-module">
				<view class="order-detail__shop flex al-item-center"  v-if="detail.bid>0" @tap="goto" :data-url="'/pagesA/shop/index?id=' + detail.bid">
					<image class="order-detail__shop-logo" :src="detail.binfo.logo"></image>
					<view class="order-detail__shop-name" decode="true" space="true">{{detail.binfo.name}}</view>
				</view>
				<view class="product-item" v-for="(item, idx) in prolist" :key="idx">
					<view class="product-item__con flex">
						<view class="product-item__hd" @tap="goto" :data-url="'/pages/shop/product?id=' + item.proid">
							<image class="product-item__img" :src="item.pic"></image>
						</view>
						<view class="product-item__bd">
							<view class="product-item__info flex">
								<view class="product-item__name">{{item.name}}</view>
								<view class="product-item__price">￥{{item.sell_price}}</view>
							</view>
							<view class="product-item__size">规格：{{item.ggname}}</view>
							<view class="product-item__num">数量：×{{item.num}}</view>
						</view>
					</view>
					<view class="product-item__ft flex">
						<view class="product-item__ft-btn" @tap.stop="shopCar(item)">加入购物车</view>
						<view class="product-item__ft-btn" v-if="detail.status==3 && item.iscomment==0 && shopset.comment==1" @tap.stop="goto" :data-url="'comment?ogid=' + item.id">去评价</view>
						<view class="product-item__ft-btn" v-if="detail.status==3 && item.iscomment==1" @tap.stop="goto" :data-url="'comment?ogid=' + item.id">查看评价</view>
					</view>
				</view>
			</view>
			<view class="order-detail__form common-module" v-if="(detail.status==3 || detail.status==2) && (detail.freight_type==3 || detail.freight_type==4)">
				<view class="form-item flex">
					<text class="form-item__hd">发货信息</text>
					<text class="form-item__bd" user-select="true" selectable="true">{{detail.freight_content}}</text>
				</view>
			</view>
			
			<view class="order-detail__form common-module">
				<view class="form-item flex">
					<text class="form-item__hd">订单编号</text>
					<text class="form-item__bd" user-select="true" selectable="true">{{detail.ordernum}}</text>
				</view>
				<view class="form-item flex">
					<text class="form-item__hd">下单时间</text>
					<text class="form-item__bd">{{detail.createtime}}</text>
				</view>
				<view class="form-item flex" v-if="detail.status>0 && detail.paytypeid!='4' && detail.paytime">
					<text class="form-item__hd">支付时间</text>
					<text class="form-item__bd">{{detail.paytime}}</text>
				</view>
				<view class="form-item flex" v-if="detail.paytypeid">
					<text class="form-item__hd">支付方式</text>
					<text class="form-item__bd">{{detail.paytypeid == '4' ? codtxt : detail.paytype}}</text>
				</view>
				<block v-if="detail.paytypeid == '5'">
					<view class="form-item flex" v-if="pay_transfer_info.pay_transfer_account_name">
						<text class="form-item__hd">户名</text>
						<text class="form-item__bd">{{pay_transfer_info.pay_transfer_account_name}}</text>
					</view>
					<view class="form-item flex" v-if="pay_transfer_info.pay_transfer_account">
						<text class="form-item__hd">账户</text>
						<text class="form-item__bd">{{pay_transfer_info.pay_transfer_account}}</text>
					</view>
					<view class="form-item flex" v-if="pay_transfer_info.pay_transfer_bank">
						<text class="form-item__hd">开户行</text>
						<text class="form-item__bd">{{pay_transfer_info.pay_transfer_bank}}</text>
					</view>
					<view class="form-item flex" v-if="pay_transfer_info.pay_transfer_desc">
						<text class="form-item__bd dark sub">{{pay_transfer_info.pay_transfer_desc}}</text>
					</view>
					<view class="form-item flex">
						<text class="form-item__hd">付款凭证审核</text>
						<text class="form-item__bd">{{payorder.check_status_label}}</text>
					</view>
					<view class="form-item flex" v-if="payorder.check_remark">
						<text class="form-item__hd">审核备注</text>
						<text class="form-item__bd">{{payorder.check_remark}}</text>
					</view>
				</block>
				<view class="form-item flex" v-if="detail.status>1 && detail.send_time">
					<text class="form-item__hd">发货时间</text>
					<text class="form-item__bd">{{detail.send_time}}</text>
				</view>
				<view class="form-item flex" v-if="detail.status==3 && detail.collect_time">
					<text class="form-item__hd">收货时间</text>
					<text class="form-item__bd">{{detail.collect_time}}</text>
				</view>
			</view>
			<view class="order-detail__form common-module">
				<view class="form-item flex">
					<text class="form-item__hd">商品金额</text>
					<text class="form-item__bd">¥{{detail.product_price}}</text>
				</view>
				<view class="form-item flex" v-if="detail.disprice > 0">
					<text class="form-item__hd">{{t('会员')}}折扣</text>
					<text class="form-item__bd light"><text class="sub">减</text>¥{{detail.leveldk_money}}</text>
				</view>
				<view class="form-item flex" v-if="detail.manjian_money > 0">
					<text class="form-item__hd">满减活动</text>
					<text class="form-item__bd light"><text class="sub">减</text>¥{{detail.manjian_money}}</text>
				</view>
				<view class="form-item flex">
					<text class="form-item__hd">配送方式</text>
					<text class="form-item__bd dark">{{detail.freight_text}}</text>
				</view>
				<view class="form-item flex" v-if="detail.freight_type==1 && detail.freightprice > 0">
					<text class="form-item__hd">服务费</text>
					<text class="form-item__bd light"><text class="sub">加</text>¥{{detail.freight_price}}</text>
				</view>
				<view class="form-item flex" v-if="detail.freight_time">
					<text class="form-item__hd">{{detail.freight_type!=1?'配送':'提货'}}时间</text>
					<text class="form-item__bd">{{detail.freight_time}}</text>
				</view>
				<view class="form-item flex" v-if="detail.coupon_money > 0">
					<text class="form-item__hd">{{t('优惠券')}}抵扣</text>
					<text class="form-item__bd light"><text class="sub">减</text>¥{{detail.coupon_money}}</text>
				</view>
				
				<view class="form-item flex" v-if="detail.scoredk > 0">
					<text class="form-item__hd">{{t('积分')}}抵扣</text>
					<text class="form-item__bd light"><text class="sub">减</text>¥{{detail.scoredk_money}}</text>
				</view>
				<view class="form-item flex">
					<text class="form-item__hd">实付款</text>
					<text class="form-item__bd">¥{{detail.totalprice}}</text>
				</view>

				<view class="form-item flex">
					<text class="form-item__hd">订单状态</text>
					<text class="form-item__bd" v-if="detail.status">{{detail.status==0?'未付款':(detail.status==1?'已付款':(detail.status==2?'已发货':(detail.status==3?'已收货':(detail.status==4?'已关闭':''))))}}</text>
					<text v-if="detail.refundCount" style="margin-left: 8rpx;">有退款({{detail.refundCount}})</text>
				</view>
				<view class="form-item flex" v-if="detail.refundingMoneyTotal>0">
					<text class="form-item__hd">退款中</text>
					<text class="form-item__bd light arrow-right" @tap="goto" :data-url="'refundlist?orderid='+ detail.id">¥{{detail.refundingMoneyTotal}}</text>
				</view>
				<view class="form-item flex" v-if="detail.refundedMoneyTotal>0">
					<text class="form-item__hd">已退款</text>
					<text class="form-item__bd light arrow-right" @tap="goto" :data-url="'refundlist?orderid='+ detail.id">¥{{detail.refundedMoneyTotal}}</text>
				</view>
				<view class="form-item flex" v-if="detail.refund_status>0">
					<text class="form-item__hd">退款状态</text>
					<text class="form-item__bd light" v-if="detail.refund_status==1">审核中</text>
					<text class="form-item__bd light" v-if="detail.refund_status==2">已退款</text>
					<text class="form-item__bd light" v-if="detail.refund_status==3">已驳回</text>
				</view>
				
				<view class="form-item flex" v-if="detail.balance_price>0">
					<text class="form-item__hd">尾款</text>
					<text class="form-item__bd light">¥{{detail.balance_price}}</text>
				</view>
				<view class="form-item flex" v-if="detail.balance_price>0">
					<text class="form-item__hd">尾款状态</text>
					<text class="form-item__bd" v-if="detail.balance_pay_status==1">已支付</text>
					<text class="form-item__bd" v-if="detail.balance_pay_status==0">未支付</text>
				</view>
			</view>
			<view class="order-detail__form common-module" v-if="detail.checkmemid">
				<view class="form-item flex">
					<text class="form-item__hd">所选会员</text>
					<view class="form-item__bd flex al-item-center">
						<image class="form-item__bd-headimg" :src="detail.checkmember.headimg"></image>
						<text class="form-item__bd-nickname">{{detail.checkmember.nickname}}</text>
					</view>
				</view>
			</view>
			<view class="order-detail__form common-module" v-if="(detail.formdata).length > 0">
				<view class="form-item flex" v-for="(item,index) in detail.formdata" :key="index">
					<text class="form-item__hd">{{item[0]}}</text>
					<view class="form-item__bd" v-if="item[2]=='upload'"><image :src="item[1]" style="width:400rpx;height:auto" mode="widthFix" @tap="previewImage" :data-url="item[1]"/></view>
					<text class="form-item__bd" v-else user-select="true" selectable="true">{{item[1]}}</text>
				</view>
			</view>
			<view class="order-detail__form common-module" v-if="detail.freight_type==11">
				<view class="form-item flex">
					<text class="form-item__hd">发货地址</text>
					<text class="form-item__bd">¥{{detail.freight_content.send_address}} - {{detail.freight_content.send_tel}}</text>
				</view>
				<view class="form-item flex">
					<text class="form-item__hd">收货地址</text>
					<text class="form-item__bd">¥{{detail.freight_content.receive_address}} - {{detail.freight_content.receive_tel}}</text>
				</view>
			</view>
		</view>
		<view class="order-detail__ft flex">
			<block v-if="detail.payaftertourl && detail.payafterbtntext">
				<view style="position:relative">
					<block v-if="detail.payafter_username">
						<view class="order-detail__ft-btn">{{detail.payafterbtntext}}</view>
						<!-- #ifdef H5 -->
						<wx-open-launch-weapp :username="detail.payafter_username" :path="detail.payafter_path" style="position:absolute;top:0;left:0;right:0;bottom:0;z-index:8">
							<script type="text/wxtag-template">
								<div style="width:100%;height:40px;"></div>
							</script>
						</wx-open-launch-weapp>
						<!-- #endif -->
					</block>
					<block v-else>
						<view class="order-detail__ft-btn" @tap="goto" :data-url="detail.payaftertourl">{{detail.payafterbtntext}}</view>
					</block>
				</view>
			</block>
			<block v-if="detail.isworkorder==1">
					<view class="order-detail__ft-btn" @tap="goto" :data-url="'/activity/workorder/index?type=1&id='+detail.id" :data-id="detail.id">发起工单</view>
			</block>
			<block v-if="detail.status==0">
				<view class="order-detail__ft-btn" @tap="toclose" :data-id="detail.id">关闭订单</view>
				<view class="order-detail__ft-btn btn-light" v-if="detail.paytypeid != 5" :style="'color:'+t('color1')" @tap="goto" :data-url="'/pages/pay/pay?id=' + detail.payorderid">去付款</view>
				<view class="order-detail__ft-btn btn-light" v-if="detail.paytypeid == 5" :style="'color:'+t('color1')" @tap="goto" :data-url="'/pages/pay/transfer?id=' + detail.payorderid">上传付款凭证</view>
			</block>
			<block v-if="detail.status==1">
				<block v-if="detail.paytypeid!='4'">
					<view class="order-detail__ft-btn" @tap="goto" :data-url="'refundSelect?orderid=' + detail.id" v-if="shopset.canrefund==1">退款</view>
				</block>
				<block v-else>
					<view class="order-detail__ft-btn">{{codtxt}}</view>
				</block>
			</block>
			<block v-if="detail.status==2 || detail.status==3">
				<view class="order-detail__ft-btn" @tap="logistics" :data-express_com="detail.express_com" :data-express_no="detail.express_no" :data-express_content="detail.express_content" v-if="detail.freight_type!=3 && detail.freight_type!=4">查看物流</view>
			</block>
			<block v-if="([1,2,3]).includes(detail.status) && invoice">
				<view class="order-detail__ft-btn" @tap="goto" :data-url="'invoice?type=shop&orderid=' + detail.id">发票</view>
			</block>
			<block v-if="detail.status==2">
				<block v-if="detail.paytypeid!='4'">
					<view class="order-detail__ft-btn" @tap="goto" :data-url="'refundSelect?orderid=' + detail.id" v-if="shopset.canrefund==1">退款</view>
				</block>
				<view class="order-detail__ft-btn btn-light" :style="'color:'+t('color1')" @tap="orderCollect" :data-id="detail.id" v-if="detail.paytypeid!='4' && (detail.balance_pay_status==1 || detail.balance_price==0)">确认收货</view>
				<view class="order-detail__ft-btn" v-if="detail.paytypeid=='4'">{{codtxt}}</view>
				<view v-if="detail.balance_pay_status == 0 && detail.balance_price > 0" class="order-detail__ft-btn btn-light" :style="'color:'+t('color1')" @tap.stop="goto" :data-url="'/pages/pay/pay?id=' + detail.balance_pay_orderid">支付尾款</view>
			</block>
			<block v-if="(detail.status==1 || detail.status==2) && detail.freight_type==1">
				<view class="order-detail__ft-btn" @tap="showhxqr">核销码</view>
			</block>
			<block v-if="detail.status==3 || detail.status==4">
				<view class="order-detail__ft-btn" @tap="todel" :data-id="detail.id">删除订单</view>
			</block>
			<block v-if="detail.bid>0 && detail.status==3">
				<view v-if="iscommentdp==0" class="order-detail__ft-btn btn-light" :style="'color:'+t('color1')" @tap="goto" :data-url="'/pages/order/commentdp?orderid=' + detail.id">评价店铺</view>
				<view v-if="iscommentdp==1" class="order-detail__ft-btn" @tap="goto" :data-url="'/pages/order/commentdp?orderid=' + detail.id">查看评价</view>
			</block>
		</view>
		<uni-popup id="dialogHxqr" ref="dialogHxqr" type="dialog">
			<view class="hxqrbox">
				<image :src="detail.hexiao_qr" @tap="previewImage" :data-url="detail.hexiao_qr" class="img"/>
				<view class="txt">请出示核销码给核销员进行核销</view>
				<view class="close" @tap="closeHxqr">
					<image :src="event_rul +'/static/img/static/img/close2.png'" style="width:100%;height:100%"/>
				</view>
			</view>
		</uni-popup>

		
		<uni-popup id="dialogSelectExpress" ref="dialogSelectExpress" type="dialog">
			<view style="background:#fff;padding:20rpx 30rpx;border-radius:10rpx;width:600rpx">
				<view class="sendexpress-item" v-for="(item, index) in express_content" :key="index" @tap="goto" :data-url="'/pages/order/logistics?express_com=' + item.express_com + '&express_no=' + item.express_no" style="display: flex;border-bottom: 1px solid #f5f5f5;padding:20rpx 0;">
					<view class="flex1">{{item.express_com}} - {{item.express_no}}</view>
					<image :src="event_rul +'/static/img/static/img/arrowright.png'" style="width:30rpx;height:30rpx"/>
				</view>
			</view>
		</uni-popup>

	</block>
	<loading v-if="loading"></loading>
	<dp-tabbar :opt="opt"></dp-tabbar>
	<popmsg ref="popmsg"></popmsg>
  <!-- 悬浮按钮 -->
  <drag-button></drag-button>
</view>
</template>

<script>
var app = getApp();
var interval = null;

export default {
  data() {
    return {
		opt:{},
		loading:false,
		isload: false,
		menuindex:-1,

		pre_url:app.globalData.pre_url,
		prodata: '',
		djs: '',
		iscommentdp: "",
		detail: "",
		payorder:{},
		prolist: "",
		shopset: "",
		storeinfo: "",
		lefttime: "",
		codtxt: "",
		pay_transfer_info:{},
		invoice:0,
		selectExpressShow:false,
		express_content:'',

		event_rul: app.globalData.event_url,
    };
  },

  onLoad: function (opt) {
		this.opt = app.getopts(opt);
		this.getdata();
  },
	onPullDownRefresh: function () {
		this.getdata();
	},
  onUnload: function () {
    clearInterval(interval);
  },
  methods: {
	  shopCar(data) {
		 app.post('ApiShop/addcart', {proid: data.proid,ggid: data.ggid,num: data.num}, res => {
		 	if (res.status == 1) {
		 		app.success('添加成功');
		 	} else {
		 		app.error(res.msg);
		 	}
		 }); 
	  },
		getdata: function () {
			var that = this;
			that.loading = true;
			app.get('ApiOrder/detail', {id: that.opt.id}, function (res) {
				that.loading = false;
				that.iscommentdp = res.iscommentdp,
				that.detail = res.detail;
				that.prolist = res.prolist;
				that.shopset = res.shopset;
				that.storeinfo = res.storeinfo;
				that.lefttime = res.lefttime;
				that.codtxt = res.codtxt;
				that.pay_transfer_info =  res.pay_transfer_info;
				that.payorder = res.payorder;
				that.invoice = res.invoice;
				if (res.lefttime > 0) {
					interval = setInterval(function () {
						that.lefttime = that.lefttime - 1;
						that.getdjs();
					}, 1000);
				}
				that.loaded();
			});
		},
    getdjs: function () {
      var that = this;
      var totalsec = that.lefttime;

      if (totalsec <= 0) {
        that.djs = '00时00分00秒';
      } else {
        var houer = Math.floor(totalsec / 3600);
        var min = Math.floor((totalsec - houer * 3600) / 60);
        var sec = totalsec - houer * 3600 - min * 60;
        var djs = (houer < 10 ? '0' : '') + houer + '时' + (min < 10 ? '0' : '') + min + '分' + (sec < 10 ? '0' : '') + sec + '秒';
        that.djs = djs;
      }
    },
    todel: function (e) {
      var that = this;
      var orderid = e.currentTarget.dataset.id;
      app.confirm('确定要删除该订单吗?', function () {
				app.showLoading('删除中');
        app.post('ApiOrder/delOrder', {orderid: orderid}, function (data) {
					app.showLoading(false);
          app.success(data.msg);
          setTimeout(function () {
            app.goback(true);
          }, 1000);
        });
      });
    },
    toclose: function (e) {
      var that = this;
      var orderid = e.currentTarget.dataset.id;
      app.confirm('确定要关闭该订单吗?', function () {
				app.showLoading('提交中');
        app.post('ApiOrder/closeOrder', {orderid: orderid}, function (data) {
					app.showLoading(false);
          app.success(data.msg);
          setTimeout(function () {
            that.getdata();
          }, 1000);
        });
      });
    },
    orderCollect: function (e) {
      var that = this;
      var orderid = e.currentTarget.dataset.id;
      app.confirm('确定要收货吗?', function () {
				app.showLoading('收货中');
        app.post('ApiOrder/orderCollect', {orderid: orderid}, function (data) {
					app.showLoading(false);
          app.success(data.msg);
          setTimeout(function () {
            that.getdata();
          }, 1000);
        });
      });
    },
		showhxqr:function(){
			this.$refs.dialogHxqr.open();
		},
		closeHxqr:function(){
			this.$refs.dialogHxqr.close();
		},
		openLocation:function(e){
			var latitude = parseFloat(e.currentTarget.dataset.latitude);
			var longitude = parseFloat(e.currentTarget.dataset.longitude);
			var address = e.currentTarget.dataset.address;
			uni.openLocation({
			 latitude:latitude,
			 longitude:longitude,
			 name:address,
			 scale: 13
			})
		},
		openMendian: function(e) {
			var storeinfo = e.currentTarget.dataset.storeinfo;
			app.goto('/pages/shop/mendian?id=' + storeinfo.id);
		},
		logistics:function(e){
			var express_com = e.currentTarget.dataset.express_com
			var express_no = e.currentTarget.dataset.express_no
			var express_content = e.currentTarget.dataset.express_content
			console.log(express_content)
			if(!express_content){
				app.goto('/pages/order/logistics?express_com=' + express_com + '&express_no=' + express_no);
			}else{
				this.express_content = JSON.parse(express_content);
				console.log(express_content);
				this.$refs.dialogSelectExpress.open();
			}
		},
		hideSelectExpressDialog:function(){
			this.$refs.dialogSelectExpress.close();
		}
  }
};
</script>
<style lang="scss">
.order-detail {
	background: #F5F5F5;
	min-height: 100vh;	
	padding-bottom: calc(130rpx + constant(safe-area-inset-bottom));
	padding-bottom: calc(130rpx + env(safe-area-inset-bottom));
	&__hd {
		height: 248rpx;
		padding: 48rpx 0 0 70rpx;
		box-sizing: border-box;
		color: #FFFFFF;
		font-weight: bold;
		&-title {
			font-size: 32rpx;
			line-height: 44rpx;
		}
		&-subtitle {
			margin-top: 14rpx;
			font-size: 26rpx;
			line-height: 36rpx;
		}
	}
	&__bd {
		margin-top: -56rpx;
		padding: 0 24rpx;
	}
	.common-module {
		margin-bottom: 24rpx;
		background: #FFFFFF;
		border-radius: 12rpx;
		padding: 28rpx 24rpx;
	}
	&__userinfo {
		padding-top: 32rpx;
		&-top {
			font-size: 28rpx;
			font-weight: bold;
			color: #333333;
			line-height: 40rpx;
		}
		&-tel {
			margin-left: 20rpx;
		}
		.icon-box {
			width: 40rpx;
			height: 40rpx;
			background: #029d5f;
			border-radius: 50%;
			flex-shrink: 0;
			margin-right: 20rpx;
			.icon-icon-location {
				font-size: 24rpx;
				color: #FFFFFF;
			}
		}
		&-bot {
			margin-top: 20rpx;
		}
		&-address {
			flex: 1;
			font-size: 28rpx;
			color: #333333;
			line-height: 40rpx;
		}
	}
	&__list {
		margin-bottom: 28rpx;
		.product-item {
			&:not(:last-child) {
				margin-bottom: 24rpx;
			}
			&__hd {
				width: 180rpx;
				height: 180rpx;
				flex-shrink: 0;
				margin-right: 24rpx;
				border-radius: 8rpx;
				overflow: hidden;
			}
			&__img {
				width: 100%;
				height: 100%;
			}
			&__bd {
				flex: 1;
			}
			&__info {
				font-size: 28rpx;
				font-weight: bold;
				color: #333333;
				line-height: 36rpx;
			}
			&__name {
				flex: 1;
			}
			&__price {
				flex-shrink: 0;
				margin-left: 32rpx;
				font-size: 28rpx;
				line-height: 40rpx;
			}
			&__size,&__num {
				margin-top: 10rpx;
				font-size: 24rpx;
				font-weight: bold;
				color: #999999;
				line-height: 34rpx;
			}
			&__ft {
				margin-top: 20rpx;
				justify-content: flex-end;
				&-btn {
					position: relative;
					min-width: 160rpx;
					height: 60rpx;
					padding: 0 20rpx;
					font-size: 24rpx;
					font-weight: bold;
					color: #666666;
					line-height: 60rpx;
					box-sizing: border-box;
					margin-left: 20rpx;
					text-align: center;
					&::before {
						content: "";
						position: absolute;
						left: 0;
						right: 0;
						top: 0;
						bottom: 0;
						border-radius: 30rpx;
						border: 1rpx solid #CECECE;
					}
				}
			}
		}
	}
	&__shop {
		margin-bottom: 28rpx;
		&-logo {
			width:36rpx;
			height:36rpx;
			flex-shrink: 0;
		}
		&-name {
			font-size: 28rpx;
			color: #333333;
			line-height: 40rpx;
			margin-left: 16rpx;
			overflow: hidden;
			white-space: nowrap;
			text-overflow: ellipsis;
		}
	}
	&__form {
		.form-item {
			font-size: 28rpx;
			color: #333333;
			line-height: 40rpx;
			&:not(:last-child) {
				margin-bottom: 36rpx;
			}
			.sub {
				font-size: 22rpx;
			}
			&__hd {
				width: 150rpx;
				flex-shrink: 0;
			}
			&__bd {
				flex: 1;
				text-align: right;
				&.light {
					color: #ED5925;
				}
				&.dark {
					color: #999999;
				}
				&.arrow-right {
					padding-right: 30rpx;
					position: relative;
					&::after {
						content: "";
						position: absolute;
						right: 10rpx;
						top: 12rpx;
						width: 14rpx;
						height: 14rpx;
						border-top: 1rpx solid #999999;
						border-right: 1rpx solid #999999;
						transform: rotate(45deg);
					}
				}
				&-headimg {
					width: 60rpx;
					height: 60rpx;
					border-radius: 8rpx;
					margin-right: 10rpx;
					flex-shrink: 0;
				}
			}
			&__ft {
				margin-left: 20rpx;
				flex-shrink: 0;
				color: #999999;
				font-size: 40rpx;
			}
		}
	}
	&__ft {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		background: #FFFFFF;
		padding: 20rpx 24rpx;
		justify-content: flex-end;
		padding-bottom: calc(20rpx + constant(safe-area-inset-bottom));
		padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
		&-btn {
			position: relative;
			min-width: 160rpx;
			height: 60rpx;
			padding: 0 20rpx;
			font-size: 24rpx;
			font-weight: bold;
			color: #666666;
			line-height: 60rpx;
			box-sizing: border-box;
			margin-left: 20rpx;
			text-align: center;
			&::before {
				content: "";
				position: absolute;
				left: 0;
				right: 0;
				top: 0;
				bottom: 0;
				border-radius: 30rpx;
				border: 1rpx solid #CECECE;
			}
			&.btn-light {
				&::before {
					border-color: #0A5D3B;
				}
			}
		}
	}
}
.hxqrbox{background:#fff;padding:50rpx;position:relative;border-radius:20rpx}
.hxqrbox .img{width:400rpx;height:400rpx}
.hxqrbox .txt{color:#666;margin-top:20rpx;font-size:26rpx;text-align:center}
.hxqrbox .close{width:50rpx;height:50rpx;position:absolute;bottom:-100rpx;left:50%;margin-left:-25rpx;border:1px solid rgba(255,255,255,0.5);border-radius:50%;padding:8rpx}

</style>