Merge branch 'xie1206'
This commit is contained in:
@@ -174,6 +174,20 @@
|
|||||||
this.getTitles(id)
|
this.getTitles(id)
|
||||||
},
|
},
|
||||||
setOneCateIndex(item, index) {
|
setOneCateIndex(item, index) {
|
||||||
|
if(this.userMes.tgdzPower == 0){
|
||||||
|
let that = this
|
||||||
|
uni.showModal({
|
||||||
|
content: "购买 针灸六经法要上册和下册 后方可使用此功能",
|
||||||
|
confirmText: '好的',
|
||||||
|
showCancel: false,
|
||||||
|
success: function(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
// console.log('用户点击确定');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
if(item.title == "时辰取穴"){
|
if(item.title == "时辰取穴"){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "../timeAcupoint/timeAcupoint"
|
url: "../timeAcupoint/timeAcupoint"
|
||||||
|
|||||||
@@ -325,7 +325,8 @@
|
|||||||
page:1,
|
page:1,
|
||||||
totalPage:0,
|
totalPage:0,
|
||||||
tjProList:[],
|
tjProList:[],
|
||||||
status : 3
|
status : 3,
|
||||||
|
userMsg:{}, // 用户信息
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
@@ -352,6 +353,7 @@
|
|||||||
uni.hideTabBar();
|
uni.hideTabBar();
|
||||||
this.getData();
|
this.getData();
|
||||||
this.getTags()
|
this.getTags()
|
||||||
|
this.getUserInfo()
|
||||||
},
|
},
|
||||||
// 页面加载完毕
|
// 页面加载完毕
|
||||||
onReady() {
|
onReady() {
|
||||||
@@ -363,6 +365,7 @@
|
|||||||
this.tjProList = []
|
this.tjProList = []
|
||||||
this.getData()
|
this.getData()
|
||||||
this.getTags()
|
this.getTags()
|
||||||
|
this.getUserInfo()
|
||||||
// this.requestIapOrder()
|
// this.requestIapOrder()
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
|
|
||||||
@@ -403,6 +406,17 @@
|
|||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['setUserInfo']),
|
...mapMutations(['setUserInfo']),
|
||||||
// ...mapMutations(['setLoadingShow']),
|
// ...mapMutations(['setLoadingShow']),
|
||||||
|
// 获取用户详情
|
||||||
|
getUserInfo() {
|
||||||
|
// 用户详情
|
||||||
|
// if (this.userInfo.id != undefined) {
|
||||||
|
this.$http
|
||||||
|
.post('book/user/info/' + this.userInfo.id)
|
||||||
|
.then(res => {
|
||||||
|
this.userMsg = res.user
|
||||||
|
});
|
||||||
|
// }
|
||||||
|
},
|
||||||
// 获取商品标签
|
// 获取商品标签
|
||||||
getTags() {
|
getTags() {
|
||||||
this.loadingNow = false
|
this.loadingNow = false
|
||||||
@@ -662,6 +676,19 @@
|
|||||||
|
|
||||||
// 跳转
|
// 跳转
|
||||||
onPageJump(url) {
|
onPageJump(url) {
|
||||||
|
console.log(this.userMsg,'this.userMsg')
|
||||||
|
if(url == '../luck/luck' && this.userMsg.wylqPower == 0){
|
||||||
|
uni.showModal({
|
||||||
|
content: "购买 中医时间医学·火病原理 后方可使用此功能",
|
||||||
|
confirmText: '好的',
|
||||||
|
showCancel: false,
|
||||||
|
success: function(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url
|
url: url
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -165,25 +165,66 @@
|
|||||||
showCalendar: false,
|
showCalendar: false,
|
||||||
quxue: [], // 时辰取穴
|
quxue: [], // 时辰取穴
|
||||||
tiangandizhi: {},
|
tiangandizhi: {},
|
||||||
yuanXue: [
|
pageTime:{ // 页面得时间,载入时赋值
|
||||||
'腕骨', '丘墟', '丘墟', '太溪', '大陵', '京骨', '阳池', '太渊', '合谷', '太白', '冲阳', '神门'
|
hour:0,
|
||||||
],
|
minute:0,
|
||||||
|
increments:0 // 分钟数距离整点的差额
|
||||||
|
},
|
||||||
|
myInterval:null, // 定时器
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
let da = new Date().toISOString().slice(0, 10)
|
let da = new Date().toISOString().slice(0, 10)
|
||||||
this.timestamp = new Date(da).getTime()
|
this.timestamp = new Date(da).getTime()
|
||||||
console.log('初始时间', this.dateToString, this.date)
|
// console.log('初始时间', this.dateToString, this.date)
|
||||||
this.getXueWei(this.dateToString)
|
this.getXueWei(this.dateToString)
|
||||||
this.getTGDZ(this.dateToString)
|
this.getTGDZ(this.dateToString)
|
||||||
// console.log('全局hours',this.$getHours.hourNumber)
|
|
||||||
|
},
|
||||||
|
onUnload() {
|
||||||
|
this.pageTime.hour = 0
|
||||||
|
this.pageTime.minute = 0
|
||||||
|
this.pageTime.increments = 0
|
||||||
|
// clearInterval(this.myInterval)
|
||||||
|
clearTimeout(this.myInterval);
|
||||||
|
console.log('隐藏页面',this.myInterval)
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
// console.log('全局hours',this.$getHours.hourNumber,this.$getHours.minuteNumber)
|
||||||
|
var mydate = new Date()
|
||||||
|
this.pageTime.hour = mydate.getHours()
|
||||||
|
this.pageTime.minute = mydate.getMinutes()
|
||||||
|
console.log('全局hours', this.pageTime.hour,this.pageTime.minute)
|
||||||
|
this.pageTime.increments = 5 - this.pageTime.minute
|
||||||
|
console.log('距离整点', this.pageTime.increments, this.pageTime.increments * 60000, '毫秒后执行')
|
||||||
|
if(this.pageTime.increments > 0){
|
||||||
|
|
||||||
|
this.myInterval = setTimeout(() => {
|
||||||
|
this.autoChange()
|
||||||
|
}, this.pageTime.increments * 60000)
|
||||||
|
}else{
|
||||||
|
// 正好是0分
|
||||||
|
this.myInterval = setTimeout(() => {
|
||||||
|
this.autoChange()
|
||||||
|
}, 60 * 60000)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onHide() {
|
onHide() {
|
||||||
|
clearTimeout(this.myInterval);
|
||||||
|
console.log('清除定时器',this.myInterval)
|
||||||
|
//this.myInterval = null
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
scroll: function(e) {},
|
scroll: function(e) {},
|
||||||
|
autoChange(){
|
||||||
|
console.log()
|
||||||
|
let da = new Date().toISOString().slice(0, 10)
|
||||||
|
this.timestamp = new Date(da).getTime()
|
||||||
|
this.dateToString = formatDateTime(new Date()), // 字符串格式的日期
|
||||||
|
this.getXueWei(this.dateToString)
|
||||||
|
this.getTGDZ(this.dateToString)
|
||||||
|
},
|
||||||
showTotalFun() {
|
showTotalFun() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "./totalTable"
|
url: "./totalTable"
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ const nowHour = new Date;
|
|||||||
const nowHour = new Date;
|
const nowHour = new Date;
|
||||||
// #endif
|
// #endif
|
||||||
nowHour.hourNumber = nowHour.getHours() // 当前的小时数
|
nowHour.hourNumber = nowHour.getHours() // 当前的小时数
|
||||||
|
nowHour.minuteNumber = nowHour.getMinutes()
|
||||||
|
|
||||||
var myHour = {
|
var myHour = {
|
||||||
playBgm({mute=false}){
|
playBgm({mute=false}){
|
||||||
|
|||||||
Reference in New Issue
Block a user