index.nvue 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480
  1. <template>
  2. <view class="container">
  3. <!-- #ifdef APP -->
  4. <!--
  5. 注意:这是 App 所用页面,请勿引入微信小程序或浏览器运行,最好运行在真机
  6. 1. 视频运行在云服务上,本地加载很慢,会导致一些问题出现。
  7. 2. 视频 id 切记是字符串类型,并且提前转义!要不然会出现黑屏加载不出视频。
  8. -->
  9. <view :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'" v-if="isShow1">
  10. <!--
  11. 1.这里的 swiper 不是用来控制视频滑动的,而是用来控制左右滑动的,如果不需要的可以改成 view
  12. 2.为了 视频无限加载,已经把 21 行的 appear 去掉了,加上了 loadmore 方法(第10行)
  13. 3.由于方法比较多,可以采取下面的方式查看代码:
  14. (1)Mac:按住 option 键,然后点击方法名,即可跳转到方法
  15. (2)windows:按住 Alt 键,然后鼠标左击,即可跳转到方法
  16. -->
  17. <list @loadmore="loadmores" @scroll="scrolls" :loadmoreoffset="wHeight*1" :show-scrollbar="false"
  18. ref="listBox" :pagingEnabled="true" :scrollable="true">
  19. <!-- 刷新模块 -->
  20. <refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown"
  21. :display="refreshing ? 'show' : 'hide'">
  22. <loading style="background-color: #FFFFFF;">
  23. <image src="../../static/images/logins.gif"
  24. :style="'width: 80upx; height: 40upx; margin-top: 80upx; margin-bottom: 30upx; margin-left: '+ (windowWidth - 200) +'px;'">
  25. </image>
  26. </loading>
  27. </refresh>
  28. <!-- 循环数据 -->
  29. <cell v-for="(list,i) in dataList" :key="i">
  30. <!-- 用div把视频模组套起来 -->
  31. <div :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'" @disappear="stop()">
  32. <view v-if="Math.abs(k-i)<=1">
  33. <view class="root">
  34. <!--
  35. 具体视频参数可以参考官方文档
  36. 说明:
  37. 1.v-if很关键,这里主要是为了减少 dom 元素【这样才不会加载视频多了闪退】,
  38. 这里 Math.abs(k-i)<=5 也就是往上预加载 5 个视频,往下预加载 5
  39. 个视频这样做的目的是为了让视频能够提前加载但是不播放,在真正滑到位
  40. 置的时候播放视频。
  41. 【2.0.1就是 1 Math.abs(k-i)<=1:请勿修改,记住,要不然会提前播放很多视频】
  42. 2.要注意 @play="playIngs" 里面的 playIngs 方法,这个方法只是在视频播放的时候
  43. 起效果,我们控制视频播放不是用这个的。这个的主要作用是给视频封面的。我们先用
  44. 下面的视频封面盖住视频,等到视频播放的时候,我们不要急着直接播放,而是延迟一下下,
  45. 300-600ms左右。因为视频播放需要一点点时间,这点时间里会黑屏,这个时候我们就用
  46. 下面的封面盖住,这样用户就不会有从黑屏到有画面的感觉了,但是如果遇到视频太大,缓冲
  47. 时间太长,还是会出现短暂的黑屏,大部分是不会有黑屏的(这样盖住的话)。
  48. 【更新记录:2.0版】已经解决了视频黑屏问题,和加载速度慢的情况,如果还是出现了黑屏,
  49. 意味着此时手滑动的速度,已经超过了视频加载的速度,对于这个问题,建议修改 preloadNumber
  50. 变量,当它的值大一点的时候就会提前加载视频,这样用户在滑到视频的时候就不会有停顿感了
  51. 【注意】:老用户在 video 中增加和修改
  52. (1):muted="!item.playIng",
  53. (2)@timeupdate="timeupdate($event,i)"
  54. (3)把 199 行注释了,
  55. (4):id="item._id",
  56. (5)修改:uni.createVideoContext(this.dataList[this.k]._id + '' + this.k,this) 为
  57. uni.createVideoContext(this.dataList[this.k]._id,this)
  58. (6)在 timeupdate 方法里加入,if(index == this.k){把里面的加一个总的判断}
  59. 3.其他的下面有详解
  60. -->
  61. <video :ref="'list'+i" :id="list.id" :loop="true" :src="list.video" :muted="list.isplay"
  62. @play="playIngs(i)" :enable-progress-gesture="false" :page-gesture="false"
  63. :controls="false" :http-cache="true" :show-loading="false"
  64. :show-fullscreen-btn="false" :show-center-play-btn="false" :style="boxStyle"
  65. :object-fit="object_fit" @timeupdate="timeupdate($event,i)"></video>
  66. <!-- 这里是封面 -->
  67. <!-- <image
  68. v-if="!item.playIng"
  69. :src="item.src+'?x-oss-process=video/snapshot,t_100,f_jpg'"
  70. :mode="mode"
  71. :style="'width: '+ windowWidth +'px; height: '+ (wHeight - deleteHeight) +'px; position: absolute;'"
  72. ></image> -->
  73. <!--
  74. mode: 图片裁剪、缩放的模式
  75. mode 有 14 种模式,其中 5 种是缩放模式,9 种是裁剪模式。
  76. https://uniapp.dcloud.io/component/image
  77. -->
  78. </view>
  79. <!-- 直接用 view 就行了,一样是可以覆盖原生组件的 -->
  80. <!-- 这个是暂停时出现的图标 -->
  81. <!-- 播放状态:pause 的时候就会暂停 -->
  82. <view class="videoHover" @click.stop="tapVideoHover(list.state,$event)" :style="boxStyle">
  83. <image v-if="list.state=='pause'" class="playState" src="../../static/images/play.png">
  84. </image>
  85. </view>
  86. <!--审核状态 -->
  87. <view v-if="list.auditStatus == 0 || list.auditStatus == 2 || list.auditStatus == 3"
  88. class="video-status">
  89. <view v-if="list.auditStatus == 2 || list.auditStatus == 3" class="status-title">
  90. <image class="image" :src="urlDomain+'crmebimage/presets/weitg.png'"></image>
  91. <!-- <text class="iconfont icon-tishi"></text> -->
  92. <text class="title">{{list.auditStatus == 2 ? '审核未通过' : '平台关闭'}},内容仅自己可见</text>
  93. </view>
  94. <view v-else class="status-title">
  95. <image class="image" :src="urlDomain+'crmebimage/presets/shen.png'"></image>
  96. <text class="title">正在审核,内容仅自己可见</text>
  97. </view>
  98. <view class="status_info">
  99. <text
  100. class="refusal">{{(list.auditStatus == 2 || list.auditStatus == 3) ? list.refusal : '发布的内容审核通过后,将在首页展示!'}}</text>
  101. </view>
  102. </view>
  103. <!-- 最底下的文字部分 -->
  104. <view v-if="isShowCent && dataList.length !== 0" class="content">
  105. <view class="cart">
  106. <text class="cartName">@{{list.authorName}}</text>
  107. </view>
  108. <view class="words mb20" :style="'width: '+ (windowWidth - 120) +'px;'">
  109. <view v-if="list.isMore || list.content.length<=29">
  110. <text class="info">{{list.content}}</text>
  111. <view class="close">
  112. <text v-if="list.isMore" class="more" @click="moreTap(list)">收起</text>
  113. </view>
  114. </view>
  115. <view class="wordsCon" v-else>
  116. <text class="info">{{list.content.slice(0,29)}}...</text>
  117. <text class="more" @click.stop="moreTap(list)">展开</text>
  118. </view>
  119. <view class="topicList acea-row product_cate"
  120. v-if="list.topicList && list.topicList.length">
  121. <view class="pro-view" @click="goTopic(item.id)" v-for="item in list.topicList"
  122. :key="item.id">
  123. <text class="icon">#</text><text class="text">{{item.name}}</text>
  124. </view>
  125. </view>
  126. </view>
  127. <view v-if="k==i && list.productList.length>0" class="product mb20">
  128. <scroll-view class="scroll-view" scroll-x="true"
  129. style="white-space: nowrap; display: flex;" scroll-with-animation>
  130. <view class="product-item" v-for="(goods,idx) in list.productList" :key="idx">
  131. <view class="item-count acea-row" @click="goDetail(goods)">
  132. <view class="picture">
  133. <image class="image" :src="goods.productImage"></image>
  134. </view>
  135. <view class="product-text">
  136. <text class="names line1">{{goods.productName}}</text>
  137. <text v-if="goods.isPay===1" class="buy">作者买过</text>
  138. <view class="product-price">
  139. <view class="price"><text class="sm">¥</text><text
  140. class="money">{{goods.price}}</text></view>
  141. <text class="buy-btn">购买</text>
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. </scroll-view>
  147. </view>
  148. </view>
  149. <view v-if="isShowCent" class="userInfo">
  150. <!-- 1.头像 -->
  151. <navigator hover-class="none"
  152. :url="'/pages/discover/discover_user/index?id='+list.authorId" class="pictrue">
  153. <image class="userAvatar" :src="list.authorAvatar || urlDomain+'crmebimage/presets/morenT.png'"
  154. mode="aspectFill"></image>
  155. <view v-if="!list.isConcerned && list.authorId!==uid" class="guanzhu"
  156. @click.stop="followAuthor(list)">
  157. <text class="iconfont icon-shangpinshuliang-jia">+</text>
  158. </view>
  159. <view v-else class="yiguanzhu"><text class="iconfont"></text></view>
  160. </navigator>
  161. <!-- 2.点赞 -->
  162. <view @click="likeToggle(list);" style="margin-top: 5px;" class="flex-column"
  163. :class="{'likeNumActive':list.userIsLike}">
  164. <image v-if="list.userIsLike" :src="urlDomain+'crmebimage/presets/xin.png'"
  165. style="width: 28px; height: 28px;"></image>
  166. <image v-if="!list.userIsLike" :src="urlDomain+'crmebimage/presets/xin-2.png'"
  167. style="width: 28px; height: 28px;"></image>
  168. <text class="info-text">{{list.likeNum > 0 ? list.likeNum : '点赞'}}</text>
  169. </view>
  170. <!-- 3.评论 -->
  171. <view v-if="list.platReplySwitch" class="comment flex-column" @click="toComment(list)"
  172. style="margin-top: 18px;">
  173. <image :src="urlDomain+'crmebimage/presets/evaluate.png'"
  174. style="width: 54rpx; height: 50rpx;"></image>
  175. <text class="info-text">{{list.replyNum>0 ? list.replyNum : '评论'}}</text>
  176. </view>
  177. <!-- 4.分享 -->
  178. <view v-if="list.auditStatus == 1" @click="appShare('WXSceneSession',list.id)"
  179. class="flex-column" style="margin-top: 17px;">
  180. <image :src="urlDomain+'crmebimage/presets/share-fill.png'"
  181. style="width: 54rpx; height: 50rpx;"></image>
  182. <text class="info-text">分享</text>
  183. </view>
  184. <!-- 5.自己的视频 -->
  185. <view v-if="list.authorId == uid" style="margin-top: 17px;">
  186. <view class="video-my">
  187. <view class="video-dian" @click.stop="showManage = !showManage">
  188. <text class="dian"></text>
  189. <text class="dian"></text>
  190. <text class="dian"></text>
  191. </view>
  192. </view>
  193. </view>
  194. <!-- 6提到的商品 -->
  195. <view v-if="list.productList.length>0 && k === i" @click.stop="openMore(list)"
  196. class="mention" style="opacity: 0.9; margin-top: 18px;">
  197. <image class="image" src="../../static/images/collection.png"></image>
  198. <text class="count">{{list.productList.length}}</text>
  199. </view>
  200. <!-- 7.收起内容 -->
  201. <view @click="onHideCent" class="flex-column"
  202. style="margin-top: 35rpx;align-items: center;">
  203. <image :src="urlDomain+'crmebimage/presets/shou.png'"
  204. style="width: 56rpx; height: 56rpx;"></image>
  205. </view>
  206. </view>
  207. <!-- 8.展开内容 -->
  208. <view v-else @click="onHideCent" class="onShow">
  209. <image :src="urlDomain+'crmebimage/presets/zhan.png'"
  210. style="width: 56rpx; height: 56rpx;"></image>
  211. </view>
  212. <view class="manage" v-if="showManage">
  213. <navigator hover-class="none"
  214. :url="'/pages/discover/discover_release/index?noteId='+list.id" class="items">
  215. <image :src="urlDomain+'crmebimage/presets/bianji.png'"
  216. style="width: 16px; height: 16px;"></image>
  217. <text class="text">编辑</text>
  218. </navigator>
  219. <view class="items" @click.stop="deleteTopic(list)">
  220. <image :src="urlDomain+'crmebimage/presets/shan.png'"
  221. style="width: 16px; height: 16px;"></image>
  222. <text class="text">删除</text>
  223. </view>
  224. <view class="items" @click.stop="replySwitch(list)">
  225. <image v-if="list.replyStatus ==1" :src="urlDomain+'crmebimage/presets/jinping.png'"
  226. style="width: 16px; height: 16px;"></image>
  227. <image v-else :src="urlDomain+'crmebimage/presets/yunping.png'"
  228. style="width: 16px; height: 16px;"></image>
  229. <text class="text">{{list.replyStatus ==1 ? '禁止评论' : '开启评论'}}</text>
  230. </view>
  231. </view>
  232. <!-- 最底下的文字部分 -->
  233. <!-- 1.视频预览时的图片,currenttimes:就是获取当前滑块的时间点,如果不需要,可以注释掉 -->
  234. <!-- 2.如果使用下面的视频预览的话要注意的是视频链接最好是阿里云上的,因为
  235. https://xxxxxxxxx.mp4?x-oss-process=video/snapshot,t_1000,f_jpg
  236. 这个是阿里云的东西,至于其他的视频截帧我还没有试过。
  237. -->
  238. <!-- 3.阿里云视频截帧地址:https://help.aliyun.com/document_detail/64555.html -->
  239. <!-- <image
  240. v-if="item.isShowimage == true"
  241. :src="item.src+'?x-oss-process=video/snapshot,t_'+ currenttimes +'000,f_jpg'"
  242. mode="aspectFill"
  243. :style="'width: 120upx; height: 160upx; border-radius: 10upx; position: absolute; bottom: '+ (ProgressBarBottom + 160) +'upx; left: '+ (currentPositions - 15) +'px;'"
  244. ></image> -->
  245. </view>
  246. </div>
  247. </cell>
  248. </list>
  249. <!-- 1.注意:进度条这类拖拽的东西不能放进block\cell这些循环体中的,要不然touchmove方法会捕捉有误 -->
  250. <!-- <view v-if="dataList.length !== 0 && dataList[k].isShowProgressBarTime == true" :style="'position: absolute; bottom: '+ (ProgressBarBottom + this.windowWidth*0.2)/2 +'px; left: '+ (windowWidth*2 - this.windowWidth*1.35)/2 +'px;'">
  251. <text style="font-size: 22px; font-weight: bold; color: #F1F1F1;">{{changeTime}} / {{videoTimes}}</text>
  252. </view> -->
  253. <!-- 这里就是进度条了:纯手工进度条,调整位置的话就把他们的 bottom 改成一下就行了 -->
  254. </view>
  255. <!-- #endif -->
  256. <!-- 评论 -->
  257. <uni-popup type="bottom" ref="comment" @touchmove.stop.prevent="moveHandle" v-if="isShow2">
  258. <view
  259. :style="'width: '+ windowWidth +'px; height: 500px; background-color: #fff; border-top-left-radius: 10px; border-top-right-radius: 10px;'">
  260. <discoverComment v-if="showComment" ref="comments" :noteId="noteDetail.id" :noteDetails="noteDetail"
  261. @close.stop="close">
  262. </discoverComment>
  263. </view>
  264. </uni-popup>
  265. <!-- 他提到的宝贝弹窗 -->
  266. <uni-popup type="bottom" ref="pinglunMentioned">
  267. <view
  268. :style="'width: '+ windowWidth +'px;background-color: #F5F5F5; border-top-left-radius: 10px; border-top-right-radius: 10px;'">
  269. <mentioned ref="mentioned" :list="proList" @close="popup"></mentioned>
  270. </view>
  271. </uni-popup>
  272. </view>
  273. </template>
  274. <script>
  275. import {
  276. HTTP_H5_URL
  277. } from '@/config/app.js';
  278. import {
  279. goProductDetail
  280. } from '@/libs/order.js'
  281. import {
  282. mapGetters
  283. } from "vuex";
  284. import {
  285. discoverFollowAuthor,
  286. discoverNoteLike
  287. } from '@/libs/follow.js';
  288. import {
  289. toLogin
  290. } from '@/libs/login.js';
  291. import {
  292. noteDetailApi,
  293. noteRecommendApi,
  294. noteReplySwitchApi,
  295. noteDelApi
  296. } from '@/api/discover.js';
  297. import Cache from '@/utils/cache'
  298. import mentioned from '@/components/mentioned.vue';
  299. import discoverComment from './comment.nvue';
  300. import util from '@/utils/util';
  301. import {
  302. Debounce
  303. } from '@/utils/validate.js'
  304. let sysHeight = uni.getSystemInfoSync().statusBarHeight;
  305. export default {
  306. computed: mapGetters(['userInfo', 'isLogin', 'uid']),
  307. data() {
  308. return {
  309. //下面打🌟号的是必须要的基础字段
  310. //下面打💗号的是拥有滑动条的必须字段
  311. dataList: [], //用于数据循环的列表🌟💗
  312. wHeight: 0, //获取的屏幕高度🌟💗
  313. boxStyle: { //视频,图片封面样式🌟💗
  314. 'height': 0,
  315. 'width': 0,
  316. },
  317. k: 0, //默认为0🌟💗
  318. playIngIds: [], //正在播放的视频id列队,列队用于处理滑动过快导致的跳频问题🌟💗
  319. ready: false, //可忽略
  320. isDragging: false, //false代表停止滑动🌟💗
  321. refreshing: true, //用于下拉刷新🌟💗
  322. windowWidth: 0, //获取屏幕宽度🌟💗
  323. windowHeight: 0,
  324. dex: [0, 0], //用于判断是上滑还是下滑,第一个存旧值,第二个存新值【目前在1.0.7已经废弃】
  325. currents: 0, //用于左右滑动,0代表视频界面,1代表右滑界面🌟💗
  326. platform: '', //用于获取操作系统:ios、android🌟💗
  327. playIng: false, //用于视频初始化时是否播放,默认不播放🌟💗
  328. videoTime: '', //视频总时长,这个主要用来截取时间数值💗
  329. videoTimes: '', //视频时长,用这个来获取时间值,例如:00:30这个时间值💗
  330. changeTime: '', //显示滑动进度条时变化的时间💗
  331. isShowimage: false, //是否显示封面【1.0.4已废弃,但是意思需要记住】
  332. currenttimes: 0, //当前时间💗
  333. isShowProgressBarTime: false, //是否拖动进度条,如果拖动(true)则显示进度条时间,否则不显示(false)【1.0.4已废弃,但是意思需要记住】
  334. ProgressBarOpacity: 0.7, //进度条不拖动时的默认值,就是透明的💗
  335. dotWidth: 0, //播放的小圆点,默认没有💗
  336. deleteHeight: 0, //测试高度🌟💗
  337. percent: 0, //百分小数💗
  338. currentPosition: 0, //滑块当前位置💗//2.0已弃用,现已用于后端参数
  339. currentPositions: 0, //滑块当前位置的副本💗//2.0已弃用,现已用于后端参数
  340. newTime: 0, //跟手滑动后的最新时间💗
  341. timeNumber: 0, //🌟💗
  342. ProgressBarBottom: 20, //进度条离底部的距离💗
  343. object_fit: 'contain', //视频样式默认包含🌟💗
  344. mode: 'aspectFit', //图片封面样式🌟💗
  345. timeout: "", //🌟用来阻止 setTimeout()方法
  346. voice: "", //🌟用来阻止 setTimeout()方法
  347. oldVideo: "",
  348. isAutoplay: false, //是否开启自动播放(默认不开启)
  349. autoplayText: "开启自动播放",
  350. timers: "",
  351. // 引入评论 - 参数
  352. heightNum: 1.18,
  353. // 双击点赞参数
  354. touchNum: 0,
  355. aixinLeft: 0,
  356. aixinTop: 0,
  357. isShowAixin: false,
  358. Rotate: 0,
  359. isShow1: false, //控制渲染变量1
  360. isShow2: false, //控制渲染变量2 : 专门控制 uni-popup
  361. showPlay: false, //转轮显示控制
  362. rotates: 0, //转轮旋转角度
  363. rotateTime: "", //转轮递归事件控制
  364. xrotats: "",
  365. noteId: 0,
  366. where: {
  367. page: 1,
  368. limit: 5,
  369. noteId: ''
  370. },
  371. showManage: false,
  372. isShowCent: true,
  373. urlDomain: Cache.get("imgHost"),
  374. showComment: false, //评论弹窗
  375. noteDetail: {}, //详情
  376. proList: [], //商品列表
  377. fromTo: ''
  378. }
  379. },
  380. components: {
  381. //tuiBottomPopup,
  382. mentioned,
  383. discoverComment
  384. },
  385. watch: {
  386. async k(k, old_k) { //监听 k 值的变化,可以控制视频的播放与暂停
  387. // 清理定时器
  388. this.clearToTime();
  389. this.dataList[old_k].state = 'stop' //如果是被滑走的视频,就停止播放
  390. this.dataList[old_k].playIng = false //如果视频暂停,就加载封面
  391. this.dataList[old_k].isplay = true
  392. uni.createVideoContext(this.dataList[old_k].id.toString(), this).play()
  393. this.oldVideo = await setTimeout(() => {
  394. uni.createVideoContext(this.dataList[old_k].id.toString(), this).seek(0)
  395. uni.createVideoContext(this.dataList[old_k].id.toString(), this).pause()
  396. }, 500)
  397. // 2.0版本已经去掉了下面这一句,视频不用暂停,只需要把声音禁止就行
  398. // uni.createVideoContext(this.dataList[old_k]._id + '' + old_k,this).stop()//如果视频暂停,那么旧视频停止,这里的this.dataList[old_k]._id + '' + old_k,后面加 old_k 是为了每一个视频的 id 值不同,这样就可以大程度的避免串音问题
  399. this.dataList[k].state = 'play'
  400. uni.createVideoContext(this.dataList[k].id.toString(), this).play();
  401. this.xrotats = setTimeout(() => {
  402. this.showPlay = true;
  403. this.rotateX();
  404. }, 200)
  405. clearTimeout(this.voice)
  406. this.voice = await setTimeout(() => {
  407. this.dataList[k].isplay = false
  408. }, 300)
  409. await setTimeout(() => {
  410. this.dataList[k].playIng = true
  411. }, 850)
  412. //【2.0版本更新内容】- start
  413. var p = k;
  414. if (this.loadend) return;
  415. ++p;
  416. this.dataList[p].isplay = true
  417. await setTimeout(async () => {
  418. uni.createVideoContext(this.dataList[p].id.toString(), this).play()
  419. clearTimeout(this.timeout)
  420. this.timeout = await setTimeout(() => {
  421. uni.createVideoContext(this.dataList[p].id.toString(), this).seek(0)
  422. uni.createVideoContext(this.dataList[p].id.toString(), this).pause()
  423. }, 1500)
  424. }, 500)
  425. //【2.0版本更新内容】- end
  426. //【此处处理进度条卡住的问题】
  427. if (uni.getSystemInfoSync().platform !== 'ios') {
  428. await setTimeout(() => {
  429. uni.createVideoContext(this.dataList[k].id.toString(), this).pause()
  430. uni.createVideoContext(this.dataList[k].id.toString(), this).play()
  431. }, 100)
  432. }
  433. }
  434. },
  435. onShow() {
  436. if (this.dataList.length !== 0) {
  437. this.dataList[this.k].state = 'play';
  438. uni.createVideoContext(this.dataList[this.k].id, this).play()
  439. }
  440. },
  441. onHide() {
  442. this.dataList[this.k].state = 'pause'; //界面隐藏也要停止播放视频
  443. uni.createVideoContext(this.dataList[this.k].id, this).pause(); //暂停以后继续播放
  444. },
  445. onLoad(options) {
  446. this.noteId = options.noteId ? Number(options.noteId) : '';
  447. this.fromTo = options.fromTo || '';
  448. this.platform = uni.getSystemInfoSync().platform;
  449. var model = uni.getSystemInfoSync().model
  450. if (this.platform == 'ios' && (model !== 'iPhone6' || model !== 'iPhone6s' || model !== 'iPhone7' || model !==
  451. 'iPhone8')) {
  452. this.deleteHeight = 32 //有 tabbar的 修改这里可以改变视频高度
  453. /*
  454. 引入评论参数
  455. */
  456. this.heightNum = 1.27
  457. } else {
  458. this.deleteHeight = 0
  459. /*
  460. 引入评论参数
  461. */
  462. this.heightNum = 1.18
  463. }
  464. // 控制渲染 -- start
  465. this.isShow1 = true;
  466. setTimeout(() => {
  467. this.isShow2 = true;
  468. }, 400)
  469. // 控制渲染 -- end
  470. this.windowWidth = uni.getSystemInfoSync().screenWidth //获取屏幕宽度
  471. this.boxStyle.width = this.windowWidth + 'px' //给宽度加px
  472. this.wHeight = uni.getSystemInfoSync().screenHeight; //获取屏幕高度
  473. this.boxStyle.height = this.wHeight - this.deleteHeight; //改变视频高度
  474. this.get() //这一步,加载视频数据
  475. if (options.fromTo !== 'home') this.getData();
  476. this.rotateX();
  477. },
  478. onReady() {},
  479. methods: {
  480. // 删除内容
  481. deleteTopic(item) {
  482. let that = this;
  483. uni.showModal({
  484. content: '确定要删除该内容么?',
  485. success: function(res) {
  486. if (res.confirm) {
  487. noteDelApi(item.id).then(res => {
  488. util.Tips({
  489. title: '删除成功'
  490. });
  491. setTimeout(function() {
  492. uni.redirectTo({
  493. url: '/pages/discover/discover_user/index'
  494. })
  495. }, 1000);
  496. }).catch(err => {
  497. uni.showToast({
  498. title: err,
  499. icon: 'none'
  500. })
  501. });
  502. } else if (res.cancel) {
  503. console.log('用户点击取消');
  504. }
  505. }
  506. });
  507. },
  508. //禁止评论
  509. replySwitch(item) {
  510. if (!item.platReplySwitch && item.replyStatus === 3) {
  511. util.Tips({
  512. title: '平台设置不可评论'
  513. });
  514. } else {
  515. noteReplySwitchApi(item.id).then(res => {
  516. if (item.replyStatus === 1) {
  517. this.$set(item, 'replyStatus', 2)
  518. util.Tips({
  519. title: '禁止成功'
  520. });
  521. } else {
  522. this.$set(item, 'replyStatus', 1)
  523. util.Tips({
  524. title: '开启成功'
  525. });
  526. }
  527. }).catch(err => {
  528. uni.showToast({
  529. title: err,
  530. icon: 'none'
  531. })
  532. });
  533. }
  534. },
  535. //打开评论
  536. toComment(item, index) {
  537. this.noteDetail = item;
  538. this.showComment = true
  539. this.$refs.comment.open('bottom')
  540. },
  541. /*查看提到的宝贝*/
  542. openMore(item) {
  543. this.proList = item.productList;
  544. this.$refs.pinglunMentioned.open('bottom');
  545. //this.popupShow = true;
  546. },
  547. popup() {
  548. this.$refs.pinglunMentioned.close();
  549. },
  550. loadmores() {
  551. if (options.fromTo !== 'home') this.getData();
  552. },
  553. //分享
  554. appShare(scene, id) {
  555. uni.showLoading({
  556. title: '加载中',
  557. mask: true
  558. });
  559. let uid = this.uid ? this.uid : 0;
  560. let data = this.dataList[this.k];
  561. let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
  562. //let curRoute = routes[routes.length - 1].$page.fullPath // 获取当前页面路由,也就是最后一个打开的页面路由
  563. uni.share({
  564. provider: "weixin",
  565. scene: scene,
  566. type: 0,
  567. href: `${HTTP_H5_URL}/pages/discover/discover_video/routineVideo/index?&noteId=${id}&sd=${this.uid}`,
  568. title: data.title || '',
  569. summary: data.content || '',
  570. imageUrl: data.cover || '',
  571. success: function(res) {
  572. uni.showToast({
  573. title: '分享成功',
  574. icon: 'success'
  575. })
  576. uni.hideLoading();
  577. },
  578. fail: function(err) {
  579. uni.hideLoading();
  580. uni.showToast({
  581. title: '分享失败',
  582. icon: 'none',
  583. duration: 2000
  584. })
  585. }
  586. });
  587. uni.hideLoading();
  588. },
  589. moreTap(item) {
  590. item.isMore = !item.isMore;
  591. },
  592. //去话题
  593. goTopic(id) {
  594. uni.navigateTo({
  595. url: `/pages/discover/discover_note_topic/index?topicId=${id}`
  596. })
  597. },
  598. //收起内容
  599. onHideCent() {
  600. this.isShowCent = !this.isShowCent;
  601. },
  602. // 去详情页
  603. goDetail(item) {
  604. goProductDetail(item.productId, 0, '');
  605. },
  606. //返回
  607. returns: function() {
  608. uni.navigateBack();
  609. },
  610. // 关注作者
  611. followAuthor(item) {
  612. if (this.isLogin) {
  613. discoverFollowAuthor(item.authorId).then(() => {
  614. this.$set(item, 'isConcerned', !item.isConcerned);
  615. });
  616. } else {
  617. toLogin();
  618. }
  619. },
  620. //点赞
  621. likeToggle: Debounce(function(item) {
  622. if (this.isLogin) {
  623. discoverNoteLike(item.id).then(() => {
  624. this.$set(item, 'userIsLike', !item.userIsLike);
  625. if (!item.userIsLike) {
  626. item.likeNum--;
  627. item.likeNum = item.likeNum == 0 ? 0 : item.likeNum
  628. } else {
  629. item.likeNum++;
  630. }
  631. });
  632. } else {
  633. toLogin();
  634. }
  635. }),
  636. toBilibili() {
  637. // #ifdef H5
  638. window.open('https://www.bilibili.com/video/BV1gi4y12745')
  639. // #endif
  640. },
  641. selectVideo() {
  642. uni.navigateTo({
  643. url: '/pages/selectVideo/selectVideo'
  644. })
  645. },
  646. dealVoice() {
  647. uni.showToast({
  648. title: '处理声音',
  649. icon: 'none'
  650. })
  651. },
  652. clearToTime() {
  653. //清理定时器
  654. for (let i = 0; i < 20; i++) {
  655. clearTimeout(this.rotateTime);
  656. clearTimeout(this.xrotats);
  657. this.showPlay = false;
  658. this.rotates = 0;
  659. }
  660. },
  661. clearTime() {
  662. //清理定时器
  663. for (let i = 0; i < 20; i++) {
  664. clearTimeout(this.rotateTime);
  665. clearTimeout(this.xrotats);
  666. }
  667. },
  668. rotateX() {
  669. // clearTimeout(this.rotateTime);
  670. this.rotateTime = setTimeout(() => {
  671. this.rotateX();
  672. this.rotates += 1;
  673. }, 30)
  674. },
  675. autoPlay() {
  676. this.isAutoplay = !this.isAutoplay;
  677. if (!this.isAutoplay) {
  678. this.autoplayText = "开启自动播放"
  679. uni.showToast({
  680. title: "关闭自动播放",
  681. icon: 'none',
  682. duration: 3000
  683. })
  684. } else {
  685. this.autoplayText = "关闭自动播放"
  686. uni.showToast({
  687. title: "开启自动播放",
  688. icon: 'none',
  689. duration: 3000
  690. })
  691. }
  692. },
  693. getData() {
  694. if (this.loadend) return;
  695. this.loading = true;
  696. this.where.noteId = this.noteId;
  697. noteRecommendApi(this.where).then(res => {
  698. this.loading = false;
  699. this.where.page = this.where.page + 1;
  700. this.loadend = this.where.page > res.data.totalPage;
  701. var msg = res.data.list
  702. for (let i = 0; i < msg.length; i++) {
  703. msg[i].id = msg[i].id.toString();
  704. this.dataList.push(msg[i])
  705. }
  706. }).catch(err => {
  707. this.loading = false;
  708. uni.showToast({
  709. title: err,
  710. icon: 'none'
  711. })
  712. });
  713. },
  714. touchstart(event) {
  715. this.dataList[this.k].isShowimage = true //刚触摸的时候就要显示预览视频图片了
  716. this.dataList[this.k].isShowProgressBarTime = true //显示时间线
  717. this.ProgressBarOpacity = 1 //让滑块显示起来更明显一点
  718. this.dotWidth = 10 //让点显示起来更明显一点
  719. },
  720. touchend() { //当手松开后,跳到最新时间
  721. uni.createVideoContext(this.dataList[this.k].id, this).seek(this.newTime)
  722. if (this.dataList[this.k].state == 'pause') {
  723. this.dataList[this.k].state = 'play'
  724. uni.createVideoContext(this.dataList[this.k].id, this).play()
  725. }
  726. this.dataList[this.k].isShowProgressBarTime = false //触摸结束后,隐藏时间线
  727. this.dataList[this.k].isShowimage = false //触摸结束后,隐藏时间预览
  728. this.ProgressBarOpacity = 0.5 //隐藏起来进度条,不那么明显了
  729. this.dotWidth = 0 //隐藏起来进度条,不那么明显了
  730. },
  731. touchmove(event) { //当手移动滑块时,计算位置、百分小数、新的时间
  732. var msg = []
  733. if (this.videoTime !== '') {
  734. msg = this.videoTime.split(':')
  735. }
  736. var timeNumber = Number(msg[0]) * 60 + Number(msg[1])
  737. this.currentPositions = event.changedTouches[0].screenX
  738. this.percent = this.currentPositions / this.windowWidth
  739. this.newTime = this.percent * timeNumber
  740. this.currenttimes = parseInt(this.newTime)
  741. let theTime = this.newTime
  742. let middle = 0; // 分
  743. if (theTime > 60) {
  744. middle = parseInt(theTime / 60);
  745. theTime = parseInt(theTime % 60);
  746. }
  747. this.changeTime =
  748. `${Math.round(middle)>9?Math.round(middle):'0'+Math.round(middle)}:${Math.round(theTime)>9?Math.round(theTime):'0'+Math.round(theTime)}`
  749. },
  750. timeupdate(event, index) { //计算滑块当前位置,计算当前百分小数
  751. if (index == this.k) {
  752. var currenttime = event.detail.currentTime
  753. this.timeNumber = Math.round(event.detail.duration)
  754. this.getTime()
  755. this.percent = currenttime / this.timeNumber
  756. this.currentPosition = this.windowWidth * this.percent
  757. let theTime = currenttime
  758. let middle = 0; // 分
  759. if (theTime > 60) {
  760. middle = parseInt(theTime / 60);
  761. theTime = parseInt(theTime % 60);
  762. }
  763. this.changeTime =
  764. `${Math.round(middle)>9?Math.round(middle):'0'+Math.round(middle)}:${Math.round(theTime)>9?Math.round(theTime):'0'+Math.round(theTime)}`
  765. //自动切换视频
  766. if (this.isAutoplay) { //true,代表自动播放
  767. if (Math.round(currenttime) == this.timeNumber - 1) {
  768. const dom = uni.requireNativePlugin('dom')
  769. let doms = 'item' + (this.k + 1)
  770. setTimeout(() => {
  771. let el = this.$refs[doms][0]
  772. dom.scrollToElement(el, {
  773. offset: 0,
  774. animated: true
  775. })
  776. }, 500)
  777. }
  778. }
  779. }
  780. },
  781. getTime() { //得到时间函数
  782. this.videoTime = this.formatSeconds(this.timeNumber);
  783. var msg = []
  784. if (this.videoTime !== '') {
  785. msg = this.videoTime.split(':')
  786. }
  787. this.videoTimes = `${msg[0]>9?msg[0]:'0'+msg[0]}:${msg[1]>9?msg[1]:'0'+msg[1]}`;
  788. },
  789. formatSeconds(value) { //获取时间函数
  790. let theTime = parseInt(value); // 秒
  791. let middle = 0; // 分
  792. if (theTime > 60) {
  793. middle = parseInt(theTime / 60);
  794. theTime = parseInt(theTime % 60);
  795. }
  796. return `${middle>9?middle:middle}:${theTime>9?theTime:theTime}`;
  797. },
  798. playIngs(index) {
  799. //
  800. },
  801. tozuozhe() {
  802. this.currents = 1 //点击头像以后就会切换
  803. },
  804. stop() {
  805. // console.log('stop')
  806. },
  807. scrolls(event) {
  808. this.isDragging = event.isDragging
  809. if (!event.isDragging) { //isDragging:判断用户是不是在滑动,滑动:true,停止滑动:false。我们要用户停止滑动时才给 k 赋值,这样就可以避免很多麻烦
  810. var i = Math.round(Math.abs(event.contentOffset.y) / (this.wHeight - this.deleteHeight +
  811. 1)) //先用绝对值取出滑动的距离,然后除以屏幕高度,取一个整,就知道你现在滑动到哪一个视频了
  812. if (i !== this.k) { //这里加判断是因为这个方法会执行很多次,会造成重复请求,所以这里写一个限制
  813. if (uni.getSystemInfoSync().platform == 'ios') {
  814. this.k = i //判断了用户没有滑动,确认了用户的确是在看这个视频,然后就赋值啦
  815. this.dataList[this.k].state = 'play'
  816. } else {
  817. clearTimeout(this.timers);
  818. this.timers = setTimeout(() => {
  819. this.k = i //判断了用户没有滑动,确认了用户的确是在看这个视频,然后就赋值啦
  820. this.dataList[this.k].state = 'play'
  821. }, 80)
  822. }
  823. }
  824. }
  825. },
  826. get() {
  827. noteDetailApi(this.noteId).then(async (res) => {
  828. this.noteDetail = res.data
  829. res.data.id = res.data.id.toString()
  830. this.noteDetail.id = this.noteDetail.id.toString()
  831. this.loading = false
  832. this.dataList.push(res.data)
  833. this.dataList[0].state = "play";
  834. await setTimeout(() => {
  835. //这里的延迟是为了避免执行时间太快而直接跳过执行的 bug
  836. uni.createVideoContext(this.dataList[0].id.toString(), this).seek(0)
  837. uni.createVideoContext(this.dataList[0].id.toString(), this).play()
  838. }, 200)
  839. this.dataList[0].isplay = false
  840. await setTimeout(() => {
  841. this.dataList[0].playIng = true
  842. }, 500)
  843. var p = 0;
  844. this.showPlay = true;
  845. }).catch(err => {
  846. uni.showToast({
  847. title: err,
  848. icon: 'none'
  849. })
  850. });
  851. },
  852. onpullingdown() {
  853. this.refreshing = true
  854. },
  855. onrefresh() {
  856. setTimeout(() => {
  857. this.refreshing = false
  858. }, 1000)
  859. },
  860. // 双击点赞效果
  861. touchstartHover(event) {
  862. if (this.touchNum >= 1) {
  863. this.aixinLeft = event.touches[0].screenX - 50;
  864. this.aixinTop = event.touches[0].screenY - 50;
  865. this.isShowAixin = true;
  866. let max = 40;
  867. let min = -40;
  868. this.Rotate = Math.floor(Math.random() * (max - min + 1)) + min;
  869. setTimeout(() => {
  870. this.isShowAixin = false;
  871. }, 700)
  872. this.onTabItemTaps();
  873. }
  874. },
  875. //点击播放&&暂停
  876. tapVideoHover(state, event) {
  877. this.dataList[this.k].isShowimage = false
  878. this.dataList[this.k].isShowProgressBarTime = false
  879. this.ProgressBarOpacity = 0.5
  880. this.dotWidth = 0
  881. // 1.启用双击点赞 --- start
  882. this.touchNum++;
  883. setTimeout(() => {
  884. if (this.touchNum == 1) {
  885. if (state == 'play' || state == 'continue') {
  886. this.dataList[this.k].state = 'pause';
  887. } else {
  888. this.dataList[this.k].state = 'continue';
  889. }
  890. if (this.dataList[this.k].state == 'continue') {
  891. uni.createVideoContext(this.dataList[this.k].id, this).play(); //暂停以后继续播放
  892. this.clearTime();
  893. setTimeout(() => {
  894. this.rotateX();
  895. }, 50)
  896. }
  897. if (this.dataList[this.k].state == 'pause') {
  898. uni.createVideoContext(this.dataList[this.k].id, this).pause(); //暂停以后继续播放
  899. this.clearTime();
  900. }
  901. }
  902. if (this.touchNum >= 2) {
  903. this.doubleLike();
  904. }
  905. this.touchNum = 0;
  906. }, 200)
  907. // --------------- ending
  908. // 2. 不启用双击点赞 start
  909. // if(state=='play'||state=='continue'){
  910. // this.dataList[this.k].state = 'pause';
  911. // }else{
  912. // this.dataList[this.k].state = 'continue';
  913. // }
  914. // if(this.dataList[this.k].state == 'continue'){
  915. // uni.createVideoContext(this.dataList[this.k]._id,this).play();//暂停以后继续播放
  916. // }
  917. // if(this.dataList[this.k].state == 'pause'){
  918. // uni.createVideoContext(this.dataList[this.k]._id,this).pause();//暂停以后继续播放
  919. // }
  920. // --------------- ending
  921. },
  922. doubleLike() {
  923. if (this.dataList[this.k].like == false) {
  924. this.dataList[this.k].like_n += 1;
  925. this.dataList[this.k].like = true;
  926. }
  927. /*
  928. 点赞
  929. */
  930. },
  931. //关闭评论
  932. close() {
  933. this.$refs.comment.close();
  934. },
  935. wxh5Video() {
  936. uni.navigateTo({
  937. url: '../wxh5previewVideo/wxh5previewVideo'
  938. })
  939. },
  940. previewVideo() {
  941. uni.navigateTo({
  942. url: '../previewVideo/previewVideo'
  943. })
  944. },
  945. toTwoVideo() {
  946. uni.navigateTo({
  947. url: '../new_index/new_index'
  948. })
  949. },
  950. tolistVideo() {
  951. uni.navigateTo({
  952. url: '../nvueSwiper/nvueSwiper'
  953. })
  954. },
  955. moveHandle() {},
  956. onTabItemTaps() {
  957. // #ifdef APP-PLUS
  958. if (uni.getSystemInfoSync().platform == "ios") {
  959. let UIImpactFeedbackGenerator = plus.ios.importClass('UIImpactFeedbackGenerator');
  960. let impact = new UIImpactFeedbackGenerator();
  961. impact.prepare();
  962. impact.init(1);
  963. impact.impactOccurred();
  964. }
  965. if (uni.getSystemInfoSync().platform == "android") {
  966. uni.vibrateShort({
  967. success: () => {
  968. console.log('点击震动');
  969. }
  970. });
  971. }
  972. // #endif
  973. }
  974. }
  975. }
  976. </script>
  977. <style lang="scss" scoped>
  978. .onShow {
  979. position: absolute;
  980. bottom: 55rpx;
  981. right: 40rpx;
  982. }
  983. .mb20 {
  984. margin-bottom: 20rpx;
  985. }
  986. .line1 {
  987. overflow: hidden;
  988. text-overflow: ellipsis;
  989. white-space: nowrap;
  990. //display: inline-block;
  991. }
  992. .names {
  993. font-size: 24rpx;
  994. width: 286rpx;
  995. color: #fff;
  996. height: 30rpx;
  997. lines: 1;
  998. text-overflow: ellipsis;
  999. }
  1000. .product_cate {
  1001. flex-direction: row;
  1002. flex-wrap: wrap;
  1003. .pro-view {
  1004. margin-bottom: 20rpx;
  1005. flex-direction: row;
  1006. align-items: center;
  1007. border-radius: 30rpx;
  1008. border-radius: 29rpx;
  1009. .text {
  1010. color: #ffffff;
  1011. font-size: 24rpx;
  1012. }
  1013. .icon {
  1014. font-size: 26rpx;
  1015. font-weight: bold;
  1016. margin-right: 4rpx;
  1017. color: #ffffff;
  1018. }
  1019. }
  1020. }
  1021. .noVideo {
  1022. position: fixed;
  1023. top: 400rpx;
  1024. z-index: 9;
  1025. width: 750rpx;
  1026. flex-direction: row;
  1027. justify-content: center;
  1028. .pictrue {
  1029. width: 414rpx;
  1030. height: 256rpx;
  1031. }
  1032. .tips {
  1033. text-align: center;
  1034. margin-top: 14rpx;
  1035. font-size: 26rpx;
  1036. color: #999;
  1037. }
  1038. }
  1039. // .container {background: #000000;}
  1040. .item {
  1041. position: relative;
  1042. }
  1043. .videoHover {
  1044. position: absolute;
  1045. top: 0;
  1046. left: 0;
  1047. flex: 1;
  1048. background-color: rgba(0, 0, 0, 0.1);
  1049. justify-content: center;
  1050. align-items: center;
  1051. }
  1052. .playState {
  1053. width: 160rpx;
  1054. height: 160rpx;
  1055. opacity: 0.2;
  1056. }
  1057. .video-status {
  1058. width: 690rpx;
  1059. position: absolute;
  1060. left: 30rpx;
  1061. background: rgba(0, 0, 0, .55);
  1062. border-radius: 10rpx;
  1063. top: 150rpx;
  1064. padding: 30rpx;
  1065. .status-title {
  1066. flex-direction: row;
  1067. align-items: center;
  1068. .title {
  1069. margin-left: 20rpx;
  1070. color: #ffffff;
  1071. font-size: 28rpx;
  1072. }
  1073. }
  1074. .refusal {
  1075. color: #ffffff;
  1076. font-size: 22rpx;
  1077. margin: 15rpx 0 0 48rpx;
  1078. }
  1079. .image {
  1080. width: 28rpx;
  1081. height: 28rpx;
  1082. }
  1083. }
  1084. .userInfo {
  1085. position: absolute;
  1086. bottom: 30px;
  1087. right: 10px;
  1088. display: flex;
  1089. align-items: center;
  1090. flex-direction: column;
  1091. .pictrue {
  1092. flex-direction: column;
  1093. justify-content: center;
  1094. align-items: center;
  1095. position: relative;
  1096. // margin-bottom: 18rpx;
  1097. .guanzhu {
  1098. width: 42rpx;
  1099. height: 42rpx;
  1100. display: flex;
  1101. align-items: center;
  1102. justify-content: center;
  1103. color: #fff;
  1104. background: #E93323;
  1105. border-radius: 100%;
  1106. position: relative;
  1107. top: -20rpx;
  1108. left: 3rpx;
  1109. .iconfont {
  1110. font-size: 30rpx;
  1111. color: #fff;
  1112. }
  1113. }
  1114. .yiguanzhu {
  1115. width: 42rpx;
  1116. height: 42rpx;
  1117. }
  1118. }
  1119. }
  1120. .video-my {
  1121. position: relative;
  1122. align-items: center;
  1123. justify-content: center;
  1124. flex-direction: row;
  1125. }
  1126. .video-dian {
  1127. position: relative;
  1128. width: 33px;
  1129. height: 33px;
  1130. align-items: center;
  1131. justify-content: center;
  1132. flex-direction: row;
  1133. left: 3px;
  1134. .dian {
  1135. width: 7px;
  1136. height: 7px;
  1137. background-color: #fff;
  1138. border-radius: 100%;
  1139. margin-right: 3px;
  1140. &:last-child {
  1141. margin-right: 0;
  1142. }
  1143. }
  1144. }
  1145. .manage {
  1146. width: 115px;
  1147. background: #ffffff;
  1148. box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
  1149. padding: 0 8px;
  1150. position: absolute;
  1151. bottom: 10px;
  1152. right: 60px;
  1153. border-radius: 8px;
  1154. .manage-gou {
  1155. display: flex;
  1156. width: 13px;
  1157. height: 13px;
  1158. background: #ffffff;
  1159. transform: rotate(140deg);
  1160. position: absolute;
  1161. top: 30px;
  1162. right: -6px;
  1163. box-shadow: -1px -1px 1px rgba(0, 0, 0, 0.05);
  1164. }
  1165. .items {
  1166. border-bottom: 1px solid #EEEEEE;
  1167. padding: 10px 0;
  1168. display: flex;
  1169. align-items: center;
  1170. flex-direction: row;
  1171. .text {
  1172. color: #282828;
  1173. font-size: 13px;
  1174. margin-left: 20rpx;
  1175. }
  1176. &:last-child {
  1177. border-bottom-color: transparent;
  1178. }
  1179. .image {
  1180. width: 32rpx;
  1181. height: 32rpx;
  1182. margin: 0 16rpx 0;
  1183. }
  1184. }
  1185. }
  1186. .userAvatar {
  1187. border-radius: 500%;
  1188. border-style: solid;
  1189. border-width: 2px;
  1190. border-color: #ffffff;
  1191. width: 80rpx;
  1192. height: 80rpx;
  1193. }
  1194. .info-text {
  1195. display: flex;
  1196. margin-top: 10rpx;
  1197. color: #ffffff;
  1198. font-size: 22rpx;
  1199. text-align: center;
  1200. &.likeNumActive {
  1201. color: #E93323;
  1202. }
  1203. }
  1204. .likeIco,
  1205. .shareIco,
  1206. .commentIco {
  1207. width: 60rpx;
  1208. height: 60rpx;
  1209. margin-top: 15px;
  1210. }
  1211. .likeNum,
  1212. .commentNum,
  1213. .shareTex {
  1214. color: #ffffff;
  1215. font-size: 30rpx;
  1216. text-align: center;
  1217. margin: 5px;
  1218. }
  1219. .mention {
  1220. width: 46px;
  1221. height: 46px;
  1222. position: relative;
  1223. bottom: 0;
  1224. .image {
  1225. width: 30px;
  1226. height: 30px;
  1227. position: absolute;
  1228. right: 8px;
  1229. }
  1230. .count {
  1231. padding: 2px 6px;
  1232. background: #fff;
  1233. border-radius: 100%;
  1234. display: flex;
  1235. align-items: center;
  1236. justify-content: center;
  1237. color: #E93323;
  1238. position: absolute;
  1239. right: 6px;
  1240. top: 0;
  1241. font-size: 10px;
  1242. }
  1243. }
  1244. .content {
  1245. width: 590rpx;
  1246. position: absolute;
  1247. bottom: 20px;
  1248. /* justify-content: center; */
  1249. padding: 15rpx;
  1250. flex-direction: column;
  1251. justify-content: flex-start;
  1252. color: #ffffff;
  1253. .cart {
  1254. height: 48rpx;
  1255. flex-direction: row;
  1256. .cartName {
  1257. font-size: 28rpx;
  1258. color: #fff;
  1259. }
  1260. }
  1261. .product {
  1262. flex-direction: row;
  1263. margin-bottom: 20rpx;
  1264. .scroll-view {
  1265. flex-direction: row;
  1266. }
  1267. .product-item {
  1268. width: 444rpx;
  1269. height: 136rpx;
  1270. background: rgba(0, 0, 0, .55);
  1271. border-radius: 12rpx;
  1272. padding: 16rpx 15rpx;
  1273. margin-right: 30rpx;
  1274. }
  1275. .item-count {
  1276. font-size: 20rpx;
  1277. flex-direction: row;
  1278. justify-content: space-between;
  1279. .picture {
  1280. width: 104rpx;
  1281. height: 104rpx;
  1282. border-radius: 10rpx;
  1283. .image {
  1284. width: 104rpx;
  1285. height: 104rpx;
  1286. border-radius: 10rpx;
  1287. }
  1288. }
  1289. .names {
  1290. font-size: 24rpx;
  1291. width: 286rpx;
  1292. color: #fff;
  1293. }
  1294. .product-text {
  1295. width: 286rpx;
  1296. justify-content: space-between;
  1297. .buy {
  1298. width: 75rpx;
  1299. padding: 4rpx 7rpx;
  1300. background: #5D5747;
  1301. border-radius: 3px 3px 3px 3px;
  1302. font-size: 16rpx;
  1303. display: inline-block;
  1304. }
  1305. .product-price {
  1306. display: flex;
  1307. flex-direction: row;
  1308. justify-content: space-between;
  1309. align-items: center;
  1310. .price {
  1311. display: flex;
  1312. flex-direction: row;
  1313. .sm,
  1314. .money {
  1315. color: #ffffff;
  1316. font-size: 24rpx;
  1317. }
  1318. }
  1319. .buy-btn {
  1320. padding: 6rpx 20rpx;
  1321. // display: flex;
  1322. // align-items: center;
  1323. // justify-content: center;
  1324. color: #fff;
  1325. border-radius: 26rpx;
  1326. background: #E93323;
  1327. font-size: 20rpx;
  1328. }
  1329. }
  1330. }
  1331. }
  1332. }
  1333. }
  1334. .timeCon {
  1335. flex-direction: row;
  1336. align-items: center;
  1337. .userName {
  1338. font-size: 30rpx;
  1339. color: #ffffff;
  1340. }
  1341. }
  1342. .words {
  1343. margin-top: 20rpx;
  1344. .close {
  1345. display: flex;
  1346. flex-direction: row;
  1347. align-items: center;
  1348. justify-content: flex-end;
  1349. margin-right: 20rpx;
  1350. .imgClose {
  1351. width: 18rpx;
  1352. height: 10rpx;
  1353. margin-left: 10rpx;
  1354. }
  1355. }
  1356. .wordsCon {
  1357. position: relative;
  1358. .more {
  1359. position: absolute;
  1360. bottom: 0;
  1361. right: 40rpx;
  1362. font-size: 26rpx;
  1363. color: #ffffff;
  1364. font-weight: bold;
  1365. }
  1366. .img {
  1367. width: 18rpx;
  1368. height: 10rpx;
  1369. margin-left: 4rpx;
  1370. position: absolute;
  1371. bottom: 7rpx;
  1372. right: 20rpx;
  1373. }
  1374. }
  1375. .info {
  1376. color: #fff;
  1377. font-size: 28rpx;
  1378. }
  1379. .more {
  1380. font-size: 26rpx;
  1381. color: #ffffff;
  1382. font-weight: bold;
  1383. }
  1384. }
  1385. .root {
  1386. background-color: #000000;
  1387. }
  1388. </style>