代码拉取完成,页面将自动刷新
同步操作将从 Marston/In XUPT 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<script>
import checkappupdate from 'common/checkappupdate.js';
import BaseUrl from 'common/config.js';
import { opdb } from 'common/in-xupt-functions.js';
export default {
methods: {
creatTable: function() {
plus.sqlite.executeSql({
name:'notice',
sql: [
// 创建回复提醒表
`CREATE TABLE if not exists reply_messages (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"user_id" INTEGER(11) NOT NULL,
"sender_id" TEXT NOT NULL,
"source_content" TEXT NOT NULL,
"reply_content" TEXT,
"send_time" TEXT NOT NULL,
"source_type" INTEGER(2) NOT NULL,
"post_type" INTEGER(2) NOT NULL,
"source_id" INTEGER(11) NOT NULL)`,
// 创建艾特提醒表
`CREATE TABLE if not exists at_messages (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"user_id" INTEGER(11) NOT NULL,
"sender_id" TEXT NOT NULL,
"source_id" INTEGER(11) NOT NULL,
"action" TEXT NOT NULL,
"source_type" TEXT NOT NULL,
"post_type" INTEGER(2) NOT NULL,
"source_content" TEXT NOT NULL,
"send_time" TEXT NOT NULL)`,
// 创建动态提醒表
`CREATE TABLE if not exists news_messages (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"user_id" INTEGER(11) NOT NULL,
"sender_id" TEXT NOT NULL,
"source_content" TEXT NOT NULL,
"send_time" TEXT NOT NULL,
"source_id" INTEGER(11) NOT NULL,
"post_type" INTEGER(2) NOT NULL)`,
// 创建系统提醒表
`CREATE TABLE if not exists system_messages (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"user_id" INTEGER(11) NOT NULL,
"title" TEXT NOT NULL,
"content" TEXT NOT NULL,
"publish_time" TEXT NOT NULL)`
],
success: () => {
console.log("表创建成功!")
plus.sqlite.closeDatabase({
name: 'notice',
success: (e) => {
console.log("close db after creat table")
},
fail: (err) => {
console.log(err)
console.log("fail to close")
}
})
},
fail: (e) => {
console.log("表创建失败!")
console.log(e)
}
})
}
},
onLaunch: function() {
console.log('App Launch');
let ifFirstLaunch = uni.getStorageSync('ifFirstLaunch')
if(ifFirstLaunch === undefined) {
console.log("first",ifFirstLaunch)
uni.setStorageSync('ifFirstLaunch', true);
}else if (ifFirstLaunch === true) {
console.log("notFirst",ifFirstLaunch)
uni.setStorageSync('ifFirstLaunch', false);
}else {
console.log("notFirst",ifFirstLaunch)
}
// uni.setStorageSync('ifFirstLaunch', true);
let that = this;
// 定义是否刷新的全局变量,直接挂载到uni原型下
uni.isRefresh = false;
var temp=Object.assign(uni.previewImage);
uni.previewImage = function(obj){
temp(obj).then(()=>{
uni.isPriview = true;
})
}
// 在APP环境下
// #ifdef APP-PLUS
// 调用函数打开或者创建数据库
if(!plus.sqlite.isOpenDatabase('notice','_doc/notice.db')) {
opdb('notice','_doc/a.db')
.then(() => {
// 创建数据表
that.creatTable();
// 调试使用清除数据表
// plus.sqlite.executeSql({
// name: 'notice',
// sql: [
// 'drop table reply_messages',
// 'drop table news_messages'
// ],
// success: (e) => {
// console.log(e)
// console.log("成功删除所有数据表")
// },
// fail: (err) =>{
// console.log(err)
// }
// })
})
}
// 禁止用户横屏操作
plus.screen.lockOrientation('portrait-primary');
// 调用函数检查更新
checkappupdate.check({
// {} 里配置参数, 默认如下,其中api是接口地址,必须填写
title:"检测到有新版本!",
content:"请升级app到最新版本!",
canceltext:"暂不升级",
oktext:"立即升级",
api: BaseUrl + '/version'
})
// #endif
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
}
</script>
<style lang="less">
/*每个页面公共css */
@import url('@/common/iconfont.css');
view {
font-size: 16px;
}
page {
background-color: @g-background;
}
// 页面中设置高度100% 可实现 ————小鸽子
uni-page-body,
#app {
height: 100%;
}
image {
background-color: #F0F0F0;
}
.bottom_box {
height: 50px;
}
.uni-tabbar {
box-shadow: 0px 10px 20px 0px #888;
background-color: #fff !important;
}
.uni-tabbar-border {
background-color: transparent !important;
}
</style>
=======
<script>
import checkappupdate from 'common/checkappupdate.js';
import BaseUrl from 'common/config.js';
import { opdb } from 'common/in-xupt-functions.js';
export default {
methods: {
creatTable: function() {
plus.sqlite.executeSql({
name:'notice',
sql: [
// 创建回复提醒表
`CREATE TABLE if not exists reply_messages (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"user_id" INTEGER(11) NOT NULL,
"sender_id" TEXT NOT NULL,
"source_content" TEXT NOT NULL,
"reply_content" TEXT,
"send_time" TEXT NOT NULL,
"source_type" INTEGER(2) NOT NULL,
"post_type" INTEGER(2) NOT NULL,
"source_id" INTEGER(11) NOT NULL)`,
// 创建艾特提醒表
`CREATE TABLE if not exists at_messages (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"user_id" INTEGER(11) NOT NULL,
"sender_id" TEXT NOT NULL,
"source_id" INTEGER(11) NOT NULL,
"action" TEXT NOT NULL,
"source_type" TEXT NOT NULL,
"post_type" INTEGER(2) NOT NULL,
"source_content" TEXT NOT NULL,
"send_time" TEXT NOT NULL)`,
// 创建动态提醒表
`CREATE TABLE if not exists news_messages (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"user_id" INTEGER(11) NOT NULL,
"sender_id" TEXT NOT NULL,
"source_content" TEXT NOT NULL,
"send_time" TEXT NOT NULL,
"source_id" INTEGER(11) NOT NULL,
"post_type" INTEGER(2) NOT NULL)`,
// 创建系统提醒表
`CREATE TABLE if not exists system_messages (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"user_id" INTEGER(11) NOT NULL,
"title" TEXT NOT NULL,
"content" TEXT NOT NULL,
"publish_time" TEXT NOT NULL)`
],
success: () => {
console.log("表创建成功!")
plus.sqlite.closeDatabase({
name: 'notice',
success: (e) => {
console.log("close db after creat table")
},
fail: (err) => {
console.log(err)
console.log("fail to close")
}
})
},
fail: (e) => {
console.log("表创建失败!")
console.log(e)
}
})
}
},
onLaunch: function() {
console.log('App Launch');
let ifFirstLaunch = uni.getStorageSync('ifFirstLaunch')
if(ifFirstLaunch === undefined) {
console.log("first",ifFirstLaunch)
uni.setStorageSync('ifFirstLaunch', true);
}else if (ifFirstLaunch === true) {
console.log("notFirst",ifFirstLaunch)
uni.setStorageSync('ifFirstLaunch', false);
}else {
console.log("notFirst",ifFirstLaunch)
}
// uni.setStorageSync('ifFirstLaunch', true);
let that = this;
// 定义是否刷新的全局变量,直接挂载到uni原型下
uni.isRefresh = false;
var temp=Object.assign(uni.previewImage);
uni.previewImage = function(obj){
temp(obj).then(()=>{
uni.isPriview = true;
})
}
// 在APP环境下
// #ifdef APP-PLUS
// 调用函数打开或者创建数据库
if(!plus.sqlite.isOpenDatabase('notice','_doc/notice.db')) {
opdb('notice','_doc/a.db')
.then(() => {
// 创建数据表
that.creatTable();
// 调试使用清除数据表
// plus.sqlite.executeSql({
// name: 'notice',
// sql: [
// 'drop table reply_messages',
// 'drop table news_messages'
// ],
// success: (e) => {
// console.log(e)
// console.log("成功删除所有数据表")
// },
// fail: (err) =>{
// console.log(err)
// }
// })
})
}
// 禁止用户横屏操作
plus.screen.lockOrientation('portrait-primary');
// 调用函数检查更新
checkappupdate.check({
// {} 里配置参数, 默认如下,其中api是接口地址,必须填写
title:"检测到有新版本!",
content:"请升级app到最新版本!",
canceltext:"暂不升级",
oktext:"立即升级",
api: BaseUrl + '/version'
})
// #endif
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
}
</script>
<style lang="less">
/*每个页面公共css */
@import url('@/common/iconfont.css');
view {
font-size: 16px;
}
page {
background-color: @g-background;
}
// 页面中设置高度100% 可实现 ————小鸽子
uni-page-body,
#app {
height: 100%;
}
image {
background-color: #F0F0F0;
}
.bottom_box {
height: 50px;
}
.uni-tabbar {
box-shadow: 0px 10px 20px 0px #888;
background-color: #fff !important;
}
.uni-tabbar-border {
background-color: transparent !important;
}
</style>
>>>>>>> d4605a47e0508be7845427ffacd11ec91f4c5549
=======
<script>
import checkappupdate from 'common/checkappupdate.js';
import BaseUrl from 'common/config.js';
import { opdb } from 'common/in-xupt-functions.js';
export default {
methods: {
creatTable: function() {
plus.sqlite.executeSql({
name:'notice',
sql: [
// 创建回复提醒表
`CREATE TABLE if not exists reply_messages (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"user_id" INTEGER(11) NOT NULL,
"sender_id" TEXT NOT NULL,
"source_content" TEXT NOT NULL,
"reply_content" TEXT,
"send_time" TEXT NOT NULL,
"source_type" INTEGER(2) NOT NULL,
"post_type" INTEGER(2) NOT NULL,
"source_id" INTEGER(11) NOT NULL)`,
// 创建艾特提醒表
`CREATE TABLE if not exists at_messages (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"user_id" INTEGER(11) NOT NULL,
"sender_id" TEXT NOT NULL,
"source_id" INTEGER(11) NOT NULL,
"action" TEXT NOT NULL,
"source_type" TEXT NOT NULL,
"post_type" INTEGER(2) NOT NULL,
"source_content" TEXT NOT NULL,
"send_time" TEXT NOT NULL)`,
// 创建动态提醒表
`CREATE TABLE if not exists news_messages (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"user_id" INTEGER(11) NOT NULL,
"sender_id" TEXT NOT NULL,
"source_content" TEXT NOT NULL,
"send_time" TEXT NOT NULL,
"source_id" INTEGER(11) NOT NULL,
"post_type" INTEGER(2) NOT NULL)`,
// 创建系统提醒表
`CREATE TABLE if not exists system_messages (
"id" INTEGER PRIMARY KEY AUTOINCREMENT,
"user_id" INTEGER(11) NOT NULL,
"title" TEXT NOT NULL,
"content" TEXT NOT NULL,
"publish_time" TEXT NOT NULL)`
],
success: () => {
console.log("表创建成功!")
plus.sqlite.closeDatabase({
name: 'notice',
success: (e) => {
console.log("close db after creat table")
},
fail: (err) => {
console.log(err)
console.log("fail to close")
}
})
},
fail: (e) => {
console.log("表创建失败!")
console.log(e)
}
})
}
},
onLaunch: function() {
console.log('App Launch');
let ifFirstLaunch = uni.getStorageSync('ifFirstLaunch')
if(ifFirstLaunch === undefined) {
console.log("first",ifFirstLaunch)
uni.setStorageSync('ifFirstLaunch', true);
}else if (ifFirstLaunch === true) {
console.log("notFirst",ifFirstLaunch)
uni.setStorageSync('ifFirstLaunch', false);
}else {
console.log("notFirst",ifFirstLaunch)
}
// uni.setStorageSync('ifFirstLaunch', true);
let that = this;
// 定义是否刷新的全局变量,直接挂载到uni原型下
uni.isRefresh = false;
var temp=Object.assign(uni.previewImage);
uni.previewImage = function(obj){
temp(obj).then(()=>{
uni.isPriview = true;
})
}
// 在APP环境下
// #ifdef APP-PLUS
// 调用函数打开或者创建数据库
if(!plus.sqlite.isOpenDatabase('notice','_doc/notice.db')) {
opdb('notice','_doc/a.db')
.then(() => {
// 创建数据表
that.creatTable();
// 调试使用清除数据表
// plus.sqlite.executeSql({
// name: 'notice',
// sql: [
// 'drop table reply_messages',
// 'drop table news_messages'
// ],
// success: (e) => {
// console.log(e)
// console.log("成功删除所有数据表")
// },
// fail: (err) =>{
// console.log(err)
// }
// })
})
}
// 禁止用户横屏操作
plus.screen.lockOrientation('portrait-primary');
// 调用函数检查更新
checkappupdate.check({
// {} 里配置参数, 默认如下,其中api是接口地址,必须填写
title:"检测到有新版本!",
content:"请升级app到最新版本!",
canceltext:"暂不升级",
oktext:"立即升级",
api: BaseUrl + '/version'
})
// #endif
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
}
</script>
<style lang="less">
/*每个页面公共css */
@import url('@/common/iconfont.css');
view {
font-size: 16px;
}
page {
background-color: @g-background;
}
// 页面中设置高度100% 可实现 ————小鸽子
uni-page-body,
#app {
height: 100%;
}
image {
background-color: #F0F0F0;
}
.bottom_box {
height: 50px;
}
.uni-tabbar {
box-shadow: 0px 10px 20px 0px #888;
background-color: #fff !important;
}
.uni-tabbar-border {
background-color: transparent !important;
}
</style>
>>>>>>> d4605a47e0508be7845427ffacd11ec91f4c5549
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。