Compare commits
1 Commits
xie_wuyunl
...
xie_quhao
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5277ab3f5b |
@@ -45,9 +45,10 @@ const courtConfig = {
|
||||
}
|
||||
};
|
||||
//手机号验证正则表达式
|
||||
// const phoneRegular = /^1\d{10}$/;
|
||||
// (中国大陆)
|
||||
const phoneRegular = /^1\d{10}$/;
|
||||
// 手机号码验证 支持港澳台 大陆
|
||||
const phoneRegular = /^[1][3-8]\d{9}$|^([6|9])\d{7}$|^[0][9]\d{8}$|^[6]([8|6])\d{5}$|^(00){0,1}(65){1}[13689]\d{6,7}$/;
|
||||
// const phoneRegular = /^[1][3-8]\d{9}$|^([6|9])\d{7}$|^[0][9]\d{8}$|^[6]([8|6])\d{5}$|^(00){0,1}(65){1}[13689]\d{6,7}$/;
|
||||
//邮箱验证正则表达式
|
||||
const mailRegular = /^\w+@\w+(\.[a-zA-Z]{2,3}){1,2}$/;
|
||||
//密码验证正则表达式
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
"src" : "图片路径"
|
||||
}
|
||||
],
|
||||
"versionName" : "1.2.14",
|
||||
"versionCode" : 1214,
|
||||
"versionName" : "1.2.15",
|
||||
"versionCode" : 1215,
|
||||
"app-plus" : {
|
||||
"compatible" : {
|
||||
"ignoreVersion" : true
|
||||
|
||||
@@ -508,14 +508,6 @@
|
||||
"navigationBarTitleText" : "脉穴详情",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/luck/luck",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "五运六气",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
||||
@@ -1,287 +0,0 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module> -->
|
||||
<z-nav-bar title="五运六气"></z-nav-bar>
|
||||
<view class="">
|
||||
<canvas style="width: 100%; height:100vh;" canvas-id="firstCanvas" id="firstCanvas"></canvas>
|
||||
</view>
|
||||
<music-play :playData="playData"></music-play>
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import musicPlay from '@/components/music.vue'
|
||||
import $http from '@/config/requestConfig.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
playData: {},
|
||||
pageWidth: uni.getSystemInfoSync().windowWidth,
|
||||
pageHeight: uni.getSystemInfoSync().windowHeight - 200,
|
||||
fiveYunNum: 5,
|
||||
zhuyun: [],
|
||||
keyun: [],
|
||||
nianyun: '',
|
||||
fiveTimes: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getYun()
|
||||
},
|
||||
onReady: function(e) {
|
||||
|
||||
},
|
||||
onHide() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getpanOne() {
|
||||
console.log(this.nianyun, 'nuanyun')
|
||||
var myCanvas = uni.createCanvasContext('firstCanvas')
|
||||
//将原点设置100,100位置
|
||||
myCanvas.translate(0, 0);
|
||||
//原点在100,100,则圆心设为0,0 ——> 100,100的位置
|
||||
myCanvas.setStrokeStyle("#00ff00")
|
||||
myCanvas.setLineWidth(1)
|
||||
// myCanvas.fillStyle = "#f3b2a7"
|
||||
// myCanvas.rect(0, 0, 200, 200)
|
||||
// myCanvas.stroke()
|
||||
myCanvas.setLineWidth(1)
|
||||
// console.log(-Math.PI/5,'-Math.PI/2')
|
||||
let yunNum = 360 / 5
|
||||
var angle = Math.PI * 2 / 5;
|
||||
// let startAng = 0
|
||||
// console.log(angle,'angle')
|
||||
var deg = Math.PI / 180
|
||||
// 最大圈
|
||||
for (var i = 0; i < this.fiveYunNum; i++) {
|
||||
myCanvas.setStrokeStyle("#000")
|
||||
let n = i + 1
|
||||
myCanvas.beginPath();
|
||||
myCanvas.moveTo(this.pageWidth / 2, this.pageHeight / 2)
|
||||
myCanvas.arc(this.pageWidth / 2, this.pageHeight / 2, 160, -deg * i * yunNum, -deg * yunNum * n, true)
|
||||
|
||||
myCanvas.font = 'normal 16px Arial'
|
||||
myCanvas.fillStyle = "#f3b2a7"
|
||||
myCanvas.fill();
|
||||
myCanvas.closePath();
|
||||
myCanvas.stroke()
|
||||
}
|
||||
for (var i = 0; i < this.fiveYunNum; i++) {
|
||||
myCanvas.setStrokeStyle("#000")
|
||||
let n = i + 1
|
||||
myCanvas.beginPath();
|
||||
myCanvas.moveTo(this.pageWidth / 2, this.pageHeight / 2)
|
||||
myCanvas.arc(this.pageWidth / 2, this.pageHeight / 2, 90, -deg * i * yunNum, -deg * yunNum * n, true)
|
||||
myCanvas.closePath();
|
||||
myCanvas.fillStyle = "#fef9e4"
|
||||
myCanvas.fill();
|
||||
myCanvas.stroke()
|
||||
}
|
||||
// 中间的主运
|
||||
myCanvas.beginPath();
|
||||
myCanvas.arc(this.pageWidth / 2, this.pageHeight / 2, 30, 0, 2 * Math.PI, true)
|
||||
myCanvas.fillStyle = "#f8d8d5"
|
||||
myCanvas.fill();
|
||||
myCanvas.fillStyle = "#000"
|
||||
myCanvas.fillText(this.nianyun, this.pageWidth / 2 - 9, this.pageHeight / 2 + 6)
|
||||
myCanvas.closePath();
|
||||
myCanvas.stroke()
|
||||
|
||||
|
||||
|
||||
// 绘制文字(主运)
|
||||
|
||||
myCanvas.beginPath();
|
||||
myCanvas.fillStyle = "#000"
|
||||
myCanvas.font = 'normal 16px Arial'
|
||||
// myCanvas.rotate((Math.PI/180)*5)
|
||||
myCanvas.fillText(this.zhuyun[0], this.pageWidth / 2 + 90, this.pageHeight / 2 + 70)
|
||||
myCanvas.closePath();
|
||||
myCanvas.stroke()
|
||||
|
||||
|
||||
myCanvas.beginPath();
|
||||
myCanvas.fillStyle = "#000"
|
||||
myCanvas.font = 'normal 16px Arial'
|
||||
// myCanvas.rotate((Math.PI/180)*5)
|
||||
myCanvas.fillText(this.zhuyun[1], this.pageWidth / 2 - 30, this.pageHeight / 2 + 120)
|
||||
myCanvas.closePath();
|
||||
myCanvas.stroke()
|
||||
|
||||
|
||||
myCanvas.beginPath();
|
||||
myCanvas.fillStyle = "#000"
|
||||
myCanvas.font = 'normal 16px Arial'
|
||||
// myCanvas.rotate((Math.PI/180)*5)
|
||||
myCanvas.fillText(this.zhuyun[2], this.pageWidth / 2 - 140, this.pageHeight / 2)
|
||||
myCanvas.closePath();
|
||||
myCanvas.stroke()
|
||||
|
||||
|
||||
myCanvas.beginPath();
|
||||
myCanvas.fillStyle = "#000"
|
||||
myCanvas.font = 'normal 16px Arial'
|
||||
// myCanvas.rotate((Math.PI/180)*5)
|
||||
myCanvas.fillText(this.zhuyun[3], this.pageWidth / 2 - 50, this.pageHeight / 2 - 120)
|
||||
myCanvas.closePath();
|
||||
myCanvas.stroke()
|
||||
|
||||
myCanvas.beginPath();
|
||||
myCanvas.fillStyle = "#000"
|
||||
myCanvas.font = 'normal 16px Arial'
|
||||
// myCanvas.rotate((Math.PI/180)*5)
|
||||
myCanvas.fillText(this.zhuyun[4], this.pageWidth / 2 + 90, this.pageHeight / 2 - 70)
|
||||
myCanvas.closePath();
|
||||
myCanvas.stroke()
|
||||
|
||||
// 结束
|
||||
// 绘制文字(客运)
|
||||
myCanvas.beginPath();
|
||||
myCanvas.fillStyle = "#000"
|
||||
myCanvas.font = 'normal 16px Arial'
|
||||
// myCanvas.rotate((Math.PI/180)*5)
|
||||
myCanvas.fillText(this.keyun[0], this.pageWidth / 2 + 40, this.pageHeight / 2 + 40)
|
||||
myCanvas.closePath();
|
||||
myCanvas.stroke()
|
||||
|
||||
|
||||
myCanvas.beginPath();
|
||||
myCanvas.fillStyle = "#000"
|
||||
myCanvas.font = 'normal 16px Arial'
|
||||
// myCanvas.rotate((Math.PI/180)*5)
|
||||
myCanvas.fillText(this.keyun[1], this.pageWidth / 2 - 20, this.pageHeight / 2 + 60)
|
||||
myCanvas.closePath();
|
||||
myCanvas.stroke()
|
||||
|
||||
|
||||
myCanvas.beginPath();
|
||||
myCanvas.fillStyle = "#000"
|
||||
myCanvas.font = 'normal 16px Arial'
|
||||
// myCanvas.rotate((Math.PI/180)*5)
|
||||
myCanvas.fillText(this.keyun[2], this.pageWidth / 2 - 70, this.pageHeight / 2)
|
||||
myCanvas.closePath();
|
||||
myCanvas.stroke()
|
||||
|
||||
|
||||
myCanvas.beginPath();
|
||||
myCanvas.fillStyle = "#000"
|
||||
myCanvas.font = 'normal 16px Arial'
|
||||
// myCanvas.rotate((Math.PI/180)*5)
|
||||
myCanvas.fillText(this.keyun[3], this.pageWidth / 2 - 30, this.pageHeight / 2 - 50)
|
||||
myCanvas.closePath();
|
||||
myCanvas.stroke()
|
||||
|
||||
myCanvas.beginPath();
|
||||
myCanvas.fillStyle = "#000"
|
||||
myCanvas.font = 'normal 16px Arial'
|
||||
// myCanvas.rotate((Math.PI/180)*5)
|
||||
myCanvas.fillText(this.keyun[4], this.pageWidth / 2 + 30, this.pageHeight / 2 - 20)
|
||||
myCanvas.closePath();
|
||||
myCanvas.stroke()
|
||||
// 结束
|
||||
|
||||
// 绘制时间
|
||||
// myCanvas.beginPath();
|
||||
myCanvas.save();
|
||||
myCanvas.translate(this.pageWidth / 2 + 170, this.pageHeight / 2 - 30);
|
||||
myCanvas.rotate(90 * Math.PI / 180 );
|
||||
// console.log(30 * Math.PI / 180 )
|
||||
myCanvas.fillStyle = "#000"
|
||||
// myCanvas.textBaseline = 'middle'
|
||||
myCanvas.font = 'normal 12px Arial'
|
||||
myCanvas.fillText(this.fiveTimes[0], 0, 0)
|
||||
// myCanvas.closePath();
|
||||
myCanvas.restore()
|
||||
|
||||
|
||||
// myCanvas.beginPath();
|
||||
myCanvas.save();
|
||||
myCanvas.translate(this.pageWidth / 2 + 80, this.pageHeight / 2 + 150);
|
||||
myCanvas.rotate((90+yunNum) * Math.PI / 180 );
|
||||
// console.log(30 * Math.PI / 180 )
|
||||
myCanvas.fillStyle = "#000"
|
||||
// myCanvas.textBaseline = 'middle'
|
||||
myCanvas.font = 'normal 12px Arial'
|
||||
myCanvas.fillText(this.fiveTimes[1], 0, 0)
|
||||
// myCanvas.closePath();
|
||||
myCanvas.restore()
|
||||
|
||||
|
||||
myCanvas.save();
|
||||
myCanvas.translate(this.pageWidth / 2 - 120, this.pageHeight / 2 + 120);
|
||||
myCanvas.rotate((90+yunNum*2) * Math.PI / 180 );
|
||||
myCanvas.fillStyle = "#000"
|
||||
myCanvas.font = 'normal 12px Arial'
|
||||
myCanvas.fillText(this.fiveTimes[2], 0, 0)
|
||||
myCanvas.restore()
|
||||
|
||||
myCanvas.save();
|
||||
myCanvas.translate(this.pageWidth / 2 - 160, this.pageHeight / 2 - 70);
|
||||
myCanvas.rotate((90+yunNum*3) * Math.PI / 180 );
|
||||
myCanvas.fillStyle = "#000"
|
||||
myCanvas.font = 'normal 12px Arial'
|
||||
myCanvas.fillText(this.fiveTimes[3], 0, 0)
|
||||
myCanvas.restore()
|
||||
|
||||
myCanvas.save();
|
||||
myCanvas.translate(this.pageWidth / 2 + 20, this.pageHeight / 2 - 170);
|
||||
myCanvas.rotate((90+yunNum*4) * Math.PI / 180 );
|
||||
myCanvas.fillStyle = "#000"
|
||||
myCanvas.font = 'normal 12px Arial'
|
||||
myCanvas.fillText(this.fiveTimes[4], 0, 0)
|
||||
myCanvas.restore()
|
||||
|
||||
myCanvas.draw()
|
||||
},
|
||||
getYun() {
|
||||
$http.request({
|
||||
url: "book/point/TGDZForYear",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"date": "2023-11-16 13:25:15"
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
|
||||
if (res.code == 0 && res.tgdz) {
|
||||
console.log('获取成功', res.tgdz)
|
||||
this.zhuyun = res.tgdz.wy.zhuYun
|
||||
this.keyun = res.tgdz.wy.keYun
|
||||
this.nianyun = res.tgdz.wy.nianYun
|
||||
this.fiveTimes = res.tgdz.wy.time
|
||||
// console.log(this.nianyun,'this.nianyun')
|
||||
this.getpanOne()
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}).catch(e => {
|
||||
console.log(e, 'e')
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
musicPlay
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
padding: 10rpx;
|
||||
height: 100vh;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
@@ -1,363 +0,0 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module> -->
|
||||
<z-nav-bar title="五运六气"></z-nav-bar>
|
||||
<view>
|
||||
<!-- {{date}}---{{timestamp}} -->
|
||||
<!-- <uni-section :title="'date 对象用法:' + datetimesingle" type="line"></uni-section> -->
|
||||
<view class="datetimeBox">
|
||||
<uni-datetime-picker type="datetime" v-model="date" @change="changeLog" :clear-icon="false" />
|
||||
</view>
|
||||
<view class="flexbox box1 grayBg">
|
||||
<view class="yunqi">
|
||||
<view class="">
|
||||
<text>五运:{{wy.zhuyun[wy.now]}}(主运) {{wy.keyun[wy.now]}}(客运) {{wy.nianyun}}(年运)</text>
|
||||
</view>
|
||||
<view class="">
|
||||
<text>六气:{{lq.zhuqi[lq.now]}}(主气) {{lq.keqi[lq.now]}}(客气)</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="yinli">
|
||||
<text>{{yinli.year}}</text>
|
||||
<text>{{yinli.month}}</text>
|
||||
<text>{{yinli.day}}</text>
|
||||
<text>{{yinli.hour}}</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="centerBox">《 ↓ 五运图 》</view>
|
||||
<!-- <scroll-view class="scroll-view_H flexbox" scroll-x="true" @scroll="scroll" > -->
|
||||
<view class="flexbox scroll-view_H wuYunBox">
|
||||
<view class="leftone row" id="text">
|
||||
<view class="line line1">开始时间<br /><span>运数</span></view>
|
||||
<!-- <view class="">*节</view> -->
|
||||
<view class="line zhuyun">主运</view>
|
||||
<view class="line keyun">客运</view>
|
||||
</view>
|
||||
<view :class="['row', wy.now == 0 ? 'cur' : '']" id="text0">
|
||||
<view class="line line1">{{wy.fiveTimes[0]}}起<br /><span>初之运</span></view>
|
||||
<view class="line zhuyun">{{wy.zhuyun[0]}}</view>
|
||||
<view class="line keyun">{{wy.keyun[0]}}</view>
|
||||
</view>
|
||||
<view :class="['row', wy.now == 1 ? 'cur' : '']" id="text1">
|
||||
<view class="line line1">{{wy.fiveTimes[1]}}起<br /><span>二之运</span></view>
|
||||
<view class="line zhuyun">{{wy.zhuyun[1]}}</view>
|
||||
<view class="line keyun">{{wy.keyun[1]}}</view>
|
||||
</view>
|
||||
<view :class="['row', wy.now == 2 ? 'cur' : '']" id="text2">
|
||||
<view class="line line1">{{wy.fiveTimes[2]}}起<br /><span>三之运</span></view>
|
||||
<view class="line zhuyun">{{wy.zhuyun[2]}}</view>
|
||||
<view class="line keyun">{{wy.keyun[2]}}</view>
|
||||
</view>
|
||||
<view :class="['row', wy.now == 3 ? 'cur' : '']" id="text3">
|
||||
<view class="line line1">{{wy.fiveTimes[3]}}起<br /><span>四之运</span></view>
|
||||
<view class="line zhuyun">{{wy.zhuyun[3]}}</view>
|
||||
<view class="line keyun">{{wy.keyun[3]}}</view>
|
||||
</view>
|
||||
<view :class="['row',wy.now == 4 ? 'cur' : '']" id="text4">
|
||||
<view class="line line1">{{wy.fiveTimes[4]}}起<br /><span>终之运</span></view>
|
||||
<view class="line zhuyun">{{wy.zhuyun[4]}}</view>
|
||||
<view class="line keyun">{{wy.keyun[4]}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- </scroll-view> -->
|
||||
<view class="centerBox">《 ↓ 六气图,左滑查看全年气数 》</view>
|
||||
<scroll-view class="scroll-view_H flexbox liuqiBox" scroll-x="true" @scroll="scroll" :scroll-left="200">
|
||||
<!-- <view class="flexbox scroll-view_H"> -->
|
||||
<view class="leftone row">
|
||||
<view class="line line1">开始时间<br /><span>气数</span></view>
|
||||
<!-- <view class="">*节</view> -->
|
||||
<view class="line zhuyun">主气</view>
|
||||
<view class="line keyun">客气</view>
|
||||
</view>
|
||||
<view :class="['row', lq.now == 0 ? 'cur' : '']">
|
||||
<view class="line line1">{{lq.time[0]}}起<br /><span>初之气</span></view>
|
||||
<view class="line zhuyun">{{lq.zhuqi[0]}}</view>
|
||||
<view class="line keyun">{{lq.keqi[0]}}</view>
|
||||
</view>
|
||||
<view :class="['row', lq.now == 1 ? 'cur' : '']">
|
||||
<view class="line line1">{{lq.time[1]}}起<br /><span>二之气</span></view>
|
||||
<view class="line zhuyun">{{lq.zhuqi[1]}}</view>
|
||||
<view class="line keyun">{{lq.keqi[1]}}</view>
|
||||
</view>
|
||||
<view :class="['row', 'sizai', 'sizai1', lq.now == 2 ? 'cur' : '']">
|
||||
<view class="line line1">{{lq.time[2]}}起<br /><span>三之气</span></view>
|
||||
<view class="line zhuyun">{{lq.zhuqi[2]}}</view>
|
||||
<view class="line keyun">{{lq.keqi[2]}}</view>
|
||||
</view>
|
||||
<view :class="['row', lq.now == 3 ? 'cur' : '']">
|
||||
<view class="line line1">{{lq.time[3]}}起<br /><span>四之气</span></view>
|
||||
<view class="line zhuyun">{{lq.zhuqi[3]}}</view>
|
||||
<view class="line keyun">{{lq.keqi[3]}}</view>
|
||||
</view>
|
||||
<view :class="['row', lq.now == 4 ? 'cur' : '']">
|
||||
<view class="line line1">{{lq.time[4]}}起<br /><span>五之气</span></view>
|
||||
<view class="line zhuyun">{{lq.zhuqi[4]}}</view>
|
||||
<view class="line keyun">{{lq.keqi[4]}}</view>
|
||||
</view>
|
||||
<view :class="['row', 'sizai', 'sizai2', lq.now == 5 ? 'cur' : '']">
|
||||
<view class="line line1">{{lq.time[5]}}起<br /><span>终之气</span></view>
|
||||
<view class="line zhuyun">{{lq.zhuqi[5]}}</view>
|
||||
<view class="line keyun">{{lq.keqi[5]}}</view>
|
||||
</view>
|
||||
<!-- </view> -->
|
||||
</scroll-view>
|
||||
<!-- <image src="../../static/icon/leftFrag.gif" mode="scaleToFill"></image> -->
|
||||
<music-play :playData="playData"></music-play>
|
||||
<z-navigation></z-navigation>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import musicPlay from '@/components/music.vue'
|
||||
import $http from '@/config/requestConfig.js';
|
||||
|
||||
function formatDateTime(time) {
|
||||
var date = new Date(time);
|
||||
var y = date.getFullYear();
|
||||
var m = date.getMonth() + 1;
|
||||
m = m < 10 ? ('0' + m) : m;
|
||||
var d = date.getDate();
|
||||
d = d < 10 ? ('0' + d) : d;
|
||||
var h = date.getHours();
|
||||
h = h < 10 ? ('0' + h) : h;
|
||||
var minute = date.getMinutes();
|
||||
var second = date.getSeconds();
|
||||
minute = minute < 10 ? ('0' + minute) : minute;
|
||||
second = second < 10 ? ('0' + second) : second;
|
||||
|
||||
return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
|
||||
};
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
playData: {},
|
||||
pageWidth: uni.getSystemInfoSync().windowWidth,
|
||||
pageHeight: uni.getSystemInfoSync().windowHeight - 200,
|
||||
fiveYunNum: 5,
|
||||
// date: new Date().toISOString().slice(0, 10), // 只返回年月日
|
||||
date: Date.now() - 2 * 24 * 3600 * 1000, // 返回年月日带时间
|
||||
dateToString: formatDateTime(new Date()), // 字符串格式的日期
|
||||
timestamp: Date.now() - 2 * 24 * 3600 * 1000, // 时间戳
|
||||
wy: {
|
||||
curTime:0,
|
||||
zhuyun: [],
|
||||
keyun: [],
|
||||
nianyun: '',
|
||||
fiveTimes: []
|
||||
},
|
||||
showCalendar: false,
|
||||
info: {
|
||||
lunar: true,
|
||||
range: true,
|
||||
insert: false,
|
||||
selected: []
|
||||
},
|
||||
lq: {
|
||||
curTime:0,
|
||||
zhuqi: [],
|
||||
keqi: [],
|
||||
time: []
|
||||
},
|
||||
yinli: {
|
||||
year: '',
|
||||
month: '',
|
||||
day: '',
|
||||
hour: ''
|
||||
},
|
||||
wYScrollLeft:0,
|
||||
lQScrollLeft:0,
|
||||
wytext:'',
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let da = new Date().toISOString().slice(0, 10)
|
||||
this.timestamp = new Date(da).getTime()
|
||||
this.getYun(this.dateToString)
|
||||
|
||||
},
|
||||
|
||||
onHide() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
scroll: function(e) {},
|
||||
// 获取五运六气
|
||||
getYun(date) {
|
||||
let that = this
|
||||
$http.request({
|
||||
url: "book/point/WYLQForYear",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"date": date
|
||||
},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 0 && res.wylq) {
|
||||
console.log('获取成功', res.wylq)
|
||||
this.wy.zhuyun = res.wylq.wy.zhuYun
|
||||
this.wy.keyun = res.wylq.wy.keYun
|
||||
this.wy.nianyun = res.wylq.wy.nianYun
|
||||
this.wy.fiveTimes = res.wylq.wy.time
|
||||
this.wy.now = res.wylq.wy.now
|
||||
this.wytext = 'text'+this.wy.now
|
||||
// this.wy.timestampList = res.wylq.wy.time.map( item => {
|
||||
// return new Date(item).getTime()
|
||||
// })
|
||||
// this.wy.curTime = this.wy.timestampList.find(function(elem){
|
||||
// return elem > that.timestamp
|
||||
// });
|
||||
// console.log(this.wy,'this.wy.curTime',this.timestamp)
|
||||
// this.yinli.month = res.wylq.month
|
||||
// this.yinli.day = res.wylq.day
|
||||
// this.yinli.hour = res.wylq.hour
|
||||
// this.yinli.year = res.wylq.year
|
||||
|
||||
this.lq = res.wylq.lq
|
||||
// this.wy.now >= 2 ? this.wYScrollLeft = 1800 : 0
|
||||
// this.lq.now >= 2 ?this.lQScrollLeft = 1800 : 0
|
||||
|
||||
|
||||
// this.lq.timestampList = res.wylq.lq.time.map( item => {
|
||||
// return new Date(item).getTime()
|
||||
// })
|
||||
// console.log(this.wYScrollLeft,this.lQScrollLeft,'this.lq.timestampList')
|
||||
}
|
||||
|
||||
}).catch(e => {
|
||||
console.log(e, 'e')
|
||||
});
|
||||
},
|
||||
changeLog(e) {
|
||||
console.log('change事件:', e);
|
||||
let ss = e.slice(0, 10)
|
||||
this.timestamp = new Date(ss).getTime()
|
||||
this.getYun(e)
|
||||
},
|
||||
},
|
||||
|
||||
components: {
|
||||
musicPlay
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
* {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.centerBox {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.yinli {
|
||||
line-height: 50rpx;
|
||||
|
||||
text {
|
||||
writing-mode: vertical-rl;
|
||||
letter-spacing: 20rpx;
|
||||
color: #c06346;
|
||||
}
|
||||
}
|
||||
|
||||
.box1 {
|
||||
padding: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
justify-content: space-between;
|
||||
|
||||
.yunqi {
|
||||
color: #c06346;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.grayBg {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.scroll-view_H {
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
|
||||
.leftone {
|
||||
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
background-color: #fef9e4;
|
||||
border-right: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
.row.cur{background-color: #8d3d16; color: #fff; position: relative; border-right:0;
|
||||
z-index: 5; box-shadow:0 0 10px #8d3d16;
|
||||
}
|
||||
.line {
|
||||
padding: 20rpx;
|
||||
border-top: 1px solid #ddd;
|
||||
span{font-size: 36rpx; }
|
||||
}
|
||||
.line1{ font-size: 24rpx; height: 200rpx; writing-mode: vertical-rl;;}
|
||||
|
||||
.zhuyun {
|
||||
color: #8d3d16;
|
||||
background-color: #faede7;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.keyun {
|
||||
color: #c06346;
|
||||
background-color: #fceeed;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 10rpx;
|
||||
|
||||
background-color: #fff; padding-bottom: 70rpx;
|
||||
}
|
||||
|
||||
.datetimeBox {
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.liuqiBox{
|
||||
.line.keyun { padding: 60rpx 10rpx}
|
||||
}
|
||||
.wuYunBox{
|
||||
.row{width: 20%; box-sizing: border-box;}
|
||||
}
|
||||
/deep/ .uni-calendar__content-mobile {
|
||||
bottom: 100rpx !important;
|
||||
}
|
||||
|
||||
.sizai{
|
||||
.keyun{
|
||||
position:relative;
|
||||
}
|
||||
.keyun::after{ position: absolute; content: ''; top:24rpx; left:0;font-size: 24rpx; display:block; width: 100%; color: #888; text-align: center;}
|
||||
|
||||
}
|
||||
.sizai1{
|
||||
.keyun::after{content: '(司天)';}
|
||||
}
|
||||
.sizai2{
|
||||
.keyun::after{content: '(在泉)';}
|
||||
}
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
@@ -20,10 +20,10 @@
|
||||
<image src="../../static/icon/five2.png" mode="aspectFit"></image>
|
||||
<text>方药检索</text>
|
||||
</div> -->
|
||||
<div class="item item1" @click="onPageJump('../luck/luck')">
|
||||
<!-- <div class="item item1">
|
||||
<image src="../../static/icon/five4.png" mode="aspectFit"></image>
|
||||
<text>五运六气</text>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="item item1" @click="onPageJump('../peanut/searchFor')">
|
||||
<image src="../../static/icon/five3.png" mode="aspectFit"></image>
|
||||
<text>书名检索</text>
|
||||
|
||||
@@ -15,26 +15,31 @@
|
||||
<!-- <view class="title" :class="{ active: type == 2000 }" @click="type = 2000">验证码登录/注册</view>
|
||||
<view class="title" :class="{ active: type == 1000 }" @click="type = 1000">密码登录</view> -->
|
||||
</view>
|
||||
<view class="input_tit">手机号</view>
|
||||
<view class="flexbox" style=" margin-top: 20rpx;">
|
||||
<view class="input_tit" style="margin-top: 0; margin-right: 20rpx;">手机号</view>
|
||||
<view class="quhao">
|
||||
<uni-data-select class="myselect" placeholder="选择区号" v-model="quCode" :localdata="quCodeList" style="height: 30rpx !important;"
|
||||
@change="quChange"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 带区号 -->
|
||||
<!-- <view class="flexbox " style="margin:36rpx 0; justify-content: space-between;">
|
||||
<view class="quhao">
|
||||
<uni-data-select
|
||||
placeholder="区号" model="quCode"
|
||||
:localdata="quCodeList"
|
||||
@change="quChange"
|
||||
></uni-data-select>
|
||||
<view class="flexbox " style="margin:36rpx 0; justify-content: space-between;">
|
||||
<view class="triangle borderBottom phoneNumberInput" style="width: 150rpx;">
|
||||
<input type="number" v-model="quCode" placeholder="区号" placeholder-class="grey" />
|
||||
|
||||
</view>
|
||||
<view class="triangle borderBottom phoneNumberInput" :clasfs="[type == 1000 ? 'left_triangle': 'right_triangle']">
|
||||
<input type="number" v-model="phone" @input="onInput" placeholder="请输入您的手机号" placeholder-class="grey" />
|
||||
<view class="triangle borderBottom phoneNumberInput"
|
||||
:clasfs="[type == 1000 ? 'left_triangle': 'right_triangle']">
|
||||
<input type="number" v-model="phone" @input="onInput" placeholder="请输入您的手机号"
|
||||
placeholder-class="grey" />
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<!-- 不带区号 -->
|
||||
<view class="triangle borderBottom phoneNumberInput input_box"
|
||||
<!-- <view class="triangle borderBottom phoneNumberInput input_box"
|
||||
:clasfs="[type == 1000 ? 'left_triangle': 'right_triangle']">
|
||||
<input type="number" v-model="phone" @input="onInput" placeholder="请输入您的手机号" placeholder-class="grey" />
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="input_tit" v-if="type == 1000">密码</view>
|
||||
<view class="input_box" v-if="type == 1000">
|
||||
@@ -190,16 +195,8 @@
|
||||
Content: ''
|
||||
},
|
||||
quShow: false,
|
||||
quCodeList: [{
|
||||
value: '1',
|
||||
text: '江'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
text: '湖'
|
||||
}
|
||||
],
|
||||
quCode: null,
|
||||
quCodeList: [], // 国家区域码
|
||||
quCode: 86,
|
||||
|
||||
};
|
||||
},
|
||||
@@ -216,11 +213,43 @@
|
||||
// #endif
|
||||
},
|
||||
//页面显示
|
||||
onShow() {},
|
||||
onShow() {
|
||||
this.getCountyCode()
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
...mapMutations(['setUserInfo']),
|
||||
...mapMutations(['setHealthMes']),
|
||||
// 获取国家区域编码
|
||||
getCountyCode() {
|
||||
$http.request({
|
||||
url: "book/baseArea/getAllBaseArea",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {},
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
// console.log(res,'区域码')
|
||||
if (res.code == 0 && res.baseAreas.length > 0) {
|
||||
// this.quCodeList = res.baseAreas
|
||||
this.quCodeList = res.baseAreas.map(item => {
|
||||
let obj = {
|
||||
'text': item.title,
|
||||
'value': item.code,
|
||||
}
|
||||
return obj
|
||||
})
|
||||
// console.log('改变格式后',this.quCodeList)
|
||||
} else {
|
||||
this.quCodeList = []
|
||||
// this.totalPage = 0
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e, 'e')
|
||||
});
|
||||
},
|
||||
quChange(e) {
|
||||
console.log(e, 'e')
|
||||
},
|
||||
@@ -294,12 +323,15 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!this.$base.phoneRegular.test(this.phone)) {
|
||||
uni.showToast({
|
||||
title: '手机格式不正确',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
if (this.quCode == null || this.quCode == 86) { // 如果没选择国家code,默认是中国大陆
|
||||
if (!this.$base.phoneRegular.test(this.phone)) {
|
||||
uni.showToast({
|
||||
title: '手机格式不正确',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
console.log(this.quCode, '选择的区段')
|
||||
}
|
||||
if (!this.agree) {
|
||||
uni.showToast({
|
||||
@@ -312,6 +344,7 @@
|
||||
this.$http
|
||||
.get('book/user/sms/sendcode', {
|
||||
phone: this.phone,
|
||||
areaCode: this.quCode,
|
||||
type: 2000
|
||||
})
|
||||
.then(res => {
|
||||
@@ -339,12 +372,14 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!this.$base.phoneRegular.test(this.phone)) {
|
||||
uni.showToast({
|
||||
title: '手机格式不正确',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
if (this.quCode == null || this.quCode == 86) {
|
||||
if (!this.$base.phoneRegular.test(this.phone)) {
|
||||
uni.showToast({
|
||||
title: '手机格式不正确',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
let httpData = {};
|
||||
if (this.type == 2000) {
|
||||
@@ -635,10 +670,10 @@
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
|
||||
.myselect{height: 50rpx !important;}
|
||||
.phoneNumberInput {
|
||||
width: calc(100% - 130rpx);
|
||||
width: 100%;
|
||||
width: calc(100% - 160rpx);
|
||||
// width: 100%;
|
||||
height: 67rpx;
|
||||
|
||||
input {
|
||||
@@ -656,7 +691,8 @@
|
||||
}
|
||||
|
||||
.quhao {
|
||||
width: 120rpx;
|
||||
height: 50rpx;
|
||||
width: 180rpx;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
|
||||
Reference in New Issue
Block a user