|
@@ -235,7 +235,7 @@
|
|
|
<div class="thl-time">{{remainTime(item.ctime,item.exceptTime)}}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="th_renew homeRenew" style="z-index: 5000;">
|
|
|
+ <div class="th_renew homeRenew" style="z-index: 5000;" @click="renew(item)">
|
|
|
续费
|
|
|
</div>
|
|
|
</div>
|
|
@@ -336,32 +336,36 @@
|
|
|
nextEl: '.swiper-button-next',
|
|
|
prevEl: '.swiper-button-prev',
|
|
|
},
|
|
|
- onSlideChangeEnd: function(swiper) {
|
|
|
- console.log("下标啊", swiper)
|
|
|
- },
|
|
|
- onTransitionStart: function(swiper, activeIndex) {
|
|
|
- console.log("下标啊", swiper, activeIndex)
|
|
|
- },
|
|
|
- onSlideChangeEnd: function(swiperHere) {
|
|
|
- //获取下面的img图片
|
|
|
- // var imgurl = $('.swiper-slide-active img').attr("src");
|
|
|
- //获取内容文本
|
|
|
- var txt = $('.swiper-slide-active').html();
|
|
|
- console.log("打印索引值", txt)
|
|
|
-
|
|
|
+ on: {
|
|
|
+ onSlideChangeStart: function(swiper) {
|
|
|
+ alert(swiper.activeIndex);
|
|
|
+ },
|
|
|
+ onSlideChangeEnd: function(swiper) {
|
|
|
+ console.log("下标啊", swiper)
|
|
|
+ },
|
|
|
+ onTransitionStart: function(swiper, activeIndex) {
|
|
|
+ console.log("下标啊", swiper, activeIndex)
|
|
|
+ },
|
|
|
+ onSlideChangeEnd: function(swiperHere) {
|
|
|
+ var txt = $('.swiper-slide-active').html();
|
|
|
+ console.log("打印索引值", txt)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
+ renew(data) {
|
|
|
+ console.log("续费啊",data);
|
|
|
+ wx.miniProgram.navigateTo({
|
|
|
+ url: '/pages/order/renew/index?record='+ JSON.stringify(data),
|
|
|
+ })
|
|
|
+ },
|
|
|
remainTime(ctime, exceptTime) {
|
|
|
var date1 = ctime;
|
|
|
var date2 = exceptTime; //结束时间
|
|
|
var date3 = new Date(date2).getTime() - new Date(date1).getTime(); //时间差的毫秒数
|
|
|
- console.log("时间戳===========》", new Date(date3).getTime(), new Date(date2).getTime())
|
|
|
+ // console.log("时间戳===========》", new Date(date3).getTime(), new Date(date2).getTime())
|
|
|
//------------------------------
|
|
|
var tmiss = ''
|
|
|
//计算出相差天数
|
|
@@ -379,27 +383,50 @@
|
|
|
var seconds = Math.round(leave3 / 1000)
|
|
|
var times = ""
|
|
|
if (Number(days) == 0) {
|
|
|
- console.log(hours + "小时" + minutes + "分")
|
|
|
+ // console.log(hours + "小时" + minutes + "分")
|
|
|
tmiss = Number(hours) + "小时" + Number(minutes) + "分"
|
|
|
} else {
|
|
|
if (Number(hours) == 0 && Number(minutes) == 0) {
|
|
|
- console.log(days + "天")
|
|
|
+ // console.log(days + "天")
|
|
|
tmiss = Number(days) + "天"
|
|
|
} else {
|
|
|
- console.log(days + "天" + hours + "小时 ")
|
|
|
+ // console.log(days + "天" + hours + "小时 ")
|
|
|
tmiss = Number(days) + "天" + Number(hours) + "小时 "
|
|
|
}
|
|
|
}
|
|
|
- console.log("tmiss>>>>>>", tmiss);
|
|
|
+ // console.log("tmiss>>>>>>", tmiss);
|
|
|
return tmiss
|
|
|
},
|
|
|
swiperNext(data) {
|
|
|
+ let activeIndex = $('.swiper-slide-active').index() + 1;
|
|
|
+ console.log("下标啊下标", this.homeList[activeIndex]);
|
|
|
var domnext = $('.swiper-slide-active').next().children().find(".wine");
|
|
|
domnext.attr("id", "wine");
|
|
|
// console.log("打印索引值", domnext)
|
|
|
var domprev = $('.swiper-slide-next').prev().children().find(".wine");
|
|
|
domprev.removeAttr("id");
|
|
|
domprev.empty();
|
|
|
+ let rbdData = {
|
|
|
+ "userCardId": this.homeList[activeIndex].id,
|
|
|
+ "deviceStatus": 1,
|
|
|
+ };
|
|
|
+ var baseUrl = "http://192.168.31.20";
|
|
|
+ var urlss = 'test.androidscloud.com'
|
|
|
+ $.ajax({
|
|
|
+ url: baseUrl + "/api/storage/v1/cardStatus/getRbd",
|
|
|
+ data: JSON.stringify(rbdData),
|
|
|
+ type: 'post',
|
|
|
+ dataType: 'json',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ headers: {
|
|
|
+ 'token': tokens.substring(6, tokens.length),
|
|
|
+ "Authorization": tokens.substring(6, tokens.length)
|
|
|
+ },
|
|
|
+ success: function(data) {
|
|
|
+ console.log("挂载安卓卡成功", data);
|
|
|
+ //
|
|
|
+ }
|
|
|
+ })
|
|
|
setTimeout(() => {
|
|
|
$(".swiper-wrapper .swiper-slide-active .wine").attr('id', 'wine');
|
|
|
var player = new Player({
|
|
@@ -410,7 +437,7 @@
|
|
|
});
|
|
|
var secanv = document.getElementById("wine");
|
|
|
secanv.appendChild(player.canvas);
|
|
|
-
|
|
|
+
|
|
|
var strhost = "wss://" + urlss + "/videoWebSocket?clientType=" + that.urlData.clientType + "&cardIp=" +
|
|
|
that.urlData.cardIp +
|
|
|
"&port=" + that.urlData.port + "&sn=" + that.urlData.sn;
|
|
@@ -439,6 +466,29 @@
|
|
|
|
|
|
},
|
|
|
swiperPrev() {
|
|
|
+ let activeIndex = $('.swiper-slide-active').index() - 1;
|
|
|
+ console.log("下标啊下标", this.homeList[activeIndex]);
|
|
|
+ let rbdData = {
|
|
|
+ "userCardId": this.homeList[activeIndex].id,
|
|
|
+ "deviceStatus": 1,
|
|
|
+ };
|
|
|
+ var baseUrl = "http://192.168.31.20";
|
|
|
+ var urlss = 'test.androidscloud.com'
|
|
|
+ $.ajax({
|
|
|
+ url: baseUrl + "/api/storage/v1/cardStatus/getRbd",
|
|
|
+ data: JSON.stringify(rbdData),
|
|
|
+ type: 'post',
|
|
|
+ dataType: 'json',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ headers: {
|
|
|
+ 'token': tokens.substring(6, tokens.length),
|
|
|
+ "Authorization": tokens.substring(6, tokens.length)
|
|
|
+ },
|
|
|
+ success: function(data) {
|
|
|
+ console.log("挂载安卓卡成功", data);
|
|
|
+ //
|
|
|
+ }
|
|
|
+ })
|
|
|
var domnext = $('.swiper-slide-prev').next().children().find(".wine");
|
|
|
domnext.removeAttr("id");
|
|
|
// console.log("打印索引值", domnext)
|
|
@@ -480,6 +530,7 @@
|
|
|
// onError(evt)
|
|
|
};
|
|
|
}, 500)
|
|
|
+
|
|
|
},
|
|
|
gethomeList() {
|
|
|
// var baseUrl = 'https://test.androidscloud.com';
|
|
@@ -555,23 +606,7 @@
|
|
|
this.urlData = data;
|
|
|
let that = this;
|
|
|
|
|
|
- $.ajax({
|
|
|
- url: baseUrl + "/api/storage/v1/cardStatus/getRbd",
|
|
|
- data: {
|
|
|
- "id": "63283",
|
|
|
- "deviceStatus": "1"
|
|
|
- },
|
|
|
- type: 'post',
|
|
|
- dataType: 'json',
|
|
|
- headers: {
|
|
|
- 'token': tokens.substring(6, tokens.length),
|
|
|
- "Authorization": tokens.substring(6, tokens.length)
|
|
|
- },
|
|
|
- success: function(data) {
|
|
|
- console.log("挂载安卓卡成功", data);
|
|
|
- //
|
|
|
- }
|
|
|
- })
|
|
|
+
|
|
|
|
|
|
$.ajax({
|
|
|
url: baseUrl + "/api/user/v1/client/disk/info",
|
|
@@ -589,6 +624,26 @@
|
|
|
console.log("云手机this.homeListthis.homeListthis.homeList=======", that.homeList);
|
|
|
var urlss = 'test.androidscloud.com'
|
|
|
|
|
|
+ let rbdData = {
|
|
|
+ "userCardId": that.homeList[0].id,
|
|
|
+ "deviceStatus": 1,
|
|
|
+ };
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ url: baseUrl + "/api/storage/v1/cardStatus/getRbd",
|
|
|
+ data: JSON.stringify(rbdData),
|
|
|
+ type: 'post',
|
|
|
+ dataType: 'json',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ headers: {
|
|
|
+ 'token': tokens.substring(6, tokens.length),
|
|
|
+ "Authorization": tokens.substring(6, tokens.length)
|
|
|
+ },
|
|
|
+ success: function(data) {
|
|
|
+ console.log("挂载安卓卡成功", data);
|
|
|
+ //
|
|
|
+ }
|
|
|
+ })
|
|
|
setTimeout(() => {
|
|
|
$(".swiper-wrapper .swiper-slide-active .wine").attr('id', 'wine');
|
|
|
var player = new Player({
|