|
@@ -63,7 +63,7 @@
|
|
{{~}}
|
|
{{~}}
|
|
</template>
|
|
</template>
|
|
<template id="template-shear">
|
|
<template id="template-shear">
|
|
- {{? it.length}}
|
|
|
|
|
|
+ {{? it.length }}
|
|
<div class="title">
|
|
<div class="title">
|
|
剪贴板
|
|
剪贴板
|
|
<div class="btn-clear">清空</div>
|
|
<div class="btn-clear">清空</div>
|
|
@@ -129,11 +129,11 @@
|
|
<div class="menu-btn PictureQuality avit" data-id="3">标清</div>
|
|
<div class="menu-btn PictureQuality avit" data-id="3">标清</div>
|
|
<div class="menu-btn PictureQuality" data-id="2">极速</div>
|
|
<div class="menu-btn PictureQuality" data-id="2">极速</div>
|
|
</div>
|
|
</div>
|
|
- <!-- <div class="">
|
|
|
|
|
|
+ <div class="open-set-phone-size-dialog-btn-wrap">
|
|
<div class="menu-btn" id="open-set-phone-size-dialog-btn">
|
|
<div class="menu-btn" id="open-set-phone-size-dialog-btn">
|
|
<span>分辨率</span>
|
|
<span>分辨率</span>
|
|
</div>
|
|
</div>
|
|
- </div> -->
|
|
|
|
|
|
+ </div>
|
|
<div class="operation">
|
|
<div class="operation">
|
|
<div class="upload" id="showsuss" data-text="uploads">
|
|
<div class="upload" id="showsuss" data-text="uploads">
|
|
<img src="../static/img/wx/shangchuan_icon.png" />
|
|
<img src="../static/img/wx/shangchuan_icon.png" />
|
|
@@ -1702,6 +1702,10 @@
|
|
systemBuriedPoint('激活码-强制关闭-继续观看');
|
|
systemBuriedPoint('激活码-强制关闭-继续观看');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ window.onbeforeunload = function () {
|
|
|
|
+ wsss.close();
|
|
|
|
+ ws.close();
|
|
|
|
+ };
|
|
// 埋点
|
|
// 埋点
|
|
function systemBuriedPoint(pointName) {
|
|
function systemBuriedPoint(pointName) {
|
|
$.ajax({
|
|
$.ajax({
|
|
@@ -1733,10 +1737,7 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- window.onbeforeunload = function () {
|
|
|
|
- ws.close();
|
|
|
|
- wsss.close();
|
|
|
|
- };
|
|
|
|
|
|
+
|
|
function updatePhoneSizeListHtml() {
|
|
function updatePhoneSizeListHtml() {
|
|
const templatePhoneSizeItem = doT.template(
|
|
const templatePhoneSizeItem = doT.template(
|
|
$('#template-phone-size-item').html().replace(/&/g, '&'),
|
|
$('#template-phone-size-item').html().replace(/&/g, '&'),
|
|
@@ -1753,7 +1754,9 @@
|
|
});
|
|
});
|
|
$('#phone-size-list').html(phoneSizeListItemsHtml);
|
|
$('#phone-size-list').html(phoneSizeListItemsHtml);
|
|
}
|
|
}
|
|
- $('#open-set-phone-size-dialog-btn').on('click', function (e) {
|
|
|
|
|
|
+
|
|
|
|
+ $('#open-set-phone-size-dialog-btn').on('click', async function (e) {
|
|
|
|
+ !window.phoneSizeList.length && (await getPhoneSizeList());
|
|
window.activePhoneSize = window.currentPhoneSize;
|
|
window.activePhoneSize = window.currentPhoneSize;
|
|
updatePhoneSizeListHtml();
|
|
updatePhoneSizeListHtml();
|
|
$('#set-phone-size-dialog').addClass('show');
|
|
$('#set-phone-size-dialog').addClass('show');
|
|
@@ -1771,8 +1774,8 @@
|
|
// 选中的分辨率
|
|
// 选中的分辨率
|
|
// window.activePhoneSize = window.currentPhoneSize;
|
|
// window.activePhoneSize = window.currentPhoneSize;
|
|
|
|
|
|
- function getPhoneSizeList() {
|
|
|
|
- return $.ajax({
|
|
|
|
|
|
+ async function getPhoneSizeList() {
|
|
|
|
+ const response = await $.ajax({
|
|
url:
|
|
url:
|
|
baseUrl + '/api/resources/v5/machine/resolution/getResolvingPower',
|
|
baseUrl + '/api/resources/v5/machine/resolution/getResolvingPower',
|
|
headers: {
|
|
headers: {
|
|
@@ -1783,18 +1786,29 @@
|
|
data: {
|
|
data: {
|
|
userCardId,
|
|
userCardId,
|
|
},
|
|
},
|
|
- }).then(function (response) {
|
|
|
|
- return response.data.map(function (v) {
|
|
|
|
- return {
|
|
|
|
- id: v.id,
|
|
|
|
- dpi: v.dpi,
|
|
|
|
- width: v.width,
|
|
|
|
- height: v.high,
|
|
|
|
- };
|
|
|
|
- });
|
|
|
|
});
|
|
});
|
|
- }
|
|
|
|
|
|
|
|
|
|
+ const phoneSizeList = response.data.map(function (v) {
|
|
|
|
+ return {
|
|
|
|
+ id: v.id,
|
|
|
|
+ dpi: v.dpi,
|
|
|
|
+ width: v.width,
|
|
|
|
+ height: v.high,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+ window.phoneSizeList = phoneSizeList;
|
|
|
|
+
|
|
|
|
+ // 关联上当前云机分辨率
|
|
|
|
+ const currentPhoneSize = phoneSizeList.find(function (v) {
|
|
|
|
+ return (
|
|
|
|
+ window.currentPhoneSize &&
|
|
|
|
+ v.width === window.currentPhoneSize.width &&
|
|
|
|
+ v.height === window.currentPhoneSize.height &&
|
|
|
|
+ v.dpi === window.currentPhoneSize.dpi
|
|
|
|
+ );
|
|
|
|
+ });
|
|
|
|
+ window.currentPhoneSize = currentPhoneSize || window.currentPhoneSize;
|
|
|
|
+ }
|
|
/*
|
|
/*
|
|
getPhoneSizeList().then(function (phoneSizeList) {
|
|
getPhoneSizeList().then(function (phoneSizeList) {
|
|
window.phoneSizeList = phoneSizeList;
|
|
window.phoneSizeList = phoneSizeList;
|
|
@@ -1812,7 +1826,6 @@
|
|
// return updatePhoneSizeListHtml();
|
|
// return updatePhoneSizeListHtml();
|
|
});
|
|
});
|
|
*/
|
|
*/
|
|
-
|
|
|
|
// const phoneSizeListSwiper = new Swiper('#phone-size-list-swiper', {
|
|
// const phoneSizeListSwiper = new Swiper('#phone-size-list-swiper', {
|
|
// direction: 'vertical',
|
|
// direction: 'vertical',
|
|
// slidesPerView: 'auto',
|
|
// slidesPerView: 'auto',
|
|
@@ -1845,6 +1858,7 @@
|
|
},
|
|
},
|
|
}),
|
|
}),
|
|
);
|
|
);
|
|
|
|
+ // XXX: 去除了,改为中台发送
|
|
// 通知其他在线端
|
|
// 通知其他在线端
|
|
// wsss.send(
|
|
// wsss.send(
|
|
// JSON.stringify({
|
|
// JSON.stringify({
|
|
@@ -1870,6 +1884,10 @@
|
|
// });
|
|
// });
|
|
$('#phone-size-list').on('click', '.phone-size-item', function (e) {
|
|
$('#phone-size-list').on('click', '.phone-size-item', function (e) {
|
|
const data = $(e.currentTarget).data();
|
|
const data = $(e.currentTarget).data();
|
|
|
|
+ // console.log(
|
|
|
|
+ // '🚀 ~ file: WXtrialInterface.html ~ line 1494 ~ data',
|
|
|
|
+ // data,
|
|
|
|
+ // );
|
|
window.activePhoneSize = data;
|
|
window.activePhoneSize = data;
|
|
updatePhoneSizeListHtml();
|
|
updatePhoneSizeListHtml();
|
|
// setPhoneSize(data.width, data.height);
|
|
// setPhoneSize(data.width, data.height);
|