-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from HXTIA/fix-24_5_19-bugs
Fix 24 5 19 bugs
- Loading branch information
Showing
31 changed files
with
347 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
export default definePageConfig({ | ||
/** 页面标题 */ | ||
navigationBarTitleText: '反馈页面', | ||
navigationBarTitleText: '', | ||
/** 是否开启下拉刷新 */ | ||
enablePullDownRefresh: false, | ||
/** 自定义导航栏 */ | ||
navigationStyle: 'custom', | ||
/** 自定义背景颜色 */ | ||
backgroundColor: '#ffffff', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
@import 'src/app.scss'; | ||
|
||
.feedback_wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
width: 100vw; | ||
height: 100vh; | ||
|
||
.title_banner { | ||
box-sizing: border-box; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 100%; | ||
height: 30%; | ||
padding: 0 20% 0 20%; | ||
background: url('https://hx.404fwf.cn/notifyBoard/img/title_banner.png') center center no-repeat; | ||
background-size: contain; | ||
} | ||
|
||
.content_wrapper { | ||
position: relative; | ||
width: 100%; | ||
height: 60%; | ||
margin-top: -10%; | ||
|
||
.area { | ||
box-sizing: border-box; | ||
position: absolute; | ||
width: 90%; | ||
height: 100%; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
padding: 50rpx 20rpx 0 20rpx; | ||
z-index: 2; | ||
border: 4rpx solid black; | ||
border-radius: 30rpx; | ||
background-color: #fff; | ||
box-shadow: 10rpx -10rpx 20rpx #e0dede; | ||
|
||
.btn { | ||
width: 280rpx; | ||
height: 80rpx; | ||
text-align: center; | ||
line-height: 80rpx; | ||
// box-shadow: -10rpx 13rpx $primary-color; | ||
background-color: $primary-color; | ||
margin-top: 70rpx; | ||
} | ||
} | ||
|
||
.bg { | ||
position: absolute; | ||
width: 100%; | ||
height: 60%; | ||
background-color: $primary-color; | ||
border-top: 5rpx solid black; | ||
border-bottom: 5rpx solid black; | ||
transform: translateY(-60%); | ||
top: 50%; | ||
z-index: 1; | ||
} | ||
} | ||
} | ||
|
||
page { | ||
/* 覆盖field宽度 */ | ||
--form-label-width: 100rpx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,78 @@ | ||
import { View } from '@tarojs/components' | ||
import React from 'react' | ||
import { View, Button } from '@tarojs/components' | ||
import React, { useCallback, useState } from 'react' | ||
import { Field, Textarea, Input } from '@taroify/core' | ||
import { goTo, showModal, showToast, trackFeedbackContent } from 'src/utils' | ||
import './index.module.scss' | ||
|
||
const Index = () => { | ||
return <View>反馈页面</View> | ||
const [text, setText] = useState('') | ||
const [phone, setPhone] = useState(0) | ||
|
||
const clickBtn = useCallback(async () => { | ||
if (text.length <= 0) { | ||
showToast('您还没有填写内容') | ||
return | ||
} | ||
|
||
const res = await showModal({ | ||
title: '反馈一下🤔', | ||
content: '您提出的宝贵建议我们会仔细斟酌,请附上您的联系方式方便采纳后与您联系🫡', | ||
confirmText: '马上提交', | ||
cancelText: '再考虑下', | ||
}) | ||
if (!res) return | ||
|
||
console.log('提交') | ||
trackFeedbackContent({ | ||
user_phone: phone ?? 0, | ||
user_feedback: text, | ||
}) | ||
showToast('反馈成功,即将返回上一页!') | ||
setTimeout(() => { | ||
goTo({ methodType: 'navigateBack' }) | ||
}, 1000) | ||
}, [phone, text]) | ||
return ( | ||
<View className='feedback_wrapper'> | ||
<View className='title_banner' /> | ||
<View className='content_wrapper'> | ||
<View className='area'> | ||
<Field align='start' label='建议' required> | ||
<Textarea | ||
style={{ | ||
height: '200px', | ||
backgroundColor: 'rgba(245, 245, 245, 1)', | ||
borderRadius: '10rpx', | ||
padding: '10rpx', | ||
}} | ||
limit={500} | ||
placeholder='请输入您的建议' | ||
onChange={({ detail: { value } }) => setText(value)} | ||
/> | ||
</Field> | ||
<Field label='手机号'> | ||
<Input | ||
style={{ | ||
backgroundColor: 'rgba(245, 245, 245, 1)', | ||
width: '100%', | ||
height: '60rpx', | ||
lineHeight: '60rpx', | ||
borderRadius: '10rpx', | ||
paddingLeft: '10rpx', | ||
}} | ||
placeholder='请输入手机号' | ||
type='number' | ||
onChange={({ detail: { value } }) => setPhone(value as unknown as number)} | ||
/> | ||
</Field> | ||
<Button className='btn' onClick={clickBtn}> | ||
提交 | ||
</Button> | ||
</View> | ||
<View className='bg' /> | ||
</View> | ||
</View> | ||
) | ||
} | ||
|
||
export default React.memo(Index) |
Oops, something went wrong.