|
|
@@ -52,7 +52,7 @@
|
|
|
class="phone-size-item {{? value.width === it.active.width && value.height === it.active.height }}active{{?}}"
|
|
|
data-width="{{= value.width }}"
|
|
|
data-height="{{= value.height }}"
|
|
|
- data-id="{{= value.id }}""
|
|
|
+ data-id="{{= value.id }}"
|
|
|
>
|
|
|
<span>{{= value.width }}x{{= value.height }}</span>
|
|
|
</div>
|
|
|
@@ -1588,16 +1588,6 @@
|
|
|
$(e.currentTarget).parents('.dialog').removeClass('show');
|
|
|
});
|
|
|
|
|
|
- function getPhoneSizeList() {
|
|
|
- $.ajax({
|
|
|
- url: baseUrl + '/api/public/v5/shear/content',
|
|
|
- headers: {
|
|
|
- Authorization: token,
|
|
|
- },
|
|
|
- type: 'get',
|
|
|
- dataType: 'json',
|
|
|
- });
|
|
|
- }
|
|
|
// 分辨率列表
|
|
|
window.phoneSizeList = [];
|
|
|
// 当前生效的分辨率
|
|
|
@@ -1610,40 +1600,37 @@
|
|
|
|
|
|
function getPhoneSizeList() {
|
|
|
return $.ajax({
|
|
|
- url: baseUrl + '/api/public/config/switch/getValue/toJSONObject',
|
|
|
+ url:
|
|
|
+ baseUrl + '/api/resources/v5/machine/resolution/getResolvingPower',
|
|
|
headers: {
|
|
|
Authorization: token,
|
|
|
},
|
|
|
type: 'get',
|
|
|
dataType: 'json',
|
|
|
data: {
|
|
|
- configKey: 'cloud_phone_resolving_power',
|
|
|
+ userCardId,
|
|
|
},
|
|
|
}).then(function (response) {
|
|
|
return response.data.map(function (v) {
|
|
|
return {
|
|
|
+ id: v.id,
|
|
|
+ dpi: v.dpi,
|
|
|
width: v.width || v.abscissa,
|
|
|
- height: v.height || v.ordinate,
|
|
|
+ height: v.height || v.ordinate || v.high,
|
|
|
};
|
|
|
});
|
|
|
- // [
|
|
|
- // // { width: 320, height: 240 },
|
|
|
- // // { width: 640, height: 480 },
|
|
|
- // { width: 375, height: 812 },
|
|
|
- // { width: 720, height: 1280 },
|
|
|
-
|
|
|
- // // { width: 1280, height: 720 },
|
|
|
- // // { width: 1080, height: 1920 },
|
|
|
- // ];
|
|
|
});
|
|
|
}
|
|
|
|
|
|
getPhoneSizeList().then(function (phoneSizeList) {
|
|
|
window.phoneSizeList = phoneSizeList;
|
|
|
const currentPhoneSize = window.phoneSizeList.find(function (v) {
|
|
|
- return v.width === window.currentPhoneSize.width && v.height === window.currentPhoneSize.height;
|
|
|
+ return (
|
|
|
+ v.width === window.currentPhoneSize.width &&
|
|
|
+ v.height === window.currentPhoneSize.height
|
|
|
+ );
|
|
|
});
|
|
|
- window.currentPhoneSize = currentPhoneSize || window.currentPhoneSize
|
|
|
+ window.currentPhoneSize = currentPhoneSize || window.currentPhoneSize;
|
|
|
return updatePhoneSizeListHtml();
|
|
|
});
|
|
|
|