174 lines
4.2 KiB
JavaScript
174 lines
4.2 KiB
JavaScript
|
|
class DBPost {
|
|
constructor(url) {
|
|
this.storageKeyName1 = 'xingming';
|
|
this.storageKeyName2 = 'xuehao';
|
|
this.storageKeyName3 = 'zhuanye';
|
|
this.storageKeyName4 = 'xueyuan';
|
|
this.storageKeyName8 = 'shijian';
|
|
this.storageKeyName9 = 'didian';
|
|
this.storageKeyName10 = 'jiaoshi';
|
|
this.storageKeyName11 = 'renyuan1';
|
|
this.storageKeyName12 = 'renyuan2';
|
|
this.storageKeyName13 = 'shijianchuo';
|
|
this.storageKeyName15 = 'admin';
|
|
|
|
|
|
}
|
|
|
|
|
|
getxingmingData() {
|
|
var res1 = wx.getStorageSync(this.storageKeyName1);
|
|
return res1;
|
|
}
|
|
getadminData() {
|
|
var res15 = wx.getStorageSync(this.storageKeyName15);
|
|
return res15;
|
|
}
|
|
getxuehaoData() {
|
|
var res2 = wx.getStorageSync(this.storageKeyName2);
|
|
return res2;
|
|
}
|
|
getzhuanyeData() {
|
|
var res3 = wx.getStorageSync(this.storageKeyName3);
|
|
return res3;
|
|
}
|
|
getxueyuanData() {
|
|
var res4 = wx.getStorageSync(this.storageKeyName4);
|
|
return res4;
|
|
}
|
|
|
|
getshijianData() {
|
|
var res8 = wx.getStorageSync(this.storageKeyName8);
|
|
if (!res8) {
|
|
res8 = require('../data/data.js').shijian;
|
|
this.execSetStorageSync8(res8);
|
|
}
|
|
return res8;
|
|
}
|
|
getdidianData() {
|
|
var res9 = wx.getStorageSync(this.storageKeyName9);
|
|
if (!res9) {
|
|
res9 = require('../data/data.js').didian;
|
|
this.execSetStorageSync9(res9);
|
|
}
|
|
return res9;
|
|
}
|
|
getjiaoshiData() {
|
|
var res10 = wx.getStorageSync(this.storageKeyName10);
|
|
if (!res10) {
|
|
res10 = require('../data/data.js').jiaoshi;
|
|
this.execSetStorageSync10(res10);
|
|
}
|
|
return res10;
|
|
}
|
|
getrenyuan1Data() {
|
|
var res11 = wx.getStorageSync(this.storageKeyName11);
|
|
if (!res11) {
|
|
res11 = require('../data/data.js').renyuan1;
|
|
this.execSetStorageSync11(res11);
|
|
}
|
|
return res11;
|
|
}
|
|
getrenyuan2Data() {
|
|
var res12 = wx.getStorageSync(this.storageKeyName12);
|
|
if (!res12) {
|
|
res12 = require('../data/data.js').renyuan2;
|
|
this.execSetStorageSync12(res12);
|
|
}
|
|
return res12;
|
|
}
|
|
getshijianchuoData() {
|
|
var res13 = wx.getStorageSync(this.storageKeyName13);
|
|
if (!res13) {
|
|
res13 = require('../data/data.js').shijianchuo;
|
|
this.execSetStorageSync13(res13);
|
|
}
|
|
return res13;
|
|
}
|
|
|
|
|
|
|
|
execSetStorageSync1(data) {
|
|
wx.setStorageSync(this.storageKeyName1, data);
|
|
}
|
|
execSetStorageSync2(data) {
|
|
wx.setStorageSync(this.storageKeyName2, data);
|
|
}
|
|
execSetStorageSync3(data) {
|
|
wx.setStorageSync(this.storageKeyName3, data);
|
|
}
|
|
execSetStorageSync4(data) {
|
|
wx.setStorageSync(this.storageKeyName4, data);
|
|
}
|
|
execSetStorageSync8(data) {
|
|
wx.setStorageSync(this.storageKeyName8, data);
|
|
}
|
|
execSetStorageSync9(data) {
|
|
wx.setStorageSync(this.storageKeyName9, data);
|
|
}
|
|
execSetStorageSync10(data) {
|
|
wx.setStorageSync(this.storageKeyName10, data);
|
|
}
|
|
execSetStorageSync11(data) {
|
|
wx.setStorageSync(this.storageKeyName11, data);
|
|
}
|
|
execSetStorageSync12(data) {
|
|
wx.setStorageSync(this.storageKeyName12, data);
|
|
}
|
|
execSetStorageSync13(data) {
|
|
wx.setStorageSync(this.storageKeyName13, data);
|
|
}
|
|
execSetStorageSync14(num,data) {
|
|
wx.setStorageSync(num, data);
|
|
}
|
|
execSetStorageSync15(data) {
|
|
wx.setStorageSync(this.storageKeyName15, data);
|
|
}
|
|
|
|
|
|
|
|
newdianming(num,newdianming) {
|
|
this.execSetStorageSync14(num,newdianming);
|
|
}
|
|
newshijian(newshijian){
|
|
this.execSetStorageSync8(newshijian);
|
|
}
|
|
newdidian(newdidian){
|
|
this.execSetStorageSync9(newdidian);
|
|
}
|
|
newjiaoshi(newjiaoshi){
|
|
this.execSetStorageSync10(newjiaoshi);
|
|
}
|
|
newrenyuan1(newrenyuan1){
|
|
this.execSetStorageSync11(newrenyuan1);
|
|
}
|
|
newrenyuan2(newrenyuan2) {
|
|
this.execSetStorageSync12(newrenyuan2);
|
|
}
|
|
newshijianchuo(newshijianchuo) {
|
|
this.execSetStorageSync13(newshijianchuo);
|
|
}
|
|
|
|
newxingming(newxingming) {
|
|
this.execSetStorageSync1(newxingming);
|
|
}
|
|
newxuehao(a) {
|
|
this.execSetStorageSync2(a);
|
|
}
|
|
newzhuanye(a) {
|
|
this.execSetStorageSync3(a);
|
|
}
|
|
newxueyuan(a) {
|
|
this.execSetStorageSync4(a);
|
|
}
|
|
newadmin(a) {
|
|
this.execSetStorageSync15(a);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
export { DBPost } |