Commit ebd87336 authored by 王's avatar

build test

parent bad54717
......@@ -4,4 +4,4 @@
hm.src = "https://hm.baidu.com/hm.js?3d48322170d471164729cba5dfa4195f";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();</script><style></style><link href=static/css/app.64be2edabff411167c0d49c7bcce245d.css rel=stylesheet></head><body><div id=app></div><script src=https://res.wx.qq.com/open/js/jweixin-1.3.2.js></script><script src=https://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/vconsole/3.0.0/vconsole.min.js></script><script>var vConsole = new VConsole();</script><script type=text/javascript src=static/js/manifest.73a6aae8bcc58f1e95ef.js></script><script type=text/javascript src=static/js/vendor.3ad9f0bc79c82a20862e.js></script><script type=text/javascript src=static/js/app.fa74d3ef47a133531b47.js></script></body></html>
\ No newline at end of file
})();</script><style></style><link href=static/css/app.64be2edabff411167c0d49c7bcce245d.css rel=stylesheet></head><body><div id=app></div><script src=https://res.wx.qq.com/open/js/jweixin-1.3.2.js></script><script src=https://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/vconsole/3.0.0/vconsole.min.js></script><script>var vConsole = new VConsole();</script><script type=text/javascript src=static/js/manifest.189c36eb861bd4c06c12.js></script><script type=text/javascript src=static/js/vendor.3ad9f0bc79c82a20862e.js></script><script type=text/javascript src=static/js/app.fa74d3ef47a133531b47.js></script></body></html>
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,a,c){for(var f,d,i,u=0,b=[];u<r.length;u++)d=r[u],t[d]&&b.push(t[d][0]),t[d]=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f]);for(n&&n(r,a,c);b.length;)b.shift()();if(c)for(u=0;u<c.length;u++)i=o(o.s=c[u]);return i};var r={},t={20:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+"static/js/"+e+"."+{0:"f4ced62b7bd745f8fd2d",1:"c566fdcd14b51c49e2f9",2:"fbde2d7fdb1fb90a3a90",3:"61bb4e094927393a5d57",4:"bcd2ad62c4105277b7f2",5:"dee0efe9afe552f31663",6:"b21a6491ec9ad6c76870",7:"3dc91eb112affee47138",8:"16b92d1aee1891d912d2",9:"48c1afdc23f9a0634f88",10:"3c294925c6f40e2fcb69",11:"fdf43a6097443c341a67",12:"d2acb8f718bf45b7349b",13:"e315559e4a72d1b65698",14:"b74dca9ee1add1622650",15:"99f55e54d2b8d08321a4",16:"ade9181c30a0845ed65a",17:"c0db474323b6a7609fba"}[e]+".js";var f=setTimeout(d,12e4);function d(){c.onerror=c.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=d,a.appendChild(c),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="",o.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.189c36eb861bd4c06c12.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap 3ae04f70072a0dc2a61b"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","20","exports","module","l","e","installedChunkData","Promise","resolve","promise","reject","head","document","getElementsByTagName","script","createElement","type","charset","async","timeout","nc","setAttribute","src","p","0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","setTimeout","onScriptComplete","onerror","onload","clearTimeout","chunk","Error","undefined","appendChild","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","oe","err","console","error"],"mappings":"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","file":"static/js/manifest.189c36eb861bd4c06c12.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t20: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData === 0) {\n \t\t\treturn new Promise(function(resolve) { resolve(); });\n \t\t}\n\n \t\t// a Promise means \"currently loading\".\n \t\tif(installedChunkData) {\n \t\t\treturn installedChunkData[2];\n \t\t}\n\n \t\t// setup Promise in chunk cache\n \t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t});\n \t\tinstalledChunkData[2] = promise;\n\n \t\t// start chunk loading\n \t\tvar head = document.getElementsByTagName('head')[0];\n \t\tvar script = document.createElement('script');\n \t\tscript.type = \"text/javascript\";\n \t\tscript.charset = 'utf-8';\n \t\tscript.async = true;\n \t\tscript.timeout = 120000;\n\n \t\tif (__webpack_require__.nc) {\n \t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t}\n \t\tscript.src = __webpack_require__.p + \"static/js/\" + chunkId + \".\" + {\"0\":\"f4ced62b7bd745f8fd2d\",\"1\":\"c566fdcd14b51c49e2f9\",\"2\":\"fbde2d7fdb1fb90a3a90\",\"3\":\"61bb4e094927393a5d57\",\"4\":\"bcd2ad62c4105277b7f2\",\"5\":\"dee0efe9afe552f31663\",\"6\":\"b21a6491ec9ad6c76870\",\"7\":\"3dc91eb112affee47138\",\"8\":\"16b92d1aee1891d912d2\",\"9\":\"48c1afdc23f9a0634f88\",\"10\":\"3c294925c6f40e2fcb69\",\"11\":\"fdf43a6097443c341a67\",\"12\":\"d2acb8f718bf45b7349b\",\"13\":\"e315559e4a72d1b65698\",\"14\":\"b74dca9ee1add1622650\",\"15\":\"99f55e54d2b8d08321a4\",\"16\":\"ade9181c30a0845ed65a\",\"17\":\"c0db474323b6a7609fba\"}[chunkId] + \".js\";\n \t\tvar timeout = setTimeout(onScriptComplete, 120000);\n \t\tscript.onerror = script.onload = onScriptComplete;\n \t\tfunction onScriptComplete() {\n \t\t\t// avoid mem leaks in IE.\n \t\t\tscript.onerror = script.onload = null;\n \t\t\tclearTimeout(timeout);\n \t\t\tvar chunk = installedChunks[chunkId];\n \t\t\tif(chunk !== 0) {\n \t\t\t\tif(chunk) {\n \t\t\t\t\tchunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\n \t\t\t\t}\n \t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t}\n \t\t};\n \t\thead.appendChild(script);\n\n \t\treturn promise;\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 3ae04f70072a0dc2a61b"],"sourceRoot":""}
\ No newline at end of file
......@@ -103,13 +103,15 @@
groupData:null,
earnings: 0,
userNum: 0,
inviteList: []
inviteList: [],
shareTitle: '唱唱启蒙英语邀友返现金',
shareDesc: '唱唱英语90天成长营,每成功邀请1人即可返现金88元,多邀多得,速来~'
}
},
mounted(){
// this.getDetail();
this.getInviteResult();
this.getInviteList();
this.enableShare();
},
methods:{
goToInvite(){
......@@ -233,7 +235,7 @@
},
// 分享
enableShare: function(option) {
enableShare: function() {
let that = this;
getwechatParam({
api_list: 'onMenuShareAppMessage,onMenuShareTimeline',
......@@ -249,10 +251,10 @@
});
wx.ready(function() {
wx.onMenuShareTimeline({
title: option.product_title, // 分享标题
desc: option.desc,// 分享描述
link: option.shareUrl, // 分享链接
imgUrl: option.shareIcon || 'https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png', // 分享图标
title: that.shareTitle, // 分享标题
desc: that.shareDesc,// 分享描述
link: window.location.href, // 分享链接
imgUrl: 'https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png', // 分享图标
success: function() {
console.log('分享成功');
window._hmt.push(['_trackEvent', '分享', "商品页好友分享",`id${that.shopId}`,that.invite_code]);//百度统计
......@@ -263,10 +265,10 @@
}
});
wx.onMenuShareAppMessage({
title: option.product_title, // 分享标题
desc: option.desc,// 分享描述
link: option.shareUrl, // 分享链接
imgUrl: option.shareIcon || 'https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png', // 分享图标
title: that.shareTitle, // 分享标题
desc: that.shareDesc,// 分享描述
link: window.location.href, // 分享链接
imgUrl: 'https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png', // 分享图标
success: function() {
window._hmt.push(['_trackEvent', '分享', "商品页朋友圈分享",`id${that.shopId}`,that.invite_code]);//百度统计
},
......@@ -281,12 +283,12 @@
if(type === 1 ){
URL = `${process.env.BUY_URL}?shopId=${this.shopId}&invite_code=${this.invite_code}`
}
this.enableShare({
product_title: this.groupDetail.share_desc.title,
desc: this.groupDetail.share_desc.content,
shareIcon:this.groupDetail.share_desc.img[0].url,
shareUrl:URL
})
// this.enableShare({
// product_title: this.groupDetail.share_desc.title,
// desc: this.groupDetail.share_desc.content,
// shareIcon:this.groupDetail.share_desc.img[0].url,
// shareUrl:URL
// })
},
toDataURLBase64 (src, callback) {
let xhttp = new XMLHttpRequest();
......
<template>
<div class="group-index" ref="index" v-if="groupDetail" style="background-color: #fda813;">
<div>
<img class="tips" :src="tipsUrl"/>
<div class="img-cvs" id="capture" ref="imageWrapper" v-if="groupDetail.share_desc.refImg && groupDetail.share_desc.refImg.length > 0">
<img :src="groupDetail.share_desc.refImg[0].url">
<div id="qrcode" class="qrcode">
......@@ -10,22 +11,8 @@
<div class="inviteBtn" id="inviteBtn">
<div class="i-btn flex-start" @click="show=true">
<img class="i-env" :src="whiteEnvelopeUrl"/>
<div class="elips"><span class="i-env-title">邀请语:</span><span>{{comments[commentIndex]}}</span></div>
</div>
<div class="g-btns">
<div>
<img :src="wechatUrl" @click="tips"/>
<div>微信好友</div>
</div>
<div>
<img :src="friendsUrl" @click="tips"/>
<div>朋友圈</div>
</div>
<div>
<img :src="downloadUrl" @click="onClickDownload"/>
<div>保存下载</div>
</div>
<span class="i-env-title">邀请语:</span>
<div class="elips"><span class="marquee">{{comments[commentIndex]}}</span></div>
</div>
</div>
<mt-popup v-model="show" :closeOnClickModal="false">
......@@ -65,11 +52,9 @@
import redBtnUrl from '../../assets/activity/red-bg.png'
import envelopeUrl from '../../assets/activity/envelope.png'
import whiteEnvelopeUrl from '../../assets/activity/white-envelope.png'
import wechatUrl from '../../assets/activity/wechat.png'
import friendsUrl from '../../assets/activity/friends.png'
import downloadUrl from '../../assets/activity/download.png'
import closePopUrl from '../../assets/activity/close.png'
import switchUrl from '../../assets/activity/switch.png'
import tipsUrl from '../../assets/activity/tips.png'
import html2canvas from 'html2canvas'
import { Toast } from 'mint-ui';
export default {
......@@ -93,6 +78,7 @@
weChatIcon:weChatIcon,
closeUrl:closeUrl,
moreUrl:moreUrl,
tipsUrl:tipsUrl,
refIcon:refIcon,
swiperOption: {
pagination: {
......@@ -111,9 +97,6 @@
redBtnUrl: redBtnUrl,
envelopeUrl: envelopeUrl,
whiteEnvelopeUrl: whiteEnvelopeUrl,
wechatUrl: wechatUrl,
friendsUrl: friendsUrl,
downloadUrl: downloadUrl,
closePopUrl: closePopUrl,
switchUrl: switchUrl,
show: false,
......@@ -149,9 +132,6 @@
duration: 2000
});
},
tips(){
Toast('请点击右上角菜单进行分享');
},
refshow(){
Indicator.open();
if(document.body.scrollTop < 10){
......@@ -175,6 +155,7 @@
if(this.groupId && this.groupId !== 'null'){
URL += `&groupId=${this.groupId}`
}
this.onNewShare(URL);
console.log(URL);
this.qrcode(URL);
this.refVisible = true;
......@@ -183,7 +164,8 @@
setTimeout(()=>{
let {
height,
width
width,
top
} = document.getElementById('capture').getClientRects()[0]
document.getElementById('capture').style.width = width + 'px';
let o = this.getOffsetRect(this.$refs.imageWrapper);
......@@ -191,7 +173,8 @@
height1,
width1
} = document.getElementById('capture').getClientRects()[0];
document.getElementById('inviteBtn').style.top = height + 42 + 'px';
console.log('document.getElementById', document.getElementById('capture').getClientRects()[0]);
document.getElementById('inviteBtn').style.top = height + top + 20 + 'px';
document.getElementById('inviteBtn').style.opacity = 1;
html2canvas(document.getElementById('capture'),{
async: true,
......@@ -265,9 +248,10 @@
jsApiList: wechatRes.jsApiList
});
wx.ready(function() {
console.log('this.shareTitle', that.shareTitle)
wx.onMenuShareTimeline({
title: this.shareTitle, // 分享标题
desc: this.shareDesc,// 分享描述
title: that.shareTitle, // 分享标题
desc: that.shareDesc,// 分享描述
link: option.shareUrl, // 分享链接
imgUrl: option.shareIcon || 'https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png', // 分享图标
success: function() {
......@@ -280,8 +264,8 @@
}
});
wx.onMenuShareAppMessage({
title: this.shareTitle, // 分享标题
desc: this.shareDesc,// 分享描述
title: that.shareTitle, // 分享标题
desc: that.shareDesc,// 分享描述
link: option.shareUrl, // 分享链接
imgUrl: option.shareIcon || 'https://cdn.singsingenglish.com/singsing/recommend/logo-refer.png', // 分享图标
success: function() {
......@@ -305,6 +289,14 @@
shareUrl:URL
})
},
onNewShare(url){
this.enableShare({
product_title: this.groupDetail.share_desc.title,
desc: this.groupDetail.share_desc.content,
shareIcon:this.groupDetail.share_desc.img[0].url,
shareUrl:url
})
},
toDataURLBase64 (src, callback) {
let xhttp = new XMLHttpRequest();
xhttp.onload = function () {
......@@ -370,9 +362,8 @@
this.onShare(1)
}
} else {
this.onShare(1)
this.refshow()
}
this.refshow()
})
}
......@@ -407,11 +398,29 @@
image.src = this.dataURL
},
onClickDownload(){
this.saveBase64AsFile(this.dataURL, 'test-download')
// this.saveBase64AsFile(this.dataURL, 'test-download')
let imgData = this.dataURL;
imgData = imgData.replace(this.fixType('jpg'),'image/octet-stream');
var filename = 'test' + '.' + 'jpg';
this.saveFile(imgData,filename);
},
saveFile(data, filename){
let save_link = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');
save_link.href = data;
save_link.download = filename;
let event = document.createEvent('MouseEvents');
event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
save_link.dispatchEvent(event);
},
fixType(type){
type = type.toLowerCase().replace(/jpg/i, 'jpeg');
var r = type.match(/png|jpeg|bmp|gif/)[0];
return 'image/' + r;
},
saveBase64AsFile(base64, fileName) {
let link = document.createElement("a");
link.setAttribute("href", base64);
link.setAttribute("href", this.friendsUrl);
link.setAttribute("download", fileName);
link.click();
}
......@@ -428,11 +437,48 @@
</style>
<style scoped lang="less">
@import "../../util/public";
@keyframes marquee {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-1300px);
}
}
.marquee {
display: block;
width: 100%;
top: 12 * @toVw;
left: 0;
text-align: center;
position: absolute;
-webkit-animation: marquee 30s linear infinite;
animation: marquee 30s linear infinite;
}
.elips {
position: relative;
width: 170* @toVw;
height: 100%;
overflow: hidden;
white-space: nowrap;
/*text-overflow: ellipsis;*/
margin: 0;
z-index: 1;
}
.tips {
width: 230 * @toVw;
margin-left: 163 / 2 * @toVw;
margin-top: 10 * @toVw;
}
.img-cvs{
position: absolute;
width: 525 / 2 * @toVw;
top: 40 / 2 * @toVw;
top: 90 * @toVh;
left: 113 / 2 * @toVw;
border-radius: 10px;
img {
border-radius: 10px;
}
.qrcode{
position: absolute;
top: 700 / 2 * @toVw;
......@@ -443,8 +489,9 @@
.cvs-img{
position: absolute;
width: 525 / 2 * @toVw;
top: 40 / 2 * @toVw;
top: 90 * @toVh;
left: 113 / 2 * @toVw;
border-radius: 10px;
z-index: 10;
}
.inviteBtn {
......@@ -469,9 +516,13 @@
width: 36 / 2 * @toVw;;
height: auto;
margin-right: 5px;
margin-left: 0;
z-index: 2;
}
.i-env-title {
font-size: 16 * @toVw;
margin:0;
z-index: 2;
}
}
}
......@@ -481,11 +532,6 @@
justify-content: flex-start;
align-items: center;
}
.elips {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.g-btns {
display: flex;
flex-flow: row nowrap;
......
......@@ -6,7 +6,7 @@
</swiper-slide>
<div class="swiper-pagination" slot="pagination"></div>
</swiper>
<img :src="refIcon" class="ref-icon" @click="goToActivity()" v-if="groupDetail.is_auth_user === 1">
<img :src="refIcon" class="ref-icon shake" @click="goToActivity()" v-if="groupDetail.is_auth_user === 1">
<div class="head">
<div class="title">
{{groupDetail.name}}
......@@ -428,6 +428,31 @@
img,video{
max-width: 100%;
}
@-webkit-keyframes swing {
10% {
transform: rotate(15deg);
}
20% {
transform: rotate(-10deg);
}
30% {
transform: rotate(5deg);
}
40% {
transform: rotate(-5deg);
}
50%, 100% {
transform: rotate(0deg);
}
}
.shake{
-webkit-animation-name: swing;
-webkit-animation-duration: 0.8s;
-webkit-transform-origin:50% 50%;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
}
</style>
<style scoped lang="less">
@import "../../util/public";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment