套餐页面调整、婚检验证码功能、bug

main
yanzai 11 months ago
parent f3048eb78e
commit 09ce5ec7cd

@ -83,7 +83,8 @@ class ApiMapController extends Controller
'UserHunjian' => $base_url . '/api/H5/User/hunjian', // 婚检人员信息
'hunjianBySFZ' => $base_url . '/api/H5/hunjianBySFZ', // 婚检人员信息
'CheckedSignIn' => $base_url . '/api/H5/CheckedSignIn', // 检后签到
'SendMsgCode' => $base_url . '/api/H5/SendMsgCode', // 发送验证码
'CheckMsgCode' => $base_url . '/api/H5/CheckMsgCode', // 验证验证码
];
}

@ -71,7 +71,19 @@ class AspNetZhuanController extends Controller
$content=$time." 健康体检。请提前10分钟凭身份证到".$yy_name.$keshi."签到。建议体检前3天清淡饮食、禁烟酒。体检当天需禁食禁水空腹6小时以上";
$url=self::$BaseUrl."/tuisong.aspx?yyid=".$yyid."&type=8&mobile=".$tel."&msg1=".urlencode($name)."&msg2=".urlencode($content);
self::get($url,"短信发送");
}
//发送验证码
public static function SendYanZhengMaCode($r_yyid,$tel,$code){
if($r_yyid==1){
$yyid=6;
$yy_name="现代妇儿秀英院区";
}
if($r_yyid==4){
$yyid=2;
$yy_name="现代妇儿府城院区";
}
$url=self::$BaseUrl."/tuisong.aspx?yyid=".$yyid."&type=13&mobile=".$tel."&msg1=".urlencode($code);
self::get($url,"短信发送");
}
//获取优惠卷类型

@ -212,7 +212,9 @@ class UserController extends Controller
if(!!$hunjianLog){
$person_info=json_decode($hunjianLog->content,true);
unset($person_info['详细地址省市区']);
unset($person_info['详细地址']);
unset($person_info['邮政编码']);
}
return \Yz::Return(true, '获取成功', [

@ -0,0 +1,54 @@
<?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class SendMsgCodeController extends Controller
{
//创建验证码
public function SendMsgCode(Request $request)
{
$mobile = request('mobile');
//查找相同手机号1分钟内是否发送过
$code = DB::table('send_code')->where('mobile', $mobile)->where('created_at', '>=', date('Y-m-d H:i:s', time() - 60))->first();
if ($code) {
return \Yz::echoError1("操作太频繁,请稍后再试");
}
$code = rand(100000, 999999);
//获取当前时间5分钟后的日期时间
$end_time = date('Y-m-d H:i:s', time() + 300);
$i=DB::table('send_code')->insert([
'mobile' => $mobile,
'code' => $code,
'created_at' => date('Y-m-d H:i:s'),
'end_time' => $end_time
]);
if ($i) {
$aspnet=new AspNetZhuanController();
$aspnet::SendYanZhengMaCode(1,$mobile,$code);
return \Yz::Return(true,"发送成功",[]);
} else {
return \Yz::echoError1("发送失败");
}
}
//验证验证码
public function CheckMsgCode(){
$mobile = request('mobile');
$code = request('code');
$u = DB::table('send_code')
->where('mobile', $mobile)
->where('code', $code)
->where('end_time', '>=', date('Y-m-d H:i:s'))
->where(['status' => 1])
->update(['status' => 2]);
if($u){
return \Yz::Return(true,"验证成功",['data'=>$code]);
}else{
return \Yz::echoError1("验证码无效");
}
}
}

@ -57,43 +57,9 @@ class TestController extends Controller
//--------------
$aspnet=new AspNetZhuanController();
//医生排班
$res = $aspnet->GetDoctorDateList([
"yyid" => 6,
"data" => ["2024-12-24",
"2024-12-25",
"2024-12-26",
"2024-12-27",
"2024-12-28",
"2024-12-29",
"2024-12-30",
"2024-12-31",
"2025-01-01",
"2025-01-02",
"2025-01-03",
"2025-01-04",
"2025-01-05",
"2025-01-06",
"2025-01-07",
"2025-01-08",
"2025-01-09",
"2025-01-10",
"2025-01-11",
"2025-01-12",
"2025-01-13",
"2025-01-14",
"2025-01-15",
"2025-01-16",
"2025-01-17",
"2025-01-18",
"2025-01-19",
"2025-01-20",
"2025-01-21",
"2025-01-22",
"2025-01-23"],
"action" => "1"
]);
dd($res);
// $res=$aspnet::SendYanZhengMaCode(1,"19933509886");
// dd($res);
//优惠券-----------------
// $data=[
// 'action'=>4,

@ -29,6 +29,8 @@ Route::get('/wxLogin/{env}', function ($env) {
Route::get('/wxGetCode', 'App\Http\Controllers\API\mH5\LoginController@wxGetCode');
Route::get('/test', 'App\Http\Controllers\TestController@DBtest');
Route::any('/payNotify', 'App\Http\Controllers\API\H5\PayController@Notify')->middleware('log');//支付回调
Route::group(['middleware' => ['log'],'prefix' => 'api/H5'], function () {
Route::post('/CheckUpTypeGetList', 'App\Http\Controllers\API\H5\CheckUpTypeController@GetList');//获取体检类型分类
@ -72,6 +74,8 @@ Route::group(['middleware' => ['log'],'prefix' => 'api/H5'], function () {
Route::post('/HunQianQuestionSubmit', 'App\Http\Controllers\API\H5\QuestionController@HunQianQuestionSubmit');//婚前问卷提交
Route::post('/hunjianBySFZ', 'App\Http\Controllers\API\H5\UserController@hunjianBySFZ');//根据身份证查询建档信息
Route::post('/CheckedSignIn', 'App\Http\Controllers\API\H5\OrderController@CheckedSignIn');//检后签到
Route::post('/SendMsgCode', 'App\Http\Controllers\API\SendMsgCodeController@SendMsgCode');//发送验证码
Route::post('/CheckMsgCode', 'App\Http\Controllers\API\SendMsgCodeController@CheckMsgCode');//验证验证码

@ -24,7 +24,7 @@
"source": "https://github.com/walkor/workerman"
},
"require": {
"php": ">=5.3"
"php": ">=5.5"
},
"suggest": {
"ext-event": "For better performance. "

@ -0,0 +1,131 @@
<template>
<view>
<view>
<view class="chart_wrapper" id="line">折线图</view>
<view class="huakuai_k">
<view class="huakuai_value">
<view>{{rang0}}</view>
<view>{{rang1}}</view>
</view>
<view>
<slider @changing="huakuai0_change" activeColor="#5ab6b8" block-color="#5ab6b8" block-size="18" backgroundColor="#5ab6b8" class="huakuai0" max="99999" :value="rang0" >
</slider>
</view>
<view class="huakuai1"><slider @changing="huakuai1_change" block-size="18" block-color="#5ab6b8" activeColor="#5ab6b8" backgroundColor="#5ab6b8" max="99999" :value="rang1" /></view>
</view>
</view>
</view>
</template>
<script setup>
import {
ref,
onMounted
} from 'vue'
import * as echarts from 'echarts';
let rang0=ref(0);
let rang1=ref(99999);
onMounted(() => {
drawChart()
})
const huakuai0_change=(e)=>{
rang0.value=e.detail.value
if(rang0.value>rang1.value){
let temp=0
temp=rang0.value
rang0.value=rang1.value
rang1.value=temp
}
}
const huakuai1_change=(e)=>{
rang1.value=e.detail.value
if(rang0.value>rang1.value){
let temp=0
temp=rang0.value
rang0.value=rang1.value
rang1.value=temp
}
}
const drawChart = () => {
let chartDom = document.getElementById('line');
let myChart = echarts.init(chartDom);
let option = {
xAxis: {
type: 'category',
boundaryGap: false,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisLine: { show: false }, // X线
axisTick: { show: false }, // X
axisLabel: { show: false } // X
},
yAxis: {
type: 'value',
axisLine: { show: false }, // Y线
axisTick: { show: false }, // Y
axisLabel: { show: false } ,// Y
splitLine: { show: false } // Y线
},
series: [
{
data: [0,8, 12,7 ,33, 5,5],
type: 'line',
lineStyle: {
width: 0 ,// 线线0
},
smooth: true, // 线
symbol: 'none', //
areaStyle: {
color: {
colorStops: [{
offset: 0, color: '#e5f5f6' //
}, {
offset: 1, color: '#e5f5f6' //
}]
}
}
}
]
};
option && myChart.setOption(option);
}
</script>
<style scoped>
.chart_wrapper{
height: 200rpx;
width: 100% !important;
}
.huakuai_k{
position: relative;
width: 100%;
top:-120rpx;
}
.huakuai0{
position: relative;
}
.huakuai1{
position: relative;
width: 100%;
top:-54rpx;
}
.huakuai_value{
position: absolute;
display: flex;
width: calc(100% - 40rpx);
justify-content: space-between;
top: -40rpx;
padding: 0rpx 20rpx 0rpx 20rpx;
font-size:26rpx;
color:#5ab6b8;
}
</style>
<style>
</style>

@ -14,6 +14,14 @@
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/main/combo/combo_new",
"style": {
"navigationBarTitleText": "套餐",
"navigationBarBackgroundColor": "#239EA3",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/main/combo/tcdb",
"style": {
@ -276,6 +284,14 @@
"style": {
"navigationBarTitleText": "预约医生"
}
},
{
"path" : "pages/test/test",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
}
],

File diff suppressed because it is too large Load Diff

@ -203,6 +203,11 @@
url: '/pages/other/entry/index?path=/pages/physical-examination/location/index'+p
})
};
const gotoo=()=>{
uni.navigateTo({
url: "/pages/test/test"
})
}
onShow(() => {
@ -231,6 +236,7 @@
getUserInfo()
$store.setCheckupTypeId({});
$store.setDuoXuanYi({});
$store.setPeiOuUser({});
})
</script>
<template>
@ -283,7 +289,7 @@
</view>
</view>
</view>
<view class="botm_blank_wrapper" style="font-size: 18rpx;color: #ccc;">12250922</view>
<view class="botm_blank_wrapper" style="font-size: 18rpx;color: #ccc;">01031940</view>
</view>
</view>
</template>

@ -309,7 +309,7 @@
}
</script>
<template>
<view>
<view style="background-color:#d8eef3 ;">
<view v-if="!!$store.config">
<view :ref="configRef"></view>
</view>
@ -317,8 +317,13 @@
<view>
<view v-if="question_info.type === '检前评估'" class="banner_wrapper">
<view @click="getQuestionLogPush()" class="push_log_wrapper">带入上次答题记录</view>
<image src="@/static/assets/question/banner.png"></image>
<image src="@/static/assets/question/banner3.png"></image>
</view>
<!-- <view v-if="question_info.type === '检前评估'" class="chuchu">
<uni-icons type="search" color="#fff" size="18"></uni-icons>
<view style="margin-left: 10rpx;">问卷出处:健康体检基本项目专家共识 </view>
</view> -->
<view v-else>
<view class="q2_banner_wrapper">
<view class="q2_banner_text_wrapper">健康问卷</view>
@ -623,6 +628,7 @@
width: 750rpx;
height: 226rpx;
overflow: hidden;
}
.q2_banner_wrapper image {
@ -654,6 +660,9 @@
height: 434rpx;
margin: 0 auto;
position: relative;
padding-top: 20rpx;
padding-left: 20rpx;
padding-right: 20rpx;
}
.push_log_wrapper {
@ -661,22 +670,37 @@
z-index: 9;
width: 250rpx;
height: 50rpx;
background: #38C6BC;
right: 30rpx;
/* background: #DAD3C9; */
/* color: #7E6F5C; */
color: #fff;
background: #259ea3;
right: 36rpx;
top: -15rpx;
border-radius: 6rpx;
margin: 40rpx auto 0;
font-weight: 500;
font-size: 22rpx;
color: #FFFFFF;
line-height: 50rpx;
text-align: center;
}
.banner_wrapper image {
width: 724rpx;
width: 714rpx;
height: 434rpx;
display: block;
object-fit: contain;
}
.chuchu{
background-color: #259ea3;
border-radius: 10rpx;
margin: 20rpx;
padding: 10rpx 30rpx;
color: #fff;
font-size: 24rpx;
display: flex;
justify-items: center;
align-items: center; /* 垂直居中 */
height: 30rpx; /* 设置父容器的高度 */
}
</style>

@ -307,6 +307,7 @@ const comfrimyy = async () => {
coupon_id:yytjInfo.value?.couponId || null,
wj: buyInfo.value.wj,
erxian_info:erxianInfo.value,
peiou_info:$store.getPeiOuUser()//
};
console.log(obj);
const response = await $api("OrderCreate", obj);

@ -93,6 +93,7 @@
mountedAction()
}
}
let msgCode=ref('');
const number_type_array = [{
value: 1,
label: '身份证'
@ -191,7 +192,7 @@
'职业': "",
'出生地': "",
'配偶姓名': "",
'配偶证件类型': 0,
'配偶证件类型':0,
'配偶证件号': "",
'血缘关系': "无",
// '': "",
@ -217,10 +218,10 @@
}
const editDoneClick = async() => {
let post_data = JSON.parse(JSON.stringify(input_data.value))
post_data['证件类型'] = number_type_array[input_data.value['证件类型']].value
post_data['配偶证件类型'] = number_type_array[input_data.value['配偶证件类型']].value
post_data['证件类型'] = input_data.value['证件类型']
post_data['配偶证件类型'] = input_data.value['配偶证件类型']
for (let i in post_data) {
if (!post_data[i]) {
if (!post_data[i] && post_data[i]!==0) {
return uni.$lu.toast(`请填写${i}`)
}
}
@ -230,10 +231,21 @@
sfz: input_data.value['配偶证件号'],
})
$response(response, () => {
$response(response, async () => {
if(response.status){
if(response.data.info.code ==200){
HunQianQuestionSubmit(post_data)
let peiou_info=$store.getPeiOuUser()
peiou_info={
name:input_data.value['配偶姓名'],
sfz:input_data.value['配偶证件号']
}
$store.setPeiOuUser(peiou_info);
let checkcode=false;
checkcode=await CheckMsgCode()
if(checkcode===true){
HunQianQuestionSubmit(post_data)
}
}else{
uni.$lu.toast("配偶未建档,请先建档")
}
@ -243,6 +255,43 @@
})
}
const GetMsgCode=async ()=>{
if(input_data.value['手机号码']==''){
uni.$lu.toast("验证码不能为空")
return false
}
uni.showLoading({
title: "加载中",
});
const response = await $api('SendMsgCode', {
mobile:input_data.value['手机号码']
})
uni.hideLoading();
$response(response, () => {
if(response.status){
uni.$lu.toast("发送成功")
}
})
}
const CheckMsgCode= async ()=>{
if(msgCode.value==''){
uni.$lu.toast("验证码不能为空")
return false
}
uni.showLoading({
title: "加载中",
});
const response = await $api('CheckMsgCode', {
mobile:input_data.value['手机号码'],
code:msgCode.value
})
uni.hideLoading();
let status=false;
$response(response, () => {
status=response.status
})
return status
}
const HunQianQuestionSubmit = async (post_data) => {
const response = await $api('HunQianQuestionSubmit', {
@ -292,13 +341,13 @@
<template v-else-if="k === ''">
<picker class="select_picker_wrapper" @change="(e)=>{bindWenHuaPickerChange(e, k)}" :value="WenHuaIndex"
:range="wenhua_array" >
<view>{{WenHuaIndex==""?"请选择文化程度":wenhua_array[WenHuaIndex]}}</view>
<view :class="WenHuaIndex==''?'huizi':''">{{WenHuaIndex==""?"请选择文化程度":wenhua_array[WenHuaIndex]}}</view>
</picker>
</template>
<template v-else-if="k === ''">
<picker class="select_picker_wrapper" @change="(e)=>{bindZhiYePickerChange(e, k)}" :value="ZhiYeIndex"
:range="zhiye_array" >
<view>{{ZhiYeIndex==""?"请选择职业":zhiye_array[ZhiYeIndex]}}</view>
<view :class="ZhiYeIndex==''?'huizi':''">{{ZhiYeIndex==""?"请选择职业":zhiye_array[ZhiYeIndex]}}</view>
</picker>
</template>
<template v-else-if="k === ''">
@ -323,11 +372,22 @@
</radio-group>
</view>
</template>
<template v-else-if="k === ''">
<view style="display: flex;align-items: center;">
<input style="font-size: 26rpx;" v-model="input_data[k]" :placeholder="`请输入${k}`" />
<view style="border: 1px solid #ccc;padding: 8rpx;border-radius: 10rpx;" @click="GetMsgCode()"></view>
</view>
</template>
<template v-else>
<input style="font-size: 26rpx;" v-model="input_data[k]" :placeholder="`请输入${k}`" />
</template>
</view>
</view>
<view style="margin-top: 20rpx;display: flex;">
<view class="form_title_wrapper">验证码</view>
<input style="font-size: 26rpx;margin-left: 40rpx;" v-model="msgCode" placeholder="请输入验证码" />
</view>
</view>
<view @click="editDoneClick()" class="button_wrapper">提交</view>
<view style="height: 100rpx;"></view>
@ -400,6 +460,7 @@
.form_title_wrapper {
width: 140rpx;
font-size: 26rpx;
}
.form_item_wrapper {
@ -427,4 +488,7 @@
width: calc(100% - 50rpx);
margin: 0 auto;
}
.huizi{
color: #888888;
}
</style>

@ -0,0 +1,41 @@
<template>
<view>
<uni-file-picker
v-model="imageValue"
fileMediatype="image"
mode="grid"
ref="files" :auto-upload="false"
@select="select"
@progress="progress"
/>
<button @click="upload"></button>
<view v-if="fileInfo">
{{fileInfo}}
</view>
</view>
</template>
<script setup>
import {
ref
} from 'vue'
let files=ref(null);
let imageValue=ref(null);
const upload=()=>{
}
const progress=(e)=>{
console.log(e)
}
let fileInfo=ref(null);
const select=(e)=>{
console.log('-------',e)
fileInfo.value=e
fileInfo.value= JSON.stringify(fileInfo.value)
}
</script>
<style>
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

@ -77,6 +77,15 @@ export const useStore = defineStore('counter', {
getUser() {
return JSON.parse(uni.getStorageSync('USER') || '{}') || this.user;
},
//配偶信息
setPeiOuUser(user) {
this.user = user;
uni.setStorageSync('PEIOU', JSON.stringify(user));
},
//获取配偶信息
getPeiOuUser() {
return JSON.parse(uni.getStorageSync('PEIOU') || '{}') || this.user;
},
setGroupInfo(info) {
this.groupInfo = info;
uni.setStorageSync('GROUP_INFO', JSON.stringify(info));

Loading…
Cancel
Save