提交 b5502228 编写于 作者: guangjun.yang's avatar guangjun.yang

分享问题

右前头问题
上级 1fccea49
......@@ -3622,6 +3622,11 @@
}
}
},
"callapp-lib": {
"version": "2.1.8",
"resolved": "http://192.168.110.93:4873/callapp-lib/-/callapp-lib-2.1.8.tgz",
"integrity": "sha512-9FUmTz0LCCF43LhiMEN3CJ4RuLGppu8hOn0u9UzUFyd7TU7AXW82Zc9qTq4Mfes36yOGqNYO1v8DJdkQY7+7rA=="
},
"camel-case": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz",
......@@ -7653,6 +7658,46 @@
"dev": true,
"optional": true
},
"pica-call-app": {
"version": "1.0.43",
"resolved": "http://192.168.110.93:4873/pica-call-app/-/pica-call-app-1.0.43.tgz",
"integrity": "sha512-rAN9W3ssjFtuL8EQaWCcvJ8PIy71CJ6jH9FO9Lg5wiFEwSmK7s4oC3LOKPAwH4Lj+r6OXHQGOffOQTurd7Bf5g==",
"requires": {
"callapp-lib": "^2.1.7",
"vant": "^1.4.2"
},
"dependencies": {
"@babel/runtime": {
"version": "7.12.5",
"resolved": "http://192.168.110.93:4873/@babel%2fruntime/-/runtime-7.12.5.tgz",
"integrity": "sha1-QQ5+SHRB4bNgwpvnFdhw2bmFiC4=",
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"@vant/icons": {
"version": "1.1.7",
"resolved": "http://192.168.110.93:4873/@vant%2ficons/-/icons-1.1.7.tgz",
"integrity": "sha1-KVYa3/+mp1DSedzNvpppt0OTTz8="
},
"vant": {
"version": "1.6.28",
"resolved": "http://192.168.110.93:4873/vant/-/vant-1.6.28.tgz",
"integrity": "sha512-yGiQFPA7tmvlA05ezWg2MnknDK2OKlHmJurvHm2mWt1zdjfiVDJj+XFh6xMY8jZUsBZMWqdBSc+gAKzII8fOqg==",
"requires": {
"@babel/runtime": "^7.4.3",
"@vant/icons": "1.1.7",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0-beta.3",
"vue-lazyload": "1.2.3"
}
},
"vue-lazyload": {
"version": "1.2.3",
"resolved": "http://192.168.110.93:4873/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"integrity": "sha1-kB+ewVx+bKeHgaK65KNDaGve2yw="
}
}
},
"pica-topic-stencil": {
"version": "1.0.8",
"resolved": "http://192.168.110.93:4873/pica-topic-stencil/-/pica-topic-stencil-1.0.8.tgz",
......
......@@ -66,7 +66,7 @@ export default {
},
wxBtnImg: {
type: String,
default: 'https://file.yunqueyi.com/h5/images/mall/invitation/share/share-2.png',
default: 'https://file.yunqueyi.com/h5/images/asimg/share-btn-l.png',
},
},
data() {
......@@ -101,7 +101,8 @@ export default {
// const insertHtml = '';
let script = document.createElement("script"); // 创建script内容插槽 避免template标签冲突
script.type = "text/wxtag-template"; // 使用script插槽 必须定义这个type
let content = `<img src='${this.wxBtnImg}' style="display: block; width: 100%;"/>`;
let content = `<img src='${this.wxBtnImg}'
style="display: block; margin: 5px 0; width: 340px; height: 50px;"/>`;
script.text = content; // 自定义的html字符串内容
// 唤起微信小程序
// let html = `<wx-open-launch-weapp style="width:100%;display:block;height:100%;" username="小程序原始id" path="小程序页面路径和参数">${script.outerHTML}</wx-open-launch-weapp>`
......
......@@ -14,6 +14,8 @@ import 'vant/lib/index.css';
import clipboard from 'clipboard';
import { querystring } from '@/utils';
import 'swiper/swiper-bundle.css';
import PicaCallApp, { callApp } from 'pica-call-app';
Vue.prototype.$callApp = callApp;
Vue.prototype.clipboard = clipboard;
......
<template>
<div class="swiper-container">
<div class="right-arrow">
<img class="r1" src="~@/images/annual/right-1.png" alt />
<img src="~@/images/annual/right-2.png" alt />
</div>
<div class="swiper-wrapper">
<div class="swiper-slide">
<div v-if="!anualData.haveFlag" class="swiper-slide">
<Card1No :anualData="anualData"></Card1No>
</div>
<div v-if="anualData.haveFlag" class="swiper-slide">
<Card1 :anualData="anualData"></Card1>
</div>
<div class="swiper-slide">
<div v-if="anualData.haveFlag" class="swiper-slide">
<Card2 :anualData="anualData"></Card2>
</div>
<div v-if="anualData.orderNum" class="swiper-slide">
<div v-if="anualData.orderNum && anualData.haveFlag" class="swiper-slide">
<Card3 :anualData="anualData"></Card3>
</div>
<div v-if="anualData.learnTime4Show" class="swiper-slide">
<div v-if="anualData.learnTime4Show && anualData.haveFlag" class="swiper-slide">
<Card4 :anualData="anualData"></Card4>
</div>
<div class="swiper-slide">
<div v-if="anualData.haveFlag" class="swiper-slide">
<Card5 :anualData="anualData"></Card5>
</div>
<div class="swiper-slide">
<div v-if="anualData.haveFlag" class="swiper-slide">
<Card6 :anualData="anualData" @save="savePage2Picture" @share="share" :isHide="isHide"></Card6>
</div>
</div>
......@@ -26,7 +33,7 @@
<script>
import Loading from "@/components/common/common-loading";
import { Progress, Toast } from "vant";
import { getWebPageUrl } from "@/utils"
import { getWebPageUrl } from "@/utils";
import { mapGetters, mapActions } from "vuex";
import Swiper from "swiper";
......@@ -38,7 +45,8 @@ import Card4 from "@/components/annual-summary/card-4";
import Card5 from "@/components/annual-summary/card-5";
import Card6 from "@/components/annual-summary/card-6";
let _this = null, swiperInstance = null;
let _this = null,
swiperInstance = null;
export default {
components: {
......@@ -104,7 +112,6 @@ export default {
_this.isInfresh = true;
_this.getUserInfo();
};
},
mounted() {
......@@ -117,7 +124,7 @@ export default {
// 获取数据
initData() {
let param = {
token: this.token || "4E1CABA5AC404B9ABF331376CE178A9C",
token: this.token || "2B064C21B9F14796B537E52C7DC1468C",
yearType: "2020",
setEntry: true
};
......@@ -239,8 +246,11 @@ export default {
// 调用原生分享(弹框)
share() {
let shareUrl = getWebPageUrl(`profexam/#/as-share?uuid=${this.anualData.uuid}`);
rocNative && rocNative.shareWechat({
let shareUrl = getWebPageUrl(
`profexam/#/as-share?uuid=${this.anualData.uuid}`
);
rocNative &&
rocNative.shareWechat({
type: 6,
shareId: 0,
shareUrl: shareUrl,
......@@ -252,29 +262,61 @@ export default {
},
beforeDestroy() {
console.log('in beforeDestroy');
console.log("in beforeDestroy");
swiperInstance.destroy(true);
},
}
}
};
</script>
<style lang="less" scoped>
.as-swipper-wrapper {
// background: red;
.swiper-container {
transform: translate3d(0, 0, 0);
// background: red;
.swiper-container {
transform: translate3d(0, 0, 0);
overflow: hidden;
overflow: hidden;
.right-arrow {
display: flex;
flex-direction: row;
position: fixed;
width: 50px;
height: 36.5px;
top: 50%;
right: 10px;
z-index: 4;
margin-top: -18px;
animation: right-arrow 1.5s infinite;
-webkit-animation: right-arrow 1.5s infinite;
-webkit-animation-fill-mode: both;
img {
width: 24px;
height: 100%;
&.r1 {
margin-right: -6px;
}
}
}
.swiper-slide {
transform: translate3d(0, 0, 0);
@-webkit-keyframes right-arrow {
0% {
right: 10px;
opacity: 0.8;
}
50% {
right: 5px;
opacity: 0.9;
}
100% {
right: 0;
opacity: 1;
}
}
}
.swiper-slide {
transform: translate3d(0, 0, 0);
}
.swiper-container {
height: 100vh;
width: 100vm;
width: 100%;
/* height: 300px;
margin: 20px auto; */
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册