<!--pages/exchange-detail/exchange-detail.wxml-->
<wxs src="../../../tools.wxs" module="globalTools"></wxs>
<wxs src="../exchange-record/exchange-record.wxs" module="Tools"></wxs>
<wxs src="exchange-detail.wxs" module="tool"></wxs>

<view class="container">
	<view class="header">
		<view class="name">{{mpCompaignsRewardSettingAPI.rewardName || mpCompaignsActivitySettingAPI.activityName}}</view>
		<view class="info">

			<view class="info-content">
				<view>
					<text>兑换时间：</text>
					<text>{{mpMemberCompaigns.joinTime}}</text>
				</view>
				<view wx:if='{{type === "gift"}}' class="{{Tools.getGiftStatusColor(mpMemberCompaignsRewardAction.memberCampaignsStatus)}}">{{Tools.getGiftStatusMessage(mpMemberCompaignsRewardAction.memberCampaignsStatus)}}</view>
				<view wx:if='{{type === "activity"}}' class="{{mpCompaignsActivitySettingAPI.activityStatus === 1?'':'doing'}}">{{mpCompaignsActivitySettingAPI.activityStatus === 1?'':'活动取消'}}</view>
			</view>

			<view class="info-content">
				<view>
					<text>兑换消耗：</text>
					<text>
            <text>{{mpCompaignsRewardSettingAPI.points || mpCompaignsActivitySettingAPI.points}}积分{{mpCompaignsRewardSettingAPI.money? '+'+mpCompaignsRewardSettingAPI.money+'元':mpCompaignsActivitySettingAPI.money?'+'+mpCompaignsActivitySettingAPI.money+'元':''}} </text>
					<text wx:if='{{type === "gift"}}'>{{mpMemberCompaignsRewardAction.memberCampaignsStatus===0&& mpMemberCompaignsRewardAction.invalidBackType?'(退还成功)':''}}</text>
					<text wx:if='{{type === "activity"}}'> {{mpCompaignsActivitySettingAPI.activityStatus===1?'':'(退还成功)'}}</text>
					</text>
				</view>
			</view>

			<view class="info-content">
				<view>
					<text>预留号码：</text>
					<text>{{mpMemberCompaigns.contactPhone}}</text>
				</view>
			</view>
			<view class="info-content" wx:if='{{type === "activity"}}'>
				<view>
					<text>活动时间：</text>
					<text>{{tool.formatTime(mpCompaignsActivitySettingAPI.activityStartTime,'.')}} - {{tool.formatTime(mpCompaignsActivitySettingAPI.activityEndTime,'.')}}</text>
				</view>
			</view>

			<view class="info-content" wx:if='{{type === "activity"}}'>
				<view>
					<text>活动地点：</text>
					<text>{{mpCompaignsActivitySettingAPI.activityProvinceCityCountry}}{{mpCompaignsActivitySettingAPI.activityAddress}}</text>
				</view>
			</view>
		</view>
	</view>
	<view class="content">
		<view class="title">{{type === "gift"?"礼品详情":"活动详情"}}</view>
		<view class="detail" wx:if='{{type === "gift"}}'>
			<image wx:for='{{mpCompaignsRewardSettingAPI.rewardDesciptionList}}' wx:key='index' wx:if='{{item}}' mode="widthFix" src="{{globalTools.formatUrl(item)}}"></image>
		</view>
		<view class="detail" wx:if='{{type === "activity"}}'>
			<image wx:for='{{mpCompaignsActivitySettingAPI.activityDescriptionList}}' wx:key='index' wx:if='{{item}}' mode="widthFix" src="{{globalTools.formatUrl(item)}}"></image>
		</view>
	</view>
</view>