| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <template>
- <view class="contentbg">
- <customNav :shownav="true" :title="$t('index.pinglun')" titledetl=""></customNav>
- <view class="xuanxing">
- <image class="buyimage" src="/static/logo.png" mode="aspectFit"></image>
- <label class="xuanxingtext">{{$t('index.zonghepf')}}</label>
- <uni-rate class="rateV" allow-half v-model="rateValue" @change="onChange" />
- </view>
- <textarea class="pinglun" :value="pinglunnr" :placeholder="$t('index.qingshuru')" @input="sumfontnum"></textarea>
- <view class="text2">
- <text class="">{{fontNum}}/150</text>
- </view>
- <checkbox-group class="radio" @change="checkSelect" >
- <checkbox :checked="checkTrue"></checkbox>
- <text>{{$t('index.nimingpj')}}</text>
- </checkbox-group>
- <view class="updata" @click="updata()">{{$t('order.fabiaopinglun')}}</view>
-
- </view>
- </template>
- <script>
- import api from "@/pages/api/api.js"
- export default {
- data() {
- return {
- fontNum:0,
- rateValue: 3.5,
- checkTrue: false, //全选选中
- pinglunnr:'',
- mendid:'',
- ddId:''
- }
- },
- onLoad(option) {
- this.mendid=option.mendid;
- this.ddId=option.ddId;
- },
- methods: {
- // 限制文本框字数
- sumfontnum(e) {
- console.log(e)
- this.fontNum = e.detail.value.length
- this.pinglunnr = e.detail.value;
- console.log(this.pinglunnr)
- },
- onChange(e) {
- this.rateValue=e.value;
- console.log(this.rateValue);
- },
- checkSelect(e){
-
- },
- updata(){
- //发表评论
- this.addrevew();
- },
-
- addrevew(){
- api('addrevew',{
- "ddId": this.ddId,
- "mdId": this.mendid,
- "score": this.rateValue,
- "content":this.pinglunnr,
- "anonymous": 1
- },res=>{
- console.log('getHours',res)
- uni.navigateBack();
- },failc=>{
- //console.log('getadvertis----',failc)
- })
- },
- }
- }
- </script>
- <style>
- .contentbg{
-
- }
- .xuanxing{
- margin: 16rpx;
- display: flex;
- flex-direction: row;
- }
- .buyimage{
- width: 100rpx;
- height: 100rpx;
- }
- .xuanxingtext{
- padding-left:10rpx;
- height: 100rpx;
- line-height: 100rpx;
- }
- .rateV{
- padding-top:25rpx;
- padding-left:10rpx;
- }
-
-
- .pinglun{
- margin: 16rpx;
- padding: 10rpx;
- width: 91%;
- height: 200rpx;
- border-radius: 15rpx;
- border: 2rpx solid darkgray;
- }
- .text2{
- height: 30rpx;
- line-height: 30rpx;
- color: #000000;
- font-size: 20rpx;
- margin-right: 30rpx;
- display: flex;
- justify-content:flex-end;
- }
-
- .updata{
- background-color: green;
- color: white;
- text-align: center;
- height: 80rpx;
- line-height: 80rpx;
- width: 80%;
- margin-left: 10%;
- border-radius: 15rpx;
- }
-
- .radio{
- margin: 16rpx;
- display: flex;
- flex-direction: row;
- }
-
- </style>
|