init version kelfy-mini for new gitea
This commit is contained in:
160
pages/feedBack/feedBack.js
Normal file
160
pages/feedBack/feedBack.js
Normal file
@@ -0,0 +1,160 @@
|
||||
// pages/userMsgDel/userMsgDel.js
|
||||
var app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
show:false,
|
||||
typeList:[
|
||||
{name:'挂号相关',type:'0'},
|
||||
{name:'缴费相关',type:'1'},
|
||||
{name:'使用问题',type:'2'},
|
||||
],
|
||||
typeName:'',
|
||||
typeId:'',
|
||||
msgDes:'',
|
||||
yx:'',
|
||||
phone:''
|
||||
},
|
||||
save(){
|
||||
let yx = this.data.yx
|
||||
let phone = this.data.phone
|
||||
let type = this.data.typeId
|
||||
let msg = this.data.msgDes
|
||||
if(yx == '' &&phone ==''){
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '至少输入一个联系方式,方便我们解决您的问题!',
|
||||
cancelText:"否",
|
||||
confirmText:'是',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
wx.request({
|
||||
url:'https://fy.btlsoln.com:8443/problemFeedback?type&content&phone&email',
|
||||
method:"GET",
|
||||
data:{
|
||||
type:type,
|
||||
content:msg,
|
||||
phone:phone,
|
||||
email:yx
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
success: (res)=> {
|
||||
console.log(res,"提交反馈")
|
||||
if(res.data.errCode == 0){
|
||||
wx.showToast({
|
||||
title: '提交成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
setTimeout(item => {
|
||||
wx.navigateBack({
|
||||
delta: 1 //返回上一级页面
|
||||
})
|
||||
},1000)
|
||||
},
|
||||
fail (err) {
|
||||
console.error('失败', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
showPop(){
|
||||
this.setData({ show: true });
|
||||
},
|
||||
onClose() {
|
||||
this.setData({ show: false, });
|
||||
},
|
||||
confirm(e){
|
||||
console.log(e.currentTarget.dataset.item)
|
||||
let item = e.currentTarget.dataset.item
|
||||
this.setData({
|
||||
show: false,
|
||||
typeName:item.name,
|
||||
typeId:item.type
|
||||
})
|
||||
},
|
||||
|
||||
msgDes:function(e){
|
||||
this.setData({
|
||||
msgDes:e.detail.value
|
||||
})
|
||||
},
|
||||
yx:function(e){
|
||||
this.setData({
|
||||
yx:e.detail.value
|
||||
})
|
||||
},
|
||||
phone:function(e){
|
||||
this.setData({
|
||||
phone:e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
wx.setNavigationBarTitle({
|
||||
title:'问题反馈'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
5
pages/feedBack/feedBack.json
Normal file
5
pages/feedBack/feedBack.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-popup": "@vant/weapp/popup/index"
|
||||
}
|
||||
}
|
||||
43
pages/feedBack/feedBack.wxml
Normal file
43
pages/feedBack/feedBack.wxml
Normal file
@@ -0,0 +1,43 @@
|
||||
<!--pages/userMsgDel/userMsgDel.wxml-->
|
||||
<view class="main">
|
||||
<view class="content">
|
||||
<view class="title">请认填写反馈信息</view>
|
||||
<view class="form">
|
||||
<view class="item">
|
||||
<view class="left">问题类型</view>
|
||||
<view class="input2" bindtap="showPop" wx:if="{{typeName == ''}}">请选择问题类型</view>
|
||||
<view class="input3" bindtap="showPop" wx:else>{{typeName}}</view>
|
||||
</view>
|
||||
<view class="item" >
|
||||
<view class="left">问题描述</view>
|
||||
<view class="input">
|
||||
<input class="sr" bindinput='msgDes' value="{{ msgDes }}" placeholder-class="placeholder" placeholder="请描述您的问题"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" >
|
||||
<view class="left">联系邮箱</view>
|
||||
<view class="input">
|
||||
<input class="sr" bindinput='yx' value="{{ yx }}" placeholder-class="placeholder" placeholder="请输入您的联系邮箱"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item" >
|
||||
<view class="left">手机号码</view>
|
||||
<view class="input">
|
||||
<input class="sr" bindinput='phone' value="{{ phone }}" placeholder-class="placeholder" placeholder="请输入手机号" ></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" bindtap="save">提交</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-popup
|
||||
show="{{ show }}"
|
||||
round
|
||||
closeable
|
||||
position="bottom"
|
||||
bind:close="onClose">
|
||||
<view class="popWrap">
|
||||
<view class="title1">选择问题类型</view>
|
||||
<view class="msgItem" wx:for="{{typeList}}" wx:key="item" data-item="{{item}}" bindtap="confirm">{{item.name}}</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
</view>
|
||||
140
pages/feedBack/feedBack.wxss
Normal file
140
pages/feedBack/feedBack.wxss
Normal file
@@ -0,0 +1,140 @@
|
||||
/* pages/userMsgDel/userMsgDel.wxss */
|
||||
.main{
|
||||
margin: 30rpx 0;
|
||||
width: 750rpx;
|
||||
}
|
||||
.content{
|
||||
height: 100%;
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.title{
|
||||
height: 120rpx;
|
||||
width: 100%;
|
||||
font-size: 33rpx;
|
||||
color: #666;
|
||||
line-height: 120rpx;
|
||||
border-bottom: 1rpx solid #f8f8f8;
|
||||
}
|
||||
.item{
|
||||
height: 120rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #f8f8f8;
|
||||
}
|
||||
.left{
|
||||
height: 100%;
|
||||
width: 180rpx;
|
||||
font-size: 35rpx;
|
||||
color: #333;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
.input{
|
||||
flex: 1;
|
||||
font-size: 35rpx;
|
||||
color: #333;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
.input2{
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
.input3{
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
font-size: 35rpx;
|
||||
color: #333;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
.sr{
|
||||
border: 0;
|
||||
}
|
||||
.placeholder{
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.popWrap{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.popWrap :last-child{
|
||||
border: none;
|
||||
}
|
||||
.title1{
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
font-size: 33rpx;
|
||||
color: #666;
|
||||
line-height: 80rpx;
|
||||
text-align: center
|
||||
}
|
||||
.msgItem{
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
font-size: 35rpx;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
border-bottom: 1rpx solid #f8f8f8;
|
||||
}
|
||||
.left1{
|
||||
height: 100%;
|
||||
width: 300rpx;
|
||||
font-size: 35rpx;
|
||||
color: #333;
|
||||
line-height: 120rpx;
|
||||
}
|
||||
.left1{
|
||||
height: 100%;
|
||||
width: 400rpx;
|
||||
}
|
||||
.switch{
|
||||
height: 100%;
|
||||
width: 100rpx;
|
||||
display:flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.msgDes{
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
padding: 20rpx 15rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 10rpx;
|
||||
margin-top: 10rpx;
|
||||
background: rgba(247,247,248);
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
.btn{
|
||||
height: 100rpx;
|
||||
margin-top: 50rpx;
|
||||
width: 100%;
|
||||
background: rgba(0,110,255);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 35rpx;
|
||||
letter-spacing: 5rpx;
|
||||
}
|
||||
.btn2{
|
||||
height: 100rpx;
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 20rpx;
|
||||
width: 100%;
|
||||
background: rgba(228,240,255);
|
||||
color: rgba(3,112,255);
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 35rpx;
|
||||
letter-spacing: 5rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user