diff --git a/androidPrivacy.json b/androidPrivacy.json index 7f5c2f3..78574c0 100644 --- a/androidPrivacy.json +++ b/androidPrivacy.json @@ -1,37 +1,37 @@ { - "version" : "1", - "prompt" : "template", - "title" : "服务协议和隐私政策", - "message" : "请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。
  你可阅读《服务协议》《隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", - "buttonAccept" : "同意并接受", - "buttonRefuse" : "暂不同意", - "hrefLoader" : "system|default", - "second" : { - "title" : "确认提示", - "message" : "进入应用前,你需先同意《服务协议》《隐私政策》,否则将退出应用。", - "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": "请你务必审慎阅读、充分理解“用户协议与隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。
  你可阅读《用户协议与隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", + "buttonAccept": "同意并接受", + "buttonRefuse": "暂不同意", + "hrefLoader": "system|default", + "second": { + "title": "确认提示", + "message": "进入应用前,你需先同意《用户协议与隐私政策》,否则将退出应用。", + "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" + } + } } diff --git a/api/Informationconfirmation/index.js b/api/Informationconfirmation/index.js new file mode 100644 index 0000000..177a225 --- /dev/null +++ b/api/Informationconfirmation/index.js @@ -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 + }) +} + diff --git a/api/coupon/index.js b/api/coupon/index.js new file mode 100644 index 0000000..03c8692 --- /dev/null +++ b/api/coupon/index.js @@ -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', + }) +} diff --git a/api/integral/index.js b/api/integral/index.js new file mode 100644 index 0000000..206c1d3 --- /dev/null +++ b/api/integral/index.js @@ -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 + }) +} diff --git a/api/materialbenefits/index.js b/api/materialbenefits/index.js new file mode 100644 index 0000000..992f4ca --- /dev/null +++ b/api/materialbenefits/index.js @@ -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' + }) +} diff --git a/api/medicine/index.js b/api/medicine/index.js new file mode 100644 index 0000000..faff6eb --- /dev/null +++ b/api/medicine/index.js @@ -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' + }) +} \ No newline at end of file diff --git a/components/r-canvas/r-canvas.js b/components/r-canvas/r-canvas.js new file mode 100644 index 0000000..b2c7dbe --- /dev/null +++ b/components/r-canvas/r-canvas.js @@ -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 + }) + } + } +} diff --git a/components/r-canvas/r-canvas.vue b/components/r-canvas/r-canvas.vue new file mode 100644 index 0000000..5722790 --- /dev/null +++ b/components/r-canvas/r-canvas.vue @@ -0,0 +1,26 @@ + + + + diff --git a/package.json b/package.json index 0d5d9db..b4155c7 100644 --- a/package.json +++ b/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", + "画布生成图片", + "绘制图片", + "商品海报", + "朋友圈海报" + ] } diff --git a/pages.json b/pages.json index 0dbee9f..a5a8b7a 100644 --- a/pages.json +++ b/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", diff --git a/pages/CommodityOrder/CommodityOrder.scss b/pages/CommodityOrder/CommodityOrder.scss index daa0839..a5a0793 100644 --- a/pages/CommodityOrder/CommodityOrder.scss +++ b/pages/CommodityOrder/CommodityOrder.scss @@ -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; diff --git a/pages/CommodityOrder/CommodityOrder.vue b/pages/CommodityOrder/CommodityOrder.vue index f54948e..f06cf2f 100644 --- a/pages/CommodityOrder/CommodityOrder.vue +++ b/pages/CommodityOrder/CommodityOrder.vue @@ -24,56 +24,74 @@ - {{item.goodsName}} - ¥{{item.goodsPrice}} + 健康咨询 + {{item.goodsName}} + + ¥{{item.goodsPrice}} - + 型号:{{item.goodsAttributeName}} ×{{item.goodsCount}} - 实付款: - ¥{{item.totalPrice}} + + 实付款: + + ¥{{item.totalPrice}} + {{item.integralExchangeSill}} + + 积分 + - 退款中 + 退款中 - 查看物流 + 查看物流 - + 去支付 - + 确认收货 - - 立即评价 + + 咨询完成 + + 去评价 查看评价 - - - 暂无商品订单 - + - + - 确认收到货了吗 - + 确认咨询完成了吗 + 确认收到货了吗 - - - 共1件 + + + 共1件 - 为了保证你的售后权益,请收到商品确认无误后再确认收货 + 为了保证您的售后权益,请确认健康咨询无误后再确认完成 + + 为了保证您的售后权益,请收到商品确认无误后再确认收货 确定 diff --git a/pages/Healthitem/Healthitem.vue b/pages/Healthitem/Healthitem.vue index 1a4da59..557677d 100644 --- a/pages/Healthitem/Healthitem.vue +++ b/pages/Healthitem/Healthitem.vue @@ -3,29 +3,53 @@ {{item.informationTitle}} - - + + - diff --git a/pages/ProductList/ProductList.vue b/pages/ProductList/ProductList.vue index 45597fa..9b6a720 100644 --- a/pages/ProductList/ProductList.vue +++ b/pages/ProductList/ProductList.vue @@ -28,11 +28,8 @@ - - - - 暂无商品 - + + @@ -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, - } - }, } @@ -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; diff --git a/pages/ProjectDetails/ProjectDetails.vue b/pages/ProjectDetails/ProjectDetails.vue index b52d54a..1395002 100644 --- a/pages/ProjectDetails/ProjectDetails.vue +++ b/pages/ProjectDetails/ProjectDetails.vue @@ -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, - } - }, } diff --git a/pages/classification/classification.vue b/pages/classification/classification.vue index 2a7416f..5d6c517 100644 --- a/pages/classification/classification.vue +++ b/pages/classification/classification.vue @@ -38,11 +38,8 @@ 用力上滑加载更多 - - - - 暂无商品 - + + @@ -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, - } - }, } @@ -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; - } - } } diff --git a/pages/confirmation/confirmation.vue b/pages/confirmation/confirmation.vue new file mode 100644 index 0000000..6e2892e --- /dev/null +++ b/pages/confirmation/confirmation.vue @@ -0,0 +1,308 @@ + + + diff --git a/pages/coupon/coupon.scss b/pages/coupon/coupon.scss new file mode 100644 index 0000000..0f18619 --- /dev/null +++ b/pages/coupon/coupon.scss @@ -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; + } + } + } + } \ No newline at end of file diff --git a/pages/coupon/coupon.vue b/pages/coupon/coupon.vue new file mode 100644 index 0000000..3664317 --- /dev/null +++ b/pages/coupon/coupon.vue @@ -0,0 +1,151 @@ + + + + diff --git a/pages/customerservice/customerservice.vue b/pages/customerservice/customerservice.vue index b083eb2..4d95ae2 100644 --- a/pages/customerservice/customerservice.vue +++ b/pages/customerservice/customerservice.vue @@ -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, - } - }, } diff --git a/pages/homepage/homepage.vue b/pages/homepage/homepage.vue index c90255d..68170b3 100644 --- a/pages/homepage/homepage.vue +++ b/pages/homepage/homepage.vue @@ -51,6 +51,7 @@ + @@ -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, - } - }, } diff --git a/pages/materialbenefits/materialbenefits.vue b/pages/materialbenefits/materialbenefits.vue index ba62d02..63a3dee 100644 --- a/pages/materialbenefits/materialbenefits.vue +++ b/pages/materialbenefits/materialbenefits.vue @@ -1,83 +1,418 @@ - diff --git a/pages/medicine/medicine.scss b/pages/medicine/medicine.scss new file mode 100644 index 0000000..281772e --- /dev/null +++ b/pages/medicine/medicine.scss @@ -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; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/pages/medicine/medicine.vue b/pages/medicine/medicine.vue index f9e6a0b..f620feb 100644 --- a/pages/medicine/medicine.vue +++ b/pages/medicine/medicine.vue @@ -1,106 +1,270 @@ diff --git a/pages/nursestation/nursestation.scss b/pages/nursestation/nursestation.scss index 29451ad..8826af8 100644 --- a/pages/nursestation/nursestation.scss +++ b/pages/nursestation/nursestation.scss @@ -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%; diff --git a/pages/nursestation/nursestation.vue b/pages/nursestation/nursestation.vue index 82b439f..115e814 100644 --- a/pages/nursestation/nursestation.vue +++ b/pages/nursestation/nursestation.vue @@ -121,10 +121,7 @@ - - - 暂无服务项目 - + @@ -138,10 +135,7 @@ - - - 暂无产品 - + @@ -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; }, diff --git a/pages/orderDetails/orderDetails.scss b/pages/orderDetails/orderDetails.scss index 92d848f..d5f4fe4 100644 --- a/pages/orderDetails/orderDetails.scss +++ b/pages/orderDetails/orderDetails.scss @@ -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; diff --git a/pages/orderDetails/orderDetails.vue b/pages/orderDetails/orderDetails.vue index 6c96d78..125547c 100644 --- a/pages/orderDetails/orderDetails.vue +++ b/pages/orderDetails/orderDetails.vue @@ -18,47 +18,62 @@ - {{order.goodsName}} - ¥{{order.goodsPrice}} + 健康咨询 + {{order.goodsName}} + ¥{{order.goodsPrice}} - + 型号:{{order.goodsAttributeName}} X{{order.goodsCount}} - - 申请退款 + + 优惠金额: + -¥{{order.discountPrice}} - + + 取消兑换 + 申请退款 + 取消咨询 + + 退款中 - + 退款成功 - - + 待退货 + + 已取消 + 实付款 - ¥{{order.totalPrice}} + ¥{{order.totalPrice}} + {{order.integralExchangeSill}}积分 - 收货人:{{order.receiver}} - 联系电话:{{order.phone}} - 收货地址:{{order.receiveAddress}} - 订单编号:{{order.goOrderNo}} - - 下单时间:{{order.orderTime}} - 退款时间:{{order.updateTime}} - - + 收货人:{{order.receiver}} + 联系电话:{{order.phone}} + 咨询医生:{{order.hospitalPersonName}} + 咨询时间:{{order.healthAppointDate}} + 收货地址:{{order.receiveAddress}} + 订单编号:{{order.goOrderNo}} + 下单时间:{{order.orderTime}} + 退款时间:{{order.updateTime}} + 退款时间:{{order.appleTime}} @@ -75,6 +90,37 @@ 去评价 + + 查看物流 + + + 确认收货 + + + + + 咨询完成 + + + + + + 确认咨询完成了吗 + 确认收到货了吗 + + + + + 共1件 + + 为了保证您的售后权益,请确认健康咨询无误后再确认完成 + + 为了保证您的售后权益,请收到商品确认无误后再确认收货 + + 确定 + + @@ -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) - } - }); */ } } diff --git a/pages/payorderDetails/payorderDetails.vue b/pages/payorderDetails/payorderDetails.vue index a242901..5fbde9a 100644 --- a/pages/payorderDetails/payorderDetails.vue +++ b/pages/payorderDetails/payorderDetails.vue @@ -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, diff --git a/pages/picker/picker.vue b/pages/picker/picker.vue deleted file mode 100644 index 591b840..0000000 --- a/pages/picker/picker.vue +++ /dev/null @@ -1,562 +0,0 @@ - - - - - diff --git a/pages/picker/style.components.scss b/pages/picker/style.components.scss deleted file mode 100644 index 6835876..0000000 --- a/pages/picker/style.components.scss +++ /dev/null @@ -1,7 +0,0 @@ -// 定义混入指令,用于在非nvue环境下的flex定义,因为nvue没有display属性,会报错 -@mixin vue-flex($direction: row) { - /* #ifndef APP-NVUE */ - display: flex; - flex-direction: $direction; - /* #endif */ -} \ No newline at end of file diff --git a/pages/shopping/shopping.vue b/pages/shopping/shopping.vue index 4520790..1c6971d 100644 --- a/pages/shopping/shopping.vue +++ b/pages/shopping/shopping.vue @@ -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 diff --git a/pages/site/site.scss b/pages/site/site.scss index b3cfd7e..face2c4 100644 --- a/pages/site/site.scss +++ b/pages/site/site.scss @@ -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; diff --git a/pages/site/site.vue b/pages/site/site.vue index 4e555d1..3fc0667 100644 --- a/pages/site/site.vue +++ b/pages/site/site.vue @@ -48,10 +48,7 @@ - - - 暂无护理站 - + @@ -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; }, diff --git a/static/noorder.png b/static/noorder.png deleted file mode 100644 index 66be356..0000000 Binary files a/static/noorder.png and /dev/null differ diff --git a/static/shoping.png b/static/shoping.png index 93f8eaa..907b584 100644 Binary files a/static/shoping.png and b/static/shoping.png differ diff --git a/static/shopingw.png b/static/shopingw.png deleted file mode 100644 index 1ea4896..0000000 Binary files a/static/shopingw.png and /dev/null differ diff --git a/static/yis.png b/static/yis.png new file mode 100644 index 0000000..03a781f Binary files /dev/null and b/static/yis.png differ