This commit is contained in:
曹辉 2023-03-20 14:49:18 +08:00
parent 7502510e76
commit bace4ce70c
47 changed files with 4248 additions and 1462 deletions

View File

@ -1,37 +1,37 @@
{
"version" : "1",
"prompt" : "template",
"title" : "服务协议和隐私政策",
"message" : "请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"\">《服务协议》</a>和<a href=\"\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意",
"hrefLoader" : "system|default",
"second" : {
"title" : "确认提示",
"message" : "进入应用前,你需先同意<a href=\"\">《服务协议》</a>和<a href=\"\">《隐私政策》</a>,否则将退出应用。",
"buttonAccept" : "同意并继续",
"buttonRefuse" : "退出应用"
},
"disagreeMode" : {
"support" : false,
"loadNativePlugins" : false,
"visitorEntry" : true,
"showAlways" : true
},
"styles" : {
"backgroundColor" : "#ffffff",
"borderRadius" : "5px",
"title" : {
"color" : "#ff00ff"
},
"buttonAccept" : {
"color" : "#ffff00"
},
"buttonRefuse" : {
"color" : "#00ffff"
},
"buttonVisitor" : {
"color" : "#00ffff"
}
}
"version": "1",
"prompt": "template",
"title": "用户协议与隐私政策",
"message": "请你务必审慎阅读、充分理解“用户协议与隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://app.xinelu.cn/privacypolicy/content.html\">《用户协议与隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept": "同意并接受",
"buttonRefuse": "暂不同意",
"hrefLoader": "system|default",
"second": {
"title": "确认提示",
"message": "进入应用前,你需先同意<a href=\"https://app.xinelu.cn/privacypolicy/content.html\">《用户协议与隐私政策》</a>,否则将退出应用。",
"buttonAccept": "同意并继续",
"buttonRefuse": "退出应用"
},
"disagreeMode": {
"support": false,
"loadNativePlugins": false,
"visitorEntry": false,
"showAlways": false
},
"styles": {
"backgroundColor": "#ffffff",
"borderRadius": "5px",
"title": {
"color": "#000000"
},
"buttonAccept": {
"color": "#000000"
},
"buttonRefuse": {
"color": "#000000"
},
"buttonVisitor": {
"color": "#000000"
}
}
}

View File

@ -0,0 +1,20 @@
import request from "../request.js"
//咨询预约时间
export function informationConfirmation(patientId) {
return request({
url: `/nurseApp/healthConsultation/informationConfirmation?patientId=${patientId}`,
method: 'GET'
})
}
//提交
export function addHealthConsultationOrder(data) {
return request({
url: `/nurseApp/healthConsultation/addHealthConsultationOrder`,
method: 'POST',
data
})
}

9
api/coupon/index.js Normal file
View File

@ -0,0 +1,9 @@
import request from "../request.js"
export function selectCoupon(pageNum, pageSize, patientId, couponstatus) {
return request({
url: `/nurseApplet/patientInfo/selectCoupon?pageNum=${pageNum}&pageSize=${pageSize}&patientId=${patientId}&useStatus=${couponstatus}`,
method: 'get',
})
}

35
api/integral/index.js Normal file
View File

@ -0,0 +1,35 @@
import request from "../request.js"
//签到
export function signIn(patientId) {
return request({
url: `/nurseApplet/patientInfo/signIn?patientId=${patientId}&signInChannel=WECHAT_APPLET`,
method: 'post'
})
}
//积分
export function selectPatientSignIn(patientId) {
return request({
url: `/nurseApplet/patientInfo/selectPatientSignIn?patientId=${patientId}`,
method: 'get'
})
}
//可兑换商品
export function selectExchangeGoods(pageNum, pageSize) {
return request({
url: `/nurseApplet/patientInfo/selectExchangeGoods?pageNum=${pageNum}&pageSize=${pageSize}`,
method: 'get'
})
}
//兑换
export function integralGoodsOrder(data) {
return request({
url: `/nurseApplet/patientInfo/integralGoodsOrder`,
method: 'post',
data
})
}

View File

@ -0,0 +1,18 @@
import request from "../request.js"
//新人优惠券
export function couponByUseStatus(pageNum, pageSize, patientId) {
return request({
url: `/nurseApplet/patientInfo/couponByUseStatus?pageNum=${pageNum}&pageSize=${pageSize}&patientId=${patientId}`,
method: 'get'
})
}
//领取
export function insertCouponReceive(patientId, couponId) {
return request({
url: `/nurseApplet/patientInfo/insertCouponReceive?patientId=${patientId}&couponId=${couponId}`,
method: 'post'
})
}

17
api/medicine/index.js Normal file
View File

@ -0,0 +1,17 @@
import request from "../request.js"
//健康咨询
export function selectDepartment(pageNum,pageSize) {
return request({
url: `/nurseApp/healthConsultation/selectDepartment?pageNum=${pageNum}&pageSize=${pageSize}`,
method: 'GET'
})
}
//人员
export function selectHospitalPerson(pageNum,pageSize,departmentId) {
return request({
url: `/nurseApp/healthConsultation/selectHospitalPerson?pageNum=${pageNum}&pageSize=${pageSize}&departmentId=${departmentId}`,
method: 'GET'
})
}

View File

@ -0,0 +1,735 @@
export default{
data(){
return{
system_info:{}, //system info
canvas_width:0, //canvas width px
canvas_height:0, //canvas height px
ctx:null, //canvas object
canvas_id:null, //canvas id
hidden:false,//Whether to hide canvas
scale:1,//canvas scale
r_canvas_scale:1,
if_ctx:true
}
},
methods:{
/**
* save r-canvas.vue object
* @param {Object} that
*/
// saveThis(that){
// rCanvasThis = that
// },
/**
* Draw round rect text
* @param {Object} config
* @param {Number} config.x x坐标
* @param {Number} config.y y坐标
* @param {Number} config.w 宽度
* @param {Number} config.h 高度
* @param {Number} config.radius 圆角弧度
* @param {String} config.fill_color 矩形颜色
*/
fillRoundRect(config) {
return new Promise((resolve,reject)=>{
let x = this.compatibilitySize(parseFloat(config.x)*this.scale)
let y = this.compatibilitySize(parseFloat(config.y)*this.scale)
let w = this.compatibilitySize(parseFloat(config.w)*this.scale)
let h = this.compatibilitySize(parseFloat(config.h)*this.scale)
let radius = config.radius?parseFloat(config.radius)*this.scale:10*this.scale
let fill_color = config.fill_color || "black"
// The diameter of the circle must be less than the width and height of the rectangle
if (2 * radius > w || 2 * radius > h) {
reject("The diameter of the circle must be less than the width and height of the rectangle")
return false;
}
this.ctx.save();
this.ctx.translate(x, y);
//
this.drawRoundRectPath({
w: w,
h: h,
radius: radius
});
this.ctx.fillStyle = fill_color
this.ctx.fill();
this.ctx.restore();
resolve()
})
},
/**
* Draws the sides of a rounded rectangle
* @param {Object} config
* @param {Number} config.w 宽度
* @param {Number} config.h 高度
* @param {Number} config.radius 圆角弧度
*/
drawRoundRectPath(config) {
this.ctx.beginPath(0);
this.ctx.arc(config.w - config.radius, config.h - config.radius, config.radius, 0, Math.PI / 2);
this.ctx.lineTo(config.radius, config.h);
this.ctx.arc(config.radius, config.h - config.radius, config.radius, Math.PI / 2, Math.PI);
this.ctx.lineTo(0, config.radius);
this.ctx.arc(config.radius, config.radius, config.radius, Math.PI, Math.PI * 3 / 2);
this.ctx.lineTo(config.w - config.radius, 0);
this.ctx.arc(config.w - config.radius, config.radius, config.radius, Math.PI * 3 / 2, Math.PI * 2);
this.ctx.lineTo(config.w, config.h - config.radius);
this.ctx.closePath();
},
/**
* Draw special Text,line wrapping is not supported
* @param {Object} config
* @param {String} config.text 文字
* @param {Number} config.x x坐标
* @param {Number} config.y y坐标
* @param {String} config.font_color 文字颜色
* @param {String} config.font_family 文字字体
* @param {Number} config.font_size 文字大小px
*/
drawSpecialText(params){
let general = params.general
let list = params.list
return new Promise(async (resolve,reject)=>{
if(!general){
reject("general cannot be empty:101")
return;
}else if(list && list.length>0){
for(let i in list){
if(i != 0){
let font_size = list[i-1].font_size?parseFloat(list[i-1].font_size):20
this.ctx.setFontSize(font_size)
general.x = parseFloat(general.x) + this.ctx.measureText(list[i-1].text).width
}
list[i].x = general.x
list[i].y = general.y + (list[i].margin_top?parseFloat(list[i].margin_top):0)
await this.drawText(list[i])
}
resolve()
}else{
reject("The length of config arr is less than 0")
return;
}
})
},
/**
* array delete empty
* @param {Object} arr
*/
arrDeleteEmpty(arr){
let newArr = []
for(let i in arr){
if(arr[i]){
newArr.push(arr[i])
}
}
return newArr
},
/**
* Draw Text,support line
* @param {Object} config
* @param {String} config.text 文字
* @param {Number} config.max_width 文字最大宽度大于宽度自动换行
* @param {Number} config.line_height 文字上下行间距
* @param {Number} config.x x坐标
* @param {Number} config.y y坐标
* @param {String} config.font_color 文字颜色
* @param {String} config.font_family 文字字体 默认值Arial
* @param {String} config.text_align 文字对齐方式left/center/right
* @param {Number} config.font_size 文字大小px
* @param {Boolean} config.line_through_height 中划线大小
* @param {Boolean} config.line_through_color 中划线颜色
* @param {String} config.font_style 规定文字样式
* @param {String} config.font_variant 规定字体变体
* @param {String} config.font_weight 规定字体粗细
* @param {String} config.line_through_cap 线末端类型
* @param {String} config.line_clamp 最大行数
* @param {String} config.line_clamp_hint 超过line_clamp后尾部显示的自定义标识 ...
* @param {String} config.is_line_break 是否开启换行符换行
*
*/
drawText(config,configuration = {}){
configuration['line_num'] = configuration.line_num?configuration.line_num:0
configuration['text_width'] = configuration.text_width?configuration.text_width:0
return new Promise(async (resolve,reject)=>{
if(config.text){
let draw_width = 0,draw_height = 0,draw_x = config.x,draw_y = config.y
let font_size = config.font_size?(parseFloat(config.font_size)*this.scale):(20*this.scale)
let font_color = config.font_color || "#000"
let font_family = config.font_family || "Arial"
let line_height = config.line_height || config.font_size || 20
let text_align = config.text_align || "left"
let font_weight = config.font_weight || "normal"
let font_variant = config.font_variant || "normal"
let font_style = config.font_style || "normal"
let line_clamp_hint = config.line_clamp_hint || '...'
let lineBreakJoinText = ""
let max_width = config.max_width?parseFloat(config.max_width)*this.scale:0
// checkout is line break
if(config.is_line_break){
let splitTextArr = config.text.split(/[\n]/g)
if(splitTextArr && splitTextArr.length > 0){
let newSplitTextArr = this.arrDeleteEmpty(splitTextArr)
if(newSplitTextArr && newSplitTextArr.length > 0){
lineBreakJoinText = newSplitTextArr.slice(1).join("\n")
config.text = newSplitTextArr[0]
}else{
reject("Text cannot be empty:103")
return
}
}else{
reject("Text cannot be empty:102")
return
}
}
this.ctx.setFillStyle(font_color) // color
this.ctx.textAlign = text_align;
this.ctx.font = `${font_style} ${font_variant} ${font_weight} ${parseInt(font_size)}px ${font_family}`
if(configuration.text_width >= this.ctx.measureText(config.text).width){
draw_width = configuration.text_width
}else if(max_width > 0){
draw_width = max_width < this.ctx.measureText(config.text).width ? this.resetCompatibilitySize(max_width) : this.resetCompatibilitySize(this.ctx.measureText(config.text).width)
}else{
draw_width = this.ctx.measureText(config.text).width
}
configuration.text_width = draw_width / this.scale
if( max_width && this.compatibilitySize(this.ctx.measureText(config.text).width) > this.compatibilitySize(max_width)){
let current_text = ""
let text_arr = config.text.split("")
for(let i in text_arr){
if( this.compatibilitySize(this.ctx.measureText(current_text+text_arr[i]).width) > this.compatibilitySize(max_width) ){
// Hyphenation that is greater than the drawable width continues to draw
if(config.line_clamp && parseInt(config.line_clamp) == 1){
// Subtracting the current_text tail width from the line_clamp_hint width
let current_text_arr = current_text.split('')
let json_current_text = ''
while(true){
current_text_arr = current_text_arr.slice(1)
json_current_text = current_text_arr.join('')
if(this.compatibilitySize(this.ctx.measureText(json_current_text).width) <= this.compatibilitySize(this.ctx.measureText(line_clamp_hint).width)){
current_text = current_text.replace(json_current_text,'')
break;
}
}
configuration.line_num += 1
this.ctx.setFontSize(parseInt(this.compatibilitySize(font_size))) // font size
this.ctx.fillText(current_text + line_clamp_hint, this.compatibilitySize(parseFloat(config.x)*this.scale), this.compatibilitySize(parseFloat(config.y)*this.scale));
}else{
configuration.line_num += 1
this.ctx.setFontSize(parseInt(this.compatibilitySize(font_size))) // font size
this.ctx.fillText(current_text, this.compatibilitySize(parseFloat(config.x)*this.scale), this.compatibilitySize(parseFloat(config.y)*this.scale));
config.text = text_arr.slice(i).join("")
config.y = config.y + line_height
if(config.line_clamp){
config.line_clamp = parseInt(config.line_clamp) - 1
}
await this.drawText(config,configuration)
}
break;
}else{
current_text = current_text+text_arr[i]
}
}
}else{
if(config.line_through_height){
let x = parseFloat(config.x)*this.scale
let w
let y = parseFloat(config.y)*this.scale - (font_size / 2.6)
if(text_align == "left"){
w = this.ctx.measureText(config.text).width/1.1 + parseFloat(config.x)*this.scale
}else if(text_align == "right"){
w = parseFloat(config.x)*this.scale - this.ctx.measureText(config.text).width/1.1
}else if(text_align == "center"){
x = parseFloat(config.x)*this.scale - this.ctx.measureText(config.text).width / 1.1 / 2
w = parseFloat(config.x)*this.scale + this.ctx.measureText(config.text).width / 1.1 / 2
}
this.drawLineTo({
x:x,
y:y,
w:w,
h:y,
line_width:config.line_through_height,
line_color:config.line_through_color,
line_cap:config.line_through_cap
})
}
configuration.line_num += 1
this.ctx.setFontSize(parseInt(this.compatibilitySize(font_size))) // font size
this.ctx.fillText(config.text, this.compatibilitySize(parseFloat(config.x)*this.scale), this.compatibilitySize(parseFloat(config.y)*this.scale));
if(config.line_clamp){
config.line_clamp = parseInt(config.line_clamp) - 1
}
}
if(lineBreakJoinText){
await this.drawText({...config,text:lineBreakJoinText,y:config.y + line_height},configuration)
}
draw_height = config.font_size * configuration.line_num
draw_width = configuration.text_width
resolve({draw_width,draw_height,draw_x,draw_y})
}else{
reject("Text cannot be empty:101")
}
})
},
/**
* Draw Line
* @param {Object} config
* @param {Object} config.x x坐标
* @param {Object} config.y y坐标
* @param {Object} config.w 线的宽度
* @param {Object} config.h 线的高度
* @param {Object} config.line_width 线的宽度
* @param {Object} config.line_color 线条颜色
*/
drawLineTo(config){
let x = this.compatibilitySize(config.x)
let y = this.compatibilitySize(config.y)
let w = this.compatibilitySize(config.w)
let h = this.compatibilitySize(config.h)
let line_width = config.line_width?parseFloat(config.line_width)*this.scale:1*this.scale
let line_color = config.line_color || "black"
let line_cap = config.line_cap || "butt"
this.ctx.beginPath()
this.ctx.lineCap = line_cap
this.ctx.lineWidth = line_width
this.ctx.strokeStyle = line_color
this.ctx.moveTo(x,y)
this.ctx.lineTo(w,h)
this.ctx.stroke()
},
/**
* Compatibility px
* @param {Object} size
*/
compatibilitySize(size) {
let canvasSize = (parseFloat(size) / 750) * this.system_info.windowWidth
canvasSize = parseFloat(canvasSize * 2)
return canvasSize
},
/**
* Restore compatibility px
* @param {Object} size
*/
resetCompatibilitySize(size) {
let canvasSize = (parseFloat(size/2)/this.system_info.windowWidth) * 750
return canvasSize
},
/**
* Init canvas
*/
init(config){
return new Promise(async (resolve,reject)=>{
if(!config.canvas_id){
reject("Canvas ID cannot be empty, please refer to the usage example")
return;
}
this.hidden = config.hidden
this.canvas_id = config.canvas_id
let system_info = await uni.getSystemInfoSync()
this.system_info = system_info
this.scale = config.scale&&parseFloat(config.scale)>0?parseInt(config.scale):1
this.canvas_width = (config.canvas_width ? this.compatibilitySize(config.canvas_width) : system_info.windowWidth) * this.scale
this.canvas_height = (config.canvas_height ? this.compatibilitySize(config.canvas_height) : system_info.windowHeight) * this.scale,
this.r_canvas_scale = 1/this.scale
this.ctx = uni.createCanvasContext(this.canvas_id,this)
this.setCanvasConfig({
global_alpha:config.global_alpha?parseFloat(config.global_alpha):1,
backgroundColor:config.background_color?config.background_color:"#fff"
})
resolve()
})
},
/**
* clear canvas all path
*/
clearCanvas(){
return new Promise(async (resolve,reject)=>{
if(!this.ctx){
reject("canvas is not initialized:101")
return
}else{
this.ctx.clearRect(0,0,parseFloat(this.canvas_width)*this.scale,parseFloat(this.canvas_height)*this.scale)
await this.draw()
resolve()
}
})
},
/**
* Set canvas config
* @param {Object} config
*/
setCanvasConfig(config){
this.ctx.globalAlpha = config.global_alpha
this.ctx.fillStyle = config.backgroundColor
this.ctx.fillRect(0, 0, parseFloat(this.canvas_width)*this.scale, parseFloat(this.canvas_height)*this.scale)
},
/**
* set canvas width
* @param {Object} width
*/
setCanvasWidth(width){
if(!width){
uni.showToast({
title:'setCanvasWidthwidth error',
icon:'none'
})
}
this.canvas_width = this.compatibilitySize(parseFloat(width)) * this.scale
this.ctx.width = this.canvas_width
},
/**
* set canvas height
* @param {Object} height
*/
setCanvasHeight(height){
if(!height){
uni.showToast({
title:'setCanvasWidthheight error',
icon:'none'
})
}
this.canvas_height = this.compatibilitySize(parseFloat(height)) * this.scale
this.ctx.height = this.canvas_height
},
/**
* Draw to filepath
*/
draw(callback){
return new Promise((resolve,reject)=>{
let stop = setTimeout(()=>{
this.ctx.draw(false,setTimeout(()=>{
uni.canvasToTempFilePath({
canvasId: this.canvas_id,
quality: 1,
success: (res)=>{
console.log('res',res)
resolve(res)
callback && callback(res)
},
fail:(err)=>{
reject(JSON.stringify(err)|| "Failed to generate poster:101")
}
},this)
},300))
clearTimeout(stop)
},300)
})
},
/**
* draw rect
* @param {Number} config.x x坐标
* @param {Number} config.y y坐标
* @param {Number} config.w 图形宽度(px)
* @param {Number} config.h 图形高度(px)
* @param {Number} config.color 图形颜色
* @param {Number} config.is_radius 是否开启圆图1.1.6及以下版本废弃请使用border_radius
* @param {Number} config.border_width 边框大小
* @param {Number} config.border_color 边框颜色
*
*/
drawRect(config){
return new Promise(async (resolve,reject)=>{
if(!config.border_width || config.border_width <=0){
config.border_width = 0
}else{
config.border_width = parseFloat(config.border_width)
}
if(parseFloat(config.border_width) > 0){
let sub_config = JSON.parse(JSON.stringify(config))
sub_config.border_width = 0
sub_config.w = config.w + config.border_width
sub_config.h = config.h + config.border_width
sub_config.color = config.border_color || 'black'
if(sub_config.border_radius){
sub_config.border_radius = parseFloat(sub_config.border_radius) + parseFloat(config.border_width) / 2
}
await this.drawRect(sub_config)
}
let color = config.color || 'white'
config.x = (parseFloat(config.x) + config.border_width / 2)
config.y = (parseFloat(config.y) + config.border_width / 2)
config['color'] = color
this.ctx.fillStyle = color;
if(config.is_radius || config.border_radius){
this.setNativeBorderRadius(config)
this.ctx.fill()
}else{
console.log('config.border_width',config.border_width)
this.ctx.fillRect(this.compatibilitySize(config.x*this.scale),this.compatibilitySize(config.y*this.scale),this.compatibilitySize(parseFloat(config.w)*this.scale),this.compatibilitySize(parseFloat(config.h)*this.scale))
}
resolve()
})
},
/**
* Draw image
* @param {Object} config
* @param {String} config.url 图片链接
* @param {Number} config.x x坐标
* @param {Number} config.y y坐标
* @param {Number} config.w 图片宽度(px)
* @param {Number} config.h 图片高度(px)
* @param {Number} config.border_width 边大小
* @param {Number} config.border_color 边颜色
* @param {Number} config.is_radius 是否开启圆图1.1.6及以下版本废弃请使用border_radius
* @param {Number} config.border_radius 圆角弧度
*/
drawImage(config){
return new Promise(async (resolve,reject)=>{
if(config.url){
let type = 0 // 1、network image 2、native image 3、base64 image
let image_url
let reg = /^https?/ig;
if(reg.test(config.url)){
type = 1
}else{
if((config.url.indexOf("data:image/png;base64") != -1) || config.url.indexOf("data:image/jpeg;base64") != -1 || config.url.indexOf("data:image/gif;base64") != -1){
type = 3
}else{
type = 2
}
}
if(type == 1){
// network image
await this.downLoadNetworkFile(config.url).then(res=>{ // two function
image_url = res
}).catch(err=>{
reject(err)
return;
})
}else if(type == 2){
// native image
const imageInfoResult = await uni.getImageInfo({
src: config.url
});
try{
if(imageInfoResult.length <= 1){
reject(imageInfoResult[0].errMsg + ':404')
return
}
}catch(e){
reject(e+':500')
return
}
let base64 = await this.urlToBase64({url:imageInfoResult[1].path})
// #ifdef MP-WEIXIN
await this.base64ToNative({url:base64}).then(res=>{
image_url = res
}).catch(err=>{
reject(JSON.stringify(err)+":501")
return;
})
// #endif
// #ifndef MP-WEIXIN
image_url = base64
// #endif
}else if(type == 3){
// #ifdef MP-WEIXIN
await this.base64ToNative({url:config.url}).then(res=>{
image_url = res
}).catch(err=>{
reject(JSON.stringify(err)+":500")
return;
})
// #endif
// #ifndef MP-WEIXIN
image_url = config.url
// #endif
}else{
reject("Other Type Errors:101")
return
}
if(config.border_width){
let border_radius = 0
if(config.border_radius){
let multiple = config.w / config.border_radius
border_radius = (parseFloat(config.w) + parseFloat(config.border_width)) / multiple
}
// drawRect
await this.drawRect({
x:parseFloat(config.x) - parseFloat(config.border_width)/2,
y:parseFloat(config.y) - parseFloat(config.border_width)/2,
w:parseFloat(config.w) + parseFloat(config.border_width),
h:parseFloat(config.h) + parseFloat(config.border_width),
color:config.border_color,
border_radius:border_radius,
border_width:config.border_width,
is_radius:config.is_radius
})
}
if(config.border_radius){
config.color = config.color?config.color:'rgba(0,0,0,0)'
// 圆角有白边,+0.5的误差
config.w = config.w + 0.3
config.h = config.h + 0.3
this.setNativeBorderRadius(config)
}else if(config.is_radius){
//已废弃 is_radius
this.ctx.setStrokeStyle("rgba(0,0,0,0)")
this.ctx.save()
this.ctx.beginPath()
this.ctx.arc(this.compatibilitySize(parseFloat(config.x)*this.scale+parseFloat(config.w)*this.scale/2), this.compatibilitySize(parseFloat(config.y)*this.scale+parseFloat(config.h)*this.scale/2), this.compatibilitySize(parseFloat(config.w)*this.scale/2), 0, 2 * Math.PI, false)
this.ctx.stroke();
this.ctx.clip()
}
await this.ctx.drawImage(image_url,this.compatibilitySize(parseFloat(config.x)*this.scale),this.compatibilitySize(parseFloat(config.y)*this.scale),this.compatibilitySize(parseFloat(config.w)*this.scale),this.compatibilitySize(parseFloat(config.h)*this.scale))
this.ctx.restore() //Restore previously saved drawing context
resolve()
}else{
let err_msg = "Links cannot be empty:101"
reject(err_msg)
}
})
},
/**
* base64 to native available path
* @param {Object} config
*/
base64ToNative(config){
return new Promise((resolve,reject)=>{
let fileName = new Date().getTime()
var filePath = `${wx.env.USER_DATA_PATH}/${fileName}_rCanvas.png`
wx.getFileSystemManager().writeFile({
filePath: filePath,
data: config.url.replace(/^data:\S+\/\S+;base64,/, ''),
encoding: 'base64',
success: function() {
resolve(filePath)
},
fail: function(error) {
reject(error)
}
})
})
},
/**
* native url to base64
* @param {Object} config
*/
urlToBase64(config){
return new Promise(async (resolve,reject)=>{
if (typeof window != 'undefined') {
await this.downLoadNetworkFile(config.url).then(res=>{ // two function
resolve(res)
}).catch(err=>{
reject(err)
})
}else if (typeof plus != 'undefined') {
plus.io.resolveLocalFileSystemURL(config.url,(obj)=>{
obj.file((file)=>{
let fileReader = new plus.io.FileReader()
fileReader.onload = (res)=>{
resolve(res.target.result)
}
fileReader.onerror = (err)=>{
reject(err)
}
fileReader.readAsDataURL(file)
}, (err)=>{
reject(err)
})
},(err)=>{
reject(err)
})
}else if(typeof wx != 'undefined'){
wx.getFileSystemManager().readFile({
filePath: config.url,
encoding: 'base64',
success: function(res) {
resolve('data:image/png;base64,' + res.data)
},
fail: function(error) {
reject(error)
}
})
}
})
},
setNativeBorderRadius(config){
let border_radius = config.border_radius?(parseFloat(config.border_radius)*this.scale):(20*this.scale)
if ((parseFloat(config.w)*this.scale) < 2 * border_radius) border_radius = (parseFloat(config.w)*this.scale) / 2;
if ((parseFloat(config.h)*this.scale) < 2 * border_radius) border_radius = (parseFloat(config.h)*this.scale) / 2;
this.ctx.beginPath();
this.ctx.moveTo(this.compatibilitySize((parseFloat(config.x)*this.scale) + border_radius), this.compatibilitySize((parseFloat(config.y)*this.scale)));
this.ctx.arcTo(this.compatibilitySize((parseFloat(config.x)*this.scale) + (parseFloat(config.w)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale)), this.compatibilitySize((parseFloat(config.x)*this.scale) + (parseFloat(config.w)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale) + (parseFloat(config.h)*this.scale)), this.compatibilitySize(border_radius));
this.ctx.arcTo(this.compatibilitySize((parseFloat(config.x)*this.scale) + (parseFloat(config.w)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale) + (parseFloat(config.h)*this.scale)), this.compatibilitySize((parseFloat(config.x)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale) + (parseFloat(config.h)*this.scale)), this.compatibilitySize(border_radius));
this.ctx.arcTo((this.compatibilitySize(parseFloat(config.x)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale) + (parseFloat(config.h)*this.scale)), this.compatibilitySize((parseFloat(config.x)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale)), this.compatibilitySize(border_radius));
this.ctx.arcTo(this.compatibilitySize((parseFloat(config.x)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale)), this.compatibilitySize((parseFloat(config.x)*this.scale) + (parseFloat(config.w)*this.scale)), this.compatibilitySize((parseFloat(config.y)*this.scale)), this.compatibilitySize(border_radius));
this.ctx.closePath();
this.ctx.strokeStyle = config.color || config.border_color || 'rgba(0,0,0,0)'; // 设置绘制边框的颜色
this.ctx.stroke();
this.ctx.save()
this.ctx.clip();
},
/**
* Download network file
* @param {Object} url : download url
*/
downLoadNetworkFile(url){
return new Promise((resolve,reject)=>{
uni.downloadFile({
url,
success:(res)=>{
if(res.statusCode == 200){
resolve(res.tempFilePath)
}else{
reject("Download Image Fail:102")
}
},
fail:(err)=>{
reject("Download Image Fail:101")
}
})
})
},
/**
* Save image to natice
* @param {Object} filePath native imageUrl
*/
saveImage(filePath){
return new Promise((resolve,reject)=>{
if(!filePath){
reject("FilePath cannot be null:101")
return;
}
// #ifdef H5
var createA = document.createElement("a");
createA.download = filePath;
createA.href = filePath;
document.body.appendChild(createA);
createA.click();
createA.remove();
resolve()
// #endif
// #ifndef H5
uni.saveImageToPhotosAlbum({
filePath: filePath,
success:(res)=>{
resolve(res)
},
fail:(err)=>{
reject(err)
}
})
// #endif
})
}
}
}

View File

@ -0,0 +1,26 @@
<template>
<view>
<view class="r-canvas-component" :style="{width:canvas_width/scale+'px',height:canvas_height/scale+'px'}" :class="{'hidden':hidden}">
<canvas class="r-canvas" v-if="canvas_id" :canvas-id="canvas_id" :id="canvas_id" :style="{width:canvas_width+'px',height:canvas_height+'px','transform': `scale(${r_canvas_scale})`}"></canvas>
</view>
</view>
</template>
<script>
import rCanvasJS from "./r-canvas.js"
export default {
mixins:[rCanvasJS]
}
</script>
<style>
.r-canvas{
transform-origin: 0 0;
}
.r-canvas-component{
overflow: hidden;
}
.r-canvas-component.hidden{
position: fixed;
top:-5000upx;
}
</style>

View File

@ -1,19 +1,16 @@
{
"dependencies": {
"uview-ui": "^1.8.4"
},
"name": "nursestationapp",
"version": "1.0.0",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "http://192.168.16.64:3000/jihan/NurseStationApp.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": ""
"dependencies": {
"uview-ui": "^1.8.4"
},
"id": "r-canvas",
"name": "海报生成随心所欲绘制样式原生canvas方法的二次封装自定义函数持续更新",
"version": "1.3.1",
"description": "图片不失帧保留原有画质canvas方法扩展暴露原生实例可自行扩展最好用的canvas插件",
"keywords": [
"canvas",
"画布生成图片",
"绘制图片",
"商品海报",
"朋友圈海报"
]
}

View File

@ -9,7 +9,30 @@
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},{
}, {
"path": "pages/confirmation/confirmation",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarTitleText": "预约时间"
}
}, {
"path": "pages/integral/integral",
"style": {
"navigationBarTitleText": "积分",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/coupon/coupon",
"style": {
"navigationBarTitleText": "优惠券",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff",
"onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
}
}, {
"path": "pages/forgotPassword/forgotPassword",
"style": {
"navigationBarTitleText": "忘记密码",
@ -101,7 +124,6 @@
"navigationBarTitleText": "医路优品",
"navigationBarBackgroundColor": "#ffffff",
"onReachBottomDistance": 40, // px
"navigationStyle": "custom",
"enablePullDownRefresh": true //true
}
}, {
@ -296,7 +318,8 @@
"style": {
"navigationBarTitleText": "健康咨询",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
"navigationBarBackgroundColor": "#ffffff",
"disableScroll": true
}
},
{
@ -377,12 +400,6 @@
"selectedIconPath": "static/homepagews.png",
"text": "首页"
},
{
"pagePath": "pages/shopping/shopping",
"iconPath": "static/shoping.png",
"selectedIconPath": "static/shopingw.png",
"text": "商城"
},
{
"pagePath": "pages/Personal/Personal",
"iconPath": "static/userw.png",

View File

@ -4,18 +4,6 @@
padding: 3%;
.noorder{
margin-top: 20%;
image{
display: block;
margin: 0 auto;
width: 200rpx;
height: 240rpx;
}
view{
margin-top: 100rpx;
text-align: center;
font-size: 36rpx;
color: #BFBFBF;
}
}
.submits {
width: 501rpx;

View File

@ -24,56 +24,74 @@
<image :src="baseurl+item.attributePitureUrl" mode=""></image>
<view class="model">
<view class="top">
<span>{{item.goodsName}}</span>
<span>{{item.goodsPrice}}</span>
<span v-if="item.orderType =='HEALTH_CONSULTATION'">健康咨询</span>
<span v-else>{{item.goodsName}}</span>
<!-- <span v-if="item.orderType =='HEALTH_CONSULTATION'">{{item.totalPrice}}</span> -->
<span
v-if="item.goodsPrice&&item.orderType !='HEALTH_CONSULTATION'">{{item.goodsPrice}}</span>
</view>
<view class="bottom">
<view class="bottom" v-if="item.orderType !='HEALTH_CONSULTATION'">
<span class="box">型号{{item.goodsAttributeName}}</span>
<span class="box">×{{item.goodsCount}}</span>
</view>
<view class="refund">
实付款
<text class="price">{{item.totalPrice}}</text>
<span>
实付款
</span>
<text class="price"
v-if="item.orderType=='DIRECT_BUY'||item.orderType =='HEALTH_CONSULTATION'">{{item.totalPrice}}</text>
<text class="price"
v-if="item.orderType=='INTEGRAL_EXCHANGE'">{{item.integralExchangeSill}}</text>
<text class="price" v-if="item.orderType=='INTEGRAL_EXCHANGE'"
style='padding-left: 10rpx;'>
积分
</text>
</view>
</view>
</view>
</view>
<view class="anniu">
<view class="logistics" v-if="item.orderStatus=='WAIT_REFUND'" style="background-color: coral;">退款中
<view class="logistics" v-if="item.orderStatus=='WAIT_REFUND'" style="background-color: coral;"
@tap='goorderdetails(item)'>退款中
</view>
<view class="logistics" v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'" @tap='gologistics(item)'>查看物流
<view class="logistics"
v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'&&item.orderType !='HEALTH_CONSULTATION'"
@tap='gologistics(item)'>查看物流
</view>
<view class="logistics harvest" v-if="item.orderStatus=='WAIT_PAY'"
@tap='buy(item)'>
<view class="logistics harvest" @tap='buy(item)' v-if="item.orderStatus=='WAIT_PAY'">
去支付</view>
<view class="logistics harvest" @tap='Receipt(item)' v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'">
<view class="logistics harvest" @tap='Receipt(item)'
v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'&&item.orderType !='HEALTH_CONSULTATION'">
确认收货</view>
<view class="logistics harvest" @tap='rate(item)' v-if="item.orderStatus=='RECEIVED_GOODS'">
立即评价</view>
<view class="logistics harvest" @tap='Receipt(item)'
v-if="item.orderStatus=='WAIT_RECEIVED_GOODS'&&item.orderType =='HEALTH_CONSULTATION'">
咨询完成</view>
<view class="logistics harvest" style="background-color: #60c5f1;" @tap='rate(item)'
v-if="item.orderStatus=='RECEIVED_GOODS'">
去评价</view>
<view class="logistics harvest" v-if="item.orderStatus=='EVALUATED'" @tap='golookrate(item)'>
查看评价</view>
</view>
</view>
</view>
<view class="noorder" v-else>
<image src="../../static/noorder.png" mode=""></image>
<view class="">
暂无商品订单
</view>
<u-empty mode="order" icon-size='220'></u-empty>
</view>
<!-- 弹框 -->
<view class="frame">
<u-popup v-model="show" mode="bottom" length="45%" border-radius="30">
<u-popup v-model="show" mode="bottom" length="45%" border-radius="30" :closeable='true'>
<view class="payment">
<span>确认收到货了吗</span>
<image src="../../static/gb.png" mode="" @tap="show = false"></image>
<span v-if="orderNoitem.orderType =='HEALTH_CONSULTATION'">确认咨询完成了吗</span>
<span v-else>确认收到货了吗</span>
</view>
<view class="chat">
<view class="image">
<image :src="baseurl+img" mode=""></image>
<view class="blackground">共1件</view>
<view class="image" style="height:182rpx">
<image :src="baseurl+img" mode="" v-if="orderNoitem.orderType !='HEALTH_CONSULTATION'"></image>
<view class="blackground" v-if="orderNoitem.orderType !='HEALTH_CONSULTATION'">共1件</view>
</view>
<view class="word">为了保证你的售后权益请收到商品确认无误后再确认收货</view>
<view class="word" v-if="orderNoitem.orderType =='HEALTH_CONSULTATION'">为了保证您的售后权益请确认健康咨询无误后再确认完成
</view>
<view class="word" v-else>为了保证您的售后权益请收到商品确认无误后再确认收货</view>
</view>
<view class="submits" @tap='Receipts'>确定</view>
</u-popup>

View File

@ -3,29 +3,53 @@
<view class="title">
{{item.informationTitle}}
</view>
<view class="text" v-html="item.informationContent">
</view>
<u-parse :html="item.informationContent"></u-parse>
<!-- <view class="text" v-html="item.informationContent">
</view>-->
</view>
</template>
<script>
export default {
data() {
return {
item: null,
item: '',
};
},
onLoad(options) { //
this.item = JSON.parse(decodeURIComponent(options.item))
this.item.informationContent = this.item.informationContent.replace(/\<img/gi,
"<br/> <img class='richPic'")
this.item.informationContent = this.item.informationContent.replace(/\<p/gi,
"<p class='ptext'")
// this.item.informationContent = this.item.informationContent.replace(/\<span/,
// "<span class='ql-size-small'")
// atch = match.replace(/class="ql-size-large"/gi, 'max-width:100%;')
},
onReady() { //
},
onReady() {}, //
}
</script>
<style lang="scss">
/deep/ .ptext {
margin-top: 20rpx;
}
/deep/ .ptext:nth-child(1) {
text-indent: 2em;
}
/deep/ .ql-size-small {
font-size: 20rpx;
}
/deep/ .ql-size-large {
font-size: 36rpx;
}
/deep/ .ql-size-huge {
font-size: 46rpx;
}
.title {
padding-left: 3%;
font-size: 38rpx;

View File

@ -17,10 +17,7 @@
</view>
</view>
<view class="noorder" v-else>
<image src="../../static/noorder.png" mode=""></image>
<view class="">
暂无内容
</view>
<u-empty mode="data" icon-size='220' text='暂无内容'></u-empty>
</view>
<u-back-top :scroll-top="scrollTop"></u-back-top>
</view>
@ -100,26 +97,12 @@
.noorder {
margin-top: 20%;
image {
display: block;
margin: 0 auto;
width: 200rpx;
height: 240rpx;
}
view {
margin-top: 100rpx;
text-align: center;
font-size: 36rpx;
color: #BFBFBF;
}
}
.Healthknowledge {
width: 94%;
margin: 20rpx auto;
padding: 0 50rpx 50rpx;
padding: 0 30rpx 50rpx;
background-color: #fff;
position: relative;
line-height: 46rpx;
@ -130,7 +113,7 @@
.item {
width: 100%;
height: 200rpx;
height: 250rpx;
position: relative;
border-bottom: 2rpx solid #CDC9C9;
@ -139,8 +122,8 @@
right: 0;
top: 50%;
transform: translateY(-50%);
width: 253rpx;
height: 164rpx;
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
}
@ -156,11 +139,15 @@
position: absolute;
top: 20rpx;
left: 0;
width: 50%;
width: 60%;
font-size: 30rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: -webkit-box;
-webkit-line-clamp: 5; //
line-clamp: 5;
-webkit-box-orient: vertical;
}
}
}

View File

@ -56,18 +56,6 @@
.noorder{
margin-top: 20%;
image{
display: block;
margin: 0 auto;
width: 200rpx;
height: 240rpx;
}
view{
margin-top: 100rpx;
text-align: center;
font-size: 36rpx;
color: #BFBFBF;
}
}
.item {
width: 99%;

View File

@ -38,10 +38,7 @@
</view>
</view>
<view class="noorder" v-else>
<image src="../../static/noorder.png" mode=""></image>
<view class="">
暂无服务订单
</view>
<u-empty mode="list" icon-size='220' text='暂无服务订单'></u-empty>
</view>
<u-toast ref="uToast" />
<u-mask :show="rateshow" @tap="rateshow = false" class='masks'>

View File

@ -0,0 +1,187 @@
.app {
font-size: 35rpx;
padding: 0 0 200rpx 0;
position: relative;
text-align: center;
.service {
position: absolute;
top:905rpx;
left:2%;
width: 96%;
height: 100rpx;
background: #FFFFFF;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0,0,0,0.03);
border-radius: 10rpx;
image {
width: 13rpx;
height: 23rpx;
position: absolute;
right:40rpx;
top:50%;
transform: translateY(-50%);
}
.serviceorder {
font-size: 32rpx;
height: 100rpx;
line-height: 100rpx;
position: absolute;
left: 31rpx;
}
}
.content {
position: absolute;
top:590rpx;
left:2%;
width: 96%;
height: 300rpx;
background: #FFFFFF;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0,0,0,0.03);
border-radius: 10rpx;
.center {
display: flex;
justify-content: space-around;
padding-top: 50rpx;
.OrderStatus {
position: relative;
height: 180rpx;
width: 25%;
.title{
position: absolute;
top: 80rpx;
width:100%;
left:50%;
transform: translateX(-50%);
}
image {
width: 71rpx;
height: 63rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.orderCount {
width: 38rpx;
height: 38rpx;
background: #FFFFFF;
border: 3rpx solid #DC222F;
position: absolute;
top: -20rpx;
right: 35rpx;
font-size: 22rpx;
border-radius: 50%;
line-height: 35rpx;
color: #DC222F;
}
}
}
.CommodityOrder {
font-size: 32rpx;
height: 80rpx;
line-height: 80rpx;
position: relative;
.title{
position: absolute;
left: 31rpx;
}
.text{
position: absolute;
right: 40rpx;
font-size: 26rpx;
color: #969494;
image{
position: absolute;
top:50%;
transform: translateY(-50%);
padding-left: 10rpx;
width: 13rpx;
height: 23rpx;
}
}
}
}
.userinfo{
position: absolute;
top:350rpx;
left:2%;
display: flex;
width: 96%;
height: 220rpx;
background-color: #fff;
border-radius: 10rpx;
box-shadow: 0rpx 0rpx 24rpx 0rpx rgba(101,176,249,0.41);
.item{
width: 33%;
height: 100%;
padding-top: 40rpx;
.text{
font-size: 30rpx;
line-height: 60rpx;
}
image{
// margin-left: 50%;
// transform: translateX(-50%);
width: 85rpx;
height: 74rpx;
}
}
}
.user {
width: 100%;
height: 400rpx;
position: relative;
color: #FFFFFF;
font-size: 39rpx;
.modify {
position: absolute;
right: 3%;
top:200rpx;
font-size:28rpx;
image{
width: 23rpx;
height: 23rpx;
padding-left: 10rpx;
}
}
.login{
position: absolute;
top: 170rpx;
left: 35%;
font-size: 36rpx;
width: 180rpx;
line-height: 70rpx;
border:1rpx solid #fff;
height: 70rpx;
border-radius: 20rpx;
}
.nickname {
position: absolute;
top: 200rpx;
left: 35%;
font-size: 30rpx;
}
.phone {
position: absolute;
top: 130rpx;
left: 35%;
}
.bjimg{
width: 100%;
height: 100%;
image{
width: 100%;
height: 100%;
}
}
.img {
z-index: 999;
width: 150rpx;
height: 150rpx;
border-radius: 50%;
background: #F6F6F6;
position: absolute;
top: 130rpx;
left: 8%;
}
}
}

View File

@ -8,7 +8,7 @@
<view class="phone" v-if="appPersonallist.patientName">
{{appPersonallist.patientName}}
</view>
<view class="nickname" style="top:200rpx">
<view class="nickname" style="top:250rpx">
<span style='padding-right: 10rpx;' v-if="appPersonallist.age!=null&&appPersonallist.age>=0">
{{appPersonallist.age}}
</span>
@ -41,22 +41,23 @@
健康档案
</view>
</view>
<view class="item" @tap='gointegral' v-if="appPersonallist">
<view class="item" @tap='gointegral'>
<image src="../../static/jifen.png" mode=""></image>
<view class="text">
积分
<span style='padding:0 5rpx' v-if="appPersonallist.integral&&appPersonallist.integral>=0">
<span style='padding:0 5rpx'
v-if="appPersonallist&&appPersonallist.integral&&appPersonallist.integral>=0">
{{appPersonallist.integral}}</span>
<span style='padding:0 5rpx' v-else>
0</span>
</view>
</view>
<view class="item" @tap="gocoupon" v-if="appPersonallist">
<view class="item" @tap="gocoupon">
<image src="../../static/yhj.png" mode=""></image>
<view class="text">
优惠券
<span style='padding:0 5rpx'
v-if="appPersonallist.patientCouponCount&&appPersonallist.patientCouponCount>=0">
v-if="appPersonallist&&appPersonallist.patientCouponCount&&appPersonallist.patientCouponCount>=0">
{{appPersonallist.patientCouponCount}}</span>
<span style='padding:0 5rpx' v-else>
0</span>
@ -109,7 +110,7 @@
99+
</view>
</view>
<view class="OrderStatus" @tap="goEVALUATED('EVALUATED')" v-if="appPersonallist">
<view class="OrderStatus" @tap="goEVALUATED('EVALUATED')">
<image src="/static/finished.png" mode=""></image>
<view class="title">已完成</view>
<!-- <view class="orderCount" v-if="list.evaluatedCount>0&&list.evaluatedCount<100">
@ -125,7 +126,11 @@
<view class="serviceorder">护理站服务订单</view>
<image src="../../static/huijiantou.png" mode=""></image>
</view>
<view class="service" style="top:1040rpx" @tap='remove'>
<!-- <view class="service" style="top:1100rpx" @tap="">
<view class="serviceorder">健康咨询订单</view>
<image src="../../static/huijiantou.png" mode=""></image>
</view> -->
<view class="service" style="top:1018rpx" @tap='remove'>
<view class="serviceorder">退出账号</view>
<image src="../../static/huijiantou.png" mode=""></image>
</view>
@ -136,9 +141,6 @@
import {
appPersonal,
} from '@/api/Personal/Personal.js';
import {
existPatientInfo
} from '@/api/startup/index.js'
import baseurl from '@/api/baseurl.js'
export default {
data() {
@ -214,9 +216,9 @@
//
myInfo() {
var that = this
const value2 = uni.getStorageSync('patientId');
if (value2) {
appPersonal(value2).then(Response => {
const value = uni.getStorageSync('patientId');
if (value) {
appPersonal(value).then(Response => {
if (Response.code == 200) {
that.appPersonallist = Response.data
if (!that.appPersonallist.integral) {
@ -230,11 +232,13 @@
that.removes();
}
})
} else {
that.removes();
}
},
updatainfo() {
const value2 = uni.getStorageSync('patientId');
if (value2) {
const value = uni.getStorageSync('patientId');
if (value) {
uni.navigateTo({
url: `/pages/modify/modify`
})
@ -244,8 +248,8 @@
},
//
gonursestation() {
const value2 = uni.getStorageSync('patientId');
if (value2) {
const value = uni.getStorageSync('patientId');
if (value) {
uni.navigateTo({
url: '/pages/Nursingstationserviceorder/Nursingstationserviceorder'
})
@ -255,8 +259,8 @@
},
//
goreceive(item) {
const value2 = uni.getStorageSync('patientId');
if (value2) {
const value = uni.getStorageSync('patientId');
if (value) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
@ -266,8 +270,8 @@
},
//
goorder() {
const value2 = uni.getStorageSync('patientId');
if (value2) {
const value = uni.getStorageSync('patientId');
if (value) {
uni.navigateTo({
url: '/pages/CommodityOrder/CommodityOrder'
})
@ -283,8 +287,8 @@
},
//
gocoupon() {
const value2 = uni.getStorageSync('patientId');
if (value2) {
const value = uni.getStorageSync('patientId');
if (value) {
uni.navigateTo({
url: '/pages/coupon/coupon'
})
@ -294,8 +298,8 @@
},
//
gointegral() {
const value2 = uni.getStorageSync('patientId');
if (value2) {
const value = uni.getStorageSync('patientId');
if (value) {
uni.navigateTo({
url: `/pages/integral/integral?integral=${this.appPersonallist.integral}`
})
@ -305,8 +309,8 @@
},
//
goEVALUATED(item) {
const value2 = uni.getStorageSync('patientId');
if (value2) {
const value = uni.getStorageSync('patientId');
if (value) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
@ -316,8 +320,8 @@
},
//
gocompleted(item) {
const value2 = uni.getStorageSync('patientId');
if (value2) {
const value = uni.getStorageSync('patientId');
if (value) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
@ -327,8 +331,8 @@
},
//
gopaid(item) {
const value2 = uni.getStorageSync('patientId');
if (value2) {
const value = uni.getStorageSync('patientId');
if (value) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
@ -346,216 +350,5 @@
}
</script>
<style lang="scss">
.app {
font-size: 35rpx;
padding: 0 0 200rpx 0;
position: relative;
text-align: center;
.service {
position: absolute;
top: 915rpx;
left: 2%;
width: 96%;
height: 100rpx;
background: #FFFFFF;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 10rpx;
image {
width: 13rpx;
height: 23rpx;
position: absolute;
right: 40rpx;
top: 50%;
transform: translateY(-50%);
}
.serviceorder {
font-size: 32rpx;
height: 100rpx;
line-height: 100rpx;
position: absolute;
left: 31rpx;
}
}
.content {
position: absolute;
top: 590rpx;
left: 2%;
width: 96%;
height: 300rpx;
background: #FFFFFF;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 10rpx;
.center {
display: flex;
justify-content: space-around;
padding-top: 50rpx;
.OrderStatus {
position: relative;
height: 180rpx;
width: 25%;
.title {
position: absolute;
top: 80rpx;
width: 100%;
left: 50%;
transform: translateX(-50%);
}
image {
width: 71rpx;
height: 63rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.orderCount {
width: 38rpx;
height: 38rpx;
background: #FFFFFF;
border: 3rpx solid #DC222F;
position: absolute;
top: -20rpx;
right: 35rpx;
font-size: 22rpx;
border-radius: 50%;
line-height: 35rpx;
color: #DC222F;
}
}
}
.CommodityOrder {
font-size: 32rpx;
height: 80rpx;
line-height: 80rpx;
position: relative;
.title {
position: absolute;
left: 31rpx;
}
.text {
position: absolute;
right: 40rpx;
font-size: 26rpx;
color: #969494;
image {
position: absolute;
top: 50%;
transform: translateY(-50%);
padding-left: 10rpx;
width: 13rpx;
height: 23rpx;
}
}
}
}
.userinfo {
position: absolute;
top: 340rpx;
left: 2%;
display: flex;
width: 96%;
height: 220rpx;
background-color: #fff;
border-radius: 10rpx;
box-shadow: 0rpx 0rpx 24rpx 0rpx rgba(101, 176, 249, 0.41);
.item {
width: 33%;
height: 100%;
padding-top: 40rpx;
.text {
font-size: 30rpx;
line-height: 60rpx;
}
image {
// margin-left: 50%;
// transform: translateX(-50%);
width: 85rpx;
height: 74rpx;
}
}
}
.user {
width: 100%;
height: 400rpx;
position: relative;
color: #FFFFFF;
font-size: 39rpx;
.modify {
position: absolute;
right: 3%;
top: 200rpx;
font-size: 28rpx;
image {
width: 23rpx;
height: 23rpx;
padding-left: 10rpx;
}
}
.login {
position: absolute;
top: 170rpx;
left: 35%;
font-size: 36rpx;
width: 180rpx;
line-height: 70rpx;
border: 1rpx solid #fff;
height: 70rpx;
border-radius: 20rpx;
}
.nickname {
position: absolute;
top: 250rpx;
left: 35%;
font-size: 30rpx;
}
.phone {
position: absolute;
top: 130rpx;
left: 35%;
}
.bjimg {
width: 100%;
height: 100%;
image {
width: 100%;
height: 100%;
}
}
.img {
z-index: 999;
width: 150rpx;
height: 150rpx;
border-radius: 50%;
background: #F6F6F6;
position: absolute;
top: 130rpx;
left: 8%;
}
}
}
@import "./Personal.scss";
</style>

View File

@ -28,11 +28,8 @@
<view style="width: 45%;" v-if="goodsList.length%2!=0">
</view>
</view>
<view class="noorder" v-if='goodsList.length==0'>
<image src="../../static/noorder.png" mode=""></image>
<view class="">
暂无商品
</view>
<view style='margin-top:90rpx' v-else>
<u-empty mode="list" icon-size='220' text='暂无商品'></u-empty>
</view>
<u-back-top :scroll-top="scrollTop"></u-back-top>
</view>
@ -187,26 +184,6 @@
uni.stopPullDownRefresh();
}, 1000);
},
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
url = decodeURIComponent(url)
return {
title: '泉医到家',
path: url,
}
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
url = decodeURIComponent(url)
return {
title: '泉医到家',
path: url,
}
},
}
</script>
@ -247,21 +224,6 @@
}
}
.noorder {
view {
text-align: center;
font-size: 40rpx;
color: #BFBFBF;
}
image {
display: block;
margin: 20% auto 50rpx;
width: 160rpx;
height: 200rpx;
}
}
.inputs {
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border: 1px solid #f0f0f0;

View File

@ -221,24 +221,6 @@
})
},
},
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
}
</script>

View File

@ -38,11 +38,8 @@
用力上滑加载更多
</view>
</view>
<view class="noorder" v-if='goodsList.length==0'>
<image src="../../static/noorder.png" mode=""></image>
<view class="">
暂无商品
</view>
<view v-if='goodsList.length==0' style='margin-top: 100rpx;'>
<u-empty text="暂无商品" mode="data" icon-size='220'></u-empty>
</view>
</view>
</view>
@ -233,26 +230,6 @@
// uni.stopPullDownRefresh();
// }, 1000);
// },
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
url = decodeURIComponent(url)
return {
title: '泉医到家',
path: url,
}
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
url = decodeURIComponent(url)
return {
title: '泉医到家',
path: url,
}
},
}
</script>
@ -418,21 +395,5 @@
}
}
.noorder {
view {
text-align: center;
font-size: 40rpx;
color: #BFBFBF;
}
image {
display: block;
margin: 20% auto 50rpx;
width: 160rpx;
height: 200rpx;
}
}
}
</style>

View File

@ -0,0 +1,308 @@
<template>
<view class="app">
<view class="user">
<view class="item">
<span>姓名</span>
<span class='addition' v-if="userlist.patientName">{{userlist.patientName}}</span>
</view>
<view class="item">
<span>电话</span>
<span class='addition' v-if="userlist.phone">{{userlist.phone}}</span>
</view>
<view class="item" style="border: 0;">
<span>时间</span>
<span class='addition'>请选择</span>
</view>
<view class="worditem">
<view class="today" @tap='taptoday(item,index)'
:style="todayindex==index?'background: #FEF9F8;border: 1px solid #F44B2F;color: #F44B2F;':''"
v-for="(item,index) in userlist.appointmentTimeList" :key="index">
<span class="todaytime">
{{item.week}}
</span>
<span class="time">{{item.healthConsultationDate}}</span>
</view>
</view>
</view>
<view class="remarks">
<span>咨询内容</span>
<u-input v-model="updata.healthConsultationContent" type="textarea" :clearable='false' />
</view>
<view class="bottomitem">
<span>{{updata.totalPrice}}</span>
<view class="submit" @tap='buyshow=true'>确认</view>
</view>
<!-- 弹框 -->
<u-popup v-model="buyshow" mode="bottom" length="45%" border-radius="30" :closeable='true'>
<view class="payment">
请选择支付方式
</view>
<view class="chat">
<image src="/static/chat.png" mode=""></image>
<span>微信支付</span>
</view>
<view class="submits" @tap='buy'>
确认支付{{updata.totalPrice}}
</view>
</u-popup>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
informationConfirmation,
addHealthConsultationOrder
} from '@/api/Informationconfirmation/index.js'
import {
appletGoodsOrderPay
} from '@/api/confirmOrder/index.js'
export default {
data() {
return {
openid: null,
buyshow: false,
price: 0,
userlist: {},
todayindex: 0,
updata: {
"orderChannel": "WECHAT_APPLET",
"patientId": null,
"phone": null,
"receiver": null,
"healthAppointDate": null,
"totalPrice": null,
"hospitalPersonId": null,
"healthConsultationContent": '',
"hospitalPersonName": null,
},
}
},
methods: {
taptoday(item, index) {
this.todayindex = index
this.updata.healthAppointDate = item.date
},
buy() {
var that = this
addHealthConsultationOrder(this.updata).then(res => {
res.data.payType = "WECHAT_PAY"
res.data.paymentPrice = res.data.totalPrice
res.data.openid = this.openid
let id = res.data.id
appletGoodsOrderPay(res.data).then(response => {
if (response.code == 200) {} else {
that.$refs.uToast.show({
title: response.msg,
type: 'error',
duration: 2000
})
}
})
})
},
},
onShow() {
var that = this
const value = uni.getStorageSync('patientId');
const value2 = uni.getStorageSync('openid');
if (value2) {
that.openid = value2
}
if (value) {
that.updata.patientId = value
informationConfirmation(value).then(res => {
that.userlist = res.data
that.updata.phone = res.data.phone
that.updata.receiver = res.data.patientName
that.updata.healthAppointDate = res.data.appointmentTimeList[0].date
})
}
},
onLoad(options) {
var that = this
this.updata.hospitalPersonName = options.personName
this.updata.totalPrice = Number(options.price)
this.updata.hospitalPersonId = Number(options.hospitalPersonId)
}
}
</script>
<style lang="scss">
.app {
font-size: 34rpx;
padding-top: 10rpx;
height: 100%;
-webkit-overflow-scrolling: touch;
.determine {
height: 70rpx;
line-height: 70rpx;
font-size: 32rpx;
width: 50%;
color: #F4F5F7;
background: #4C7BC9;
position: absolute;
bottom: 0;
left: 0;
}
.user {
background: #FFFFFF;
width: 94%;
height: 600rpx;
margin: 10rpx auto;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
line-height: 93rpx;
.addressitem {
width: 97%;
border-bottom: 1rpx solid #D8D4D4;
margin-left: 3%;
// height: 100%;
.leftaddress {
width: 15%;
height: 100%;
display: flex;
display: inline-block;
}
.addition {
color: #666666;
display: inline-block;
line-height: 50rpx;
font-size: 28rpx;
}
}
.item {
width: 97%;
border-bottom: 1rpx solid #D8D4D4;
margin-left: 3%;
.addition {
color: #666666;
line-height: 30rpx;
font-size: 28rpx;
}
}
.worditem {
display: flex;
width: 100%;
justify-content: flex-start;
flex-wrap: wrap;
.today {
width: 20%;
margin: 0 2.5% 0 2.5%;
margin-top: 20rpx;
height: 90rpx;
text-align: center;
font-size: 26rpx;
border: 1px solid #DADADA;
border-radius: 5rpx;
.time {
font-size: 26rpx;
display: block;
line-height: 40rpx;
}
.todaytime {
padding-top: 5rpx;
font-size: 26rpx;
display: block;
line-height: 40rpx;
}
}
}
}
.remarks {
width: 94%;
margin: 10rpx auto;
font-size: 34rpx;
height: 440rpx;
background: #FFFFFF;
border-radius: 20rpx;
padding: 30rpx 0 0 30rpx;
}
.bottomitem {
width: 100%;
height: 120rpx;
background: #FFFFFF;
bottom: 0;
position: fixed;
span {
font-size: 48rpx;
line-height: 120rpx;
color: #F44B2F;
margin: 0 0 0 30rpx;
}
.submit {
width: 186rpx;
height: 70rpx;
background: #F44B2F;
color: #FFFFFF;
border-radius: 30rpx;
line-height: 70rpx;
text-align: center;
font-size: 32rpx;
float: right;
margin: 25rpx 30rpx 0 0;
}
}
//
.payment {
width: 100%;
height: 130rpx;
font-size: 42rpx;
color: #000000;
line-height: 130rpx;
text-align: center;
border-bottom: 1rpx solid #D8D4D4;
}
.chat {
position: relative;
height: 200rpx;
span {
position: absolute;
top: 50rpx;
left: 180rpx;
line-height: 70rpx;
font-size: 42rpx;
color: #000000;
}
image {
position: absolute;
top: 50rpx;
left: 70rpx;
width: 80rpx;
height: 70rpx;
}
}
.submits {
background: #F44B2F;
width: 501rpx;
height: 71rpx;
line-height: 71rpx;
border-radius: 36rpx;
font-size: 34rpx;
color: #FFFFFF;
text-align: center;
position: fixed;
bottom: 50rpx;
left: 50%;
transform: translateX(-50%);
}
}
</style>

162
pages/coupon/coupon.scss Normal file
View File

@ -0,0 +1,162 @@
.app {
padding: 0;
.noorder {
margin-top: 20%;
}
.content {
width: 96%;
margin: 20rpx auto 0;
background-color: #fff;
padding-bottom: 100rpx;
.rollup {
border-radius: 5rpx;
.item {
width: 94%;
height: 240rpx;
margin: 20rpx auto 0;
border: 1rpx solid #f4f5f7;
border-radius: 10rpx;
.bottom {
font-size: 22rpx;
color: #969394;
line-height: 60rpx;
padding-left: 25rpx;
border-radius: 0 0 10rpx 10rpx;
}
.top {
width: 100%;
height: 180rpx;
background: #FDE9E8;
position: relative;
color: #F44B2F;
border-radius: 10rpx 10rpx 0 0;
.what {
padding: 0 10rpx;
height: 40rpx;
background: #FED1D2;
border-radius: 16rpx;
font-size: 20rpx;
line-height: 40rpx;
text-align: center;
position: absolute;
top: 120rpx;
left: 20rpx;
}
.btngq {
width: 110rpx;
height: 50rpx;
border: 2rpx solid #DFDEDE;
border-radius: 24rpx;
font-size: 24rpx;
position: absolute;
top: 70rpx;
right: 20rpx;
text-align: center;
line-height: 50rpx;
background: #DFDEDE;
}
.btn {
width: 98rpx;
height: 50rpx;
border: 2rpx solid #F44B2F;
border-radius: 24rpx;
font-size: 24rpx;
position: absolute;
top: 70rpx;
right: 20rpx;
text-align: center;
line-height: 50rpx;
}
.time {
font-size: 24rpx;
position: absolute;
top: 120rpx;
left: 240rpx;
}
.texts {
font-size: 32rpx;
font-weight: 800;
position: absolute;
top: 44rpx;
left: 240rpx;
}
.title {
position: absolute;
top: 30rpx;
left: 10rpx;
.price {
font-size: 54rpx;
font-weight: 700;
}
.text {
font-weight: 600;
font-size: 34rpx;
}
}
}
}
}
.statuss {
padding-top: 25rpx;
span {
color: #c1c1c1;
font-size: 18rpx;
line-height: 60rpx;
}
.statusitem {
text-align: center;
padding: 0 40rpx;
display: inline-block;
height: 60rpx;
font-size: 30rpx;
color: #969394;
line-height: 60rpx;
}
}
}
.tabs {
width: 100%;
.tab-item {
margin: 20rpx 0 0 24rpx;
text-align: center;
width: 20%;
.text {
width: 70%;
margin-left: 15%;
height: 30rpx;
background: #F44B2F;
border-radius: 9rpx;
color: #fff;
font-size: 24rpx;
line-height: 30rpx;
}
.title {
font-size: 40rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #F44B2F;
line-height: 59rpx;
}
}
}
}

151
pages/coupon/coupon.vue Normal file
View File

@ -0,0 +1,151 @@
<template>
<view class="app">
<view class="tabs">
<view class="tab-item">
<view class="title">
</view>
<view class="text">
{{total}}
</view>
</view>
</view>
<view class="content">
<view class="statuss">
<view class="statusitem" @tap="changingcoupon('')" :style="couponstatus==''?'color: #F44B2F;':''">
全部
</view>
<span> |</span>
<view class="statusitem" @tap="changingcoupon('NOT_USED')"
:style="couponstatus=='NOT_USED'?'color: #F44B2F;':''">
未使用
</view>
<span> |</span>
<view class="statusitem" @tap="changingcoupon('USED')"
:style="couponstatus=='USED'?'color: #F44B2F;':''">
已使用
</view>
<span> |</span>
<view class="statusitem" @tap="changingcoupon('EXPIRED')"
:style="couponstatus=='EXPIRED'?'color: #F44B2F;':''">
已过期
</view>
</view>
<view class="rollup" v-if="couponlist.length>0">
<view class="item" v-for="(item,index) in couponlist" :key="index"
:style="item.useStatus!='NOT_USED'?'height:180rpx':''">
<view class="top" :style="item.useStatus!='NOT_USED'?'background: #EFECEC;color: #4B4B4B;':''">
<view class="title">
<span class="text">
</span>
<span class="price">
{{item.couponPrice}}
</span>
</view>
<view class="what" :style="item.useStatus!='NOT_USED'?'background: #DADADA;;':''">
{{item.couponTitle}}
</view>
<view class="texts">
{{item.couponConsumePrice}}可用
</view>
<view class="time">
有效期至{{item.expirationEndTime}}
</view>
<view class="btngq" v-if="item.useStatus!='NOT_USED'">
{{item.useStatus=='EXPIRED'?'已过期':''}}
{{item.useStatus=='USED'?'已使用':''}}
</view>
<view class="btn" v-else @tap='goshoping'>
{{item.useStatus=='NOT_USED'?'使用':''}}
</view>
</view>
<view class="bottom" v-if="item.useStatus=='NOT_USED'||item.useStatus=='RECEIVE'">
领取来源{{item.receiveSource =='NEW_PEOPLE_WELFARE'?'新人福利':''}}
{{item.receiveSource =='EVENT_GIFT'?'活动赠送':''}}
{{item.receiveSource =='CONSUME_REBATE'?'消费返券':''}}
</view>
</view>
</view>
<view class="noorder" v-else>
<u-empty mode="coupon" icon-size='220'></u-empty>
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
selectCoupon
} from '@/api/coupon/index.js'
export default {
data() {
return {
pageNum: 1,
pageSize: 10,
couponlist: [],
total: 0,
couponstatus: '', //
patientId: null,
};
},
onLoad() {
this.pageNum = 1
var that = this
const value = uni.getStorageSync('patientId');
if (value) {
that.patientId = value
that.getlist();
} else {
that.$refs.uToast.show({
title: '请先登录',
type: 'error',
duration: '1000',
})
}
},
methods: {
getlist() {
selectCoupon(this.pageNum, this.pageSize, this.patientId, this.couponstatus).then(res => {
this.couponlist = res.rows
this.total = res.total
})
},
changingcoupon(item) {
this.pageNum = 1
if (this.couponstatus == item) {
this.couponstatus = ''
} else {
this.couponstatus = item
}
this.getlist();
},
goshoping() {
uni.navigateTo({
url: '/pages/shopping/shopping'
})
},
},
onReachBottom() { //
if (this.couponlist.length >= this.total) {} else {
this.pageNum++;
selectCoupon(this.pageNum, this.pageSize, this.patientId, this.couponstatus).then(res => {
res.rows.forEach(e => {
this.couponlist.push(e)
})
})
}
},
onPullDownRefresh() { //
this.pageNum = 1;
this.getlist();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>
<style lang="scss">
@import "./coupon.scss";
</style>

View File

@ -42,24 +42,6 @@
});
},
},
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
}
</script>

View File

@ -51,6 +51,7 @@
</view>
</view>
<view class="Welfarecustomerservice">
<image class="shoping" src="../../static/shoping.png" mode="" @tap='goshopping'></image>
<image src="../../static/fuli.png" mode="" @tap='gomaterialbenefits'></image>
<image src="../../static/kefu.png" mode="" @tap='gocustomerservice'></image>
</view>
@ -218,6 +219,12 @@
url: '/pages/materialbenefits/materialbenefits'
})
},
//
goshopping() {
uni.navigateTo({
url: '/pages/shopping/shopping'
})
},
},
// onReachBottom() { //
// if (this.informationCategoryVOList.length >= this.informationCategorytotal) {} else {
@ -239,24 +246,6 @@
// uni.stopPullDownRefresh();
// }, 1000);
// },
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
}
</script>
<style lang="scss">
@ -394,19 +383,29 @@
background-color: #fff;
width: 100%;
padding: 30rpx 0;
flex-wrap: wrap;
margin-bottom: 20rpx;
image:nth-child(1) {
margin: 0 5rpx 0 0;
image:nth-child(2) {
margin: 0 10rpx 0 0;
}
image:nth-child(2) {
margin: 0 0 0 5rpx;
image:nth-child(3) {
margin: 0 0 0 10rpx;
}
image {
width: 350rpx;
height: 200rpx;
width: 340rpx;
height: 195rpx;
}
image:nth-child(1) {
width: 700rpx;
height: 240rpx;
}
.shoping {
margin-bottom: 20rpx;
}
}

View File

@ -1,18 +1,9 @@
.app {
padding:0;
height:100vh;
.btn{
width:28%;
float: right;
background-color: #2979ff;
height: 80rpx;
line-height: 80rpx;
border-radius: 20rpx;
color: #FFFFFF;
text-align: center;
font-size: 38rpx;
margin-right: 30rpx;
}
/deep/ .u-drawer{
z-index: 0 !important;
}
.Agreement{
width: 100%;
background-color: #F4F5F7;
@ -78,8 +69,8 @@
.radio {
display: inline-block;
width: 35rpx;
height: 35rpx;
width: 50rpx;
height: 50rpx;
border-radius: 70%;
border: 2rpx solid #178ffb;
position: absolute;
@ -91,10 +82,10 @@
height: 16rpx;
border-radius: 50%;
background-color: #178ffb;
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
}
}
}
@ -124,7 +115,7 @@
text-overflow: ellipsis;
overflow: hidden;
}
.choice {
display: inline-block;
text-align: center;
@ -135,9 +126,9 @@
background: #BFBFBF;
border-radius: 26rpx;
margin: 0 20rpx 20rpx 0;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
}
@ -146,7 +137,18 @@
padding-top: 36rpx;
}
}
.btn{
width:28%;
float: right;
background-color: #2979ff;
height: 80rpx;
line-height: 80rpx;
border-radius: 20rpx;
color: #FFFFFF;
text-align: center;
font-size: 38rpx;
margin-right: 30rpx;
}
.info {
width: 96%;
margin: 0 auto 20rpx;
@ -154,6 +156,29 @@
border-radius: 20rpx;
padding-bottom: 5rpx;
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
.disease {
width: 100%;
margin: 0 auto;
padding: 0 6% 0 3%;
line-height: 80rpx;
border-bottom: 1rpx solid #D8D4D4;
position: relative;
.title {
font-size: 30rpx;
display: block;
line-height: 120rpx;
}
.pictureA {
width: 18rpx;
height: 27rpx;
position: absolute;
right: 30rpx;
top: 50%;
transform: translateY(-50%);
}
}
}
@ -165,6 +190,22 @@
line-height: 120rpx;
border-bottom: 1rpx solid #D8D4D4;
position: relative;
::v-deep .u-radio__label{
width: 150rpx !important;
height: 120rpx !important;
line-height: 120rpx;
}
::v-deep .u-radio-group{
position: absolute;
top:50%;
transform: translateY(-50%);
left:170rpx;
}
::v-deep .u-radio{
padding-left: 10rpx;
width: 150rpx !important;
height: 120rpx !important;
}
.address {
position: absolute;
left:25%;
@ -207,9 +248,5 @@
transform: translateY(-50%);
}
}
.item:nth-child(6) {
border: 0;
}
}
}

View File

@ -4,30 +4,45 @@
</view>
<view class="userinfo info">
<view class="item">
<span>姓名:</span>
<u-input :clearable='false' v-model="query.patientName" type="text" placeholder='' maxlength='5' />
<span>姓名</span>
<u-input :clearable='false' v-model="query.patientName" type="text" placeholder='请输入' maxlength='5' />
</view>
<view class="item">
<span>性别</span>
<u-radio-group v-model="query.sex" size='44'>
<u-radio @change='sexchange' v-for="(item, index) in sexlist" :key="index" :name="item.name"
:disabled="item.disabled">
{{item.name}}
</u-radio>
</u-radio-group>
</view>
<!-- <view class="item">
<span>电话:</span>
<u-input :clearable='false' v-model="query.phone" maxlength='11' type="text" placeholder='' />
<u-input :clearable='false' v-model="query.phone" maxlength='11' type="text" placeholder='请输入' />
</view> -->
<view class="item" @tap='timeshow=true'>
<span>出生日期</span>
<view class="address" style="">
{{query.birthDate}}
</view>
</view>
<view class="item">
<span>身份证号:</span>
<u-input :clearable='false' v-model="query.cardNo" type="text" placeholder='' maxlength='18' />
<span>身份证号</span>
<u-input :clearable='false' v-model="query.cardNo" type="text" placeholder='请输入身份证号' maxlength='18' />
</view>
<view class="item" @tap='showPicker'>
<span>所属区域:</span>
<span>所属区域</span>
<view class="address">{{address}}</view>
</view>
<view class="item">
<span>详细地址:</span>
<u-input :clearable='false' v-model="query.address" maxlength='40' type="text"
placeholder='小区、单元、门牌号' />
<span>详细地址</span>
<u-input :clearable='false' v-model="query.address" type="text" placeholder='小区、单元、门牌号'
maxlength='40' />
</view>
<view class="item" @tap='getAddress()'>
<span>所在位置:</span>
<view class="address" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
{{chooseLocation}}
<span>所在位置</span>
<view class="address" style="">
{{query.locationName}}
</view>
</view>
</view>
@ -37,9 +52,16 @@
</m-city>
</view>
<view class="info">
<view class="service">
<view class="disease" style="border: none;" @tap="godisease">
<view class="title" style="">基础疾病:</view>
<image class="pictureA" src="../../static/huijiantou.png" mode=""></image>
<view style="padding-right: 10rpx;display: inline-block;" v-for="(item,index) in query.diseaseInfoList">
{{item.diseaseName}}
</view>
</view>
<!-- <view class="service">
<view class="title">
所属服务
基础疾病
</view>
<view class="Multiplechoice">
<view :class="query.nurseTypeIdList.find(e => e == item.id)?'choices':'choice'"
@ -52,7 +74,7 @@
{{item.nurseTypeName}}
</view>
</view>
</view>
</view> -->
</view>
<view class="radio-content">
<view class="radio-right" @tap="changeRadio">
@ -67,6 +89,7 @@
<view class="btn" @tap='informationinfo'>
提交
</view>
<u-toast ref="uToast" />
<!-- // -->
<u-mask :show="maskshow" class='mask' @click='maskshow=false'>
<view class="Agreement">
@ -84,7 +107,8 @@
</view>
</view>
</u-mask>
<u-toast ref="uToast" />
<u-picker mode="time" v-model="timeshow" :params="params" @confirm='timechange' @canel='timeshow=false'>
</u-picker>
</view>
</template>
@ -94,10 +118,10 @@
getNurseType,
information
} from '@/api/information/index.js'
import contenttext from './text.vue'
import {
getSubordinateRegions,
} from '@/api/modifyAddress/modifyAddress.js';
import contenttext from './text.vue'
import gkcity from "../m-city/m-city.vue";
export default {
components: {
@ -106,45 +130,81 @@
},
data() {
return {
radio: 1,
timer: null,
arealist: [], //list
areashow: false, //
getNurseTypelist: [], //
medicalcarelist: [], //
address: '', //
maskshow: false, //
chooseLocation: '',
query: { //
patientName: "",
cardNo: "",
phone: "",
address: "",
areaCode: "",
nurseTypeIdList: [],
diseaseInfoList: [],
patientId: '',
timeshow: false, //
params: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
addresslength: null,
sexlist: [{
name: '男',
disabled: false
},
{
name: '女',
disabled: false
}
],
radio: 1,
// chooseLocation: '', //
arealist: [], //list
list: [{
id: "",
localName: "请选择",
children: [],
}, ],
areashow: false, //
maskshow: false, //
getNurseTypelist: [], //
medicalcarelist: [], //
address: '', //
query: { //
couponId: null,
patientName: "",
cardNo: "",
phone: "",
address: "",
areaCode: "",
homeLongitude: "",
homeLatitude: "",
nurseTypeIdList: [],
diseaseInfoList: [],
patientId: '',
locationName: '',
sex: '',
birthDate: '',
},
timer: null,
addresslength: null,
patientDiseaseInfoList: [], //
};
},
methods: {
//
informationinfo() {
let that = this
var that = this
if (that.query.sex == '男') {
that.query.sex = 'MALE';
} else if (that.query.sex == '女') {
that.query.sex = 'FEMALE';
}
if (this.addresslength) {
if (this.addresslength.length > 2) {
try {
const value = uni.getStorageSync('phone');
if (value) {
that.query.phone = value
const value = uni.getStorageSync('phone');
if (value) {
that.query.phone = value
if (that.radio == 1) {
that.$refs.uToast.show({
title: '请审核并同意用户协议',
type: 'error'
})
} else {
information(that.query).then(res => {
if (res.code == 200) {
uni.removeStorageSync('invitationPatientId');
that.$refs.uToast.show({
title: '完善信息成功',
type: 'success',
@ -166,7 +226,7 @@
}
})
}
} catch (e) {}
}
} else {
that.$refs.uToast.show({
title: '所属区域应选择所在的区或街道,请重新选择!',
@ -179,20 +239,46 @@
type: 'error'
})
}
},
//
sexchange(e) {
if (e == '男') {
this.query.sex = 'MALE';
} else if (e == '女') {
this.query.sex = 'FEMALE';
}
},
//
timechange(e) {
this.query.birthDate = e.year + '-' + e.month + '-' + e.day
},
//
getAddress() {
var that = this;
uni.chooseLocation({
success: function(res) {
that.query.locationName = res.name
that.chooseLocation = res.name
that.query.homeLongitude = res.longitude;
that.query.homeLatitude = res.latitude;
success: function(location) {
that.query.locationName = location.address
that.query.homeLongitude = location.longitude;
that.query.homeLatitude = location.latitude;
}
});
},
// getAddress() {
// uni.getLocation({
// type: 'wgs84',
// success: function(res) {
// const key = '3VABZ-6LZWK-YPAJ3-AMQED-D7RUK-VPB37'; //使key
// const referer = ''; //app
// const location = JSON.stringify({
// latitude: 39.89631551,
// longitude: 116.323459711
// });
// wx.navigateTo({
// url: 'plugin://chooseLocation/index?key=' + key + '&referer=' + referer
// });
// }
// });
// },
//
getNurseTypeInfo() {
getNurseType().then(res => {
@ -258,20 +344,36 @@
},
},
//
onLoad() {
onLoad(options) {
let that = this
try {
const value = uni.getStorageSync('patientId');
if (value) {
that.query.patientId = value
}
} catch (e) {}
this.query.couponId = Number(options.couponId)
const value = uni.getStorageSync('patientId');
if (value) {
that.query.patientId = value
}
this.areaInfo()
this.getNurseTypeInfo();
},
//
// onShow
onShow() {
let that = this
var that = this
const invitationPatientId = uni.getStorageSync('invitationPatientId')
if (invitationPatientId) {
that.query.source = 'FRIEND_INVITATION'
that.query.invitationPatientId = Number(invitationPatientId)
} else {
that.query.source = 'REGISTER_YOURSELF'
that.query.invitationPatientId = null
}
// const chooseLocation = requirePlugin('chooseLocation');
// const location = chooseLocation.getLocation(); // null
// if (location) {
// that.query.locationName = location.address
// that.chooseLocation = location.address
// that.query.homeLongitude = location.longitude;
// that.query.homeLatitude = location.latitude;
// }
uni.$on('disease', function(data) {
that.query.diseaseInfoList = JSON.parse(data.disease)
if (that.query.diseaseInfoList.length > 0) {
@ -286,7 +388,7 @@
})
}
})
}
},
}
</script>
<style lang="scss">

View File

@ -0,0 +1,520 @@
.app {
padding-bottom:10rpx ;
.masks {
z-index: 999;
}
.noorder {
margin-top: 20%;
}
.information {
width: 70%;
height: 400rpx;
margin: 50% auto;
background: #FFFFFF;
border-radius: 30rpx;
text-align: center;
color: #FFFFFF;
position: relative;
.determine,
.cancel {
width: 200rpx;
height: 70rpx;
border-radius: 26rpx;
font-size: 34rpx;
line-height: 70rpx;
position: absolute;
top: 74%;
}
.determine {
background: #4C7BC9;
right: 36rpx;
}
.cancel {
background: #C5BFBF;
left: 36rpx;
}
.title {
font-size: 42rpx;
margin-top: 40rpx;
color: #000000;
}
image {
width: 100rpx;
height: 100rpx;
margin: 10% 0 0 0;
}
}
.close {
width: 31rpx;
height: 31rpx;
position: absolute;
top: 2%;
right: 2%;
z-index: 999;
}
::v-deep .r-canvas {
width: 600rpx !important;
height: 1100rpx !important;
margin: 0 auto;
z-index: -1;
}
::v-deep .r-canvas-component {
width: 760rpx !important;
height: 1100rpx !important;
margin: 0 auto;
z-index: -1;
}
::v-deep .u-mode-center-box {
background: none !important;
}
::v-deep .u-icon--right{
background-color: #fff;
border-radius: 50%;
padding: 6rpx;
// width: 40rpx !important;
// height: 40rpx !important;
}
::v-deep .u-iconfont {
// position: absolute !important;
// left:50% !important;
// top:50% !important;
// transform: translate(-50%,-50%) !important;
}
::v-deep .u-close--top-right{
top:0 !important;
right:20rpx !important;
}
.yaoqbtn {
color: #fff;
position: absolute;
bottom: 0;
text-align: center;
line-height: 60rpx;
left: 60rpx;
width: 200rpx;
height: 60rpx;
background: linear-gradient(90deg, #85C8AE 0%, #03AD6B 59%);
border-radius: 36rpx;
}
.yaoqbtn2 {
color: #fff;
position: absolute;
text-align: center;
line-height: 60rpx;
bottom: 0;
right: 60rpx;
width: 200rpx;
height: 60rpx;
background: linear-gradient(90deg, #64B0F9 0%, #436BF6 59%);
border-radius: 36rpx;
}
.yaoqing {
height: 1200rpx;
}
.PurchasePage {
position: fixed;
bottom: 0;
height: 960rpx;
width: 100%;
background: #FFFFFF;
border-radius: 30rpx 30rpx 0px 0px;
font-size: 36rpx;
padding-bottom: 20rpx;
z-index: 10;
.bodys {
background-color: #FFFFFF;
width: 96%;
margin: 10rpx auto 0;
border-radius: 20rpx;
padding: 15rpx 0 20rpx;
position: relative;
.addressinfo {
font-size: 32rpx;
line-height: 65rpx;
margin-left: 90rpx;
image {
width: 40rpx;
height: 50rpx;
position: absolute;
top: 50%;
left: 20rpx;
transform: translateY(-50%);
}
.address {
padding-top: 10rpx;
width: 92%;
font-size: 30rpx;
word-break: break-all;
line-height: 45rpx;
}
.namephone {
width: 70%;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.picture2 {
position: absolute;
top: 50%;
right: 20rpx;
transform: translateY(-50%);
image {
width: 18rpx;
height: 18rpx;
color: #FFFFFF;
margin-left: 20rpx;
}
}
}
}
.topcontent {
width: 96%;
margin: 0 auto;
padding-bottom: 15rpx;
position: relative;
.goodsStock {
font-size: 24rpx;
position: absolute;
top: 75%;
right: 10rpx;
}
.prices {
position: absolute;
top: 70%;
left: 35%;
.price {
color: #D43953;
}
}
.title {
font-size: 36rpx;
position: absolute;
top: 3%;
left: 35%;
font-weight: 600;
width: 58%;
// height: 85rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
word-break: break-all;
}
.image {
width: 200rpx;
height: 200rpx;
margin: 15rpx 0 0 0;
image {
width: 201rpx;
height: 201rpx;
margin: 7rpx 0 0 7rpx;
}
}
}
.buy {
width: 60%;
height: 71rpx;
background: #4C7BC9;
color: #FFFFFF;
text-align: center;
line-height: 71rpx;
border-radius: 26rpx;
position: absolute;
bottom: 30rpx;
left: 20%;
}
.centercontent {
font-size: 32rpx;
background-color: #FFFFFF;
margin-top: 10rpx;
padding-top: 20rpx;
border-radius: 20rpx;
.header {
margin-bottom: 20rpx;
margin-left: 17rpx;
}
.productmodel {
border: 4rpx solid #FFFFFF;
}
.Productmodel {
background: #ECF1FA;
border: 4rpx solid #4C7BC9;
color: #4C7BC9;
}
.productmodel,
.Productmodel {
background-color: #F6F6F6;
height: 300rpx;
text-align: center;
width: 30%;
font-size: 24rpx;
border-radius: 10rpx;
margin: 5rpx 1.5% 10rpx;
padding: 0 0 10rpx;
view {
background-color: #F6F6F6;
margin: 10rpx auto;
width: 98%;
// height: 90rpx;
border-radius: 10rpx;
font-size: 24rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
image {
border-radius: 10rpx;
width: 100%;
height: 200rpx;
}
}
}
}
.mask {
position: fixed;
bottom: 0;
height: 600rpx;
width: 100%;
background-color: #fff;
z-index: 10;
.maskitems {
color: #fff;
width: 90%;
margin: 60rpx auto 0;
.item {
background: #557BC2;
width: 100%;
margin: 0 auto 20rpx;
height: 150rpx;
position: relative;
font-size: 26rpx;
.btn {
text-align: center;
width: 120rpx;
height: 50rpx;
background: #FFFFFF;
border-radius: 22rpx;
position: absolute;
right: 30rpx;
top: 58rpx;
line-height: 50rpx;
font-size: 28rpx;
color: #557BC2;
}
.text {
position: absolute;
left: 150rpx;
top: 90rpx;
}
.titletext {
position: absolute;
left: 150rpx;
top: 48rpx;
}
image {
margin: 49rpx 0 0 43rpx;
width: 66rpx;
height: 66rpx;
}
}
}
.title {
padding-top: 10rpx;
font-size: 38rpx;
font-weight: 600;
text-align: center;
width: 100%;
}
}
.items {
margin-top: 30rpx;
.item {
width: 92%;
margin: 0 auto 12rpx;
background-color: #FFFFFF;
height: 220rpx;
position: relative;
.text {
font-size: 24rpx;
position: absolute;
left: 220rpx;
top: 90rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis
}
.btn {
position: absolute;
right: 40rpx;
top: 140rpx;
width: 150rpx;
height: 50rpx;
background: #557BC2;
border-radius: 22rpx;
color: #fff;
text-align: center;
font-size: 28rpx;
color: #FFFFFF;
line-height: 50rpx;
}
.jifen {
position: absolute;
left: 220rpx;
top: 140rpx;
font-size: 26rpx;
color: #666666;
}
.title {
width: 460rpx;
font-size: 34rpx;
font-weight: 600;
position: absolute;
left: 220rpx;
top: 25rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis
}
image {
margin: 15rpx 0 0 15rpx;
width: 180rpx;
height: 180rpx;
}
}
}
.titles {
margin: 38rpx 0 0 31rpx;
font-size: 30rpx;
}
.vacancies {
width: 92%;
height: 330rpx;
margin: 0 auto;
position: relative;
color: #fff;
.bottombutton {
position: absolute;
top: 230rpx;
left: 50%;
font-size: 32rpx;
color: #557BC2;
line-height: 72rpx;
text-align: center;
transform: translateX(-50%);
width: 440rpx;
height: 72rpx;
background: #FFFFFF;
border-radius: 36rpx;
}
.centertext {
position: absolute;
top: 160rpx;
width: 100%;
text-align: center;
font-size: 28rpx;
opacity: 0.8;
}
.title {
position: absolute;
left: 50%;
font-size: 70rpx;
top: 90rpx;
transform: translateX(-50%);
}
.righttext {
position: absolute;
top: 32rpx;
right: 31rpx;
font-size: 24rpx;
line-height: 28rpx;
width: 130rpx;
height: 28rpx;
image {
position: absolute;
left: 0;
width: 28rpx;
height: 28rpx;
}
view {
opacity: 0.6;
position: absolute;
right: 0;
}
}
.lefttext {
position: absolute;
top: 32rpx;
left: 33rpx;
font-size: 30rpx;
line-height: 33rpx;
}
image {
width: 100%;
height: 100%;
}
}
}

642
pages/integral/integral.vue Normal file
View File

@ -0,0 +1,642 @@
<template>
<view class="app">
<view class="vacancies">
<image src="../../static/jifenbeij.png" mode=""></image>
<view class="lefttext">
积分余额
</view>
<view class="righttext">
<!-- <image src="../../static/jfgz.png" mode=""></image>
<view class="">
积分规则
</view> -->
</view>
<view class="title">
{{list.integral}}
</view>
<view class="centertext">
<!-- 20积分将于2022.01.01过期 -->
</view>
<view class="bottombutton" @tap='gainshow=true'>
获取积分
</view>
</view>
<view class="titles">
积分兑换
</view>
<view class="items" v-if="goodslist.length>0">
<view class="item" v-for="(item,index) in goodslist" :key="index">
<image :src="item.attributePitureUrl" mode=""></image>
<view class="title">
{{item.goodsName}}
</view>
<view class="text">
{{item.integralExchangeCount}}{{item.goodsUnit}}
</view>
<view class="jifen">
需使用
<span style='padding: 0 5rpx;'> {{item.integralExchangeSill}}</span>
积分兑换
</view>
<view class="btn" @tap='buyshowtrue(item)'>
立即兑换
</view>
</view>
</view>
<view class="noorder" v-else>
<u-empty mode="list" icon-size='220' text='暂无可兑换商品'></u-empty>
</view>
<u-mask :show="gainshow" @click="gainshow = false">
<view class="mask" @click.stop="">
<image class="close" src="../../static/gb.png" mode="" @tap='gainshow=false'></image>
</image>
<view class="title">
获取方式
</view>
<view class="maskitems">
<view class="item">
<image src="../../static/qiandao.png" mode=""></image>
<view class="titletext">
累计签到
<span style='padding: 0 5rpx;'> {{list.totalSignInDays}}</span>
(当前签到
<span style='padding: 0 5rpx;'> {{list.patientSignInCount}}</span>)
</view>
<view class="text">
<span style='padding: 0 5rpx;'> {{list.signInCount}}</span>积分
</view>
<view class="btn" @tap='signIninfo' v-if='list.todaySignInCount==0&&list.totalSignInDays>0'>
签到
</view>
<view class="btn" v-if='list.todaySignInCount==1'>
已签到
</view>
</view>
<view class="item" style="background-color: #F44B2F;">
<image src="../../static/yaoqing.png" mode=""></image>
<view class="titletext">
每邀请
<span style='padding: 0 5rpx;'> 1</span>
位好友
</view>
<view class="text">
<span style='padding: 0 5rpx;'> {{list.inviteFriends}}</span>积分
</view>
<view class="btn" style="color: #F44B2F;" @tap='yaoqingshowtrue' v-if='list.inviteFriends>0'>
去完成
</view>
</view>
</view>
</view>
</u-mask>
<u-mask :show="buyshow" @click="buyshow = false">
<view class="PurchasePage" @click.stop='' v-if="goodsitem">
<image class="close" src="../../static/gb.png" mode="" @tap='buyshow=false'></image>
</image>
<view class="topcontent" style="width: 96%;">
<view class="image">
<image :src="goodsitem.goodsPictureUrl" mode=""></image>
</view>
<view class="title" v-if="goodsitem.goodsName">
{{goodsitem.goodsName}}
</view>
<view class="title" v-else>
暂无
</view>
<view class="prices">
<span class="price">
{{goodsitem.integralExchangeSill}}积分
</span>
</view>
<view class="goodsStock">
库存数量:{{goodsitem.goodsStock}}
</view>
</view>
<view class="bodys" @tap='upaddress()'>
<view class="addressinfo">
<image src="../../static/locatinsmall.png" mode=""></image>
<span v-if="loginFlag">
<view class="namephone" v-if='userid'>
{{updata.receiver}},{{updata.phone}}
</view>
<view class="address" v-if='userid'>
{{updata.receiveAddress}}
</view>
</span>
<view class="namephone" v-else>
前往完善个人信息
</view>
<view class="picture2">
<u-icon name="arrow-right" color="black" size="28"></u-icon>
</view>
</view>
</view>
<view class="centercontent topcontent">
<view class="header">
商品规格
</view>
<view style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<view class="Productmodel productmodel">
<image :src="goodsitem.attributePitureUrl" mode=""></image>
<view class="">
{{goodsitem.integralExchangeCount}}{{goodsitem.goodsUnit}}
</view>
</view>
</view>
</view>
<view class="buy" @tap="upbuy">
立即兑换
</view>
</view>
</u-mask>
<!-- <u-popup v-model="yaoqingshow" mode="center" :closeable='true' :close='yaoqingshowfalse'>
<view class="yaoqing">
<r-canvas ref="rCanvas" v-if="yaoqingshow"></r-canvas>
</view>
<view class="yaoqbtn" @tap='draw'>
保存到相册
</view>
<view class="yaoqbtn2" @tap='fenx'>
分享给好友
</view>
</u-popup> -->
<u-mask :show="usershow" class='masks'>
<view class="information">
<image src="../../static/information.png" mode=""></image>
<view class="title">
请完善个人信息
</view>
<view class="cancel" @tap='usershow=false'>
取消
</view>
<view class="determine" @tap='goinformation'>
去完善
</view>
</view>
</u-mask>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
signIn,
selectPatientSignIn,
selectExchangeGoods,
integralGoodsOrder
} from '@/api/integral/index.js'
import {
inviteFriends
} from '@/api/Personal/Personal.js';
import {
goodPatientInfo
} from '@/api/modifyAddress/modifyAddress.js';
import {
AppIdentification
} from '@/api/AppIdentification/index.js'
import baseurl from '../../api/baseurl';
import rCanvas from "@/components/r-canvas/r-canvas.vue"
export default {
components: {
rCanvas
},
data() {
return {
timer: null,
baseurl: '',
patientId: null,
integral: 0,
usershow: false, //go
gainshow: false, //
buyshow: false, //
yaoqingshow: false,
yaoqingimg: null,
yapqingbeijingimg: null,
list: {
integral: 0
},
inviteimg: null, //
pageNum: 1,
pageSize: 10,
goodstotal: 0,
goodslist: [],
goodsitem: null,
userid: null,
updata: {
"orderChannel": 'WECHAT_APPLET',
"originalTotalPrice": null,
"integralExchangeSill": null,
"integralExchangeCount": null,
"orderType": "INTEGRAL_EXCHANGE",
"buySource": "SHOPPING_MALL",
"integralDeductionCount": null,
"attributeDetailsId": null,
"discountPrice": null,
"giveIntegral": null,
"goodsAttributeContent": null,
"goodsAttributeDetailsId": null,
"goodsAttributeId": null,
"goodsAttributeName": null,
"goodsCount": null,
"goodsName": null,
"goodsPrice": null,
"goodsStock": null,
"nurseStationId": null,
"patientId": null,
"phone": "18963146613",
"receiveAddress": null,
"receiver": null,
},
loginFlag: false,
};
},
onLoad(options) {
this.pageNum = 1
this.baseurl = baseurl
this.integral = options.integral
var that = this
this.selectExchangeGoodsinfo();
const value = uni.getStorageSync('patientId');
if (value) {
that.patientId = value
that.updata.patientId = value
that.user();
that.selectPatientSignInifo();
}
},
onShow() {
this.pageNum = 1
this.selectExchangeGoodsinfo();
this.baseurl = baseurl
this.yapqingbeijingimg = baseurl + '/profile/appletPicture/inviteFriendsTwo.png'
var that = this
const value = uni.getStorageSync('patientId');
if (value) {
AppIdentification(value).then(res => {
if (res.code == 200) {
if (res.data.loginFlag) {
that.loginFlag = true
}
}
})
that.updata.patientId = value
goodPatientInfo(value).then(res => {
if (res.code == 200) {
if (res.data.length > 0) {
var user = res.data.filter(e => e.id == that.userid)
if (user.length >= 1) {
that.updata.receiver = user[0].receiveName
that.updata.receiveAddress = user[0].areaName + user[0].receiveAddress
that.updata.phone = user[0].receivePhone
that.userid = user[0].id
} else {
that.updata.receiver = res.data[0].receiveName
that.updata.receiveAddress = res.data[0].areaName + res.data[0].receiveAddress
that.updata.phone = res.data[0].receivePhone
that.userid = res.data[0].id
}
}
}
})
} else {}
let useritem = null
uni.$on('updata', function(data) {
if (data.useritem) {
useritem = JSON.parse(data.useritem)
that.updata.receiver = useritem.receiveName
that.updata.phone = useritem.receivePhone
that.updata.receiveAddress = useritem.areaName + useritem.receiveAddress
that.userid = useritem.id
}
})
},
methods: {
yaoqingshowtrue() {
// this.yaoqingshow = true
// this.$nextTick(async () => {
// await inviteFriends(this.patientId).then(res => {
// this.inviteimg = res.msg
// })
// uni.showLoading({
// title: ''
// });
// //
// await this.$refs.rCanvas.init({
// canvas_id: "rCanvas"
// })
// //
// await this.$refs.rCanvas.drawImage({
// url: this.yapqingbeijingimg,
// x: 0,
// y: 0,
// w: 300,
// h: 530
// }).catch(err_msg => {
// uni.showToast({
// title: err_msg,
// icon: "none"
// })
// })
// await this.$refs.rCanvas.drawImage({
// url: baseurl + this.inviteimg,
// x: 85,
// y: 340,
// w: 130,
// h: 130
// }).catch(err_msg => {
// uni.showToast({
// title: err_msg,
// icon: "none"
// })
// })
// //
// await this.$refs.rCanvas.drawText({
// text: "怀",
// x: 150,
// y: 300,
// font_color: "#444444",
// font_size: 12,
// font_weight: 600,
// text_align: 'center'
// }).catch(err_msg => {
// uni.showToast({
// title: err_msg,
// icon: "none"
// })
// })
// await this.$refs.rCanvas.drawText({
// text: "",
// x: 150,
// y: 320,
// font_color: "#444444",
// font_size: 12,
// font_weight: 600,
// text_align: 'center'
// }).catch(err_msg => {
// uni.showToast({
// title: err_msg,
// icon: "none"
// })
// })
// await this.$refs.rCanvas.drawText({
// text: "",
// x: 150,
// y: 500,
// font_color: "#444444",
// font_size: 10,
// text_align: 'center'
// }).catch(err_msg => {
// uni.showToast({
// title: err_msg,
// icon: "none"
// })
// })
// await this.$refs.rCanvas.drawText({
// text: "",
// x: 150,
// y: 515,
// font_color: "#444444",
// font_size: 7,
// text_align: 'center'
// }).catch(err_msg => {
// uni.showToast({
// title: err_msg,
// icon: "none"
// })
// })
// //
// await this.$refs.rCanvas.draw((res) => {
// this.yaoqingimg = res.tempFilePath
// uni.hideLoading();
// //res.tempFilePathbase64
// //
// // this.$refs.rCanvas.saveImage(res.tempFilePath)
// })
// })
},
//
draw() {
//
this.$refs.rCanvas.saveImage(this.yaoqingimg).then(res => {
uni.showToast({
title: '保存成功',
duration: 2000
});
}).catch(err => {
uni.showToast({
icon: 'error',
title: '保存失败',
duration: 2000
});
})
},
//
fenx() {
wx.showShareImageMenu({
path: this.yaoqingimg,
})
},
yaoqingshowfalse() {
this.yapqingshow = false;
this.$nextTick(async () => {
await this.$refs.rCanvas.clearCanvas((res) => {})
await this.$refs.rCanvas.setCanvasWidth(0)
await this.$refs.rCanvas.setCanvasHeight(0)
})
},
//
upbuy() {
var that = this
this.updata.goodsCount = this.updata.integralExchangeCount
const value = uni.getStorageSync('patientId');
if (value) {
AppIdentification(value).then(res => {
if (res.code == 200) {
if (res.data.loginFlag) {
integralGoodsOrder(that.updata).then(res => {
if (res.code == 200) {
that.selectPatientSignInifo();
that.$refs.uToast.show({
title: '兑换商品成功',
type: 'success',
url: `/pages/orderDetails/orderDetails?goodsOrderId=${res.data.id}`
})
that.buyshow = false
} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
})
}
})
} else {
that.usershow = true
}
} else {
that.$refs.uToast.show({
title: '请先登录',
type: 'error',
duration: '2000',
url: '/pages/login/login'
})
}
})
} else {
that.$refs.uToast.show({
title: '请先登录',
type: 'error',
duration: '2000',
url: '/pages/login/login'
})
}
},
//
upaddress() {
if (this.updata.receiver) {
uni.navigateTo({
url: `/pages/modifyAddress/modifyAddress?updata=${JSON.stringify(this.updata)}`
})
} else {
const value = uni.getStorageSync('patientId');
if (value) {
uni.navigateTo({
url: '/pages/information/information'
})
} else {
this.$refs.uToast.show({
title: '未登录,请先登录',
type: 'error',
url: '/pages/login/login'
})
}
}
},
///
buyshowtrue(item) {
this.buyshow = true
this.goodsitem = item
this.updata.nurseStationId = item.nurseStationId
this.updata.goodsAttributeName = this.goodsitem.attributeDetailsName
this.updata.goodsAttributeId = this.goodsitem.goodsAttributeId
this.updata.goodsAttributeDetailsId = this.goodsitem.attributeDetailsId
this.updata.integralExchangeSill = this.goodsitem.integralExchangeSill
this.updata.integralExchangeCount = this.goodsitem.integralExchangeCount
this.updata.originalTotalPrice = 0
this.updata.goodsStock = this.goodsitem.goodsStock
this.updata.goodsName = this.goodsitem.goodsName
this.updata.goodsPrice = this.goodsitem.goodsPrice
this.updata.goodsCount = 1
},
//
selectExchangeGoodsinfo() {
this.pageNum = 1
selectExchangeGoods(this.pageNum, this.pageSize).then(res => {
res.rows.forEach(e => {
e.goodsPictureUrl = baseurl + e.goodsPictureUrl
e.attributePitureUrl = baseurl + e.attributePitureUrl
})
this.goodslist = res.rows
this.goodstotal = res.total
})
},
//
selectPatientSignInifo() {
selectPatientSignIn(this.patientId).then(res => {
this.list = res.data
})
},
//
signIninfo() {
var that = this
const value = uni.getStorageSync('patientId');
if (value) {
AppIdentification(value).then(res => {
if (res.code == 200) {
if (res.data.loginFlag) {
signIn(value).then(res => {
if (res.code == 200) {
that.selectPatientSignInifo();
that.$refs.uToast.show({
title: '今日签到成功',
type: 'success',
duration: '1000',
})
} else {
that.$refs.uToast.show({
title: '签到失败',
type: 'error',
duration: '1000',
})
}
})
} else {
that.usershow = true
}
} else {
that.$refs.uToast.show({
title: '请先登录',
type: 'error',
duration: '2000',
url: '/pages/login/login'
})
}
})
} else {
that.$refs.uToast.show({
title: '请先登录',
type: 'error',
duration: '2000',
url: '/pages/login/login'
})
}
},
//
user() {
goodPatientInfo(this.patientId).then(res => {
if (res.data.length > 0) {
var list = res.data.filter(e => e.defaultAddressFlag == 1)
if (list.length >= 1) {
this.updata.receiver = list[0].receiveName
this.updata.receiveAddress = list[0].areaName + list[0].receiveAddress
this.updata.phone = list[0].receivePhone
this.userid = list[0].id
} else {
this.updata.receiver = res.data[0].receiveName
this.updata.receiveAddress = res.data[0].areaName + res.data[0].receiveAddress
this.updata.phone = res.data[0].receivePhone
this.userid = res.data[0].id
}
}
})
},
//
goinformation() {
this.usershow = false
uni.navigateTo({
url: '/pages/information/information'
})
},
},
onReachBottom() { //
if (this.goodslist.length >= this.goodstotal) {} else {
this.pageNum++;
selectExchangeGoods(this.pageNum, this.pageSize).then(res => {
res.rows.forEach(e => {
e.goodsPictureUrl = baseurl + e.goodsPictureUrl
this.goodslist.push(e)
})
})
}
},
onPullDownRefresh() { //
this.pageNum = 1;
this.selectExchangeGoodsinfo();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>
<style lang="scss">
@import "./integral.scss";
</style>

View File

@ -1,83 +1,418 @@
<template>
<view class="app">
<view class="concent">
<view class="background">
<image src="/static/logo.png" mode=""></image>
<view class="detailed">
敬请期待
<view class="tabs">
<view class="tab-item">
<view class="title">
</view>
<view class="text">
{{total}}
</view>
</view>
</view>
<view class="content">
<view class="statuss">
<!-- <view class="statusitem" @tap="changingcoupon('WAIT_RECEIVE')"
:style="couponstatus=='WAIT_RECEIVE'?'color: #F44B2F;':''">
未领取
</view>
<span> |</span>
<view class="statusitem" @tap="changingcoupon('NOT_USED')"
:style="couponstatus=='NOT_USED'?'color: #F44B2F;':''">
未使用
</view>
<span> |</span>
<view class="statusitem" @tap="changingcoupon('USED')"
:style="couponstatus=='USED'?'color: #F44B2F;':''">
已使用
</view>
<span> |</span>
<view class="statusitem" @tap="changingcoupon('EXPIRED')"
:style="couponstatus=='EXPIRED'?'color: #F44B2F;':''">
已过期
</view> -->
</view>
<view class="rollup" v-if="couponlist.length > 0">
<view class="item" v-for="(item,index) in couponlist" :key="index"
:style="item.useStatus!='NOT_USED'?'height:180rpx':''">
<view class="top"
:style="item.useStatus!='NOT_USED'&&item.useStatus!='WAIT_RECEIVE'?'background: #EFECEC;color: #4B4B4B;':''">
<view class="title">
<span class="text">
</span>
<span class="price">
{{item.couponPrice}}
</span>
</view>
<view class="what"
:style="item.useStatus!='NOT_USED'&&item.useStatus!='WAIT_RECEIVE'?'background: #DADADA;;':''">
{{item.couponTitle}}
</view>
<view class="texts">
{{item.couponConsumePrice}}可用
</view>
<view class="time" v-if="item.useStatus!='WAIT_RECEIVE'">
有效期至{{item.expirationEndTime}}
</view>
<view class="btn" v-if="item.useStatus=='WAIT_RECEIVE'" @tap='logininfo(item)'>
{{item.useStatus=='WAIT_RECEIVE'?'领取':''}}
</view>
<view class="btngq" v-if="item.useStatus!='NOT_USED'&&item.useStatus!='WAIT_RECEIVE'">
{{item.useStatus=='EXPIRED'?'已过期':''}}
{{item.useStatus=='USED'?'已使用':''}}
</view>
<view class="btn" v-if="item.useStatus=='NOT_USED'" @tap='goshoping'>
{{item.useStatus=='NOT_USED'?'使用':''}}
</view>
</view>
<view class="bottom" v-if="item.useStatus=='NOT_USED'">
领取来源{{item.receiveSource =='NEW_PEOPLE_WELFARE'?'新人福利':''}}
{{item.receiveSource =='EVENT_GIFT'?'活动赠送':''}}
{{item.receiveSource =='CONSUME_REBATE'?'消费返券':''}}
</view>
</view>
</view>
<view class="noorder" v-else>
<u-empty mode="coupon" icon-size='220'></u-empty>
</view>
</view>
<u-mask :show="usershow" class='mask'>
<view class="information">
<image src="../../static/information.png" mode=""></image>
<view class="title">
请完善个人信息
</view>
<view class="cancel" @tap='usershow=false'>
取消
</view>
<view class="determine" @tap='goinformation'>
去完善
</view>
</view>
</u-mask>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
couponByUseStatus,
insertCouponReceive
} from '@/api/materialbenefits/index.js'
import {
AppIdentification
} from '@/api/AppIdentification/index.js'
export default {
data() {
return {
item: null,
usershow: false,
pageNum: 1,
pageSize: 10,
couponlist: [],
total: 0,
couponstatus: '', //
patientId: null,
};
},
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
onShow() {
this.pageNum = 1
var that = this
const value = uni.getStorageSync('patientId');
if (value) {
that.patientId = value
that.getlist();
} else {
that.patientId = ''
that.getlist();
}
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
methods: {
logininfo(item) {
var that = this
this.item = item
const value = uni.getStorageSync('patientId');
if (value) {
AppIdentification(value).then(res => {
if (res.code == 200) {
if (res.data.loginFlag) {
insertCouponReceive(value, item.couponId).then(res => {
that.getlist();
})
} else {
this.usershow = true
}
} else {
that.$refs.uToast.show({
title: '请先登录',
type: 'error',
duration: '2000',
url: '/pages/login/login'
})
}
})
} else {
that.$refs.uToast.show({
title: '请先登录',
type: 'error',
duration: '2000',
url: '/pages/login/login'
})
}
},
getlist() {
this.pageNum = 1
couponByUseStatus(this.pageNum, this.pageSize, this.patientId).then(res => {
this.couponlist = res.rows
this.total = res.total
})
},
changingcoupon(item) {
if (this.couponstatus == item) {
this.couponstatus = ''
} else {
this.couponstatus = item
}
this.getlist();
},
//
goinformation(item) {
this.usershow = false
uni.navigateTo({
url: `/pages/information/information?couponId=${this.item.couponId}`
})
},
goshoping() {
uni.navigateTo({
url: '/pages/shopping/shopping'
})
},
},
onReachBottom() { //
if (this.couponlist.length >= this.total) {} else {
this.pageNum++;
couponByUseStatus(this.pageNum, this.pageSize, this.patientId).then(res => {
res.rows.forEach(e => {
this.couponlist.push(e)
})
})
}
},
onPullDownRefresh() { //
this.pageNum = 1;
this.getlist();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>
<style lang="scss">
.app {
padding-top: 10rpx;
font-size: 34rpx;
padding: 0;
.concent {
width: 701rpx;
height: 440rpx;
background: #4C7BC9;
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
margin: 5% auto 20px;
.noorder {
margin-top: 100rpx;
}
.background {
position: relative;
width: 657rpx;
.mask {
.information {
width: 70%;
height: 400rpx;
margin: 50% auto;
background: #FFFFFF;
border-radius: 25rpx;
background-color: white;
margin: 0 auto;
top: 50%;
transform: translateY(-50%);
border-radius: 30rpx;
text-align: center;
color: #FFFFFF;
position: relative;
.determine,
.cancel {
width: 200rpx;
height: 70rpx;
border-radius: 26rpx;
font-size: 34rpx;
line-height: 70rpx;
position: absolute;
top: 74%;
}
.determine {
background: #4C7BC9;
right: 36rpx;
}
.cancel {
background: #C5BFBF;
left: 36rpx;
}
.title {
font-size: 42rpx;
margin-top: 40rpx;
color: #000000;
}
image {
width: 178rpx;
height: 160rpx;
background: #FFFFFF;
border-radius: 25px;
margin-left: 68%;
margin-top: 0;
width: 100rpx;
height: 100rpx;
margin: 10% 0 0 0;
}
}
}
.content {
width: 96%;
margin: 20rpx auto 0;
background-color: #fff;
padding-bottom: 100rpx;
.rollup {
border-radius: 5rpx;
.item {
width: 94%;
height: 240rpx;
margin: 20rpx auto 0;
border: 1rpx solid #f4f5f7;
border-radius: 10rpx;
.bottom {
font-size: 22rpx;
color: #969394;
line-height: 60rpx;
padding-left: 25rpx;
border-radius: 0 0 10rpx 10rpx;
}
.top {
width: 100%;
height: 180rpx;
background: #FDE9E8;
position: relative;
color: #F44B2F;
border-radius: 10rpx 10rpx 0 0;
.what {
padding: 0 10rpx;
height: 40rpx;
background: #FED1D2;
border-radius: 16rpx;
font-size: 20rpx;
line-height: 40rpx;
text-align: center;
position: absolute;
top: 120rpx;
left: 20rpx;
}
.btngq {
width: 109rpx;
height: 180rpx;
background: #DFDEDE;
position: absolute;
top: 0;
right: 0;
text-align: center;
line-height: 180rpx;
}
.btn {
width: 98rpx;
height: 50rpx;
border: 2rpx solid #F44B2F;
border-radius: 24rpx;
font-size: 24rpx;
position: absolute;
top: 70rpx;
right: 20rpx;
text-align: center;
line-height: 49rpx;
}
.time {
font-size: 24rpx;
position: absolute;
top: 120rpx;
left: 200rpx;
}
.texts {
font-size: 32rpx;
font-weight: 800;
position: absolute;
top: 44rpx;
left: 200rpx;
}
.title {
position: absolute;
top: 30rpx;
left: 10rpx;
.price {
font-size: 54rpx;
font-weight: 700;
}
.text {
font-weight: 600;
font-size: 34rpx;
}
}
}
}
}
.statuss {
padding-top: 25rpx;
span {
color: #c1c1c1;
font-size: 18rpx;
line-height: 60rpx;
}
.statusitem {
text-align: center;
padding: 0 40rpx;
display: inline-block;
height: 60rpx;
font-size: 30rpx;
color: #969394;
line-height: 60rpx;
}
}
}
.tabs {
width: 100%;
.tab-item {
margin: 20rpx 0 0 24rpx;
text-align: center;
width: 20%;
.text {
width: 70%;
margin-left: 15%;
height: 30rpx;
background: #F44B2F;
border-radius: 9rpx;
color: #fff;
font-size: 24rpx;
line-height: 30rpx;
}
.title {
font-size: 40rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #F44B2F;
line-height: 59rpx;
}
}
}
}
.detailed {
padding: 0 20rpx;
line-height: 56rpx;
text-align: center;
}
</style>

View File

@ -0,0 +1,220 @@
.app{
padding: 0%;
margin-top: 390rpx;
.mask {
.information {
width: 70%;
height: 400rpx;
margin: 50% auto;
background: #FFFFFF;
border-radius: 30rpx;
text-align: center;
color: #FFFFFF;
position: relative;
.determine,
.cancel {
width: 200rpx;
height: 70rpx;
border-radius: 26rpx;
font-size: 34rpx;
line-height: 70rpx;
position: absolute;
top: 74%;
}
.determine {
background: #4C7BC9;
right: 36rpx;
}
.cancel {
background: #C5BFBF;
left: 36rpx;
}
.title {
font-size: 42rpx;
margin-top: 40rpx;
color: #000000;
}
image {
width: 100rpx;
height: 100rpx;
margin: 10% 0 0 0;
}
}
}
.swiper {
position: fixed;
top:88rpx;
width: 100%;
height: 380rpx;
z-index: 999;
.swiper-box {
width: 100%;
height: 380rpx;
}
.swiper-item {
height: 380rpx;
text-align: center;
image {
width: 100%;
height: 380rpx !important;
z-index: 999;
}
}
video {
height: 100%;
width: 100%;
}
}
.hospital {
width: 97%;
margin: 0 auto;
height: 100%;
background-color: #fff;
.appointmenthospital {
height: 90rpx;
font-size: 35rpx;
line-height: 90rpx;
border-bottom: 1rpx solid #D8D4D4;
width: 94%;
margin: 0 auto;
font-weight: 600;
}
.tabbar {
display: flex;
height: calc(100vh - 470rpx);
width: 100%;
.lefttabbar {
width: 30%;
// display: inline-block;
height: 100%;
padding-top: 20rpx;
.lefttabbarlist {
overflow: scroll;
-webkit-overflow-scrolling: touch;
height: 100%;
.actives {
width: 80%;
color: red;
font-size: 34rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin: 0 auto;
line-height: 80rpx;
border-bottom: 1rpx solid #D8D4D4;
text-align: center;
font-size: 30rpx;
// border-radius: 25rpx 0 0 25rpx;
}
.active {
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
font-size: 30rpx;
white-space: nowrap;
border-bottom: 1rpx solid #D8D4D4;
width: 80%;
margin: 0 auto;
line-height: 80rpx;
}
}
}
.righttabbar {
width: 70%;
height: 100%;
.productlist {
padding-bottom: 40rpx;
overflow: scroll;
-webkit-overflow-scrolling: touch;
width: 100%;
height: 100%;
margin: 0 auto;
border-radius: 25rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
background-color: #ffffff;
.content {
height: 500rpx;
position: relative;
width: 100%;
border-bottom: 1rpx solid #D8D4D4;
.hospitalimage {
position: absolute;
width: 120rpx;
height: 150rpx;
top: 30rpx;
left: 30rpx;
}
.hospitalteacher {
font-size: 36rpx;
position: absolute;
top: 60rpx;
left: 180rpx;
}
.physician {
font-size: 24rpx;
color: #666666;
position: absolute;
top: 120rpx;
left: 183rpx;
}
.words {
white-space: normal;
word-break: break-all;
margin-left: 41rpx;
width: 85%;
margin-top: 190rpx;
text-indent: 2em;
font-size: 30rpx;
line-height: 55rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
}
.appointment {
position: absolute;
bottom: 25rpx;
right: 30rpx;
width: 125rpx;
height: 52rpx;
background: #F44B2F;
border-radius: 26rpx;
color: #fff;
line-height: 52rpx;
text-align: center;
}
}
}
}
}
}
}

View File

@ -1,106 +1,270 @@
<template>
<view class="app">
<view class="concent">
<view class="background">
<image src="/static/logo.png" mode=""></image>
<view>
<view class="detailed">
<view>
互联网+医疗健康高速发展的当下以远程诊疗大数据人工智能为代表的新技术应用越来越多的应用在医疗健康服务当中依托三甲专家团队赋能基层医疗打造的全闭环商业模式实现物联网化医生联合体布局提供数字化远程医疗解决方案提升基层医疗水平提高医疗效率降低看病成本
平台将全力打造智慧诊所为基层全科医生医提供物联网可穿戴式医疗设备基层医生负责操作收集医生集团的三甲专家远程出具诊断报告有效将三甲医院医生基层医生与患者连接从而更加方便快捷高效随时随地满足患者的长期医疗需求可以为基层医生解决技术缺陷设备不足等难题遇到病情紧急严重的还可以打开绿色就医通道进行转诊服务
<view class="swiper">
<swiper :indicator-dots="false" indicator-color='#fff' indicator-active-color='#0086d6' :autoplay="autoplay"
:interval="2000" :duration="1000" class="swiper-box" :circular='true' @change="swiperChange">
<swiper-item v-for="(item ,index) in swiperImgUrls" :key="index">
<view class="swiper-item" v-show="!splits(item)" wx-if="{item}">
<image v-if="item" :src="item" mode="widthFix"></image>
</view>
<view class="swiper-item" v-show="splits(item)" v-if="item">
<video :id="'myVideo'+index" :autoplay="false" :src="item" controls show-fullscreen-btn
object-fit="fill" @play="play" @pause="pause" @ended="ended" auto-pause-if-navigate
show-play-btn :enable-progress-gesture='true' :show-center-play-btn='true'
enable-play-gesture auto-pause-if-open-native show-mute-btn></video>
</view>
</swiper-item>
</swiper>
</view>
<view class="hospital">
<view class="appointmenthospital">预约医生</view>
<view class="tabbar" v-if="hospitalDepartmentList.length>0">
<view class="lefttabbar" @touchstart="start" @touchend="end" @touchmove="move">
<view class="lefttabbarlist">
<view v-for="(item,index) in hospitalDepartmentList" :key="index"
:class="tabIndex==index?'actives':'active'" @tap='taptabindex(item,index)'>
{{item.departmentName}}
</view>
</view>
</view>
<view class="righttabbar">
<view class="productlist" @touchstart="start" @touchend="end" @touchmove="move"
v-if="HospitalPersonlist.length>0">
<view class="content" v-for="(item,index) in HospitalPersonlist" :key="item.id">
<image class="hospitalimage" v-if="item.personPictureUrl"
:src="baseurl+item.personPictureUrl" mode=""></image>
<image class="hospitalimage" v-else src="@/static/yis.png" mode=""></image>
<view class="hospitalteacher">{{item.personName}}</view>
<view class="physician">
{{ item.academicTitle=='CHIEF_PHYSICIAN'?'主任医师':''}}
{{ item.academicTitle=='DEPUTY_CHIEF_PHYSICIAN'?'副主任医师':''}}
{{ item.academicTitle=='ATTENDING_DOCTOR'?'主治医师':''}}
{{ item.academicTitle=='PHYSICIAN'?'医师':''}}
{{ item.academicTitle=='HEALER'?'医士':''}}
</view>
<view class="words">{{item.personIntroduce}}
</view>
<view class="appointment" @tap="goappointment(item)">
预约
</view>
</view>
</view>
<view v-else style='margin-top: 100rpx;'>
<u-empty text="暂无" mode="search" icon-size='220'></u-empty>
</view>
</view>
</view>
<view v-else style='margin-top: 100rpx;padding-bottom: 200rpx;'>
<u-empty text="暂无" mode="search" icon-size='220'></u-empty>
</view>
</view>
<u-mask :show="usershow" class='mask'>
<view class="information">
<image src="../../static/information.png" mode=""></image>
<view class="title">
请完善个人信息
</view>
<view class="cancel" @tap='usershow=false'>
取消
</view>
<view class="determine" @tap='goinformation'>
去完善
</view>
</view>
</u-mask>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
AppIdentification
} from '@/api/AppIdentification/index.js'
import {
selectDepartment,
selectHospitalPerson
} from '@/api/medicine/index.js'
import baseurl from '../../api/baseurl';
export default {
data() {
return {};
return {
usershow: false, //
baseurl: '',
swiperImgUrls: [],
autoplay: true, //
hospitalDepartmentList: [], //
hospitalDepartmenttotal: 0,
HospitalPersonlist: [], //
HospitalPersontotal: 0,
tabIndex: 0,
departmentId: null, //id
DepartmentpageNum: 1,
DepartmentpageSize: 100,
personpageNum: 1,
pageSize: 10,
startData: {
clientX: '',
clientY: '',
},
touch: {},
};
},
methods: {
move(event) { //@touchmove
let touch = event.touches[0]; // Objcet
this.touch = touch;
},
// touch
start(e) { //@touchstart
this.startData.pageY = e.changedTouches[0].pageY; //Y
},
end(e) { //@touchend
if ((this.startData.pageY - this.touch.pageY) > 100) { //
if (this.hospitalDepartmentList.length >= this.hospitalDepartmenttotal) {} else {
this.DepartmentpageNum++;
//
selectDepartment(this.DepartmentpageNum, this.DepartmentpageSize).then(res => {
res.rows.forEach(e => {
this.hospitalDepartmentList.push(e)
})
})
}
if (this.HospitalPersonlist.length >= this.HospitalPersontotal) {} else {
this.personpageNum++;
//
selectHospitalPerson(this.personpageNum, this.pageSize, this.departmentId).then(res => {
res.rows.forEach(e => {
this.HospitalPersonlist.push(e)
})
})
}
} else {
// this.touch = {};
}
},
//
selectHospitalPersonInfo() {
this.personpageNum = 1
selectHospitalPerson(this.personpageNum, this.pageSize, this.departmentId).then(res => {
this.HospitalPersonlist = res.rows
this.HospitalPersontotal = res.total
})
},
//tap
taptabindex(item, index) {
this.tabIndex = index
if (this.departmentId != item.departmentId) {
this.departmentId = item.departmentId
this.selectHospitalPersonInfo();
}
},
//
selectDepartmentinfo() {
this.DepartmentpageNum = 1
this.swiperImgUrls = []
selectDepartment(this.DepartmentpageNum, this.DepartmentpageSize).then(res => {
this.hospitalDepartmentList = res.rows
this.hospitalDepartmenttotal = res.total
res.rows[0].poserInfoList.forEach(e => {
e.image = baseurl + e.posterPictureUrl
this.swiperImgUrls.push(e.image)
})
this.departmentId = this.hospitalDepartmentList[0].departmentId
this.selectHospitalPersonInfo();
if (this.swiperImgUrls.length == 0) {
var img = baseurl + '/profile/appletPicture/healthy.png'
this.swiperImgUrls.push(img)
}
})
},
swiperChange(e) {
this.currentIndex = e.detail.current
let {
current,
source
} = e.detail
this.videoContext = uni.createVideoContext('myVideo' + (current - 1));
//
if (source === 'touch') {
this.videoContext.pause(); //
this.autoplay = true
}
},
//
GetBanner() {},
// banner
splits(url) {
if (url.indexOf('.') != -1) {
var ext = url.substring(url.lastIndexOf('.') + 1);
return ['mp4', 'webm', 'mpeg4', 'ogg'].indexOf(ext) != -1
}
},
// /
play() {
this.autoplay = false
// this.videoContext.requestFullScreen()
},
//
pause() {
this.autoplay = true
},
//
ended() {
this.autoplay = true
},
//
godoctorslist() {
// uni.navigateTo({
// url: '/pages/doctorslist/doctorslist'
// })
goappointment(item) {
let that = this
const value = uni.getStorageSync('patientId');
if (value) {
AppIdentification(value).then(res => {
if (res.code == 200) {
if (res.data.loginFlag) {
that.usershow = false
uni.navigateTo({
url: `/pages/confirmation/confirmation?price=${item.consultingFee}&hospitalPersonId=${item.id}&&personName=${item.personName}`
})
} else {
that.usershow = true
}
} else if (res.code == 9999) {} else {
that.$refs.uToast.show({
title: res.msg,
type: 'error',
url: '/pages/login/login'
})
}
})
} else {
that.$refs.uToast.show({
title: '未登录,请先登录',
type: 'error',
url: '/pages/login/login'
})
}
},
//
goinformation() {
this.usershow = false
uni.navigateTo({
url: '/pages/information/information'
})
},
},
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
onLoad() {
this.DepartmentpageNum = 1
this.personpageNum = 1
this.baseurl = baseurl
this.selectDepartmentinfo()
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
onShow() {
this.DepartmentpageNum = 1
this.personpageNum = 1
this.usershow = false
},
}
</script>
<style lang="scss">
.app {
.cards {
padding: 40rpx 0 500rpx 0;
.item {
image {
width: 80rpx;
height: 80rpx;
}
}
}
.concent {
width: 701rpx;
height: 100%;
background: #4C7BC9;
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
margin: 5% auto 20px;
padding: 30rpx 0;
.background {
position: relative;
width: 657rpx;
height: 100%;
background: #FFFFFF;
border-radius: 25rpx;
background-color: white;
margin: 0 auto;
image {
width: 178rpx;
height: 160rpx;
background: #FFFFFF;
border-radius: 25px;
margin-left: 68%;
}
}
}
.detailed {
width: 657rpx;
height: 100%;
padding: 0 42rpx 20rpx;
line-height: 56rpx;
}
.detailed view {
text-indent: 2em;
}
}
@import "./medicine.scss";
</style>

View File

@ -82,17 +82,6 @@
padding-bottom: 60rpx;
.noorder{
margin-top: 90rpx;
image{
display: block;
margin: 0 auto;
width: 100rpx;
height: 120rpx;
}
view{
text-align: center;
font-size: 36rpx;
color: #BFBFBF;
}
}
.item {
width: 100%;

View File

@ -121,10 +121,7 @@
</view>
</view>
<view class="noorder" v-if='servelist.length==0&&choicetab==false'>
<image src="../../static/noorder.png" mode=""></image>
<view class="">
暂无服务项目
</view>
<u-empty mode="list" icon-size='220' text='暂无服务项目'></u-empty>
</view>
<view class="" v-if="productlist.length>0&&choicetab">
<view class="item" v-show='choicetab' v-for="(item,index) in productlist" :key="index">
@ -138,10 +135,7 @@
</view>
</view>
<view class="noorder" v-if="productlist.length==0&&choicetab">
<image src="../../static/noorder.png" mode=""></image>
<view class="">
暂无产品
</view>
<u-empty mode="list" icon-size='220' text='暂无产品'></u-empty>
</view>
</view>
</view>
@ -483,24 +477,6 @@
uni.stopPullDownRefresh();
}, 1000);
},
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},

View File

@ -201,13 +201,19 @@
line-height: 54rpx;
text-align: center;
background: #FFFFFF;
border: 1rpx solid #969394;
border-radius: 26rpx;
font-size: 26rpx;
color: #969394;
position: absolute;
right: 20rpx;
bottom: 100rpx;
border-radius: 26rpx;
text{
border-radius: 26rpx;
display: block;
width: 100%;
height: 100%;
border: 1rpx solid #969394;
}
}
}
@ -246,7 +252,8 @@
font-size: 30rpx;
color: #020000;
view {
span {
display: block;
line-height: 65rpx;
margin-left: 20rpx;

View File

@ -18,47 +18,62 @@
<image :src="baseurl+order.attributePitureUrl" mode=""></image>
<view class="model">
<view class="top">
<span>{{order.goodsName}}</span>
<span>{{order.goodsPrice}}</span>
<span v-if="order.orderType =='HEALTH_CONSULTATION'">健康咨询</span>
<span v-else>{{order.goodsName}}</span>
<span v-if="order.orderType=='DIRECT_BUY'">{{order.goodsPrice}}</span>
</view>
<view class="bottom">
<view class="bottom" v-if="order.orderType !='HEALTH_CONSULTATION'">
<span class="box">型号{{order.goodsAttributeName}}</span>
<span class="box">X{{order.goodsCount}}</span>
</view>
<view class="refund" @tap='gorefundType'
v-if="order.orderStatus != 'WAIT_PAY'&& order.orderStatus!='CANCEL'&&order.orderStatus!='WAIT_REFUND'&&order.orderStatus!='REFUNDED'&&order.orderStatus!='RETURNED_GOODS'&&order.orderStatus!='WAIT_RETURNED_GOODS'">
申请退款
<view class="bottom" v-if="order.orderType !='HEALTH_CONSULTATION'&&order.discountPrice>0">
<span class="box" style='width:40%'>优惠金额</span>
<span class="box">-{{order.discountPrice}}</span>
</view>
<view class="refund" v-if="order.orderStatus=='WAIT_REFUND'" @tap='goAftersalesdetails(order)'>
<view class="refund"
v-if="order.orderStatus != 'WAIT_PAY'&& order.orderStatus!='CANCEL'&&order.orderStatus!='WAIT_REFUND'&&order.orderStatus!='REFUNDED'&&order.orderStatus!='RETURNED_GOODS'&&order.orderStatus!='WAIT_RETURNED_GOODS'">
<text @tap='gorefundType' v-if="order.orderType=='INTEGRAL_EXCHANGE'">取消兑换</text>
<text @tap='gorefundType' v-if="order.orderType=='DIRECT_BUY'">申请退款</text>
<text @tap='gorefundType'
v-if="order.orderType=='HEALTH_CONSULTATION'&&order.orderStatus=='WAIT_RECEIVED_GOODS'">取消咨询</text>
</view>
<view class="refund" style="border: 1rpx solid #969394;" v-if="order.orderStatus=='WAIT_REFUND'"
@tap='goAftersalesdetails(order)'>
退款中
</view>
<view class="refund" v-if="order.orderStatus=='REFUNDED'">
<view class="refund" style="border: 1rpx solid #969394;" v-if="order.orderStatus=='REFUNDED'">
退款成功
</view>
<!-- <view class="refund" v-if="order.orderStatus=='RETURNED_GOODS'">
退货中
</view> -->
<view class="refund" v-if="order.orderStatus=='WAIT_RETURNED_GOODS'">
<view class="refund" style="border: 1rpx solid #969394;"
v-if="order.orderStatus=='WAIT_RETURNED_GOODS'">
待退货
</view>
<view class="refund" style="border: 1rpx solid #969394;" v-if="order.orderStatus=='CANCEL'">
已取消
</view>
</view>
</view>
<view class="payinfo">
<text class="pay">实付款</text>
<text class="price">{{order.totalPrice}}</text>
<text class="price"
v-if="order.orderType=='DIRECT_BUY'||order.orderType =='HEALTH_CONSULTATION'">{{order.totalPrice}}</text>
<text class="price"
v-if="order.orderType=='INTEGRAL_EXCHANGE'">{{order.integralExchangeSill}}积分</text>
</view>
</view>
</view>
<view class="info">
<view>收货人<text>{{order.receiver}}</text></view>
<view>联系电话<text>{{order.phone}}</text></view>
<view>收货地址<text>{{order.receiveAddress}}</text></view>
<view>订单编号<text>{{order.goOrderNo}}</text></view>
<!-- <span>获得积分<text>30点积分</text></span> -->
<view>下单时间<text>{{order.orderTime}}</text></view>
<view v-if="order.orderStatus=='REFUNDED'">退款时间<text>{{order.updateTime}}</text></view>
<!-- <span>发货时间<text>2022-10-28 113126</text></span> -->
<!-- <span>成交时间<text>2022-10-28 113126</text></span> -->
<span>收货人<text>{{order.receiver}}</text></span>
<span>联系电话<text>{{order.phone}}</text></span>
<span v-if="order.orderType =='HEALTH_CONSULTATION'">咨询医生<text>{{order.hospitalPersonName}}</text></span>
<span v-if="order.orderType =='HEALTH_CONSULTATION'">咨询时间<text>{{order.healthAppointDate}}</text></span>
<span v-if="order.orderType !='HEALTH_CONSULTATION'">收货地址<text>{{order.receiveAddress}}</text></span>
<span>订单编号<text>{{order.goOrderNo}}</text></span>
<span>下单时间<text>{{order.orderTime}}</text></span>
<span
v-if="order.orderStatus=='REFUNDED'&&order.orderType=='DIRECT_BUY'">退款时间<text>{{order.updateTime}}</text></span>
<span
v-if="order.orderStatus=='REFUNDED'&&order.orderType=='INTEGRAL_EXCHANGE'">退款时间<text>{{order.appleTime}}</text></span>
</view>
<view class="buy" v-if="order.orderStatus == 'WAIT_PAY'">
<view class="pay">
@ -75,6 +90,37 @@
去评价
</view>
</view>
<view class="buy" v-if="order.orderStatus == 'WAIT_RECEIVED_GOODS'&&order.orderType !='HEALTH_CONSULTATION'">
<view class="logistics" style="" @tap='gologistics'>查看物流
</view>
<view class="pay" style="background-color: #4C7BC9;" @tap='Receipt'>
确认收货
</view>
</view>
<view class="buy" v-if="order.orderStatus == 'WAIT_RECEIVED_GOODS'&&order.orderType =='HEALTH_CONSULTATION'">
<view class="pay" style="background-color: #4C7BC9;" @tap='Receipt'>
咨询完成
</view>
</view>
<view class="frame">
<u-popup v-model="show" mode="bottom" length="45%" border-radius="30" :closeable='true'>
<view class="payment">
<span v-if="order.orderType =='HEALTH_CONSULTATION'">确认咨询完成了吗</span>
<span v-else>确认收到货了吗</span>
</view>
<view class="chat">
<view class="image" style="height:182rpx">
<image :src="baseurl+order.attributePitureUrl" mode=""
v-if="order.orderType !='HEALTH_CONSULTATION'"></image>
<view class="blackground" v-if="order.orderType !='HEALTH_CONSULTATION'">共1件</view>
</view>
<view class="word" v-if="order.orderType =='HEALTH_CONSULTATION'">为了保证您的售后权益请确认健康咨询无误后再确认完成
</view>
<view class="word" v-else>为了保证您的售后权益请收到商品确认无误后再确认收货</view>
</view>
<view class="submits" @tap='Receipts'>确定</view>
</u-popup>
</view>
<u-toast ref="uToast" />
</view>
</template>
@ -87,9 +133,13 @@
import {
appletGoodsOrderPay
} from '@/api/confirmOrder/index.js'
import {
confirmReceipt
} from '@/api/CommodityOrder/index.js'
export default {
data() {
return {
show: false,
baseurl: '',
order: {},
patientId: '',
@ -97,9 +147,40 @@
pageSize: 10,
pageNum: 1,
timestamp: 0, //
goodsOrderId: null,
}
},
methods: {
methods: { //
Receipts() {
confirmReceipt(this.order.goOrderNo).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({
title: '完成订单成功',
type: 'success',
duration: '1000'
})
this.show = false
uni.setStorageSync("Refresh", 'Refresh')
this.goodsOrderinfo()
setTimeout(e => {
uni.navigateTo({
url: `/pages/goodsorderRate/goodsorderRate?item=${JSON.stringify(this.order)}&delta=${4}`
})
}, 1000)
} else {
this.$refs.uToast.show({
title: '完成订单失败',
type: 'error',
duration: '1000'
})
this.show = false
}
})
},
//
Receipt() {
this.show = true
},
//
golookrate() {
uni.navigateTo({
@ -133,26 +214,17 @@
})
},
},
onShow() {
this.goodsOrderinfo(this.goodsOrderId)
},
onLoad(options) {
this.baseurl = baseurl
this.goodsOrderId = options.goodsOrderId
let that = this
try {
const value = uni.getStorageSync('patientId');
if (value) {
that.patientId = value
that.goodsOrderinfo(options.goodsOrderId)
}
} catch (e) {
// error
const value = uni.getStorageSync('patientId');
if (value) {
that.patientId = value
}
/* uni.getStorage({
key: 'patientId',
success: function(res) {
that.patientId = res.data
that.goodsOrderinfo(options.goodsOrderId)
}
}); */
}
}
</script>

View File

@ -103,28 +103,6 @@
paydata.orderNo = this.order.goOrderNo
// appletGoodsOrderPay(paydata).then(response => {
// if (response.code == 200) {
// uni.requestPayment({
// timeStamp: response.data.timeStamp,
// nonceStr: response.data.nonceStr,
// package: response.data.prepayId,
// signType: response.data.signType,
// paySign: response.data.paySign,
// success: function(res) {
// that.$refs.uToast.show({
// title: '',
// type: 'success',
// duration: 1500,
// url: `/pages/paysuccess/paysuccess?delta=${3}`
// })
// },
// fail: function(err) {
// that.$refs.uToast.show({
// title: '',
// type: 'error',
// duration: 1500,
// })
// }
// });
// } else {
// that.$refs.uToast.show({
// title: response.msg,

View File

@ -1,562 +0,0 @@
<template>
<u-popup :maskCloseAble="maskCloseAble" mode="bottom" :popup="false" v-model="value" length="auto"
:safeAreaInsetBottom="safeAreaInsetBottom" @close="close" :z-index="uZIndex">
<view class="u-datetime-picker">
<view class="u-picker-header" @touchmove.stop.prevent="">
<view class="u-btn-picker u-btn-picker--tips" :style="{ color: cancelColor }" hover-class="u-opacity"
:hover-stay-time="150" @tap="getResult('cancel')">{{cancelText}}</view>
<view class="u-picker__title">{{ title }}</view>
<view class="u-btn-picker u-btn-picker--primary" :style="{ color: moving ? cancelColor : confirmColor }"
hover-class="u-opacity" :hover-stay-time="150" @touchmove.stop="" @tap.stop="getResult('confirm')">
{{confirmText}}
</view>
</view>
<view class="u-picker-body">
<picker-view :value="valueArr" @change="change" class="u-picker-view" @pickstart="pickstart"
@pickend="pickend">
<picker-view-column v-if="!reset && params.year" style="flex:6">
<view class="u-column-item" v-for="(item, index) in years" :key="index">
{{ item }}
<text class="u-text" v-if="showTimeTag"></text>
</view>
</picker-view-column>
<picker-view-column v-if="!reset && params.month" style="flex:5">
<view class="u-column-item" v-for="(item, index) in months" :key="index">
{{ formatNumber(item) }}
<text class="u-text" v-if="showTimeTag"></text>
</view>
</picker-view-column>
<picker-view-column v-if="!reset && params.day" style="flex:5">
<view class="u-column-item" v-for="(item, index) in days" :key="index">
{{ formatNumber(item) }}
<text class="u-text" v-if="showTimeTag"></text>
</view>
</picker-view-column>
<picker-view-column v-if="!reset && params.hour" style="flex:6">
<view class="u-column-item" v-for="(item, index) in hours" :key="index">
<view class="" style="font-size:38rpx">
{{ formatNumber(item) }}
</view>
<text class="u-text" v-if="showTimeTag"></text>
</view>
</picker-view-column>
<picker-view-column v-if="!reset && params.minute" style="flex:6">
<view class="u-column-item" v-for="(item, index) in minutes" :key="index">
<view class="" style="font-size:38rpx">
{{ formatNumber(item) }}
</view>
<text class="u-text" v-if="showTimeTag"></text>
</view>
</picker-view-column>
<picker-view-column style="flex:2">
<view class="u-column-item">
<text class="u-text"></text>
</view>
</picker-view-column>
<picker-view-column v-if="!reset && params.endhour" style="flex:6">
<view class="u-column-item" v-for="(item, index) in endhours" :key="index">
<view class="" style="font-size:38rpx">
{{ formatNumber(item) }}
</view>
<text class="u-text" v-if="showTimeTag"></text>
</view>
</picker-view-column>
<picker-view-column v-if="!reset && params.endminute" style="flex:6">
<view class="u-column-item" v-for="(item, index) in endminutes" :key="index">
<view class="" style="font-size:38rpx">
{{ formatNumber(item) }}
</view>
<text class="u-text" v-if="showTimeTag"></text>
</view>
</picker-view-column>
</picker-view>
</view>
</view>
</u-popup>
</template>
<script>
/**
* picker picker弹出选择器
* @description 此选择器有两种弹出模式一是时间模式可以配置年秒参数 二是地区模式可以配置省区参数
* @tutorial https://www.uviewui.com/components/picker.html
* @property {Object} params 需要显示的参数见官网说明
* @property {String} mode 模式选择region-地区类型time-时间类型默认time
* @property {String Number} start-year 可选的开始年份mode=time时有效默认1950
* @property {String Number} end-year 可选的结束年份mode=time时有效默认2050
* @property {Boolean} safe-area-inset-bottom 是否开启底部安全区适配默认false
* @property {Boolean} show-time-tag 时间模式时是否显示后面的年月日中文提示
* @property {String} cancel-color 取消按钮的颜色默认#606266
* @property {String} confirm-color 确认按钮的颜色默认#2979ff
* @property {String} default-time 默认选中的时间mode=time时有效
* @property {String} confirm-text 确认按钮的文字
* @property {String} cancel-text 取消按钮的文字
* @property {String} default-region 默认选中的地区中文形式mode=region时有效
* @property {String} default-code 默认选中的地区编号形式mode=region时有效
* @property {Boolean} mask-close-able 是否允许通过点击遮罩关闭Picker默认true
* @property {String Number} z-index 弹出时的z-index值默认1075
* @property {Array} default-selector 数组形式其中每一项表示选择了range对应项中的第几个
* @property {Array} range 自定义选择的数据mode=selector或mode=multiSelector时有效
* @property {String} range-key 当range参数的元素为对象时指定Object中的哪个key的值作为选择器显示内容
* @event {Function} confirm 点击确定按钮返回当前选择的值
* @event {Function} cancel 点击取消按钮返回当前选择的值
* @example <u-picker v-model="show" mode="time"></u-picker>
*/
export default {
name: 'u-picker',
props: {
// picker
params: {
type: Object,
default () {
return {
year: false,
month: true,
day: true,
hour: true,
endhour: true,
minute: true,
endminute: true,
second: false,
};
}
},
// mode=selectormode=multiSelector
range: {
type: Array,
default () {
return [];
}
},
// mode=selectormode=multiSelector
defaultSelector: {
type: Array,
default () {
return [0];
}
},
// range ArrayObject range-key Object key
rangeKey: {
type: String,
default: ''
},
// region-time-selector-multiSelector-
mode: {
type: String,
default: 'time'
},
//
startYear: {
type: [String, Number],
default: 1950
},
//
endYear: {
type: [String, Number],
default: 2050
},
// ""
cancelColor: {
type: String,
default: '#606266'
},
// ""
confirmColor: {
type: String,
default: '#2979ff'
},
// 2025-07-02 || 2025-07-02 13:01:00 || 2025/07/02
defaultTime: {
type: String,
default: ''
},
//
showTimeTag: {
type: Boolean,
default: true
},
safeAreaInsetBottom: {
type: Boolean,
default: false
},
// Picker
maskCloseAble: {
type: Boolean,
default: true
},
//
value: {
type: Boolean,
default: false
},
// z-index
zIndex: {
type: [String, Number],
default: 0
},
//
title: {
type: String,
default: '预约时间区间'
},
//
cancelText: {
type: String,
default: '取消'
},
//
confirmText: {
type: String,
default: '确认'
}
},
data() {
return {
years: [],
months: [],
days: [],
hours: [],
endhours: [],
minutes: [],
endminutes: [],
seconds: [],
year: 0,
month: 0,
day: 0,
hour: 0,
endhour: 0,
minute: 0,
endminute: 0,
second: 0,
reset: false,
startDate: '',
endDate: '',
valueArr: [],
moving: false //
};
},
mounted() {
this.init();
},
computed: {
propsChange() {
//
return `${this.mode}-${this.defaultTime}-${this.startYear}-${this.endYear}-${this.defaultRegion}-${this.areaCode}`;
},
regionChange() {
//
return `${this.province}-${this.city}`;
},
yearAndMonth() {
return `${this.year}-${this.month}`;
},
uZIndex() {
// z-index使
return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
}
},
watch: {
propsChange() {
this.reset = true;
setTimeout(() => this.init(), 10);
},
// pickerthis.citysthis.areas
regionChange(val) {
this.citys = citys[this.province];
this.areas = areas[this.province][this.city];
},
// watch
// 3031229228
yearAndMonth(val) {
if (this.params.year) this.setDays();
},
// QQ()
value(n) {
if (n) {
this.reset = true;
setTimeout(() => this.init(), 10);
}
}
},
methods: {
//
pickstart() {
// #ifdef MP-WEIXIN
this.moving = true;
// #endif
},
//
pickend() {
// #ifdef MP-WEIXIN
this.moving = false;
// #endif
},
//
getItemValue(item, mode) {
// (2020-05-25)uni-appv-iffalse
// getItemValue
if (this.mode == mode) {
return typeof item == 'object' ? item[this.rangeKey] : item;
}
},
// 100
formatNumber(num) {
return +num < 10 ? '0' + num : String(num);
},
//
generateArray: function(start, end) {
// end-yearend+1
start = Number(start);
end = Number(end);
end = end > start ? end : start;
//
return [...Array(end + 1).keys()].slice(start);
},
getIndex: function(arr, val) {
let index = arr.indexOf(val);
// index-1(index)~(-1)=-(-1)-1=0
return ~index ? index : 0;
},
//
initTimeValue() {
// IE(uni)"-"
let fdate = this.defaultTime.replace(/\-/g, '/');
fdate = fdate && fdate.indexOf('/') == -1 ? `2020/01/01 ${fdate}` : fdate;
let time = null;
if (fdate) time = new Date(fdate);
else time = new Date();
//
this.year = time.getFullYear();
this.month = Number(time.getMonth()) + 1;
this.day = time.getDate();
this.hour = time.getHours();
this.minute = time.getMinutes();
this.endhour = time.getHours();
this.endminute = time.getMinutes();
// this.second = time.getSeconds();
},
init() {
this.valueArr = [];
this.reset = false;
if (this.mode == 'time') {
this.initTimeValue();
if (this.params.year) {
this.valueArr.push(0);
this.setYears();
}
if (this.params.month) {
this.valueArr.push(0);
this.setMonths();
}
if (this.params.day) {
this.valueArr.push(0);
this.setDays();
}
if (this.params.hour) {
this.valueArr.push(0);
this.setHours();
}
if (this.params.minute) {
this.valueArr.push(0);
this.setMinutes();
}
if (this.params.endhour) {
this.valueArr.push(0);
this.setendHours();
}
if (this.params.endminute) {
this.valueArr.push(0);
this.setendMinutes();
}
// if (this.params.second) {
// this.valueArr.push(0);
// this.setSeconds();
// }
}
this.$forceUpdate();
},
// picker
setYears() {
//
this.years = this.generateArray(this.startYear, this.endYear);
// this.valueArrpicker
this.valueArr.splice(this.valueArr.length - 1, 1, this.getIndex(this.years, this.year));
},
setMonths() {
this.months = this.generateArray(1, 12);
this.valueArr.splice(this.valueArr.length - 1, 1, this.getIndex(this.months, this.month));
},
setDays() {
let totalDays = new Date(this.year, this.month, 0).getDate();
this.days = this.generateArray(1, totalDays);
let index = 0;
// 使setMonths()this.valueArr.splice(this.valueArr.length - 1, xxx)
// this.monththis.yearwatchthis.setDays()this.valueArr.length
if (this.params.year && this.params.month) index = 2;
else if (this.params.month) index = 1;
else if (this.params.year) index = 1;
else index = 0;
//
// 331229day3129(picker-column1)
if (this.day > this.days.length) this.day = this.days.length;
this.valueArr.splice(index, 1, this.getIndex(this.days, this.day));
},
setHours() {
this.hours = this.generateArray(0, 23);
this.valueArr.splice(this.valueArr.length - 1, 1, this.getIndex(this.hours, this.hour));
},
setMinutes() {
this.minutes = this.generateArray(0, 59);
this.valueArr.splice(this.valueArr.length - 1, 1, this.getIndex(this.minutes, this.minute));
},
setendHours() {
this.endhours = this.generateArray(0, 23);
this.valueArr.splice(this.valueArr.length - 1, 1, this.getIndex(this.endhours, this.endhour));
},
setendMinutes() {
this.endminutes = this.generateArray(0, 59);
this.valueArr.splice(this.valueArr.length - 1, 1, this.getIndex(this.endminutes, this.endminute));
},
// setSeconds() {
// this.seconds = this.generateArray(0, 59);
// this.valueArr.splice(this.valueArr.length - 1, 1, this.getIndex(this.seconds, this.second));
// },
close() {
this.$emit('input', false);
},
// picker
change(e) {
this.valueArr = e.detail.value;
let i = 0;
if (this.mode == 'time') {
// 使i++this.valueArrthis.params
// ifi1
if (this.params.year) this.year = this.years[this.valueArr[i++]];
if (this.params.month) this.month = this.months[this.valueArr[i++]];
if (this.params.day) this.day = this.days[this.valueArr[i++]];
if (this.params.hour) this.hour = this.hours[this.valueArr[i++]];
if (this.params.minute) this.minute = this.minutes[this.valueArr[i++]];
if (this.params.endhour) this.endhour = this.hours[this.valueArr[3]]
if (this.params.endminute) this.endminute = this.endminutes[this.valueArr[4]];
// if (this.params.second) this.second = this.seconds[this.valueArr[i++]];
}
},
//
getResult(event = null) {
// #ifdef MP-WEIXIN
if (this.moving) return;
// #endif
let result = {};
// this.paramstrue
if (this.mode == 'time') {
if (this.params.year) result.year = this.formatNumber(this.year || 0);
if (this.params.month) result.month = this.formatNumber(this.month || 0);
if (this.params.day) result.day = this.formatNumber(this.day || 0);
if (this.params.hour) result.hour = this.formatNumber(this.hour || 0);
if (this.params.minute) result.minute = this.formatNumber(this.minute || 0);
if (this.params.endhour) result.endhour = this.formatNumber(this.endhour || 0);
if (this.params.endminute) result.endminute = this.formatNumber(this.endminute || 0);
// if (this.params.second) result.second = this.formatNumber(this.second || 0);
// if (this.params.timestamp) result.timestamp = this.getTimestamp();
}
if (event) this.$emit(event, result);
this.close();
},
//
getTimestamp() {
// yyyy-mm-ddiOS使"/"
let time = this.year + '/' + this.month + '/' + this.day + ' ' + this.hour + ':' + this.minute + ':' + this
.second;
return new Date(time).getTime() / 1000;
}
}
};
</script>
<style lang="scss" scoped>
// nvueflexnvuedisplay
@mixin vue-flex($direction: row) {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: $direction;
/* #endif */
}
.u-datetime-picker {
position: relative;
z-index: 999;
}
.u-picker-view {
height: 100%;
box-sizing: border-box;
}
.u-picker-header {
width: 100%;
height: 90rpx;
padding: 0 40rpx;
@include vue-flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
font-size: 30rpx;
background: #fff;
position: relative;
}
.u-picker-header::after {
content: '';
position: absolute;
border-bottom: 1rpx solid #eaeef1;
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
bottom: 0;
right: 0;
left: 0;
}
.u-picker__title {
color: $u-content-color;
}
.u-picker-body {
width: 100%;
height: 500rpx;
overflow: hidden;
background-color: #fff;
}
.u-column-item {
@include vue-flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: $u-main-color;
padding: 0 8rpx;
}
.u-text {
font-size: 24rpx;
padding-left: 8rpx;
}
.u-btn-picker {
padding: 16rpx;
box-sizing: border-box;
text-align: center;
text-decoration: none;
}
.u-opacity {
opacity: 0.5;
}
.u-btn-picker--primary {
color: $u-type-primary;
}
.u-btn-picker--tips {
color: $u-tips-color;
}
</style>

View File

@ -1,7 +0,0 @@
// 定义混入指令用于在非nvue环境下的flex定义因为nvue没有display属性会报错
@mixin vue-flex($direction: row) {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: $direction;
/* #endif */
}

View File

@ -28,24 +28,6 @@
listcolor: ['#E69874', '#09C87E', '#E4B958', '#6592DC', '#EF6A80'] //
};
},
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
//
onLoad(options) {
this.pageNum = 1

View File

@ -99,17 +99,6 @@
height: 100%;
.noorder{
margin-top: 90rpx;
image{
display: block;
margin: 0 auto;
width: 100rpx;
height: 120rpx;
}
view{
text-align: center;
font-size: 36rpx;
color: #BFBFBF;
}
}
.title{
font-size: 32rpx;

View File

@ -48,10 +48,7 @@
</view>
</view>
<view class="noorder" v-else>
<image src="../../static/noorder.png" mode=""></image>
<view class="">
暂无护理站
</view>
<u-empty mode="list" icon-size='220' text='暂无护理站'></u-empty>
</view>
</view>
<view class="masks" style="" v-if="mask">
@ -281,24 +278,6 @@
onLoad() {
this.getNurseClassifyinfo();
},
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 834 B

BIN
static/yis.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB