post.html 8.2 KB

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