|
|
|
@ -7,15 +7,17 @@
|
|
|
|
|
<view>
|
|
|
|
|
<text>{{"菜品名称:" + dish_name + '\n'}}</text>
|
|
|
|
|
<text>{{"菜品位置:" + dish_location + dish_window_name + '\n'}}</text>
|
|
|
|
|
<text>{{"菜品类别:" + dish_label + '\n'}}</text>
|
|
|
|
|
<text>{{"菜品评分:" + dish_avg_score + '\n'}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="evaluete">
|
|
|
|
|
|
|
|
|
|
<hb-comment ref="hbComment" @add="add" @del="del" @like="like" :deleteTip="'确认删除?'"
|
|
|
|
|
:cmData="commentData" v-if="commentData"></hb-comment>
|
|
|
|
|
<hb-comment ref="hbComment" @add="add" @del="del" @like="like" :deleteTip="'确认删除?'" :cmData="commentData"
|
|
|
|
|
v-if="commentData"></hb-comment>
|
|
|
|
|
</view>
|
|
|
|
|
<view>
|
|
|
|
|
<text>{{"评分:\n"}}</text>
|
|
|
|
|
<uni-rate v-model="value" @change="onChange(e.value)" allow-half="true" size="75" />
|
|
|
|
|
<text>{{"菜品打分:\n"}}</text>
|
|
|
|
|
<uni-rate v-model="value" @change="onChange" allow-half="true" size="75" />
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
@ -33,7 +35,8 @@
|
|
|
|
|
dish_window_name: '',
|
|
|
|
|
value: 4,
|
|
|
|
|
comentData: [],
|
|
|
|
|
dish_id:''
|
|
|
|
|
dish_id: '',
|
|
|
|
|
dish_avg_score: 5.0
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onLoad(option) {
|
|
|
|
@ -57,6 +60,7 @@
|
|
|
|
|
that.dish_name = res.result.data[0].dish_name
|
|
|
|
|
that.dish_location = res.result.data[0].location
|
|
|
|
|
that.dish_window_name = res.result.data[0].window_name
|
|
|
|
|
that.dish_avg_score = res.result.data[0].avg_score
|
|
|
|
|
console.log(res)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -75,15 +79,13 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
onChange() {
|
|
|
|
|
this.value = e.value
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
updateScore() {
|
|
|
|
|
onChange(e) {
|
|
|
|
|
let that = this
|
|
|
|
|
uniCloud.callFunction({
|
|
|
|
|
name: 'scoreUpdate',
|
|
|
|
|
data: {
|
|
|
|
|
//用户信息和获取的评分
|
|
|
|
|
score: that.value,
|
|
|
|
|
dish_id: that.dish_id
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -117,6 +119,5 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.evaluete{
|
|
|
|
|
}
|
|
|
|
|
.evaluete {}
|
|
|
|
|
</style>
|