作者 李洪娟

qidongye

正在显示 100 个修改的文件 包含 242 行增加0 行删除

要显示太多修改。

为保证性能只显示 100 of 100+ 个文件。

App({
onLaunch: function () {
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || []
},
post: function (url, data, headerParams) {
/**
* 自定义post函数,返回Promise
* +-------------------
* @param {String} url 接口网址
* @param {arrayObject} data 要传的数组对象 like: {name: 'name', age: 32}
* +-------------------
* @return {Promise} promise 返回promise供后续操作
*/
// wx.showLoading({
// title: '加载中',
// })
wx.showNavigationBarLoading()
wx.showLoading({
title: '加载中',
})
var promise = new Promise((resolve, reject) => {
//init
let that = this;
let postData = data;
let baseUrl = 'http://192.168.1.7/anleguo/public';
// let baseUrl = 'http://192.168.1.15/public';
// postData.signature = that.makeSign(postData);
//网络请求
let header = {
'content-type': 'application/x-www-form-urlencoded'
}
header = Object.assign(header, headerParams)
wx.request({
url: baseUrl + url,
data: postData,
method: 'POST',
header: header,
success: function (res) {//返回取得的数据
if (res.data.code == '20000') {
resolve(res.data.data);
} else if (res.data.code == '40000') {//返回错误提示信息
console.log(res)
wx.showToast({
title: res.data.msg,
icon: 'none'
})
// wx.showModal({
// title: '提示',
// // content: res.data.msg,
// success: function (res) {
// if (res.confirm) {
// wx.removeStorageSync('token');
// wx.navigateTo({
// // url: '/pages/startRecord/startRecord',
// })
// }
// }
// })
} else if (res.data.code == '40001') {//返回错误提示信息
wx.showModal({
title: '提示',
content: '登录已过期请重新登录!',
showCancel: false,
success: function (res) {
if (res.confirm) {
wx.removeStorageSync('token');
wx.navigateTo({
// url: '/pages/startRecord/startRecord',
})
}
}
})
} else if (res.data.code == '40002') {
console.log(res)
// wx.showModal({
// title: '提示',
// // content: res.data.msg,
// showCancel: false,
// success: function (res) { }
// })
} else if (res.data.code == '40003') {
// 初始化用户信息判断
let usetrInfoType = {
hasUserInfo: false
}
resolve(usetrInfoType);
// wx.showModal({
// title: '提示',
// content: res.data.msg,
// showCancel: false
// })
} else {
console.log(res)
// wx.showModal({
// title: '提示',
// // content: res.data.msg,
// showCancel: false
// })
reject(res.data)
}
setTimeout(function () {
wx.hideLoading()
wx.hideNavigationBarLoading()
}, 600)
},
error: function (e) {
reject('网络出错');
// wx.hideLoading()
wx.hideNavigationBarLoading()
}
})
});
return promise;
},
formCollect(id) {
let url = '/sign/formid'
let params = {
formid: id,
openid: wx.getStorageSync('openId')
}
this.post(url, params).then((res) => {
console.log(res)
}).catch((errMsg) => {
})
},
nowDate() {
let date = new Date();
let month = date.getMonth() + 1;
let day = date.getDate();
return date.getFullYear() + '年' + (month > 9 ? month : ('0' + month)) + '月' + (day > 9 ? day : ('0' + day)) + '日';
},
initDate(a) {
let date1 = new Date();
let time1 = date1.getFullYear() + "年" + (date1.getMonth() + 1) + "月" + date1.getDate() + '日';
let date2 = new Date(date1);
date2.setDate(date1.getDate() + a);
let time2 = date2.getFullYear() + "年" + (date2.getMonth() + 1) + "月" + date2.getDate() + '日';
return time2;
},
// 数组移除指定元素
arryRemove(arr, item) {
return arr.filter(function (ele) {
return ele != item;
})
},
strTime(strtime) {
let str = 'bronet' + strtime + 'beijing'
return md5(md5(str))
},
globalData: {
userInfo: null,
baseUrl: 'http://beijing.w.bronet.cn'
}
})
... ...
{
"pages": [
"pages/index/index",
"pages/personecenter/code/code",
"pages/personecenter/exchange/exchange",
"pages/personecenter/recharge/recharge",
"pages/mainindex/mainindex",
"pages/newcemetery/createpdopleinfo/createpeopleinfo",
"pages/myindex/myindex",
"pages/mudipageindex/mudipageindex",
"pages/publicmemory/countrydetail/countrydetail",
"pages/newcemetery/wodezuci/wodezuci",
"pages/newcemetery/attentionmudi/attentionmudi",
"pages/publicmemory/herolist/herolist",
"pages/newcemetery/myancestral/myancestral",
"pages/newcemetery/xianshimudi/xianshimudi",
"pages/newcemetery/jizu/jizu",
"pages/newcemetery/wangshangmudi/wangshangmudi",
"pages/newcemetery/gaobieting/gaobieting",
"pages/newcemetery/shoulingtangpage/shoulingtangpage",
"pages/newcemetery/cemetryhomepagesecond/cemetryhomepagesecond",
"pages/newcemetery/cemetryhomepage/cemetryhomepage",
"pages/newcemetery/fugao/fugao",
"pages/newcemetery/fugaosecond/fugaosecond",
"pages/newcemetery/sureorder/sureorder",
"pages/newcemetery/funeral/funeral",
"pages/newcemetery/hallofremember/hallofremember",
"pages/publicmemory/increaseevent/increaseevent",
"pages/newcemetery/farewellhall/farewellhall",
"pages/publishbox/blessforliving/blessforliving",
"pages/newcemetery/shoulingtang/shoulingtang",
"pages/newcemetery/onlinemetery/onlinemetery",
"pages/newcemetery/realemetery/realemetery",
"pages/publishbox/dieforever/dieforever",
"pages/publishbox/disatereduce/disatereduce",
"pages/publishbox/wealthhall/wealthhall",
"pages/publishbox/treasure/treasure",
"pages/publishbox/treasurehall/treasurehall",
"pages/publishbox/wishwell/wishwell",
"pages/publish/publish",
"pages/publicmemory/writeoration/writeoration",
"pages/publicmemory/memeryday/memeryday",
"pages/publicmemory/matrybirthday/matrybirthday",
"pages/publicmemory/peoplememorydetail/peoplememorydetail",
"pages/publicmemory/memorybuilddetail/memorybuilddetail",
"pages/publicmemory/enevtdetail/enevtdetail",
"pages/publicmemory/memorybuild/memorybuild",
"pages/publicmemory/hero/hero",
"pages/publicmemory/increasememoryhouse/increasememoryhouse",
"pages/publicmemory/eventmemory/eventmemory",
"pages/publicmemory/peoplememory/peoplememory",
"pages/publicindex/publicindex",
"pages/main/searchpage/searchpage",
"pages/main/detail/detail",
"pages/logs/logs",
"pages/newcemetery/increasezuci/increasezuci",
"pages/newcemetery/usehelp/usehelp",
"pages/newcemetery/zucimember/zucimember",
"pages/newcemetery/mudilist/mudilist",
"pages/newcemetery/newmudi/newmudi",
"pages/newcemetery/diepeopleinfo/diepeopleinfo",
"pages/newcemetery/zucimemberremark/zucimemberremark",
"pages/newcemetery/jianjie/jianjie",
"pages/newcemetery/searchmudilist/searchmudilist"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
}
\ No newline at end of file
... ...
/**app.wxss**/
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
... ...