|
@@ -168,31 +168,33 @@
|
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
|
color: #FFFFFF;
|
|
|
}
|
|
|
- .van-swipe-item p:first-of-type{
|
|
|
+
|
|
|
+ .van-swipe-item p:first-of-type {
|
|
|
max-width: 2.4rem;
|
|
|
display: block;
|
|
|
- overflow: hidden;
|
|
|
- word-break: keep-all;
|
|
|
- white-space: nowrap;
|
|
|
- text-overflow: ellipsis;
|
|
|
+ overflow: hidden;
|
|
|
+ word-break: keep-all;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
}
|
|
|
+
|
|
|
.topic-info img {
|
|
|
- max-width: 100%;
|
|
|
- width: auto;
|
|
|
- height: auto;
|
|
|
- border-radius: 0.2rem;
|
|
|
- margin-bottom: 0.2rem;
|
|
|
- margin-top: 0.2rem;
|
|
|
- }
|
|
|
-
|
|
|
- .topic-info p {
|
|
|
- font-size: 0.3rem;
|
|
|
- font-family: PingFangSC-Regular, PingFang SC;
|
|
|
- font-weight: 400;
|
|
|
- color: #333333;
|
|
|
- letter-spacing: 0.02rem;
|
|
|
-
|
|
|
- }
|
|
|
+ max-width: 100%;
|
|
|
+ width: auto;
|
|
|
+ height: auto;
|
|
|
+ border-radius: 0.2rem;
|
|
|
+ margin-bottom: 0.2rem;
|
|
|
+ margin-top: 0.2rem;
|
|
|
+ }
|
|
|
+
|
|
|
+ .topic-info p {
|
|
|
+ font-size: 0.3rem;
|
|
|
+ font-family: PingFangSC-Regular, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #333333;
|
|
|
+ letter-spacing: 0.02rem;
|
|
|
+
|
|
|
+ }
|
|
|
</style>
|
|
|
</head>
|
|
|
|
|
@@ -205,14 +207,14 @@
|
|
|
<van-swipe vertical class="notice-swipe" :autoplay="2000" :show-indicators="false">
|
|
|
<van-swipe-item v-for="(item,index) in marqueeList">
|
|
|
<img :src="standarImg(item.headImgUrl)" :onerror="defaultImg" alt="">
|
|
|
- <p>{{item.surfaceName}}</p>
|
|
|
- <p>已获得星动云手机套餐</p>
|
|
|
+ <p>{{item.surfaceName}}</p>
|
|
|
+ <p>已获得星动云手机套餐</p>
|
|
|
</van-swipe-item>
|
|
|
-
|
|
|
+
|
|
|
</van-swipe>
|
|
|
</van-notice-bar>
|
|
|
</div>
|
|
|
- <div class="top-content" >
|
|
|
+ <div class="top-content">
|
|
|
<div v-html="topic" class="topic-info"></div>
|
|
|
|
|
|
</div>
|
|
@@ -222,7 +224,8 @@
|
|
|
<p>激活码:</p>
|
|
|
<p>AS4*********SD3</p>
|
|
|
</div>
|
|
|
- <div class="button-download">点击复制并下载</div>
|
|
|
+ <div class="button-download copybtn" :data-clipboard-text="key"
|
|
|
+ @click='createCopy()'>点击复制并下载</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -237,6 +240,7 @@
|
|
|
<script src="../static/js/vender/vue/axios.min.js"></script>
|
|
|
<script src="../static/js/vender/vue/config.js"></script>
|
|
|
<script src="../static/js/vender/vue/api.js"></script>
|
|
|
+ <script src="../static/js/vender/vue/vue-clipboard.min.js"></script>
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
new Vue({
|
|
@@ -244,9 +248,10 @@
|
|
|
data: {
|
|
|
isshow: true,
|
|
|
id: GetRequest().id ? GetRequest().id : 404,
|
|
|
- topic:null,
|
|
|
+ topic: null,
|
|
|
defaultImg: 'this.src="' + "../static/offImg/tou.png" + '"',
|
|
|
- marqueeList:[],
|
|
|
+ marqueeList: [],
|
|
|
+ key: '3333',
|
|
|
|
|
|
},
|
|
|
created() {
|
|
@@ -254,111 +259,116 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getActDetail();
|
|
|
-
|
|
|
+
|
|
|
this.getMarquee(); //跑马灯
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
//查看活动是否下架
|
|
|
getActDetail() { //获取活动状态
|
|
|
- getActDetail().then(res => {
|
|
|
- this.$toast.clear();
|
|
|
- if (res.status === 0) {
|
|
|
- if( res.data.actStatus==1){
|
|
|
- this.isshow=true;
|
|
|
+ getActDetail().then(res => {
|
|
|
+ this.$toast.clear();
|
|
|
+ if (res.status === 0) {
|
|
|
+ if (res.data.actStatus == 1) {
|
|
|
+ this.isshow = true;
|
|
|
this.getStrategy();
|
|
|
- }else{
|
|
|
- this.isshow=false;
|
|
|
+ } else {
|
|
|
+ this.isshow = false;
|
|
|
}
|
|
|
-
|
|
|
- } else {
|
|
|
- this.$toast(res.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$toast(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getCheck() {
|
|
|
getEvantCheck(this.id).then(res => {
|
|
|
console.log(res)
|
|
|
})
|
|
|
},
|
|
|
+ createCopy(){
|
|
|
+ this.$toast.loading({
|
|
|
+ duration: 2000,
|
|
|
+ message: '加载中...',
|
|
|
+ forbidClick: true,
|
|
|
+ loadingType: 'spinner',
|
|
|
+ });
|
|
|
+ var clipboard = new ClipboardJS('.copybtn') //此处为点击的dom的类名
|
|
|
+
|
|
|
+ console.log(232);
|
|
|
+ clipboard.on('success', (e)=>{
|
|
|
+ this.$toast('复制成功');
|
|
|
+
|
|
|
+ clipboard.destroy()
|
|
|
+ })
|
|
|
+ clipboard.on('error', (e)=>{
|
|
|
+ this.$toast('复制失败');
|
|
|
+ clipboard.destroy()
|
|
|
+ })
|
|
|
+ },
|
|
|
download() {
|
|
|
+
|
|
|
var u = navigator.userAgent,
|
|
|
app = navigator.appVersion;
|
|
|
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
|
|
|
var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
|
|
|
if (isAndroid) {
|
|
|
window.location.href =
|
|
|
- 'http://www.androidscloud.com/admin/attachment/download/2117e9b7f3734b16b81b9d7bb1c5a601';
|
|
|
+ 'http://www.androidscloud.com//suanchou';
|
|
|
} else if (isIOS) {
|
|
|
window.location.href = 'https://www.pgyer.com/gemini6';
|
|
|
- } else {
|
|
|
-
|
|
|
}
|
|
|
},
|
|
|
standarImg(id) {
|
|
|
- return `${fileCenterApi}/file-center/fileOperate/getImage?id=${id}`;
|
|
|
- },
|
|
|
- getList() {
|
|
|
+ return `${fileCenterApi}/file-center/fileOperate/getImage?id=${id}`;
|
|
|
+ },
|
|
|
+ getMarquee() {
|
|
|
+ getMarquee().then(res => {
|
|
|
+ if (res.status === 0) {
|
|
|
+ this.marqueeList = res.data;
|
|
|
+ } else {
|
|
|
+ this.$toast(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getStrategy() {
|
|
|
this.$toast.loading({
|
|
|
duration: 0,
|
|
|
message: '加载中...',
|
|
|
forbidClick: true,
|
|
|
loadingType: 'spinner',
|
|
|
});
|
|
|
- // getEvantDetails(this.id).then(res => {
|
|
|
- // this.$toast.clear();
|
|
|
- // if (res.status == 0) {
|
|
|
- // if (res.data) {
|
|
|
- // this.isshow = false;
|
|
|
- // this.topic = res.data;
|
|
|
- // } else {
|
|
|
- // this.isshow = true;
|
|
|
-
|
|
|
- // }
|
|
|
-
|
|
|
-
|
|
|
- // } else {
|
|
|
-
|
|
|
- // }
|
|
|
- // })
|
|
|
- },
|
|
|
- getMarquee() {
|
|
|
- getMarquee().then(res => {
|
|
|
- if (res.status === 0) {
|
|
|
- this.marqueeList = res.data;
|
|
|
- } else {
|
|
|
- this.$toast(res.msg);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- getStrategy(){
|
|
|
- this.$toast.loading({
|
|
|
- duration: 0,
|
|
|
- message: '加载中...',
|
|
|
- forbidClick: true,
|
|
|
- loadingType: 'spinner',
|
|
|
- });
|
|
|
- getStrategy().then(res=>{
|
|
|
- this.$toast.clear();
|
|
|
- if(res.status==0){
|
|
|
+ getStrategy().then(res => {
|
|
|
+ this.$toast.clear();
|
|
|
+ if (res.status == 0) {
|
|
|
if (res.data) {
|
|
|
- this.isshow = true;
|
|
|
- this.topic= res.data.content;
|
|
|
+ this.isshow = true;
|
|
|
+ this.topic = res.data.content;
|
|
|
console.log(this.topic)
|
|
|
- } else {
|
|
|
- this.isshow = false;
|
|
|
+ } else {
|
|
|
+ this.isshow = false;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
-
|
|
|
}
|
|
|
console.log(res)
|
|
|
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ onCopy() {
|
|
|
+ console.log(2323);
|
|
|
+ this.$toast('复制成功');
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ onError() {
|
|
|
+ this.$toast('复制失败');
|
|
|
|
|
|
+ },
|
|
|
}
|
|
|
+
|
|
|
})
|
|
|
</script>
|
|
|
</body>
|