<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
	<meta http-equiv="Cache-Control" content="no-cache"/>
	<title>安卓 DOCER WPS </title>
	<link rel="stylesheet" href="../css/main.css">
	<link rel="stylesheet" href="../css/swiper.min.css">
	<style>
	.lately .scrollarea::-webkit-scrollbar { display: none; } /* 隐藏滚动条 */
	.noscroll{
		overflow: hidden;
	}
	</style>
</head>
<body ms-controller="TemplateCtrl" id="body" ms-class="noscroll:buyState>0">
<!-- container按列数加这个样式名 tem_col_2  tem_col_3  tem_col_4 tem_col_5 tem_col_6-->
<!-- container 列表页加这个样式名 containerbg -->
<div class="container " ms-class-1="tem_col_{{config.column}}" ms-class-2="containerbg:onlineTemplates.length == 0" style="display:none;" ms-visible="loaded"  ms-class="noscroll:buyState>0">
	<div class="nav_all">
		<ul class="nav scrollarea" style="overflow-x:auto;">
			<li style="text-align:center;"><a href="javascript:void(0);" ms-class="active:categoryName=='推荐'" ms-click="clickCategory('推荐','')">推荐</a></li>
			<li ms-repeat="categoryListData" style="text-align:center;"><a href="javascript:void(0);" class="click-tab" ms-class="active:categoryName==el.text" ms-text="el.text" ms-click="clickCategory(el.text,el.link)"></a></li>
		</ul>
	</div>
	<div class="ad_banner" ms-visible="needShowBanner">
		<div class='swiper-container banner_swiper'>
			<div class="swiper-wrapper" ms-click="clickBanner(bannerDatas[bannerSwiper == null ? 0 : (bannerSwiper.activeIndex + bannerDatas.length - 1) % bannerDatas.length].params.link, 'banner')">
				<div class="swiper-slide" ms-repeat-el="bannerDatas">
					<img ms-src="el.pic_url" style="background-color:rgb(204,204,204); width:100%; height:100%;">
				</div>
			</div>
			<div class="swiper-pagination" ms-class="swiper-pagination-bullets-not-notice:!needShowNotice()"></div>
		</div>
	</div>
	<div class="notice"  ms-visible="needShowNotice()" ms-class="notice_not_banner:!needShowBanner" ms-click="clickBanner(noticeDatas[noticeSwiper == null ? 0 : (noticeSwiper.activeIndex + noticeDatas.length - 1) % noticeDatas.length].params.link, 'message')">
		<div class='swiper-container notice_swiper'>
			<div class="swiper-wrapper">
				<div class="swiper-slide notice_text" ms-repeat-el="noticeDatas">{{el.text}}</div>
			</div>
		</div>
	</div>
	<!-- 推荐列表 开始 -->
	<div class="wbg mw noshadow index_list" >
		<ul class="templist clearfix">
			<li ms-visible="categoryName=='推荐'">
				<a href="javascript:void(0)" class="build_doc" ms-click='clickNew'>
					<div class="imgbd">
						<div ms-visible="config.type==1" class="img" style="display:none"><img src="../css/img/bd_doc.png"><span class="add"></span></div>
						<div ms-visible="config.type!=1" class="img" style="display:none"><img src="../css/img/bd_ppt.png"><span class="add"></span></div>
					</div>
					<h3 class="name" ms-text="textNew"></h3>
				</a>
			</li><li ms-repeat-el="onlineTemplates" ms-visible="onlineTemplates.length" ms-attr-id="{{el.id}}" style="display:none">
				<a href="javascript:void(0)" ms-click="clickOnlineTemplate($index)">
					<div class="imgbd" >
						<div class="img" ms-visible='el.isLoaded'><img ms-src='el.thum_url'></div>
						<div class="imgloading" ms-visible='!el.isLoaded'>
							<img ms-visible="config.type==1" src='../css/img/imgloading_doc.png'>
							<img ms-visible="config.type!=1" src='../css/img/imgloading.png'>
						</div>
						<!--el.className: VIP:saletxt1,限免:saletxt2,特价:saletxt-->
						<div ms-class-1="{{el.className}}" ms-visible="el.className.length > 0" ms-html="el.text"></div>
					</div>
					<h3 class="name" ms-text="el.displayName"></h3>
					<div class="price">
						<span ms-visible="el.price!=0&&el.price != el.calculatedPrice" class="delece_price">{{el.price / 100}}元</span>
						<span class="rice" ms-visible="el.price > 0&&el.price != el.calculatedPrice">
							<span>{{el.calculatedPrice / 100}}</span>元
						</span>
						<span class="free" ms-visible="el.price!=0&&el.price == el.calculatedPrice">{{el.price / 100}}元</span>
						<span class="free" ms-visible="el.price == 0">免费</span>
					</div>
				</a>
			</li>
		</ul>
		<!-- 内容加载中 开始 -->
		<div class="loadmore" ms-visible="isLoadingMore">
			 <div class="loading"></div>
			 <h2>内容加载中...</h2>
		</div>
		<!-- 内容加载中 结束 -->
	</div>
	<!-- 推荐列表 结束 -->
	<!-- 支付弹出框 start -->
 	<!--1支付层 2查询支付状态 3支付成功 4支付失败 5选择充值-->
	<div class="pop" ms-visible="buyState>0">
		<!-- 支付过程 start -->
		<div class="pay" ms-visible="buyState==1">
			<a href="javascript:void(0);" class="pay_close" ms-on-tap="setValue('buyState',-1)"></a>
			<div class="cb"></div>
			<div class="pay_top_warnning" ms-visible="buy_info.is_docer_vip && free_times <= 0">
				免费兑换的模板数量已超上限
			</div>
			<p class="pay_sep"></p>
			<div class="pay_main">
				<div class="pay_top">
					<div class="pay_title">{{buyMBinfo.name}}</div>
					<span class="pay_prize">{{buyMBinfo.price / 100}}元</span>
				</div>
				<a href="javascript:void(0);" ms-click="setValue('buyState', 11)" class="pay_coupon"  ms-visible="user_curr_coupons.usable_coupons.length > 0">
					<div class="pay_coupon_title">优惠券</div>
					<div class="pay_coupon_choose" ms-visible="user_curr_coupons.usable_coupons.length > 0">{{user_curr_coupon_choose_index == -1 ? '不使用' : user_curr_coupons.usable_coupons[user_curr_coupon_choose_index].name}}</div> <!-- 没有箭头 pay_way_to_none -->
					<div class="pay_way_sep"></div>
				</a>
				<a href="javascript:void(0);" class="pay_coupon"  ms-visible="user_curr_coupons.unusable_coupons.length > 0 && user_curr_coupons.usable_coupons == 0">
					<div class="pay_coupon_title">优惠券</div>
					<div class="pay_coupon_choose_none" ms-visible="user_curr_coupons.usable_coupons.length == 0">无可用</div> <!-- 没有箭头 pay_way_to_none -->
					<div class="pay_way_sep"></div>
				</a>
				<ul class="pay_discount">
					<a ms-click="setValue('daomiPay',!daomiPay)">
						<li ms-visible="(userDaomi>0&&isDirectPay)||(userDaomi>=buyMBinfo.realPrice&&!isDirectPay)" ms-class="select2:daomiPay">
							<p class="pay_discount_title">使用余额抵扣{{userDaomi>buyMBinfo.realPrice?buyMBinfo.realPrice:userDaomi}}稻米</p><span class="select_object"></span>
						</li>
					</a>
					<!-- 首次进入并且稻米不足情况下 -->
					<li ms-visible="!isDirectPay&&userDaomi<buyMBinfo.realPrice" class="select2">
						<p class="pay_discount_title">余额</p><span class="daomi_surplus">{{userDaomi}}稻米</span>
					</li>
				</ul>
				<a href="javascript:void(0);" class="pay_way" ms-class="pay_way_none:!payWay2"  ms-css-display="{{!daomiPay||daomiPay&&userDaomi<buyMBinfo.realPrice?'inherit':'none'}}" ms-on-tap="setBuyState(10)" ms-on-tap-2="setPageLevelNum(10)">
					<div class="pay_title">支付方式</div>
					<div class="pay_way_to" ms-class="pay_way_to_none:!payWay2" ms-visible="payWay=='wxpay_android'">微信</div> <!-- 没有箭头 pay_way_to_none -->
					<div class="pay_way_to" ms-class="pay_way_to_none:!payWay2" ms-visible="payWay=='alipay_android'">支付宝</div>
					<div class="pay_way_sep"></div>
				</a>
			</div>

			<div class="pay_foot">
				<!-- 稻米充足的时候显示 -->
				<a href="javascript:void(0);" class="pay_btn_green" ms-css-display="{{daomiPay&&userDaomi>=buyMBinfo.realPrice?'inherit':'none'}}" ms-click="setValue('buyState',-1)" ms-click-2="downloadTemplate(buyMBinfo.realPrice)" ms-click-3="collectData('1_pay_'+(daomiPay?1:0))">确认使用</a>
				<a href="javascript:void(0);" class="pay_btn_green" ms-css-display="{{(isDirectPay&&(userDaomi<buyMBinfo.realPrice||!daomiPay))||(!isDirectPay&&userDaomi>=buyMBinfo.realPrice&&!daomiPay)?'inherit':'none'}}" ms-click="setValue('clickDirectPay', true)" ms-click-2="pay()" ms-click-3="collectData((userDaomi>=buyMBinfo.realPrice?'1_pay_':'1_purchase_')+(daomiPay?1:0))">确认支付{{(daomiPay?buyMBinfo.realPrice-userDaomi:buyMBinfo.realPrice)/100}}元</a>
				<!-- 首次进入且只有稻米不足的情况下会显示 -->
				<a href="javascript:void(0);" class="pay_btn_green" id="rechargeBtn" ms-css-display="{{!isDirectPay&&userDaomi<buyMBinfo.realPrice?'inherit':'none'}}" ms-on-tap="showPayDaomi()">充值并购买{{maxDaimiReward > 0 ? '(最高送' + maxDaimiReward + '元)' : ''}}</a>
				<a href="javascript:void(0);" class="pay_btn_gray" ms-css-display="{{!isDirectPay&&userDaomi<buyMBinfo.realPrice?'inherit':'none'}}" ms-click="setValue('isDirectPay', true)" ms-click-2="collectData('1_purchase_directly')">直接购买</a>
			</div>
		</div>
		<!-- 支付过程 end -->

		<!-- 充值稻米数量选择额 start -->
		<div class="buy_daomi" ms-visible="buyState==5">
				<a ms-click="setValue('buyState', 1)"><div class="back_arrow"></div></a>
				<p style="margin: 0 0 0 0;width: 100%;height: 1px;background: #ececec;"></p>
				<div class="buy_daomi_tips">请选择充值金额(赠送代金券将放在我的钱包-卡券包中)</div>
				<div class="card_collection">
					<a ms-click="choseDaomiCard(1)" ms-click-2="setValue('selectDaomiTotal', 5)">
						<div id="card1" class="card" >
            	<div ms-visible="buyDaomiReward['500'] > 0" class="buy_daomi_discount_tag">&nbsp;送{{buyDaomiReward['500']}}元</div>
							<div class="card_price">5元</div>
							<div class="card_price_detail">5元=500稻米</div>
						</div>
					</a>
					<a ms-click="choseDaomiCard(2)" ms-click-2="setValue('selectDaomiTotal', 10)">
					<div id="card2" class="selected_card">
						<div ms-visible="buyDaomiReward['1000'] > 0" class="buy_daomi_discount_tag">&nbsp;送{{buyDaomiReward['1000']}}元</div>
							<div class="card_price">10元</div>
							<div class="card_price_detail">10元=1000稻米</div>
						</div>
					</a>
					<a ms-click="choseDaomiCard(3)" ms-click-2="setValue('selectDaomiTotal', 30)">
						<div id="card3" class="card">
							<div ms-visible="buyDaomiReward['3000'] > 0" class="buy_daomi_discount_tag">&nbsp;送{{buyDaomiReward['3000']}}元</div>
							<div class="card_price">30元</div>
							<div class="card_price_detail">30元=3000稻米</div>
						</div>
					</a>
					<a ms-click="choseDaomiCard(4)" ms-click-2="setValue('selectDaomiTotal', 50)">
						<div id="card4" class="card">
							<div ms-visible="buyDaomiReward['5000'] > 0" class="buy_daomi_discount_tag">&nbsp;送{{buyDaomiReward['5000']}}元</div>
							<div class="card_price">50元</div>
							<div class="card_price_detail">50元=5000稻米</div>
						</div>
					</a>
					<a ms-click="choseDaomiCard(5)" ms-click-2="setValue('selectDaomiTotal', 100)">
						<div id="card5" class="card">
							<div ms-visible="buyDaomiReward['10000'] > 0" class="buy_daomi_discount_tag">&nbsp;送{{buyDaomiReward['10000']}}元</div>
							<div class="card_price">100元</div>
							<div class="card_price_detail">100元=10000稻米</div>
						</div>
					</a>
					<a ms-click="choseDaomiCard(6)" ms-click-2="setValue('selectDaomiTotal', 200)">
						<div id="card6" class="card">
							<div ms-visible="buyDaomiReward['20000'] > 0" class="buy_daomi_discount_tag">&nbsp;送{{buyDaomiReward['20000']}}元</div>
							<div class="card_price">200元</div>
							<div class="card_price_detail">200元=20000稻米</div>
						</div>
					</a>
				</div>
				<div class="sum_price">
					<span style="font-size:9pt; color:rgb(83,83,83)">总价值:</span>
					{{selectDaomiTotal * 100}}稻米
					</br>
					<span style="font-size: 9pt;">{{buyDaomiReward[(selectDaomiTotal * 100).toString()]>0?'+' + buyDaomiReward[(selectDaomiTotal * 100).toString()] + '元代金券' : ''}}</span>
				</div>
				<div class="submit_buy">
					<a class="pay_btn_green" style="display:inherit;" ms-click="pay(selectDaomiTotal * 100)" ms-click-2="collectData(payWay=='wxpay_android' ? '1_purchase_credit_wechat' : '1_purchase_credit_alipay')">立即购买</a>
				</div>
		</div>
		<!-- 充值稻米数量选择 end -->

		<!-- 优惠券选择界面 -->
		<div class="select_coupons" ms-visible="buyState==11">
			<div class="select_coupons_bar">
				<a style="position:absolute;display:inline-block;" ms-click="setValue('buyState', 1)"><div class="back_arrow"></div></a>
				<a class="unselect_coupon"><div ms-click="changePayCoupon(-1)" ms-click-2="setValue('buyState', 1)" >不使用优惠券</div></a>
			</div>
			<div>
				<ul class="coupon_list">
					<li class="usable" ms-repeat-el="user_curr_coupons.usable_coupons" ms-click="changePayCoupon($index)" ms-click-2="setValue('buyState', 1)" hidefocus="true">
							<h2 class="coupon_title"></h2>
							<p class="coupon_info"><strong>{{el.params.price}}</strong>元<br>满{{el.params.min_pay}}元使用</p>
							<div class="coupon_cb"></div>
							<div class="coupon_deadline">有效期至{{formatDate(el.expire_time * 1000)}}</div>
					</li>
					<li class="unusable" ms-repeat-el="user_curr_coupons.unusable_coupons" hidefocus="true">
							<h2 class="coupon_title"></h2>
							<p class="coupon_info"><strong>{{el.params.price}}</strong>元<br>满{{el.params.min_pay}}元使用</p>
							<div class="coupon_cb"></div>
							<div class="coupon_deadline">有效期至{{formatDate(el.expire_time * 1000)}}</div>
					</li>
					<!-- <li tabindex="0" hidefocus="true" style="">
						<h2 class="coupon_title"></h2>
						<p class="coupon_info"><strong>1</strong>元<br>满2元使用</p>
						<div class="coupon_cb"></div>
						<div class="coupon_deadline">有效期至 2016-11-13</div>
					</li>
					<li tabindex="0" hidefocus="true" style="">
						<h2 class="coupon_title"></h2>
						<p class="coupon_info"><strong>1</strong>元<br>满2元使用</p>
						<div class="coupon_cb"></div>
						<div class="coupon_deadline">有效期至 2016-11-13</div>
					</li>
					<li tabindex="0" hidefocus="true" style="">
						<h2 class="coupon_title"></h2>
						<p class="coupon_info">
							<strong>1</strong>元<br>满2元使用
						</p>
						<div class="coupon_cb"></div>
						<div class="coupon_deadline">有效期至 2016-11-13</div>
					</li> -->
				</ul>
			</div>
		</div>
		<!-- 优惠券选择界面 end -->

		<!-- 支付方式选择 start -->
		<div class="pay" ms-visible="buyState==10">
			<a href="javascript:void(0);" class="pay_return_all" ms-on-tap="setValue('buyState',1)">
				<span class="pay_return">选择支付方式</span>
			</a>
			<a href="javascript:void(0);" class="pay_list pay_list_zhifubao" ms-css-display="{{payWay1=='alipay_android'||payWay2=='alipay_android'?'inherit':'none'}}" ms-on-tap="setValue('payWay','alipay_android')" ms-on-tap-2="setBuyState(1)"  ms-on-tap-3="setPageLevelNum(1)">支付宝支付</a>
			<a href="javascript:void(0);" class="pay_list pay_list_weixin" ms-css-display="{{payWay1=='wxpay_android'||payWay2=='wxpay_android'?'inherit':'none'}}" ms-on-tap="setValue('payWay','wxpay_android')" ms-on-tap-2="setBuyState(1)"  ms-on-tap-3="setPageLevelNum(1)">微信支付</a>
		</div>
		<!-- 支付方式选择 end -->

		<!-- 查询订单支付状态 start -->
		<div class="pay pay_success_all" ms-visible="buyState==2">
			<a href="javascript:void(0);" class="pay_close" ms-on-tap="setValue('buyState',-1)"></a>
			<div class="cb"></div>
			<div class="pay_success">
				<p class="ps_txt">支付成功</p>
				<p class="daomi_txt">订单处理中...</p>
			</div>
		</div>
		<!-- 查询订单支付状态 end -->
		<!-- 充值成功 start -->
		<div class="pay pay_success_all" ms-visible="buyState==3">
			<a href="javascript:void(0);" class="pay_close" ms-on-tap="setValue('buyState',-1)"></a>
			<div class="cb"></div>
			<div class="pay_success">
				<p class="ps_txt">支付成功</p>
				<p class="daomi_txt">成功充值 <span class="red">{{!clickDirectPay&&!isDirectPay ? selectDaomiTotal * 100 : daomiPay?buyMBinfo.price-userDaomi-getSelectedCouponDaomi():buyMBinfo.price - getSelectedCouponDaomi()}}</span> 稻米</p>
			</div>
		</div>
		<!-- 充值成功 end -->
		<!-- 充值失败 start -->
		<div class="pay pay_success_all" ms-visible="buyState==4">
			<a href="javascript:void(0);" class="pay_close" ms-on-tap="setValue('buyState',-1)"></a>
			<div class="cb"></div>
			<div class="pay_success">
				<p class="ps_txt">支付成功</p>
				<p class="daomi_txt">订单查询失败。请到我的钱包-订单中心查询。</p>
			</div>
		</div>
		<!-- 充值失败 end -->
		<div class="maskbg"></div>
	</div>
	<!-- 支付弹出框 end -->

	<!-- 底部按钮 start -->
	<div class="footer_member_btn" ms-visible="isNeedBuyDocerMember&&(vipMemberId!=12&&vipMemberId!=40)">
		<a class="login_and_buy_btn" ms-click="openMonthCard()"><img align="absmiddle" src="../css/img/mem_btn_logo.png" />开通稻壳会员，全场模板免费</a>
	</div>
	<div class="footer_member_btn" ms-visible="isNeedBuyDocerMember&&vipMemberId==12">
		<a class="login_and_buy_btn" style="background: #2684db;" ms-click="openMonthCard()"><img align="absmiddle" src="../css/img/super_mem_btn_logo.png" />升级超级会员，享双重特权福利</a>
	</div>
	<div class="footer_member_btn" ms-visible="isNeedBuyDocerMember&&vipMemberId==40">
		<a class="login_and_buy_btn" style="background: #2684db;" ms-click="openMonthCard()"><img align="absmiddle" src="../css/img/super_mem_btn_logo.png" />续费超级会员，享双重特权福利</a>
	</div>
	<div class="footer_member_btn_content" ms-visible="isNeedBuyDocerMember">
	</div>
	<!-- 底部按钮 end -->
</div>
</body>
<script type="text/javascript" src="../js/publish/avalon.js"></script>
<script type="text/javascript" src="../js/publish/load.js"></script>
<script type="text/javascript">
	load('template');
</script>
</html>
