修改
This commit is contained in:
parent
7502510e76
commit
bace4ce70c
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
20
api/Informationconfirmation/index.js
Normal file
20
api/Informationconfirmation/index.js
Normal 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
9
api/coupon/index.js
Normal 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
35
api/integral/index.js
Normal 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
|
||||
})
|
||||
}
|
||||
18
api/materialbenefits/index.js
Normal file
18
api/materialbenefits/index.js
Normal 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
17
api/medicine/index.js
Normal 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'
|
||||
})
|
||||
}
|
||||
735
components/r-canvas/r-canvas.js
Normal file
735
components/r-canvas/r-canvas.js
Normal 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:'setCanvasWidth:width 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:'setCanvasWidth:height 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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
26
components/r-canvas/r-canvas.vue
Normal file
26
components/r-canvas/r-canvas.vue
Normal 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>
|
||||
31
package.json
31
package.json
@ -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",
|
||||
"画布生成图片",
|
||||
"绘制图片",
|
||||
"商品海报",
|
||||
"朋友圈海报"
|
||||
]
|
||||
}
|
||||
|
||||
35
pages.json
35
pages.json
@ -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",
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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%;
|
||||
|
||||
@ -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'>
|
||||
|
||||
187
pages/Personal/Personal.scss
Normal file
187
pages/Personal/Personal.scss
Normal 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%;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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>
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
308
pages/confirmation/confirmation.vue
Normal file
308
pages/confirmation/confirmation.vue
Normal 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
162
pages/coupon/coupon.scss
Normal 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
151
pages/coupon/coupon.vue
Normal 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>
|
||||
@ -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>
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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">
|
||||
|
||||
520
pages/integral/integral.scss
Normal file
520
pages/integral/integral.scss
Normal 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
642
pages/integral/integral.vue
Normal 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.tempFilePath:生成成功,返回base64图片
|
||||
// // 保存图片
|
||||
// // 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>
|
||||
@ -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>
|
||||
|
||||
220
pages/medicine/medicine.scss
Normal file
220
pages/medicine/medicine.scss
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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>
|
||||
|
||||
@ -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%;
|
||||
|
||||
@ -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;
|
||||
},
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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 11:31:26</text></span> -->
|
||||
<!-- <span>成交时间:<text>2022-10-28 11:31:26</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>
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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=selector或者mode=multiSelector时,提供的数组
|
||||
range: {
|
||||
type: Array,
|
||||
default () {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
// 当mode=selector或者mode=multiSelector时,提供的默认选中的下标
|
||||
defaultSelector: {
|
||||
type: Array,
|
||||
default () {
|
||||
return [0];
|
||||
}
|
||||
},
|
||||
// 当 range 是一个 Array<Object> 时,通过 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);
|
||||
},
|
||||
// 如果地区发生变化,为了让picker联动起来,必须重置this.citys和this.areas
|
||||
regionChange(val) {
|
||||
this.citys = citys[this.province];
|
||||
this.areas = areas[this.province][this.city];
|
||||
},
|
||||
// watch监听月份的变化,实时变更日的天数,因为不同月份,天数不一样
|
||||
// 一个月可能有30,31天,甚至闰年2月的29天,平年2月28天
|
||||
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-app对微信小程序编译有错误,导致v-if为false中的内容也执行,错误导致
|
||||
// 单列模式或者多列模式中的getItemValue同时被执行,故在这里再加一层判断
|
||||
if (this.mode == mode) {
|
||||
return typeof item == 'object' ? item[this.rangeKey] : item;
|
||||
}
|
||||
},
|
||||
// 小于10前面补0,用于月份,日期,时分秒等
|
||||
formatNumber(num) {
|
||||
return +num < 10 ? '0' + num : String(num);
|
||||
},
|
||||
// 生成递进的数组
|
||||
generateArray: function(start, end) {
|
||||
// 转为数值格式,否则用户给end-year等传递字符串值时,下面的end+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.valueArr某一项的值,是为了让picker预选中某一个值
|
||||
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.month和this.year变化时,会触发watch中的this.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;
|
||||
// 当月份变化时,会导致日期的天数也会变化,如果原来选的天数大于变化后的天数,则重置为变化后的最大值
|
||||
// 比如原来选中3月31日,调整为2月后,日期变为最大29,这时如果day值继续为31显然不合理,于是将其置为29(picker-column从1开始)
|
||||
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.valueArr数组的长度是不确定长度的,它根据this.params的值来配置长度
|
||||
// 进入if规则,i会加1,保证了能获取准确的值
|
||||
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.params中配置了为true的字段
|
||||
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-dd为安卓写法,不支持iOS,需要使用"/"分隔,才能二者兼容
|
||||
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>
|
||||
// 定义混入指令,用于在非nvue环境下的flex定义,因为nvue没有display属性,会报错
|
||||
@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>
|
||||
@ -1,7 +0,0 @@
|
||||
// 定义混入指令,用于在非nvue环境下的flex定义,因为nvue没有display属性,会报错
|
||||
@mixin vue-flex($direction: row) {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
flex-direction: $direction;
|
||||
/* #endif */
|
||||
}
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
BIN
static/yis.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Loading…
Reference in New Issue
Block a user