帧视界壹通告,付费看视频的微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

216 lines
3.9 KiB

11 months ago
10 months ago
9 months ago
11 months ago
10 months ago
10 months ago
11 months ago
10 months ago
11 months ago
10 months ago
10 months ago
10 months ago
11 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
11 months ago
9 months ago
11 months ago
9 months ago
10 months ago
10 months ago
10 months ago
11 months ago
9 months ago
8 months ago
11 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
8 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
10 months ago
9 months ago
8 months ago
9 months ago
11 months ago
  1. <template>
  2. <view class="controls">
  3. <view class="bell"
  4. @click="$refs.confirmationPopup.open('bottom')">
  5. <uv-icon size="35rpx" name="bell"></uv-icon>
  6. 举报
  7. </view>
  8. <view class=""
  9. @click="thumbUp">
  10. <uv-icon size="35rpx"
  11. color="#f40"
  12. name="thumb-up"
  13. v-if="up"></uv-icon>
  14. <uv-icon v-else size="35rpx" name="thumb-up"></uv-icon>
  15. 点赞
  16. </view>
  17. <view class="">
  18. <button
  19. border="none"
  20. open-type="share" class="share">
  21. <uv-icon size="35rpx" name="share"></uv-icon>
  22. 分享
  23. </button>
  24. </view>
  25. <view class=""
  26. v-if="!isWork"
  27. @click="thumbDown">
  28. <uv-icon
  29. v-if="down"
  30. color="#f40"
  31. size="35rpx" name="thumb-down"></uv-icon>
  32. <uv-icon
  33. v-else
  34. size="35rpx" name="thumb-down"></uv-icon>
  35. </view>
  36. <confirmationPopup
  37. ref="confirmationPopup"
  38. title="举报"
  39. @confirm="bell(item)"
  40. confirmText="确认举报">
  41. <view class="confirmationPopup">
  42. <input type="text"
  43. placeholder="请输入举报原因"
  44. v-model="text"
  45. class="confirmationInput"/>
  46. </view>
  47. </confirmationPopup>
  48. <!-- <uv-popup ref="confirmationPopup"
  49. :round="30"
  50. :customStyle="{height: '50vh'}">
  51. <view class="confirmationPopup">
  52. <view class="list">
  53. <view
  54. :key="index"
  55. @click="bell(item)"
  56. v-for="(item, index) in ju">
  57. {{ item.content }}
  58. <view class="content">
  59. {{ item.content }}
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </uv-popup> -->
  65. </view>
  66. </template>
  67. <script>
  68. import confirmationPopup from '@/components/toast/confirmationPopup.vue'
  69. export default {
  70. name:"contentControls",
  71. components : {
  72. confirmationPopup,
  73. },
  74. props : {
  75. type : {
  76. default : 0
  77. },
  78. detail : {
  79. default : {}
  80. },
  81. up : {
  82. default : false,
  83. },
  84. down : {
  85. default : false,
  86. },
  87. isWork : {
  88. default : false,
  89. }
  90. },
  91. data() {
  92. return {
  93. ju : [
  94. {
  95. title : '虚假信息',
  96. },
  97. {
  98. title : '其他原因',
  99. },
  100. ],
  101. act : 0,
  102. text : '',
  103. };
  104. },
  105. created() {
  106. this.indexGetComplaintReason()
  107. },
  108. methods : {
  109. indexGetComplaintReason(){
  110. this.$api('indexGetComplaintReason', res => {
  111. if(res.code == 200){
  112. this.ju = res.result
  113. }
  114. })
  115. },
  116. // 举报
  117. bell(item){
  118. this.$api('infoReport', {
  119. type : this.type,
  120. id : this.detail.id,
  121. content : this.text
  122. }, res => {
  123. this.$refs.confirmationPopup.close()
  124. if(res.code == 200){
  125. this.$emit('loadData')
  126. uni.showToast({
  127. title: '举报成功',
  128. // title: res.message,
  129. })
  130. }
  131. })
  132. },
  133. // 点赞
  134. thumbUp(){
  135. this.$api('infoLike', {
  136. type : this.type,
  137. id : this.detail.id,
  138. }, res => {
  139. if(res.code == 200){
  140. this.$emit('loadData')
  141. uni.showToast({
  142. title: res.message
  143. })
  144. }
  145. })
  146. },
  147. // 踩
  148. thumbDown(){
  149. this.$api('infoDislike', {
  150. type : this.type,
  151. id : this.detail.id,
  152. }, res => {
  153. if(res.code == 200){
  154. this.$emit('loadData')
  155. uni.showToast({
  156. title: res.message
  157. })
  158. }
  159. })
  160. },
  161. },
  162. }
  163. </script>
  164. <style lang="scss" scoped>
  165. .controls {
  166. display: flex;
  167. &>view {
  168. display: flex;
  169. justify-content: center;
  170. align-items: center;
  171. margin-right: 40rpx;
  172. }
  173. .share{
  174. display: flex;
  175. justify-content: center;
  176. align-items: center;
  177. }
  178. .share::after{
  179. border: none;
  180. }
  181. .confirmationPopup{
  182. overflow: auto;
  183. height: 100%;
  184. padding: 20rpx;
  185. padding-bottom: env(safe-area-inset-bottom);
  186. display: flex;
  187. justify-content: center;
  188. align-items: center;
  189. .confirmationInput{
  190. width: 80%;
  191. padding: 20rpx;
  192. border-radius: 50rpx;
  193. background-color: #f3f3f3;
  194. }
  195. .list{
  196. padding-bottom: env(safe-area-inset-bottom);
  197. &>view{
  198. margin: 20rpx;
  199. display: flex;
  200. justify-content: center;
  201. padding: 20rpx;
  202. border-radius: 10rpx;
  203. border: 1px solid #000;
  204. }
  205. }
  206. }
  207. }
  208. </style>