init version kelfy-mini for new gitea
This commit is contained in:
153
pages/topay/topay.js
Normal file
153
pages/topay/topay.js
Normal file
@@ -0,0 +1,153 @@
|
||||
var app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
showRight:false,
|
||||
radioValue:'',
|
||||
orderId:'',
|
||||
money:'',
|
||||
paramsData:{},
|
||||
leate:'',
|
||||
dataList: [],
|
||||
show1:false,
|
||||
options1:{},
|
||||
showtips:false,
|
||||
list:{}
|
||||
},
|
||||
|
||||
radioChange(e) {
|
||||
const dataList = this.data.dataList
|
||||
for (let i = 0, len = dataList.length; i < len; ++i) {
|
||||
dataList[i].checked = dataList[i].value === e.detail.value
|
||||
}
|
||||
app.globalData.radioVal = e.detail.value
|
||||
this.setData({showRight:true,radioValue:e.detail.value})
|
||||
},
|
||||
toChat(){
|
||||
this.setData({
|
||||
showtips: true
|
||||
});
|
||||
|
||||
if(this.data.radioValue!=''){
|
||||
app.globalData.paramsData = this.data.paramsData
|
||||
if(this.data.radioValue==0){
|
||||
wx.navigateToMiniProgram({
|
||||
appId: 'wxe183cd55df4b4369',
|
||||
// path:"auth/pages/bindcard/auth/index?openType=getAuthCode&cityCode=652800&channel=AAE0HBXIxnvWQyQR_gXP8rhD&orgChnlCrtfCodg=BqK1kMStlhVDgN2uHf4EsLK/F2LjZPYJ81nK2eYQqxv0IyCmhxf/THj7Z767n/jc&orgCodg=H65280100086&bizType=04107&orgAppId=1GRUDB4KB2BE3F60C80A0000CF92F159",
|
||||
path:"auth/pages/bindcard/auth/index?openType=getAuthCode&cityCode=652800&channel=AAE0HBXIxnvWQyQR_gXP8rhD&orgChnlCrtfCodg=BqK1kMStlhVDgN2uHf4EsLK/F2LjZPYJ81nK2eYQqxv0IyCmhxf/THj7Z767n/jc&orgCodg=H65280100086&bizType=04107&orgAppId=1HR3CJDB700675430B0A000085775E9C",
|
||||
|
||||
//develop开发版;trial体验版;release正式版
|
||||
envVersion: 'release',
|
||||
success(res) {
|
||||
// console.log("跳转小程序成功!",res);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
app.PreSettlement()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
toPayment(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/payment/payment',
|
||||
})
|
||||
},
|
||||
|
||||
//监测app.js中show变化
|
||||
watchBack(name, value) {
|
||||
if (name === 'show') {
|
||||
this.setData({
|
||||
show1: value,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
app.watch('show', this.watchBack)
|
||||
wx.setNavigationBarTitle({
|
||||
title: '订单支付'
|
||||
})
|
||||
let a = JSON.parse(options.obj)
|
||||
// console.log(a,'aa')
|
||||
app.globalData.paramsData1 = a
|
||||
|
||||
this.setData({
|
||||
orderId:options.orderId,
|
||||
money:options.money,
|
||||
paramsData:a,
|
||||
options1:options,
|
||||
// show1:app.globalData.show
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
let obj = [
|
||||
{value: '0', name: '医保支付',icon:false}
|
||||
]
|
||||
let obj1 =[
|
||||
{value: '1', name: '微信支付',icon:true}
|
||||
]
|
||||
console.log(this.data.paramsData, "paramsdata");
|
||||
if(this.data.paramsData.memo == '体检开单写入'){
|
||||
this.setData({
|
||||
leate: 1,
|
||||
dataList:obj1
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
dataList:obj
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
6
pages/topay/topay.json
Normal file
6
pages/topay/topay.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-dialog": "@vant/weapp/dialog/index"
|
||||
},
|
||||
"navigationBarBackgroundColor": "#efedef"
|
||||
}
|
||||
67
pages/topay/topay.wxml
Normal file
67
pages/topay/topay.wxml
Normal file
@@ -0,0 +1,67 @@
|
||||
<!--pages/topay/topay.wxml-->
|
||||
<view class="topay">
|
||||
<view class="lists">
|
||||
<view class="list">
|
||||
<text>订单号 :</text>
|
||||
<text class="text">{{orderId}}</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>订单名称 :</text>
|
||||
<text class="text">门诊缴费</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<text>应付金额 :</text>
|
||||
<text class="text">{{money}}</text>
|
||||
</view>
|
||||
<view class="list list1">
|
||||
<text class="may">还需支付 :</text>
|
||||
<text class="mayTO">{{money}}</text>
|
||||
</view>
|
||||
<view>
|
||||
</view>
|
||||
<view>
|
||||
<radio-group bindchange="radioChange">
|
||||
<label wx:for="{{dataList}}" wx:key="index" class="list list2">
|
||||
<view class="image">
|
||||
<image src='../../images/wei.svg' class="img" wx:if="{{item.icon==true}}"/>
|
||||
<image src='../../images/medical-logo.png' class="img1" wx:if="{{index==0&&leate==0}}"/>
|
||||
<view>{{item.name}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<radio value="{{item.value}}"/>
|
||||
</view>
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
<!-- <view class="noSupport" wx:if="leate!=0">
|
||||
<view class="ti">温馨提示 :</view>
|
||||
<view class="texts">目前只支持本人医保移动支付,非本人暂不支持</view>
|
||||
</view> -->
|
||||
<view class="tips" wx:if="{{showtips}}">结算处理中,请稍后...</view>
|
||||
|
||||
</view>
|
||||
<view class="arrow">
|
||||
<view class="left">
|
||||
<view bindtap="toPayment" class="right">
|
||||
返回<van-icon name="arrow-left"/>
|
||||
</view>
|
||||
|
||||
<view class="right1" wx:if="{{!showRight}}">
|
||||
<van-icon name="arrow" />去缴费
|
||||
</view>
|
||||
|
||||
<view bindtap="toChat" wx:else class="right">
|
||||
<van-icon name="arrow"/>去缴费
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-dialog id="van-dialog" />
|
||||
|
||||
<van-overlay show="{{show1}}">
|
||||
<div class="loading">
|
||||
<van-loading type="spinner" color="#1989fa" vertical>加载中...</van-loading>
|
||||
</div>
|
||||
</van-overlay>
|
||||
</view>
|
||||
117
pages/topay/topay.wxss
Normal file
117
pages/topay/topay.wxss
Normal file
@@ -0,0 +1,117 @@
|
||||
/* pages/topay/topay.wxss */
|
||||
.topay{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background-color: #f2f0f4;
|
||||
}
|
||||
.lists{
|
||||
height: 80%;
|
||||
width: 100%;
|
||||
background-color: #fdfcff;
|
||||
}
|
||||
.list{
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
border-bottom:2rpx solid #eee;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
padding:0 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.text{
|
||||
color:#333;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
.list1{
|
||||
margin-top: 10rpx;
|
||||
border-top:2rpx solid #eee;
|
||||
}
|
||||
.may{
|
||||
font-weight: 600;
|
||||
}
|
||||
.mayTO{
|
||||
color:#c58265;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.wx-radio-input {
|
||||
width: 36rpx !important;
|
||||
height: 36rpx !important;
|
||||
}
|
||||
.list2{
|
||||
padding:0 10rpx 0 20rpx !important;
|
||||
color:#333;
|
||||
font-weight: 600;
|
||||
}
|
||||
.image{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.img{
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
}
|
||||
/* .tips{
|
||||
margin-top: 200rpx;
|
||||
margin-left: 120rpx;
|
||||
font-size: 40rpx;
|
||||
|
||||
} */
|
||||
.tips{
|
||||
display: flex;
|
||||
justify-content: center; /* 水平居中 */
|
||||
align-items: center; /* 垂直居中 */
|
||||
height: 300rpx; /* 容器高度,根据需要设置 */
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
.arrow{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.left{
|
||||
width: 600rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.right{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 60rpx;
|
||||
}
|
||||
.right>van-icon{
|
||||
font-size: 60rpx;
|
||||
}
|
||||
.right1>van-icon{
|
||||
color:#e2e1e3;
|
||||
font-size: 60rpx;
|
||||
}
|
||||
.img1{
|
||||
width: 80rpx;
|
||||
height: 50rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.noSupport{
|
||||
margin-top: 30rpx;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
.ti{
|
||||
color:red;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.texts{
|
||||
font-size: 28rpx;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
.loading{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
Reference in New Issue
Block a user