人人商城

goodsbuyer.html 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. {template 'header'}
  2. {if $operate == 'display'}
  3. {if $_GPC['type'] != STORE_TYPE_PACKAGE && $_GPC['type'] != STORE_TYPE_USER_PACKAGE}
  4. <div class="store module">
  5. <div class="modules clearfix">
  6. {loop $store_goods $goods}
  7. <div class="item active">
  8. <a href="{php echo $this->createWebUrl('goodsbuyer', array('operate' => 'goods_info', 'direct' => 1, 'goods' => $goods['id']))}">
  9. {if $goods['type'] == STORE_TYPE_API}
  10. <div class="icon icon-api"><span class="wi wi-api"></span></div>
  11. {elseif in_array($goods['type'], array(STORE_TYPE_PACKAGE, STORE_TYPE_ACCOUNT, STORE_TYPE_WXAPP, STORE_TYPE_ACCOUNT_RENEW, STORE_TYPE_WXAPP_RENEW))}
  12. <div class="icon icon-wi"><span class="wi wi-appjurisdiction"></span></div>
  13. {else}
  14. <img src="{$goods['module']['logo']}" alt="icon" class="icon" onerror="this.src='./resource/images/nopic-107.png'"/>
  15. {/if}
  16. <div class="name text-over">
  17. {if $goods['type'] == STORE_TYPE_PACKAGE}
  18. {$module_groups[$goods['module_group']]['name']}
  19. {elseif $goods['type'] == STORE_TYPE_USER_PACKAGE}
  20. {$user_groups[$goods['user_group']]['name']}
  21. {/if}
  22. {php echo $goods['title']}
  23. </div>
  24. <div class="price">¥{$goods['price']}元 /
  25. {if $goods['unit'] == 'month'}{if $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}{$goods['account_num']}{elseif $goods['type'] == STORE_TYPE_WXAPP_RENEW}{$goods['wxapp_num']}{/if}月
  26. {elseif $goods['unit'] == 'ten_thousand'} {$goods['api_num']}万次
  27. {elseif $goods['unit'] == 'day'}{if $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}{$goods['account_num']}{elseif $goods['type'] == STORE_TYPE_WXAPP_RENEW}{$goods['wxapp_num']}{/if}天
  28. {elseif $goods['unit'] == 'year'}{if $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}{$goods['account_num']}{elseif $goods['type'] == STORE_TYPE_WXAPP_RENEW}{$goods['wxapp_num']}{/if}年
  29. {/if}
  30. </div>
  31. <div class="text-right view">
  32. 查看详情>
  33. </div>
  34. </a>
  35. </div>
  36. {/loop}
  37. </div>
  38. </div>
  39. {/if}
  40. {if $_GPC['type'] == STORE_TYPE_PACKAGE}
  41. <div><span class="wi wi-appjurisdiction">应用权限组</span></div>
  42. <div class="store">
  43. <div class="jurisdiction-list">
  44. {loop $store_goods $goods}
  45. <div class="panel we7-panel">
  46. <div class="panel-body">
  47. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  48. <tr class="group_menu">
  49. <td class="td_1"><span class="head"><i class="wi wi-appjurisdiction"></i></span></td>
  50. <td class="td_2"><span class="name">{$module_groups[$goods['module_group']]['name']}</span><span class="price">¥ {$goods['price']}元/{if $goods['type'] != STORE_TYPE_API}{if $goods['unit'] == 'month'}月{elseif $goods['unit'] == 'day'}日{elseif $goods['unit'] == 'year'}年{/if}{/if}</span></td>
  51. <td class="td_3">
  52. <a href="{php echo $this->createWebUrl('goodsbuyer', array('operate' => 'goods_info', 'direct' => 1, 'goods' => $goods['id']))}" class="more">查看详情 >
  53. </a>
  54. </td>
  55. </tr>
  56. <tr class="submenu">
  57. <td class="td_one" colspan="3">
  58. <span class="tit">可使用模块</span>
  59. <span class="icon">
  60. <i class="wi wi-wechat"></i> {php echo empty($module_groups[$goods['module_group']]['modules'])? 0 : count($module_groups[$goods['module_group']]['modules'])}
  61. <i class="wi wi-wxapp" ></i> {php echo empty($module_groups[$goods['module_group']]['wxapp'])? 0 : count($module_groups[$goods['module_group']]['wxapp'])}
  62. <i class="wi wi-pc-circle"></i> {php echo empty($module_groups[$goods['module_group']]['webapp'])? 0 : count($module_groups[$goods['module_group']]['webapp'])}
  63. <i class="wi wi-app"></i> {php echo empty($module_groups[$goods['module_group']]['phoneapp'])? 0 : count($module_groups[$goods['module_group']]['phoneapp'])}
  64. </span>
  65. </td>
  66. </tr>
  67. </table>
  68. </div>
  69. </div>
  70. {/loop}
  71. </div>
  72. </div>
  73. {/if}
  74. {if $_GPC['type'] == STORE_TYPE_USER_PACKAGE}
  75. <div><span class="wi wi-userjurisdiction">用户权限组</span></div>
  76. <div class="store">
  77. <div class="jurisdiction-list">
  78. {loop $store_goods $goods}
  79. <div class="panel we7-panel">
  80. <div class="panel-body">
  81. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  82. <tr class="group_menu">
  83. <td class="td_1"><span class="head"><i class="wi wi-userjurisdiction"></i></span></td>
  84. <td class="td_2"><span class="name">{$user_groups[$goods['user_group']]['name']}</span><span class="price">¥ {$goods['price']}元/{if $goods['type'] != STORE_TYPE_API}{if $goods['unit'] == 'month'}月{elseif $goods['unit'] == 'day'}日{elseif $goods['unit'] == 'year'}年{/if}{/if}</span></td>
  85. <td class="td_3">
  86. <a href="{php echo $this->createWebUrl('goodsbuyer', array('operate' => 'goods_info', 'direct' => 1, 'goods' => $goods['id']))}" class="more">查看详情 >
  87. </a>
  88. </td>
  89. </tr>
  90. <tr class="submenu">
  91. <td class="td_one" colspan="3">
  92. <span class="tit">可创建</span>
  93. <span class="icon">
  94. <i class="wi wi-wechat"></i> {$user_groups[$goods['user_group']]['maxaccount']}
  95. <i class="wi wi-wxapp" ></i> {$user_groups[$goods['user_group']]['maxwxapp']}
  96. <i class="wi wi-pc-circle"></i> {$user_groups[$goods['user_group']]['maxwebapp']}
  97. <i class="wi wi-app"></i> {$user_groups[$goods['user_group']]['maxphoneapp']}
  98. </span>
  99. </td>
  100. </tr>
  101. </table>
  102. </div>
  103. </div>
  104. {/loop}
  105. </div>
  106. </div>
  107. {/if}
  108. <div class="text-right">
  109. {$pager}
  110. </div>
  111. {elseif $operate == 'goods_info'}
  112. <div class="panel-body js-goods-buyer" ng-controller="goodsBuyerCtrl">
  113. <ol class="breadcrumb we7-breadcrumb">
  114. <a href="{php echo $this->createWebUrl('goodsbuyer', array('operate' => 'display', 'direct' => 1))}"><i class="wi wi-back-circle"></i> </a>
  115. <li>
  116. 商城列表
  117. </li>
  118. <li>
  119. {$goods['title']}
  120. </li>
  121. </ol>
  122. <div class="store {if $goods['type'] == STORE_TYPE_PACKAGE}jurisdiction-detail{else}module-detail{/if}">
  123. <div class="top">
  124. {if $goods['type'] == STORE_TYPE_API}
  125. <div class="icon"><span class="icon-box"><i class="wi wi-api"></i></span></div>
  126. {elseif in_array($goods['type'], array(STORE_TYPE_PACKAGE, STORE_TYPE_ACCOUNT, STORE_TYPE_WXAPP, STORE_TYPE_ACCOUNT_RENEW, STORE_TYPE_WXAPP_RENEW))}
  127. <div class="icon"><span class="icon-box"><i class="wi wi-appjurisdiction"></i></span></div>
  128. {elseif $goods['type'] == STORE_TYPE_USER_PACKAGE}
  129. <div class="icon"><span class="icon-box"><i class="wi wi-userjurisdiction"></i></span></div>
  130. {else}
  131. <div class="icon"><img src="{$goods['module']['logo']}" alt="icon" class="icon" onerror="this.src='./resource/images/nopic-107.png'"/></div>
  132. {/if}
  133. <div class="introduce">
  134. <div class="name">
  135. {if in_array($goods['type'], array(STORE_TYPE_MODULE, STORE_TYPE_WXAPP_MODULE, STORE_TYPE_API, STORE_TYPE_ACCOUNT_RENEW, STORE_TYPE_WXAPP_RENEW))}
  136. {$goods['title']}
  137. {elseif in_array($goods['type'], array(STORE_TYPE_ACCOUNT, STORE_TYPE_WXAPP))}
  138. 创建{$goods['num']}个{$goods['title']}
  139. {elseif $goods['type'] == STORE_TYPE_USER_PACKAGE}
  140. {$user_group_info['name']} 套餐
  141. {else}
  142. {$module_groups[$goods['module_group']]['name']} 套餐
  143. {/if}
  144. </div>
  145. <div class="help-block">
  146. {if in_array($goods['type'], array(STORE_TYPE_MODULE, STORE_TYPE_WXAPP_MODULE))}
  147. {$goods['synopsis']}
  148. {elseif in_array($goods['type'], array(STORE_TYPE_ACCOUNT, STORE_TYPE_WXAPP))}
  149. 增加创建{$goods['title']}数量
  150. {elseif $goods['type'] == STORE_TYPE_API}
  151. 总计<span class="color-red">{$goods['api_num']}{if $goods['unit'] == 'ten_thousand'}万次</span>{/if}浏览次数,不限时间
  152. {elseif $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}
  153. 延长公众号到期时间
  154. {elseif $goods['type'] == STORE_TYPE_WXAPP_RENEW}
  155. 延长小程序到期时间
  156. {else}
  157. 增加公众号应用,小程序,模板数量
  158. {/if}
  159. </div>
  160. </div>
  161. <div class="buy pull-right">
  162. <div class="price">单价¥<span class="fee">
  163. {$goods['price']}</span>
  164. {if $goods['type'] != STORE_TYPE_API}/{if $goods['unit'] == 'month'}{if $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}{$goods['account_num']}{elseif $goods['type'] == STORE_TYPE_WXAPP_RENEW}{$goods['wxapp_num']}{/if}月
  165. {elseif $goods['unit'] == 'day'}{if $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}{$goods['account_num']}{elseif $goods['type'] == STORE_TYPE_WXAPP_RENEW}{$goods['wxapp_num']}{/if}日
  166. {elseif $goods['unit'] == 'year'}{if $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}{$goods['account_num']}{elseif $goods['type'] == STORE_TYPE_WXAPP_RENEW}{$goods['wxapp_num']}{/if}年
  167. {/if}
  168. {/if}
  169. </div>
  170. <div class="buy-btn">
  171. {if in_array($goods['type'], array(STORE_TYPE_MODULE, STORE_TYPE_WXAPP_MODULE, STORE_TYPE_PACKAGE, STORE_TYPE_ACCOUNT_RENEW, STORE_TYPE_WXAPP_RENEW, STORE_TYPE_USER_PACKAGE))}
  172. <button class="btn btn-danger btn-lg" data-toggle="modal" data-target="#myModalBuy">立即购买</button>
  173. {elseif $goods['type'] == STORE_TYPE_API}
  174. <button class="btn btn-danger btn-lg" data-toggle="modal" data-target="#BuyApi">立即购买</button>
  175. {else}
  176. <button class="btn btn-danger btn-lg" data-toggle="modal" data-target="#Buyaccount">立即购买</button>
  177. {/if}
  178. </div>
  179. </div>
  180. </div>
  181. <div class="modal fade" id="myModalBuy">
  182. <div class="modal-dialog">
  183. <div class="modal-content">
  184. <div class="modal-header">
  185. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  186. <h4 class="modal-title">
  187. {if $goods['type'] == STORE_TYPE_PACKAGE}
  188. 购买应用套餐
  189. {elseif $goods['type'] == STORE_TYPE_USER_PACKAGE}
  190. 购买用户组权限套餐
  191. {elseif $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}
  192. 续费公众号
  193. {elseif $goods['type'] == STORE_TYPE_WXAPP_RENEW}
  194. 续费小程序
  195. {else}
  196. 购买<span>{$goods['title']}</span>应用
  197. {/if}
  198. </h4>
  199. </div>
  200. <div class="modal-body">
  201. <form action="" method="get" class="we7-form">
  202. <div class="form-group">
  203. <label class="control-label col-sm-2">应用单价</label>
  204. <div class="col-sm-8 form-control-static">¥{$goods['price']}{if $goods['type'] != STORE_TYPE_API}/
  205. {if $goods['unit'] == 'month'}{if $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}{$goods['account_num']}{elseif $goods['type'] == STORE_TYPE_WXAPP_RENEW}{$goods['wxapp_num']}{/if}月
  206. {elseif $goods['unit'] == 'day'}{if $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}{$goods['account_num']}{elseif $goods['type'] == STORE_TYPE_WXAPP_RENEW}{$goods['wxapp_num']}{/if}日
  207. {elseif $goods['unit'] == 'year'}{if $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}{$goods['account_num']}{elseif $goods['type'] == STORE_TYPE_WXAPP_RENEW}{$goods['wxapp_num']}{/if}年
  208. {/if}
  209. {/if}</div>
  210. </div>
  211. <div class="form-group">
  212. <label class="control-label col-sm-2">购买时长</label>
  213. <div class="col-sm-8">
  214. <div class="clearfix we7-margin-bottom-sm" style="line-height: 34px;">
  215. <input type="number" class="form-control pull-left" style="width: 80px;" value="1" ng-model="duration"/>&nbsp;
  216. {if $goods['type'] != STORE_TYPE_API}
  217. {if $goods['unit'] == 'month'}{if $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}*{$goods['account_num']}{elseif $goods['type'] == STORE_TYPE_WXAPP_RENEW}*{$goods['wxapp_num']}{/if}月
  218. {elseif $goods['unit'] == 'day'}{if $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}*{$goods['account_num']}{elseif $goods['type'] == STORE_TYPE_WXAPP_RENEW}*{$goods['wxapp_num']}{/if}日
  219. {elseif $goods['unit'] == 'year'}{if $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}*{$goods['account_num']}{elseif $goods['type'] == STORE_TYPE_WXAPP_RENEW}*{$goods['wxapp_num']}{/if}年
  220. {/if}
  221. {/if}
  222. {if $goods['type'] == STORE_TYPE_MODULE || $goods['type'] == STORE_TYPE_WXAPP_MODULE}
  223. ,有效期至{{ expiretime }}
  224. {/if}
  225. </div>
  226. <div class="select-btn">
  227. <button type="button" class="btn" ng-class="duration == 1? 'btn-primary' : 'btn-default'" ng-click="changeDuration(1)">1</button>
  228. <button type="button" class="btn" ng-class="duration == 3? 'btn-primary' : 'btn-default'" ng-click="changeDuration(3)">3</button>
  229. <button type="button" class="btn" ng-class="duration == 6? 'btn-primary' : 'btn-default'" ng-click="changeDuration(6)">6</button>
  230. <button type="button" class="btn" ng-class="duration == 12? 'btn-primary' : 'btn-default'" ng-click="changeDuration(12)">12</button>
  231. </div>
  232. </div>
  233. </div>
  234. {if in_array($goods['type'], array(STORE_TYPE_MODULE, STORE_TYPE_WXAPP_MODULE, STORE_TYPE_WXAPP_RENEW, STORE_TYPE_ACCOUNT_RENEW)) || $goods['type'] == STORE_TYPE_PACKAGE && !empty($user_account)}
  235. <div class="form-group">
  236. <label class="control-label col-sm-2">{if $goods['type'] == STORE_TYPE_WXAPP_MODULE}小程序{else}公众号{/if}</label>
  237. <div class="col-sm-10">
  238. <div class="clearfix" style="line-height: 34px;">
  239. <!-- <select class="we7-select" style="width:150px;" ng-model="{if $goods['type'] == STORE_TYPE_WXAPP_MODULE}wxapp{else}uniacid{/if}"> -->
  240. <select class="we7-select" style="width:150px;" ng-model="uniacid">
  241. <option value="{{ uniacid }}" ng-repeat="(uniacid, account) in account_list track by uniacid">{{ account.name }}</option>
  242. </select>
  243. <span class="text-error">注意!</span>请确认服务所需绑定的公众号,购买后不可更换.
  244. </div>
  245. </div>
  246. </div>
  247. {/if}
  248. {if $goods['type'] == STORE_TYPE_PACKAGE && !empty($wxapp_account_list)}
  249. <div class="form-group">
  250. <label class="control-label col-sm-2">小程序</label>
  251. <div class="col-sm-10">
  252. <div class="clearfix" style="line-height: 34px;">
  253. <select class="we7-select" style="width:150px;" ng-model="wxapp">
  254. <option value="{{ account.uniacid }}" ng-repeat="account in wxapp_account_list">{{ account.name }}</option>
  255. </select>
  256. <span class="text-error">注意!</span>请确认服务所需绑定的小程序,购买后不可更换.
  257. </div>
  258. </div>
  259. </div>
  260. {/if}
  261. <div class="form-group">
  262. <label class="control-label col-sm-2">费用明细</label>
  263. <div class="col-sm-8 form-control-static">实付总计<span class="we7-margin-left">¥{{ price }}</span></div>
  264. </div>
  265. <div class="form-group">
  266. <label class="control-label col-sm-2">支付方式</label>
  267. <div class="select-btn">
  268. <button type="button" ng-repeat="(way, pay_way_info) in pay_way_list track by way" ng-class="pay_way == way? 'btn btn-primary' : 'btn btn-default'" ng-click="changePayWay(way)">{{ pay_way_info.title }}</button>
  269. </div>
  270. </div>
  271. </form>
  272. </div>
  273. <div class="modal-footer">
  274. <button type="button" class="btn btn-primary" ng-click="submit_order('order')">提交订单</button>
  275. <button type="button" class="btn btn-primary hidden" ng-click="submit_order('pay')">立即支付</button>
  276. </div>
  277. </div>
  278. </div>
  279. </div>
  280. <div class="modal fade" id="Buyaccount">
  281. <div class="modal-dialog">
  282. <div class="modal-content">
  283. <div class="modal-header">
  284. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  285. <h4 class="modal-title">购买<span>{$goods['title']}</span></h4>
  286. </div>
  287. <div class="modal-body">
  288. <form action="" method="get" class="we7-form">
  289. <div class="form-group">
  290. <label class="control-label col-sm-2">应用单价</label>
  291. <div class="col-sm-8 form-control-static">¥{$goods['price']}{if $goods['type'] != STORE_TYPE_API}/{if $goods['unit'] == 'month'}月{elseif $goods['unit'] == 'day'}日{elseif $goods['unit'] == 'year'}年{/if}{/if}</div>
  292. </div>
  293. <div class="form-group">
  294. <label class="control-label col-sm-2">费用明细</label>
  295. <div class="col-sm-8 form-control-static">实付总计<span class="we7-margin-left">¥{{ price }}</span></div>
  296. </div>
  297. <div class="form-group">
  298. <label class="control-label col-sm-2">支付方式</label>
  299. <div class="select-btn">
  300. <button type="button" ng-repeat="(way, pay_way_info) in pay_way_list track by way" ng-class="pay_way == way? 'btn btn-primary' : 'btn btn-default'" ng-click="changePayWay(way)">{{ pay_way_info.title }}</button>
  301. </div>
  302. </div>
  303. </form>
  304. </div>
  305. <div class="modal-footer">
  306. <button type="button" class="btn btn-primary" ng-click="submit_order('order')">提交订单</button>
  307. <button type="button" class="btn btn-primary" ng-click="submit_order('pay')">立即支付</button>
  308. </div>
  309. </div>
  310. </div>
  311. </div>
  312. <div class="modal fade" id="BuyApi">
  313. <div class="modal-dialog">
  314. <div class="modal-content">
  315. <div class="modal-header">
  316. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  317. <h4 class="modal-title">购买API浏览次数</h4>
  318. </div>
  319. <div class="modal-body">
  320. <form action="" method="get" class="we7-form">
  321. <div class="form-group">
  322. <label class="control-label col-sm-2">商品单价</label>
  323. <div class="col-sm-8 form-control-static color-red">¥{$goods['price']} / {$goods['api_num']}{if $goods['unit'] == 'ten_thousand'}万次{/if}</div>
  324. </div>
  325. <div class="form-group">
  326. <label class="control-label col-sm-2">购买份数</label>
  327. <div class="col-sm-8">
  328. <div class="clearfix we7-margin-bottom-sm" style="line-height: 34px;">
  329. <input type="number" class="form-control pull-left" style="width: 80px;" value="1" ng-model="duration"/>份,共购买<span class="color-red" ng-bind="goods.api_num * duration"></span>万次浏览量
  330. </div>
  331. <div class="select-btn">
  332. <button type="button" class="btn" ng-class="duration == 10? 'btn-primary' : 'btn-default'" ng-click="changeDuration(10)">10</button>
  333. <button type="button" class="btn" ng-class="duration == 20? 'btn-primary' : 'btn-default'" ng-click="changeDuration(20)">20</button>
  334. <button type="button" class="btn" ng-class="duration == 30? 'btn-primary' : 'btn-default'" ng-click="changeDuration(30)">30</button>
  335. <button type="button" class="btn" ng-class="duration == 50? 'btn-primary' : 'btn-default'" ng-click="changeDuration(50)">50</button>
  336. </div>
  337. </div>
  338. </div>
  339. <div class="form-group">
  340. <label class="control-label col-sm-2">公众号</label>
  341. <div class="col-sm-10">
  342. <div class="clearfix" style="line-height: 34px;">
  343. <select class="we7-select" style="width:150px;" ng-model="uniacid">
  344. <option value="{{ uniacid }}" ng-repeat="(uniacid, account) in account_list track by uniacid">{{ account.name }}</option>
  345. </select>
  346. <span class="text-error">注意!</span>请确认服务所需绑定的公众号,购买后不可更换.
  347. </div>
  348. </div>
  349. </div>
  350. <div class="form-group">
  351. <label class="control-label col-sm-2">费用明细</label>
  352. <div class="col-sm-8 form-control-static">实付总计 ¥<span class="color-red" ng-bind="goods.price * duration"></span></div>
  353. </div>
  354. <div class="form-group">
  355. <label class="control-label col-sm-2">支付方式</label>
  356. <div class="select-btn">
  357. <button type="button" ng-repeat="(way, pay_way_info) in pay_way_list track by way" class="btn" ng-class="pay_way == way? 'btn-primary' : 'btn-default'" ng-click="changePayWay(way)">{{ pay_way_info.title }}</button>
  358. </div>
  359. </div>
  360. </form>
  361. </div>
  362. <div class="modal-footer">
  363. <button type="button" class="btn btn-primary" ng-click="submit_order('order')">提交订单</button>
  364. <button type="button" class="btn btn-primary" ng-click="submit_order('pay')">立即支付</button>
  365. </div>
  366. </div>
  367. </div>
  368. </div>
  369. {if in_array($goods['type'], array(STORE_TYPE_MODULE, STORE_TYPE_WXAPP_MODULE))}
  370. <div class="swiper">
  371. <div class="swiper-container">
  372. <div class="swiper-wrapper">
  373. {loop $goods['slide'] $picture}
  374. <div class="swiper-slide"><img src="{php echo tomedia($picture)}" alt="" class="img-responsive"/></div>
  375. {/loop}
  376. </div>
  377. <div class="swiper-button-prev"></div>
  378. <div class="swiper-button-next"></div>
  379. </div>
  380. </div>
  381. <div class="summary">
  382. <div class="title">应用介绍</div>
  383. <div class="content">
  384. {$goods['description']}
  385. </div>
  386. </div>
  387. {elseif in_array($goods['type'], array(STORE_TYPE_ACCOUNT, STORE_TYPE_WXAPP, STORE_TYPE_API))}
  388. <div class="summary">
  389. <div class="title">商品介绍</div>
  390. <div class="content help-block">
  391. {if $goods['type'] == STORE_TYPE_API}
  392. 购买API浏览次数,购买之后使用时间不限
  393. {else}
  394. 1.购买商品后您将多创建{$goods['num']}个{$goods['title']}, 不受已有用户组限制。<br/>
  395. 2.购买的{$goods['title']}是有时效的,到期需要继续购买方可使用。
  396. {/if}
  397. </div>
  398. </div>
  399. {elseif in_array($goods['type'], array(STORE_TYPE_ACCOUNT_RENEW, STORE_TYPE_WXAPP_RENEW))}
  400. <div class="summary">
  401. <div class="title">商品介绍</div>
  402. <div class="content help-block">
  403. {if $goods['type'] == STORE_TYPE_ACCOUNT_RENEW}
  404. 续费公众号
  405. {else}
  406. 续费小程序
  407. {/if}
  408. </div>
  409. </div>
  410. {elseif $goods['type'] == STORE_TYPE_USER_PACKAGE}
  411. <div class="bg-gray">
  412. <div class="txt">
  413. <p>购买商品后您将拥有相应的公众号应用,小程序应用,模板的使用权限,不受已有用户组的限制。 </p>
  414. </div>
  415. <div class="creat">
  416. <h1>可创建数量</h1>
  417. <ul class="clearfloat">
  418. <li>
  419. <div class="type"><div>公众号</div><i class="wi wi-wechat"></i></div>
  420. <div class="num">{$user_group_info['maxaccount']}</div>
  421. </li>
  422. <li>
  423. <div class="type"><div>子公众号</div><i class="wi wi-wechat"></i></div>
  424. <div class="num">{$user_group_info['maxsubaccount']}</div>
  425. </li>
  426. <li>
  427. <div class="type"><div>小程序</div><span><i class="wi wi-wxapp"></i></span></div>
  428. <div class="num">{$user_group_info['maxwxapp']}</div>
  429. </li>
  430. <li>
  431. <div class="type"><div>PC应用</div><i class="wi wi-pc"></i></div>
  432. <div class="num">{$user_group_info['maxwebapp']}</div>
  433. </li>
  434. <li>
  435. <div class="type"><div>APP</div><i class="wi wi-app"></i></div>
  436. <div class="num">{$user_group_info['maxphoneapp']}</div>
  437. </li>
  438. </ul>
  439. </div>
  440. <div class="about" >
  441. <h1>包含应用权限组</h1>
  442. <div class="box" >
  443. <div class="nav" ng-repeat="pack in packages">
  444. <div class="menu">
  445. <span class="pull-right link-group">
  446. <a href="javascript:;" class="open color-default" data-toggle="collapse" data-target="#demo-{{pack.id}}">展开</a>
  447. </span>
  448. {{ pack.name}}
  449. </div>
  450. <ul class="submenu" style="" id="demo-{{pack.id}}">
  451. <li ng-if="pack.modules">
  452. <span class="tit">公众号应用</span>
  453. <ul>
  454. <li ng-repeat="module in pack.modules">
  455. <img class="head" ng-src="{{module.logo}}}" alt=""><span class="name" ng-bind=" module.title "></span>
  456. </li>
  457. </ul>
  458. </li>
  459. <li ng-if="pack.wxapp">
  460. <span class="tit">小程序应用</span>
  461. <ul>
  462. <li ng-repeat="wxapp in pack.wxapp">
  463. <img class="head" ng-src="{{wxapp.logo}}"><span class="name" ng-bind="wxapp.title"></span>
  464. </li>
  465. </ul>
  466. </li>
  467. <li ng-if="pack.webapp">
  468. <span class="tit">PC应用</span>
  469. <ul >
  470. <li ng-repeat="webapp in pack.webapp">
  471. <img class="head" ng-src="{{webapp.logo}}"><span class="name" ng-bind="webapp.title"> </span>
  472. </li>
  473. </ul>
  474. </li>
  475. <li ng-if="pack.phoneapp">
  476. <span class="tit">APP应用</span>
  477. <ul >
  478. <li ng-repeat="phoneapp in pack.phoneapp">
  479. <img class="head" ng-src="{{phoneapp.logo}}"><span class="name" ng-bind="phoneapp.title"> </span>
  480. </li>
  481. </ul>
  482. </li>
  483. </ul>
  484. </div>
  485. </div>
  486. </div>
  487. </div>
  488. {else}
  489. <div class="summary">
  490. <div class="color-gray">购买商品后您将拥有相应的公众号应用,小程序应用,模板的使用权限,不受已有用户组的限制。</div>
  491. <div class="title">公众号应用</div>
  492. <div class="item-list clearfix">
  493. {loop $module_groups[$goods['module_group']]['modules'] $module}
  494. <div class="item">
  495. <img src="{$module['logo']}" alt="" class="icon"/>
  496. <div class="text-over">{$module['title']}</div>
  497. </div>
  498. {/loop}
  499. </div>
  500. <div class="title">小程序应用</div>
  501. <div class="item-list clearfix">
  502. {loop $module_groups[$goods['module_group']]['wxapp'] $wxapp_module}
  503. <div class="item">
  504. <img src="{$wxapp_module['logo']}" alt="" class="icon"/>
  505. <div class="text-over">{$wxapp_module['title']}</div>
  506. </div>
  507. {/loop}
  508. </div>
  509. <div class="title">模板</div>
  510. <div class="item-list clearfix">
  511. {loop $module_groups[$goods['module_group']]['templates'] $template}
  512. <div class="item">
  513. <div class="text-over">{$template['title']}</div>
  514. </div>
  515. {/loop}
  516. </div>
  517. </div>
  518. {/if}
  519. </div>
  520. </div>
  521. <script>
  522. {php $first_account = current($user_account);}
  523. angular.module('storeApp').value('config', {
  524. 'singlePrice' : {$goods['price']},
  525. 'wxapp' : '{$default_wxapp}',
  526. 'unit' : '{$goods['unit']}',
  527. account_list : {php echo json_encode($user_account)},
  528. wxapp_account_list : {php echo json_encode($wxapp_account_list)},
  529. pay_way : {php echo json_encode($pay_way)},
  530. expiretime : "{php echo date('Y-m-d', strtotime('+1 ' . $goods['unit'], time()))}",
  531. first_uniacid : "{$default_account}",
  532. goods : {php echo json_encode($goods)},
  533. packages : {php echo !empty($user_group_info['package_info']) ? json_encode($user_group_info['package_info']) : 'null'},
  534. });
  535. angular.bootstrap($('.js-goods-buyer'), ['storeApp']);
  536. $(function() {
  537. require(['swiper'], function () {
  538. var mySwiper = new Swiper('.swiper-container', {
  539. loop: true,
  540. width: 240,
  541. height: 400,
  542. spaceBetween: 20,
  543. // 如果需要前进后退按钮
  544. nextButton: '.swiper-button-next',
  545. prevButton: '.swiper-button-prev'
  546. })
  547. });
  548. });
  549. </script>
  550. {/if}
  551. {template 'common/footer'}