flat: 警告处理
This commit is contained in:
@@ -439,6 +439,17 @@ function formatFileSize(bytes) {
|
|||||||
else if (bytes < 1024 * 1024 * 1024) return (bytes / (1024 * 1024)).toFixed(2) + ' MB'
|
else if (bytes < 1024 * 1024 * 1024) return (bytes / (1024 * 1024)).toFixed(2) + ' MB'
|
||||||
else return (bytes / (1024 * 1024 * 1024)).toFixed(2) + ' GB'
|
else return (bytes / (1024 * 1024 * 1024)).toFixed(2) + ' GB'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function sendingMiniProgramMessage(data = {
|
||||||
|
text: 'hello'
|
||||||
|
}, action = 'defalut') {
|
||||||
|
jWeixin.miniProgram.postMessage({
|
||||||
|
data,
|
||||||
|
action
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export const $api = {
|
export const $api = {
|
||||||
msg,
|
msg,
|
||||||
prePage,
|
prePage,
|
||||||
@@ -449,9 +460,12 @@ export const $api = {
|
|||||||
chatRequest,
|
chatRequest,
|
||||||
insertSortData,
|
insertSortData,
|
||||||
uploadFile,
|
uploadFile,
|
||||||
formatFileSize
|
formatFileSize,
|
||||||
|
sendingMiniProgramMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
$api,
|
$api,
|
||||||
navTo,
|
navTo,
|
||||||
|
17
index.html
17
index.html
@@ -3,11 +3,18 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<script>
|
<script>
|
||||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
(function() {
|
||||||
CSS.supports('top: constant(a)'))
|
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' &&
|
||||||
document.write(
|
(CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'));
|
||||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
|
||||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
var meta = document.createElement('meta');
|
||||||
|
meta.name = 'viewport';
|
||||||
|
meta.content =
|
||||||
|
'width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||||
|
(coverSupport ? ', viewport-fit=cover' : '');
|
||||||
|
|
||||||
|
document.head.appendChild(meta);
|
||||||
|
})();
|
||||||
</script>
|
</script>
|
||||||
<title></title>
|
<title></title>
|
||||||
<!-- vconsole -->
|
<!-- vconsole -->
|
||||||
|
@@ -97,9 +97,6 @@
|
|||||||
"serviceHost": ""
|
"serviceHost": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"unipush": {
|
|
||||||
"enable": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -48,15 +48,10 @@ const state = reactive({
|
|||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
state.dateList = getNextMonthDates();
|
state.dateList = getNextMonthDates();
|
||||||
});
|
});
|
||||||
document.addEventListener('UniAppJSBridgeReady', function () {
|
|
||||||
console.log(123);
|
|
||||||
});
|
|
||||||
function textXcx() {
|
function textXcx() {
|
||||||
jWeixin.miniProgram.postMessage({
|
$api.msg('测试给小程序发送消息');
|
||||||
data: {
|
$api.sendingMiniProgramMessage();
|
||||||
pathUrl: '你好,小程序', //传递的参数
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取往后三十天日期
|
// 获取往后三十天日期
|
||||||
|
Reference in New Issue
Block a user