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 return (bytes / (1024 * 1024 * 1024)).toFixed(2) + ' GB'
|
||||
}
|
||||
|
||||
|
||||
function sendingMiniProgramMessage(data = {
|
||||
text: 'hello'
|
||||
}, action = 'defalut') {
|
||||
jWeixin.miniProgram.postMessage({
|
||||
data,
|
||||
action
|
||||
});
|
||||
}
|
||||
|
||||
export const $api = {
|
||||
msg,
|
||||
prePage,
|
||||
@@ -449,9 +460,12 @@ export const $api = {
|
||||
chatRequest,
|
||||
insertSortData,
|
||||
uploadFile,
|
||||
formatFileSize
|
||||
formatFileSize,
|
||||
sendingMiniProgramMessage
|
||||
}
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
$api,
|
||||
navTo,
|
||||
|
17
index.html
17
index.html
@@ -3,11 +3,18 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<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' : '') + '" />')
|
||||
(function() {
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' &&
|
||||
(CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'));
|
||||
|
||||
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>
|
||||
<title></title>
|
||||
<!-- vconsole -->
|
||||
|
@@ -97,9 +97,6 @@
|
||||
"serviceHost": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"unipush": {
|
||||
"enable": true
|
||||
}
|
||||
}
|
||||
}
|
@@ -48,15 +48,10 @@ const state = reactive({
|
||||
onLoad(() => {
|
||||
state.dateList = getNextMonthDates();
|
||||
});
|
||||
document.addEventListener('UniAppJSBridgeReady', function () {
|
||||
console.log(123);
|
||||
});
|
||||
|
||||
function textXcx() {
|
||||
jWeixin.miniProgram.postMessage({
|
||||
data: {
|
||||
pathUrl: '你好,小程序', //传递的参数
|
||||
},
|
||||
});
|
||||
$api.msg('测试给小程序发送消息');
|
||||
$api.sendingMiniProgramMessage();
|
||||
}
|
||||
|
||||
// 获取往后三十天日期
|
||||
|
Reference in New Issue
Block a user