index.vue 24 KB

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