更改发送消息模式为promise

This commit is contained in:
2022-02-28 13:45:17 +08:00
parent bf94cca533
commit 39b8f158c0
9 changed files with 647 additions and 466 deletions

22
main.js
View File

@@ -31,21 +31,21 @@ Vue.use(router)
Vue.config.productionTip = false
Vue.prototype.$store = store
usqlite.connect({
uni.$sql = usqlite.connect({
name: 'zh-health', // 数据库名称
path: '_doc/health.db', // 路径
}, (err, res) => {
uni.getStorage({
key: 'FIRST_RUN',
fail: () => {
contactModel.create((err, res) => {
console.error('SQLITE 创建表格', err, res)
uni.setStorageSync('FIRST_RUN', true)
})
}
}, (err, res) => {
uni.getStorage({
key: 'FIRST_RUN',
fail: () => {
contactModel.create((err, res) => {
console.error('SQLITE 创建表格', err, res)
uni.setStorageSync('FIRST_RUN', true)
})
}
})
})
App.mpType = 'app'
const app = new Vue({
store,