index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908
  1. <template>
  2. <view class="vote-detail">
  3. <!-- 分享海报 -->
  4. <!-- <hch-poster ref="hchPoster" @cancel="handleCancel" :posterData.sync="posterData" @previewImage='previewImage' /> -->
  5. <!-- 活动查询 -->
  6. <view class="title">
  7. <image style="width: 158rpx;height: 158rpx;border-radius: 50%; " :src="voteDetail.logo" mode="">
  8. </image>
  9. <text class="title-text">{{voteDetail.project_name}}</text>
  10. <text class="title-btn">{{voteDetail.activity.title}}</text>
  11. </view>
  12. <!-- 分割线 -->
  13. <view style="width: 92%; height: 2rpx; background-color:#F0F0F0;margin: 40rpx auto; "></view>
  14. <!-- 排名 -->
  15. <view class="rank">
  16. <view class="vote-detail-btn">
  17. <view class="vote-detail-btn-item">
  18. <text class="vote-detail-btn-item-num">{{voteDetail.project_no}}</text>
  19. <text class="vote-detail-btn-item-text">编号</text>
  20. </view>
  21. <view style="width: 2rpx;height: 52rpx;background-color: #ccc;"></view>
  22. <view class="vote-detail-btn-item">
  23. <text class="vote-detail-btn-item-num"
  24. v-if="voteDetail.ticket_num>=0">{{voteDetail.ticket_num + voteDetail.virtual_ticket_num}}</text>
  25. <text class="vote-detail-btn-item-text">票数</text>
  26. </view>
  27. <view style="width: 2rpx;height: 52rpx;background-color: #ccc;"></view>
  28. <view class="vote-detail-btn-item">
  29. <text class="vote-detail-btn-item-num">{{voteDetail.rank}}</text>
  30. <text class="vote-detail-btn-item-text">排名</text>
  31. </view>
  32. <view style="width: 2rpx;height: 52rpx;background-color: #ccc;"></view>
  33. <view class="vote-detail-btn-item">
  34. <text class="vote-detail-btn-item-num">{{voteDetail.next_rank_ticket_num}}</text>
  35. <text class="vote-detail-btn-item-text">距上名</text>
  36. </view>
  37. </view>
  38. </view>
  39. <!-- 轮播图 -->
  40. <view style="background-color: #f9f9f9;">
  41. <view class="swiper">
  42. <view class="home-swiper">
  43. <uni-swiper-dot :mode="mode" :info="info" :current="current1" :dots-styles="dotsStyles">
  44. <swiper class="swiper-box" @change="change1" circular>
  45. <swiper-item v-for="(item ,index) in info" :key="index" v-if="resource_type == 1 ">
  46. <view class="swiper-item">
  47. <image style="width: 100%;height:576rpx; border-radius: 12rpx; " :src="item.img"
  48. mode="aspectFill"></image>
  49. </view>
  50. </swiper-item>
  51. <swiper-item v-if="resource_type == 2 ">
  52. <view class="swiper-item">
  53. <video id="myVideo" ref="myVideo"
  54. style="width: 100%; height: 576rpx;border-radius: 12rpx; " :src="video_url"
  55. controls :enable-progress-gesture="false">
  56. </video>
  57. </view>
  58. </swiper-item>
  59. </swiper>
  60. </uni-swiper-dot>
  61. </view>
  62. </view>
  63. <!-- 投票 -->
  64. <view class="btn" @click="goVote(activity_project_id)">
  65. <view v-if="spending || isStart" class="btn-vote"
  66. :class="spending?'btn-vote': isStart?'btn-vote-fasle' :'' ">
  67. <text>投票</text>
  68. </view>
  69. <view class="btn-vote-fasle" v-if="isEnd">
  70. <text>投票结束</text>
  71. </view>
  72. </view>
  73. <!-- 帮我拉票 -->
  74. <view class="help">
  75. <!-- <view class="help-btn" @click="getPoster">
  76. <text>帮我拉票</text>
  77. </view> -->
  78. <view class="help-btn" @click="showPoster">
  79. <text>帮我拉票</text>
  80. </view>
  81. </view>
  82. <movable-area class="movableArea">
  83. <movable-view class="movableView" direction="all" x="630rpx" y="700rpx">
  84. <view class="img-IHg" @click="goJoin">
  85. <image style="width: 64rpx; height: 58rpx; " src="/static/icon/vip.png" mode=""></image>
  86. </view>
  87. </movable-view>
  88. </movable-area>
  89. <!-- 分割线 -->
  90. <view style="width: 92%; height: 2rpx; background-color:#F0F0F0;margin: 64rpx auto; "></view>
  91. <!-- 介绍 -->
  92. <view class="introduce">
  93. <view class="introduce-title">
  94. <text>参赛介绍</text>
  95. </view>
  96. <view class="introduce-text" v-html="voteDetail.intro"></view>
  97. </view>
  98. <!-- 预约 -->
  99. <view class="reserve">
  100. <view class="reserve-left" @click="goSwiperSmall">
  101. <image style="width: 36rpx;height: 36rpx; margin-right: 10rpx;" src="/static/icon/reserve02.png"
  102. mode=""></image>
  103. <text>预约</text>
  104. </view>
  105. <view class="reserve-right" @click="goJoin">
  106. <image style="width: 60rpx;height: 56rpx; margin-right: 4rpx; " src="/static/icon/reserve01.png"
  107. mode=""></image>
  108. <text>加入IHG会员</text>
  109. </view>
  110. </view>
  111. </view>
  112. <!-- 弹出层 -->
  113. <uni-popup ref="popup" type="center">
  114. <view class="pop">
  115. <view class="title"><text>投票成功</text></view>
  116. <view class="img" v-if="is_prize==0">
  117. <image :src="voteDetail.activity.success_img"></image>
  118. </view>
  119. <view class="img" v-if="is_prize==1">
  120. <image :src="voteDetail.activity.success_img"></image>
  121. </view>
  122. <view class="textfont">
  123. <text v-if="!isVoteNum && is_prize==0">今日投票数已用完
  124. 点击 加入IHG会员 可享受额外{{vipRewardTicketNum}}票数</text>
  125. <text v-if="isVoteNum && is_prize==0 ">今日投票数还有 {{userCanVoteNum}} 次
  126. 点击再次投票可再次为本项目投票也可为其他项目投票</text>
  127. <text v-if="is_prize==1">恭喜你中奖了!
  128. 获得了{{prizeProduct}}的奖品,请尽快领取</text>
  129. </view>
  130. <view class="btn">
  131. <view v-if="is_prize==0" class="cancel"
  132. @click="isVoteNum?voteAgain(activity_project_id):closeVote()">
  133. <text>{{isVoteNum?'再次投票':'关闭'}}</text>
  134. </view>
  135. <view v-if="is_prize==0" class="download" @click="isVoteNum?goOtherItem():goJoin()">
  136. <text>{{isVoteNum?'其他项目':'加入IHG会员'}}</text>
  137. </view>
  138. <view v-if="is_prize==1" class="cancel" @click="closeVote">
  139. <text>关闭</text>
  140. </view>
  141. <view v-if="is_prize==1" class="download" @click="goConvert">
  142. <text>去兑换</text>
  143. </view>
  144. </view>
  145. </view>
  146. </uni-popup>
  147. <!-- <canvas :style="{height: pupopHeight + 'px',width: pupopWidth + 'px'}" canvas-id="myCanvas"></canvas>
  148. <uni-popup ref="popup" type="center">
  149. <view class="popup-wrap">
  150. <view class="popup-head">
  151. 生成海报
  152. <view @click="close_popup()" class="close_icon"></view>
  153. </view>
  154. <image :src="posterImg" mode=""></image>
  155. <view class="popup-footer">
  156. <button class="save-btn" @click="saveToLocal()" type="default">保存到相册</button>
  157. <view class="tips">保存图片到相册,你就可以分享啦!</view>
  158. </view>
  159. </view>
  160. </uni-popup>
  161. -->
  162. <Poster ref="poster" :name="voteDetail.project_name" :title="voteDetail.activity.title"/>
  163. </view>
  164. </template>
  165. <script>
  166. // import HchPoster from "@/components/hch-poster/hch-poster.vue"
  167. import Poster from "./poster.vue";
  168. export default {
  169. components:{Poster},
  170. data() {
  171. return {
  172. pageControl:{
  173. isPosterShow:false,
  174. },
  175. pupopWidth: 590,
  176. pupopHeight: 788,
  177. //一定要注意像素密度的问题,这里使用的固定数值
  178. pixelRatio: 3, //屏幕像数密度
  179. inviteQR: '', //动态二维码
  180. posterImg: '', //最后生成的海报
  181. //二维码
  182. codeImg: '',
  183. //投票是否中奖,1中奖,0未中奖
  184. is_prize: '',
  185. //中奖礼物
  186. prizeProduct: '',
  187. //banner视频路径
  188. video_url: '',
  189. //banner图展示视频或者图片
  190. resource_type: '',
  191. //跳转h5和小程序
  192. jump_type: '',
  193. jump_config: '',
  194. //跳转vip小程序获得投票数
  195. vipRewardTicketNum: '',
  196. //活动id
  197. sourceId: '',
  198. //活动可以使用的投票数
  199. userCanVoteNum: '',
  200. isVoteNum: false,
  201. //判断活动是否正在进行中
  202. spending: false,
  203. //判断活动是否开始
  204. isStart: false,
  205. //判断活动是否结束
  206. isEnd: false,
  207. //活动开始时间
  208. startTime: '',
  209. //活动结束时间
  210. endTime: "",
  211. // 活动项目id
  212. activity_project_id: '',
  213. // 活动项目详情
  214. voteDetail: '',
  215. //轮播图
  216. info: [],
  217. dotsStyles: {
  218. backgroundColor: 'rgba(255, 255, 255, .3)',
  219. border: '1px rgba(255, 255, 255, .3) solid',
  220. color: '#fff',
  221. selectedBackgroundColor: 'rgba(255, 255, 255, 1)',
  222. selectedBorder: '1px rgba(255, 255, 255, 1) solid'
  223. },
  224. //指示点显示位置
  225. current1: 0,
  226. mode: 'dot'
  227. }
  228. },
  229. onReady: function(res) {
  230. this.videoContext = uni.createVideoContext('myVideo')
  231. },
  232. onLoad(op) {
  233. this.activity_project_id = op.id
  234. this.getDetail(op.id)
  235. this.admin = this.$store.getters.userInfo
  236. console.log(this.admin);
  237. // //海报
  238. // this.pupopWidth = this.pupopWidth * this.pixelRatio
  239. // this.pupopHeight = this.pupopHeight * this.pixelRatio
  240. },
  241. watch: {
  242. vipRewardTicketNum: {
  243. handler(newName, oldName) {
  244. console.log(newName, '--->监听')
  245. },
  246. immediate: true,
  247. deep: true
  248. }
  249. },
  250. methods: {
  251. shareing() {
  252. uni.showLoading({
  253. title: "海报生成中...",
  254. mask: true
  255. })
  256. // this.inviteQR = this.codeImg
  257. // this.createPoster();
  258. },
  259. //去兑换页面
  260. goConvert() {
  261. uni.navigateTo({
  262. url: '/pages/my/prize/prize',
  263. fail:(err)=>{
  264. console.log(err)
  265. }
  266. })
  267. },
  268. //视频自动播放
  269. openVideoPlay() {
  270. this.videoContext.play()
  271. },
  272. //隐藏
  273. handleCancel() {
  274. console.log('取消审生成海报');
  275. },
  276. //生产海报
  277. getPoster() {
  278. this.$refs.hchPoster.posterShow()
  279. },
  280. // 切换轮播图指示点
  281. change1(e) {
  282. this.current1 = e.detail.current;
  283. },
  284. getDetail(id) {
  285. this.$api.active.getActiveProjectDetail({
  286. activity_project_id: id
  287. }).then(res => {
  288. console.log(res, "detail")
  289. if (res.code == 0) {
  290. this.voteDetail = res.data
  291. console.log(this.voteDetail)
  292. this.startTime = res.data.activity.start_time.replace(/-/g, "/")
  293. // “yyyy-MM-dd-hh-mm-ss”.replace(/-/g,"/")
  294. this.endTime = res.data.activity.end_time.replace(/-/g, "/")
  295. console.log(this.startTime, this.endTime);
  296. this.cancelTime(this.startTime, this.endTime)
  297. //活动可以使用的投票数
  298. this.userCanVoteNum = res.data.user_can_vote_num
  299. if (this.userCanVoteNum > 0) {
  300. this.isVoteNum = true
  301. } else {
  302. this.isVoteNum = false
  303. }
  304. this.sourceId = res.data.id
  305. //跳转vip小程序获得投票数
  306. this.vipRewardTicketNum = res.data.activity.vip_reward_ticket_num
  307. // this.info =JSON.parse( res.data.img_urls)
  308. this.info = JSON.parse(res.data.img_urls).map(item => {
  309. return {
  310. img: item
  311. }
  312. })
  313. //跳转h5和小程序
  314. this.jump_type = res.data.jump_type,
  315. this.jump_config = res.data.jump_config
  316. //banner展示视频或者图片
  317. this.resource_type = res.data.resource_type
  318. this.video_url = res.data.video_url
  319. console.log(this.resource_type, this.video_url, '--->this.video_url');
  320. //视频自动播放
  321. this.openVideoPlay()
  322. //海报图片
  323. // this.posterData.mainImg = res.data.share_img
  324. // this.codeImg = res.data.qrcode_url
  325. }
  326. })
  327. },
  328. //轮播图跳转h5或者小程序和内部页面
  329. goSwiperSmall() {
  330. //跳转h5
  331. if (this.jump_type == 1) {
  332. const url = this.jump_config; // 跳转的外链
  333. const navtitle = 'H5'; // 这个标题是你自己可以设置的
  334. uni.navigateTo({
  335. // 跳转到webview页面
  336. url: `/pages/webview/webview?url=${url}&nav=${navtitle}`,
  337. success: () => {
  338. console.log('成功')
  339. },
  340. fail: (e) => {
  341. console.log(e, "失败")
  342. }
  343. });
  344. } else if (this.jump_type == 2) {
  345. let obj = JSON.parse(this.jump_config);
  346. wx.navigateToMiniProgram({
  347. appId: `${obj.appid}`, //appid
  348. path: `${obj.path}`, //path
  349. extraData: { //参数
  350. foo: 'bar'
  351. },
  352. // envVersion: 'develop', //开发版develop 开发版 trial 体验版 release 正式版
  353. success(res) {
  354. console.log('成功')
  355. // 打开成功
  356. },
  357. fail(e) {
  358. console.log(e, '失败')
  359. }
  360. })
  361. } else if (this.jump_type == 4) {
  362. let obj = this.jump_config
  363. uni.switchTab({
  364. url: `${obj}`,
  365. success: function(e) { //跳转成功后刷新页面
  366. var page = getCurrentPages().pop();
  367. if (page == undefined || page == null) return;
  368. page.onLoad();
  369. }
  370. })
  371. }
  372. },
  373. cancelTime(i, j) {
  374. let nowtime = new Date() //获取当前时间
  375. let startime = new Date(i) //活动开始时间
  376. let endtime = new Date(j); //活动结束时间
  377. let lefttime = endtime.getTime() - nowtime.getTime() //距离结束时间的毫秒数
  378. let spendtime = nowtime.getTime() - startime.getTime() //距离结束时间的毫秒数
  379. console.log(lefttime, '---->lefttime');
  380. console.log(spendtime, '---->spendtime');
  381. if (lefttime > 0 && spendtime > 0) {
  382. //活动进行中
  383. this.spending = true
  384. } else if (lefttime < 0) {
  385. //活动结束
  386. this.isEnd = true
  387. } else if (spendtime < 0) {
  388. //活动未开始
  389. this.isStart = true
  390. }
  391. },
  392. // 打开弹出层
  393. openVote() {
  394. this.$refs.popup.open()
  395. },
  396. // 关闭弹出层
  397. closeVote() {
  398. this.$refs.popup.close()
  399. },
  400. //再次投票
  401. voteAgain(id) {
  402. this.goVote(id)
  403. },
  404. //跳转其他项目
  405. goOtherItem() {
  406. uni.navigateBack()
  407. },
  408. //获取当前页面路径
  409. getPageUrl() {
  410. const pages = getCurrentPages();
  411. console.log(pages, '--------->pages')
  412. if (pages.length == 1) {
  413. const currentPage = pages[0];
  414. let pageUrl = `/${currentPage.route}`;
  415. return pageUrl
  416. console.log('当前页面url:', pageUrl);
  417. } else {
  418. const currentPage = pages[pages.length - 1];
  419. let pageUrl = `/${currentPage.route}`;
  420. return pageUrl
  421. console.log('当前页面url:', pageUrl);
  422. }
  423. },
  424. // 跳转其他小程序
  425. goJoin() {
  426. let _this = this
  427. wx.navigateToMiniProgram({
  428. appId: 'wx255b58f0992b3c53', //appid
  429. path: 'newUIMain/enrollment/enrollment', //path
  430. extraData: { //参数
  431. foo: 'bar'
  432. },
  433. // envVersion: 'develop', //开发版develop 开发版 trial 体验版 release 正式版
  434. success(res) {
  435. let page = _this.getPageUrl()
  436. let user_id = ''
  437. if (_this.admin != null) {
  438. user_id = _this.admin.id
  439. } else {
  440. user_id = 0
  441. }
  442. console.log('成功', page)
  443. _this.$api.my.userMemberAdd({
  444. user_id,
  445. page,
  446. }).then(res => {
  447. console.log(res.data);
  448. })
  449. //增加票数
  450. _this.$api.my.userJoinVip({
  451. source_type: 1,
  452. source_id: _this.sourceId
  453. }).then(res => {
  454. console.log('-->res', res)
  455. })
  456. // 打开成功
  457. },
  458. fail(e) {
  459. console.log(e, '失败')
  460. }
  461. })
  462. },
  463. // 投票
  464. goVote(id) {
  465. this.$api.active.vote({
  466. activity_project_id: id
  467. }).then(res => {
  468. console.log(res, '投票')
  469. if (res.code == 0) {
  470. /**
  471. * 中奖用例
  472. * 数据由接口文档提供
  473. *
  474. *
  475. res = {
  476. data: {
  477. "is_prize": 1,
  478. "integral": 0,
  479. "product": {
  480. "id": 1,
  481. "type": 1,
  482. "hotel_id": 1,
  483. "cover_img": "",
  484. "banners": "",
  485. "name": "测试产品",
  486. "category_id": 1,
  487. "details": "测试产品",
  488. "price": 10,
  489. "integral": 0,
  490. "stock": 0,
  491. "attr_group": "[{\"attr_group_id\":1,\"attr_group_name\":\"口味\",\"attr_list\":[{\"attr_id\":1,\"attr_name\":\"五仁\",\"icon\":\"url1\"},{\"attr_id\":2,\"attr_name\":\"豆沙\",\"icon\":\"url2\"}]},{\"attr_group_id\":2,\"attr_group_name\":\"重量\",\"attr_list\":[{\"attr_id\":3,\"attr_name\":\"100g\",\"icon\":\"url3\"},{\"attr_id\":4,\"attr_name\":\"200g\",\"icon\":\"url4\"}]}]",
  492. "created_at": "2022-11-23 18:09:06",
  493. "updated_at": "2022-11-23 23:35:26"
  494. }
  495. }
  496. }
  497. */
  498. this.is_prize = res.data.is_prize
  499. if (this.is_prize == 1) {
  500. this.prizeProduct = res.data.product.name
  501. }
  502. this.openVote()
  503. this.getDetail(this.activity_project_id)
  504. } else {
  505. if (res.msg.length > 7) {
  506. uni.showToast({
  507. icon: 'none',
  508. title: res.msg
  509. })
  510. } else {
  511. uni.showToast({
  512. icon: 'error',
  513. title: res.msg
  514. })
  515. }
  516. }
  517. }).catch(err => {
  518. console.log(err)
  519. uni.showToast({
  520. icon: 'none',
  521. title: '投票失败'
  522. })
  523. })
  524. },
  525. //帮我拉票
  526. showPoster(){
  527. /**
  528. * 注意这里的图片接口好像有问题 .activity.cover_img信息
  529. * 报错内容:{"errMsg":"getImageInfo:fail invalid"}
  530. * 可能是图片域名不在微信开发者白名单
  531. * 添加不校验规则依然报错
  532. * 核实后取消下方注释即可
  533. */
  534. this.$refs.poster.show({
  535. name: this.voteDetail.project_name,
  536. title: this.voteDetail.activity.title,
  537. imgUrl: this.voteDetail.share_img,
  538. qrcodeUrl: this.voteDetail.qrcode_url,
  539. })
  540. console.log(this.voteDetail)
  541. }
  542. }
  543. }
  544. </script>
  545. <style lang="scss" scoped>
  546. $pageColor:#F9F9F9;
  547. $bgColor:#FFFFFF;
  548. @mixin flexlayout {
  549. display: flex;
  550. align-items: center;
  551. justify-content: center;
  552. }
  553. page {
  554. height: 100% !important;
  555. background: #F9F9F9 !important;
  556. }
  557. .vote-detail {
  558. height: 100%;
  559. background: #F9F9F9;
  560. }
  561. .reserve {
  562. // position: fixed;
  563. // bottom: 0;
  564. width: 100%;
  565. height: 148rpx;
  566. padding: 0 30rpx;
  567. background-color: #fff;
  568. display: flex;
  569. align-items: center;
  570. justify-content: space-between;
  571. font-size: 30rpx;
  572. color: #fff;
  573. font-weight: bold;
  574. .reserve-left {
  575. width: 204rpx;
  576. height: 92rpx;
  577. background: linear-gradient(270deg, #FF6200 0%, #FF9342 100%);
  578. border-radius: 12rpx;
  579. display: flex;
  580. align-items: center;
  581. justify-content: center;
  582. }
  583. .reserve-right {
  584. width: 466rpx;
  585. height: 92rpx;
  586. background: linear-gradient(270deg, #FF6200 0%, #FF9342 100%);
  587. border-radius: 12rpx;
  588. display: flex;
  589. align-items: center;
  590. justify-content: center;
  591. }
  592. }
  593. .introduce {
  594. padding: 0 30rpx;
  595. margin-bottom: 102rpx;
  596. .introduce-title {
  597. font-size: 32rpx;
  598. font-weight: bold;
  599. color: #333;
  600. display: flex;
  601. align-items: center;
  602. justify-content: center;
  603. }
  604. .introduce-text {
  605. margin-top: 44rpx;
  606. // line-height: 40rpx;
  607. color: #333333;
  608. // font-size: 28rpx;
  609. }
  610. }
  611. .help {
  612. padding: 0 30rpx;
  613. margin-top: 30rpx;
  614. position: relative;
  615. .help-btn {
  616. height: 108rpx;
  617. background: #F9F9F9;
  618. border-radius: 14rpx;
  619. border: 2rpx solid #FF6200;
  620. display: flex;
  621. align-items: center;
  622. justify-content: center;
  623. color: #FF6200;
  624. font-weight: bold;
  625. font-size: 30rpx;
  626. }
  627. .img-IHg {
  628. width: 84rpx;
  629. height: 84rpx;
  630. background-color: #fff;
  631. box-shadow: 0px 8rpx 24rpx 0px rgba(220, 222, 229, 0.4);
  632. border-radius: 50%;
  633. display: flex;
  634. align-items: center;
  635. justify-content: center;
  636. position: fixed;
  637. // top: -28rpx;
  638. // right: 14rpx;
  639. top: 1030rpx;
  640. right: 30rpx;
  641. z-index: 99;
  642. }
  643. }
  644. .btn {
  645. padding: 0 30rpx;
  646. margin-top: 48rpx;
  647. .btn-vote {
  648. height: 108rpx;
  649. background: linear-gradient(338deg, #FF6200 0%, #FF9D4F 100%);
  650. border-radius: 12rpx;
  651. display: flex;
  652. align-items: center;
  653. justify-content: center;
  654. color: #FFFFFF;
  655. font-size: 30rpx;
  656. font-weight: bold;
  657. }
  658. .btn-vote-fasle {
  659. height: 108rpx;
  660. background: #CCCCCC;
  661. border-radius: 12rpx;
  662. display: flex;
  663. align-items: center;
  664. justify-content: center;
  665. color: #FFFFFF;
  666. font-size: 30rpx;
  667. font-weight: bold;
  668. }
  669. }
  670. .swiper {
  671. padding: 0 30rpx;
  672. margin-top: 64rpx;
  673. }
  674. .home-swiper {
  675. height: 576rpx;
  676. .swiper-box {
  677. height: 576rpx;
  678. }
  679. }
  680. .title {
  681. padding-top: 30rpx;
  682. display: flex;
  683. flex-direction: column;
  684. align-items: center;
  685. justify-content: center;
  686. .title-text {
  687. margin: 32rpx 0 16rpx;
  688. font-size: 40rpx;
  689. font-weight: bold;
  690. color: #333;
  691. }
  692. .title-btn {
  693. color: #FF6200;
  694. font-size: 28rpx;
  695. }
  696. }
  697. .rank {
  698. padding: 0 30rpx;
  699. }
  700. .vote-detail-btn {
  701. height: 190rpx;
  702. background-color: #fff;
  703. box-shadow: 0px 20rpx 40rpx 0px rgba(220, 222, 229, 0.4);
  704. border-radius: 16rpx;
  705. display: flex;
  706. align-items: center;
  707. justify-content: space-around;
  708. .vote-detail-btn-item {
  709. display: flex;
  710. flex-direction: column;
  711. align-items: center;
  712. justify-content: space-between;
  713. font-size: 28rpx;
  714. color: #333;
  715. .vote-detail-btn-item-num {
  716. font-size: 44rpx;
  717. font-weight: bold;
  718. }
  719. .vote-detail-btn-item-text {
  720. margin-top: 20rpx;
  721. }
  722. }
  723. }
  724. .pop {
  725. width: 640rpx;
  726. height: 740rpx;
  727. background: #FFFFFF;
  728. border-radius: 20rpx;
  729. padding-top: 32rpx;
  730. box-sizing: border-box;
  731. .title {
  732. @include flexlayout();
  733. margin-bottom: 32rpx;
  734. text {
  735. font-size: 34rpx;
  736. font-family: PingFangSC-Medium, PingFang SC;
  737. font-weight: 500;
  738. color: #FF7119;
  739. }
  740. }
  741. .img {
  742. margin-left: 48rpx;
  743. width: 544rpx;
  744. height: 306rpx;
  745. background: $bgColor;
  746. border-radius: 12rpx;
  747. @include flexlayout();
  748. margin-bottom: 32rpx;
  749. image {
  750. width: 544rpx;
  751. height: 306rpx;
  752. border-radius: 12rpx;
  753. }
  754. }
  755. .textfont {
  756. margin-left: 30rpx;
  757. margin-bottom: 40rpx;
  758. @include flexlayout();
  759. width: 572rpx;
  760. height: 106rpx;
  761. text {
  762. text-align: center;
  763. font-size: 34rpx;
  764. font-weight: 400;
  765. color: #828282;
  766. }
  767. }
  768. .btn {
  769. width: 100%;
  770. height: 110rpx;
  771. display: flex;
  772. align-items: center;
  773. .cancel {
  774. @include flexlayout();
  775. width: 50%;
  776. height: 100%;
  777. border-top: #E5E5E5 solid 1rpx;
  778. border-right: #E5E5E5 solid 1rpx;
  779. text {
  780. font-size: 32rpx;
  781. font-family: PingFangSC-Medium, PingFang SC;
  782. font-weight: 500;
  783. color: #666666;
  784. }
  785. }
  786. .download {
  787. border-top: #E5E5E5 solid 1rpx;
  788. // border-left:#E5E5E5 solid 0.3rpx;
  789. @include flexlayout();
  790. height: 100%;
  791. width: 50%;
  792. text {
  793. font-size: 32rpx;
  794. font-family: PingFangSC-Medium, PingFang SC;
  795. font-weight: 500;
  796. color: #FF7119;
  797. }
  798. }
  799. }
  800. }
  801. .movableArea {
  802. position: fixed;
  803. top: 0;
  804. left: 0;
  805. width: 100%;
  806. height: 100%;
  807. pointer-events: none; //设置area元素不可点击,则事件便会下移至页面下层元素
  808. .movableView {
  809. pointer-events: auto; //可以点击
  810. width: 84rpx;
  811. height: 84rpx;
  812. padding: 0 30rpx;
  813. .img-IHg {
  814. width: 84rpx;
  815. height: 84rpx;
  816. background-color: #fff;
  817. box-shadow: 0px 8rpx 24rpx 0px rgba(220, 222, 229, 0.4);
  818. border-radius: 50%;
  819. display: flex;
  820. align-items: center;
  821. justify-content: center;
  822. }
  823. }
  824. }
  825. </style>