作者 sgj
1 个管道 的构建 通过 耗费 2 秒

Merge remote-tracking branch 'origin/master'

... ... @@ -139,50 +139,11 @@ class GroupController extends AdminBaseController
}
$this->error('添加失败');
}
/**
*群内人员信息
*/
public function groupPeople(){
$Group=$this->GroupModel;
$group=$Group->getGroup(input('id'));
$map['g.delete_time']=null;
$map['g.group_id']=input('id');
$list=db('group_user')
->alias('g')
->field('g.id as gid,u.*')
->where($map)
->join('user u','g.user_id=u.id')
->paginate('20');
$page = $list->render();
$this->assign('group', $group);
$this->assign('list', $list);
$this->assign('page', $page);
return $this->fetch();
}
/**
* 拉黑用户
*/
public function banUser(){
$map['id']=input('id');
$result=db('group_user')->where($map)->delete();
if ($result==1){
$this->success('删除用户!');
}else{
$this->error('删除失败!');
}
}
public function groupPeopleAdd(){
$user_id=explode(',',input('user_id'));
foreach ($user_id as $k=>$v){
$insert[$k]['user_id']=$v;
$insert[$k]['group_id']=input('group_id');
$insert[$k]['addtime']=time();
}
db('group_user')->insertAll($insert);
$this->success();
}
}
\ No newline at end of file
... ...
... ... @@ -53,45 +53,6 @@ class CommonController extends AdminBaseController
return $this->fetch();
}
public function selectUsersMore()
{
$param = $this->request->param();
$ids = $this->request->param('ids');
$selectedIds = explode(',',$ids);
if (!is_array($selectedIds)) {
$selectedIds = [$selectedIds];
}
$where['user_type'] = ['in','1,2,3'];
$request = input('request.');
if (!empty($request['uid'])) {
$where['id'] = intval($request['uid']);
}
$keywordComplex = [];
if (!empty($request['keyword'])) {
$keyword = $request['keyword'];
$keywordComplex['user_login|user_nickname|mobile'] = ['like', "%$keyword%"];
}
$usersQuery = Db::name('user');
$list = $usersQuery->field('id,user_nickname,user_login,avatar,mobile')
->whereOr($keywordComplex)
->where($where)
->order("create_time DESC")
->paginate(50);
$list->appends($param);
$this->assign('selectedIds', $selectedIds);
$this->assign('uid', isset($param['uid']) ? $param['uid'] : '');
$this->assign('keyword', isset($param['keyword']) ? $param['keyword'] : '');
$this->assign('ids', isset($param['ids']) ? $param['ids'] : '');
$this->assign('list', $list->items());
$this->assign('page', $list->render());
return $this->fetch();
}
public function selectGroup(){
$param = $this->request->param();
$ids = $this->request->param('ids');
... ...
... ... @@ -9,21 +9,55 @@
namespace app\user\controller;
use app\user\model\InquiryModel;
use app\user\model\TransferModel;
use app\user\model\UserModel;
use cmf\controller\WeChatBaseController;
use think\Db;
class ExpertController extends WeChatBaseController
{
public function inquiryAnswer(){
public function inquiryAnswer(){
$where=[];
$userId=cmf_get_current_user_id();
$model=new InquiryModel();
//todo 释放专家ID
//$where['expert_id']=$userId;
return $this->fetch();
}
$count0=$model->where($where)->where('status',0)->count('id');
$count1=$model->where($where)->where(['status'=>['neq',0]])->count('id');
$this->assign('count0',$count0);
$this->assign('count1',$count1);
public function transferAnswer(){
$list0=$model->where($where)->where('status',0)->select()->toArray();
$list1=$model->where($where)->where(['status'=>['neq',0]])->select()->toArray();
return $this->fetch();
}
$this->assign('list0',$list0);
$this->assign('list1',$list1);
return $this->fetch();
}
public function transferAnswer(){
$where=[];
$userId=cmf_get_current_user_id();
$model=new TransferModel();
//todo 释放专家ID
//$where['expert_id']=$userId;
$count0=$model->where($where)->where('status',0)->count('id');
$count1=$model->where($where)->where(['status'=>['neq',0]])->count('id');
$this->assign('count0',$count0);
$this->assign('count1',$count1);
$list0=$model->where($where)->where('status',0)->select()->toArray();
$list1=$model->where($where)->where(['status'=>['neq',0]])->select()->toArray();
$this->assign('list0',$list0);
$this->assign('list1',$list1);
return $this->fetch();
}
/**
* 获取进修提交列表
... ... @@ -32,37 +66,50 @@ class ExpertController extends WeChatBaseController
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function engageAnswer(){
$user_id=cmf_get_current_user_id();
$map['user_id']=$user_id;
$map['state']='0';
/*未处理信息*/
$undo=db('engage')->where($map)->select()->toArray();
$map['state']=['in','1,2'];
$redo=db('engage')->where($map)->select()->toArray();
$this->assign('undo',$undo);
$this->assign('redo',$redo);
return $this->fetch();
}
public function engageAnswer(){
$user_id=cmf_get_current_user_id();
$map['user_id']=$user_id;
$map['state']='0';
/*未处理信息*/
$undo=db('engage')->where($map)->select()->toArray();
$map['state']=['in','1,2'];
$redo=db('engage')->where($map)->select()->toArray();
$this->assign('undo',$undo);
$this->assign('redo',$redo);
return $this->fetch();
}
/**
* 提交信息细节
*/
public function engageDetail(){
$id=input('id');
$info=db('engage')->where('id',$id)->find();
if (empty($info)){
$this->error('信息错误');
}
$User=new UserModel();
$user=$User->getUser($info['user_id'])->toArray();
$this->assign('user',$user['0']);
$this->assign('info',$info);
return $this->fetch();
public function engageDetail(){
$id=input('id');
$info=db('engage')->where('id',$id)->find();
if (empty($info)){
$this->error('信息错误');
}
$User=new UserModel();
$user=$User->getUser($info['user_id'])->toArray();
$this->assign('user',$user['0']);
$this->assign('info',$info);
return $this->fetch();
}
public function inquiryDetail(){
return $this->fetch();
}
public function inquiryDetail(){
$id=$this->request->param('id',0,'intval');
$model=new InquiryModel();
$info=$model->getInfo($id);
$this->assign('info',$info);
return $this->fetch();
}
public function transferDetail(){
$id=$this->request->param('id',0,'intval');
$model=new TransferModel();
$info=$model->getInfo($id);
$this->assign('info',$info);
return $this->fetch();
}
}
\ No newline at end of file
... ...
... ... @@ -44,4 +44,15 @@ class InquiryModel extends Model
}
public function getInfo($id){
$info=$this->alias('a')
->join('__USER__ b','a.user_id=b.id','LEFT')
->join('__HOSPITAL__ h','h.id=b.hospital',"LEFT")
->join('__OFFICE__ o','b.office=o.id',"LEFT")
->join('__JOB__ j','b.job=j.id',"LEFT")
->field('a.*,b.user_nickname,b.avatar,b.mobile,h.name as hospital,o.name as office,j.name as job')
->where(['a.id'=>$id])->find();
return $info;
}
}
... ...
... ... @@ -46,4 +46,15 @@ class TransferModel extends Model
}
public function getInfo($id){
$info=$this->alias('a')
->join('__USER__ b','a.user_id=b.id','LEFT')
->join('__HOSPITAL__ h','h.id=b.hospital',"LEFT")
->join('__OFFICE__ o','b.office=o.id',"LEFT")
->join('__JOB__ j','b.job=j.id',"LEFT")
->field('a.*,b.user_nickname,b.mobile,b.avatar,h.name as hospital,o.name as office,j.name as job')
->where(['a.id'=>$id])->find();
return $info;
}
}
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a>{$group.name}</a></li>
</ul>
<form class="well form-inline margin-top-20 js-ajax-form" method="post" action="{:url('groupPeopleAdd',['group_id'=>$group.id])}">
添加用户
<input class="form-control" type="text" required="" placeholder="请选择用户" onclick="doSelectUsers();" id="js-users-name-input" readonly="" aria-required="true">
<input class="form-control" type="hidden" value="" name="user_id" id="js-users-id-input"/>
<input type="submit" class="btn btn-primary js-ajax-submit" value="确定"/>
<a class="btn btn-danger" href="{:url('user/adminIndex/index')}">清空</a>
</form>
<form method="post" class="js-ajax-form">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>ID</th>
<th>{:lang('USERNAME')}</th>
<th>姓名</th>
<th>头像</th>
<th>手机</th>
<th>注册时间</th>
<th>{:lang('LAST_LOGIN_TIME')}</th>
<th>{:lang('LAST_LOGIN_IP')}</th>
<th>{:lang('STATUS')}</th>
<th>{:lang('ACTIONS')}</th>
</tr>
</thead>
<tbody>
<php>
$user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
</php>
<foreach name="list" item="vo">
<tr>
<td>{$vo.gid}</td>
<td>{$vo['user_login']?$vo['user_login']:($vo['mobile']?$vo['mobile']:lang('THIRD_PARTY_USER'))}
</td>
<td>{$vo['user_nickname']?$vo['user_nickname']:lang('NOT_FILLED')}</td>
<td><img width="25" height="25" src="{:url('user/public/avatar',array('id'=>$vo['id']))}"/></td>
<td>{$vo.mobile}</td>
<td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
<td>{:date('Y-m-d H:i:s',$vo['last_login_time'])}</td>
<td>{$vo.last_login_ip}</td>
<td>{$user_statuses[$vo['user_status']]}</td>
<td>
<neq name="vo.id" value="1">
<empty name="vo.user_status">
<a href="{:url('adminIndex/cancelban',array('id'=>$vo['id']))}"
class="js-ajax-dialog-btn"
data-msg="{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:lang('ACTIVATE_USER')}</a>
<else/>
<a href="{:url('banUser',array('id'=>$vo['gid']))}" class="js-ajax-dialog-btn"
data-msg="{:lang('BLOCK_USER_CONFIRM_MESSAGE')}">{:lang('BLOCK_USER')}</a>
</empty>
<else/>
<a style="color: #ccc;">{:lang('BLOCK_USER')}</a>
</neq>
</td>
</tr>
</foreach>
</tbody>
</table>
<div class="pagination">{$page}</div>
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script type="application/javascript">
function doSelectUsers() {
var selectedUsersId = $('#js-users-id-input').val();
openIframeLayer("{:url('portal/Common/selectUsersMore')}?ids=" + selectedUsersId, '请选择分类', {
area: ['1200px', '800px'],
btn: ['确定', '取消'],
yes: function (index, layero) {
//do something
var iframeWin = window[layero.find('iframe')[0]['name']];
var selectedUsers = iframeWin.confirm();
if (selectedUsers.selectedUsersId.length == 0) {
layer.msg('请选择分类');
return;
}
$('#js-users-id-input').val(selectedUsers.selectedUsersId.join(','));
$('#js-users-name-input').val(selectedUsers.selectedUsersName.join(' '));
//console.log(layer.getFrameIndex(index));
layer.close(index); //如果设定了yes回调,需进行手工关闭
}
});
}
</script>
</body>
</html>
\ No newline at end of file
... ... @@ -27,7 +27,6 @@
<td>
<a href="{:url('GroupEdit',['id'=>$vo.id])}">编辑圈子</a>
<a href="{:url('GroupArticle',['id'=>$vo.id])}">圈子文章管理</a>
<a href="{:url('GroupPeople',['id'=>$vo.id])}">圈子人员管理</a>
</td>
<td><a class="js-ajax-delete" href="{:url('GroupDel',['id'=>$vo.id])}">删除</a></td>
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap" style="min-width: inherit">
<form class="well form-inline margin-top-20" method="post" action="">
用户ID:
<input class="form-control" type="text" name="uid" style="width: 200px;" value="{$uid}"
placeholder="请输入用户ID">
关键字:
<input class="form-control" type="text" name="keyword" style="width: 200px;" value="{$keyword}"
placeholder="昵称/电话">
<input type="submit" class="btn btn-primary" value="搜索"/>
<a class="btn btn-danger" href="">清空</a>
</form>
<form method="post" class="js-ajax-form" action="">
<table class="table table-hover table-bordered table-list">
<thead>
<tr>
<th width="16">
<label>
<input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
</label>
</th>
<th width="50">ID</th>
<th>姓名</th>
<th>头像</th>
<th>电话</th>
</tr>
</thead>
<tbody id="tb">
<foreach name="list" item="vo">
<tr id="check-tr">
<td >
<input type="checkbox" id="in{$vo.id}" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
value="{$vo.id}" data-name="{$vo.user_login}" <if condition="in_array($vo['id'],$selectedIds)"> checked</if> >
</td>
<td>{$vo.id}</td>
<td>{$vo.user_login|default=$vo.user_nickname}</td>
<td><img width="50px" src="{$vo.avatar}"></td>
<td>{$vo.mobile}</td>
</tr>
</foreach>
</tbody>
</table>
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
// $('.js-check').click(function(e) {
// var sel_id='in'+e.currentTarget.defaultValue;
//
// $( ".js-check" ).each( function(res) {
// console.log(res)
// $(".js-check").eq(res).prop("checked",false)
// $('#'+sel_id).prop("checked",true)
// } );
// }
//
// )
$('.data-item-tr').click(function (e) {
console.log(e);
var $this = $(this);
if ($(e.target).is('input')) {
return;
}
var $input = $this.find('input');
if ($input.is(':checked')) {
$input.prop('checked', false);
} else {
$input.prop('checked', true);
}
});
function confirm() {
var selectedUsersId = [];
var selectedUsersName = [];
var selectedUsers = [];
$('.js-check:checked').each(function () {
var $this = $(this);
selectedUsersId.push($this.val());
selectedUsersName.push($this.data('name'));
selectedUsers.push({
id: $this.val(),
name: $this.data('name')
});
});
return {
selectedUsers: selectedUsers,
selectedUsersId: selectedUsersId,
selectedUsersName: selectedUsersName
};
}
</script>
</body>
</html>
\ No newline at end of file
... ... @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<title>转诊模块</title>
<title>问诊待答</title>
<script src="__TMPL__/public/assets/js/fontsize.js"></script>
<link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
... ... @@ -15,73 +15,88 @@
<div class="tab_box">
<div class="tab_item tab_on">
<text>待处理</text>
<text class="point">1</text>
<text class="point">{$count0|default=0}</text>
</div>
<div class="tab_item">
<text>已处理</text>
<text class="point">1</text>
<text class="point">{$count1|default=0}</text>
</div>
</div>
<div>
<!--待回答-->
<div class="state_box">
<div class="tab_content_box" data-id="">
<div class="tab_info title_info">
<text class="">提交时间:2018.08.30</text>
<text class="tab_state">已通过</text>
<!--<text class="tab_state state">待审核</text>-->
<!--<text class="tab_state state">已驳回</text>-->
</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">临床表现</div>
<div>临床表现内容临床表现内容临床表现内容</div>
</div>
<div class="content_item">
<div class="tab_title">临床表现</div>
<div>临床表现内容临床表现内容临床表现内容</div>
<volist name="list0" id="vo">
<div class="tab_content_box" data-url="{:url('inquiryDetail',array('id'=>$vo['id']))}">
<div class="tab_info title_info">
<text class="">提交时间:{$vo['addtime']|date='Y.m.d',###}</text>
<switch name="vo.status">
<case value="0"><text class="tab_state state">待审核</text></case>
<case value="1"><text class="tab_state">已通过</text></case>
<case value="2"><text class="tab_state state">已驳回</text></case>
</switch>
</div>
</div>
</div>
<div class="tab_content_box">
<div class="tab_info title_info">
<text>提交时间:2018.08.30</text>
<!--<text class="tab_state">已通过</text>-->
<text class="tab_state state">待审核</text>
<!--<text class="tab_state state">已驳回</text>-->
</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">临床表现</div>
<div>临床表现内容临床表现内容临床表现内容</div>
</div>
<div class="content_item">
<div class="tab_title">临床表现</div>
<div>临床表现内容临床表现内容临床表现内容</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">病人主述</div>
<div>
<eq name="vo.patient.type" value="1">
<text class="iconfont icon-luyin voice_icon voice_play"></text>
<else/>
{$vo.patient.content}
</eq>
</div>
</div>
<div class="content_item">
<div class="tab_title">困惑</div>
<div>
<eq name="vo.problem.type" value="1">
<text class="iconfont icon-luyin voice_icon voice_play"></text>
<else/>
{$vo.problem.content}
</eq>
</div>
</div>
</div>
</div>
</div>
</volist>
</div>
<!--已回复-->
<div class="state_box" hidden>
<div class="tab_content_box">
<div class="tab_info title_info">
<text>提交时间:2018.08.30</text>
<!--<text class="tab_state">已通过</text>-->
<!--&lt;!&ndash;<text class="tab_state state">待审核</text>&ndash;&gt;-->
<!--&lt;!&ndash;<text class="tab_state state">已驳回</text>&ndash;&gt;-->
</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">临床表现</div>
<div>临床表现内容临床表现内容临床表现内容</div>
<volist name="list1" id="vo">
<div class="tab_content_box" data-url="{:url('inquiryDetail',array('id'=>$vo['id']))}">
<div class="tab_info title_info">
<text class="">提交时间:{$vo['addtime']|date='Y.m.d',###}</text>
<switch name="vo.status">
<case value="0"><text class="tab_state state">待审核</text></case>
<case value="1"><text class="tab_state">已通过</text></case>
<case value="2"><text class="tab_state state">已驳回</text></case>
</switch>
</div>
<div class="content_item">
<div class="tab_title">临床表现</div>
<div>临床表现内容临床表现内容临床表现内容</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">病人主述</div>
<div>
<eq name="vo.patient.type" value="1">
<text class="iconfont icon-luyin voice_icon voice_play"></text>
<else/>
{$vo.patient.content}
</eq>
</div>
</div>
<div class="content_item">
<div class="tab_title">困惑</div>
<div>
<eq name="vo.problem.type" value="1">
<text class="iconfont icon-luyin voice_icon voice_play"></text>
<else/>
{$vo.problem.content}
</eq>
</div>
</div>
</div>
</div>
</div>
</volist>
</div>
</div>
</div>
... ... @@ -94,7 +109,8 @@
$('.state_box').eq(index).show().siblings().hide()
})
$('.tab_content_box').click(function () {
window.location.href='../expert/inquiryDetail.html'
var url=$(this).data('url');
window.location.href=url;
})
</script>
</body>
... ...
... ... @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<title>转诊模块</title>
<title>问诊待答</title>
<script src="__TMPL__/public/assets/js/fontsize.js"></script>
<link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
... ... @@ -23,77 +23,75 @@
<div class="tab_info">转诊基本信息</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">临床表现</div>
<div class="tab_textarea">
<textarea readonly>临床表现内容临床表现内容临床表现内容</textarea>
</div>
<div class="voice_box" >
<div class="voice_item">
<!--<text class="iconfont icon-huatong voice_icon"></text>-->
<text class="iconfont icon-luyin voice_icon voice_play"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始语音语音最长60秒</text>
<div class="tab_title">病人主述</div>
<eq name="info.patient.type" value="1">
<div class="voice_box" >
<foreach name="info.patient.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
</div>
</div>
<div class="content_item">
<div class="tab_title">已做检查</div>
<div class="tab_textarea">
<textarea>已做检查内容已做检查内容已做检查内容</textarea>
</div>
<div class="voice_box">
<div class="voice_item">
<!--<text class="iconfont icon-huatong voice_icon"></text>-->
<text class="iconfont icon-luyin voice_icon voice_play"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始语音语音最长60秒</text>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.patient.content}</textarea>
</div>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">已用药物</div>
<div class="tab_textarea">
<textarea readonly>xx药物、xx药物、xx药物</textarea>
</div>
<div class="voice_box">
<div class="voice_item">
<!--<text class="iconfont icon-huatong voice_icon"></text>-->
<text class="iconfont icon-luyin voice_icon voice_play"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始语音语音最长60秒</text>
<div class="tab_title">初步诊断</div>
<eq name="info.diagnose.type" value="1">
<div class="voice_box" >
<foreach name="info.diagnose.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.diagnose.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">当前困惑</div>
<div class="tab_textarea">
<textarea readonly>当前困惑内容当前困惑内容当前困惑内容</textarea>
</div>
<div class="voice_box">
<div class="voice_item">
<!--<text class="iconfont icon-huatong voice_icon"></text>-->
<text class="iconfont icon-luyin voice_icon voice_play"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始语音语音最长60秒</text>
<eq name="info.problem.type" value="1">
<div class="voice_box" >
<foreach name="info.problem.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.problem.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">咨询时间</div>
<div>2018.08.30 18:00:00</div>
<div>{$info.addtime|date='Y.m.d H:i:s',###}</div>
</div>
</div>
</div>
<div class="tab_content_box">
<div class="tab_info">转诊基本信息</div>
<div class="tab_info">问诊人基本信息</div>
<div class="user_info_box title_info" style="justify-content: normal">
<div class="head_box"><img src="../images/chead@2x.png" alt=""></div>
<div class="head_box"><img src="{$info.avatar}" alt=""></div>
<div>
<div>姓名:赵梓明</div>
<div>电话:13626495215</div>
<div>医院:中心医院.</div>
<div>科室:急诊室</div>
<div>姓名:{$info.user_nickname}</div>
<div>电话:{$info.mobile}</div>
<div>医院:{$info.hospital}</div>
<div>科室:{$info.office}</div>
</div>
</div>
</div>
... ... @@ -608,17 +606,21 @@
//播放语音
$('.voice_puse').hide()
var mySound = new Audio('http://suzhou.w.bronet.cn/upload/admin/20181217/a22c54f3354951b1d612569a126480a5.mp3');
//var mySound = new Audio('http://suzhou.w.bronet.cn/upload/admin/20181217/a22c54f3354951b1d612569a126480a5.mp3');
$('.voice_play').click(function () {
var url=$(this).data('url');
var mySound = new Audio(url);
mySound.play();
$(this).hide()
$(this).siblings('.voice_puse').show()
$('.voice_puse').click(function () {
mySound.pause();
$(this).hide()
$(this).siblings('.voice_play').show()
})
})
$('.voice_puse').click(function () {
mySound.pause();
$(this).hide()
$(this).siblings('.voice_play').show()
})
//停止录音
... ...
... ... @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<title>转诊模块</title>
<title>转诊待答</title>
<script src="__TMPL__/public/assets/js/fontsize.js"></script>
<link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
... ... @@ -15,73 +15,88 @@
<div class="tab_box">
<div class="tab_item tab_on">
<text>待处理</text>
<text class="point">1</text>
<text class="point">{$count0|default=0}</text>
</div>
<div class="tab_item">
<text>已处理</text>
<text class="point">1</text>
<text class="point">{$count1|default=0}</text>
</div>
</div>
<div>
<!--待回答-->
<div class="state_box">
<div class="tab_content_box">
<div class="tab_info title_info">
<text class="">提交时间:2018.08.30</text>
<text class="tab_state">已通过</text>
<!--<text class="tab_state state">待审核</text>-->
<!--<text class="tab_state state">已驳回</text>-->
</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">临床表现</div>
<div>临床表现内容临床表现内容临床表现内容</div>
</div>
<div class="content_item">
<div class="tab_title">临床表现</div>
<div>临床表现内容临床表现内容临床表现内容</div>
<volist name="list0" id="vo">
<div class="tab_content_box" data-url="{:url('transferDetail',array('id'=>$vo['id']))}">
<div class="tab_info title_info">
<text class="">提交时间:{$vo['addtime']|date='Y.m.d',###}</text>
<switch name="vo.status">
<case value="0"><text class="tab_state state">待审核</text></case>
<case value="1"><text class="tab_state">已通过</text></case>
<case value="2"><text class="tab_state state">已驳回</text></case>
</switch>
</div>
</div>
</div>
<div class="tab_content_box">
<div class="tab_info title_info">
<text>提交时间:2018.08.30</text>
<!--<text class="tab_state">已通过</text>-->
<text class="tab_state state">待审核</text>
<!--<text class="tab_state state">已驳回</text>-->
</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">临床表现</div>
<div>临床表现内容临床表现内容临床表现内容</div>
</div>
<div class="content_item">
<div class="tab_title">临床表现</div>
<div>临床表现内容临床表现内容临床表现内容</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">临床表现</div>
<div>
<eq name="vo.clinical.type" value="1">
<text class="iconfont icon-luyin voice_icon voice_play"></text>
<else/>
{$vo.clinical.content}
</eq>
</div>
</div>
<div class="content_item">
<div class="tab_title">已做检查</div>
<div>
<eq name="vo.inspected.type" value="1">
<text class="iconfont icon-luyin voice_icon voice_play"></text>
<else/>
{$vo.inspected.content}
</eq>
</div>
</div>
</div>
</div>
</div>
</volist>
</div>
<!--已回复-->
<div class="state_box" hidden>
<div class="tab_content_box">
<div class="tab_info title_info">
<text>提交时间:2018.08.30</text>
<!--<text class="tab_state">已通过</text>-->
<!--&lt;!&ndash;<text class="tab_state state">待审核</text>&ndash;&gt;-->
<!--&lt;!&ndash;<text class="tab_state state">已驳回</text>&ndash;&gt;-->
</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">临床表现</div>
<div>临床表现内容临床表现内容临床表现内容</div>
<volist name="list1" id="vo">
<div class="tab_content_box" data-url="{:url('transferDetail',array('id'=>$vo['id']))}">
<div class="tab_info title_info">
<text class="">提交时间:{$vo['addtime']|date='Y.m.d',###}</text>
<switch name="vo.status">
<case value="0"><text class="tab_state state">待审核</text></case>
<case value="1"><text class="tab_state">已通过</text></case>
<case value="2"><text class="tab_state state">已驳回</text></case>
</switch>
</div>
<div class="content_item">
<div class="tab_title">临床表现</div>
<div>临床表现内容临床表现内容临床表现内容</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">临床表现</div>
<div>
<eq name="vo.clinical.type" value="1">
<text class="iconfont icon-luyin voice_icon voice_play"></text>
<else/>
{$vo.clinical.content}
</eq>
</div>
</div>
<div class="content_item">
<div class="tab_title">已做检查</div>
<div>
<eq name="vo.inspected.type" value="1">
<text class="iconfont icon-luyin voice_icon voice_play"></text>
<else/>
{$vo.inspected.content}
</eq>
</div>
</div>
</div>
</div>
</div>
</volist>
</div>
</div>
</div>
... ... @@ -94,7 +109,8 @@
$('.state_box').eq(index).show().siblings().hide()
})
$('.tab_content_box').click(function () {
window.location.href='../expert/referralModuleDetail.html'
var url=$(this).data('url');
window.location.href=url;
})
</script>
</body>
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<title>转诊待答</title>
<script src="__TMPL__/public/assets/js/fontsize.js"></script>
<link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_tlxymah92x.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/weui.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/myweui.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/referralModule.css">
<style>
.voice_box{
width: 100%;
}
.question_yes,.question_yes1{display: none;}
</style>
</head>
<body STYLE="background: #F5F6FA">
<div class="container">
<div class="tab_content_box top">
<div class="tab_info">转诊基本信息</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">临床表现</div>
<eq name="info.clinical.type" value="1">
<div class="voice_box" >
<foreach name="info.clinical.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.clinical.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">已做检查</div>
<eq name="info.inspected.type" value="1">
<div class="voice_box" >
<foreach name="info.inspected.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.inspected.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">已用药物</div>
<eq name="info.used_drugs.type" value="1">
<div class="voice_box" >
<foreach name="info.used_drugs.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.used_drugs.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">当前困惑</div>
<eq name="info.problem.type" value="1">
<div class="voice_box" >
<foreach name="info.problem.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.problem.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">咨询时间</div>
<div>{$info.addtime|date='Y.m.d H:i:s',###}</div>
</div>
</div>
</div>
<div class="tab_content_box">
<div class="tab_info">转诊基本信息</div>
<div class="user_info_box title_info" style="justify-content: normal">
<div class="head_box"><img src="{$info.avatar}" alt=""></div>
<div>
<div>姓名:{$info.user_nickname}</div>
<div>电话:{$info.mobile}</div>
<div>医院:{$info.hospital}</div>
<div>科室:{$info.office}</div>
</div>
</div>
</div>
<div class="tab_content_box">
<div class="tab_info title_info" id="is_have_question" data-id="1">
<text class="tab_title">若您对转诊信息不明确,请点击发起提问</text>
<text class="iconfont icon-icon02 add_problem"></text>
</div>
</div>
<!--提问内容部分-->
<div class="tab_content_box info_item question_yes">
<div class="tab_info inquiry_content title">
<text>提问</text>
<text class="iconfont icon-huatong voice_btn"></text>
<text class="iconfont icon-tianxie"></text>
</div>
<div class="textarea_content">
<textarea class="area" type="text" placeholder="请输入" maxlength="1000"></textarea>
<p class="text_num num_box"><span class="text-count">0</span>/1000</p>
</div>
<div class="voice_module agree_box" video-id="1">
<div class="voice_list" voiceitemid="1">
<div class="voice_box voice_third">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon"></text>
<text class="voice_font luyin">点击图标可播放 时长:10秒</text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao cancle_voice"></text>
<text class="iconfont icon-tianjia add_voice"></text>
</div>
</div>
<div class="voice_box voice_first" voiceid="1">
<div class="voice_item">
<text class="iconfont icon-huatong mike voice_icon"></text>
<text class="voice_font huatong">点击图标开始语音语音最长60秒</text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao icon_cancle"></text>
</div>
</div>
</div>
</div>
</div>
<!--转诊意见内容部分-->
<div class="tab_content_box info_item question_no">
<div class="tab_info inquiry_content title">
<text>转诊意见</text>
<text class="iconfont icon-huatong voice_btn"></text>
<text class="iconfont icon-tianxie"></text>
</div>
<div class="textarea_content">
<textarea class="area" type="text" placeholder="请输入" maxlength="1000"></textarea>
<p class="text_num num_box"><span class="text-count">0</span>/1000</p>
</div>
<div class="voice_module agree_box" video-id="1">
<div class="voice_list" voiceitemid="1">
<div class="voice_box voice_third">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon"></text>
<text class="voice_font luyin">点击图标可播放 时长:10秒</text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao cancle_voice"></text>
<text class="iconfont icon-tianjia add_voice"></text>
</div>
</div>
<div class="voice_box voice_first" voiceid="1">
<div class="voice_item">
<text class="iconfont icon-huatong mike voice_icon"></text>
<text class="voice_font huatong">点击图标开始语音语音最长60秒</text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao icon_cancle"></text>
</div>
</div>
</div>
</div>
</div>
<notempty name="info.reply">
<!--专家提问显示内容-->
<div class="tab_content_box">
<div class="tab_info">
<text>专家提问</text>
</div>
<div class="user_info_box">
{$info.reply}
</div>
</div>
<!--回复专家的内容-->
<div class="tab_content_box">
<div class="tab_info">
<text>回答</text>
</div>
<div class="user_info_box">
{$info.problem_again|default='尚未回答'}
</div>
</div>
</notempty>
<!--同意转诊须填表单-->
<div class="tab_content_box question_no">
<div class="tab_content">
<div class="content_item">
<div class="tab_title">接诊信息(同意转诊时需要填写此表单)</div>
<div class="info_box">
<div class="info_item">
<div class="title">接诊医院</div>
<div class="info_input"><input type="text" placeholder="请填写接诊医院"></div>
</div>
<div class="info_item">
<div class="title">转诊专家</div>
<div class="info_input"><input type="text" placeholder="请填写接诊医院"></div>
</div>
<div class="info_item">
<div class="title">接诊地点</div>
<div class="info_input"><input type="text" placeholder="请填写接诊医院"></div>
</div>
<div class="info_item" id="showDatePicker">
<div class="title">就诊时间</div>
<div class="info_input"><input class="time_value" type="text" placeholder="请填写接诊医院">
<text class="iconfont icon-xiala"></text>
</div>
</div>
</div>
</div>
</div>
</div>
<!--确认回复按钮-->
<div class="agree_btn submit question_yes1">确认回复</div>
<!---->
<div class="bottom_box question_no">
<div class="agree_btn">同意</div>
<div class="bottom_btn">驳回</div>
</div>
</div>
<div class="mask_box" hidden>
<div class="referral_popup_box">
<div>确认驳回</div>
<div class="referral_info">确定驳回转诊吗?</div>
<div class="referral_btn_box">
<div class="btn cancel_btn">取消</div>
<div class="btn confirm_btn">确认</div>
</div>
</div>
</div>
<!--录音弹窗-->
<div class="mask_box first" hidden>
<div class="popup_box">
<div class="popup_title">录制语音</div>
<div class="popup_time">
<div class="time-item">
<!--<span id="day_show">0天</span>-->
<strong id="hour_show">
<text id="h"></text>
00:</strong>
<strong id="minute_show">
<text></text>
01:</strong>
<strong id="second_show">
<text></text>
00</strong>
</div>
<div class="popup_info">还可以录制 <span id="second_test">5</span></div>
</div>
<div class="popup_btn_box">
<div class="popup_item start ">
<img class="popup_icon" src="__TMPL__/public/assets/images/eicon09@2x.png" alt="">
<div>开始</div>
</div>
<div class="popup_item pause" hidden>
<img class="popup_icon" src="__TMPL__/public/assets/images/eicon13@2x.png" alt="">
<div>暂停</div>
</div>
<div class="popup_item stop" hidden>
<img class="popup_icon" src="__TMPL__/public/assets/images/eicon14@2x.png" alt="">
<div>已停止</div>
</div>
<div class="popup_center play start">
<img src="__TMPL__/public/assets/images/eicon11@2x.png" alt="">
</div>
<div class="popup_center stopping" hidden>
<img src="__TMPL__/public/assets/images/eicon12@2x.png" alt="">
</div>
<div class="popup_item next_step">
<img class="popup_icon" src="__TMPL__/public/assets/images/eicon10@2x.png" alt="">
<div>下一步</div>
</div>
</div>
</div>
</div>
<!---->
<div class="mask_box second" hidden>
<div class="popup_box">
<div class="popup_title">录制语音</div>
<div class="popup_time">
<div class="popup_btn audition">点击试听</div>
<!--<div class="popup_info">时长:4分58秒</div>-->
</div>
<div class="popup_btn_box">
<div class="large_icon rerecord">
<img class="popup_icon " src="__TMPL__/public/assets/images/eicon15@2x.png" alt="">
<div>重新录制</div>
</div>
<div class="large_icon submit_voice">
<img class="popup_icon upload" src="__TMPL__/public/assets/images/eicon16@2x.png" alt="">
<div>我要发送</div>
</div>
</div>
</div>
</div>
<script src="__TMPL__/public/assets/js/jquery-2.1.0.js"></script>
<script src="__TMPL__/public/assets/js/weui.js"></script>
<script src="__TMPL__/public/assets/js/myweui.js"></script>
<!--<script src="__TMPL__/public/assets/js/referral.js"></script>-->
<script>
//文本框显示字数
$(".area").on("input propertychange", function () {
var $this = $(this),
_val = $this.val(),
count = "";
if (_val.length > 1000) {
$this.val(_val.substring(0, 1000));
}
count = 1000 - $this.val().length;
$(this).siblings(".text_num").children('.text-count').text(count);
});
// 疾病分类下拉
$('.inquiry_type').click(function () {
weui.picker([
{label: '一类', value: 0},
{label: '二类', value: 1}
], {
onChange: function (res) {
console.log(res)
},
onConfirm: function (res) {
$('.inquiry_value').val(res[0].label)
}
}
)
})
// 疾病分类下拉
$('.expert').click(function () {
weui.picker([
{label: '王医生', value: 0},
{label: '刘易斯', value: 1}
], {
onChange: function (res) {
console.log(res)
},
onConfirm: function (res) {
$('.expert_value').val(res[0].label)
}
}
)
})
// 性别分类
$('.sex_type').click(function () {
weui.picker([
{label: '男', value: 0},
{label: '女', value: 1}
], {
onChange: function (res) {
console.log(res)
},
onConfirm: function (res) {
$('.sex_value').val(res[0].label)
}
}
)
})
// 性别分类
$('.unit_type').click(function () {
weui.picker([
{label: '国企', value: 0},
{label: '私企', value: 1}
], {
onChange: function (res) {
console.log(res)
},
onConfirm: function (res) {
$('.unit_value').val(res[0].label)
}
}
)
})
//就诊时间
$('#showDatePicker').on('click', function () {
weui.datePicker({
start: 2019,
end: new Date().getFullYear(),
onChange: function (result) {
console.log(result);
},
onConfirm: function (result) {
console.log(result[0].label+' - '+result[1].label+' - '+result[2].label)
$('.time_value').val(result[0].value+' - '+result[1].value+' - '+result[2].value)
}
});
});
//语音模块
// $('.icon-tianxie').hide()
// $('.voice_first').hide()
// $('.voice_second').hide()
$('.voice_third').hide()
$('.icon_cancle').hide()
// $('.voice_module').hide()
var title_id = ''
//点击
$('.info_item').on('click','.title',function () {
$(this).parent().toggleClass('voice')
})
//点击正在播放按钮
$('.icon-luying_ongoing').click(function () {
var videolist = $(".voice_module");
for (var i = 0; i < videolist.length; i++) {
var videoid = $(videolist[i]).attr("video-id");
if (videoid == title_id) {
$(videolist[i]).show();
$(videolist[i]).children('.voice_second').hide()
$(videolist[i]).children('.voice_third').show();
}
}
})
var times = "";//倒计时总秒数量
var time = "";
function countDown(times) {
var timer = null;
timer = setInterval(function () {
var day = 0,
hour = 0,
minute = 0,
second = 0;//时间默认值
if (times > 0) {
day = Math.floor(times / (60 * 60 * 24));
hour = Math.floor(times / (60 * 60)) - (day * 24);
minute = Math.floor(times / 60) - (day * 24 * 60) - (hour * 60);
second = Math.floor(times) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
}
if (day <= 9) day = '0' + day;
if (hour <= 9) hour = '0' + hour;
if (minute <= 9) minute = '0' + minute;
if (second <= 9) second = '0' + second;
$('#hour_show').html('<text id="h"></text>' + hour + ':');
$('#minute_show').html('<text></text>' + minute + ':');
$('#second_show').html('<text></text>' + second + '');
//
console.log(day + "天:" + hour + "小时:" + minute + "分钟:" + second + "秒");
times--;
}, 1000);
// if (times <= 0) {
// clearInterval(timer);
// }
$('.pause').click(function () {
// timer(intDiff);
clearInterval(timer);
localStorage.setItem("times", times)
})
$('.stop').click(function () {
clearInterval(timer);
times = 0;
})
$('.stopping').click(function () {
clearInterval(timer);
localStorage.clear()
})
}
$('.start').click(function () {
time = localStorage.getItem("times")
if (time == null) {
times = parseInt(60)
} else {
times = time;
}
console.log(time)
countDown(times);
localStorage.setItem("times", times)
})
//添加一条新语音
var num = 1;
$('.voice_module').on('click', '.add_voice', function () {
times=60
// clearInterval(timer);
var day = 0,
hour = 0,
minute = 0,
second = 0;//时间默认值
if (day <= 9) day = '0' + day;
if (hour <= 9) hour = '0' + hour;
if (minute <= 9) minute = '0' + minute;
if (second <= 9) second = '0' + second;
$('#hour_show').html('<text id="h"></text>' + hour + ':');
$('#minute_show').html('<text></text>' + minute + ':');
$('#second_show').html('<text></text>' + second + '');
$('#second_test').html(60);
num = num + 1
var parent = $(this).parents('.voice_module')
var html = '<div class="voice_list" voiceitemid="'+num+'">\n' +
'<div class="voice_box voice_third" style="display: none;">\n' +
' <div class="voice_item">\n' +
' <text class="iconfont icon-luyin voice_icon"></text>\n' +
' <text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span>秒</text>\n' +
' </div>\n' +
' <div class="voice_btn_box">\n' +
' <text class="iconfont icon-quxiao cancle_voice"></text>\n' +
// ' <text class="iconfont icon-tianjia add_voice"></text>\n' +
' </div>\n' +
' </div>\n' +
' <div class="voice_box voice_first">\n' +
' <div class="voice_item">\n' +
' <text class="iconfont icon-huatong mike voice_icon"></text>\n' +
' <text class="voice_font huatong">点击图标开始语音语音最长60秒</text>\n' +
' </div>\n' +
' <div class="voice_btn_box">\n' +
' <text class="iconfont icon-quxiao icon_cancle cancle_voice"></text>\n' +
' </div>\n' +
' </div>\n' +
'</div>'
parent.append(html)
})
//显示弹窗
var videoid=''
//生命全局唯一 音频
var voiceBox;
$(document).on("click", ".mike", function () {
$('.first').show()
$('.play').show()
$('.start').show()
$('.stopping').hide()
$('.stop').hide()
$('.next_step').hide();
// videoid=$(this).parents(".voice_module").attr("video-id")
// $(this).parents(".voice_first").hide();
// $(this).parents(".voice_first").siblings(".voice_third").show()
//
// // vioceid=$(this).parents(".voice_first").attr("voiceid");
//
voiceBox = $(this).parents('.voice_list');
// console.log(voiceBox)
// $('.submit_voice').attr('videoid')
//
// var videolist = $(".voice_module");
// console.log(videolist)
// for (var i = 0; i < videolist.length; i++) {
// if (videoid == title_id) {
// $(videolist[i]).children(".voice_list").children(".voice_list").hide();
// $(videolist[i]).children(".voice_list").children(".voice_third").show();
// }
// }
});
//删除语音
$(".voice_module").on("click",".cancle_voice",function(){
$(this).parents(".voice_box").remove();
})
//开始录音
$('.start').click(function () {
$('.start').hide()
$('.play').hide()
$('.pause').show()
$('.stopping').show()
$('.next_step').hide()
})
//暂停
$('.pause').click(function () {
$('.pause').hide()
$('.start').show()
$('.stopping').hide()
})
//播放语音
$('.voice_puse').hide()
$('.voice_play').click(function () {
var url=$(this).data('url');
var mySound = new Audio(url);
mySound.play();
$(this).hide()
$(this).siblings('.voice_puse').show();
$('.voice_puse').click(function () {
mySound.pause();
$(this).hide()
$(this).siblings('.voice_play').show()
})
})
//停止录音
$('.stopping').click(function () {
$('.next_step').show()
$('.stop').show()
$('.pause').hide()
})
//下一步
$('.next_step').click(function () {
$('.first').hide()
$('.second').show()
})
//点击试听
$('.audition').click(function () {
})
//我要发送
$('.submit_voice').click(function () {
voiceBox.find('.voice_first').hide().siblings('.voice_third').show()
$('.second').hide()
})
//重新录制
$('.rerecord').click(function () {
$('.first').show()
$('.second').hide()
$('.stop').hide()
$('.stopping').hide()
$('.start').show()
$('.start').show()
})
//上传图片
$(function () {
var tmpl = '<li class="weui-uploader__file" style="background-image:url(#url#)"></li>',
$gallery = $("#gallery"), $galleryImg = $("#galleryImg"),
$uploaderInput = $("#uploaderInput"),
$uploaderFiles = $("#uploaderFiles")
;
$uploaderInput.on("change", function (e) {
// console.log(e)
var src, url = window.URL || window.webkitURL || window.mozURL, files = e.target.files;
for (var i = 0, len = files.length; i < len; ++i) {
var file = files[i];
console.log(url.createObjectURL(file))
if (url) {
src = url.createObjectURL(file);
// var
} else {
src = e.target.result;
}
$uploaderFiles.append($(tmpl.replace('#url#', src)));
}
});
$uploaderFiles.on("click", "li", function () {
$galleryImg.attr("style", this.getAttribute("style"));
$gallery.fadeIn(100);
});
$gallery.on("click", function () {
$gallery.fadeOut(100);
});
});
$('#is_have_question').click(function () {
var data=$(this).attr('data-id');
if(data==1){
$('.question_yes').show();
$('.question_yes1').css('display','flex');
$('.question_no').hide();
$(this).attr('data-id',2);
}else{
$('.question_yes').hide();
$('.question_yes1').hide();
$('.question_no').show();
$(this).attr('data-id',1);
}
})
</script>
</body>
</html>
\ No newline at end of file
... ...