welcome-test.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>欢迎-创业帮</title>
  6. <meta name="keywords" content="欢迎-创业帮">
  7. <meta name="description" content="欢迎-创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="欢迎-创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <meta name="referrer" content="no-referrer">
  16. <link rel="stylesheet" href="./static/css/main.css"><link rel=" stylesheet" type="text/css" href="css/tinytools.tourtip.min.css">
  17. <style>
  18. .screenroll::-webkit-scrollbar {
  19. display: none;
  20. }
  21. .screenroll{
  22. height:calc(100vh - 1.7rem) !important;
  23. }
  24. .screenroll img {
  25. width:100%;
  26. }
  27. @keyframes opac {
  28. 0% {
  29. opacity: .1;
  30. }
  31. 50% {
  32. opacity: 1;
  33. }
  34. 100% {
  35. opacity: .1;
  36. }
  37. }
  38. @keyframes opac1 {
  39. from {
  40. width: 0;
  41. }
  42. to {
  43. width: 100%;
  44. }
  45. }
  46. .option {
  47. background-color:red;
  48. border-radius:50%;
  49. width:100px;
  50. height:100px;
  51. left:50%;
  52. top:50%;
  53. -webkit-animation:opac 1s ease-in infinite; /* Safari and Chrome */
  54. }
  55. .fxkdom{
  56. height:300px;
  57. overflow: scroll;
  58. background-color:blue;
  59. -webkit-overflow-scrolling: touch;
  60. }
  61. </style>
  62. </head>
  63. <body class="pb0 ovh h100p">
  64. <div class="iphonetitle"> </div>
  65. <div id="app" v-cloak>
  66. <van-sticky>
  67. <van-nav-bar class="camp_title user_title_normal" title="详情123" @click-left="backbtn" left-arrow v-if="toptitleisshow">
  68. <template #left>
  69. <van-icon name="arrow-left" color="#000" size="20"></van-icon><span>{{Title}}</span>
  70. </template>
  71. </van-nav-bar>
  72. </van-sticky>
  73. <div class="screenroll rel ovh" style="-webkit-overflow-scrolling: auto;" @touchstart="gtouchstart" @touchend="gtouchend">
  74. <h1 @click="goharf">未知页面跳转</h1>
  75. <h1>{{testsize}}</h1>
  76. <h1 @click="stop">停止</h1>
  77. <h1 @click="getprogress">当前进度:{{progress}}</h1>
  78. <van-uploader :after-read="afterRead"></van-uploader>
  79. <h1>这是底部111</h1>
  80. <h1 @click="videofn">视频</h1>
  81. <h1 @click="leader">盟主中心</h1>
  82. <h1 @click="walist">分仓列表中心</h1>
  83. <h1 @click="double">获取设备号</h1>
  84. <h1 @click="login">登录模拟</h1>
  85. <h1>这是设备号DeviceId: {{DeviceId}}</h1>
  86. <h1 @click="SetBadgeValue">设置角标</h1>
  87. <h1 @click="ClearBadgeValue">清除角标</h1>
  88. <h1 @click="ocr">提现页面test</h1>
  89. <h1 @click="gominiprogram">跳转小程序1</h1>
  90. <h1 @click="gominiprogram2">跳转小程序2</h1>
  91. <h1 @click="destroy()">销毁全部小程序</h1>
  92. <h1 @click="destroy('miniapp-demo2')">销毁小程序2</h1>
  93. <h1 @click="scale">密码保险箱</h1>
  94. <h1 @click="cancellation">配置新页面2</h1>
  95. <h1 @click="ocrpage">滑动</h1>
  96. <h1 @click="openservice">排行榜页面</h1>
  97. <h1 @click="query">资质</h1>
  98. <h1 @click="warehouse">仓库</h1>
  99. <h1 @click="bocr">OCRIdbackCard反面</h1>
  100. <h1 @click="ocrbank">OCRBankCard银行卡</h1><a href="https://www.baidu.com">测试链接 </a>
  101. <div>身份证图片</div><img :src="ocrimg" alt="">
  102. <div>姓名:{{cardname}}</div>
  103. <div>身份证号码:{{cardnum}}</div>
  104. <div>身份证有效期:{{date}}</div>
  105. <div>银行卡图片</div><img :src="ocrbankimg" alt="">
  106. <div>银行卡号码:{{bankcardnum}}</div>
  107. <div>银行卡有效期:{{bankcardexpore}}</div>
  108. <div>Url:{{imgurl}}</div>
  109. </div>
  110. </div>
  111. <script src="./static/js/upload-min-oss.js"></script>
  112. <script src="./static/js/klm-vv.min.js"></script>
  113. <script src="./static/js/appfunc.min.js"></script>
  114. <script src="./static/js/klm-axios-config.js"></script>
  115. <script src="./static/js/publicfn.js"></script>
  116. <script src="./static/js/libpag.js"></script>
  117. <script src="./static/js/uploadfile.js"></script>
  118. <script src="https://s.url.cn/qqun/qun/qqweb/m/qun/confession/js/vconsole.min.js"></script>
  119. <script>
  120. // 清除所有小程序
  121. function MiniAppDelete(type = '') {
  122. // 'all':所有 'miniappid':当前ID小程序
  123. if(type === ''){throw new Error('MiniAppDelete should parameter!');}else{
  124. if (isWeChat || isAlipay || isWeb || isMiniProgram) {
  125. Cookies.set(Key, Value);
  126. } else if (isAndroid) {
  127. Func.MiniAppDelete(deletetype);
  128. } else if (isIOS) {
  129. var row = '{';
  130. row += '"all":"' + type + '"';
  131. row += '}';
  132. window.webkit.messageHandlers.MiniAppDelete.postMessage(JSON.parse(row));
  133. }
  134. }
  135. };
  136. Vue.use(vant.Lazyload);
  137. // 在 #app 标签下渲染一个按钮组件
  138. let app = new Vue({
  139. el: '#app',
  140. data() {
  141. return {
  142. DeviceId:'',
  143. Title:'12',
  144. toptitleisshow:true,
  145. articleinfo:{
  146. Title: '',
  147. Contents:''
  148. },
  149. isId:true,
  150. testsize:'test',
  151. file:'',
  152. ocrimg:'',
  153. ocrbankimg:'',
  154. bankcardnum:'',
  155. cardnum:'',
  156. date:'',
  157. cardname:'',
  158. bankcardexpore:'',
  159. imgurl:'',
  160. pagY:'',
  161. pagY1:'',
  162. type:'',
  163. pagView:'',
  164. progress:'',
  165. isplay:true,
  166. client:'',
  167. };
  168. },
  169. created() {
  170. this.newuploadfile();
  171. //- this.type = browsertype.versions.ios ? 'ios' : 'android';
  172. //- this.getbannerinfo();
  173. //- this.iostest();
  174. //- this.test('./static/pag/active-double-particle.pag',390,390);
  175. window.webkit.messageHandlers.CloseBounces.postMessage({});
  176. },
  177. mounted: {
  178. },
  179. methods: {
  180. videofn(){
  181. var row = '{';
  182. row += '"Url":"user-maker-code",';
  183. row += '"VideoUrls":"https://www.apple.com/105/media/us/iphone-x/2017/01df5b43-28e4-4848-bf20-490c34a926a7/films/feature/iphone-x-feature-tpl-cc-us-20170912_1280x720h.mp4,https://www.apple.com/105/media/cn/mac/family/2018/46c4b917_abfd_45a3_9b51_4e3054191797/films/bruce/mac-bruce-tpl-cn-2018_1280x720h.mp4,https://www.apple.com/105/media/us/mac/family/2018/46c4b917_abfd_45a3_9b51_4e3054191797/films/peter/mac-peter-tpl-cc-us-2018_1280x720h.mp4,https://www.apple.com/105/media/us/mac/family/2018/46c4b917_abfd_45a3_9b51_4e3054191797/films/grimes/mac-grimes-tpl-cc-us-2018_1280x720h.mp4,http://flv3.bn.netease.com/tvmrepo/2018/6/H/9/EDJTRBEH9/SD/EDJTRBEH9-mobile.mp4,http://flv3.bn.netease.com/tvmrepo/2018/6/9/R/EDJTRAD9R/SD/EDJTRAD9R-mobile.mp4,http://www.flashls.org/playlists/test_001/stream_1000k_48k_640x360.m3u8,http://tb-video.bdstatic.com/tieba-video/7_517c8948b166655ad5cfb563cc7fbd8e.mp4,http://tb-video.bdstatic.com/tieba-smallvideo/68_20df3a646ab5357464cd819ea987763a.mp4,http://tb-video.bdstatic.com/tieba-smallvideo/118_570ed13707b2ccee1057099185b115bf.mp4,http://tb-video.bdstatic.com/tieba-smallvideo/15_ad895ac5fb21e5e7655556abee3775f8.mp4,http://tb-video.bdstatic.com/tieba-smallvideo/12_cc75b3fb04b8a23546d62e3f56619e85.mp4,http://tb-video.bdstatic.com/tieba-smallvideo/5_6d3243c354755b781f6cc80f60756ee5.mp4,http://tb-video.bdstatic.com/tieba-movideo/11233547_ac127ce9e993877dce0eebceaa04d6c2_593d93a619b0.mp4"';
  184. row += ',"Jump":"1"';
  185. row += '}';
  186. //- console.log(row)
  187. //- console.log(JSON.parse(row))
  188. window.webkit.messageHandlers.JumpVideo.postMessage(row);
  189. //- PublicLib.Goto({Url:'user-maker-code',VideoUrls:"https://www.apple.com/105/media/us/iphone-x/2017/01df5b43-28e4-4848-bf20-490c34a926a7/films/feature/iphone-x-feature-tpl-cc-us-20170912_1280x720h.mp4,https://www.apple.com/105/media/cn/mac/family/2018/46c4b917_abfd_45a3_9b51_4e3054191797/films/bruce/mac-bruce-tpl-cn-2018_1280x720h.mp4,https://www.apple.com/105/media/us/mac/family/2018/46c4b917_abfd_45a3_9b51_4e3054191797/films/peter/mac-peter-tpl-cc-us-2018_1280x720h.mp4,https://www.apple.com/105/media/us/mac/family/2018/46c4b917_abfd_45a3_9b51_4e3054191797/films/grimes/mac-grimes-tpl-cc-us-2018_1280x720h.mp4,http://flv3.bn.netease.com/tvmrepo/2018/6/H/9/EDJTRBEH9/SD/EDJTRBEH9-mobile.mp4,http://flv3.bn.netease.com/tvmrepo/2018/6/9/R/EDJTRAD9R/SD/EDJTRAD9R-mobile.mp4,http://www.flashls.org/playlists/test_001/stream_1000k_48k_640x360.m3u8,http://tb-video.bdstatic.com/tieba-video/7_517c8948b166655ad5cfb563cc7fbd8e.mp4,http://tb-video.bdstatic.com/tieba-smallvideo/68_20df3a646ab5357464cd819ea987763a.mp4,http://tb-video.bdstatic.com/tieba-smallvideo/118_570ed13707b2ccee1057099185b115bf.mp4,http://tb-video.bdstatic.com/tieba-smallvideo/15_ad895ac5fb21e5e7655556abee3775f8.mp4,http://tb-video.bdstatic.com/tieba-smallvideo/12_cc75b3fb04b8a23546d62e3f56619e85.mp4,http://tb-video.bdstatic.com/tieba-smallvideo/5_6d3243c354755b781f6cc80f60756ee5.mp4,http://tb-video.bdstatic.com/tieba-movideo/11233547_ac127ce9e993877dce0eebceaa04d6c2_593d93a619b0.mp4"});
  190. },
  191. leader(){
  192. PublicLib.Goto({Url:'user-leaderLevel-main'});
  193. },
  194. walist(){
  195. PublicLib.Goto({Url:'user-warehouse-mini-list'});
  196. },
  197. async login(){
  198. const DeviceType = browsertype.versions.ios ? 'ios' : 'android';
  199. const DeviceId = PublicLib.getCookieInfo('ApnsDeviceId');
  200. const value = JSON.stringify({Mobile:'14781419364',LoginPwd:'123456',DeviceId,DeviceType});
  201. const res = await getRequest('api/v1/users/login?t='+Math.random(6),value);
  202. if(res.status !== '1') return tips('请求失败');
  203. tips('请求成功,测试推送');
  204. },
  205. cancellation(){
  206. PublicLib.Goto({Url:'warehouse-application'});
  207. },
  208. scale(){
  209. PublicLib.Goto({Url:'new-pag1'});
  210. },
  211. ocrpage(){
  212. PublicLib.Goto({Url:'active-recommend'});
  213. },
  214. warehouse(){
  215. PublicLib.Goto({Url:'warehouse-management'});
  216. },
  217. testpage(){
  218. PublicLib.Goto({Url:'invite-frend-new'});
  219. },
  220. goharf(){
  221. PublicLib.Goto({Url:'adokoajwdijawidjhawoida'});
  222. },
  223. query(){
  224. PublicLib.Goto({Url:'qualifications'});
  225. },
  226. iostest(aa){
  227. let flag = 0
  228. setInterval(()=>{
  229. flag++;
  230. console.log(aa);
  231. PublicLib.putCookieInfo('testflag' + flag, aa);
  232. },10)
  233. },
  234. ocr(){
  235. PublicLib.Goto({Url:'user-Withdrawal1'});
  236. },
  237. openservice(){
  238. PublicLib.Goto({Url:'user-ranking'});
  239. },
  240. bocr(){
  241. PublicLib.OCRIdCard(2); // 1:正面 2.反面
  242. },
  243. ocrbank(){
  244. //- PublicLib.OCRBankCard();
  245. PublicLib.Goto({Url:'user-realauth-ocr'});
  246. },
  247. //- afterRead(file) {
  248. //- // 此时可以自行将文件上传至服务器
  249. //- console.log(file);
  250. //- WebUploadJs(file, 'KxsMainServer/images', {
  251. //- width: 1000,
  252. //- height: 1000,
  253. //- quality: 100
  254. //- }, {
  255. //- max_file_size: 1048576
  256. //- }, function (filename) {
  257. //- //回调
  258. //- console.log(123)
  259. //- });
  260. //- },
  261. double(){
  262. this.DeviceId = PublicLib.getCookieInfo('ApnsDeviceId');
  263. },
  264. getBase64Info(type,base64,cardnum,name = ''){
  265. // 1.身份证正面信息 2.身份证反面信息 3.银行卡信息
  266. //- base64 : 图片base64图片
  267. //- cardnum : 1、身份证号码 2、有效期 3、银行卡号
  268. //- name : 1、姓名 2、无 3、银行卡有效期
  269. PublicLib.ShowMsg({Title:'base64', Message:base64});
  270. if(type === 1){
  271. this.ocrimg = base64;
  272. this.cardnum = cardnum;
  273. this.cardname = name;
  274. }else if(type === 2){
  275. this.ocrimg = base64;
  276. this.date = cardnum;
  277. }else{
  278. this.ocrbankimg = base64;
  279. this.bankcardnum = cardnum;
  280. this.bankcardexpore = name;
  281. };
  282. },
  283. //将base64转换为blob
  284. dataURLtoBlob: function(dataurl) {
  285. var arr = dataurl.split(',')
  286. var mime = arr[0].match(/:(.*?);/)[1]
  287. var bstr = atob(arr[1])
  288. var n = bstr.length
  289. var u8arr = new Uint8Array(n)
  290. while (n--) {
  291. u8arr[n] = bstr.charCodeAt(n);
  292. }
  293. return new Blob([u8arr], { type: mime });
  294. },
  295. //将blob转换为file
  296. blobToFile: function(theBlob, fileName){
  297. theBlob.lastModifiedDate = new Date();
  298. theBlob.name = fileName;
  299. return theBlob;
  300. },
  301. async uploadimg(base64){
  302. //调用
  303. //- var blob = this.dataURLtoBlob(base64);
  304. //- var file = this.blobToFile(blob, 'aaa');
  305. const res = await postbaseRequest('/api/PublicMethod/UploadPhotoByBase64?t='+Math.random(6),base64);
  306. console.log(res,123456);
  307. },
  308. uploadfile(e){
  309. this.file = e.target.files[0]; e.request.response
  310. this.test();
  311. },
  312. test(url = './static/pag/test.pag', width = 50,height = 100) {
  313. const that = this;
  314. window.libpag.PAGInit().then(async (PAG) => {
  315. //- url = 'http://192.168.0.110:5757/static/images/aaaa.pag';
  316. axios({url,responseType: "blob"}).then(async (response) =>{return response.request.response}).then(async (blob) => {
  317. //- fetch(url).then((response) =>{ that.testsize = '获取文件';console.log(response); return response.blob()}).then(async (blob) => {
  318. let file = new window.File([blob], url.replace(/(.*\/)*([^.]+)/i, '$2'));;
  319. console.log(1);
  320. file = this.file ? this.file : file;
  321. console.log(2);
  322. const pagFile = await PAG.PAGFile.load(file);
  323. console.log(3);
  324. document.getElementById('pag').width = width;
  325. console.log(4);
  326. document.getElementById('pag').height = height;
  327. console.log(5);
  328. const pagView = await PAG.PAGView.init(pagFile, '#pag',{ useCanvas2D: false,useScale: true,firstFrame:true });
  329. console.log(pagView);
  330. pagView.setRepeatCount(0);
  331. console.log(7);
  332. await pagView.play();
  333. console.log(8);
  334. this.pagView = pagView;
  335. console.log(9);
  336. });
  337. });
  338. },
  339. getPagFile(pag){
  340. this.testsize = pag;
  341. },
  342. stop(){
  343. this.pagView.stop();
  344. },
  345. pause(){
  346. if(this.isplay){
  347. this.pagView.pause();
  348. this.isplay = false;
  349. }else{
  350. this.pagView.play();
  351. this.isplay = true;
  352. };
  353. },
  354. getprogress(){
  355. this.progress = this.pagView.getProgress();
  356. },
  357. gtouchstart(e){
  358. this.pagY = e.changedTouches[0].clientY;
  359. },
  360. gtouchend(e){
  361. this.pagY1 = e.changedTouches[0].clientY;
  362. if((this.pagY1 - this.pagY) > 50){
  363. console.log('向下滑动')
  364. };
  365. if((this.pagY1 - this.pagY) < -50){
  366. console.log('向上滑动')
  367. };
  368. },
  369. backbtn(){
  370. PublicLib.GoBack({Level:1});
  371. },
  372. gominiprogram(){
  373. const type = browsertype.versions.ios ? 'ios' : 'android';
  374. if (type !== 'ios') {
  375. Func.JumpMiniApp(JSON.stringify('miniapp-demo'));
  376. } else {
  377. window.webkit.messageHandlers.JumpMiniApp.postMessage({MiniAppId:'miniapp-demo'});
  378. };
  379. },
  380. gominiprogram2(){
  381. const type = browsertype.versions.ios ? 'ios' : 'android';
  382. if (type !== 'ios') {
  383. Func.JumpMiniApp(JSON.stringify('miniapp-demo2'));
  384. } else {
  385. window.webkit.messageHandlers.JumpMiniApp.postMessage({MiniAppId:'miniapp-demo2'});
  386. };
  387. },
  388. SetBadgeValue: function(){
  389. const type = browsertype.versions.ios ? 'ios' : 'android';
  390. if (type !== 'ios') {
  391. Func.SetBadgeValue('2','3');
  392. } else {
  393. window.webkit.messageHandlers.SetBadgeValue.postMessage({Index:2,BadgeNum:5});
  394. }
  395. },
  396. ClearBadgeValue: function(){
  397. const type = browsertype.versions.ios ? 'ios' : 'android';
  398. if (type !== 'ios') {
  399. Func.ClearBadgeValue('2');
  400. } else{
  401. window.webkit.messageHandlers.ClearBadgeValue.postMessage({Index:2});
  402. }
  403. },
  404. destroy(type='all'){
  405. MiniAppDelete(type);
  406. },
  407. //- OSS测试
  408. newuploadfile(){
  409. this.client = new OSS({
  410. // yourRegion填写Bucket所在地域。以华东1(杭州)为例,yourRegion填写为oss-cn-hangzhou。
  411. region: 'oss-cn-chengdu',
  412. // 从STS服务获取的临时访问密钥(AccessKey ID和AccessKey Secret)。
  413. accessKeyId: 'LTAI5t7ivibdYZTro4SRVZ9M',
  414. accessKeySecret: 'nfr1bmbJbMhLuaj10iBORkuFfIAX7M',
  415. // 从STS服务获取的安全令牌(SecurityToken)。
  416. //- stsToken: 'yourSecurityToken',
  417. // 填写Bucket名称。
  418. bucket: 'kexiaoshuang'
  419. });
  420. },
  421. async putObject(data){
  422. // 从输入框获取file对象,例如<input type="file" id="file" />。
  423. //- let data;
  424. // 创建并填写Blob数据。
  425. //const data = new Blob(['Hello OSS']);
  426. // 创建并填写OSS Buffer内容。
  427. //const data = new OSS.Buffer(['Hello OSS']);
  428. //- const upload = document.getElementById("upload");
  429. const headers = {
  430. // 指定该Object被下载时网页的缓存行为。
  431. // 'Cache-Control': 'no-cache',
  432. // 指定该Object被下载时的名称。
  433. // 'Content-Disposition': 'oss_download.txt',
  434. // 指定该Object被下载时的内容编码格式。
  435. // 'Content-Encoding': 'UTF-8',
  436. // 指定过期时间。
  437. // 'Expires': 'Wed, 08 Jul 2022 16:57:01 GMT',
  438. // 指定Object的存储类型。
  439. // 'x-oss-storage-class': 'Standard',
  440. // 指定Object的访问权限。
  441. // 'x-oss-object-acl': 'private',
  442. // 设置Object的标签,可同时设置多个标签。
  443. // 'x-oss-tagging': 'Tag1=1&Tag2=2',
  444. // 指定CopyObject操作时是否覆盖同名目标Object。此处设置为true,表示禁止覆盖同名Object。
  445. // 'x-oss-forbid-overwrite': 'true',
  446. };
  447. try {
  448. console.log(data,111)
  449. // 填写Object完整路径。Object完整路径中不能包含Bucket名称。
  450. // 您可以通过自定义文件名(例如exampleobject.txt)或文件完整路径(例如exampledir/exampleobject.txt)的形式实现将数据上传到当前Bucket或Bucket中的指定目录。
  451. // data对象可以自定义为file对象、Blob数据或者OSS Buffer。
  452. const result = await this.client.put(
  453. "upload/2022/08/08/xie.jpeg",
  454. data,
  455. //- {headers}
  456. );
  457. console.log(result);
  458. } catch (e) {
  459. console.log(e,123);
  460. }
  461. },
  462. afterRead(file){
  463. this.putObject(file.file);
  464. //- upload.addEventListener("click", () => {
  465. //- data = document.getElementById("file").files[0];
  466. //- uploadfn(data);
  467. //- });
  468. }
  469. }
  470. });
  471. </script>
  472. </body>
  473. </html>