更新小程序仓库

This commit is contained in:
zoujiandong
2023-11-17 09:51:35 +08:00
parent 13f54a26df
commit 4506940c2d
936 changed files with 60022 additions and 0 deletions
+73
View File
@@ -0,0 +1,73 @@
import{recommendPrice} from "../../api/consult.js"
const app = getApp()
import {throttle} from "../../utils/util"
Component({
behaviors: [],
externalClasses: ['consultbox'],
// 属性定义(详情参见下文)
properties: {
myProperty: { // 属性名
type: String,
value: ''
}
},
data: {
price:null,
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
}, // 私有数据,可用于模板渲染
lifetimes: {
// 生命周期函数,可以为函数,或一个在 methods 段中定义的方法名
attached: function () { },
moved: function () { },
detached: function () { },
},
// 生命周期函数,可以为函数,或一个在 methods 段中定义的方法名
attached: function () { }, // 此处 attached 的声明会被 lifetimes 字段中的声明覆盖
ready: function() { },
pageLifetimes: {
// 组件所在页面的生命周期函数
show() {
this.getPrice();
this.setData({
img_host:app.hostConfig().imghost
})
},
hide: function () { },
resize: function () { },
},
methods: {
goFree:throttle(function(){
app.method.navigateTo({
url: '/pages/expertConsult/expertConsult?type=free',
})
}),
goQuick:throttle(function(){
app.method.navigateTo({
url: '/pages/quickConsult/quickConsult'
})
}),
goExpert:throttle(function(){
app.method.navigateTo({
url: '/pages/expertConsult/expertConsult'
})
}),
goBuyMedince:throttle(function(){
app.method.navigateTo({
url: '/pages/quickConsult/quickConsult?inquiry_type=4'
})
}),
getPrice(){
recommendPrice().then(data=>{
this.setData({
price:data
})
})
}
}
})
+4
View File
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
+51
View File
@@ -0,0 +1,51 @@
<!--components/consultList/consultList.wxml-->
<view class="consultbox">
<view class="viewwrap">
<view class="leftimg">
<image src="{{img_host+'/freezx.png'}}" class="zxicon"></image>
<view class="right">
<view class="name">公益咨询</view>
<view class="price">¥{{price.welfare_inquiry_price}}<text class="unit">起</text></view>
</view>
</view>
<view class="consultbtn">
<view class="btn" bindtap="goFree">去咨询</view>
</view>
</view>
<view class="viewwrap">
<view class="leftimg">
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/quickzx.png" class="zxicon"></image>
<view class="right">
<view class="name" >快速问诊</view>
<view class="price">¥{{price.quick_inquiry_price}}<text class="unit"></text></view>
</view>
</view>
<view class="consultbtn">
<view class="btn" bindtap="goQuick">去咨询</view>
</view>
</view>
<view class="viewwrap">
<view class="leftimg">
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/expertzx.png" class="zxicon"></image>
<view class="right">
<view class="name">专家问诊</view>
<view class="price">¥{{price.expert_inquiry_price}}<text class="unit">起</text></view>
</view>
</view>
<view class="consultbtn">
<view class="btn" bindtap="goExpert">去咨询</view>
</view>
</view>
<view class="viewwrap">
<view class="leftimg">
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/buyyao.png" class="zxicon"></image>
<view class="right">
<view class="name" >问诊购药</view>
<view class="price">¥{{price.medicine_inquiry_price}}<text class="unit"></text></view>
</view>
</view>
<view class="consultbtn">
<view class="btn" bindtap="goBuyMedince">去咨询</view>
</view>
</view>
</view>
+67
View File
@@ -0,0 +1,67 @@
/* components/consultList/consultList.wxss */
.consultbox{
margin:0 32rpx;
background-color: #fff;
border-radius: 10rpx;
}
.consultbtn .btn{
width: 160rpx;
height: 60rpx;
background: #3CC7C0;
color:#fff;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
border-radius: 30rpx;
}
.viewwrap{
border-bottom:1rpx solid #E7E7E7;
display: flex;
justify-content: space-between;
padding:30rpx 0rpx 30rpx;
margin:0 52rpx;
display: flex;
align-items: center;
}
.viewwrap:last-child{
border-bottom:none;
}
.viewwrap .right{
margin-left: 20rpx;
}
.viewwrap .price{
margin-top: 10rpx;
font-weight: 600;
font-size: 34rpx;
color: #EF4F20;
}
.viewwrap .name{
font-size: 28rpx;
font-weight: 600;
color: #333333
}
.top{
width:100%;
display: flex;
justify-content: center;
padding:20rpx 0;
}
.top .up{
width:40rpx;
height:22rpx;
}
.leftimg{
display: flex;
align-items: center;
}
.price .unit{
color:#333;
font-weight: normal;
font-size: 28rpx;
}
.zxicon{
width:80rpx;
height:80rpx;
}
+100
View File
@@ -0,0 +1,100 @@
// components/dialog/dialog.js
Component({
/**
* 组件的属性列表
*/
properties: {
showDialog: {
type: Boolean,
value: false,
observer(newval) {
this.setData({
showDialog: newval,
});
},
},
message:{
type: String,
value: '',
observer(newval) {
this.setData({
message: newval,
});
},
},
cancelBtn:{
type: Boolean,
value: true,
observer(newval) {
this.setData({
cancelBtn: newval,
});
},
},
dialogTitle:{
type: String,
value: '温馨提示',
observer(newval) {
this.setData({
dialogTitle: newval,
});
},
},
confirmColor:{
type: String,
value: '#3CC7C0',
observer(newval) {
this.setData({
confirmColor: newval,
});
},
},
canceltext:{
type: String,
value: '取消',
observer(newval) {
this.setData({
canceltext: newval,
});
},
},
confirmtext:{
type: String,
value: '确定',
observer(newval) {
this.setData({
confirmtext: newval,
});
},
},
},
/**
* 组件的初始数据
*/
data: {
showDialog: false,
message:'',
confirmColor:'#3CC7C0',
dialogTitle:"温馨提示",
cancelBtn:true,
canceltext:'取消',
confirmtext:'确定'
},
/**
* 组件的方法列表
*/
methods: {
onConfirm() {
this.setData({ showDialog: false });
this.triggerEvent("confirm",true)
},
onClose() {
this.setData({ showDialog: false });
this.triggerEvent("close",true)
}
}
})
+6
View File
@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"van-dialog": "@vant/weapp/dialog/index"
}
}
+5
View File
@@ -0,0 +1,5 @@
<!--components/dialog/dialog.wxml-->
<van-dialog id="van-dialog" title="{{dialogTitle}}" message="{{message}}" show-cancel-button="{{cancelBtn}}" cancel-button-text="{{canceltext}}" confirm-button-text="{{confirmtext}}" confirm-button-color="{{confirmColor}}" bind:confirm="onConfirm" cancle-button-class="cancelBtn" custom-class="my-class"
bind:cancel="onClose" show="{{showDialog}}" use-cancel-button-slot>
<view slot="cancel-button">333</view>
</van-dialog>
+4
View File
@@ -0,0 +1,4 @@
/* components/dialog/dialog.wxss */
.van-dialog__cancel{
border: 1px solid rgba(0,0,0,0.1)!important;
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,3 @@
{
"component": true
}
@@ -0,0 +1,24 @@
<view class='image-cropper' catchtouchmove='_preventTouchMove'>
<view class='main' bindtouchend="_cutTouchEnd" bindtouchstart="_cutTouchStart" bindtouchmove="_cutTouchMove" bindtap="_click">
<view class='content'>
<view class='content_top bg_gray {{_flag_bright?"":"bg_black"}}' style="height:{{cut_top}}px;transition-property:{{_cut_animation?'':'background'}}"></view>
<view class='content_middle' style="height:{{height}}px;">
<view class='content_middle_left bg_gray {{_flag_bright?"":"bg_black"}}' style="width:{{cut_left}}px;transition-property:{{_cut_animation?'':'background'}}"></view>
<view class='content_middle_middle' style="width:{{width}}px;height:{{height}}px;transition-duration: .3s;transition-property:{{_cut_animation?'':'background'}};">
<view class="border border-top-left"></view>
<view class="border border-top-right"></view>
<view class="border border-right-top"></view>
<view class="border border-right-bottom"></view>
<view class="border border-bottom-right"></view>
<view class="border border-bottom-left"></view>
<view class="border border-left-bottom"></view>
<view class="border border-left-top"></view>
</view>
<view class='content_middle_right bg_gray {{_flag_bright?"":"bg_black"}}' style="transition-property:{{_cut_animation?'':'background'}}"></view>
</view>
<view class='content_bottom bg_gray {{_flag_bright?"":"bg_black"}}' style="transition-property:{{_cut_animation?'':'background'}}"></view>
</view>
<image bindload="imageLoad" bindtouchstart="_start" bindtouchmove="_move" bindtouchend="_end" style="width:{{img_width ? img_width + 'px' : 'auto'}};height:{{img_height ? img_height + 'px' : 'auto'}};transform:translate3d({{_img_left-img_width/2}}px,{{_img_top-img_height/2}}px,0) scale({{scale}}) rotate({{angle}}deg);transition-duration:{{_cut_animation?.4:0}}s;" class='img' src='{{imgSrc}}'></image>
</view>
<canvas canvas-id='image-cropper' disable-scroll="true" style="width:{{_canvas_width * export_scale}}px;height:{{_canvas_height * export_scale}}px;left:{{canvas_left}}px;top:{{canvas_top}}px" class='image-cropper-canvas'></canvas>
</view>
+143
View File
@@ -0,0 +1,143 @@
.image-cropper {
background: rgba(14, 13, 13, .8);
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 1;
}
.image-cropper .main {
position: absolute;
width: 100vw;
height: 100vh;
overflow: hidden;
}
.image-cropper .content {
z-index: 9;
position: absolute;
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
pointer-events: none;
}
.image-cropper .bg_black {
background: rgba(0, 0, 0, 0.8) !important;
}
.image-cropper .bg_gray {
background: rgba(0, 0, 0, 0.45);
transition-duration: .35s;
}
.image-cropper .content>.content_top {
pointer-events: none;
}
.image-cropper .content>.content_middle {
display: flex;
height: 200px;
width: 100%;
}
.image-cropper .content_middle_middle {
width: 200px;
box-sizing: border-box;
position: relative;
transition-duration: .3s;
}
.image-cropper .content_middle_right {
flex: auto;
}
.image-cropper .content>.content_bottom {
flex: auto;
}
.image-cropper .img {
z-index: 2;
top: 0;
left: 0;
position: absolute;
border: none;
width: 100%;
backface-visibility: hidden;
transform-origin: center;
}
.image-cropper .image-cropper-canvas {
position: fixed;
background: white;
width: 150px;
height: 150px;
z-index: 10;
top: -200%;
pointer-events: none;
}
.image-cropper .border {
background: white;
pointer-events: auto;
position: absolute;
}
.image-cropper .border-top-left {
left: -2.5px;
top: -2.5px;
height: 2.5px;
width: 33rpx;
}
.image-cropper .border-top-right {
right: -2.5px;
top: -2.5px;
height: 2.5px;
width: 33rpx;
}
.image-cropper .border-right-top {
top: -1px;
width: 2.5px;
height: 30rpx;
right: -2.5px;
}
.image-cropper .border-right-bottom {
width: 2.5px;
height: 30rpx;
right: -2.5px;
bottom: -1px;
}
.image-cropper .border-bottom-left {
height: 2.5px;
width: 33rpx;
bottom: -2.5px;
left: -2.5px;
}
.image-cropper .border-bottom-right {
height: 2.5px;
width: 33rpx;
bottom: -2.5px;
right: -2.5px;
}
.image-cropper .border-left-top {
top: -1px;
width: 2.5px;
height: 30rpx;
left: -2.5px;
}
.image-cropper .border-left-bottom {
width: 2.5px;
height: 30rpx;
left: -2.5px;
bottom: -1px;
}
+34
View File
@@ -0,0 +1,34 @@
// components/inputmodal/inputmodal.js
Component({
/**
* 组件的属性列表
*/
properties: {
title: {
type: String,
value: '默认标题'
}
},
/**
* 组件的初始数据
*/
data: {
},
attached: function () {
// let systemInfo = wx.getSystemInfoSync()
// console.log(systemInfo)
},
/**
* 组件的方法列表
*/
methods: {
cancel() {
this.triggerEvent('inputModalClick', {data: 'cancel'}, {})
},
confirm() {
this.triggerEvent('inputModalClick', { data: 'confirm' }, {})
}
}
})
+4
View File
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
+12
View File
@@ -0,0 +1,12 @@
<view class='inputmodal-wrapper'>
<view class='content'>
<view class='title'>{{title}}</view>
<view class='slot'>
<slot></slot>
</view>
<view class='button-group'>
<view class='btn' hover-class='btn-hover' style='border-right: 2rpx solid #ccc;' bindtap='cancel'>取消</view>
<view class='btn' hover-class='btn-hover' style='color: rgb(99,181,130);' bindtap='confirm'>确定</view>
</view>
</view>
</view>
+64
View File
@@ -0,0 +1,64 @@
.inputmodal-wrapper {
position: fixed;
top: 0;
bottom: 0;
right: 0;
left: 0;
background-color: rgba(0, 0, 0, .5);
z-index: 9998;
}
.inputmodal-wrapper .content {
width: 540rpx;
height: 300rpx;
background-color: #F3F4F6;
position: absolute;
top: 50%;
left: 50%;
margin-left: -270rpx;
margin-top: -150rpx;
border-radius: 24rpx;
z-index: 9999;
}
.inputmodal-wrapper .content .title {
width:100%;
text-align:center;
line-height:114rpx;
font-size:34rpx;
color: #030303;
}
.inputmodal-wrapper .content .slot {
height: 110rpx;
display: flex;
flex-direction: column;
/* justify-content: center; */
}
.inputmodal-wrapper .content input{
margin: 0 auto;
width: 90%;
height: 64rpx;
padding: 0 8rpx;
line-height: 64rpx;
background-color: #fff;
border: 0 solid #4D4D4D;
font-size: 30rpx;
}
.button-group {
position: absolute;
bottom: 0;
width: 100%;
height: 84rpx;
display: flex;
flex-direction: row;
border-top: 2rpx solid #ccc;
font-size: 34rpx;
color: #007AFF;
}
.button-group .btn {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
}
.button-group .btn-hover {
background-color: rgba(0, 0, 0, .1);
}
+53
View File
@@ -0,0 +1,53 @@
// components/nav.js
const app = getApp()
Component({
/**
* 组件的属性列表
*/
properties: {
navName: {
type: String,
value: "",
observer(newval) {
this.setData({
name: newval,
});
},
},
},
/**
* 组件的初始数据
*/
data: {
name:''
},
/**
* 组件的方法列表
*/
methods: {
goBack(){
console.log("origion:"+app.globalData.origion)
if(app.globalData.origion==1){
wx.reLaunch({
url: '/pages/index/index',
})
}else if(app.globalData.origion==2){
wx.reLaunch({
url: '/pages/index/index',
})
}else{
wx.navigateBack({
delta: 1,
fail:function(){
wx.reLaunch({
url: '/pages/index/index',
})
}
})
}
},
}
})
+4
View File
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
+5
View File
@@ -0,0 +1,5 @@
<!--components/nav.wxml-->
<view class="ui-navigatorbar" style="background: #FFFFFF;border-bottom: 1rpx solid #E3E4E5;">
<image class="ui-navigatorbar-back" bindtap="goBack" src="../../assets/images/back.png" />
<view class="ui-title">{{name}}</view>
</view>
+35
View File
@@ -0,0 +1,35 @@
/* components/nav.wxss */
.ui-navigatorbar {
position: fixed;
z-index:99;
top: 0;
width: 750rpx;
height: 172rpx;
background: #F2F2F2;
backdrop-filter: blur(20px);
}
.ui-navigatorbar-back {
position: absolute;
padding-left:40rpx;
padding-right:40rpx;
width:30rpx;
height:60rpx;
left: 0rpx;
bottom: 20rpx;
}
.ui-title {
position: absolute;
width: 350rpx;
height: 88rpx;
line-height: 56rpx;
font-size: 36rpx;
white-space: nowrap;
color: #000000;
bottom: 0;
left: 200rpx;
display: flex;
justify-content: center;
align-items: center;
}
+29
View File
@@ -0,0 +1,29 @@
// components/navbar/navbar.js
const app=getApp();
Component({
/**
* 页面的初始数据
*/
data: {
keyWord:'',
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
},
pageLifetimes: {
// 组件所在页面的生命周期函数
show() {
this.setData({
img_host:app.hostConfig().imghost
});
},
hide: function () { },
resize: function () { },
},
methods: {
handleFocus(){
this.triggerEvent('handleFocus',true)
},
},
})
+5
View File
@@ -0,0 +1,5 @@
{
"usingComponents": {
}
}
+10
View File
@@ -0,0 +1,10 @@
<!--components/navbar/navbar.wxml-->
<view class="barcontain">
<view class="barcon">
<text class="text">肝胆相照互联网医院</text>
<view class="scon">
<input type="text" placeholder="输入姓名或医院查找医生" value="{{keyWord}}" disabled="{{true}}" bindtap="handleFocus" confirm-type="search" class="ipt"/>
<image src="{{img_host+'/ss.png'}}" class="ss"></image>
</view>
</view>
</view>
File diff suppressed because one or more lines are too long