12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025 |
- <template>
- <view class="container_main ">
- <!-- 不设置遮盖层的时候 -->
- <!-- 这是引导页mid_state 中转状态1使用2不使用 -->
- <!-- pay_company==1微信2支付宝3其他" -->
- <!-- 收款码 -->
- <block v-if="info.pay_company!=4">
- <block v-if="info.type==1">
- <block v-for="(item,index) of info.urls" :key='index'>
- <!-- pay_company==3聚合码 -->
- <block v-if="item.pay_company==3">
- <block v-if='info.mid_state==1'>
- <!-- 引导页的安全认证 -->
- <block v-if="info.mid_type==10086">
- <image class="container_img" @click="Copy_nav_ali" :data-url="item.url"
- src="../../merchant/static/images/web_ua.png"
- mode="aspectFill">
- </image>
- </block>
- <!-- 其他的引导页 -->
- <block v-else>
- <image :src="URL+info.mid_img" class="container_img" @click="Copy_nav_ali" :data-url="item.url" mode="aspectFill"></image>
- </block>
- </block>
- <block v-else>
- <block v-if="isclose">
- <view v-if="info.hj_state==2" class="model" @click="juhecode" :data-url="item.url"></view>
- <view class="model_s flex-center" v-else @click="juhecode" :data-url="item.url">
- <view class="">
- <view class="wave ripple danger">
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="model_s_pa flex-center">
- <image class="model_s_sz" src="../../merchant/static/images/shouzhi.png" mode=""></image>
- </view>
- </view>
- <view class="model_s_text">
- 点击进入
- </view>
- </view>
- </view>
- </block>
- <web-view :src="item.url"></web-view>
- <!-- <iframe class="iFrame" id="iFrame"></iframe> -->
- </block>
- </block>
- <block v-else>
- <!-- mid_state==1配置引导页 -->
- <block v-if='info.mid_state==1'>
- <!-- 引导页的安全认证 -->
- <block v-if="info.mid_type==10086">
- <image v-if="is_ua=='WeiXIN'&&item.pay_company==1" class="container_img"
- @click="Copy_nav"
- :data-url="item.url"
- src="../../merchant/static/images/wx_ua.png" mode="aspectFill">
- </image>
- <image v-if="is_ua=='Alipay'&&item.pay_company==2" class="container_img" @click="Copy_nav_ali" :data-url="item.url"
- src="../../merchant/static/images/ali_ua.png" mode="aspectFill">
- </image>
- </block>
- <!-- 其他的引导页 -->
- <block v-else>
- <image v-if="is_ua=='WeiXIN'&&item.pay_company==1" :src="URL+info.mid_img" class="container_img" @click="Copy_nav"
- :data-url="item.url" mode="aspectFill"></image>
- <image v-if="item.pay_company==5" :src="URL+info.mid_img" class="container_img"
- @click="Copy_nav_ali" :data-url="item.url"
- mode="aspectFill"></image>
- <image v-if="is_ua=='false'&&item.pay_company==1" :src="URL+info.mid_img" class="container_img" @click="Copy_nav"
- :data-url="item.url" mode="aspectFill"></image>
- <image v-if="is_ua=='Alipay'&&item.pay_company==2" :src="URL+info.mid_img" class="container_img" @click="Copy_nav_ali"
- :data-url="item.url" mode="aspectFill"></image>
- </block>
- </block>
- <block v-else>
- <block v-if="isclose">
- <image v-if="item.pay_company==1" src="../../merchant/static/images/wx_code.png" style="width: 100%;height: 100%;" mode="widthFix"></image>
- <image v-if="item.pay_company==2" src="../../merchant/static/images/ali_code.png" style="width: 100%;height: 100%;" mode="widthFix"></image>
- <view class="model_s flex-center" v-if="item.pay_company==2" @click="Copy_nav_ali" :data-url="item.url">
- <view class="">
- <view class="wave ripple danger">
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="model_s_pa flex-center">
- <image class="model_s_sz" src="../../merchant/static/images/shouzhi.png" mode=""></image>
- </view>
- </view>
- <view class="model_s_text">
- 点击进入
- </view>
- </view>
- </view>
-
- <view class="model_s flex-center" v-if="item.pay_company==1"
- @click="Copy_nav" :data-url="item.url">
- <view class="">
- <view class="wave ripple danger">
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="model_s_pa flex-center">
- <image class="model_s_sz" src="../../merchant/static/images/shouzhi.png" mode=""></image>
- </view>
- </view>
- <view class="model_s_text">
- 点击进入
- </view>
- </view>
- </view>
- </block>
- </block>
- </block>
- </block>
- </block>
- <block v-else-if="info.type==4">
- <block v-if='mid_state==1'>
- <block v-if="mid_type==10086">
- <!-- 引导页的安全认证 -->
- <image v-if="is_ua=='WeiXIN'" class="container_img" @click="Copy_four" src="../../merchant/static/images/wx_ua.png" mode="aspectFill"></image>
- <image v-if="is_ua=='Alipay'" class="container_img" @click="Copy_four" src="../../merchant/static/images/ali_ua.png" mode="aspectFill"></image>
- <image v-if="is_ua=='false'" class="container_img" @click="Copy_four" src="../../merchant/static/images/web_ua.png" mode="aspectFill"></image>
- </block>
- <image v-else class="container_img" @click="Copy_four" :src="URL+info.mid_img" mode="aspectFill"></image>
- </block>
- <block v-else>
- <block v-if="info.is_real==2">
- <view v-if="hj_state==2" class="model" @click="Copy_four"></view>
- <view class="model_s flex-center" v-else @click="Copy_four">
- <view class="">
- <view class="wave ripple danger">
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="model_s_pa flex-center">
- <image class="model_s_sz" src="../../merchant/static/images/shouzhi.png" mode=""></image>
- </view>
- </view>
- <view class="model_s_text">
- 点击进入
- </view>
- </view>
- </view>
- <web-view :src="url"></web-view>
- </block>
- <block v-else>
- <block v-if="isclose">
- <view v-if="hj_state==2" class="model" @click="close"></view>
- <view class="model_s flex-center" v-else @click="close">
- <view class="">
- <view class="wave ripple danger">
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="model_s_pa flex-center">
- <image class="model_s_sz" src="../../merchant/static/images/shouzhi.png"></image>
- </view>
- </view>
- <view class="model_s_text">
- 点击进入
- </view>
- </view>
- </view>
- </block>
- <view class="flex-center" style="width: 100%;height: 100%;">
- <image style="width: 100%;" mode="widthFix" class="model_s_sz_original" :src="URL+info.img_file"></image>
- </view>
- </block>
- </block>
- </block>
- <block v-else>
- <block v-if='mid_state==1'>
- <block v-if="mid_type==10086">
- <!-- 引导页的安全认证 -->
- <image v-if="is_ua=='WeiXIN'" class="container_img" @click="Copy" src="../../merchant/static/images/wx_ua.png" mode="aspectFill"></image>
- <image v-if="is_ua=='Alipay'" class="container_img" @click="Copy" src="../../merchant/static/images/ali_ua.png" mode="aspectFill"></image>
- <image v-if="is_ua=='false'" class="container_img" @click="Copy" src="../../merchant/static/images/web_ua.png" mode="aspectFill"></image>
- </block>
- <image v-else class="container_img" @click="Copy" :src="URL+info.mid_img" mode="aspectFill"></image>
- </block>
- <block v-else>
- <!-- 公众号==2 -->
- <block v-if="info.type==2">
- <block v-if="isclose">
- <view v-if="hj_state==2" class="model" @click="wxclose"></view>
- <block v-else>
- <!-- 查看原文 -->
- <view v-if="info.hj_type==2" class="model" @click="close">
- <view class="model-look">
- <view class="">
- 查看全文 <image class="look" src="../../static/images/look.png" mode=""></image>
- </view>
- </view>
- </view>
- <view v-else class="model_s flex-center" @click="wxclose">
- <view>
- <view class="wave ripple danger">
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="model_s_pa flex-center">
- <image class="model_s_sz" src="../../merchant/static/images/shouzhi.png" mode=""></image>
- </view>
- </view>
- <view class="model_s_text">
- 点击进入
- </view>
- </view>
- </view>
- </block>
- </block>
- <block v-if="isios">
- <iframe title referrerpolicy="no-referrer" class="iFrame" id="iFrames"></iframe>
- </block>
- <block v-else>
- <iframe title referrerpolicy="no-referrer" class="iFrame" id="iFrames" :scrolling="isclose?'no':'yes'">
- </iframe>
- </block>
- <view class="box-pack-between wx-nav" @click="WxNav">
- <view class="">
- <!-- 阅读全文 -->
- </view>
-
- <view class="flex-center">
- <view class="flex-y-center wx-nav-left">
- <image src="../../static/images/wx-zan.png" class="wx-zan"></image> 赞
- </view>
- <view class="flex-y-center">
- <image src="../../static/images/wx-look.png" class="wx-zan"></image> 在看
- </view>
- </view>
- </view>
- </block>
- <!-- 网站==3 -->
- <block v-else>
- <block v-if="isclose">
- <view v-if="hj_state==2" class="model" @click="close"></view>
- <block v-else>
- <!-- 查看原文 -->
- <view v-if="info.hj_type==2" class="model" @click="close">
- <view class="model-look">
- <view class="">
- 查看全文 <image class="look" src="../../static/images/look.png" mode=""></image>
- </view>
- </view>
- </view>
- <view v-else class="model_s flex-center" @click="close">
- <view class="">
- <view class="wave ripple danger">
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="circle"></view>
- <view class="model_s_pa flex-center">
- <image class="model_s_sz" src="../../merchant/static/images/shouzhi.png" mode=""></image>
- </view>
- </view>
- <view class="model_s_text">
- 点击进入
- </view>
- </view>
- </view>
- </block>
- </block>
- <block v-if="isios">
- <iframe title referrerpolicy="origin" :src="url" class="iFrame" id="iFrame"></iframe>
- </block>
- <block v-else>
- <iframe title referrerpolicy="origin" :src="url" class="iFrame" id="iFrame" :scrolling="isclose?'no':'yes'">
- </iframe>
- </block>
- </block>
- <!-- 文章==end-->
- </block>
- </block>
- </block>
- <canvas canvas-id='myCanvas' class="myCanvas"
- :style="'height:'+windowHeight+'px'+';'+'width:'+windowWidth+'px'">
- </canvas>
- </view>
- </template>
- <script>
- // import Clipboard from 'clipboard';
- // #ifdef H5
- import getWXSign from "@/static/js/config.js";
- // #endif
- export default {
- data() {
- return {
- list: [],
- total: 0,
- page: 1,
- url: "",
- content: "",
- iscopy: true,
- info: {},
- URL: getApp().globalData.URL,
- windowWidth: uni.getSystemInfoSync().windowWidth,
- isclose: true,
- istrue: true,
- mid_state: 1,
- is_ua: "",
- mid_type: "",
- hj_state: "",
- is_real: "",
- isios: false,
- pixelRatio:uni.getSystemInfoSync().pixelRatio,
- windowHeight:uni.getSystemInfoSync().windowHeight,
- paycode_img: "",
- showBgImagePath2: '../../static/images/wx_bg.png',
- showBgImagePath1: '../../static/images/pay_wx.png',
- URL: getApp().globalData.URL,
- imagePath: "",
- tempFilePath: ""
- }
- },
- onLoad(e) {
- const oMeta = document.createElement('meta');
- oMeta.name = "referrer";
- oMeta.content = "never";
- document.getElementsByTagName('head')[0].appendChild(oMeta);
- if (/iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {
- this.isios = true;
- }
- function getUrlParam(paraName) {
- let url = window.location.href;
- var arrObj = url.split("?");
- if (arrObj.length > 1) {
- var arr;
- for (var i = 0; i < arrObj.length; i++) {
- arr = arrObj[i].split("=");
- // console.log(arr)
- if (arr != null && arr[0] == paraName) {
- return arr[1];
- // var strs = arr[1].split("&");
- // console.log(strs)
- // return strs[0];
- }
- }
- return "";
- } else {
- return "";
- }
- }
- this.http(getUrlParam('card_num'));
- },
- onReady(e) {
- this.is_ua = IsWeixinOrAlipay();
- // console.log(this.is_ua);
- // alert(this.is_ua)
- function IsWeixinOrAlipay() {
- var ua = window.navigator.userAgent.toLowerCase();
- //判断是不是微信
- if (ua.match(/MicroMessenger/i) == 'micromessenger') {
- return "WeiXIN";
- }
- //判断是不是支付宝
- if (ua.match(/AlipayClient/i) == 'alipayclient') {
- return "Alipay";
- }
- //哪个都不是
- return "false";
- }
- },
- onReachBottom(e) {
- },
- methods: {
-
- drawCanvas() {
- console.log("eeeeee")
- var that = this;
- let ctx = uni.createCanvasContext('myCanvas');
- // 画布宽高
- let ctxW = this.windowWidth;
- let ctxH = this.windowHeight;
- console.log(ctxW,ctxH,"eeeeee")
- ctx.drawImage(this.showBgImagePath2, 0, 0, ctxW, ctxH);
- ctx.fillStyle = '#ffffff';
- ctx.fillRect(ctxW / 2 - 200 / 2, ctxH / 2 - 120, 200, 240);
- ctx.drawImage(this.tempFilePath, ctxW / 2 - 180 / 2, ctxH / 2 - 110, 180, 180);
- ctx.font = 'bold 20px Arial';
- ctx.textAlign = 'center';
- ctx.fillStyle = '#000000';
- var texTwidth = ctx.measureText('长按识别付款').width;
- ctx.fillText("长按识别付款", ctxW / 2, ctxH / 2 + 100);
- ctx.stroke();
- // ctx.draw();
- // console.log(ctx,this.tempFilePath,ctxW,ctxH,"eeeeee")
- ctx.draw(false, () => {
- uni.canvasToTempFilePath({
- canvasId: 'myCanvas',
- success: (res) => {
- console.log(res, "myCanvas");
- that.imagePath = res.tempFilePath;
- this.request({
- url: "funeng/addpicturce",
- data: {
- image: res.tempFilePath,
- },
- }).then(res => {
- console.log(res, "图片")
- var img = res.data;
- this.$wx.previewImage({
- urls: [this.URL + img],
- success: (res) => {
- // 设置成功
- console.log("设置成功", res)
- }
- })
- })
- }
- })
- })
- },
-
- http(card_num) {
- this.request({
- url: "funeng/scan",
- data: {
- card_num: card_num,
- },
- }).then(res => {
- // console.log(res, "res")
- if (res.code == '200') {
- var a = document.createElement('a');
- if (res.data.url) {
- a.href = res.data.url;
- if ("boss.passiontec.cn" == a.host) {
- const oMeta = document.createElement('meta');
- oMeta.name = "viewport";
- oMeta.content = "width=720";
- document.getElementsByTagName('head')[0].appendChild(oMeta);
- }
- }
- this.info = res.data;
- getWXSign(res.data.super_id).then(res => {
- console.log("super_id")
- })
- this.url = res.data.url;
- this.content = res.data.way_power.replace(/<br\s*\/?\s*>/ig, "\n");
- this.mid_state = res.data.mid_state;
- this.mid_type = res.data.mid_type;
- this.hj_state = res.data.hj_state;
- var title = "";
- if (res.data.mid_state == 1 && res.data.mid_title) {
- title = res.data.mid_title;
- } else if (res.data.wx_state == 1 && res.data.wx_title) {
- title = res.data.wx_title;
- } else {
- title = "";
- }
- uni.setNavigationBarTitle({
- title: title
- });
- if (res.data.pay_company == 4) {
- for (let i of res.data.urls) {
- if (i.pay_company == 4) {
- window.location.href = i.url + "?card_num=" + card_num;
- }
- }
- }
- if (res.data.type == 2 || res.data.type == 3 || res.data.type == 4) {
- // 网站赋能 type=3
- if (res.data.type == 3) {
- if (res.data.wx_title) {
- this.wxShare(res);
- } else {
- // this.Crawler(res);
- }
- } else {
- this.wxShare(res);
- }
- if (res.data.type == 2) {
- setTimeout(() => {
- let html = res.data.url_content;
- html = html.replace(/data-src/g, "src")
- html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/g, '')
- html = html.replace(/https/g, "http");
- let html_src=html;
- var pattern = /<meta.*?property="og:url".*?content="(.*?)".*?>/i;
- var arr = pattern.exec(html);
- let biz = getUrlParam(arr[1])[0];
- function getUrlParam(url) {
- var arrObj = url.split("?");
- if (arrObj.length > 1) {
- var arr;
- for (var i = 0; i < arrObj.length; i++) {
- arr = arrObj[i].split("&");
- }
- return arr;
- }
- }
- let iframe = document.getElementById('iFrames');
- iframe.src = html_src;
- var doc = iframe.contentDocument || iframe.document;
- doc.write(html_src);
- doc.getElementById("js_content").style.visibility = "visible";
- doc.getElementById("js_name").addEventListener('click', showMsg, false); //鼠标单击的时候调用showMes这个函数
- function showMsg() {
- window.location.href = `https://mp.weixin.qq.com/mp/profile_ext?action=home&${biz}#wechat_redirect`
- }
- }, 500)
- }
- }
- }
- }).catch((res) => {
- this.iscopy = false
- uni.showToast({
- title: res.message,
- icon: 'none'
- })
- });
- },
- // 摘取网站信息
- Crawler(e) {
- this.request({
- url: "Exchange/Crawler",
- data: {
- url: e.data.url,
- },
- method: "GET",
- }).then(res => {
- console.log(res, "res")
- if (res.code === '200') {
- e.data.wx_title = res.data.title;
- e.data.wx_desc = res.data.desc;
- e.data.wximg_url = res.data.img;
- this.wxShare(e);
- }
- });
- },
- wxShare(res) {
- var imgUrl = res.data.wximg_url ? res.data.wximg_url : getApp().globalData.URL + res.data.wx_img;
- var super_id= this.info.super_id;
- getWXSign(super_id).then(r => {
- console.log(r, "imgURL")
- if (r) {
- if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {
- this.$wx.updateAppMessageShareData({
- title: res.data.wx_title ? res.data.wx_title : "", // 分享标题
- desc: res.data.wx_desc ? res.data.wx_desc : "", // 分享描述
- link: window.location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
- imgUrl: imgUrl, // 分享图标
- success: (res) => {
- // 设置成功
- console.log("设置成功", res)
- }
- })
- this.$wx.updateTimelineShareData({
- title: res.data.wx_title, // 分享标题
- link: window.location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
- imgUrl: imgUrl, // 分享图标
- success: (res) => {
- // 设置成功
- console.log("设置成功", res)
- }
- })
- } else {
- // alert("pc")
- this.$wx.onMenuShareTimeline({
- title: res.data.wx_title, // 分享标题
- desc: res.data.wx_desc, // 分享描述
- link: window.location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
- imgUrl: imgUrl, // 分享图标
- success: (res) => {
- // 设置成功
- console.log("设置成功", res)
- }
- })
- this.$wx.onMenuShareAppMessage({
- title: res.data.wx_title, // 分享标题
- desc: res.data.wx_desc, // 分享描述
- link: window.location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
- imgUrl: imgUrl, // 分享图标
- success: (res) => {
- // 设置成功
- console.log("设置成功", res)
- }
- })
- }
- }
- })
- },
- WxNav(e){
- window.location.href = this.url;
- },
- juhecode(e) {
- let content = this.content;
- this.isclose = false;
- if (!document.queryCommandSupported('copy')) {
- // 不支持
- return false
- }
-
- let textarea = document.createElement("textarea")
- textarea.value = content
- textarea.readOnly = "readOnly"
- document.body.appendChild(textarea)
- textarea.select() // 选择对象
- textarea.setSelectionRange(0, content.length) //核心
- let result = document.execCommand("copy") // 执行浏览器复制命令
- window.location.href = e.currentTarget.dataset.url;
- // this.url;
- textarea.remove();
- return result
-
- },
- // 遮盖层复制
- close(e) {
- // console.log(e)
- let content = this.content;
- this.isclose = false;
- if (!document.queryCommandSupported('copy')) {
- // 不支持
- return false
- }
- let textarea = document.createElement("textarea")
- textarea.value = content
- textarea.readOnly = "readOnly"
- document.body.appendChild(textarea)
- textarea.select() // 选择对象
- textarea.setSelectionRange(0, content.length) //核心
- let result = document.execCommand("copy") // 执行浏览器复制命令
- // console.log("gggg", result)
- textarea.remove();
- return result
- },
- wxclose(e) {
- // console.log(e)
- let content = this.content;
- this.isclose = false;
- if (!document.queryCommandSupported('copy')) {
- // 不支持
- return false
- }
- let textarea = document.createElement("textarea")
- textarea.value = content
- textarea.readOnly = "readOnly"
- document.body.appendChild(textarea)
- textarea.select() // 选择对象
- textarea.setSelectionRange(0, content.length) //核心
- let result = document.execCommand("copy") // 执行浏览器复制命令
- textarea.remove();
- return result
- },
- // 引导页复制跳转
- Copy() {
- let content = this.content;
- if (!document.queryCommandSupported('copy')) {
- // 不支持
- return false
- }
- let textarea = document.createElement("textarea")
- textarea.value = content
- textarea.readOnly = "readOnly"
- document.body.appendChild(textarea)
- textarea.select() // 选择对象
- textarea.setSelectionRange(0, content.length) //核心
- let result = document.execCommand("copy") // 执行浏览器复制命令
- textarea.remove();
- window.location.href = this.url;
- return result
- },
- Copy_four(e) {
- let content = this.content;
- if (!document.queryCommandSupported('copy')) {
- // 不支持
- return false
- }
- let textarea = document.createElement("textarea")
- textarea.value = content
- textarea.readOnly = "readOnly"
- document.body.appendChild(textarea)
- textarea.select() // 选择对象
- textarea.setSelectionRange(0, content.length) //核心
- let result = document.execCommand("copy") // 执行浏览器复制命令
- textarea.remove();
- if (this.info.is_real == 1) {
- uni.navigateTo({
- url: "original?imagePath=" + this.info.img_file,
- })
- } else {
- window.location.href = this.url;
- }
- return result
- },
-
- Copy_nav(e) {
- let content = this.content;
- if (!document.queryCommandSupported('copy')) {
- // 不支持
- return false
- }
- let textarea = document.createElement("textarea")
- textarea.value = content
- textarea.readOnly = "readOnly"
- document.body.appendChild(textarea)
- textarea.select() // 选择对象
- textarea.setSelectionRange(0, content.length) //核心
- let result = document.execCommand("copy") // 执行浏览器复制命令
- textarea.remove();
- // window.location.href = e.currentTarget.dataset.url;
- uni.downloadFile({
- url: e.currentTarget.dataset.url, //仅为示例,并非真实的资源
- success: (res) => {
- if (res.statusCode === 200) {
- this.tempFilePath = res.tempFilePath;
- this.drawCanvas();
- }
- }
- });
- return result
- },
- Copy_nav_ali(e) {
- // alert("Copy_nav_ali")
- let content = this.content;
- if (!document.queryCommandSupported('copy')) {
- // 不支持
- return false
- }
- let textarea = document.createElement("textarea")
- textarea.value = content
- textarea.readOnly = "readOnly"
- document.body.appendChild(textarea)
- textarea.select() // 选择对象
- textarea.setSelectionRange(0, content.length) //核心
- let result = document.execCommand("copy") // 执行浏览器复制命令
- textarea.remove();
- window.location.href = e.currentTarget.dataset.url;
- return result
- },
- },
- }
- </script>
- <style>
-
- .myCanvas {
- position: fixed;
- bottom: 999px;
-
- left: 0 ;
- }
-
- page {
- height: 100%;
- width: 100%;
- }
- .wx-nav{
- padding: 20rpx;font-size: 28rpx;
- /* border-top: 2rpx solid #ccc; */
- }
- .wx-nav-left{
- margin-right: 30rpx;
- }
- .wx-zan{
- width:30rpx;
- height: 30rpx;
- margin-right: 15rpx;
- }
-
- .container_main {
- height: 100%;
- width: 100%;
- text-align: center;
- }
- .iFrame {
- height: 100%;
- width: 100%;
- border: none;
- }
- .container_main .container_img {
- height: 100%;
- width: 100%;
- position: fixed;
- z-index: 999;
- left: 0;
- }
- .model {
- height: 100%;
- width: 100%;
- position: fixed;
- z-index: 999;
- left: 0;
- top: 0;
- /* background: rgba(0,0,0,0.8); */
- }
- .model_s {
- height: 100%;
- width: 100%;
- position: fixed;
- z-index: 999;
- left: 0;
- top: 0;
- background: rgba(0, 0, 0, 0.5);
- }
- .model_s_pa {
- position: absolute;
- width: 300rpx;
- height: 300rpx;
- }
- .model_s_sz {
- width: 160rpx;
- height: 160rpx;
- margin-top: 52rpx;
- margin-left: 24rpx;
- }
- .model_s_text {
- font-size: 40rpx;
- color: #FFFFFF;
- }
- .model-look {
- background: rgba(255, 255, 255, 0.9);
- position: fixed;
- bottom: 0px;
- width: 100%;
- color: #1296db;
- padding-top: 30rpx;
- border-top: 1rpx solid #f1f1f1;
- height: 600rpx;
- }
- .look {
- margin-left: 10rpx;
- width: 30rpx;
- height: 30rpx;
- }
- .container_title {
- font-size: 48rpx;
- font-family: Source Han Sans CN, Source Han Sans CN-Medium;
- margin-top: 90rpx;
- padding: 0 20rpx;
- }
- .container_desc {
- padding: 0 20rpx;
- margin-top: 50rpx;
- font-size: 38rpx;
- font-family: Source Han Sans CN, Source Han Sans CN-Medium;
- }
- .go_btn_pf {
- /* position: fixed; */
- /* bottom: 40rpx; */
- width: 100%;
- margin-top: 130rpx;
- font-size: 32rpx;
- }
- .go_btn {
- width: 630rpx;
- background: rgb(64, 158, 255);
- color: #FFFFFF;
- }
- /************以下为具体实现************/
- .wave {
- position: relative;
- width: 300rpx;
- height: 300rpx;
- text-align: center;
- font-size: 28rpx;
- margin: 0 auto;
- }
- .wave .circle {
- position: absolute;
- border-radius: 50%;
- opacity: 0;
- }
- /* 波纹效果 */
- .wave.ripple .circle {
- width: calc(100% - 6px);
- /* 减去边框的大小 */
- height: calc(100% - 6px);
- /* 减去边框的大小 */
- border: 3px solid #fff;
- }
- .wave.ripple .circle:first-child {
- animation: circle-opacity 2s infinite;
- }
- .wave.ripple .circle:nth-child(2) {
- animation: circle-opacity 2s infinite;
- animation-delay: 0.3s;
- }
- .wave.ripple .circle:nth-child(3) {
- animation: circle-opacity 2s infinite;
- animation-delay: 0.6s;
- }
- .wave.ripple .circle:nth-child(4) {
- animation: circle-opacity 2s infinite;
- animation-delay: 0.8s;
- }
- .wave.ripple .circle:nth-child(5) {
- animation: circle-opacity 2s infinite;
- animation-delay: 1s;
- }
- .wave.ripple .circle:nth-child(6) {
- animation: circle-opacity 2s infinite;
- animation-delay: 1.2s;
- }
- .wave.ripple.danger {
- color: #FFFFFF;
- }
- .wave.ripple.danger .circle {
- border-color: #FFFFFF;
- }
- .wave.ripple.warning {
- color: orange;
- }
- .wave.ripple.warning .circle {
- border-color: orange;
- }
- /* 波动效果 */
- /*
- .wave.solid .circle {
- width: 100%;
- height: 100%;
- background: #fff;
- }
- .wave.solid .circle:first-child {
- animation: circle-opacity 2s infinite;
- }
- .wave.solid.danger {
- color: red;
- }
- .wave.solid.danger .circle {
- background: red;
- }
- .wave.solid.warning {
- color: orange;
- }
- .wave.solid.warning .circle {
- background: orange;
- } */
- @keyframes circle-opacity {
- from {
- opacity: 1;
- transform: scale(0);
- }
- to {
- opacity: 0;
- transform: scale(1);
- }
- }
- </style>
|