Merge remote-tracking branch 'origin/jihan_0223_个人中心和客服功能小程序开发分支' into dev

# Conflicts:
#	pages/CommodityDetails/CommodityDetails.vue
#	pages/Healthknowledge/Healthknowledge.vue
#	pages/Personal/Personal.vue
#	pages/diseasemanagement/diseasemanagement.vue
#	pages/homepage/homepage.vue
#	pages/startup/startup.vue
#	pages/user/user.vue
This commit is contained in:
纪寒 2023-03-07 16:24:22 +08:00
commit 5ed7a523b4
61 changed files with 4360 additions and 1155 deletions

View File

@ -1,8 +1,8 @@
import request from "../request.js"
// 查询商品详细列表
export function goodsDetails(goodsInfoId){
export function goodsDetails(goodsInfoId, patientId) {
return request({
url: `/nurseApplet/nursingStationGoods/goodsDetails?goodsInfoId=${goodsInfoId}`,
url: `/nurseApplet/nursingStationGoods/goodsDetails?goodsInfoId=${goodsInfoId}&patientId=${patientId}`,
method: 'GET'
})
}

View File

@ -4,4 +4,13 @@ export function appPersonal(patientId) {
url: `/nurseApp/login/appPersonal?patientId=${patientId}`,
method: 'GET'
})
}
}
//邀请
export function inviteFriends(patientId) {
return request({
url: `/nurseApplet/patientInfo/inviteFriends?inviteId=${patientId}`,
method: 'post'
})
}

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

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

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

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

View File

@ -0,0 +1,10 @@
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'
})
}

View File

@ -1,9 +0,0 @@
import request from "../request.js"
export function orderCount(patientId) {
return request({
url: `/nurseApp/login/orderCount?patientId=${patientId}`,
method: 'GET'
})
}

View File

@ -16,6 +16,9 @@ var request = function(config) {
success(res) {
if (res.data.code == 9999) {
uni.removeStorageSync('token');
uni.removeStorageSync('patientId');
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
let pages = getCurrentPages();
let path = pages[pages.length - 1].$page.fullPath
if (path == '/pages/user/user') {

View File

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

View File

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

View File

@ -1,5 +1,16 @@
{
"dependencies": {
"uview-ui": "^1.8.4"
}
"dependencies": {
"uview-ui": "^1.8.4"
},
"id": "r-canvas",
"name": "海报生成随心所欲绘制样式原生canvas方法的二次封装自定义函数持续更新",
"version": "1.3.1",
"description": "图片不失帧保留原有画质canvas方法扩展暴露原生实例可自行扩展最好用的canvas插件",
"keywords": [
"canvas",
"画布生成图片",
"绘制图片",
"商品海报",
"朋友圈海报"
]
}

View File

@ -9,6 +9,58 @@
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}, {
"path": "pages/orderDetails/orderDetails",
"style": {
"navigationBarTitleText": "订单详情",
"navigationBarBackgroundColor": "#ffffff",
"enablePullDownRefresh": false
}
}, {
"path": "pages/integral/integral",
"style": {
"navigationBarTitleText": "积分",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/information/information",
"style": {
"navigationBarTitleText": "完善个人信息",
"navigationBarBackgroundColor": "#ffffff", //
"enablePullDownRefresh": false
}
}, {
"path": "pages/CommodityDetails/CommodityDetails",
"style": {
"navigationBarTitleText": "商品详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/coupon/coupon",
"style": {
"navigationBarTitleText": "优惠券",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff",
"onReachBottomDistance": 40, // px
"enablePullDownRefresh": true //true
}
}, {
"path": "pages/Personal/Personal",
"style": {
"navigationBarTitleText": "个人中心",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff",
"navigationStyle": "custom"
}
}, {
"path": "pages/modify/modify",
"style": {
"navigationBarTitleText": "修改信息",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff" //
}
}, {
"path": "pages/ProjectDetails/ProjectDetails",
"style": {
@ -23,13 +75,6 @@
"navigationBarBackgroundColor": "#ffffff", //
"enablePullDownRefresh": true //true
}
}, {
"path": "pages/information/information",
"style": {
"navigationBarTitleText": "完善个人信息",
"navigationBarBackgroundColor": "#ffffff", //
"enablePullDownRefresh": false
}
},
{
"path": "pages/lookrate/lookrate",
@ -54,13 +99,6 @@
}
},
{
"path": "pages/modify/modify",
"style": {
"navigationBarTitleText": "修改信息",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff" //
}
}, {
"path": "pages/appointmenttime/appointmenttime",
"style": {
"navigationBarTitleText": "预约时间",
@ -100,23 +138,6 @@
"enablePullDownRefresh": true //true
}
},
{
"path": "pages/user/user",
"style": {
"navigationBarTitleText": "个人信息",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#4C7BC9", //
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/orderDetails/orderDetails",
"style": {
"navigationBarTitleText": "订单详情",
"navigationBarBackgroundColor": "#ffffff",
"enablePullDownRefresh": false
}
},
{
"path": "pages/payorderDetails/payorderDetails",
"style": {
@ -124,13 +145,6 @@
"navigationBarBackgroundColor": "#ffffff",
"enablePullDownRefresh": false
}
}, {
"path": "pages/Personal/Personal",
"style": {
"navigationBarTitleText": "个人中心",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
},
{
"path": "pages/login/login",
@ -190,14 +204,6 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/order/order",
"style": {
"navigationBarTitleText": "我的订单",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
},
{
"path": "pages/menttimeorder/menttimeorder",
"style": {
@ -249,14 +255,6 @@
"enablePullDownRefresh": true //true
}
},
{
"path": "pages/CommodityDetails/CommodityDetails",
"style": {
"navigationBarTitleText": "商品详情",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
},
{
"path": "pages/nursestation/nursestation",
"style": {
@ -310,7 +308,6 @@
// "onReachBottomDistance": 50 // px
// "enablePullDownRefresh": true //true
}
}, {
"path": "pages/Healthknowledge/Healthknowledge",
"style": {
@ -318,7 +315,6 @@
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/Healthitem/Healthitem",
"style": {
@ -349,7 +345,17 @@
"navigationBarBackgroundColor": "#ffffff"
}
}
],
,{
"path" : "pages/Healthrecords/Healthrecords",
"style" :
{
"navigationBarTitleText": "健康档案",
"navigationBarBackgroundColor": "#ffffff",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "",

View File

@ -7,10 +7,14 @@
<view class="item" @tap='show=true'>退款原因
<span v-if="dictname==''">请选择</span>
<span v-else style='color: #000000;'>{{dictname}}</span>
<image src="../../static/pic.png" mode=""></image>
<image src="../../static/huijiantou.png" mode=""></image>
</view>
<view class="priceinfo">退款金额
<view class="priceback">{{order.totalPrice}}
<view class="priceinfo">
<span v-if="order.orderType=='DIRECT_BUY'">退款金额</span>
<span v-if="order.orderType=='INTEGRAL_EXCHANGE'">退款积分</span>
<view class="priceback" v-if="order.orderType=='DIRECT_BUY'">{{order.totalPrice}}
</view>
<view class="priceback" v-if="order.orderType=='INTEGRAL_EXCHANGE'">{{order.integralExchangeSill}}积分
</view>
<!-- <view class="words">
已修改最多{{order.totalPrice}}含发货邮费 0.00

View File

@ -19,16 +19,16 @@
<view class="content">
{{updata.goodsAttributeName}}
</view>
<image src="../../static/jiantou.png" mode=""></image>
<image src="../../static/huijiantou.png" mode=""></image>
</view>
<view class="Discount common">
<view class="Discount common" @tap="goodsDetailslist.couponList.length>0?couponshow=true:''">
<view class="selected">
优惠
</view>
<!-- <view class="content">
购买最多可获得3积分
<view class="content" v-if="coupon">
已选择 {{coupon.couponTitle}}
</view>
<image src="../../static/jiantou.png" mode=""></image> -->
<image src="../../static/huijiantou.png" mode="" v-if="goodsDetailslist.couponList.length>0"></image>
</view>
<view class="service common">
<view class="selected">
@ -40,7 +40,7 @@
<view class="content" style="display: block;">
· 仅工作日发货
</view>
<!-- <image src="../../static/jiantou.png" mode=""></image> -->
<!-- <image src="../../static/huijiantou.png" mode=""></image> -->
</view>
<view class="picture">
<view class="selected">
@ -69,8 +69,13 @@
<view class="title" v-else>
暂无
</view>
<view class="price">
{{updata.goodsPrice}}
<view class="prices">
<span class="price">
{{totalPrice}}
</span>
<span class="Paidinprice" v-if='Paidinprice'>
实付价{{Paidinprice}}
</span>
</view>
<view class="goodsStock" v-show="goodshow">
库存数量:{{updata.goodsStock}}
@ -124,10 +129,25 @@
数量
</view>
<view class="number">
<u-number-box :min="1" :max="updata.goodsStock" v-model="updata.goodsCount">
<u-number-box :min="1" :max="updata.goodsStock" v-model="updata.goodsCount"
@change='numberchange'>
</u-number-box>
</view>
</view>
<view class="bottomcontent topcontent"
@tap="goodsDetailslist.couponList.length>0?couponshow=true:''">
<view class="header">
优惠券
</view>
<view class="coupon" v-if='coupon' style="color: #D43953;">
已选择 {{coupon.couponTitle}}
</view>
<view class="coupon" v-if='!coupon&&couponListtrue.length>0'
style='color: #D43942;font-size: 30rpx;'>
当前有优惠券可使用
</view>
<u-icon class='img' name="arrow-right" color="black" size="28"></u-icon>
</view>
<view class="" style="height: 230rpx;">
<view class="bottomcontent topcontent" style="padding-bottom: 0;">
<view class="header">
@ -161,9 +181,82 @@
</view>
</view>
</u-mask>
<u-mask :show="couponshow" class='mask' @click="couponshow = false">
<view class="couponmask" @click.stop=''>
<image class="close" src="../../static/gb.png" mode="" @tap='couponshow=false'></image>
</image>
<view class="titles">
选择优惠券
</view>
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
@scrolltolower="lower" @scroll="scroll" style="background-color: #fff;height: 700rpx;">
<view class="item" v-for="(item,dindex) in couponListtrue" :key="dindex">
<view class="top">
<view class="title">
<span class="text">
</span>
<span class="price">
{{item.couponPrice}}
</span>
</view>
<view class="what">
{{item.couponTitle}}
</view>
<view class="texts">
<span style='padding: 0 5rpx;'>{{item.couponConsumePrice}}</span>
可用
</view>
<view class="time">
有效期至{{item.expirationEndTime}}
</view>
<view class="btn" v-if="item.couponId==couponId" @tap='tapcoupon(item)'
style="border: none;">
取消使用
</view>
<view class="btn" v-else @tap='tapcoupon(item)'>
使用
</view>
</view>
<view class="bottom" v-if="item.useStatus=='NOT_USED'">
领取来源{{item.receiveSource =='NEW_PEOPLE_WELFARE'?'新人福利':''}}
</view>
</view>
<view class="item" v-for="(item,uindex) in couponListfalse" :key="uindex">
<view class="top" style="background: #EFECEC;color: #4B4B4B;">
<view class="title">
<span class="text">
</span>
<span class="price">
{{item.couponPrice}}
</span>
</view>
<view class="what" style="background: #DADADA;">
{{item.couponTitle}}
</view>
<view class="texts">
<span style='padding: 0 5rpx;'>{{item.couponConsumePrice}}</span>
可用
</view>
<view class="time">
有效期至{{item.expirationEndTime}}
</view>
<view class="btn2">
不满足
</view>
</view>
<view class="bottom" v-if="item.useStatus=='NOT_USED'">
领取来源{{item.receiveSource =='NEW_PEOPLE_WELFARE'?'新人福利':''}}
</view>
</view>
</scroll-view>
</view>
</u-mask>
</view>
</template>
<script>
import {
goodsDetails
@ -188,13 +281,21 @@
image: null, //
usershow: false, //
goodsPrice: '', //
goodsDetailslist: [], //list
totalPrice: 0.00, //
Paidinprice: null, //
couponId: null, //使id
coupon: null,
goodsDetailslist: {
couponList: [],
}, //list
goodDetailsLists: [], //
goodshow: true, //
buyshow: false, //
couponshow: false, //
info: [], //list
goodsAttributeId: null, //id
updata: { //
couponList: [],
goodsPrice: 0.00,
goodsName: "",
goodsAttributeName: '',
@ -210,13 +311,16 @@
discountPrice: 0.00, //
buySource: '', // 'NURSE_STATIONSHOPPING_MALL'
orderChannel: 'WECHAT_APPLET', // AppMOBILE_APPWECHAT_APPLETALI_PAY_APPLET'
receiver: "", //
receiver: null, //
receiveAddress: "", //
phone: '', //
attributeDetailsId: '', //id
goodsAttributeId: '',
goodsAttributeDetailsId: '',
originalTotalPrice: null,
},
couponListtrue: [],
couponListfalse: [],
scrollTop: 0,
old: {
scrollTop: 0
@ -224,7 +328,66 @@
userid: null,
};
},
watch: { //
totalPrice() {
this.couponListtrue = []
this.couponListfalse = []
this.goodsDetailslist.couponList.forEach(e => {
if (this.totalPrice >= e.couponConsumePrice) {
this.couponListtrue.push(e)
} else {
this.couponListfalse.push(e)
}
})
},
},
methods: {
//使
tapcoupon(item) {
if (this.couponId == item.couponId) {
this.couponId = null
this.Paidinprice = null
this.coupon = null
} else {
this.couponId = item.couponId
this.Paidinprice = (this.totalPrice - item.couponPrice).toFixed(2)
this.coupon = item
}
this.couponshow = false
},
//
numberchange(e) {
this.totalPrice = JSON.parse(JSON.stringify((this.updata.goodsPrice * this.updata.goodsCount).toFixed(2)))
this.couponListtrue = []
this.couponListfalse = []
this.goodsDetailslist.couponList.forEach(e => {
if (this.totalPrice >= e.couponConsumePrice) {
this.couponListtrue.push(e)
} else {
this.couponListfalse.push(e)
}
})
if (this.couponId) {
this.goodsDetailslist.couponList.forEach(e => {
if (this.couponId == e.couponId) {
if (this.totalPrice >= e.couponConsumePrice) {
this.Paidinprice = (Number(this.totalPrice) - Number(this.coupon.couponPrice))
.toFixed(2)
} else {
this.couponId = null
this.Paidinprice = null
this.coupon = null
}
}
})
} else {
this.Paidinprice = null
}
},
buyshowtrue() {
this.buyshow = true
this.totalPrice = Number((this.updata.goodsPrice * this.updata.goodsCount).toFixed(2))
},
upper: function(e) {},
lower: function(e) {},
scroll: function(e) {
@ -237,27 +400,6 @@
url: '/pages/information/information'
})
},
buyshowtrue() {
var that = this
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
that.buyshow = true
} else {
that.$refs.uToast.show({
title: '未登录,请先登录',
type: 'error'
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateTo({
url: '/pages/login/login'
})
}, 1000)
}
},
//
tapbuy() {
var that = this
@ -281,78 +423,102 @@
type: 'error'
})
} else {
this.updata.goodsPrice = Number(this.updata.goodsPrice)
this.buyshow = false
this.updata.totalPrice = (this.updata.goodsPrice * this.updata
.goodsCount).toFixed(
2)
addStationGoodsOrder(this.updata).then(res => {
if (res.code == 500) {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
})
} else {
let id = res.data.id
let paydata = res.data
paydata.openid = value
paydata.payType = "WECHAT_PAY"
paydata.paymentPrice = res.data.totalPrice
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.goodsDetailsinfo(
that
.goodsInfoId
)
that.$refs
.uToast
.show({
title: '支付成功',
type: 'success',
duration: 1000,
url: '/pages/paysuccess/paysuccess'
})
},
fail: function(err) {
that.goodsDetailsinfo(
that
.goodsInfoId
)
that.$refs
.uToast
.show({
title: '取消支付',
type: 'error',
duration: 1000,
url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
})
// uni.navigateTo({
// url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
// })
}
});
} else {
that.$refs.uToast.show({
title: response.msg,
type: 'error',
duration: 1000
})
}
})
}
})
this.updata.totalPrice = Number((this.updata.goodsPrice *
this.updata.goodsCount).toFixed(
2))
this.updata.originalTotalPrice = this.updata.totalPrice
if (this.couponId) {
this.updata.couponId = this.couponId
this.updata.couponTitle = this.coupon.couponTitle
this.updata.discountPrice = Number(this.coupon.couponPrice)
this.updata.couponConsumePrice = Number(this.coupon
.couponConsumePrice)
this.updata.totalPrice = Number((this.updata.originalTotalPrice -
this.updata.discountPrice).toFixed(2))
}
if (this.updata.totalPrice > 0) {
addStationGoodsOrder(this.updata).then(res => {
if (res.code == 500) {
that.$refs.uToast.show({
title: res.msg,
type: 'error'
})
} else {
let id = res.data.id
let paydata = res.data
paydata.openid = value
paydata.payType = "WECHAT_PAY"
paydata.paymentPrice = res.data.totalPrice
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.goodsDetailsinfo(
that
.goodsInfoId,
that
.updata
.patientId
)
that.$refs
.uToast
.show({
title: '支付成功',
type: 'success',
duration: 1000,
url: '/pages/paysuccess/paysuccess'
})
},
fail: function(err) {
that.goodsDetailsinfo(
that
.goodsInfoId,
that
.updata
.patientId
)
that.$refs
.uToast
.show({
title: '取消支付',
type: 'error',
duration: 1000,
url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
})
// uni.navigateTo({
// url: `/pages/payorderDetails/payorderDetails?goodsOrderId=${id}`
// })
}
});
} else {
that.$refs.uToast.show({
title: response.msg,
type: 'error',
duration: 1000
})
}
})
}
})
} else {
that.$refs.uToast.show({
title: '订单金额为0,无法下单',
type: 'error'
})
}
}
} else {
that.$refs.uToast.show({
@ -426,13 +592,42 @@
this.updata.goodsStock = item.goodsStock
this.updata.goodsAttributeId = item.goodsAttributeId
this.updata.goodsAttributeDetailsId = item.attributeDetailsId
this.updata.goodsCount = 1
if (this.updata.goodsStock == 0) {
this.updata.goodsCount = 0
this.totalPrice = this.updata.goodsPrice
} else {
this.totalPrice = this.updata.goodsPrice
}
this.couponListtrue = []
this.couponListfalse = []
this.goodsDetailslist.couponList.forEach(e => {
if (this.totalPrice >= e.couponConsumePrice) {
this.couponListtrue.push(e)
} else {
this.couponListfalse.push(e)
}
this.Paidinprice = null
this.couponId = null
this.coupon = null
// if (this.couponId == e.couponId) {
// if (this.totalPrice >= e.couponConsumePrice) {
// this.Paidinprice = (this.totalPrice - e.couponPrice).toFixed(2)
// this.coupon = e
// } else {
// this.Paidinprice = null
// this.couponId = null
// this.coupon = null
// }
// }
})
}
},
//
goodsDetailsinfo(goodsInfoId) {
goodsDetailsinfo(goodsInfoId, value) {
let that = this
this.info = []
goodsDetails(goodsInfoId).then(res => {
goodsDetails(goodsInfoId, value).then(res => {
uni.removeStorageSync('Refresh');
if (res.data.goodsRemark) {
res.data.goodsRemark = res.data.goodsRemark.replace(/\<img/gi,
@ -460,19 +655,34 @@
this.goodDetailsLists = res.data.goodAttributeDetailsLists
this.goodshow = true
}
if (!res.data.couponList) {
res.data.couponList = []
}
this.couponListtrue = []
this.couponListfalse = []
this.goodsDetailslist = res.data
this.updata.goodsName = this.goodsDetailslist.goodsName
this.updata.nurseStationId = this.goodsDetailslist.nurseStationId
this.updata.goodsUnit = res.data.goodsUnit
if (this.goodDetailsLists.length == 1) {
this.goodDetailsLists[0].isActive = true
this.updata.img = this.goodDetailsLists[0].attributePitureUrl
this.updata.goodsAttributeName = this.goodDetailsLists[0].attributeDetailsName
this.updata.goodsPrice = this.goodDetailsLists[0].goodsPrice
this.totalPrice = (this.goodDetailsLists.goodsPrice * this.updata.goodsCount)
.toFixed(2)
this.updata.goodsPrice = this.updata.goodsPrice.toFixed(2)
this.updata.attributeDetailsId = this.goodDetailsLists[0].attributeDetailsId
this.updata.goodsStock = this.goodDetailsLists[0].goodsStock
this.updata.goodsAttributeId = this.goodDetailsLists[0].goodsAttributeId
this.updata.goodsAttributeDetailsId = this.goodDetailsLists[0].attributeDetailsId
this.goodsDetailslist.couponList.forEach(e => {
if (this.totalPrice >= e.couponConsumePrice) {
this.couponListtrue.push(e)
} else {
this.couponListfalse.push(e)
}
})
} else {
var list = {}
this.goodsDetailslist.goodAttributeDetailsLists.forEach(e => {
@ -486,6 +696,15 @@
this.updata.img = list.attributePitureUrl
this.updata.goodsAttributeName = list.attributeDetailsName
this.updata.goodsPrice = list.goodsPrice
this.totalPrice = (list.goodsPrice * this.updata.goodsCount).toFixed(2)
console.log(list)
this.goodsDetailslist.couponList.forEach(e => {
if (this.totalPrice >= e.couponConsumePrice) {
this.couponListtrue.push(e)
} else {
this.couponListfalse.push(e)
}
})
this.updata.attributeDetailsId = list.attributeDetailsId
this.updata.goodsStock = list.goodsStock
this.updata.img = list.attributePitureUrl
@ -506,9 +725,26 @@
url: `/pages/modifyAddress/modifyAddress?updata=${JSON.stringify(this.updata)}`
})
} else {
uni.navigateTo({
url: '/pages/information/information'
})
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: '/pages/information/information'
})
} else {
this.$refs.uToast.show({
title: '未登录,请先登录',
type: 'error'
})
if (this.timer) {
clearTimeout(this.timer)
}
this.timer = setTimeout(e => {
uni.navigateTo({
url: '/pages/login/login'
})
}, 1500)
}
}
},
//
@ -539,9 +775,11 @@
this.goodsAttributeId = options.goodsAttributeId
this.updata.buySource = options.buySource
this.goodsInfoId = options.goodsInfoId
// this.goodsInfoId = 49
const value = uni.getStorageSync('patientId');
if (value) {
that.updata.patientId = value
// that.updata.patientId = 92
that.goodsList()
} else {}
},
@ -549,33 +787,35 @@
var that = this
this.baseurl = baseurl
this.usershow = false
this.goodsDetailsinfo(this.goodsInfoId)
const value = uni.getStorageSync('patientId');
if (value) {
that.goodsDetailsinfo(that.goodsInfoId, value)
goodPatientInfo(value).then(res => {
if (res.code == 200) {
var user = res.data.filter(e => e.id == this.userid)
var user = res.data.filter(e => e.id == that.userid)
if (user.length >= 1) {
// user[0].address = user[0].provinceName + user[0].cityName + user[0].regionName + user[0]
// .streetName + user[0].receiveAddress
this.updata.receiver = user[0].receiveName
this.updata.receiveAddress = user[0].areaName + user[0].receiveAddress
this.updata.phone = user[0].receivePhone
this.userid = user[0].id
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 {
// res.data.forEach(e => {
// e.address = e.provinceName + e.cityName + e.regionName + e.streetName + e
// .receiveAddress
// })
this.updata.receiver = res.data[0].receiveName
that.updata.receiver = res.data[0].receiveName
// this.updata.receiveAddress = res.data[0].address
this.updata.receiveAddress = res.data[0].areaName + res.data[0].receiveAddress
this.updata.phone = res.data[0].receivePhone
this.userid = res.data[0].id
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 {}
} else {
that.goodsDetailsinfo(this.goodsInfoId, '')
}
let useritem = null
uni.$on('updata', function(data) {
that.updata = JSON.parse(data.updata)

View File

@ -1,10 +1,125 @@
.app {
padding: 0;
.close {
width: 31rpx;
height: 31rpx;
position: absolute;
top: 2%;
right: 2%;
z-index: 999;
}
.scroll-Y {
height: 790rpx;
background-color: #F4F5F7;
}
.mask {
.couponmask{
z-index: 999;
height: 800rpx;
position: fixed;
bottom: 0;
width: 100%;
background: #FFFFFF;
border-radius: 30rpx;
.titles{
width: 100%;
height: 40rpx;
font-size: 42rpx;
margin: 20rpx auto;
text-align: center;
}
.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 {
// width: 120rpx;
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;
}
.btn2{
width: 130rpx;
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;
}
}
}
}
}
.information {
width: 70%;
height: 400rpx;
@ -59,6 +174,7 @@
border-radius: 30rpx 30rpx 0px 0px;
font-size: 36rpx;
padding-bottom: 20rpx;
z-index: 10;
.bodys {
background-color: #FFFFFF;
width: 96%;
@ -105,14 +221,7 @@
}
}
}
.close {
width: 31rpx;
height: 31rpx;
position: absolute;
top: 2%;
right: 2%;
z-index: 999;
}
.topcontent {
width: 96%;
@ -122,21 +231,31 @@
.goodsStock{
font-size: 24rpx;
position: absolute;
top: 73%;
left: 75%;
top: 55%;
right: 10rpx;
}
.price {
color: #D43953;
.prices{
position: absolute;
top: 70%;
left: 37%;
left: 230rpx;
.Paidinprice{
font-size:28rpx;
margin-left: 10rpx;
color: #fff;
border-radius: 20rpx;
display: inline-block;
padding: 0 10rpx;
background-color:#D43953 ;
}
.price {
color: #D43953;
}
}
.title {
font-size: 36rpx;
position: absolute;
top: 3%;
left: 38%;
left: 230rpx;
font-weight: 600;
width: 58%;
// height: 85rpx;
@ -144,7 +263,7 @@
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
-webkit-line-clamp:2;
word-break: break-all;
}
@ -179,6 +298,14 @@
padding: 35rpx 0;
background-color: #FFFFFF;
border-radius: 15rpx;
.coupon{
display: inline-block;
font-size: 30rpx;
position: absolute;
top: 50%;
right: 70rpx;
transform: translateY(-50%);
}
.chat {
height: 130rpx;
position: relative;
@ -199,6 +326,12 @@
height: 55rpx;
}
}
.img{
position: absolute;
top: 50%;
right: 20rpx;
transform: translateY(-50%);
}
.header {
font-size: 32rpx;
display: inline-block;
@ -335,7 +468,7 @@
box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
position: relative;
padding-bottom: 110rpx;
.textInfo {
.textInfo {
word-break:break-all;
font-size: 29rpx;
text-indent: 2rem;
@ -352,6 +485,7 @@
color: #969394;
display: inline-block;
margin-bottom: 20rpx;
font-size: 34rpx;
}
image {

View File

@ -7,7 +7,7 @@
<view class="" v-if="total>0">
<view class="Apayment" v-for='(item,index) in orderlist' :key="index">
<view class="names">店铺名称
<image class="picture" src="/static/pic.png" mode=""></image>
<image class="picture" src="../../static/huijiantou.png" mode=""></image>
<span v-if="item.orderStatus=='WAIT_PAY'">待付款</span>
<span v-if="item.orderStatus=='WAIT_REFUND'">退款中</span>
<span v-if="item.orderStatus=='CANCEL'">已取消</span>
@ -25,15 +25,22 @@
<view class="model">
<view class="top">
<span>{{item.goodsName}}</span>
<span>{{item.goodsPrice}}</span>
<span v-if="item.goodsPrice">{{item.goodsPrice}}</span>
</view>
<view class="bottom">
<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.totalPrice}}</text>
<text class="price"
v-if="item.orderType=='INTEGRAL_EXCHANGE'">{{item.integralExchangeSill}}</text>
<span v-if="item.orderType=='INTEGRAL_EXCHANGE'" style='padding-left: 10rpx;'>
积分
</span>
</view>
</view>
</view>
@ -74,7 +81,7 @@
<image :src="baseurl+img" mode=""></image>
<view class="blackground">共1件</view>
</view>
<view class="word">为了保证的售后权益请收到商品确认无误后再确认收货</view>
<view class="word">为了保证的售后权益请收到商品确认无误后再确认收货</view>
</view>
<view class="submits" @tap='Receipts'>确定</view>
</u-popup>
@ -252,20 +259,16 @@
this.pageNum = 1;
this.baseurl = baseurl;
let that = this
try {
const value = uni.getStorageSync('openid');
if (value) {} else {
uni.navigateTo({
url: '/pages/login/login'
})
}
} catch (e) {}
try {
const value3 = uni.getStorageSync('Refresh');
if (value3) {
that.goodsOrderinfo();
}
} catch (e) {}
const value = uni.getStorageSync('openid');
if (value) {} else {
uni.navigateTo({
url: '/pages/login/login'
})
}
const value3 = uni.getStorageSync('Refresh');
if (value3) {
that.goodsOrderinfo();
}
},
onLoad(options) { //
let that = this

View File

@ -148,7 +148,7 @@
.item {
width: 100%;
height: 200rpx;
height: 250rpx;
position: relative;
border-bottom: 2rpx solid #CDC9C9;
@ -157,8 +157,8 @@
right: 0;
top: 50%;
transform: translateY(-50%);
width: 253rpx;
height: 164rpx;
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
}
@ -176,6 +176,13 @@
left: 0;
width: 60%;
font-size: 30rpx;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 5; //
line-clamp: 5;
-webkit-box-orient: vertical;
}
}
}

View File

@ -0,0 +1,70 @@
<template>
<view class="app">
<view class="concent">
<view class="background">
<image src="/static/logo.png" mode=""></image>
<view>
<view class="detailed">
敬请期待
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
.app {
padding-top: 10rpx;
.concent {
width: 701rpx;
height: 600rpx;
background: #4C7BC9;
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
margin: 5% auto 20px;
.background {
position: relative;
width: 657rpx;
height: 560rpx;
background: #FFFFFF;
border-radius: 25rpx;
background-color: white;
margin: 0 auto;
top: 50%;
transform: translateY(-50%);
image {
width: 178rpx;
height: 200rpx;
background: #FFFFFF;
border-radius: 25px;
margin-left: 68%;
margin-top: 5%;
}
}
}
}
.detailed {
width: 657rpx;
padding: 0 42rpx;
line-height: 56rpx;
}
.detailed view {
text-indent: 2em;
}
</style>

View File

@ -0,0 +1,186 @@
.app {
font-size: 35rpx;
padding: 0 0 200rpx 0;
position: relative;
text-align: center;
.service {
position: absolute;
top:985rpx;
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:670rpx;
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:420rpx;
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: 550rpx;
position: relative;
color: #FFFFFF;
font-size: 39rpx;
.modify {
position: absolute;
right: 3%;
top:250rpx;
font-size:28rpx;
image{
width: 23rpx;
height: 23rpx;
padding-left: 10rpx;
}
}
.login{
position: absolute;
top: 220rpx;
left: 35%;
font-size: 36rpx;
width: 180rpx;
line-height: 70rpx;
border:1rpx solid #fff;
height: 70rpx;
border-radius: 20rpx;
}
.nickname {
position: absolute;
top: 300rpx;
left: 35%;
font-size: 30rpx;
}
.phone {
position: absolute;
top: 180rpx;
left: 35%;
}
.bjimg{
width: 100%;
height: 100%;
image{
width: 100%;
height: 100%;
}
}
.img {
width: 150rpx;
height: 150rpx;
border-radius: 50%;
background: #F6F6F6;
position: absolute;
top: 180rpx;
left: 8%;
}
}
}

View File

@ -1,143 +1,370 @@
<template>
<view class="app">
<view class="item" @tap='gouser'>
<image src="../../static/user.png" mode=""></image>
<view class="title">
个人信息
<view class="user" v-if="appPersonallist">
<image v-if="appPersonallist.headPictureUrl" class="img" :src="baseurl+appPersonallist.headPictureUrl"
mode=""></image>
<image class="img" v-else src="../../static/user.png" mode=""></image>
<image class="bjimg" :src="bjimg" mode=""></image>
<view class="phone" v-if="appPersonallist.patientName">
{{appPersonallist.patientName}}
</view>
<view class="nickname" style="top:250rpx">
<span style='padding-right: 10rpx;' v-if="appPersonallist.age!=null&&appPersonallist.age>=0">
{{appPersonallist.age}}
</span>
<span style='padding-right: 30rpx;' v-if="appPersonallist.age!=null&&appPersonallist.age>=0">
</span>
{{appPersonallist.sex=='MALE'?'男':''}}
{{appPersonallist.sex=='FEMALE'?'女':''}}
</span>
</view>
<view class="nickname">
{{appPersonallist.phone}}
</view>
<view class="modify" @tap='updatainfo()'>
修改信息
<image src="../../static/xg.png" mode=""></image>
</view>
</view>
<view class=" item" @tap='goorder'>
<image src="../../static/dingdan.png" mode=""></image>
<view class="title">
我的订单
<view class="user" v-else>
<image class="img" src="../../static/user.png" mode=""></image>
<image class="bjimg" :src="bjimg" mode=""></image>
<view class="login" @tap='gologin'>
登录
</view>
</view>
<view class="userinfo">
<view class="item" @tap='goHealthrecords'>
<image src="../../static/jkda.png" mode=""></image>
<view class="text">
健康档案
</view>
</view>
<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">
{{appPersonallist.integral}}</span>
<span style='padding:0 5rpx' v-else>
0</span>
</view>
</view>
<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">
{{appPersonallist.patientCouponCount}}</span>
<span style='padding:0 5rpx' v-else>
0</span>
</view>
</view>
</view>
<view class="content">
<view class="CommodityOrder" @tap="goorder">
<view class="title">
商品订单
</view>
<view class="text">
查看全部
<image src="../../static/huijiantou.png" mode=""></image>
</view>
</view>
<view class="center">
<view class="OrderStatus" @tap="gopaid('WAIT_PAY')">
<image src="/static/Tobepaid.png" mode=""></image>
<view class="title">待付款</view>
<view class="orderCount" v-if="appPersonallist.waitPayCount>0&&appPersonallist.waitPayCount<100">
{{appPersonallist.waitPayCount}}
</view>
<view class="orderCount" style="width: 57rpx;border-radius: 17rpx;right:25rpx"
v-if="appPersonallist.waitPayCount>=100">
99+
</view>
</view>
<view class="OrderStatus" @tap="goreceive('WAIT_RECEIVED_GOODS')">
<image src="/static/received.png" mode=""></image>
<view class="title">待收货</view>
<view class="orderCount"
v-if="appPersonallist.waitReceivedGoodsCount>0&&appPersonallist.waitReceivedGoodsCount<100">
{{appPersonallist.waitReceivedGoodsCount}}
</view>
<view class="orderCount" style="width: 57rpx;border-radius: 17rpx;right:25rpx"
v-if="appPersonallist.waitReceivedGoodsCount>=100">
99+
</view>
</view>
<view class="OrderStatus" @tap="gocompleted('RECEIVED_GOODS')">
<image src="/static/evaluated.png" mode=""></image>
<view class="title">待评价</view>
<view class="orderCount"
v-if="appPersonallist.receivedGoodsCount>0&&appPersonallist.receivedGoodsCount<100">
{{appPersonallist.receivedGoodsCount}}
</view>
<view class="orderCount" style="width: 57rpx;border-radius: 17rpx;right:25rpx"
v-if="list.receivedGoodsCount>=100">
99+
</view>
</view>
<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">
{{list.evaluatedCount}}
</view>
<view class="orderCount" v-if="list.evaluatedCount>=100">
99+
</view> -->
</view>
</view>
</view>
<view class="service" @tap="gonursestation">
<view class="serviceorder">护理站服务订单</view>
<image src="../../static/huijiantou.png" mode=""></image>
</view>
<view class="service" style="top:1100rpx" @tap='remove'>
<view class="serviceorder">退出账号</view>
<image src="../../static/huijiantou.png" mode=""></image>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
appPersonal,
} from '@/api/Personal/Personal.js';
import {
existPatientInfo
} from '@/api/startup/index.js'
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {};
return {
baseurl: '',
appPersonallist: null, //
timer: null,
list: {},
bjimg: '',
}
},
onLoad() {},
onShow() {
this.bjimg = baseurl + '/profile/appletPicture/inviteFriendsOne.png'
let that = this
this.baseurl = baseurl
this.myInfo()
const value = uni.getStorageSync('patientId');
if (value) {} else {
that.appPersonallist = null
that.$refs.uToast.show({
title: '请先登录',
type: 'error',
duration: '1000',
})
}
},
onLoad(options) {},
methods: {
goorder() {
var that = this
try {
const value = uni.getStorageSync('openid');
const value3 = uni.getStorageSync('token');
var that = this
if (value && value3) {
existPatientInfo(value).then(res => {
if (res.code == 200 && res.msg == 'LOGIN') {
const value2 = uni.getStorageSync('patientId');
if (value2) {
uni.navigateTo({
url: '/pages/order/order'
})
} else {
that.remove()
}
} else {
that.remove()
}
})
} else {
that.remove()
}
} catch {
that.remove()
}
},
//
gouser() {
try {
const value = uni.getStorageSync('openid');
const value3 = uni.getStorageSync('token');
var that = this
if (value && value3) {
existPatientInfo(value).then(res => {
if (res.code == 200 && res.msg == 'LOGIN') {
const value2 = uni.getStorageSync('patientId');
if (value2) {
uni.navigateTo({
url: '/pages/user/user'
})
} else {
that.remove()
}
} else {
that.remove()
}
})
} else {
that.remove()
}
} catch {
that.remove()
}
},
remove() {
let that = this
const value = uni.getStorageSync('patientId');
if (value) {
uni.showModal({
title: '提示',
content: '确认要退出此账号吗',
success: function(res) {
if (res.confirm) {
uni.removeStorageSync('patientId');
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
that.$refs.uToast.show({
title: '退出账号成功',
type: 'success',
duration: '1000'
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.switchTab({
url: '/pages/homepage/homepage'
})
}, 1000)
}
}
});
} else {
that.$refs.uToast.show({
title: '您未登录',
type: 'error',
duration: '1000'
})
}
},
removes() {
this.appPersonallist = null
uni.removeStorageSync('patientId');
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
uni.removeStorageSync('Refresh');
uni.navigateBack({
delta: 1
})
},
//
myInfo() {
var that = this
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
existPatientInfo(value).then(res => {
if (res.code == 200 && res.msg == 'LOGIN') {
appPersonal(value2).then(Response => {
if (Response.code == 200) {
that.appPersonallist = Response.data
if (!that.appPersonallist.integral) {
that.appPersonallist.integral = 0
}
that.appPersonallist.homeLatitude = Number(that.appPersonallist
.homeLatitude)
that.appPersonallist.homeLongitude = Number(that.appPersonallist
.homeLongitude)
} else if (Response.code == 9999) {} else {
that.removes();
}
})
} else {
that.removes();
}
})
} else {
that.removes();
}
},
updatainfo() {
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: `/pages/modify/modify`
})
} else {
this.gologin();
}
},
//
gonursestation() {
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: '/pages/Nursingstationserviceorder/Nursingstationserviceorder'
})
} else {
this.gologin();
}
},
//
goreceive(item) {
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
} else {
this.gologin();
}
},
//
goorder() {
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: '/pages/CommodityOrder/CommodityOrder'
})
} else {
this.gologin();
}
},
//
gologin() {
uni.navigateTo({
url: '/pages/login/login'
})
},
},
//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,
}
//
gocoupon() {
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: '/pages/coupon/coupon'
})
} else {
this.gologin();
}
},
//
gointegral() {
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: `/pages/integral/integral?integral=${this.appPersonallist.integral}`
})
} else {
this.gologin();
}
},
//
goEVALUATED(item) {
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
} else {
this.gologin();
}
},
//
gocompleted(item) {
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
} else {
this.gologin();
}
},
//
gopaid(item) {
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
} else {
this.gologin();
}
},
//
goHealthrecords() {
uni.navigateTo({
url: '/pages/Healthrecords/Healthrecords'
})
},
},
}
</script>
<style lang="scss">
.app {
padding: 0;
.item {
width: 94%;
margin: 20rpx auto 0;
background-color: #fff;
position: relative;
height: 100rpx;
border-radius: 5rpx;
.title {
position: absolute;
left: 150rpx;
top: 50%;
transform: translateY(-50%);
font-size: 44rpx;
}
image {
position: absolute;
left: 40rpx;
top: 50%;
transform: translateY(-50%);
width: 55rpx;
height: 55rpx;
}
}
}
@import "./Personal.scss";
</style>

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

@ -0,0 +1,159 @@
.app {
padding: 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: 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;
}
}
}
}

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

@ -0,0 +1,148 @@
<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">
<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>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
selectCoupon
} from '@/api/coupon/index.js'
export default {
data() {
return {
pageNum: 1,
pageSize: 10,
couponlist: null,
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.switchTab({
url: '/pages/shopping/shopping'
})
},
},
onReachBottom() { //
if (this.couponlist.length >= this.total) {} else {
this.pageNum++;
selectCoupon(this.pageNum, this.pageSize, this.patientId, this.couponstatus).then(res => {
res.rows.forEach(e => {
this.couponlist.push(e)
})
})
}
},
onPullDownRefresh() { //
this.pageNum = 1;
this.getlist();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>
<style lang="scss">
@import "./coupon.scss";
</style>

View File

@ -3,24 +3,26 @@
<view class="title">
长按识别二维码
</view>
<image src="../../static/kefuzx.jpg" mode="" :show-menu-by-longpress="true"></image>
<image :src="img" mode="" :show-menu-by-longpress="true"></image>
</view>
</template>
<script>
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
imageUrl: [
'../../static/kefuzx.jpg'
]
img: '',
};
},
onShow() {
this.img = baseurl + '/profile/appletPicture/customer.jpg'
},
methods: {
previewImage(e) {
uni.previewImage({
// urls
urls: this.imageUrl,
urls: this.img,
// /
current: 0,
//
@ -39,7 +41,25 @@
}
});
},
}
},
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
return {
title: '泉医到家',
path: url,
}
},
}
</script>

View File

@ -1,6 +1,6 @@
<template>
<view class="app">
<u-tabs :list="tabList" :current="tabcurrent" @change="change"></u-tabs>
<!-- <u-tabs :list="tabList" :current="tabcurrent" @change="change"></u-tabs>
<view class="items">
<view class="item" @tap='godiseasemanagement'>
<image src="../../static/zbglzbgl.png" mode=""></image>
@ -14,6 +14,20 @@
国家老年病中心
</view>
</view>
</view> -->
<view class="concent">
<view class="background">
<image src="/static/logo.png" mode=""></image>
<view>
<view class="detailed">
专病管理简介:慢性病已成为我国老年人健康的最大威胁建立标准化的慢病专病并发症防治中心建立规范化的导诊流程建立慢病专病综合电子档案对于慢病及并发症的早期发现早期治疗延缓并发症的发生发展降低患者政府经济负担具有重要现实意义组建金字塔式医生服务团队由省级知名专家全程介入慢病管理远程会
绿色就医通道;基层全科医生护师落实专家
指导意见和上门随访服务;辅以营养师和运动处方
根据筛查监测数据提供营养膳食和专属运动处
方运动建议打造一人一病一处方的管理模式
</view>
</view>
</view>
</view>
</view>
</template>
@ -31,21 +45,25 @@
onShow() {},
onLoad() {},
methods: {
//
gogeriatricdisease() {
uni.navigateTo({
url: "/pages/geriatricdisease/geriatricdisease"
})
},
//
godiseasemanagement() {
uni.navigateToMiniProgram({
appId: 'wxa690d053c34ceebd',
path: '/pages/index/index',
extraData: {
'from': 'qy'
},
success(res) {}
const phone = uni.getStorageSync('phone');
if (phone) {
uni.navigateToMiniProgram({
appId: 'wxa690d053c34ceebd',
path: '/pages/index/index',
extraData: {
'from': 'qy',
'phone': phone
},
success(res) {}
})
}
},
//
gogeriatricdisease() {
uni.navigateTo({
url: '/pages/geriatricdisease/geriatricdisease'
})
},
},
@ -71,6 +89,60 @@
</script>
<style lang="scss">
.app {
padding-top: 10rpx;
.concent {
width: 701rpx;
height: 1050rpx;
background: #4C7BC9;
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
margin: 5% auto 20px;
.background {
position: relative;
width: 657rpx;
height: 1000rpx;
background: #FFFFFF;
border-radius: 25rpx;
background-color: white;
margin: 0 auto;
top: 50%;
transform: translateY(-50%);
image {
width: 178rpx;
height: 200rpx;
background: #FFFFFF;
border-radius: 25px;
margin-left: 68%;
margin-top: 5%;
}
}
}
.detailed {
width: 657rpx;
padding: 0 42rpx;
line-height: 56rpx;
}
.detailed view {
text-indent: 2em;
}
}
.app {
padding: 0;

View File

@ -184,14 +184,6 @@
},
//
godiseasemanagement() {
// uni.navigateToMiniProgram({
// appId: 'wxa690d053c34ceebd',
// path: '/pages/index/index',
// extraData: {
// from: 'qy'
// },
// success(res) {}
// })
uni.navigateTo({
url: '/pages/diseasemanagement/diseasemanagement'
})
@ -380,9 +372,13 @@
left: 0;
width: 65%;
font-size: 30rpx;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 5; //
line-clamp: 5;
-webkit-box-orient: vertical;
}
}
}

View File

@ -69,8 +69,8 @@
.radio {
display: inline-block;
width: 35rpx;
height: 35rpx;
width: 50rpx;
height: 50rpx;
border-radius: 70%;
border: 2rpx solid #178ffb;
position: absolute;
@ -156,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%);
}
}
}
@ -167,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%;
@ -209,9 +248,5 @@
transform: translateY(-50%);
}
}
.item:nth-child(6) {
border: 0;
}
}
}

View File

@ -4,27 +4,42 @@
</view>
<view class="userinfo info">
<view class="item">
<span>姓名:</span>
<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='请输入' />
</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>
<span>详细地址</span>
<u-input :clearable='false' v-model="query.address" type="text" placeholder='小区、单元、门牌号' />
</view>
<view class="item" @tap='getAddress()'>
<span>所在位置:</span>
<span>所在位置</span>
<view class="address" style="">
{{query.locationName}}
</view>
@ -36,9 +51,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'"
@ -51,7 +73,7 @@
{{item.nurseTypeName}}
</view>
</view>
</view>
</view> -->
</view>
<view class="radio-content">
<view class="radio-right" @tap="changeRadio">
@ -84,6 +106,8 @@
</view>
</view>
</u-mask>
<u-picker mode="time" v-model="timeshow" :params="params" @confirm='timechange' @canel='timeshow=false'>
</u-picker>
</view>
</template>
@ -105,6 +129,24 @@
},
data() {
return {
timeshow: false, //
params: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
sexlist: [{
name: '男',
disabled: false
},
{
name: '女',
disabled: false
}
],
radio: 1,
// chooseLocation: '', //
arealist: [], //list
@ -130,15 +172,23 @@
diseaseInfoList: [],
patientId: '',
locationName: '',
sex: '',
birthDate: '',
},
timer: null,
addresslength: null,
patientDiseaseInfoList: [], //
};
},
methods: {
//
informationinfo() {
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 {
@ -153,6 +203,7 @@
} else {
information(that.query).then(res => {
if (res.code == 200) {
uni.removeStorageSync('invitationPatientId');
that.$refs.uToast.show({
title: '完善信息成功',
type: 'success',
@ -189,6 +240,18 @@
})
}
},
//
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;
@ -283,12 +346,10 @@
//
onLoad() {
let that = this
try {
const value = uni.getStorageSync('patientId');
if (value) {
that.query.patientId = value
}
} catch (e) {}
const value = uni.getStorageSync('patientId');
if (value) {
that.query.patientId = value
}
this.areaInfo()
this.getNurseTypeInfo();
},
@ -296,6 +357,14 @@
// onShow
onShow() {
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) {

View File

@ -0,0 +1,518 @@
.app {
padding-bottom:10rpx ;
.masks {
z-index: 999;
}
.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%;
}
}
}

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

@ -0,0 +1,634 @@
<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">
<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>
<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=''>
<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>
<view class="namephone" v-if='userid'>
{{updata.receiver}},{{updata.phone}}
</view>
<view class="address" v-if='userid'>
{{updata.receiveAddress}}
</view>
<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 {
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: null,
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,
}
};
},
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.selectPatientSignInifo();
that.goodsList();
}
},
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) {
that.updata.patientId = value
goodPatientInfo(value).then(res => {
if (res.code == 200) {
var user = res.data.filter(e => e.id == that.userid)
if (user.length >= 1) {
that.updata.receiver = user[0].receiveName
that.updata.receiveAddress = user[0].areaName + user[0].receiveAddress
that.updata.phone = user[0].receivePhone
that.userid = user[0].id
} else {
that.updata.receiver = res.data[0].receiveName
that.updata.receiveAddress = res.data[0].areaName + res.data[0].receiveAddress
that.updata.phone = res.data[0].receivePhone
that.userid = res.data[0].id
}
}
})
} else {}
let useritem = null
uni.$on('updata', function(data) {
if (data.useritem) {
useritem = JSON.parse(data.useritem)
that.updata.receiver = useritem.receiveName
that.updata.phone = useritem.receivePhone
that.updata.receiveAddress = useritem.areaName + useritem.receiveAddress
that.userid = useritem.id
}
})
},
methods: {
yaoqingshowtrue() {
this.yaoqingshow = true
this.$nextTick(async () => {
await inviteFriends(this.patientId).then(res => {
this.inviteimg = res.msg
})
uni.showLoading({
title: '加载中'
});
//
await this.$refs.rCanvas.init({
canvas_id: "rCanvas"
})
//
await this.$refs.rCanvas.drawImage({
url: this.yapqingbeijingimg,
x: 0,
y: 0,
w: 300,
h: 530
}).catch(err_msg => {
uni.showToast({
title: err_msg,
icon: "none"
})
})
await this.$refs.rCanvas.drawImage({
url: baseurl + this.inviteimg,
x: 85,
y: 340,
w: 130,
h: 130
}).catch(err_msg => {
uni.showToast({
title: err_msg,
icon: "none"
})
})
//
await this.$refs.rCanvas.drawText({
text: "智慧康养泉城,医护关怀到家",
x: 150,
y: 300,
font_color: "#444444",
font_size: 12,
font_weight: 600,
text_align: 'center'
}).catch(err_msg => {
uni.showToast({
title: err_msg,
icon: "none"
})
})
await this.$refs.rCanvas.drawText({
text: "超多福利,快来体验吧!",
x: 150,
y: 320,
font_color: "#444444",
font_size: 12,
font_weight: 600,
text_align: 'center'
}).catch(err_msg => {
uni.showToast({
title: err_msg,
icon: "none"
})
})
await this.$refs.rCanvas.drawText({
text: "泉医到家小程序",
x: 150,
y: 500,
font_color: "#444444",
font_size: 10,
text_align: 'center'
}).catch(err_msg => {
uni.showToast({
title: err_msg,
icon: "none"
})
})
await this.$refs.rCanvas.drawText({
text: "(长按识别二维码开启健康之旅)",
x: 150,
y: 515,
font_color: "#444444",
font_size: 7,
text_align: 'center'
}).catch(err_msg => {
uni.showToast({
title: err_msg,
icon: "none"
})
})
//
await this.$refs.rCanvas.draw((res) => {
this.yaoqingimg = res.tempFilePath
uni.hideLoading();
//res.tempFilePathbase64
//
// this.$refs.rCanvas.saveImage(res.tempFilePath)
})
})
},
//
draw() {
//
this.$refs.rCanvas.saveImage(this.yaoqingimg).then(res => {
uni.showToast({
title: '保存成功',
duration: 2000
});
}).catch(err => {
uni.showToast({
icon: 'error',
title: '保存失败',
duration: 2000
});
})
},
//
fenx() {
wx.showShareImageMenu({
path: this.yaoqingimg,
})
},
yaoqingshowfalse() {
this.yapqingshow = false;
this.$nextTick(async () => {
await this.$refs.rCanvas.clearCanvas((res) => {})
await this.$refs.rCanvas.setCanvasWidth(0)
await this.$refs.rCanvas.setCanvasHeight(0)
})
},
//
upbuy() {
var that = this
this.updata.goodsCount = this.updata.integralExchangeCount
const value = uni.getStorageSync('patientId');
const value2 = uni.getStorageSync('openid');
if (value && value2) {
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('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: '/pages/information/information'
})
} else {
this.$refs.uToast.show({
title: '未登录,请先登录',
type: 'error'
})
if (this.timer) {
clearTimeout(this.timer)
}
this.timer = setTimeout(e => {
uni.navigateTo({
url: '/pages/login/login'
})
}, 1500)
}
}
},
///
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');
const value2 = uni.getStorageSync('openid');
if (value && value2) {
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'
})
}
},
//
goodsList() {
goodPatientInfo(this.patientId).then(res => {
var list = res.data.filter(e => e.defaultAddressFlag == 1)
if (list.length >= 1) {
this.updata.receiver = list[0].receiveName
this.updata.receiveAddress = list[0].areaName + list[0].receiveAddress
this.updata.phone = list[0].receivePhone
this.userid = list[0].id
} else {
this.updata.receiver = res.data[0].receiveName
this.updata.receiveAddress = res.data[0].areaName + res.data[0].receiveAddress
this.updata.phone = res.data[0].receivePhone
this.userid = res.data[0].id
}
})
},
//
goinformation() {
this.usershow = false
uni.navigateTo({
url: '/pages/information/information'
})
},
},
onReachBottom() { //
if (this.goodslist.length >= this.goodstotal) {} else {
this.pageNum++;
selectExchangeGoods(this.pageNum, this.pageSize).then(res => {
res.rows.forEach(e => {
e.goodsPictureUrl = baseurl + e.goodsPictureUrl
this.goodslist.push(e)
})
})
}
},
onPullDownRefresh() { //
this.pageNum = 1;
this.selectExchangeGoodsinfo();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
}
</script>
<style lang="scss">
@import "./integral.scss";
</style>

View File

@ -84,7 +84,6 @@
})
}, 1500)
} else {
uni.removeStorageSync('token');
this.$refs.uToast.show({
title: '登录失败',
type: 'error',

View File

@ -1,83 +1,404 @@
<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('RECEIVE')"
:style="couponstatus=='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">
<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!='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!='RECEIVE'?'background: #DADADA;;':''">
{{item.couponTitle}}
</view>
<view class="texts">
{{item.couponConsumePrice}}可用
</view>
<view class="time" v-if="item.useStatus!='RECEIVE'">
有效期至{{item.expirationEndTime}}
</view>
<view class="btn" v-if="item.useStatus=='RECEIVE'" @tap='logininfo'>
{{item.useStatus=='RECEIVE'?'领取':''}}
</view>
<view class="btngq" v-if="item.useStatus!='NOT_USED'&&item.useStatus!='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>
<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
} from '@/api/materialbenefits/index.js'
import {
AppIdentification
} from '@/api/AppIdentification/index.js'
export default {
data() {
return {
usershow: false,
pageNum: 1,
pageSize: 10,
couponlist: null,
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() {
var that = this
const value = uni.getStorageSync('patientId');
const value2 = uni.getStorageSync('openid');
if (value && value2) {
AppIdentification(value).then(res => {
if (res.code == 200) {
if (res.data.loginFlag) {} 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() {
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() {
this.usershow = false
uni.navigateTo({
url: '/pages/information/information'
})
},
goshoping() {
uni.switchTab({
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;
.background {
position: relative;
width: 657rpx;
.mask {
.information {
width: 70%;
height: 400rpx;
margin: 50% auto;
background: #FFFFFF;
border-radius: 25rpx;
background-color: white;
margin: 0 auto;
top: 50%;
transform: translateY(-50%);
border-radius: 30rpx;
text-align: center;
color: #FFFFFF;
position: relative;
.determine,
.cancel {
width: 200rpx;
height: 70rpx;
border-radius: 26rpx;
font-size: 34rpx;
line-height: 70rpx;
position: absolute;
top: 74%;
}
.determine {
background: #4C7BC9;
right: 36rpx;
}
.cancel {
background: #C5BFBF;
left: 36rpx;
}
.title {
font-size: 42rpx;
margin-top: 40rpx;
color: #000000;
}
image {
width: 178rpx;
height: 160rpx;
background: #FFFFFF;
border-radius: 25px;
margin-left: 68%;
margin-top: 0;
width: 100rpx;
height: 100rpx;
margin: 10% 0 0 0;
}
}
}
.content {
width: 96%;
margin: 20rpx auto 0;
background-color: #fff;
padding-bottom: 100rpx;
.rollup {
border-radius: 5rpx;
.item {
width: 94%;
height: 240rpx;
margin: 20rpx auto 0;
border: 1rpx solid #f4f5f7;
border-radius: 10rpx;
.bottom {
font-size: 22rpx;
color: #969394;
line-height: 60rpx;
padding-left: 25rpx;
border-radius: 0 0 10rpx 10rpx;
}
.top {
width: 100%;
height: 180rpx;
background: #FDE9E8;
position: relative;
color: #F44B2F;
border-radius: 10rpx 10rpx 0 0;
.what {
padding: 0 10rpx;
height: 40rpx;
background: #FED1D2;
border-radius: 16rpx;
font-size: 20rpx;
line-height: 40rpx;
text-align: center;
position: absolute;
top: 120rpx;
left: 20rpx;
}
.btngq {
width: 109rpx;
height: 180rpx;
background: #DFDEDE;
position: absolute;
top: 0;
right: 0;
text-align: center;
line-height: 180rpx;
}
.btn {
width: 98rpx;
height: 50rpx;
border: 2rpx solid #F44B2F;
border-radius: 24rpx;
font-size: 24rpx;
position: absolute;
top: 70rpx;
right: 20rpx;
text-align: center;
line-height: 49rpx;
}
.time {
font-size: 24rpx;
position: absolute;
top: 120rpx;
left: 200rpx;
}
.texts {
font-size: 32rpx;
font-weight: 800;
position: absolute;
top: 44rpx;
left: 200rpx;
}
.title {
position: absolute;
top: 30rpx;
left: 10rpx;
.price {
font-size: 54rpx;
font-weight: 700;
}
.text {
font-weight: 600;
font-size: 34rpx;
}
}
}
}
}
.statuss {
padding-top: 25rpx;
span {
color: #c1c1c1;
font-size: 18rpx;
line-height: 60rpx;
}
.statusitem {
text-align: center;
padding: 0 40rpx;
display: inline-block;
height: 60rpx;
font-size: 30rpx;
color: #969394;
line-height: 60rpx;
}
}
}
.tabs {
width: 100%;
.tab-item {
margin: 20rpx 0 0 24rpx;
text-align: center;
width: 20%;
.text {
width: 70%;
margin-left: 15%;
height: 30rpx;
background: #F44B2F;
border-radius: 9rpx;
color: #fff;
font-size: 24rpx;
line-height: 30rpx;
}
.title {
font-size: 40rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #F44B2F;
line-height: 59rpx;
}
}
}
}
.detailed {
padding: 0 20rpx;
line-height: 56rpx;
text-align: center;
}
</style>

View File

@ -2,19 +2,22 @@
background-color: #F4F5F7;
width: 100%;
color: #000000;
padding-bottom: 50rpx;
/deep/ .u-drawer{
padding: 15rpx 0 50rpx;
/deep/ .u-drawer {
z-index: 0 !important;
}
.Agreement{
.Agreement {
width: 100%;
background-color: #F4F5F7;
text-align: center;
height: 1000rpx;
position: absolute;
top:5%;
top: 5%;
font-size: 30rpx;
.title{
.title {
height: 100rpx;
line-height: 100rpx;
border-bottom: 1px solid #eeeeee;
@ -23,110 +26,141 @@
width: 100%;
text-align: center;
}
.scroll-Y{
height:830rpx ;
overflow-y:scroll;
.scroll-Y {
height: 830rpx;
overflow-y: scroll;
text-align: left;
text-indent: 2em;
}
.cancel {
height:70rpx;
height: 70rpx;
line-height: 70rpx;
font-size: 32rpx;
background-color: #F4F5F7;
position: absolute;
border-top: 1rpx solid #000000;
bottom:0;
right:0;
bottom: 0;
right: 0;
width: 50%;
color: #000000;
}
.determine {
height:70rpx;
height: 70rpx;
line-height: 70rpx;
font-size: 32rpx;
width: 50%;
color: #F4F5F7;
background: #4C7BC9;
position: absolute;
bottom:0;
left:0;
bottom: 0;
left: 0;
}
}
.radio-content {
margin: 50rpx auto;
margin: 30rpx auto 0;
width: 70%;
text-align: center;
font-size: 28rpx;
position: relative;
.agreement {
position: absolute;
top:50%;
left:20%;
top: 50%;
left: 20%;
transform: translateY(-50%);
color: #878987;
}
}
.radio-right {
height: 100rpx;
.radio {
display: inline-block;
width: 35rpx;
height: 35rpx;
width: 50rpx;
height: 50rpx;
border-radius: 70%;
border: 2rpx solid #178ffb;
position: absolute;
top:50%;
left:5%;
top: 50%;
left: 5%;
transform: translateY(-50%);
.radio-active {
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background-color: #178ffb;
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
}
.finish{
width: 25%;
height: 68rpx;
background: #4C7BC9;
border-radius: 26rpx;
.finish {
width: 70%;
height: 71rpx;
background: #557BC2;
border-radius: 36rpx;
text-align: center;
line-height: 68rpx;
line-height: 71rpx;
color: #fff;
margin-top: 50rpx;
margin-left: 65%;
margin: 30rpx auto 0;
font-size: 32rpx;
}
.userinfo {
width: 96%;
background-color: #fff;
margin: 0 auto;
border-radius: 20rpx;
.disease{
.disease {
width: 100%;
margin: 0 auto;
padding: 0 6% 0 3%;
line-height: 80rpx;
border-bottom: 1rpx solid #D8D4D4;
position: relative;
view{
display: inline-block;
.title {
font-size: 30rpx;
display: block;
line-height: 120rpx;
}
.pictureA {
width: 18rpx;
height: 27rpx;
position: absolute;
right:30rpx;
top:50%;
right: 30rpx;
top: 50%;
transform: translateY(-50%);
}
}
.itemimgs {
width: 100%;
height: 400rpx;
border-bottom: 1rpx solid #D8D4D4;
position: relative;
.picture {
width: 200rpx;
height: 200rpx;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
.item {
width: 94%;
margin: 0 auto;
@ -135,44 +169,30 @@
border-bottom: 1rpx solid #D8D4D4;
position: relative;
font-size: 30rpx;
.picture {
vertical-align: middle;
width: 180rpx;
height: 180rpx;
::v-deep .u-radio-group{
position: absolute;
top:10rpx;
right:80rpx;
}
.pictureA {
margin-left: 3%;
width: 18rpx;
height: 27rpx;
position: absolute;
right:20rpx;
top:50%;
transform: translateY(-50%);
left:170rpx;
}
::v-deep .u-radio{
width: 150rpx !important;
}
.address {
position: absolute;
left:25%;
top:50%;
left: 25%;
top: 50%;
width: 75%;
transform: translateY(-50%);
display: inline-block;
height: 120rpx;
line-height: 120rpx;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
span {
display: inline-block;
line-height: 120rpx;
height: 120rpx;
width: 25%;
}
::v-deep .u-input__input {
height: 120rpx;
@ -190,8 +210,8 @@
line-height: 120rpx;
width: 75%;
position: absolute;
left:25%;
top:50%;
left: 25%;
top: 50%;
transform: translateY(-50%);
}
}

View File

@ -1,32 +1,46 @@
<template>
<view class="app">
<view class="userinfo">
<view class="item" style="height: 200rpx; " @tap='uploadImag'>
<span style='height:200rpx;line-height: 200rpx;'>头像:</span>
<image class="picture" :src="img" mode=""></image>
<image class="pictureA" src="../../static/jiantou.png" mode=""></image>
<view class="itemimgs">
<image class="picture" :src="img" mode="" v-if="img" @tap='uploadImag'></image>
<image class="picture" src="../../static/userl.png" mode="" v-else @tap='uploadImag'></image>
</view>
<view class="item">
<span>姓名:</span>
<span>姓名</span>
<u-input :clearable='false' v-model="appPersonallist.patientName" placeholder="请输入" type="text"
maxlength='15' />
maxlength='5' />
</view>
<view class="item">
<span>性别</span>
<u-radio-group v-model="appPersonallist.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="appPersonallist.phone" placeholder="请输入" maxlength='11'
type="text" />
</view> -->
<view class="item" @tap='timeshow=true'>
<span>出生日期</span>
<view class="address" style="" v-if="appPersonallist.birthDate">
{{appPersonallist.birthDate}}
</view>
</view>
<view class="item">
<span>身份证号:</span>
<u-input :clearable='false' v-model="appPersonallist.cardNo" placeholder="请输入" type="text"
<span>身份证号</span>
<u-input :clearable='false' v-model="appPersonallist.cardNo" placeholder="请输入身份证号" type="text"
maxlength='18' />
</view>
<view class="item" @tap='showPicker'>
<span>所属区域:</span>
<span>所属区域</span>
<view class="address">{{address}}</view>
</view>
<view class="item">
<span>详细地址:</span>
<span>详细地址</span>
<u-input :clearable='false' v-model="appPersonallist.address" type="text" maxlength='40'
placeholder='小区、单元、门牌号' />
</view>
@ -40,24 +54,25 @@
</view>
</view>
<view class="disease" style="border: none;" @tap="godisease">
<view style="display: block;line-height: 120rpx;">疾病类型:</view>
<image class="pictureA" src="../../static/jiantou.png" mode=""></image>
<view class="" style="padding-right: 10rpx" v-for="(item,index) in patientDiseaseInfoList">
<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 patientDiseaseInfoList">
{{item.diseaseName}}
</view>
</view>
</view>
<view class="radio-content">
<view class="radio-right" @tap="changeRadio">
<view class="radio-right" @click='changeRadio'>
<view class="radio" :class="radio == 2 ? 'radio-default':''">
<view :class="radio == 2 ? 'radio-active':''"></view>
</view>
</view>
<view class="agreement">我已阅读并同意<text @tap='maskshow=true'
<view class="agreement" @click.stop='changeRadio'>我已阅读并同意<text @click.stop='maskshow=true'
style="color: #000000;border-bottom: 1rpx solid #000000;">用户协议</text>
</view>
</view>
<view class="finish" @tap="informationinfo()">完成
<view class="finish" @tap="informationinfo()">确认修改
</view>
<u-toast ref="uToast" />
<!-- // -->
@ -82,9 +97,10 @@
@funcValue="getpickerParentValue" pickerSize="4">
</m-city>
</view>
<u-picker mode="time" v-model="timeshow" :params="params" @confirm='timechange' @canel='timeshow=false'>
</u-picker>
</view>
</template>
<script>
import {
getRegionAndStreetInfo
@ -96,7 +112,7 @@
import baseurl from '@/api/baseurl.js'
import {
appPersonal,
} from '@/api/user/user.js';
} from '@/api/Personal/Personal.js';
import {
getSubordinateRegions,
} from '@/api/modifyAddress/modifyAddress.js';
@ -108,6 +124,24 @@
},
data() {
return {
params: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
timeshow: false, //
sexlist: [{
name: '男',
disabled: false
},
{
name: '女',
disabled: false
}
],
list: [{
id: "",
localName: "请选择",
@ -131,7 +165,9 @@
nurseTypeIdList: [],
diseaseInfoList: [],
headPictureUrl: '',
birthDate: '',
locationName: '',
sex: '',
},
patientDiseaseInfoList: [], //
addresslength: null,
@ -148,19 +184,44 @@
that.appPersonallist = Response.data
that.appPersonallist.homeLatitude = Number(that.appPersonallist.homeLatitude)
that.appPersonallist.homeLongitude = Number(that.appPersonallist.homeLongitude)
that.img = baseurl + that.appPersonallist.headPictureUrl
if (that.appPersonallist.headPictureUrl) {
that.img = baseurl + that.appPersonallist.headPictureUrl
}
if (that.appPersonallist.sex == 'MALE') {
that.appPersonallist.sex = '男';
} else if (that.appPersonallist.sex == 'FEMALE') {
that.appPersonallist.sex = '女';
}
if (that.appPersonallist.areaName) {
that.address = that.appPersonallist.areaName
}
that.patientDiseaseInfoList = that.appPersonallist.patientDiseaseInfoList
that.patientDiseaseInfoList.forEach(e => {
e.id = e.diseaseId
if (that.patientDiseaseInfoList.length > 0) {
that.patientDiseaseInfoList.forEach(e => {
e.id = e.diseaseId
})
}
} else if (Response.code == 9999) {} else {
uni.navigateBack({
delta: 1
})
} else if (Response.code == 9999) {} else {}
}
})
} else {}
},
methods: {
//
sexchange(e) {
if (e == '男') {
this.appPersonallist.sex = 'MALE';
} else if (e == '女') {
this.appPersonallist.sex = 'FEMALE';
}
},
//
timechange(e) {
this.appPersonallist.birthDate = e.year + '-' + e.month + '-' + e.day
},
//
getpickerParentValue(e) {
this.addresslength = e
@ -177,7 +238,7 @@
} else if (e.length == 1) {
this.address = e[0].localName
this.appPersonallist.areaCode = e[0].id
}else {
} else {
this.address = ''
this.appPersonallist.areaCode = ''
}
@ -189,6 +250,11 @@
//+
data() {
var that = this
if (that.appPersonallist.sex == '男') {
that.appPersonallist.sex = 'MALE';
} else if (that.appPersonallist.sex == '女') {
that.appPersonallist.sex = 'FEMALE';
}
if (that.radio == 1) {
that.$refs.uToast.show({
title: '请审核并同意用户协议',

View File

@ -18,7 +18,7 @@
padding-bottom: 10rpx;
.item {
width: 90%;
width: 94%;
height: 101rpx;
font-size: 36rpx;
color: #000000;

View File

@ -53,7 +53,7 @@
<!-- <view class="area" @tap='areashow=true'> -->
<u-field v-model="infolist.address" label="区域" placeholder="请选择" class="items" disabled>
</u-field>
<image src="../../static/jiantou.png" mode=""></image>
<image src="../../static/huijiantou.png" mode=""></image>
</view>
<u-field v-model="infolist.receiveAddress" label-width="170" label="详细地址" placeholder="如街道、门牌号、小区等"
class="items" maxlength='50'>
@ -240,7 +240,6 @@
uni.navigateBack({
delta: 2
})
}, 1500)
}
} catch (e) {}
@ -253,14 +252,12 @@
if (that.addresslength.length > 2) {
addnursingStation(that.infolist).then(res => {
if (res.code == 200) {
that.goodsList()
that.$refs.uToast.show({
title: '新增成功',
type: 'success'
})
that.cencel();
setTimeout(e => {
that.goodsList()
}, 1000)
} else {
that.$refs.uToast.show({
title: res.msg,
@ -296,14 +293,12 @@
var that = this
updatenursingStation(that.infolist).then(res => {
if (res.code == 200) {
that.goodsList()
that.$refs.uToast.show({
title: '修改成功',
type: 'success'
})
that.cencel();
setTimeout(e => {
that.goodsList()
}, 1000)
} else {
that.$refs.uToast.show({
title: res.msg,
@ -374,13 +369,11 @@
})
} else {
delnursingStation(item.id).then(res => {
that.goodsList()
that.$refs.uToast.show({
title: '删除成功',
type: 'success'
})
setTimeout(e => {
that.goodsList()
}, 1000)
that.delshow = false;
})
}

View File

@ -1,220 +0,0 @@
<template>
<view class="app">
<view class="content">
<view class="CommodityOrder" @tap="goorder">商品订单
<image class="picture" src="../../static/jiantou.png" mode=""></image>
</view>
<view class="center">
<view class="OrderStatus" @tap="gopaid('WAIT_PAY')">
<image src="/static/Tobepaid.png" mode=""></image>
<span>待付款</span>
<view class="orderCount" v-if="list.waitPayCount>0&&list.waitPayCount<100">
{{list.waitPayCount}}
</view>
<view class="orderCount" v-if="list.waitPayCount>=100">
99+
</view>
</view>
<view class="OrderStatus" @tap="goreceive('WAIT_RECEIVED_GOODS')">
<image src="/static/received.png" mode=""></image>
<span>待收货</span>
<view class="orderCount" v-if="list.waitReceivedGoodsCount>0&&list.waitReceivedGoodsCount<100">
{{list.waitReceivedGoodsCount}}
</view>
<view class="orderCount" v-if="list.waitReceivedGoodsCount>=100">
99+
</view>
</view>
<view class="OrderStatus" @tap="gocompleted('RECEIVED_GOODS')">
<image src="/static/evaluated.png" mode=""></image>
<span>待评价</span>
<view class="orderCount" v-if="list.receivedGoodsCount>0&&list.receivedGoodsCount<100">
{{list.receivedGoodsCount}}
</view>
<view class="orderCount" v-if="list.receivedGoodsCount>=100">
99+
</view>
</view>
<view class="OrderStatus" @tap="goEVALUATED('EVALUATED')">
<image src="/static/finished.png" mode=""></image>
<span>已完成</span>
<!-- <view class="orderCount" v-if="list.evaluatedCount>0&&list.evaluatedCount<100">
{{list.evaluatedCount}}
</view>
<view class="orderCount" v-if="list.evaluatedCount>=100">
99+
</view> -->
</view>
</view>
</view>
<view class="service" @tap="gonursestation">
<view class="serviceorder">护理站服务订单</view>
<view class="pictures">
<image src="../../static/jiantou.png" mode=""></image>
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
orderCount
} from '@/api/order/index.js'
export default {
data() {
return {
list: null,
}
},
onShow() {
let that = this
const value = uni.getStorageSync('patientId');
if (value) {
orderCount(value).then(res => {
this.list = res.data
})
} else {
that.$refs.uToast.show({
title: '请登录',
type: 'error',
duration: '1000',
url: '/pages/login/login'
})
}
},
methods: {
//
gonursestation() {
uni.navigateTo({
url: '/pages/Nursingstationserviceorder/Nursingstationserviceorder'
})
},
//
goreceive(item) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
},
//
goorder() {
uni.navigateTo({
url: '/pages/CommodityOrder/CommodityOrder'
})
},
//
goEVALUATED(item) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
},
//
gocompleted(item) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
},
//
gopaid(item) {
uni.navigateTo({
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
})
},
},
}
</script>
<style lang="scss">
.app {
background-color: #F4F5F7;
width: 100%;
color: #000000;
padding: 3%;
font-size: 36rpx;
span {
display: block;
}
.service {
width: 99%;
height: 105rpx;
background: #FFFFFF;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
margin-top: 3%;
.pictures {
display: inline-block;
margin-left: 48%;
image {
width: 18rpx;
height: 27rpx;
}
}
.serviceorder {
line-height: 100rpx;
margin-left: 5%;
display: inline-block;
}
}
.content {
width: 99%;
height: 344rpx;
background: #FFFFFF;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
.center {
display: flex;
justify-content: space-around;
image {
width: 100rpx;
height: 80rpx;
margin-left: 50%;
transform: translateX(-50%);
}
.OrderStatus {
padding-top: 50rpx;
position: relative;
.orderCount {
background-color: red;
color: #FFFFFF;
border-radius: 50%;
text-align: center;
// padding: 0 5rpx ;
line-height: 40rpx;
width: 40rpx;
height: 40rpx;
font-size: 20rpx;
// display: inline-block;
position: absolute;
top: 30rpx;
right: -20rpx;
}
}
}
.picture {
margin-left: 70%;
width: 18rpx;
height: 27rpx;
}
.CommodityOrder {
display: inline-block;
width: 90%;
height: 110rpx;
line-height: 100rpx;
margin-left: 5%;
border-bottom: 1rpx solid #D8D4D4;
}
}
}
</style>

View File

@ -133,7 +133,6 @@
border-radius: 20rpx;
margin: 30rpx auto;
position: relative;
padding-bottom: 130rpx;
.name {
width: 95%;
@ -152,6 +151,8 @@
}
.details {
height: 380rpx;
position: relative;
.detailslist {
display: flex;
@ -175,17 +176,18 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 70%;
width: 65%;
}
span:nth-child(2) {
color: #969394;
float: right;
margin-right: 30rpx;
margin-right: 20rpx;
}
.bottom {
margin-top: 40rpx;
// margin-top: 40rpx;
margin-top: 15rpx;
.box {
color: #969394;
@ -209,7 +211,6 @@
right: 20rpx;
bottom: 100rpx;
}
}
}
@ -218,7 +219,7 @@
position: absolute;
left: 2.5%;
bottom: 20rpx;
.pay {
font-size: 30rpx;
color: #020000;
@ -230,7 +231,6 @@
color: #D43953;
margin-right: 10rpx;
}
}
}
}

View File

@ -12,7 +12,7 @@
<view class="content">
<view class="name">
店铺名称
<image src="../../static/rowsright.png" mode=""></image>
<image src="../../static/huijiantou.png" mode=""></image>
</view>
<view class="details">
<view class="detailslist">
@ -20,15 +20,20 @@
<view class="model">
<view class="top">
<span>{{order.goodsName}}</span>
<span>{{order.goodsPrice}}</span>
<span v-if="order.orderType=='DIRECT_BUY'">{{order.goodsPrice}}</span>
</view>
<view class="bottom">
<span class="box">型号{{order.goodsAttributeName}}</span>
<span class="box">X{{order.goodsCount}}</span>
</view>
<view class="bottom" v-if="order.discountPrice>0">
<span class="box" style='width:40%'>优惠金额</span>
<span class="box">-{{order.discountPrice}}</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'">
申请退款
<text v-if="order.orderType=='INTEGRAL_EXCHANGE'">取消兑换</text>
<text v-if="order.orderType=='DIRECT_BUY'">申请退款</text>
</view>
<view class="refund" v-if="order.orderStatus=='WAIT_REFUND'" @tap='goAftersalesdetails(order)'>
退款中
@ -47,9 +52,15 @@
</view>
</view>
</view>
<!-- <view class="payinfo" style="bottom:90rpx">
<text class="pay" style="color: #969394;">优惠金额</text>
<text class="pay" style="float: right; color: #969394;">-{{order.discountPrice}}</text>
</view> -->
<view class="payinfo">
<text class="pay">实付款</text>
<text class="price">{{order.totalPrice}}</text>
<text class="price" v-if="order.orderType=='DIRECT_BUY'">{{order.totalPrice}}</text>
<text class="price"
v-if="order.orderType=='INTEGRAL_EXCHANGE'">{{order.integralExchangeSill}}积分</text>
</view>
</view>
</view>
@ -60,7 +71,10 @@
<span>订单编号<text>{{order.goOrderNo}}</text></span>
<!-- <span>获得积分<text>30点积分</text></span> -->
<span>下单时间<text>{{order.orderTime}}</text></span>
<span v-if="order.orderStatus=='REFUNDED'">退款时间<text>{{order.updateTime}}</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>
<!-- <span>成交时间<text>2022-10-28 113126</text></span> -->
</view>
<view class="buy" v-if="order.orderStatus == 'WAIT_PAY'" @tap='pay'>

View File

@ -12,7 +12,7 @@
<view class="content">
<view class="name">
店铺名称
<image src="../../static/rowsright.png" mode=""></image>
<image src="../../static/huijiantou.png" mode=""></image>
</view>
<view class="details">
<view class="detailslist">
@ -26,6 +26,10 @@
<span class="box">型号{{order.goodsAttributeName}}</span>
<span class="box">X{{order.goodsCount}}</span>
</view>
<view class="bottom" v-if="order.discountPrice>0">
<span class="box" style='width:40%'>优惠金额</span>
<span class="box">-{{order.discountPrice}}</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 File

@ -7,7 +7,6 @@
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
margin: 0 auto;
padding-bottom: 60rpx;
.name {
width: 95%;
@ -27,6 +26,8 @@
.details {
.detailslist {
position: relative;
height:340rpx;
display: flex;
image {

View File

@ -10,13 +10,18 @@
<view class="model">
<view class="top">
<span>{{order.goodsName}}</span>
<span>{{order.goodsPrice}}</span>
<span v-if="order.orderType=='DIRECT_BUY'">{{order.goodsPrice}}</span>
</view>
<view class="bottom">
<span>型号{{order.goodsAttributeName}}</span>
<span>X{{order.goodsCount}}</span>
</view>
</view>
<view class="payinfo">
<text class="pay">实付款</text>
<text class="price" v-if="order.orderType=='DIRECT_BUY'">{{order.totalPrice}}</text>
<text class="price"
v-if="order.orderType=='INTEGRAL_EXCHANGE'">{{order.integralExchangeSill}}积分</text>
</view>
</view>
</view>
@ -31,7 +36,7 @@
<view>我要退款(无需退货)</view>
<view class="text">没收到货</view>
</view>
<image class="picture pictures" src="../../static/rowsright.png" mode=""></image>
<image class="picture pictures" src="../../static/huijiantou.png" mode=""></image>
</view>
<view class="myrefund" @tap='goApplforrefund(2)'>
@ -40,7 +45,7 @@
<view>我要退货退款</view>
<view class="text">已收到货需要退还收到的货物</view>
</view>
<image class="picture" src="../../static/rowsright.png" mode=""></image>
<image class="picture" src="../../static/huijiantou.png" mode=""></image>
</view>
</view>
</view>

View File

@ -33,7 +33,15 @@
path: url,
}
},
onLoad(query) {
// scene 使 decodeURIComponent scene
const scene = decodeURIComponent(query.scene)
if (scene >= 0) {
uni.setStorageSync("invitationPatientId", scene)
}
},
onShow() {
var that = this
createMobileToken().then(res => {
uni.setStorageSync("token", res.data.token)
})

View File

@ -1,145 +0,0 @@
.app {
font-size: 35rpx;
padding: 0 0 200rpx 0;
position: relative;
.signout{
// position: absolute;
// bottom: 60rpx;
// width: 94%;
background: #FFFFFF;
margin-top: 50rpx;
height: 80rpx;
line-height: 80rpx;
// left:3%;
border-radius: 20rpx;
text-align: center;
}
.External {
width: 94%;
height: 100rpx;
line-height: 100rpx;
margin: 20rpx auto;
padding-left: 5%;
background: #FFFFFF;
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 20rpx;
position: relative;
.righttext {
position: absolute;
right: 12%;
top: 50%;
color: #969394;
transform: translateY(-50%);
}
image {
width: 18rpx;
height: 27rpx;
position: absolute;
right: 5%;
top: 50%;
transform: translateY(-50%);
}
.lefttext,
.righttext {
display: inline-block;
}
}
.information {
width: 94%;
border-radius: 20rpx;
position: absolute;
top: 250rpx;
left: 3%;
color: #000000;
padding:0 0 0 0;
overflow: hidden;
font-size: 32rpx;
.disease{
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
line-height: 60rpx;
padding:0 0 40rpx 5%;
background: #FFFFFF;
border-radius: 0 0 20rpx 20rpx;
}
.addressitem {
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
// height: 110rpx;
line-height: 80rpx;
border-bottom: 1rpx solid #D8D4D4;
background: #FFFFFF;
.address{
line-height: 50rpx;font-size: 28rpx;width: 90%;margin: 0 auto;
}
}
.item {
box-shadow: 0px 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
// height: 110rpx;
line-height: 110rpx;
border-bottom: 1rpx solid #D8D4D4;
padding:0 0 0 5%;
background: #FFFFFF;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
// .address {
// position: absolute;
// top:50%;
// transform: translateY(-50%);
// // font-size: 30rpx;
// display: inline-block;
// width: 80%;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
// }
}
}
.user {
width: 100%;
height: 500rpx;
background: #4C7BC9;
position: relative;
color: #FFFFFF;
.modify {
font-size: 32rpx;
position: absolute;
right: 3%;
top: 22%;
}
.nickname {
position: absolute;
top: 26%;
left: 33%;
}
.phone {
position: absolute;
top: 13%;
left: 33%;
}
.img {
width: 150rpx;
height: 150rpx;
border-radius: 50%;
background: #F6F6F6;
position: absolute;
top: 10%;
left: 8%;
image {
width: 100rpx;
margin-left: 50%;
margin-top: 50%;
transform: translate(-50%, -50%);
height: 100rpx;
}
}
}
}

View File

@ -1,218 +0,0 @@
<template>
<view class="app">
<view class="user">
<view v-if="appPersonallist.headPictureUrl">
<image class="img" :src="baseurl+appPersonallist.headPictureUrl" mode=""></image>
</view>
<view class="img" v-else>
<image src="../../static/users.png" mode=""></image>
</view>
<view class="phone" v-if="appPersonallist.patientName">
{{appPersonallist.patientName}}
</view>
<view class="nickname">
<!-- {{appPersonallist.phone}} -->
</view>
<view class="modify" @tap='updatainfo()'>
修改信息
<u-icon name="arrow-right" color="#ffffff" size="32"></u-icon>
</view>
</view>
<view class="information">
<view class="item" v-if="appPersonallist.patientName">
姓名{{appPersonallist.patientName}}
</view>
<view class="item" v-else>
姓名
</view>
<view class="item" v-if="appPersonallist.phone">
电话{{appPersonallist.phone}}
</view>
<view class="item" v-else>
电话
</view>
<view class="item" v-if="appPersonallist.cardNo">
身份证{{appPersonallist.cardNo}}
</view>
<view class="item" v-else>
身份证
</view>
<view class="addressitem" v-if="appPersonallist.areaName">
<view class="" style="padding-left: 5%;">
区域
</view>
<view class="address" style="">
{{appPersonallist.areaName}}
</view>
</view>
<view class="addressitem" v-else>
<view class="" style="padding-left: 5%;">
区域
</view>
<view class="address" style="">
</view>
</view>
<view class="addressitem" style="height:100%" v-if="appPersonallist.address">
<view class="" style="padding-left: 5%;">
地址
</view>
<view class="address" style="">
{{appPersonallist.address}}
</view>
</view>
<view class="addressitem" style="height:100%" v-else>
<view class="" style="padding-left: 5%;">
地址
</view>
</view>
<view class="disease" style="border:none;">
<view class="" style="line-height: 110rpx;">
疾病类型:
</view>
<span style="padding-right: 15rpx;font-size: 30rpx;"
v-for="(item,index) in appPersonallist.patientDiseaseInfoList"
:key="index">{{item.diseaseName}}</span>
</view>
<view class="signout" @tap='remove'>
退出账号
</view>
</view>
<!-- <view class="External" style="margin: 200rpx auto 0;">
<view class="lefttext">
积分:
</view>
<view class="righttext">
{{appPersonallist.integral}}
</view>
<image src="../../static/jiantou.png" mode=""></image>
</view>
<view class="External">
<view class="lefttext">
健康档案
</view>
<view class="righttext">
</view>
<image src="../../static/jiantou.png" mode=""></image>
</view>
<view class="External">
<view class="lefttext">
我的设备
</view>
<view class="righttext">
</view>
<image src="../../static/jiantou.png" mode=""></image>
</view> -->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
appPersonal,
} from '@/api/user/user.js';
import {
existPatientInfo
} from '@/api/startup/index.js'
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
baseurl: '',
appPersonallist: [], //
timer: null,
}
},
onShow() {
this.baseurl = baseurl
this.myInfo()
},
onLoad(options) {},
methods: {
remove() {
let that = this
uni.showModal({
title: '提示',
content: '确认要退出此账号吗',
success: function(res) {
if (res.confirm) {
uni.removeStorageSync('patientId');
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
that.$refs.uToast.show({
title: '退出账号成功',
type: 'success',
duration: '1000'
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateBack({
delta: 1
})
}, 1000)
} else if (res.cancel) {
that.$refs.uToast.show({
title: '退出账号失败',
type: 'error',
duration: '1000'
})
}
}
});
},
removes() {
uni.removeStorageSync('patientId');
uni.removeStorageSync('openid');
uni.removeStorageSync('phone');
uni.removeStorageSync('Refresh');
uni.navigateBack({
delta: 1
})
},
//
myInfo() {
var that = this
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
existPatientInfo(value).then(res => {
if (res.code == 200 && res.msg == 'LOGIN') {
appPersonal(value2).then(Response => {
if (Response.code == 200) {
that.appPersonallist = Response.data
that.appPersonallist.homeLatitude = Number(that.appPersonallist
.homeLatitude)
that.appPersonallist.homeLongitude = Number(that.appPersonallist
.homeLongitude)
} else if (Response.code == 9999) {} else {
that.removes();
}
})
} else {
that.removes();
}
})
} else {
that.removes();
}
},
updatainfo() {
uni.navigateTo({
// url: `/pages/modify/modify?appPersonallist=${JSON.stringify(this.appPersonallist)}`
url: `/pages/modify/modify`
})
}
},
onBackPress(options) {
// if (options.from === 'navigateBack') {
// return false;
// }
// this.back();
// return true;
},
}
</script>
<style lang="scss">
@import "./user.scss";
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/jfgz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
static/jifen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
static/jifenbeij.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
static/jkda.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 729 B

BIN
static/qiandao.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
static/userl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
static/xg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

BIN
static/yaoqing.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
static/yhj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB