注册
This commit is contained in:
parent
57a2609364
commit
3904763ddb
@ -4,14 +4,31 @@ import request from "../../request.js"
|
|||||||
export function getOpenId(code) {
|
export function getOpenId(code) {
|
||||||
return request({
|
return request({
|
||||||
url: `/applet/register/getOpenId/${code}`,
|
url: `/applet/register/getOpenId/${code}`,
|
||||||
method: 'GET'
|
method: 'GET',
|
||||||
|
header: {
|
||||||
|
// Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前注册居民
|
// 获取当前注册居民
|
||||||
export function getCurrentUser(data) {
|
export function getCurrentUser(openid, cityCode) {
|
||||||
return request({
|
return request({
|
||||||
url: `/applet/register/getCurrentResident/${data.openid}/${data.cityCode}`,
|
url: `/applet/register/getCurrentResident/${openid}/${cityCode}`,
|
||||||
method: 'GET'
|
method: 'GET',
|
||||||
|
header: {
|
||||||
|
// Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取签约信息
|
||||||
|
export function detail(identity,region) {
|
||||||
|
return request({
|
||||||
|
url: `/applet/signinfo/detail/${identity}`,
|
||||||
|
method: 'GET',
|
||||||
|
header: {
|
||||||
|
region: region,
|
||||||
|
// Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -1,8 +1,8 @@
|
|||||||
import request from "../../request.js"
|
import request from "../../request.js"
|
||||||
|
|
||||||
export function getWeChatUser(loginCode, phoneCode) {
|
export function getWeChatUser(code) {
|
||||||
return request({
|
return request({
|
||||||
url: `/nurseApplet/login/getWeChatUserInfo?loginCode=${loginCode}&phoneCode=${phoneCode}`,
|
url: `/applet/register/getOpenId/${code}`,
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import request from "../../request.js"
|
import request from "../../request.js"
|
||||||
|
|
||||||
// 注册
|
// 注册
|
||||||
export function register(data) {
|
export function registerdata(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/applet/register`,
|
url: '/applet/register',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import baseurl from './baseurl.js'
|
import baseurl from './baseurl.js'
|
||||||
|
|
||||||
|
// Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||||
var request = function(config) {
|
var request = function(config) {
|
||||||
return new Promise((resolve, rejected) => {
|
return new Promise((resolve, rejected) => {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
@ -10,9 +11,7 @@ var request = function(config) {
|
|||||||
data: config.data,
|
data: config.data,
|
||||||
method: config.method,
|
method: config.method,
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
header: {
|
header:config.header,
|
||||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
|
||||||
},
|
|
||||||
success(res) {
|
success(res) {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
resolve(res.data)
|
resolve(res.data)
|
||||||
|
|||||||
340
components/ld-select/ld-select.vue
Normal file
340
components/ld-select/ld-select.vue
Normal file
@ -0,0 +1,340 @@
|
|||||||
|
<template>
|
||||||
|
<view class="main">
|
||||||
|
<view class="input" :style="disabled?'background-color:#f5f7fa':''">
|
||||||
|
<input @click="showModal" v-model="_value" :style="disabled?'color:#c0c4cc':''" :placeholder="placeholder" disabled/>
|
||||||
|
<text v-if="clearable&&!disabled" @click="empty" class="selectIcon iconcross"></text>
|
||||||
|
</view>
|
||||||
|
<view class="select-modal" :class="isShowModal?'show':''" @tap="hideModal">
|
||||||
|
<view class="select-dialog" @tap.stop="" :style="{backgroundColor:bgColor}">
|
||||||
|
<view class="select-bar bg-white">
|
||||||
|
<view class="action text-blue" @tap="cancelClick">{{cancelText}}</view>
|
||||||
|
<view class="action text-green" @tap="confirmClick">{{confirmText}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="select-content">
|
||||||
|
<view class="select-item" v-for="(item,index) in list" :key="index"
|
||||||
|
:style="valueIndexOf(item)?'color:'+selectColor+';background-color:'+selectBgColor+';':'color:'+color+';'"
|
||||||
|
@click="select(item)">
|
||||||
|
<view class="title">{{getLabelKeyValue(item)}}</view>
|
||||||
|
<text class="selectIcon icongou" v-if="valueIndexOf(item)"></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isShowModal:false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
value:{
|
||||||
|
type:[Number,String,Array,Object],
|
||||||
|
default:null
|
||||||
|
},
|
||||||
|
placeholder:{ // 占位符
|
||||||
|
default: "",
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
multiple:{ // 是否多选
|
||||||
|
default: false,
|
||||||
|
type: Boolean
|
||||||
|
},
|
||||||
|
list: {
|
||||||
|
default: () => [],
|
||||||
|
type: Array
|
||||||
|
},
|
||||||
|
valueKey:{ // 指定list中valueKey的值作为下拉框绑定内容
|
||||||
|
default: 'value',
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
labelKey:{ // 指定list中labelKey的值作为下拉框显示内容
|
||||||
|
default: 'label',
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
default: false,
|
||||||
|
type: Boolean
|
||||||
|
},
|
||||||
|
clearable:{
|
||||||
|
default: false,
|
||||||
|
type: Boolean
|
||||||
|
},
|
||||||
|
cancelText:{
|
||||||
|
default: "取消",
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
confirmText:{
|
||||||
|
default: "确定",
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
color:{
|
||||||
|
default: "#000000",
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
selectColor:{
|
||||||
|
default: "#0081ff",
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
bgColor:{
|
||||||
|
default: "#F1F1F1",
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
selectBgColor:{
|
||||||
|
default: "#FFFFFF",
|
||||||
|
type: String
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
_value: {
|
||||||
|
get() {
|
||||||
|
return this.get_value(this.value);
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
console.log(this.value)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
get_value(val){ // 将数组值转换为以,隔开的字符串
|
||||||
|
if(val || val===0){
|
||||||
|
if(Array.isArray(val)){
|
||||||
|
let chooseAttr = []
|
||||||
|
val.forEach(item=>{
|
||||||
|
let choose = this.list.find(temp => {
|
||||||
|
let val_val = this.getValueKeyValue(temp)
|
||||||
|
return item === val_val
|
||||||
|
})
|
||||||
|
if(choose) {
|
||||||
|
chooseAttr.push(choose)
|
||||||
|
} else {
|
||||||
|
choose = {}
|
||||||
|
this.$set(choose, this.valueKey, item)
|
||||||
|
this.$set(choose, this.labelKey, item)
|
||||||
|
chooseAttr.push(choose)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let values = chooseAttr.map(temp => this.getLabelKeyValue(temp)).join(',')
|
||||||
|
return values
|
||||||
|
} else {
|
||||||
|
let choose = this.list.find(temp => {
|
||||||
|
let val_val = this.getValueKeyValue(temp)
|
||||||
|
return val === val_val
|
||||||
|
})
|
||||||
|
if(choose) {
|
||||||
|
return this.getLabelKeyValue(choose)
|
||||||
|
} else {
|
||||||
|
return val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
select(item){ // 点击选项
|
||||||
|
let val = this.getValueKeyValue(item);
|
||||||
|
if(this.multiple){
|
||||||
|
let _value = this.value;
|
||||||
|
console.log(_value,this.value)
|
||||||
|
let index = _value.indexOf(val);
|
||||||
|
if(index!=-1){
|
||||||
|
_value.splice(index,1)
|
||||||
|
this.setInput(_value);
|
||||||
|
} else {
|
||||||
|
_value.push(val)
|
||||||
|
this.setInput(_value);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.setInput(val);
|
||||||
|
this.hideModal()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
valueIndexOf(item){
|
||||||
|
let val = this.getValueKeyValue(item);
|
||||||
|
if(Array.isArray(this.value)){
|
||||||
|
return this.value.indexOf(val)!=-1
|
||||||
|
} else {
|
||||||
|
return this.value === val
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getLabelKeyValue(item){ // 获取label
|
||||||
|
return item[this.labelKey]
|
||||||
|
// if(item){
|
||||||
|
// return item[this.labelKey]
|
||||||
|
// } else {
|
||||||
|
// return item
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
getValueKeyValue(item){ // 获取value
|
||||||
|
return item[this.valueKey]
|
||||||
|
},
|
||||||
|
empty(){ // 清空
|
||||||
|
if(this.multiple){
|
||||||
|
this.setInput([]);
|
||||||
|
} else {
|
||||||
|
this.setInput('');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setInput(val){
|
||||||
|
this.$emit('change', val)
|
||||||
|
this.$emit('input', val)
|
||||||
|
},
|
||||||
|
cancelClick(){ // 点击取消
|
||||||
|
this.$emit('cancel', this.value)
|
||||||
|
this.hideModal()
|
||||||
|
},
|
||||||
|
confirmClick(){ // 点击确定
|
||||||
|
this.$emit('confirm', this.value)
|
||||||
|
this.hideModal()
|
||||||
|
},
|
||||||
|
showModal(){ // 显示model
|
||||||
|
if(!this.disabled){
|
||||||
|
this.isShowModal = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hideModal(){ // 隐藏model
|
||||||
|
this.isShowModal = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
@font-face {font-family: "selectIcon";
|
||||||
|
src: url('//at.alicdn.com/t/font_1833441_ycfzdhg2u3.eot?t=1590375117208'); /* IE9 */
|
||||||
|
src: url('//at.alicdn.com/t/font_1833441_ycfzdhg2u3.eot?t=1590375117208#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||||
|
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMEAAsAAAAABvQAAAK4AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBRIFCATYCJAMMCwgABCAFhQUHNRsfBsg+QCa3uoO0oAJTMwhxVu965keqWBy1hkbwtfzWb2Z279/shRhJisKF6FApKLI7oyBbpAaHo3w24k+ca9EUJbDmjaeznUdZ/FOUlkWdJ33rizZY/Pw6J5Xw0qKYxHTMesePHVT6EFpaC4zV70sKi2bYgNPc1w0WHnDVC/e/UnNTgyP+4Jq6BBpIHoisgypLaIAFEtU0wgeaIG8Yu4nAIZwnUK1QgFfOT6nUUoBpgXjj2lqplTMpiuXtCW3N2iK+aPTS2/Qdnzny8d+5IEiaDMy99exklra//FrKnX48pChmgrq5QcYRQCEe17ruqgqLAKv8WntwqwhpLms/nB5yW/iHRxJEC0QOgT3NnfgF01NBKvOuIzNoZdh5gJuAeGrsozE8vOJ7u5D832oz55039W5G+S52K0H+zNf1TJz07k26kqoQybRfwVFV4rjDS/K8EXUyuF1cXnT3weKS9Rvdm/xe7h8oA1hLwOR18R+Y4n4zwpr4z5SU089Vc+cpfWL+mn5APmT3Z39jeOs/GbWjK+DnmsuL/u6ehMX4j4yedSVkAUUuPh3TY022MtKZUEOtPqCb8Bkvnr5XT6imU0gGrEJW7aAL/gw0OhegVV2F6pC7uTOppirKIA4MFQhTrpCM+AbZlDu64L/QmAkQWlMhQXU75D07O9Gtl0PUYjTBLyAzOLNQYtypIEEjvsXtBLQTooV2nrQrGEau2gKmZlR4L8gwnGtBJbUn1diCOOQUnEkTkRAOeci9KHOQxvFro+tx3ZcGAaeljstCSBNDJuArgIyBYyy6OdZxAhHIELu1IC9AtgShCVtLltEKrSff1XoHJo3RC33hM63o3j6pSNkmqmIWEAtxFHB2OwoRBAfyeqE3r2ogHeF42dBhs7gvf7CukH5MmlUGOCpHihxFfs6TehDyKCqVAA==') format('woff2'),
|
||||||
|
url('//at.alicdn.com/t/font_1833441_ycfzdhg2u3.woff?t=1590375117208') format('woff'),
|
||||||
|
url('//at.alicdn.com/t/font_1833441_ycfzdhg2u3.ttf?t=1590375117208') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
|
||||||
|
url('//at.alicdn.com/t/font_1833441_ycfzdhg2u3.svg?t=1590375117208#selectIcon') format('svg'); /* iOS 4.1- */
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectIcon {
|
||||||
|
position: absolute;
|
||||||
|
right: 16rpx;
|
||||||
|
font-family: "selectIcon" !important;
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icongou:before {
|
||||||
|
content: "\e61c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.iconcross:before {
|
||||||
|
content: "\e61a";
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .input.data-v-2ee6bce8{
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
}
|
||||||
|
.main{
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
.bg-white{
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.text-blue{
|
||||||
|
color: #0081ff;
|
||||||
|
}
|
||||||
|
.text-green{
|
||||||
|
color: #39b54a;
|
||||||
|
}
|
||||||
|
.input {
|
||||||
|
display: flex;
|
||||||
|
align-items:center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1rpx;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1);
|
||||||
|
input{
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.select-modal {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 9999;
|
||||||
|
opacity: 0;
|
||||||
|
outline: 0;
|
||||||
|
text-align: center;
|
||||||
|
-ms-transform: scale(1.185);
|
||||||
|
transform: scale(1.185);
|
||||||
|
backface-visibility: hidden;
|
||||||
|
perspective: 2000rpx;
|
||||||
|
background: rgba(0, 0, 0, 0.6);
|
||||||
|
transition: all 0.3s ease-in-out 0s;
|
||||||
|
pointer-events: none;
|
||||||
|
margin-bottom: -1000rpx;
|
||||||
|
&::before {
|
||||||
|
content: "\200B";
|
||||||
|
display: inline-block;
|
||||||
|
height: 100%;
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
.select-dialog {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 0;
|
||||||
|
.select-content{
|
||||||
|
// background-color: #F1F1F1;
|
||||||
|
max-height: 420rpx;
|
||||||
|
overflow:auto;
|
||||||
|
.select-item{
|
||||||
|
position: relative;
|
||||||
|
padding: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
.title{
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.select-modal.show {
|
||||||
|
opacity: 1;
|
||||||
|
transition-duration: 0.3s;
|
||||||
|
-ms-transform: scale(1);
|
||||||
|
transform: scale(1);
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
pointer-events: auto;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.select-bar {
|
||||||
|
padding: 0 20rpx;
|
||||||
|
display: flex;
|
||||||
|
position: relative;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 80rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
.action {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
justify-content: center;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -50,7 +50,7 @@
|
|||||||
"quickapp" : {},
|
"quickapp" : {},
|
||||||
/* 小程序特有相关 */
|
/* 小程序特有相关 */
|
||||||
"mp-weixin" : {
|
"mp-weixin" : {
|
||||||
"appid" : "wxdc32268eca6b78f9",
|
"appid" : "wxccb16a452ab5e4b4",
|
||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : false,
|
"urlCheck" : false,
|
||||||
"postcss" : true,
|
"postcss" : true,
|
||||||
|
|||||||
22
pages.json
22
pages.json
@ -64,6 +64,13 @@
|
|||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "disease/disease",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "疾病类型选择",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "screenorder/screenorder",
|
"path": "screenorder/screenorder",
|
||||||
"style": {
|
"style": {
|
||||||
@ -381,6 +388,7 @@
|
|||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
"root": "pagesC",
|
"root": "pagesC",
|
||||||
@ -398,13 +406,13 @@
|
|||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
"path": "Filinginformation/Filinginformation",
|
// "path": "Filinginformation/Filinginformation",
|
||||||
"style": {
|
// "style": {
|
||||||
"navigationBarTitleText": "查看建档信息"
|
// "navigationBarTitleText": "查看建档信息"
|
||||||
// "enablePullDownRefresh": false
|
// // "enablePullDownRefresh": false
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
"path": "Onlinesigning/Onlinesigning",
|
"path": "Onlinesigning/Onlinesigning",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
请拍摄本人头像
|
请拍摄本人头像
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="contentV">
|
<view class="contentV">
|
||||||
<view class="mark"></view>
|
<view class="mark"></view>
|
||||||
<image v-if="tempImg" mode="widthFix" :src="tempImg" />
|
<image v-if="tempImg" mode="widthFix" :src="tempImg" />
|
||||||
@ -16,6 +17,7 @@
|
|||||||
flash="off" resolution='high' />
|
flash="off" resolution='high' />
|
||||||
<view v-show="!tempImg && tipsText" class="tipV">{{ tipsText }}</view>
|
<view v-show="!tempImg && tipsText" class="tipV">{{ tipsText }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="footerV">
|
<view class="footerV">
|
||||||
<view style="width: 100%;">
|
<view style="width: 100%;">
|
||||||
<view v-if="!tempImg" style="width: 100%;">
|
<view v-if="!tempImg" style="width: 100%;">
|
||||||
@ -157,6 +159,7 @@
|
|||||||
if (this.tipsText != "" && this.tipsText != "请拍照") {
|
if (this.tipsText != "" && this.tipsText != "请拍照") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.getSetting({
|
uni.getSetting({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (!res.authSetting['scope.camera']) {
|
if (!res.authSetting['scope.camera']) {
|
||||||
@ -177,6 +180,9 @@
|
|||||||
tempImagePath
|
tempImagePath
|
||||||
}) => {
|
}) => {
|
||||||
this.tempImg = tempImagePath
|
this.tempImg = tempImagePath
|
||||||
|
//全局事件订阅只要注册的页面都可以收到回调值
|
||||||
|
// uni.$emit("headPictureUrl",this.tempImg)
|
||||||
|
|
||||||
console.log("=======tempImg:", this.tempImg)
|
console.log("=======tempImg:", this.tempImg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -197,10 +203,14 @@
|
|||||||
duration: 2000,
|
duration: 2000,
|
||||||
})
|
})
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/register/register?headPictureUrl=${this.tempImg}`
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击 - 取消上传
|
// 点击 - 取消上传
|
||||||
handleCancelClick() {
|
handleCancelClick() {
|
||||||
|
console.log(this.tempImg)
|
||||||
this.tempImg = ''
|
this.tempImg = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,8 @@
|
|||||||
<image src="/static/pageC/homepage.png" mode=""></image>
|
<image src="/static/pageC/homepage.png" mode=""></image>
|
||||||
<view class="loginmount">
|
<view class="loginmount">
|
||||||
<image src="/static/pageC/TAB.png" mode=""></image>
|
<image src="/static/pageC/TAB.png" mode=""></image>
|
||||||
<text>你好,请登录</text>
|
<text v-if="patientName">{{patientName}}</text>
|
||||||
|
<text @tap="login" v-else>你好,请登录</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="contentcenter">
|
<view class="contentcenter">
|
||||||
@ -26,7 +27,7 @@
|
|||||||
服务预约
|
服务预约
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="home">
|
<view class="home" @tap="count">
|
||||||
<image src="/static/pageC/exchange.png" mode=""></image>
|
<image src="/static/pageC/exchange.png" mode=""></image>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
积分兑换
|
积分兑换
|
||||||
@ -59,94 +60,287 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
getOpenId,
|
getOpenId,
|
||||||
getCurrentUser
|
getCurrentUser,
|
||||||
|
detail
|
||||||
|
|
||||||
} from '@/api/pages/homepage/homepage.js'
|
} from '@/api/pages/homepage/homepage.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: 'Hello'
|
title: 'Hello',
|
||||||
|
patientName:'',
|
||||||
|
userinfo:{},
|
||||||
|
identity:'',
|
||||||
|
cityCode:'',
|
||||||
|
Code:'',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.login()
|
// this.login()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
var that = this
|
||||||
|
this.userinfo= uni.getStorageSync('userinfo');
|
||||||
|
|
||||||
|
this.cityCode = this.userinfo.cityCode;
|
||||||
|
var openid = this.userinfo.openid;
|
||||||
|
that.identity = this.userinfo.cardNo;
|
||||||
|
if (!openid && !that.cityCode) {
|
||||||
|
// that.appPersonallist = null
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '您未登录,请先登录',
|
||||||
|
type: 'error',
|
||||||
|
duration: '1000',
|
||||||
|
})
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(openid&&that.cityCode){
|
||||||
|
// isWxBing(openid, cityCode) {
|
||||||
|
|
||||||
|
getCurrentUser(openid,that.cityCode).then(res => {
|
||||||
|
this.patientName=res.data.patientName
|
||||||
|
console.log(res);
|
||||||
|
// if (!res.data) {
|
||||||
|
// // 注册
|
||||||
|
// }
|
||||||
|
})
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 登录
|
||||||
|
login(){
|
||||||
|
this.gologin();
|
||||||
|
|
||||||
|
},
|
||||||
|
gologin() {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '您未登录,请先登录',
|
||||||
|
type: 'error',
|
||||||
|
duration: '1000',
|
||||||
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 是否签约
|
||||||
|
parentinfo() {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '未签约,请先签约',
|
||||||
|
type: 'error',
|
||||||
|
duration: '1000',
|
||||||
|
// url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 签约信息
|
||||||
|
// detailinfo(){
|
||||||
|
// this.region=this.cityCode
|
||||||
|
// detail(this.identity,this.region).then(res => {
|
||||||
|
// this.Code=res.code
|
||||||
|
// if(this.Code==500){
|
||||||
|
// this.$refs.uToast.show({
|
||||||
|
// title: res.msg,
|
||||||
|
// type: 'error',
|
||||||
|
// duration: '1000',
|
||||||
|
// // url: '/pages/login/login'
|
||||||
|
// })
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// })
|
||||||
|
|
||||||
|
// },
|
||||||
|
// 家医签约
|
||||||
goonline() {
|
goonline() {
|
||||||
|
if(!this.userinfo){
|
||||||
|
this.gologin();
|
||||||
|
}else{
|
||||||
|
if(this.identity){
|
||||||
|
this.region=this.cityCode
|
||||||
|
detail(this.identity,this.region).then(res => {
|
||||||
|
this.Code=res.code
|
||||||
|
if(this.Code==500){
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '未签约,请先签约',
|
||||||
|
type: 'error',
|
||||||
|
duration: '1000',
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}else{
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesB/mysigning/mysigning'
|
url: '/pagesB/mysigning/mysigning'
|
||||||
})
|
})
|
||||||
// uni.navigateTo({
|
}
|
||||||
// url: '/pagesC/Onlinesigning/Onlinesigning'
|
})
|
||||||
// })
|
}else{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
// 积分兑换
|
||||||
|
count(){
|
||||||
|
if(!this.userinfo){
|
||||||
|
this.gologin();
|
||||||
|
}else{
|
||||||
|
if(this.identity){
|
||||||
|
this.region=this.cityCode
|
||||||
|
detail(this.identity,this.region).then(res => {
|
||||||
|
this.Code=res.code
|
||||||
|
if(this.Code==500){
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '未签约,请先签约',
|
||||||
|
type: 'error',
|
||||||
|
duration: '1000',
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({
|
||||||
|
url: ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
// 健康档案
|
||||||
goHealthrecords() {
|
goHealthrecords() {
|
||||||
|
if(!this.userinfo){
|
||||||
|
this.gologin();
|
||||||
|
}else{
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesC/Healthrecords/Healthrecords'
|
url: '/pagesC/Healthrecords/Healthrecords'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 筛查记录
|
// 筛查记录
|
||||||
gorecords() {
|
gorecords() {
|
||||||
|
if(!this.userinfo){
|
||||||
|
this.gologin();
|
||||||
|
}else{
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesC/Screeningrecords/Screeningrecords'
|
url: '/pagesC/Screeningrecords/Screeningrecords'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 健康自评
|
// 健康自评
|
||||||
healthtest() {
|
healthtest() {
|
||||||
|
if(!this.userinfo){
|
||||||
|
this.gologin();
|
||||||
|
}else{
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesC/healthtest/healthtest'
|
url: '/pagesC/healthtest/healthtest'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 体征检测
|
// 体征检测
|
||||||
sign() {
|
sign() {
|
||||||
|
if(!this.userinfo){
|
||||||
|
this.gologin();
|
||||||
|
}else{
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesC/Physicalexamination/Physicalexamination'
|
url: '/pagesC/Physicalexamination/Physicalexamination'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 服务预约
|
// 服务预约
|
||||||
goappoint() {
|
goappoint() {
|
||||||
|
if(!this.userinfo){
|
||||||
|
this.gologin();
|
||||||
|
}else{
|
||||||
|
if(this.identity){
|
||||||
|
this.region=this.cityCode
|
||||||
|
detail(this.identity,this.region).then(res => {
|
||||||
|
this.Code=res.code
|
||||||
|
if(this.Code==500){
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '未签约,请先签约',
|
||||||
|
type: 'error',
|
||||||
|
duration: '1000',
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}else{
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesC/ServiceAppointment/ServiceAppointment'
|
url: '/pagesC/ServiceAppointment/ServiceAppointment'
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 服务记录
|
// 服务记录
|
||||||
servicerecord() {
|
servicerecord() {
|
||||||
|
if(!this.userinfo){
|
||||||
|
this.gologin();
|
||||||
|
}else{
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesC/servicerecord/servicerecord'
|
url: '/pagesC/servicerecord/servicerecord'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 我的预约
|
// 我的预约
|
||||||
myappointment() {
|
myappointment() {
|
||||||
|
if(!this.userinfo){
|
||||||
|
this.gologin();
|
||||||
|
}else{
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesC/Myappointment/Myappointment'
|
url: '/pagesC/Myappointment/Myappointment'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
login() {
|
// login() {
|
||||||
const _this = this
|
// const _this = this
|
||||||
uni.login({
|
// uni.login({
|
||||||
success(res) {
|
// success(res) {
|
||||||
getOpenId(res.code).then(Res => {
|
// getOpenId(res.code).then(Res => {
|
||||||
if (Res.code == 200) {
|
// if (Res.code == 200) {
|
||||||
_this.isWxBing(Res.msg, '1')
|
// _this.isWxBing(Res.msg, '1')
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
},
|
// },
|
||||||
isWxBing(openid, cityCode) {
|
|
||||||
getCurrentUser(openid, cityCode).then(res => {
|
|
||||||
console.log(res);
|
|
||||||
if (!res.data) {
|
|
||||||
// 注册
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
return {
|
return {
|
||||||
phonecode: undefined,
|
phonecode: undefined,
|
||||||
logincode: undefined,
|
logincode: undefined,
|
||||||
|
code:undefined,
|
||||||
timer: undefined,
|
timer: undefined,
|
||||||
scenenurseStationId: undefined
|
scenenurseStationId: undefined
|
||||||
};
|
};
|
||||||
@ -28,6 +29,7 @@
|
|||||||
onShow() {
|
onShow() {
|
||||||
this.phonecode = undefined
|
this.phonecode = undefined
|
||||||
this.logincode = undefined
|
this.logincode = undefined
|
||||||
|
this.code = undefined
|
||||||
this.scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
this.scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -38,16 +40,19 @@
|
|||||||
wx.login({
|
wx.login({
|
||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
success: function(loginRes) {
|
success: function(loginRes) {
|
||||||
that.logincode = loginRes.code
|
console.log(loginRes)
|
||||||
|
|
||||||
|
// uni.$emit('code',loginRes.code)
|
||||||
|
that.code = loginRes.code
|
||||||
that.pwdlogin();
|
that.pwdlogin();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
login() {
|
login() {
|
||||||
getWeChatUser(this.logincode, this.phonecode).then(res => {
|
getWeChatUser(this.code).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.setStorageSync("openid", res.data.openid)
|
uni.setStorageSync("openid", res.data)
|
||||||
uni.setStorageSync("patientId", res.data.id)
|
uni.setStorageSync("patientId", res.data.id)
|
||||||
uni.setStorageSync("phone", res.data.phone)
|
uni.setStorageSync("phone", res.data.phone)
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
@ -55,17 +60,18 @@
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
duration: '1500'
|
duration: '1500'
|
||||||
})
|
})
|
||||||
|
console.log(this.logincode)
|
||||||
this.phonecode = undefined
|
this.phonecode = undefined
|
||||||
this.logincode = undefined
|
this.logincode = undefined
|
||||||
uni.setStorageSync("Refresh", 'Refresh')
|
uni.setStorageSync("Refresh", 'Refresh')
|
||||||
if (this.timer) {
|
if (this.timer) {
|
||||||
clearTimeout(this.timer)
|
clearTimeout(this.timer)
|
||||||
}
|
}
|
||||||
this.timer = setTimeout(e => {
|
// this.timer = setTimeout(e => {
|
||||||
uni.navigateBack({
|
// uni.navigateBack({
|
||||||
delta: 1
|
// delta: 1
|
||||||
})
|
// })
|
||||||
}, 500)
|
// }, 500)
|
||||||
} else {
|
} else {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '登录失败',
|
title: '登录失败',
|
||||||
@ -78,13 +84,17 @@
|
|||||||
pwdlogin() {
|
pwdlogin() {
|
||||||
var that = this
|
var that = this
|
||||||
uni.clearStorageSync();
|
uni.clearStorageSync();
|
||||||
createMobileToken().then(res => {
|
uni.navigateTo({
|
||||||
uni.setStorageSync("token", res.data.token)
|
url:`/pages/register/register?code=${this.logincode}`
|
||||||
if (this.scenenurseStationId) {
|
|
||||||
uni.setStorageSync("scenenurseStationId", this.scenenurseStationId)
|
|
||||||
}
|
|
||||||
that.login()
|
|
||||||
})
|
})
|
||||||
|
that.login()
|
||||||
|
// createMobileToken().then(res => {
|
||||||
|
// uni.setStorageSync("token", res.data.token)
|
||||||
|
// if (this.scenenurseStationId) {
|
||||||
|
// uni.setStorageSync("scenenurseStationId", this.scenenurseStationId)
|
||||||
|
// }
|
||||||
|
// that.login()
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
}, //1.分享给朋友
|
}, //1.分享给朋友
|
||||||
onShareAppMessage(res) {
|
onShareAppMessage(res) {
|
||||||
|
|||||||
@ -1,48 +1,49 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="register">
|
<view class="register">
|
||||||
<view class="head" @tap="Face">
|
<view class="head" @tap="Face">
|
||||||
<image class="Facecollection" src="../../static/pages/Facecollection.png"></image>
|
<image class="Facecollection" :src="query.headPictureUrl" v-if="this.query.headPictureUrl"></image>
|
||||||
|
<image class="Facecollection" src="../../static/pages/Facecollection.png" v-else></image>
|
||||||
|
|
||||||
<span>人脸采集</span>
|
<span>人脸采集</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="form">
|
<view class="form">
|
||||||
<u-form :model="form" ref="uForm">
|
<u-form :model="query" ref="uForm">
|
||||||
<span>姓名</span>
|
<span>姓名</span>
|
||||||
<u-form-item prop="name" :border-bottom="false">
|
<u-form-item prop="name" :border-bottom="false">
|
||||||
<u-input v-model="form.name" placeholder="请输入姓名" />
|
<u-input v-model="query.patientName" placeholder="请输入姓名" />
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
性别
|
性别
|
||||||
<view class="sex">
|
<view class="sex">
|
||||||
<u-radio-group v-model="query.sex" size='30'>
|
<u-radio-group v-model="query.sex" size='30'>
|
||||||
<u-radio @change='sexchange' v-for="(item, index) in sexlist" :key="index" :name="item.name" active-color="#26A888"
|
<u-radio @change='sexchange' v-for="(item, index) in sexlist" :key="index" :name="item.name"
|
||||||
:disabled="item.disabled">
|
active-color="#26A888" :disabled="item.disabled">
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
出生日期
|
出生日期
|
||||||
<view class="select" @tap='timeshow=true'>
|
<view class="select" @tap='timeshow=true'>
|
||||||
<text>请选择出生日期</text>
|
<text v-if="query.birthDate==''">请选择出生日期</text>
|
||||||
|
<text v-else class="testitem">{{query.birthDate}}</text>
|
||||||
<image src="../../static/huijiantou.png" mode=""></image>
|
<image src="../../static/huijiantou.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<span>手机号</span>
|
<span>手机号</span>
|
||||||
<u-form-item prop="phone" :border-bottom="false">
|
<u-form-item prop="phone" :border-bottom="false">
|
||||||
<u-input v-model="form.phone" placeholder="请输入手机号" />
|
<u-input v-model="query.phone" placeholder="请输入手机号" />
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<span>身份证号</span>
|
<span>身份证号</span>
|
||||||
<u-form-item prop="indent" :border-bottom="false">
|
<u-form-item prop="cardNo" :border-bottom="false">
|
||||||
<u-input v-model="form.indent" placeholder="请输入身份证号" />
|
<u-input v-model="query.cardNo" placeholder="请输入身份证号" />
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
所属区域
|
所属区域
|
||||||
<view class="select">
|
<view class="select" @tap='showPicker'>
|
||||||
<text>请选择所属区域</text>
|
<text v-if="!address">请选择所属区域</text>
|
||||||
<!-- <text>{{address}}</text> -->
|
<text v-else class="testitem">{{address}}</text>
|
||||||
<!-- <image src="../../static/huijiantou.png" mode=""></image> -->
|
<!-- <image src="../../static/huijiantou.png" mode=""></image> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -60,33 +61,41 @@
|
|||||||
<view class="name">
|
<view class="name">
|
||||||
所在位置
|
所在位置
|
||||||
<view class="select" @tap='getAddress()'>
|
<view class="select" @tap='getAddress()'>
|
||||||
<text>请选择所在位置</text>
|
<text v-if="query.locationName ==''">请选择所在位置</text>
|
||||||
<!-- <text>{{query.locationName}}</text> -->
|
<text class="testitem">{{query.locationName}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<m-city style='z-index: 10076;' :provinceData="list" headTitle="地区选择" ref="cityPicker"
|
||||||
|
@funcValue="getpickerParentValue" pickerSize="4">
|
||||||
|
</m-city>
|
||||||
|
</view>
|
||||||
<view class="name">
|
<view class="name">
|
||||||
基础疾病
|
基础疾病
|
||||||
<view class="select" @tap="godisease">
|
<view class="select" @tap="godisease">
|
||||||
<text>请选择基础疾病</text>
|
<!-- <text v-if="!query.diseaseInfoList">请选择基础疾病</text> -->
|
||||||
<!-- <text v-for="(item,index) in query.diseaseInfoList">{{item.diseaseName}}</text> -->
|
<ld-select :multiple="true" :list="options" label-key="label" value-key="value"
|
||||||
<image src="../../static/huijiantou.png" mode=""></image>
|
placeholder="请选择" v-model="value2" @change="selectChange" @cancel="cancel"
|
||||||
|
@confirm="confirm"></ld-select>
|
||||||
|
<!-- <text v-else v-for="(item,index) in query.diseaseInfoList">{{item.diseaseName}}</text>
|
||||||
|
<image src="../../static/huijiantou.png" mode=""></image> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-form>
|
</u-form>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view class="radio">
|
<view class="radio">
|
||||||
<u-radio-group style="display: inline-block;position: relative;top: 5rpx;left: 26rpx;" size='20' @change="onChange" v-model="selected">
|
<u-radio-group style="display: inline-block;position: relative;top: 5rpx;left: 26rpx;" size='20'
|
||||||
<u-radio shape="circle" active-color="#26A888" name="1"/>
|
@change="onChange" v-model="selected">
|
||||||
|
<u-radio shape="circle" active-color="#26A888" name="1" />
|
||||||
<!-- <radio value="1" active-color="#26A888"></radio> -->
|
<!-- <radio value="1" active-color="#26A888"></radio> -->
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
|
|
||||||
<view class="agreement">我已阅读并同意<text @tap='maskshow=true'
|
<view class="agreement">我已阅读并同意<text @tap='maskshow=true'>《用户协议》</text>
|
||||||
>《用户协议》</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="sbumit" @tap="informationinfo">
|
<view class="sbumit" @tap="submit">
|
||||||
|
|
||||||
提交
|
提交
|
||||||
</view>
|
</view>
|
||||||
@ -130,10 +139,17 @@
|
|||||||
getSubordinateRegions,
|
getSubordinateRegions,
|
||||||
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
|
} from '@/api/pagesB/modifyAddress/modifyAddress.js';
|
||||||
import gkcity from "../../components/m-city/m-city.vue";
|
import gkcity from "../../components/m-city/m-city.vue";
|
||||||
|
import ldSelect from '../../components/ld-select/ld-select.vue';
|
||||||
|
import {
|
||||||
|
registerdata
|
||||||
|
} from '@/api/pages/register/register.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
contenttext,
|
contenttext,
|
||||||
"m-city": gkcity},
|
ldSelect,
|
||||||
|
"m-city": gkcity,
|
||||||
|
},
|
||||||
|
// components: {ldSelect},
|
||||||
onReady() {
|
onReady() {
|
||||||
this.$refs.uForm.setRules(this.rules);
|
this.$refs.uForm.setRules(this.rules);
|
||||||
},
|
},
|
||||||
@ -145,6 +161,7 @@
|
|||||||
phone: '',
|
phone: '',
|
||||||
indent: ''
|
indent: ''
|
||||||
},
|
},
|
||||||
|
value2: [],
|
||||||
timeshow: false, //出生日期
|
timeshow: false, //出生日期
|
||||||
params: {
|
params: {
|
||||||
year: true,
|
year: true,
|
||||||
@ -164,8 +181,21 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
// radio: 1,
|
// radio: 1,
|
||||||
radio:false,
|
|
||||||
selected:'',
|
selected: '',
|
||||||
|
options: [{
|
||||||
|
value: '1',
|
||||||
|
label: '高血压'
|
||||||
|
}, {
|
||||||
|
value: '2',
|
||||||
|
label: '高血糖'
|
||||||
|
}, {
|
||||||
|
value: '3',
|
||||||
|
label: '高血脂'
|
||||||
|
}, {
|
||||||
|
value: '0',
|
||||||
|
label: '无'
|
||||||
|
}],
|
||||||
|
|
||||||
// checked:false,
|
// checked:false,
|
||||||
// chooseLocation: '', //地图选址
|
// chooseLocation: '', //地图选址
|
||||||
@ -181,8 +211,10 @@
|
|||||||
medicalcarelist: [], //医疗护理数组
|
medicalcarelist: [], //医疗护理数组
|
||||||
address: '', //页面所属区域
|
address: '', //页面所属区域
|
||||||
query: { //信息请求数组
|
query: { //信息请求数组
|
||||||
|
headPictureUrl: '',
|
||||||
couponId: null,
|
couponId: null,
|
||||||
patientName: "",
|
patientName: "",
|
||||||
|
|
||||||
cardNo: "",
|
cardNo: "",
|
||||||
phone: "",
|
phone: "",
|
||||||
address: "",
|
address: "",
|
||||||
@ -191,20 +223,37 @@
|
|||||||
homeLatitude: null,
|
homeLatitude: null,
|
||||||
nurseTypeIdList: [],
|
nurseTypeIdList: [],
|
||||||
diseaseInfoList: [],
|
diseaseInfoList: [],
|
||||||
|
diseaseList: [],
|
||||||
patientId: '',
|
patientId: '',
|
||||||
locationName: '',
|
locationName: '',
|
||||||
sex: '',
|
sex: '',
|
||||||
birthDate: '',
|
birthDate: '',
|
||||||
|
cityCode: '1'
|
||||||
},
|
},
|
||||||
timer: null,
|
timer: null,
|
||||||
addresslength: null,
|
addresslength: null,
|
||||||
patientDiseaseInfoList: [], //获取个人信息
|
patientDiseaseInfoList: [], //获取个人信息
|
||||||
rules: {
|
rules: {
|
||||||
name: [{
|
patientName: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入姓名',
|
message: '请输入姓名',
|
||||||
trigger: ['change', 'blur'],
|
trigger: ['change', 'blur'],
|
||||||
}],
|
}],
|
||||||
|
sex: [{
|
||||||
|
required: true,
|
||||||
|
message: '请选择性别',
|
||||||
|
trigger: ['change', 'blur'],
|
||||||
|
}],
|
||||||
|
address: [{
|
||||||
|
required: true,
|
||||||
|
message: '请输入详细地址',
|
||||||
|
trigger: ['change', 'blur'],
|
||||||
|
}],
|
||||||
|
birthDate: [{
|
||||||
|
required: true,
|
||||||
|
message: '请选择出生日期',
|
||||||
|
trigger: ['change', 'blur'],
|
||||||
|
}],
|
||||||
phone: [{
|
phone: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入手机号',
|
message: '请输入手机号',
|
||||||
@ -216,7 +265,7 @@
|
|||||||
message: '手机号码不正确',
|
message: '手机号码不正确',
|
||||||
trigger: ['blur'],
|
trigger: ['blur'],
|
||||||
}],
|
}],
|
||||||
indent: [{
|
cardNo: [{
|
||||||
required: true,
|
required: true,
|
||||||
message: '请输入身份证号',
|
message: '请输入身份证号',
|
||||||
trigger: ['change', 'blur'],
|
trigger: ['change', 'blur'],
|
||||||
@ -230,26 +279,101 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
// onload(){
|
||||||
},
|
|
||||||
|
// },
|
||||||
|
// onUnload() {
|
||||||
|
// // 移除监听事件
|
||||||
|
// uni.$off('code');
|
||||||
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
onChange(e) {
|
onChange(e) {
|
||||||
console.log(e)
|
this.selected=e
|
||||||
|
// console.log(e)
|
||||||
// this.allChecked = !this.allChecked;
|
// this.allChecked = !this.allChecked;
|
||||||
// this.selected = e.detail.value;
|
// this.selected = e.detail.value;
|
||||||
},
|
},
|
||||||
|
// 下拉框多选
|
||||||
|
selectChange(val) {
|
||||||
|
console.log(val);
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
|
||||||
|
},
|
||||||
|
confirm(e) {
|
||||||
|
this.query.diseaseList = e.map(Number)
|
||||||
|
console.log(e)
|
||||||
|
|
||||||
|
},
|
||||||
submit() {
|
submit() {
|
||||||
uni.navigateTo({
|
console.log(this.query)
|
||||||
url:'/pagesB/information/information'
|
// this.query.openid = uni.getStorageSync('openid');
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: '/pagesB/information/information'
|
||||||
|
// })
|
||||||
|
|
||||||
|
var that = this
|
||||||
|
that.query.openid = uni.getStorageSync('openid');
|
||||||
|
if (that.query.sex == '男') {
|
||||||
|
that.query.sex = 'MALE';
|
||||||
|
} else if (that.query.sex == '女') {
|
||||||
|
that.query.sex = 'FEMALE';
|
||||||
|
}
|
||||||
|
if(that.query.sex==""){
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '请选择性别',
|
||||||
|
type: 'error'
|
||||||
})
|
})
|
||||||
|
|
||||||
// this.$refs.uForm.validate(valid => {
|
}
|
||||||
// if (valid) {
|
console.log(that.selected)
|
||||||
// console.log('验证通过');
|
|
||||||
// } else {
|
if (!that.query.locationName) {
|
||||||
// console.log('验证失败');
|
that.$refs.uToast.show({
|
||||||
// }
|
title: '请选择所在位置',
|
||||||
// });
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (!that.query.birthDate) {
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '请选择出生日期',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
that.$refs.uForm.validate(valid => {
|
||||||
|
console.log(valid)
|
||||||
|
if (valid) {
|
||||||
|
if (!that.selected) {
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '请审核并同意用户协议',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
registerdata(that.query).then(res => {
|
||||||
|
if (res.code == 500) {
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: res.msg,
|
||||||
|
type: 'error',
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.setStorageSync("userinfo", that.query)
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '注册成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: '1000',
|
||||||
|
})
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/homepage/homepage' ,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
console.log('验证失败');
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 性别
|
// 性别
|
||||||
sexchange(e) {
|
sexchange(e) {
|
||||||
@ -260,9 +384,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 人脸采集
|
// 人脸采集
|
||||||
Face(){
|
Face() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/facecollection/facecollection'
|
url: '/pages/facecollection/facecollection'
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -428,9 +552,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
godisease(item) {
|
godisease(item) {
|
||||||
uni.navigateTo({
|
// uni.navigateTo({
|
||||||
url: `/pagesB/disease/disease?diseaseInfoList=${JSON.stringify(this.query.diseaseInfoList)}`
|
// url: `/pagesB/disease/disease?diseaseInfoList=${JSON.stringify(this.query.diseaseInfoList)}`
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
changeRadio() {
|
changeRadio() {
|
||||||
if (this.radio == 1) {
|
if (this.radio == 1) {
|
||||||
@ -440,12 +564,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
tapradio() {
|
tapradio() {
|
||||||
this.radio = 2;
|
this.selected = 1;
|
||||||
this.maskshow = false;
|
this.maskshow = false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
//进入界面加载
|
//进入界面加载
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
console.log(options, '00')
|
||||||
|
this.query.headPictureUrl = options.headPictureUrl
|
||||||
let that = this
|
let that = this
|
||||||
this.query.couponId = Number(options.couponId)
|
this.query.couponId = Number(options.couponId)
|
||||||
const value = uni.getStorageSync('patientId');
|
const value = uni.getStorageSync('patientId');
|
||||||
@ -455,9 +581,18 @@
|
|||||||
this.areaInfo()
|
this.areaInfo()
|
||||||
this.getNurseTypeInfo();
|
this.getNurseTypeInfo();
|
||||||
},
|
},
|
||||||
|
// onUnload() {
|
||||||
|
// // 移除监听事件
|
||||||
|
// uni.$off('code');
|
||||||
|
// },
|
||||||
|
|
||||||
//带参返回
|
//带参返回
|
||||||
// 从地图选点插件返回后,在页面的onShow生命周期函数中能够调用插件接口,取得选点结果对象
|
// 从地图选点插件返回后,在页面的onShow生命周期函数中能够调用插件接口,取得选点结果对象
|
||||||
onShow() {
|
onShow() {
|
||||||
|
// uni.$on('headPictureUrl',(res)=>{
|
||||||
|
// console.log(res, '000') // 为 B 页面传过来的值
|
||||||
|
// // this.usnerinfo = options;
|
||||||
|
// })
|
||||||
var that = this
|
var that = this
|
||||||
const invitationPatientId = uni.getStorageSync('invitationPatientId')
|
const invitationPatientId = uni.getStorageSync('invitationPatientId')
|
||||||
if (invitationPatientId) {
|
if (invitationPatientId) {
|
||||||
@ -497,7 +632,6 @@
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@ -506,6 +640,92 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
.Agreement{
|
||||||
|
width: 100%;
|
||||||
|
background-color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
height: 1000rpx;
|
||||||
|
position: absolute;
|
||||||
|
top:5%;
|
||||||
|
font-size: 30rpx;
|
||||||
|
.title{
|
||||||
|
height: 100rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
border-bottom: 1px solid #eeeeee;
|
||||||
|
font-size: 34rpx;
|
||||||
|
margin: 0px auto;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.scroll-Y{
|
||||||
|
height:830rpx ;
|
||||||
|
overflow-y:scroll;
|
||||||
|
text-align: left;
|
||||||
|
text-indent: 2em;
|
||||||
|
}
|
||||||
|
.cancel {
|
||||||
|
height:70rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
background-color: #F4F5F7;
|
||||||
|
position: absolute;
|
||||||
|
border-top: 1rpx solid #000000;
|
||||||
|
bottom:0;
|
||||||
|
right:0;
|
||||||
|
width: 50%;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
.determine {
|
||||||
|
height:70rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
width: 50%;
|
||||||
|
color: #F4F5F7;
|
||||||
|
background: #26A888;
|
||||||
|
position: absolute;
|
||||||
|
bottom:0;
|
||||||
|
left:0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.radio-content {
|
||||||
|
margin: 50rpx auto;
|
||||||
|
width: 70%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
position: relative;
|
||||||
|
.agreement {
|
||||||
|
position: absolute;
|
||||||
|
top:50%;
|
||||||
|
left:20%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
color: #878987;
|
||||||
|
}
|
||||||
|
.radio-right {
|
||||||
|
height: 100rpx;
|
||||||
|
|
||||||
|
.radio {
|
||||||
|
display: inline-block;
|
||||||
|
width: 50rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
border-radius: 70%;
|
||||||
|
border: 2rpx solid #178ffb;
|
||||||
|
position: absolute;
|
||||||
|
top:50%;
|
||||||
|
left:5%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
.radio-active {
|
||||||
|
width: 16rpx;
|
||||||
|
height: 16rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: #178ffb;
|
||||||
|
position: absolute;
|
||||||
|
top:50%;
|
||||||
|
left:50%;
|
||||||
|
transform: translate(-50%,-50%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.head {
|
.head {
|
||||||
margin-top: 60rpx;
|
margin-top: 60rpx;
|
||||||
@ -529,7 +749,9 @@
|
|||||||
// margin: 12rpx auto;
|
// margin: 12rpx auto;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 5rpx;
|
border-radius: 5rpx;
|
||||||
.u-input__input{
|
|
||||||
|
|
||||||
|
.u-input__input {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@ -539,17 +761,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
::v-deep.input-placeholder{
|
|
||||||
|
::v-deep.input-placeholder {
|
||||||
color: #8E8E8E !important;
|
color: #8E8E8E !important;
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
|
|
||||||
font-family: Source Han Sans CN;
|
font-family: Source Han Sans CN;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
::v-deep.uni-input-placeholder{
|
|
||||||
|
::v-deep.uni-input-placeholder {
|
||||||
color: #8E8E8E !important;
|
color: #8E8E8E !important;
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
// padding: 25rpx 30rpx 0 30rpx;
|
// padding: 25rpx 30rpx 0 30rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
@ -559,7 +784,7 @@
|
|||||||
line-height: 38rpx;
|
line-height: 38rpx;
|
||||||
|
|
||||||
|
|
||||||
.sex{
|
.sex {
|
||||||
width: 630rpx;
|
width: 630rpx;
|
||||||
height: 63rpx;
|
height: 63rpx;
|
||||||
background: #F6F6F6;
|
background: #F6F6F6;
|
||||||
@ -569,7 +794,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .u-radio.data-v-643b3322{
|
::v-deep .u-radio.data-v-643b3322 {
|
||||||
margin-top: 8rpx;
|
margin-top: 8rpx;
|
||||||
margin-left: 30rpx;
|
margin-left: 30rpx;
|
||||||
|
|
||||||
@ -588,12 +813,21 @@
|
|||||||
width: 630rpx;
|
width: 630rpx;
|
||||||
height: 63rpx;
|
height: 63rpx;
|
||||||
background: #F6F6F6;
|
background: #F6F6F6;
|
||||||
margin: 12rpx 0 12rpx 0;
|
margin: 20rpx 0 20rpx 0;
|
||||||
// border: 1rpx solid #F6F6F6;
|
// border: 1rpx solid #F6F6F6;
|
||||||
border-radius: 5rpx;
|
border-radius: 5rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
.testitem {
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #000000;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
text {
|
text {
|
||||||
padding-left: 20rpx;
|
padding-left: 20rpx;
|
||||||
line-height: 63rpx;
|
line-height: 63rpx;
|
||||||
@ -633,10 +867,12 @@
|
|||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.bottom{
|
|
||||||
|
.bottom {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.radio{
|
|
||||||
|
.radio {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 44%;
|
width: 44%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
@ -645,7 +881,7 @@
|
|||||||
bottom: 20rpx;
|
bottom: 20rpx;
|
||||||
|
|
||||||
|
|
||||||
.agreement{
|
.agreement {
|
||||||
// width: 225rpx;
|
// width: 225rpx;
|
||||||
// height: 17rpx;
|
// height: 17rpx;
|
||||||
font-size: 18rpx;
|
font-size: 18rpx;
|
||||||
@ -656,7 +892,8 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sbumit{
|
|
||||||
|
.sbumit {
|
||||||
width: 496rpx;
|
width: 496rpx;
|
||||||
height: 61rpx;
|
height: 61rpx;
|
||||||
line-height: 61rpx;
|
line-height: 61rpx;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user