myliving-app.nvue 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275
  1. <template>
  2. <view class="es">
  3. <view :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;' ">
  4. <view class="emptybox x-c" :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;' " v-if="isEmpty">
  5. <image class="emptybox-img" src="https://www.mescroll.com/img/mescroll-empty.png" mode="aspectFill"></image>
  6. <text class="emptybox-tip">~空空如也~</text>
  7. </view>
  8. <list loadmoreoffset="100" @scroll="scrolls" :show-scrollbar="false" v-if="dataList&&dataList.length > 0" :style="'height: '+ (boxStyle.height) +'px;padding-top:'+statusBarHeight+'px' " ref="listBox" :pagingEnabled="true" :scrollable="true">
  9. <refresh @pullingdown='onpullingdown' @refresh="onrefresh" :display=" refreshing ? 'show' : 'hide' " class="refresh x-c ">
  10. <loading-indicator style="width: 22px;height: 22px;color:#fff;"></loading-indicator>
  11. <text class="es-fs-32 es-ml-8 es-c-white">{{refreshText}}</text>
  12. </refresh>
  13. <cell v-for="(item,i) in dataList" :key="i">
  14. <view :style="'width: '+ windowWidth +'px;height:'+ (videoStyle.height)+'px' " :ref="'item'+i" style="position: relative;">
  15. <view v-if="(k-i)<=1" style="position: relative;" >
  16. <view class="root" >
  17. <video :id="item.id" :loop="true" :src="item.src" :poster="item.cover"
  18. @play="playIngs(i)" :enable-progress-gesture="false" :page-gesture="false"
  19. :controls="false" :show-loading="false" :initial-time="0"
  20. :show-fullscreen-btn="false" :show-center-play-btn="false" :style="videoStyle"
  21. :object-fit="object_fit" @timeupdate="timeupdate($event,i)"
  22. @fullscreenchange="onFullscreenChange" @waiting="onWaiting()" @progress="onProgress()"
  23. @ended="endedPlayNext()" @canplay="onVideoCanPlay" @canplaythrough="onVideoCanPlayThrough"
  24. @loadeddata="onLoadeddata" @loadedmetadata="onLoadedMetadata" @error="onError"
  25. >
  26. </video>
  27. </view>
  28. <view class="videoHover" @click="tapVideoHover(item.state,$event)"
  29. @touchstart="touchstartHover" :style="boxStyle">
  30. <image v-if="item.state=='pause' && item.isShowPlayIcon" class="playState" src="/static/image/course/play.png"></image>
  31. </view>
  32. <view class="right es-c-white">
  33. <view class="item1 es es-ac es-pc es-mt-33">
  34. <view class="es-icon-100 es-br">
  35. <image class="es-icon-100" style="border-radius: 50rpx;" :src="item.headImg"></image>
  36. </view>
  37. </view>
  38. <view class="item1 es es-ver es-ac es-pc es-mt-33" @tap="doLike(item,i)">
  39. <view class="es-icon-84">
  40. <image class="es-icon-84" :src="item.like==1?'/static/images/other/video/zan1_on.png':'/static/images/other/video/zan1.png'"></image>
  41. </view>
  42. <view><text class="es-c-white es-fs-22 es-fw-500">{{item.likeNum}}</text></view>
  43. </view>
  44. <view class="item1 es es-ver es-ac es-pc es-mt-33" @tap="openComment(item)">
  45. <view class="es-icon-84">
  46. <image class="es-icon-84" src="/static/images/other/video/comment1.png"></image>
  47. </view>
  48. <view><text class="es-c-white es-fs-22 es-fw-500">{{item.smsNum}}</text></view>
  49. </view>
  50. <view class="item1 es es-ver es-ac es-pc es-mt-33" @tap="doFavorite(item,i)">
  51. <view class="es-icon-84">
  52. <image class="es-icon-84" :src="item.favorite==1?'/static/images/other/video/fav1_on.png':'/static/images/other/video/fav1.png'" ></image>
  53. </view>
  54. <view><text class="es-c-white es-fs-22 es-fw-500">{{item.favoriteNum}}</text></view>
  55. </view>
  56. <view class="item1 es es-ver es-ac es-pc es-mt-33" @tap="openShare(item)">
  57. <view class="es-icon-84">
  58. <image :class="animate ? 'animate-icon':'animate-scale'" src="@/static/image/home1/weixin_icon.png" mode="aspectFill"></image>
  59. </view>
  60. <view><text class="es-c-white es-fs-22 es-fw-500">{{item.shares}}</text></view>
  61. </view>
  62. <!-- <view class="item1 es es-ac es-pc es-mt-33">
  63. <view class="es-br ">
  64. <text class="es-c-white es-fs-34">{{item.uploadType}}</text>
  65. </view>
  66. </view> -->
  67. </view>
  68. <view class="left" v-if="item.isShowGoods && item.productId!=null" >
  69. <view class="es-w-40 es-h-40" @tap.stop="closePro(item,i)" style="position: absolute;right:0rpx;top:74rpx;z-index:999">
  70. <image class="es-w-40 es-h-40" src="@/static/images/close40.png"></image>
  71. </view>
  72. <view class="es-h-74 es es-ac">
  73. <view class="es-f1 es es-ac" id="w">
  74. <view class="bg" style="width: 320rpx;" >
  75. <image src="@/static/images/other/video/bg.png" style="height: 74rpx;width: 100%;" ></image>
  76. </view>
  77. <view class="es-w-30"></view>
  78. </view>
  79. </view>
  80. <view class="goods" @tap="goToPro(item)">
  81. <view class="icon" style="width: 290rpx;height: 290rpx;">
  82. <image :src="item.imgUrl" style="width: 290rpx;height: 290rpx;" class="es-br-10"></image>
  83. </view>
  84. <view class="es-omit es-mt-19" style="width: 290rpx;"><text class="es-fw es-fs-30">{{item.packageName}}</text></view>
  85. </view>
  86. </view>
  87. <view class="bottom">
  88. <text class="txtTitle" :class="showExpand?'ellipsis':''" :style="defTitStyle" :id="'txtTitle'+i" :ref="'txtTitle'+i">{{item.title}}</text>
  89. <text v-if="showExpand" class="expandBtn" @tap="clickExpand">{{ titIsExpand?'收起':'展开' }}</text>
  90. </view>
  91. </view>
  92. </view>
  93. </cell>
  94. </list>
  95. </view>
  96. <view :style="'width: '+ windowWidth +'px;background-color:'+bgColor+';padding-top:' +statusBarHeight+ 'px'" class="tabbar1">
  97. <view class="tabbar1-box x-bc">
  98. <image @tap.stop="navBack()" class="es-ml-40 es-w-18 es-h-31" src="@/static/images/other/ret-white.png" ></image>
  99. <text class="tabbar1-tit">{{tabIndexType == 1 ? '我的喜欢':tabIndexType == 2 ? '我的收藏':tabIndexType == 3 ? '我的评论':''}}</text>
  100. <view class="es-ml-40 es-w-18 es-h-31"></view>
  101. </view>
  102. <!-- <n-tabs style="background: transparent;" v-model="tabIndex" :tabs="mtabs" :height="88" @change="tabChange" :tab-width="134" @search="handleShowSearch"></n-tabs>
  103. <view class="search-box view-animation" :style="'width: '+ windowWidth +'px;height:'+searchHeight+'rpx'">
  104. <uni-search-bar radius="72" v-model="keyword" placeholder="搜索内容" clearButton="auto" cancelButton="none" @confirm="search" />
  105. </view> -->
  106. </view>
  107. <view class="redpacked x-c es-br-ban" v-if="!iserr && !showGuide" @click.stop="tapRedpacked">
  108. <gb-progress class="es x-c es-br-ban" :radius="43" :startPosDegree="0" originalColor="#222222"
  109. processColor="#FF5C03" innerbgColor="#222222" :process="process" :barWidth="5">
  110. <image class="es-w-50 es-h-50" src="@/static/images/ad/redpacked.png" mode="widthFix" ></image>
  111. </gb-progress>
  112. </view>
  113. <!-- 新手指引 -->
  114. <view class="guide" :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;'" v-if="showGuide" @touchmove.stop.prevent>
  115. <view class="guide-box" style="width: 100%; height:100%; left: 0px; top: 0px;box-shadow: rgb(33 33 33 / 80%) 0px 0px 0px 0px, rgb(33 33 33 / 50%) 0px 0px 0px 5000px;" >
  116. <view class="tips" id="guidetips" :style="'width: '+ windowWidth +'px; height: '+ boxStyle.height +'px;' " style="top: 0px; left: 0px;" @click="nextGuide">
  117. <view class="liveguide" >
  118. <image class="phone_icon" src="@/static/images/guide/phone_icon.png" mode="aspectFill"></image>
  119. <image class="hand_icon" :class="{origin: !goSwipe, target: goSwipe}" src="@/static/images/guide/hand_icon.png" mode="aspectFill"></image>
  120. <text class="liveguide-tip">上滑查看更多视频</text>
  121. </view>
  122. </view>
  123. </view>
  124. <!-- 遮罩层,防止点击 -->
  125. <view class="v-model" @click="nextGuide"></view>
  126. </view>
  127. <!-- 分享弹窗 -->
  128. <u-popup :show="showShare" @close="showShare = false" >
  129. <share-box :shareItem="shareItem" @closeShare='showShare = false' ></share-box>
  130. </u-popup>
  131. </view>
  132. </template>
  133. <script>
  134. import { getFavoriteVideoList,doFavorite,doLike } from '@/api/shortvideo'
  135. import { addIntegral } from '@/api/integral'
  136. import { isLogin } from '@/utils/common'
  137. import { showLoginPage } from '@/utils/login'
  138. import shareBox from "@/components/share-box/share-boxN.vue"
  139. // #ifdef APP-PLUS
  140. const dom = weex.requireModule('dom');
  141. // #endif
  142. export default {
  143. components: {
  144. shareBox
  145. },
  146. data() {
  147. return {
  148. animate: true,
  149. animateInterval: null,
  150. bgColor: '',
  151. searchFlag: false,
  152. searchHeight: 0,
  153. showSearch: false,
  154. isEmpty: false,
  155. step: {
  156. name: 'liveguide',
  157. guideList: [{
  158. el: '',
  159. tips: '上滑查看更多视频',
  160. next: '',
  161. }]
  162. },
  163. dataList: [], //用于数据循环的列表🌟💗
  164. wHeight: 0, //获取的屏幕高度🌟💗
  165. boxStyle: { //视频父视图样式🌟💗
  166. 'height': 0,
  167. 'width': 0,
  168. },
  169. videoStyle: { //视频,图片封面样式🌟💗
  170. 'height': 0,
  171. 'width': 0,
  172. 'marginTop':0
  173. },
  174. Heights: 0,
  175. k: 0, //默认为0🌟💗
  176. playIngIds: [], //正在播放的视频id列队,列队用于处理滑动过快导致的跳频问题🌟💗
  177. ready: false, //可忽略
  178. isDragging: false, //false代表停止滑动🌟💗
  179. refreshing: false, //用于下拉刷新🌟💗
  180. windowWidth: 0, //获取屏幕宽度🌟💗
  181. windowHeight: 0,
  182. dex: [0, 0], //用于判断是上滑还是下滑,第一个存旧值,第二个存新值【目前在1.0.7已经废弃】
  183. currents: 0, //用于左右滑动,0代表视频界面,1代表右滑界面🌟💗
  184. platform: '', //用于获取操作系统:ios、android🌟💗
  185. playIng: false, //用于视频初始化时是否播放,默认不播放🌟💗
  186. videoTime: '', //视频总时长,这个主要用来截取时间数值💗
  187. videoTimes: '', //视频时长,用这个来获取时间值,例如:00:30这个时间值💗
  188. changeTime: '', //显示滑动进度条时变化的时间💗
  189. isShowimage: false, //是否显示封面【1.0.4已废弃,但是意思需要记住】
  190. currenttimes: 0, //当前时间💗
  191. isShowProgressBarTime: false, //是否拖动进度条,如果拖动(true)则显示进度条时间,否则不显示(false)【1.0.4已废弃,但是意思需要记住】
  192. ProgressBarOpacity: 0.7, //进度条不拖动时的默认值,就是透明的💗
  193. dotWidth: 0, //播放的小圆点,默认没有💗
  194. deleteHeight: 0, //测试高度🌟💗
  195. statusBarHeight:0,
  196. percent: 0, //百分小数💗
  197. currentPosition: 0, //滑块当前位置💗//2.0已弃用,现已用于后端参数
  198. currentPositions: 0, //滑块当前位置的副本💗//2.0已弃用,现已用于后端参数
  199. newTime: 0, //跟手滑动后的最新时间💗
  200. timeNumber: 0, //🌟💗
  201. ProgressBarBottom: 20, //进度条离底部的距离💗
  202. object_fit: 'contain', //视频样式默认包含🌟💗 contain :包含 fill:填充 cover:覆盖
  203. mode: 'aspectFit', //图片封面样式🌟💗
  204. timeout: "", //🌟用来阻止 setTimeout()方法
  205. voice: "", //🌟用来阻止 setTimeout()方法
  206. oldVideo: "",
  207. isAutoplay: false, //是否开启自动播放(默认不开启)
  208. autoplayText: "开启自动播放",
  209. timers: "",
  210. leftTimers:"",
  211. // 引入评论 - 参数
  212. heightNum: 1.18,
  213. // 双击点赞参数
  214. touchNum: 0,
  215. aixinLeft: 0,
  216. aixinTop: 0,
  217. isShowAixin: false,
  218. Rotate: 0,
  219. isShowTab:true,
  220. isShow1: false, //控制渲染变量1
  221. isShow2: false, //控制渲染变量2 : 专门控制 uni-popup
  222. showPlay: false, //转轮显示控制
  223. rotates: 0, //转轮旋转角度
  224. rotateTime: "", //转轮递归事件控制
  225. xrotats: "",
  226. player: "",
  227. top:0,
  228. w:0,
  229. showLeft:true,
  230. keyword:"",
  231. pageNum:1,
  232. pageSize:10,
  233. isLastPage:false,
  234. refreshText: '↓ 下拉刷新',
  235. tabIndex: 0, // tab下标
  236. current: 0,
  237. mtabs: [
  238. {id: "tab00",name: '推荐'},{id: "tab01",name: '热点'},{id: "tab02",name: '直播'},{id: "tab03",name: '健康'}
  239. ],
  240. specVisible: false,
  241. esComment:null,
  242. showExpand:false,
  243. titIsExpand:false,
  244. lines:2,
  245. lineCount:0,
  246. titOpacity:0,
  247. defTitStyle:{'opacity':0},
  248. showShare:false,
  249. shareItem:{ imageUrl:"",title:"",path:""},
  250. viewVideoNum:0,
  251. //圆环倒计时
  252. iserr:false,
  253. interval:null,
  254. process:0,
  255. processDatas:[],
  256. isCounting:true,
  257. isPostBack:true,
  258. countItem:{"process":0,"isLoad":false},
  259. doLikeDisabled:false,
  260. doFavDisabled:false,
  261. showGuide:true,
  262. goSwipe: false,
  263. countNum:false,
  264. guideTimer:null,
  265. tabIndexType: 1,
  266. }
  267. },
  268. created: function() {
  269. // setTimeout(e => {
  270. // uni.createSelectorQuery().select('#w').boundingClientRect(r2 => {
  271. // this.w = r2.width;
  272. // }).exec();
  273. // }, 50)
  274. },
  275. onLoad(options) {
  276. this.tabIndexType = options.tabIndexType
  277. const systemInfo = uni.getSystemInfoSync();
  278. this.statusBarHeight=systemInfo.statusBarHeight;
  279. this.windowWidth = systemInfo.screenWidth //获取屏幕宽度
  280. this.boxStyle.width = this.windowWidth + 'px' //给宽度加px
  281. let tabBarHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom;
  282. this.wHeight=systemInfo.windowHeight; //获取屏幕高度
  283. this.boxStyle.height = this.wHeight - this.deleteHeight; //改变视频高度
  284. this.videoStyle.width=this.boxStyle.width;
  285. this.videoStyle.height=this.boxStyle.height - this.statusBarHeight;
  286. this.getData();
  287. uni.getSystemInfo({success: (res) => {
  288. this.top = res.safeArea.top;
  289. }
  290. });
  291. let that=this;
  292. uni.$on('refreshVideoComment', (data) => {
  293. let item=that.dataList[that.k];
  294. item.smsNum=data.smsNum;
  295. that.dataList[that.k]=item;
  296. that.$forceUpdate(); // 如果你需要强制刷新,可以调用 $forceUpdate()
  297. });
  298. const guide = uni.getStorageSync(this.step.name);
  299. console.log("qxj guide:"+guide);
  300. if (!guide) {
  301. this.showGuide = true;
  302. } else {
  303. this.showGuide = false;
  304. }
  305. this.guideTimer=setInterval(() => {
  306. if(this.countNum%2==0){
  307. this.goSwipe=true;
  308. }
  309. else{
  310. this.goSwipe=false;
  311. }
  312. this.countNum++;
  313. }, 900)
  314. },
  315. onShow(){
  316. if(!isLogin()) {
  317. this.$showLoginPage()
  318. return
  319. }
  320. this.animate = true
  321. this.changeAnimate()
  322. const systemInfo = uni.getSystemInfoSync();
  323. if(this.dataList.length !== 0){
  324. this.dataList[this.k].state = 'play';
  325. uni.createVideoContext(this.dataList[this.k].id,this).play();
  326. }
  327. },
  328. onHide(){
  329. clearInterval(this.animateInterval)
  330. this.animateInterval = null
  331. this.dataList[this.k].state = 'pause';//界面隐藏也要停止播放视频
  332. uni.createVideoContext(this.dataList[this.k].id,this).pause();//暂停以后继续播放
  333. //this.showToast('回到后台');
  334. },
  335. destroyed() {
  336. uni.$off("refreshVideoComment");
  337. },
  338. watch:{
  339. k(k,old_k){
  340. //监听 k 值的变化,可以控制视频的播放与暂停
  341. //console.log(k)
  342. // 清理定时器
  343. //this.dataList[old_k].state = 'stop'//如果是被滑走的视频,就停止播放
  344. this.dataList[old_k].playIng = false//如果视频暂停,就加载封面
  345. this.dataList[old_k].isplay = true
  346. console.log("qxj 旧视频暂停");
  347. uni.createVideoContext(this.dataList[old_k].id,this).seek(0);
  348. uni.createVideoContext(this.dataList[old_k].id,this).play();
  349. clearTimeout(this.oldVideo)
  350. this.oldVideo = setTimeout(()=>{
  351. //uni.createVideoContext(this.dataList[old_k].id,this).seek(0)
  352. uni.createVideoContext(this.dataList[old_k].id,this).pause()
  353. console.log('预留第' + (old_k + 1) + '个视频:' + this.dataList[old_k].id)
  354. },10);
  355. // clearTimeout(this.timeout)
  356. // this.timeout = setTimeout(()=>{
  357. // uni.createVideoContext(this.dataList[k+1].id,this).seek(0);
  358. // uni.createVideoContext(this.dataList[k+1].id,this).pause();
  359. // console.log('预加载第' + (k+1) + '个视频:' + this.dataList[k+1].id)
  360. // },50);
  361. // 2.0版本已经去掉了下面这一句,视频不用暂停,只需要把声音禁止就行
  362. // uni.createVideoContext(this.dataList[old_k].id + '' + old_k,this).stop()//如果视频暂停,那么旧视频停止,这里的this.dataList[old_k].id + '' + old_k,后面加 old_k 是为了每一个视频的 id 值不同,这样就可以大程度的避免串音问题
  363. this.dataList[k].state = 'play'
  364. console.log('已经暂停 --> 第' + (old_k + 1) + '个视频~')//提示
  365. clearTimeout(this.player);
  366. this.player = setTimeout(()=>{
  367. uni.createVideoContext(this.dataList[k].id,this).play();
  368. },0);
  369. if(k == (this.dataList.length-1)) {
  370. (async ()=>{
  371. console.log("qxj wath isLastPage:"+this.isLastPage);
  372. var p = k;
  373. if(this.isLastPage){
  374. this.pageNum=1;
  375. await this.getData();
  376. //var p = k;
  377. }else{
  378. this.pageNum++;
  379. await this.getData();
  380. }
  381. console.log("qxj after getData listCount:"+this.dataList.length);
  382. this.dataList[p].isplay = true
  383. setTimeout(()=>{
  384. uni.createVideoContext(this.dataList[p].id,this).play()
  385. clearTimeout(this.timeout)
  386. this.timeout = setTimeout(()=>{
  387. uni.createVideoContext(this.dataList[p].id,this).seek(0)
  388. uni.createVideoContext(this.dataList[p].id,this).pause()
  389. console.log('预加载第' + (p + 1) + '个视频:' + this.dataList[p].id)
  390. },1000)
  391. },20)
  392. })();
  393. }
  394. //【此处处理进度条卡住的问题】
  395. if(uni.getSystemInfoSync().platform !== 'ios'){
  396. setTimeout(()=>{
  397. uni.createVideoContext(this.dataList[k].id,this).pause()
  398. uni.createVideoContext(this.dataList[k].id,this).play()
  399. },100)
  400. }
  401. this.xrotats = setTimeout(()=>{
  402. this.showPlay = true;
  403. },200)
  404. }
  405. },
  406. methods: {
  407. changeAnimate() {
  408. this.animateInterval = setInterval(()=>{
  409. this.animate = !this.animate
  410. },500)
  411. },
  412. navBack() {
  413. uni.navigateBack({
  414. animationType: 'pop-out',
  415. animationDuration: 200
  416. });
  417. },
  418. handleShowSearch() {
  419. this.showSearch = !this.showSearch
  420. this.searchHeight = this.showSearch ? '116' : 0
  421. this.bgColor = this.showSearch ? 'rgba(0,0,0,0.2)' : 'rgba(0,0,0,0)'
  422. this.keyword = ""
  423. if(!this.showSearch && this.searchFlag) {
  424. this.searchFlag = false
  425. this.pageNum=1;
  426. this.getData('showLoading');
  427. }
  428. },
  429. search() {
  430. this.searchFlag = true
  431. this.pageNum=1;
  432. this.getData('showLoading');
  433. },
  434. onpullingdown(e) {
  435. if (this.refreshing) return;
  436. if (Math.abs(e.pullingDistance) > Math.abs(e.viewHeight)) {
  437. this.refreshText = '释放更新'
  438. this.isShowTab=false;
  439. } else {
  440. this.refreshText = '下拉更新'
  441. this.isShowTab=true;
  442. }
  443. },
  444. onrefresh(e) {
  445. console.log('onRefreshing...');
  446. this.refreshing = true;
  447. this.isShowTab=false;
  448. this.pageNum=1;
  449. this.getData();
  450. if (this.refreshing) return;
  451. },
  452. getData:function(flag){
  453. // userList.forEach(e=>{
  454. // e.id = 'A'+e.id+''+parseInt(Math.random()*1000);
  455. // this.dataList.push(e);
  456. // });
  457. // if(this.isLastPage){
  458. // return;
  459. // }
  460. let that=this;
  461. const params={"type":this.tabIndexType};
  462. if(flag == 'showLoading') {
  463. uni.showLoading({
  464. title: '加载中...',
  465. })
  466. }
  467. this.isEmpty = false
  468. getFavoriteVideoList(params,this.pageNum,).then(res => {
  469. this.refreshing = false;
  470. this.isShowTab=true;
  471. if(res.code==200&& res.data &&res.data.list&&res.data.list.length > 0){
  472. const datas=res.data.list;
  473. this.isLastPage=res.data.isLastPage;
  474. datas.forEach(e=>{
  475. e.videoId=e.id;
  476. e.id = 'A'+e.id+''+parseInt(Math.random()*1000);
  477. e.src=e.src.replace("obs.shouzhujue.com","obs.jy.cc");
  478. e.src=e.src.replace("cdn.ylrzcloud.com","tcpv.ylrzcloud.com");
  479. this.dataList.push(e);
  480. });
  481. if(this.pageNum==1){
  482. setTimeout(e=>{
  483. this.tapVideoHover("reset");
  484. this.checkTextLines(0);
  485. },100)
  486. this.leftTimers=setTimeout(e=>{
  487. this.dataList[0].isShowGoods=true;
  488. },3000);
  489. }
  490. if(this.isPostBack){
  491. this.isPostBack=false;
  492. this.getBrowse();
  493. }
  494. }else{
  495. this.isEmpty = true
  496. this.dataList = []
  497. this.refreshing = false;
  498. this.isShowTab=true;
  499. }
  500. },
  501. rej => {
  502. uni.hideLoading()
  503. }
  504. ).catch(()=>{
  505. uni.hideLoading()
  506. //联网失败, 结束加载
  507. this.refreshing = false;
  508. this.isShowTab=true;
  509. });
  510. },
  511. touchstart(event) {
  512. this.dataList[this.k].isShowimage = true //刚触摸的时候就要显示预览视频图片了
  513. this.dataList[this.k].isShowProgressBarTime = true //显示时间线
  514. this.ProgressBarOpacity = 1 //让滑块显示起来更明显一点
  515. this.dotWidth = 10 //让点显示起来更明显一点
  516. },
  517. touchend() { //当手松开后,跳到最新时间
  518. console.log('touchEnd');
  519. uni.createVideoContext(this.dataList[this.k].id, this).seek(this.newTime)
  520. if (this.dataList[this.k].state == 'pause') {
  521. this.dataList[this.k].state = 'play'
  522. uni.createVideoContext(this.dataList[this.k].id, this).play();
  523. console.log('touchEnd 播放数据',this.k,this.dataList[this.k].id);
  524. }
  525. this.dataList[this.k].isShowProgressBarTime = false //触摸结束后,隐藏时间线
  526. this.dataList[this.k].isShowimage = false //触摸结束后,隐藏时间预览
  527. this.ProgressBarOpacity = 0.5 //隐藏起来进度条,不那么明显了
  528. this.dotWidth = 0 //隐藏起来进度条,不那么明显了
  529. },
  530. touchmove(event) { //当手移动滑块时,计算位置、百分小数、新的时间
  531. var msg = []
  532. if (this.videoTime !== '') {
  533. msg = this.videoTime.split(':')
  534. }
  535. var timeNumber = Number(msg[0]) * 60 + Number(msg[1])
  536. this.currentPositions = event.changedTouches[0].screenX
  537. this.percent = this.currentPositions / this.windowWidth
  538. this.newTime = this.percent * timeNumber
  539. this.currenttimes = parseInt(this.newTime)
  540. let theTime = this.newTime
  541. let middle = 0; // 分
  542. if (theTime > 60) {
  543. middle = parseInt(theTime / 60);
  544. theTime = parseInt(theTime % 60);
  545. }
  546. this.changeTime = `${Math.round(middle)>9?Math.round(middle):'0'+Math.round(middle)}:${Math.round(theTime)>9?Math.round(theTime):'0'+Math.round(theTime)}`
  547. },
  548. tapVideoHover(state,event){
  549. console.log('kkkk=>',this.k);
  550. this.dataList[this.k].isShowimage = false
  551. this.dataList[this.k].isShowProgressBarTime = false
  552. this.ProgressBarOpacity = 0.5
  553. this.dotWidth = 0
  554. console.log('state--',state);
  555. // 1.启用双击点赞 --- start
  556. if(state=='play'||state=='continue'){
  557. this.dataList[this.k].state = 'pause';
  558. }
  559. else if(state=='reset'){
  560. this.dataList[this.k].state = 'reset';
  561. }
  562. else{
  563. this.dataList[this.k].state = 'continue';
  564. }
  565. this.dataList[this.k].isShowPlayIcon = true;
  566. //console.log('xxx',this.dataList[this.k].state);
  567. if(this.dataList[this.k].state == 'continue'){
  568. //console.log('播放数据',this.dataList[this.k].id);
  569. uni.createVideoContext(this.dataList[this.k].id,this).play();//暂停以后继续播放
  570. }
  571. if(this.dataList[this.k].state == 'pause'){
  572. uni.createVideoContext(this.dataList[this.k].id,this).pause();//暂停以后继续播放
  573. }
  574. if(this.dataList[this.k].state == 'reset'){
  575. uni.createVideoContext(this.dataList[this.k].id,this).seek(0);
  576. uni.createVideoContext(this.dataList[this.k].id,this).play();//暂停以后继续播放
  577. this.dataList[this.k].state = 'continue';
  578. }
  579. },
  580. scrolls (event) {
  581. this.isDragging = event.isDragging;
  582. if (!event.isDragging) {//isDragging:判断用户是不是在滑动,滑动:true,停止滑动:false。我们要用户停止滑动时才给 k 赋值,这样就可以避免很多麻烦
  583. var i = Math.round(Math.abs(event.contentOffset.y) / (this.wHeight - this.deleteHeight - this.statusBarHeight + 1))//先用绝对值取出滑动的距离,然后除以屏幕高度,取一个整,就知道你现在滑动到哪一个视频了
  584. //console.log("qxj k:"+this.k+" i:"+i);
  585. if(i !== this.k){//这里加判断是因为这个方法会执行很多次,会造成重复请求,所以这里写一个限制
  586. let num = 0;
  587. clearTimeout(this.timers);
  588. this.timers = setTimeout(()=>{
  589. this.k = i;//判断了用户没有滑动,确认了用户的确是在看这个视频,然后就赋值啦
  590. this.dataList[this.k].state = 'play';
  591. //console.log('正在播放 --> 第' + (this.k + 1) + '个视频~');
  592. this.checkTextLines(i);
  593. this.getBrowse();
  594. },num);
  595. if(!isLogin()){
  596. if(this.viewVideoNum%2==0){
  597. showLoginPage();
  598. }
  599. this.viewVideoNum++;
  600. }
  601. clearTimeout(this.leftTimers);
  602. this.leftTimers=setTimeout(e=>{
  603. this.dataList[this.k].isShowGoods=true;
  604. },3000);
  605. }
  606. }
  607. },
  608. handleDoLike(item,index){
  609. if (this.doLikeDisabled) return;
  610. this.doLikeDisabled = true;
  611. this.doLike(item, i);
  612. setTimeout(() => {
  613. this.doLikeDisabled = false;
  614. }, 1000); // 1秒后重新启用方法
  615. },
  616. doLike(item,index){
  617. if(!isLogin()){
  618. showLoginPage();
  619. return;
  620. }
  621. doLike(item.videoId).then(res => {
  622. if(res.code==200){
  623. if(item.like==0){
  624. item.like=1;
  625. item.likeNum+=1;
  626. }else{
  627. item.like=0;
  628. item.likeNum-=1;
  629. }
  630. this.dataList[index]=item;
  631. this.$forceUpdate(); // 如果你需要强制刷新,可以调用 $forceUpdate()
  632. }else{
  633. this.showToast(res.msg);
  634. }
  635. },
  636. rej => {}
  637. );
  638. },
  639. doFavorite(item,index){
  640. if(!isLogin()){
  641. showLoginPage();
  642. return;
  643. }
  644. doFavorite(item.videoId).then(res => {
  645. if(res.code==200){
  646. if(item.favorite==0){
  647. item.favorite=1;
  648. item.favoriteNum+=1;
  649. }else{
  650. item.favorite=0;
  651. item.favoriteNum-=1;
  652. }
  653. this.dataList[index]=item;
  654. this.$forceUpdate(); // 如果你需要强制刷新,可以调用 $forceUpdate()
  655. }
  656. else{
  657. this.showToast(res.msg);
  658. }
  659. },
  660. rej => {}
  661. );
  662. },
  663. addIntegral(){
  664. return
  665. if(!isLogin()){
  666. return;
  667. }
  668. addIntegral(2).then(res => {
  669. if(res.code==200){
  670. uni.showToast({icon:'none',title:res.msg,duration:3000,position:'bottom'});
  671. }
  672. },
  673. rej => {}
  674. );
  675. },
  676. tabChange (index) {
  677. this.tabIndex=index;
  678. },
  679. playIngs:function(){
  680. },
  681. openComment(item){
  682. const subNVue = uni.getSubNVueById('mylivingApp');
  683. subNVue.show('slide-in-bottom', 250);
  684. uni.$emit('videoComment', {
  685. videoId: item.videoId,
  686. smsNum:item.smsNum,
  687. subNVueName:'mylivingApp'
  688. });
  689. },
  690. closePro(item,index){
  691. item.isShowGoods=false;
  692. this.dataList[index]=item;
  693. this.$forceUpdate();
  694. },
  695. goToPro(item){ //跳转疗法页面
  696. uni.navigateTo({
  697. url: "/pages/store/packageDetails?packageId="+item.productId
  698. });
  699. },
  700. click:function(){
  701. },
  702. onClickItem(e) {
  703. if (this.tabIndex !== e.currentIndex) {
  704. this.tabIndex = e.currentIndex
  705. }
  706. },
  707. getRichText(content) {
  708. content = new HTMLParser(content.trim())
  709. return content
  710. },
  711. checkTextLines(index) {
  712. var system = uni.getSystemInfoSync();
  713. let textWidth=system.screenWidth-uni.upx2px(150+20);
  714. let fontSize=uni.upx2px(30);
  715. let screenWidth=system.screenWidth;
  716. let that=this;
  717. let txtTitle=this.$refs["txtTitle"+index];
  718. this.defTitStyle={'opacity':0}
  719. this.showExpand=false;
  720. uni.createSelectorQuery().select("#txtTitle"+index).boundingClientRect(rect => {
  721. console.log("qxj checkTextLines height:"+rect.height);
  722. setTimeout(e=>{
  723. this.defTitStyle={'opacity':1};
  724. this.showExpand=rect.height>40;
  725. },50);
  726. }).exec();
  727. },
  728. linechange(event){
  729. console.log(event)
  730. const lineCount = event.detail.lineCount //行数
  731. this.lineCount = lineCount
  732. if(lineCount>3){ //如果大于3行,显示展开阅读
  733. this.showExpand = true
  734. }
  735. },
  736. clickExpand(){
  737. this.titIsExpand=!this.titIsExpand;
  738. this.defTitStyle={'opacity':1,'lines':this.titIsExpand?1000:2};
  739. },
  740. openShare(item){
  741. this.shareItem.title=item.title;
  742. this.shareItem.imageUrl=item.cover;
  743. this.shareItem.compressImage = 1
  744. this.shareItem.summary="";
  745. let cdn=uni.getStorageSync('h5Path');
  746. this.shareItem.url=cdn+"/pages/course/video/living-applet?videoId="+item.videoId;
  747. this.showShare=true;
  748. },
  749. getBrowse() { // 倒计时
  750. this.countItem=this.processDatas[this.k];
  751. if(this.countItem==null){
  752. this.countItem={"process":0,"isLoad":false};
  753. this.process=0;
  754. }
  755. this.process=this.countItem.isLoad?100:0;
  756. if(this.interval==null){
  757. this.interval = setInterval(() => {
  758. if(this.showGuide){
  759. return;
  760. }
  761. if (this.process < 100) {
  762. if (this.isCounting) {
  763. this.process = this.process + 1;
  764. this.countItem.process=this.process;
  765. if(this.processDatas[this.k]!=undefined){
  766. this.processDatas.splice(this.k,1,this.countItem);
  767. }else{
  768. this.processDatas.push(this.countItem);
  769. }
  770. }
  771. }
  772. else {
  773. if(!this.countItem.isLoad){
  774. this.addIntegral();
  775. }
  776. clearInterval(this.interval);
  777. this.interval=null;
  778. this.countItem.isLoad=true;
  779. if(this.processDatas[this.k]!=undefined){
  780. this.processDatas.splice(this.k,1,this.countItem);
  781. }else{
  782. this.processDatas.push(this.countItem);
  783. }
  784. }
  785. }, 100);
  786. }
  787. },
  788. onProgress() {
  789. //console.log("------qxj onProgress");
  790. },
  791. timeupdate(){
  792. //console.log("------qxj onTimeupdate");
  793. },
  794. onLoadeddata() {
  795. console.log('------qxj 视频缓冲完成');
  796. },
  797. onVideoCanPlay() {
  798. console.log('------qxj 视频可以开始播放,但可能需要缓冲');
  799. },
  800. onVideoCanPlayThrough() {
  801. console.log('------qxj 视频可以无暂停地播放');
  802. },
  803. onLoadedMetadata(e) {
  804. //console.log("------qxj onLoadedMetadata");
  805. },
  806. endedPlayNext(){
  807. //console.log("------qxj endedPlayNext");
  808. },
  809. onWaiting(){
  810. ////console.log("------qxj onWaiting");
  811. //this.tapVideoHover("");
  812. },
  813. onError(){
  814. console.log("------qxj onError 当前视频播放出错");
  815. uni.showToast({title: "当前视频播放出错",icon: 'none',position:'bottom'});
  816. },
  817. showToast(title){
  818. uni.showToast({icon:'none',title: title ,duration:3000});
  819. },
  820. tapRedpacked(){
  821. },
  822. nextGuide(){
  823. console.log("qxj nextGuide");
  824. clearInterval(this.guideTimer);
  825. this.guideTimer=null;
  826. this.showGuide = false;
  827. uni.setStorageSync(this.step.name, 'true');
  828. uni.createVideoContext(this.dataList[this.k].id,this).pause();//暂停以后继续播放
  829. setTimeout(e=>{
  830. uni.switchTab({url: '/pages/index/index' });
  831. },500);
  832. }
  833. }
  834. }
  835. </script>
  836. <style scoped lang="scss">
  837. .animate-icon {
  838. width:70rpx;
  839. height:70rpx;
  840. transition-duration: 0.5s;
  841. transform:scale(1);
  842. transition-timing-function: linear;
  843. }
  844. .animate-scale{
  845. width:70rpx;
  846. height:70rpx;
  847. transition-duration: 0.5s;
  848. transform:scale(0.88);
  849. transition-timing-function: linear;
  850. }
  851. .emptybox {
  852. align-items: center;
  853. &-img {
  854. width: 320rpx;
  855. height: 240rpx;
  856. }
  857. &-tip {
  858. margin-top: 80rpx;
  859. font-size: 30rpx;
  860. color: gray;
  861. }
  862. }
  863. .view-animation{
  864. transition-duration: 0.2s;
  865. transition-property: height;
  866. }
  867. .search-box {
  868. box-sizing: border-box;
  869. border-radius: 10rpx;
  870. position: relative;
  871. overflow: hidden;
  872. }
  873. .container {
  874. background-color: #000000;
  875. }
  876. .item {
  877. /* width : 750rpx; */
  878. background-color: #000000;
  879. position: relative;
  880. }
  881. .videoHover {
  882. position: absolute;
  883. top: 0;
  884. left: 0;
  885. flex: 1;
  886. background-color: rgba(0, 0, 0, 0.1);
  887. justify-content: center;
  888. align-items: center;
  889. /* border-style: dashed;
  890. border-color: #DD524D;
  891. border-width: 1px; */
  892. }
  893. .playState {
  894. width: 80rpx;
  895. height: 80rpx;
  896. opacity: 0.9;
  897. }
  898. .userInfo {
  899. position: absolute;
  900. bottom: 80px;
  901. right: 10px;
  902. flex-direction: column;
  903. }
  904. .userAvatar {
  905. border-radius: 500%;
  906. margin-bottom: 15px;
  907. border-style: solid;
  908. border-width: 2px;
  909. border-color: #ffffff;
  910. }
  911. .userAvatar {
  912. width: 100rpx;
  913. height: 100rpx;
  914. }
  915. .likeIco,
  916. .shareIco,
  917. .commentIco {
  918. width: 60rpx;
  919. height: 60rpx;
  920. margin-top: 15px;
  921. }
  922. .likeNum,
  923. .commentNum,
  924. .shareTex {
  925. color: #ffffff;
  926. font-size: 30rpx;
  927. text-align: center;
  928. margin: 5px;
  929. }
  930. .likeNumActive {
  931. color: red;
  932. }
  933. .content {
  934. width: 610rpx;
  935. z-index: 99;
  936. position: absolute;
  937. bottom: 30px;
  938. /* background-color: #007AFF; */
  939. /* justify-content: center; */
  940. padding: 15rpx;
  941. flex-direction: column;
  942. justify-content: flex-start;
  943. color: #ffffff;
  944. }
  945. .userName {
  946. font-size: 30rpx;
  947. color: #ffffff;
  948. margin-top: 80upx;
  949. }
  950. .words {
  951. margin-top: 10rpx;
  952. font-size: 30rpx;
  953. color: #ffffff;
  954. }
  955. .root {
  956. background-color: #000000;
  957. /* background-color: #00ffff; */
  958. }
  959. .person {
  960. position: absolute;
  961. right: 0;
  962. height: 88rpx;
  963. }
  964. .person .num {
  965. background-color: rgba(255, 100, 3, 1);
  966. height: 58rpx;
  967. border-radius: 100rpx 0 0 100rpx;
  968. padding: 0 20rpx;
  969. }
  970. .right,.left {
  971. position: absolute;
  972. bottom: 180rpx;
  973. padding-bottom: env(safe-area-inset-bottom);
  974. }
  975. .right {
  976. right: 30rpx;
  977. bottom: 100rpx;
  978. }
  979. .right .item1 {
  980. width: 100rpx;
  981. }
  982. .right image {
  983. width: 100%;
  984. height: 100%;
  985. }
  986. .left {left: 20rpx;}
  987. .goods .icon,.goods .icon image {
  988. width: 290rpx;
  989. height: 290rpx;
  990. }
  991. .bg {
  992. /* background-image: url(/static/images/other/video/bg.png); */
  993. position: absolute;
  994. left: 0;
  995. top: 0;
  996. width: 100%;
  997. height: 74rpx;
  998. }
  999. .goods {
  1000. width: 330rpx;
  1001. background-color: rgba(255, 255, 255, 0.4);
  1002. padding: 20rpx;
  1003. border-radius: 20rpx;
  1004. margin-top: 20rpx;
  1005. }
  1006. .tabbar1{
  1007. position: absolute;
  1008. top: 0;
  1009. // padding-top: 44px;
  1010. z-index: 999;
  1011. // height:44px;
  1012. /* background-color:rgba(0,0,0,0.2) ; */
  1013. .tabbar1-box {
  1014. height: 44px;
  1015. position: relative;
  1016. }
  1017. .tabbar1-tit {
  1018. color: #fff;
  1019. font-size: 32rpx;
  1020. font-weight: 600;
  1021. flex-wrap: nowrap;
  1022. white-space: nowrap;
  1023. text-align: center;
  1024. }
  1025. }
  1026. .border1{
  1027. border-width: 1px;border-color: green;border-style: solid;
  1028. }
  1029. .border2{
  1030. border-width: 1px;border-color: yellow;border-style: solid;
  1031. }
  1032. .refresh {
  1033. display: flex;
  1034. flex-direction: row;
  1035. justify-content: center;
  1036. height: 50px;
  1037. }
  1038. .bottom {
  1039. position: absolute;
  1040. left: 0;
  1041. bottom: 60rpx;
  1042. right: 150rpx;
  1043. padding-bottom: env(safe-area-inset-bottom);
  1044. }
  1045. .txtTitle{
  1046. line-height: 20px;
  1047. /* 超出两行显示省略号,如果是text标签需要设置为1 */
  1048. color: #fff;
  1049. font-weight: 500;
  1050. font-size: 30rpx;
  1051. margin-left:20rpx;
  1052. }
  1053. .ellipsis{
  1054. lines:2;
  1055. /* 确保文本不会自动换行 */
  1056. /* white-space: nowrap; */
  1057. /* 设置文本溢出时显示省略号 */
  1058. text-overflow: ellipsis;
  1059. /* 限制显示的行数为2 */
  1060. overflow: hidden;
  1061. white-space: nowrap; /* 不换行 */
  1062. padding-right: 20px; /* 设置右边距为20px,实现末尾缩进 */
  1063. box-sizing: border-box; /* 包含padding在内的总宽度 */
  1064. }
  1065. .expandBtn{
  1066. position: absolute;
  1067. right: 0rpx;
  1068. bottom: 0rpx;
  1069. font-weight: 600;
  1070. color: #fff;
  1071. font-size: 30rpx;
  1072. /* background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 50%); */
  1073. }
  1074. .redpacked{
  1075. position: fixed;
  1076. width: 86rpx;
  1077. height: 86rpx;
  1078. top: 300rpx;
  1079. z-index: 999;
  1080. left: 30rpx;
  1081. background-color: rgba(0, 0, 0, 0.4);
  1082. }
  1083. .guide {
  1084. left: 0;
  1085. top: 0;
  1086. position: absolute;
  1087. z-index: 10001;
  1088. .guide-box {
  1089. position: absolute;
  1090. z-index: 10001;
  1091. background-color: rgba(0, 0, 0, 0.6);
  1092. // transition: all 0.2s;
  1093. .arrow {
  1094. width: 28rpx;
  1095. height: 28rpx;
  1096. background: #fff;
  1097. position: absolute;
  1098. top: 0;
  1099. left: 48rpx;
  1100. z-index: 10000;
  1101. transform: rotate(45deg);
  1102. }
  1103. .guide-step-tips {
  1104. width: 424rpx;
  1105. padding: 0 24rpx 24rpx 24rpx;
  1106. box-sizing: border-box;
  1107. border-radius: 12rpx;
  1108. background-color: #fff;
  1109. font-family: PingFang SC, PingFang SC;
  1110. font-weight: 400;
  1111. font-size: 26rpx;
  1112. color: #757575;
  1113. position: relative;
  1114. }
  1115. .tips {
  1116. position: absolute;
  1117. top: 0;
  1118. left: 0;
  1119. z-index: 10001;
  1120. .text {}
  1121. .tool-btn {
  1122. margin-top: 20rpx;
  1123. display: flex;
  1124. flex-direction: row;
  1125. align-items: center;
  1126. justify-content:space-between;
  1127. font-weight: 400;
  1128. font-size: 26rpx;
  1129. color: #757575;
  1130. .next {
  1131. width: 128rpx;
  1132. height: 68rpx;
  1133. line-height: 68rpx;
  1134. text-align: center;
  1135. background: #FF5C03;
  1136. border-radius: 8rpx 8rpx 8rpx 8rpx;
  1137. font-family: PingFang SC, PingFang SC;
  1138. font-weight: 400;
  1139. font-size: 26rpx;
  1140. color: #FFFFFF;
  1141. }
  1142. }
  1143. }
  1144. }
  1145. }
  1146. .liveguide {
  1147. display: flex;
  1148. flex-direction: column;
  1149. align-items: center;
  1150. justify-content: center;
  1151. flex: 1;
  1152. .phone_icon {
  1153. width: 144rpx;
  1154. height: 262rpx;
  1155. }
  1156. }
  1157. .hand_icon {
  1158. height: 177rpx;
  1159. width: 177rpx;
  1160. margin-top: -100rpx;
  1161. margin-left: 118rpx;
  1162. margin-bottom: 20rpx;
  1163. // animation: moveUpDown 1.8s ease-in-out infinite; /* 使用简写属性 */
  1164. // animation-name: moveUpDown;
  1165. // animation-duration: 1.8s;
  1166. // animation-timing-function: ease-in-out;
  1167. // animation-iteration-count: infinite;
  1168. // /* 以下是其他可选属性,默认值已设置 */
  1169. // animation-delay: 0s; /* 默认值 */
  1170. // animation-direction: normal; /* 默认值 */
  1171. // animation-fill-mode: none; /* 默认值 */
  1172. // animation-play-state: running; /* 默认值 */
  1173. }
  1174. .target {
  1175. transform: translateY(20px);
  1176. transition:transform .9s ;
  1177. }
  1178. .origin {
  1179. transform: translateY(0px);
  1180. transition-property:transform;
  1181. transition-duration: .9s;
  1182. }
  1183. .liveguide-tip {
  1184. font-family: PingFang SC, PingFang SC;
  1185. font-weight: 600;
  1186. font-size: 36rpx;
  1187. color: #ffffff !important;
  1188. }
  1189. </style>