index.axml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <view class="box scroll-area">
  2. <view class="menu">
  3. <view
  4. a:for="{{menuList}}"
  5. a:for-index="menuIndex"
  6. a:for-item="menuItem"
  7. class="menu-item {{activeTab==menuItem.id?'background':''}}"
  8. data-item="{{menuItem}}"
  9. data-index="{{menuIndex}}"
  10. onTap="onMenuChange"
  11. >
  12. <view a:if="{{ activeTab==menuItem.id }}" class="bor-t"></view>
  13. {{menuItem.name}}
  14. <view a:if="{{ activeTab==menuItem.id }}" class="bor-b"></view>
  15. </view>
  16. </view>
  17. <view class="center">
  18. <view
  19. a:for="{{menuList}}"
  20. a:for-index="menuIndex"
  21. a:for-item="menuItem"
  22. class="{{`scroll-item menu-box-${menuItem.id}`}}"
  23. id="{{`menu-box-${menuItem.id}`}}"
  24. data-item="{{menuItem}}"
  25. data-id="{{menuItem.id}}"
  26. >
  27. <!--<block a:if="{{ menuItem.id == -1}}">
  28. <container title="webview">
  29. </container>
  30. <view class="content">
  31. <ant-button
  32. type="primary"
  33. onTap="goToWebView"
  34. >
  35. location
  36. </ant-button>
  37. </view>
  38. </block>-->
  39. <block a:if="{{ menuItem.id == 0}}">
  40. <container title="系统信息">
  41. <view slot="headerRight" onTap="changeMsg" style="font-size: 16px;">
  42. {{isKEightDevice?'该设备支持刷脸核身':'该设备不支持刷脸核身'}}
  43. </view>
  44. <view class="content">
  45. <list a:if="{{ isKEightDevice && showSystemInfo }}" radius="">
  46. <list-item extraBrief="{{systemInfo.arome_hardwareName}}">设备型号</list-item>
  47. <list-item extraBrief="{{systemInfo.arome_deviceId}}">设备SN</list-item>
  48. <list-item extraBrief="{{systemInfo.arome_hostAppId}}">小程序APPID</list-item>
  49. <list-item extraBrief="{{systemInfo.productId}}">设备PRODUCTID</list-item>
  50. </list>
  51. </view>
  52. <view
  53. a:if="{{ systemInfoStr && showSystemInfo }}"
  54. class="result"
  55. style="font-size: 0.18rem;"
  56. >
  57. {{systemInfoStr}}
  58. </view>
  59. </container>
  60. <container title="初始化刷脸服务">
  61. <view slot="headerRight">
  62. <icon onTap="close" data-type="init" type="RedoOutline" style="font-size: 25px; margin-right: 15px" />
  63. <icon
  64. onTap="doSetting"
  65. data-type="init"
  66. type="SetOutline"
  67. style="font-size: 25px"
  68. />
  69. </view>
  70. <view class="content">
  71. <ant-button
  72. type="primary"
  73. subText="aromeInitBpaasService"
  74. onTap="doInit"
  75. >
  76. (1)初始化刷脸服务
  77. </ant-button>
  78. <view a:if="{{ initObj }}" class="result" style="font-size: 0.18rem;">
  79. <view style="font-size: 0.18rem;line-height: 0.5rem;height: 0.5rem;">入参:</view>
  80. {{initObj}}
  81. </view>
  82. <view a:if="{{ initResult }}" class="result" style="font-size: 0.18rem;">
  83. <view style="font-size: 0.18rem;line-height: 0.5rem;height: 0.5rem;">结果:</view>
  84. {{initResult}}
  85. </view>
  86. </view>
  87. </container>
  88. <container title="调用1:N刷脸服务">
  89. <view slot="headerRight">
  90. <icon
  91. onTap="close"
  92. data-type="oneVN"
  93. type="RedoOutline"
  94. style="font-size: 25px; margin-right: 15px"
  95. />
  96. <icon
  97. onTap="doSetting"
  98. data-type="oneVN"
  99. type="SetOutline"
  100. style="font-size: 25px"
  101. />
  102. </view>
  103. <view class="content">
  104. <ant-button
  105. type="primary"
  106. subText="aromeStartBpaasService"
  107. onTap="doOneVN"
  108. >
  109. (2)调用1:N刷脸服务
  110. </ant-button>
  111. <view a:if="{{ oneVNObj }}" class="result" style="font-size: 0.18rem;">
  112. <view style="font-size: 0.18rem;line-height: 0.5rem;height: 0.5rem;">入参:</view>
  113. {{oneVNObj}}
  114. </view>
  115. <view a:if="{{ oneVNResult }}" class="result" style="font-size: 0.18rem;">
  116. <view style="font-size: 0.18rem;line-height: 0.5rem;height: 0.5rem;">结果:</view>
  117. {{oneVNResult}}
  118. </view>
  119. </view>
  120. </container>
  121. <container title="调用订阅授权服务">
  122. <view slot="headerRight">
  123. <icon onTap="close" data-type="auth" type="RedoOutline" style="font-size: 25px; margin-right: 15px" />
  124. <icon
  125. onTap="doSetting"
  126. data-type="auth"
  127. type="SetOutline"
  128. style="font-size: 25px"
  129. />
  130. </view>
  131. <view class="content">
  132. <ant-button
  133. type="primary"
  134. subText="aromeBPaasNoFaceAuth"
  135. onTap="doAuth"
  136. >
  137. (3)调用订阅授权服务
  138. </ant-button>
  139. <view a:if="{{ authObj }}" class="result" style="font-size: 0.18rem;">
  140. <view style="font-size: 0.18rem;line-height: 0.5rem;height: 0.5rem;">入参:</view>
  141. {{authObj}}
  142. </view>
  143. <view a:if="{{ authResult }}" class="result" style="font-size: 0.18rem;">
  144. <view style="font-size: 0.18rem;line-height: 0.5rem;height: 0.5rem;">结果:</view>
  145. {{authResult}}
  146. </view>
  147. </view>
  148. </container>
  149. </block>
  150. <block a:elif="{{ menuItem.id == 19}}">
  151. <container title="在线地址">
  152. <view slot="headerRight">
  153. <icon
  154. onTap="close"
  155. data-type="imgUpload"
  156. type="RedoOutline"
  157. style="font-size: 25px; margin-right: 15px"
  158. />
  159. </view>
  160. <view class="content" style="font-size: 0.18rem;">
  161. 在线URL:
  162. <textarea
  163. class="form-textarea"
  164. placeholder="请编辑线上url地址"
  165. value="{{downloadFileChunkItem.originalUrl}}"
  166. auto-height
  167. style="width:100%"
  168. data-field="originalUrl"
  169. onInput="handleChange"
  170. maxlength="-1"
  171. >
  172. </textarea>
  173. 文件名:
  174. <textarea
  175. class="form-textarea"
  176. placeholder="请编辑保存的文件名"
  177. value="{{downloadFileChunkItem.fileName}}"
  178. auto-height
  179. style="width:100%"
  180. data-field="fileName"
  181. onInput="handleChange"
  182. maxlength="-1"
  183. >
  184. </textarea>
  185. <view class="upload-content-btn" onTap="handleUpload" data-type="img">
  186. 切片上传
  187. </view>
  188. <block a:if="{{ downloadFileChunkItem.status == 'success' }}">
  189. {{downloadFileChunkItem.fileType}}
  190. <image
  191. a:if="{{ downloadFileChunkItem.fileType == 'image' }}"
  192. src='{{downloadFileChunkItem.url}}'
  193. class='img'
  194. >
  195. </image>
  196. <video
  197. a:elif="{{ downloadFileChunkItem.fileType == 'video' }}"
  198. class='img'
  199. src="{{downloadFileChunkItem.url}}"
  200. />
  201. <view style="font-size: 0.18rem;">
  202. {{`分片 ${downloadFileChunkItem.chunkIndex}/${downloadFileChunkItem.totalChunks} 上传成功`}}
  203. </view>
  204. </block>
  205. <view
  206. a:elif="{{ downloadFileChunkItem.status == 'error' }}"
  207. class="result"
  208. style="font-size: 0.18rem;"
  209. >
  210. <view style="font-size: 0.18rem;line-height: 0.5rem;height: 0.5rem;">结果:</view>
  211. {{downloadFileChunkItem.errorTips}}
  212. </view>
  213. <view a:elif="{{ downloadFileChunkItem.status == 'padding' }}">
  214. 上传中.....
  215. </view>
  216. </view>
  217. </container>
  218. <!--<container title="视频上传"><view slot="headerRight"><icon
  219. onTap="close"
  220. data-type="videoUpload"
  221. type="RedoOutline"
  222. style="font-size: 25px; margin-right: 15px"
  223. /></view><view class="content"><view class="upload-content-btn" onTap="handleUpload" data-type="video">
  224. 上传</view><video
  225. class='img'
  226. style="width:{{videoChunkItem.width/2}}px;height:{{videoChunkItem.height/2}}px"
  227. src="{{videoChunkItem.url}}"
  228. /><view style="font-size: 0.18rem;">
  229. {{`分片 ${videoChunkItem.chunkIndex}/${videoChunkItem.totalChunks} 上传成功`}}</view></view></container>-->
  230. </block>
  231. <block a:else>
  232. <hh-event
  233. a:for="{{ menuItem.ampe_params }}"
  234. number="{{item.number}}"
  235. name="{{item.name}}"
  236. initParams="{{item.initParams}}"
  237. aromeCode="{{item.aromeCode}}"
  238. isCumulative="{{item.isCumulative}}"
  239. tips="{{item.tips || ''}}"
  240. >
  241. </hh-event>
  242. </block>
  243. </view>
  244. </view>
  245. </view>