更改发送消息模式为promise
This commit is contained in:
22
main.js
22
main.js
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user