人人商城

post.html 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. {template 'common/header'}
  2. <div class="account-list-add-step" id="js-miniapp-create" ng-controller="CreateMiniappCtrl" ng-cloak>
  3. <ol class="breadcrumb we7-breadcrumb">
  4. <a href="{php echo url('account/manage', array('account_type' => ACCOUNT_TYPE_ALIAPP_NORMAL))}"><i class="wi wi-back-circle"></i></a>
  5. <li><a href="{php echo url('account/manage', array('account_type' => ACCOUNT_TYPE_ALIAPP_NORMAL))}">支付宝小程序列表</a></li>
  6. <li>新建支付宝小程序</li>
  7. </ol>
  8. <div class="we7-step">
  9. <ul>
  10. <li ng-class="createStep == 1 ? 'active': ''">1 设置支付宝小程序信息</li>
  11. <li ng-class="createStep == 2 ? 'active': ''">2 生成版本</li>
  12. </ul>
  13. </div>
  14. <form method="post" ng-submit="package()">
  15. <input name="token" type="hidden" value="{$_W['token']}">
  16. <div class="panel panel-app">
  17. <div class="panel-body">
  18. <div class="wxapp-content tab-content" style="width: 100%;">
  19. <div id="select" ng-show="createStep == 1">
  20. <div class="form-defalut we7-form">
  21. {if empty($uniacid)}
  22. <div class="form-group">
  23. <label for="" class="control-label col-sm-2">支付宝小程序名称</label>
  24. <div class="form-controls col-sm-10">
  25. <input type="text" name="name" ng-model="miniapp.name" class="form-control wxapp-name" placeholder="小程序名称">
  26. </div>
  27. </div>
  28. <div class="form-group">
  29. <label for="" class="control-label col-sm-2">支付宝小程序描述</label>
  30. <div class="form-controls col-sm-10">
  31. <input type="text" name="description" ng-model="miniapp.description" class="form-control wxapp-name" placeholder="版本描述">
  32. </div>
  33. </div>
  34. <div class="form-group">
  35. <label for="" class="control-label col-sm-2">AppId</label>
  36. <div class="form-controls col-sm-10">
  37. <input type="text" name="key" value="" ng-model="miniapp.appid" class="form-control wxapp-name" placeholder="AppId">
  38. </div>
  39. </div>
  40. {else}
  41. <div class="form-group">
  42. <label for="" class="control-label col-sm-2">版本描述</label>
  43. <div class="form-controls col-sm-10">
  44. <input type="text" name="description" ng-model="miniapp.description" class="form-control wxapp-name" placeholder="版本描述">
  45. </div>
  46. </div>
  47. {/if}
  48. <div class="form-group">
  49. <label for="" class="control-label col-sm-2">版本号</label>
  50. <div class="form-controls col-sm-10">
  51. <input type="text" name="version" ng-model="miniapp.version" class="form-control wxapp-name" placeholder="版本号,只能是数字、点,数字最多两位,例如 1.01 / 1.0.1">
  52. </div>
  53. </div>
  54. <div class="form-group" ng-show="newversion">
  55. <label for="" class="control-label col-sm-2">头像</label>
  56. <div class="form-controls col-sm-8">
  57. <div class="input-more we7-input-img" ng-class="{'active': miniapp.headimg}">
  58. <img ng-src="{{miniapp.headimg}}" width="150px" ng-if="miniapp.headimg" ng-style="{'height': 'auto'}">
  59. <a href="javascript:;" class="input-addon" ng-click="uploadMultiImage('headimg')" ng-hide="miniapp.headimg"><span>+</span></a>
  60. <input type="text" name="headimg" ng-model="miniapp.headimg" ng-style="{'display' : 'none'}">
  61. <div class="cover-dark">
  62. <a href="javascript:;" class="cut" ng-click="uploadMultiImage('headimg')">更换</a>
  63. <a href="javascript:;" class="del" ng-click="delMultiImage('headimg')"><i class="fa fa-times text-danger"></i></a>
  64. </div>
  65. </div>
  66. <span class="help-block"></span>
  67. </div>
  68. </div>
  69. <div class="form-group" ng-show="newversion">
  70. <label for="" class="control-label col-sm-2">二维码</label>
  71. <div class="form-controls col-sm-8">
  72. <div class="input-more we7-input-img" ng-class="{'active': miniapp.qrcode}">
  73. <img ng-src="{{miniapp.qrcode}}" width="150px" ng-if="miniapp.qrcode" ng-style="{'height': 'auto'}">
  74. <a href="javascript:;" class="input-addon" ng-click="uploadMultiImage('qrcode')" ng-hide="miniapp.qrcode"><span>+</span></a>
  75. <input type="text" name="qrcode" ng-model="miniapp.qrcode" ng-style="{'display' : 'none'}">
  76. <div class="cover-dark">
  77. <a href="javascript:;" class="cut" ng-click="uploadMultiImage('qrcode')">更换</a>
  78. <a href="javascript:;" class="del" ng-click="delMultiImage('qrcode')"><i class="fa fa-times text-danger"></i></a>
  79. </div>
  80. </div>
  81. <span class="help-block"></span>
  82. </div>
  83. </div>
  84. <div class="form-group">
  85. <input type="hidden" name="modules" value="">
  86. <label class="control-label col-sm-2">添加应用</label>
  87. <div class="form-controls col-sm-10">
  88. <ul class="app-list" id="resource_module">
  89. <div class="app-info">
  90. <img ng-src="{{miniapp.choose_module.icon}}" />
  91. <p>{{miniapp.choose_module.title}}</p>
  92. </div>
  93. <li class="select select-more"></li>
  94. </ul>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <div id="finish" ng-show="createStep == 2">
  100. <div class="form we7-form wxapp-finish">
  101. <div class="form-group" ng-show="newversion">
  102. <label for="" class="control-label col-sm-2">小程序名称</label>
  103. <div class="form-controls col-sm-10">
  104. <p class="form-control-static" ng-bind="miniapp.name"></p>
  105. </div>
  106. </div>
  107. <div class="form-group">
  108. <label for="" class="control-label col-sm-2">描述</label>
  109. <div class="form-controls col-sm-10">
  110. <p class="form-control-static" ng-bind="miniapp.description"></p>
  111. </div>
  112. </div>
  113. <div class="form-group">
  114. <label class="control-label col-sm-2">版本号</label>
  115. <div class="form-controls col-sm-10">
  116. <p class="form-control-static">{{miniapp.version}}</p>
  117. </div>
  118. </div>
  119. <div class="form-group">
  120. <label class="control-label col-sm-2">打包应用</label>
  121. <div class="form-controls col-sm-10">
  122. <ul class="app-list">
  123. <li class="select">
  124. <div class="app-info">
  125. <img ng-src="{{miniapp.choose_module.icon}}" />
  126. <p>{{miniapp.choose_module.title}}</p>
  127. </div>
  128. </li>
  129. </ul>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. <nav class="navbar navbar-wxapp-bottom navbar-fixed-bottom" role="navigation">
  138. <div class="container">
  139. <div class="pager">
  140. <a type="button" class="btn btn-primary" ng-show="createStep != 1" ng-click="prevStep()">上一步</a>
  141. <a type="button" class="btn btn-primary" ng-show="createStep != 2" ng-click="nextStep()">下一步</a>
  142. <button type="submit" name="submit" value="yes" class="btn btn-danger" ng-show="createStep == 2">生成版本</button>
  143. </div>
  144. </div>
  145. </nav>
  146. </form>
  147. </div>
  148. <script>
  149. require(['fileUploader','underscore'], function(uploader){
  150. var miniapp = {'name' : '{$wxapp_info['name']}'};
  151. angular.module('wxApp').value('config', {
  152. 'type' : "{$type}",
  153. 'miniapp' : miniapp,
  154. 'uniacid' : "{$uniacid}",
  155. 'version_id' : "{$version_id}",
  156. 'postUrl' : "{php echo url('miniapp/post', array('version_id' => $version_id))}",
  157. 'token' : "{$_W['token']}",
  158. });
  159. angular.bootstrap($('#js-miniapp-create'), ['wxApp']);
  160. });
  161. </script>
  162. </html>