123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- <template>
- <view class="evaluate">
- <view class="top">
- <image :src="coachMess.head_portrait" mode="" class="avatar"></image>
- <view class="name">
- {{coachMess.name}}--{{coachMess.courseName}}
- </view>
- </view>
- <view class="content">
- <view class="ques">
- 小朋友上完是否学会了?
- </view>
- <view class="tab">
- <view :class="currentTab==0 ? 'active' : 'left'" @click="changTab(0)">
- 未学会
- </view>
- <view :class="currentTab==1 ? 'active' : 'right'" @click="changTab(1)">
- 已学会
- </view>
- </view>
- <view class="ques">
- 你的好评是给教练最好的鼓励
- </view>
- <view class="start">
- <u-rate :count="count" v-model="value" active-color="#FF6615" inactive-color="#b2b2b2" size="64" gutter="28"></u-rate>
- </view>
- <view class="body">
- <u-input v-model="body" :type="type" :height="height" :auto-height="autoHeight" placeholder="写下您对教练的评价吧~"/>
- </view>
- </view>
- <view class="submit">
- <view class="bt" @click="submit">
- 提交评价
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- count: 5,
- value: 0,
- src: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
- body: '',
- type: 'textarea',
- height:300,
- autoHeight: true,
- currentTab:0,
- courseChildId:'',
- subscribeId:'',
- coachMess:''
-
- }
- },
- onLoad(options) {
- console.log(options.data)
- let data=JSON.parse(options.data)
- this.coachMess=data
- this.courseChildId=data.course_child_id
- },
- methods:{
- //切换学习状态
- changTab(e){
- this.currentTab=e
- },
- submit(){
- let data={
- course_child_id:this.courseChildId,
- point:this.value,
- body:this.body,
- is_complete:this.currentTab,
- }
- this.$u.post('/course/evaluate',data).then(res=>{
- console.log(res,'ppppp')
- if(res.code==200){
- uni.switchTab({
- url:'../index/index'
- })
- }
- })
- }
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #FFFFFF;
- }
- .evaluate {
- padding-bottom: 55px;
- .top {
- text-align: center;
- height: 180px;
- background: linear-gradient(267deg, #FF3B21 0%, #FF8F09 100%);
- opacity: 1;
- .avatar {
- margin-top: 23px;
- height: 78px;
- width: 78px;
- display: inline-block;
- border-radius: 50%;
- }
- .name {
- margin-top: 14px;
- font-size: 19px;
- font-family: PingFang SC;
- font-weight: bold;
- line-height: 26px;
- color: #FFFFFF;
- opacity: 1;
- }
- }
- .content {
- margin-top: -12px;
- padding: 12px;
- border-radius: 8px 8px 0px 0px;
- background-color: #FFFFFF;
- .ques {
- font-size: 15px;
- font-family: PingFang SC;
- font-weight: bold;
- line-height: 21px;
- text-align: center;
- color: #333333;
- opacity: 1;
- }
- .tab {
- width: 218px;
- height: 42px;
- background: #FFEEE5;
- opacity: 1;
- border-radius: 21px;
- margin: 0 auto;
- margin-top: 12px;
- margin-bottom: 20px;
- display: flex;
- .left,
- .right {
- flex: 1;
- height: 42px;
- line-height: 42px;
- text-align: center;
- font-size: 15px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #FF4600;
- opacity: 1;
- }
- .active {
- flex: 1;
- height: 42px;
- line-height: 42px;
- text-align: center;
- background: linear-gradient(267deg, #FF3B21 0%, #FF8F09 100%);
- border-radius: 21px;
- color: #FFFFFF;
- }
- }
- .start {
- margin-top: 12px;
- text-align: center;
- }
- .body{
- margin-top: 20px;
- .u-input__textarea{
- background-color:#F5F5F5!important;
- padding: 12px;
- }
- }
- }
- .submit{
- height: 50px;
- box-shadow: 0px -2px 12px rgba(0, 0, 0, 0.1);
- position: fixed;
- bottom: 0px;
- left: 0;
- width: 100%;
- .bt{
- height: 44px;
- margin: 3px 12px 0;
- background: linear-gradient(266deg, #FF3B21 0%, #FF8F09 100%);
- border-radius: 22px;
- font-size: 16px;
- font-family: PingFang SC;
- font-weight: bold;
- text-align: center;
- line-height: 45px;
- color: #FFFFFF;
- opacity: 1;
- }
- }
- }
- </style>
|