123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>欢迎-创业帮</title>
- <meta name="keywords" content="欢迎-创业帮">
- <meta name="description" content="欢迎-创业帮">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="欢迎-创业帮">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <meta name="referrer" content="no-referrer">
- <link rel="stylesheet" href="./static/css/main.css"><link rel=" stylesheet" type="text/css" href="css/tinytools.tourtip.min.css">
- <style>
- .screenroll::-webkit-scrollbar {
- display: none;
- }
- .screenroll{
- height:calc(100vh - 1.7rem) !important;
- }
- .screenroll img {
- width:100%;
-
- }
- @keyframes opac {
- 0% {
- opacity: .1;
- }
- 50% {
- opacity: 1;
- }
- 100% {
- opacity: .1;
- }
- }
- @keyframes opac1 {
- from {
- width: 0;
- }
- to {
- width: 100%;
- }
- }
- .option {
- background-color:red;
- border-radius:50%;
- width:100px;
- height:100px;
- left:50%;
- top:50%;
- -webkit-animation:opac 1s ease-in infinite; /* Safari and Chrome */
- }
- .fxkdom{
- height:300px;
- overflow: scroll;
- background-color:blue;
- -webkit-overflow-scrolling: touch;
- }
- </style>
- </head>
- <body class="pb0 ovh h100p">
- <div class="iphonetitle"> </div>
- <div id="app" v-cloak>
- <van-sticky>
- <van-nav-bar class="camp_title user_title_normal" title="详情123" @click-left="backbtn" left-arrow v-if="toptitleisshow">
- <template #left>
- <van-icon name="arrow-left" color="#000" size="20"></van-icon><span>{{Title}}</span>
- </template>
- </van-nav-bar>
- </van-sticky>
- <div class="screenroll rel ovh" style="-webkit-overflow-scrolling: auto;" @touchstart="gtouchstart" @touchend="gtouchend">
- <h1 @click="goharf">未知页面跳转</h1>
- <h1>{{testsize}}</h1>
- <h1 @click="stop">停止</h1>
- <h1 @click="getprogress">当前进度:{{progress}}</h1>
- <van-uploader :after-read="afterRead"></van-uploader>
- <h1>这是底部111</h1>
- <h1 @click="videofn">视频</h1>
- <h1 @click="leader">盟主中心</h1>
- <h1 @click="walist">分仓列表中心</h1>
- <h1 @click="double">获取设备号</h1>
- <h1 @click="login">登录模拟</h1>
- <h1>这是设备号DeviceId: {{DeviceId}}</h1>
- <h1 @click="SetBadgeValue">设置角标</h1>
- <h1 @click="ClearBadgeValue">清除角标</h1>
- <h1 @click="ocr">提现页面test</h1>
- <h1 @click="gominiprogram">跳转小程序1</h1>
- <h1 @click="gominiprogram2">跳转小程序2</h1>
- <h1 @click="destroy()">销毁全部小程序</h1>
- <h1 @click="destroy('miniapp-demo2')">销毁小程序2</h1>
- <h1 @click="scale">密码保险箱</h1>
- <h1 @click="cancellation">配置新页面2</h1>
- <h1 @click="ocrpage">滑动</h1>
- <h1 @click="openservice">排行榜页面</h1>
- <h1 @click="query">资质</h1>
- <h1 @click="warehouse">仓库</h1>
- <h1 @click="bocr">OCRIdbackCard反面</h1>
- <h1 @click="ocrbank">OCRBankCard银行卡</h1><a href="https://www.baidu.com">测试链接 </a>
- <div>身份证图片</div><img :src="ocrimg" alt="">
- <div>姓名:{{cardname}}</div>
- <div>身份证号码:{{cardnum}}</div>
- <div>身份证有效期:{{date}}</div>
- <div>银行卡图片</div><img :src="ocrbankimg" alt="">
- <div>银行卡号码:{{bankcardnum}}</div>
- <div>银行卡有效期:{{bankcardexpore}}</div>
- <div>Url:{{imgurl}}</div>
- </div>
- </div>
- <script src="./static/js/upload-min-oss.js"></script>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js"></script>
- <script src="./static/js/libpag.js"></script>
- <script src="./static/js/uploadfile.js"></script>
- <script src="https://s.url.cn/qqun/qun/qqweb/m/qun/confession/js/vconsole.min.js"></script>
- <script>
- // 清除所有小程序
- function MiniAppDelete(type = '') {
- // 'all':所有 'miniappid':当前ID小程序
- if(type === ''){throw new Error('MiniAppDelete should parameter!');}else{
- if (isWeChat || isAlipay || isWeb || isMiniProgram) {
- Cookies.set(Key, Value);
- } else if (isAndroid) {
- Func.MiniAppDelete(deletetype);
- } else if (isIOS) {
- var row = '{';
- row += '"all":"' + type + '"';
- row += '}';
- window.webkit.messageHandlers.MiniAppDelete.postMessage(JSON.parse(row));
- }
- }
- };
- Vue.use(vant.Lazyload);
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- DeviceId:'',
- Title:'12',
- toptitleisshow:true,
- articleinfo:{
- Title: '',
- Contents:''
- },
- isId:true,
- testsize:'test',
- file:'',
- ocrimg:'',
- ocrbankimg:'',
- bankcardnum:'',
- cardnum:'',
- date:'',
- cardname:'',
- bankcardexpore:'',
- imgurl:'',
- pagY:'',
- pagY1:'',
- type:'',
- pagView:'',
- progress:'',
- isplay:true,
- client:'',
- };
- },
- created() {
- this.newuploadfile();
- //- this.type = browsertype.versions.ios ? 'ios' : 'android';
- //- this.getbannerinfo();
- //- this.iostest();
- //- this.test('./static/pag/active-double-particle.pag',390,390);
- window.webkit.messageHandlers.CloseBounces.postMessage({});
- },
- mounted: {
- },
- methods: {
- videofn(){
- var row = '{';
- row += '"Url":"user-maker-code",';
- 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"';
- row += ',"Jump":"1"';
- row += '}';
- //- console.log(row)
- //- console.log(JSON.parse(row))
- window.webkit.messageHandlers.JumpVideo.postMessage(row);
- //- 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"});
- },
- leader(){
- PublicLib.Goto({Url:'user-leaderLevel-main'});
- },
- walist(){
- PublicLib.Goto({Url:'user-warehouse-mini-list'});
- },
- async login(){
- const DeviceType = browsertype.versions.ios ? 'ios' : 'android';
- const DeviceId = PublicLib.getCookieInfo('ApnsDeviceId');
- const value = JSON.stringify({Mobile:'14781419364',LoginPwd:'123456',DeviceId,DeviceType});
- const res = await getRequest('api/v1/users/login?t='+Math.random(6),value);
- if(res.status !== '1') return tips('请求失败');
- tips('请求成功,测试推送');
- },
- cancellation(){
- PublicLib.Goto({Url:'warehouse-application'});
- },
- scale(){
- PublicLib.Goto({Url:'new-pag1'});
- },
- ocrpage(){
- PublicLib.Goto({Url:'active-recommend'});
- },
- warehouse(){
- PublicLib.Goto({Url:'warehouse-management'});
- },
- testpage(){
- PublicLib.Goto({Url:'invite-frend-new'});
- },
- goharf(){
- PublicLib.Goto({Url:'adokoajwdijawidjhawoida'});
- },
- query(){
- PublicLib.Goto({Url:'qualifications'});
- },
- iostest(aa){
- let flag = 0
- setInterval(()=>{
- flag++;
- console.log(aa);
- PublicLib.putCookieInfo('testflag' + flag, aa);
- },10)
- },
- ocr(){
- PublicLib.Goto({Url:'user-Withdrawal1'});
- },
- openservice(){
- PublicLib.Goto({Url:'user-ranking'});
- },
- bocr(){
- PublicLib.OCRIdCard(2); // 1:正面 2.反面
- },
- ocrbank(){
- //- PublicLib.OCRBankCard();
- PublicLib.Goto({Url:'user-realauth-ocr'});
- },
- //- afterRead(file) {
- //- // 此时可以自行将文件上传至服务器
- //- console.log(file);
- //- WebUploadJs(file, 'KxsMainServer/images', {
- //- width: 1000,
- //- height: 1000,
- //- quality: 100
- //- }, {
- //- max_file_size: 1048576
- //- }, function (filename) {
- //- //回调
- //- console.log(123)
- //- });
- //- },
- double(){
- this.DeviceId = PublicLib.getCookieInfo('ApnsDeviceId');
- },
- getBase64Info(type,base64,cardnum,name = ''){
- // 1.身份证正面信息 2.身份证反面信息 3.银行卡信息
- //- base64 : 图片base64图片
- //- cardnum : 1、身份证号码 2、有效期 3、银行卡号
- //- name : 1、姓名 2、无 3、银行卡有效期
-
- PublicLib.ShowMsg({Title:'base64', Message:base64});
- if(type === 1){
- this.ocrimg = base64;
- this.cardnum = cardnum;
- this.cardname = name;
- }else if(type === 2){
- this.ocrimg = base64;
- this.date = cardnum;
- }else{
- this.ocrbankimg = base64;
- this.bankcardnum = cardnum;
- this.bankcardexpore = name;
- };
- },
- //将base64转换为blob
- dataURLtoBlob: function(dataurl) {
- var arr = dataurl.split(',')
- var mime = arr[0].match(/:(.*?);/)[1]
- var bstr = atob(arr[1])
- var n = bstr.length
- var u8arr = new Uint8Array(n)
- while (n--) {
- u8arr[n] = bstr.charCodeAt(n);
- }
- return new Blob([u8arr], { type: mime });
- },
- //将blob转换为file
- blobToFile: function(theBlob, fileName){
- theBlob.lastModifiedDate = new Date();
- theBlob.name = fileName;
- return theBlob;
- },
- async uploadimg(base64){
- //调用
- //- var blob = this.dataURLtoBlob(base64);
- //- var file = this.blobToFile(blob, 'aaa');
- const res = await postbaseRequest('/api/PublicMethod/UploadPhotoByBase64?t='+Math.random(6),base64);
- console.log(res,123456);
- },
- uploadfile(e){
- this.file = e.target.files[0]; e.request.response
- this.test();
- },
- test(url = './static/pag/test.pag', width = 50,height = 100) {
- const that = this;
- window.libpag.PAGInit().then(async (PAG) => {
- //- url = 'http://192.168.0.110:5757/static/images/aaaa.pag';
- axios({url,responseType: "blob"}).then(async (response) =>{return response.request.response}).then(async (blob) => {
- //- fetch(url).then((response) =>{ that.testsize = '获取文件';console.log(response); return response.blob()}).then(async (blob) => {
- let file = new window.File([blob], url.replace(/(.*\/)*([^.]+)/i, '$2'));;
- console.log(1);
- file = this.file ? this.file : file;
- console.log(2);
- const pagFile = await PAG.PAGFile.load(file);
- console.log(3);
- document.getElementById('pag').width = width;
- console.log(4);
- document.getElementById('pag').height = height;
- console.log(5);
- const pagView = await PAG.PAGView.init(pagFile, '#pag',{ useCanvas2D: false,useScale: true,firstFrame:true });
- console.log(pagView);
- pagView.setRepeatCount(0);
- console.log(7);
- await pagView.play();
- console.log(8);
- this.pagView = pagView;
- console.log(9);
- });
- });
- },
- getPagFile(pag){
- this.testsize = pag;
- },
- stop(){
- this.pagView.stop();
- },
- pause(){
- if(this.isplay){
- this.pagView.pause();
- this.isplay = false;
- }else{
- this.pagView.play();
- this.isplay = true;
- };
- },
- getprogress(){
- this.progress = this.pagView.getProgress();
- },
- gtouchstart(e){
- this.pagY = e.changedTouches[0].clientY;
- },
- gtouchend(e){
- this.pagY1 = e.changedTouches[0].clientY;
- if((this.pagY1 - this.pagY) > 50){
- console.log('向下滑动')
- };
- if((this.pagY1 - this.pagY) < -50){
- console.log('向上滑动')
- };
- },
- backbtn(){
- PublicLib.GoBack({Level:1});
- },
- gominiprogram(){
- const type = browsertype.versions.ios ? 'ios' : 'android';
- if (type !== 'ios') {
- Func.JumpMiniApp(JSON.stringify('miniapp-demo'));
- } else {
- window.webkit.messageHandlers.JumpMiniApp.postMessage({MiniAppId:'miniapp-demo'});
- };
- },
- gominiprogram2(){
- const type = browsertype.versions.ios ? 'ios' : 'android';
- if (type !== 'ios') {
- Func.JumpMiniApp(JSON.stringify('miniapp-demo2'));
- } else {
- window.webkit.messageHandlers.JumpMiniApp.postMessage({MiniAppId:'miniapp-demo2'});
- };
- },
- SetBadgeValue: function(){
- const type = browsertype.versions.ios ? 'ios' : 'android';
- if (type !== 'ios') {
- Func.SetBadgeValue('2','3');
- } else {
- window.webkit.messageHandlers.SetBadgeValue.postMessage({Index:2,BadgeNum:5});
- }
- },
- ClearBadgeValue: function(){
- const type = browsertype.versions.ios ? 'ios' : 'android';
- if (type !== 'ios') {
- Func.ClearBadgeValue('2');
- } else{
- window.webkit.messageHandlers.ClearBadgeValue.postMessage({Index:2});
- }
- },
- destroy(type='all'){
- MiniAppDelete(type);
- },
- //- OSS测试
- newuploadfile(){
- this.client = new OSS({
- // yourRegion填写Bucket所在地域。以华东1(杭州)为例,yourRegion填写为oss-cn-hangzhou。
- region: 'oss-cn-chengdu',
- // 从STS服务获取的临时访问密钥(AccessKey ID和AccessKey Secret)。
- accessKeyId: 'LTAI5t7ivibdYZTro4SRVZ9M',
- accessKeySecret: 'nfr1bmbJbMhLuaj10iBORkuFfIAX7M',
- // 从STS服务获取的安全令牌(SecurityToken)。
- //- stsToken: 'yourSecurityToken',
- // 填写Bucket名称。
- bucket: 'kexiaoshuang'
- });
- },
- async putObject(data){
- // 从输入框获取file对象,例如<input type="file" id="file" />。
- //- let data;
- // 创建并填写Blob数据。
- //const data = new Blob(['Hello OSS']);
- // 创建并填写OSS Buffer内容。
- //const data = new OSS.Buffer(['Hello OSS']);
- //- const upload = document.getElementById("upload");
- const headers = {
- // 指定该Object被下载时网页的缓存行为。
- // 'Cache-Control': 'no-cache',
- // 指定该Object被下载时的名称。
- // 'Content-Disposition': 'oss_download.txt',
- // 指定该Object被下载时的内容编码格式。
- // 'Content-Encoding': 'UTF-8',
- // 指定过期时间。
- // 'Expires': 'Wed, 08 Jul 2022 16:57:01 GMT',
- // 指定Object的存储类型。
- // 'x-oss-storage-class': 'Standard',
- // 指定Object的访问权限。
- // 'x-oss-object-acl': 'private',
- // 设置Object的标签,可同时设置多个标签。
- // 'x-oss-tagging': 'Tag1=1&Tag2=2',
- // 指定CopyObject操作时是否覆盖同名目标Object。此处设置为true,表示禁止覆盖同名Object。
- // 'x-oss-forbid-overwrite': 'true',
- };
- try {
- console.log(data,111)
- // 填写Object完整路径。Object完整路径中不能包含Bucket名称。
- // 您可以通过自定义文件名(例如exampleobject.txt)或文件完整路径(例如exampledir/exampleobject.txt)的形式实现将数据上传到当前Bucket或Bucket中的指定目录。
- // data对象可以自定义为file对象、Blob数据或者OSS Buffer。
- const result = await this.client.put(
- "upload/2022/08/08/xie.jpeg",
- data,
- //- {headers}
- );
- console.log(result);
- } catch (e) {
- console.log(e,123);
- }
- },
- afterRead(file){
- this.putObject(file.file);
- //- upload.addEventListener("click", () => {
- //- data = document.getElementById("file").files[0];
- //- uploadfn(data);
- //- });
- }
- }
- });
- </script>
- </body>
- </html>
|