index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. <template>
  2. <view>
  3. <image src="https://apps.yiqucbb.cn/h5/tipImg1.png" style="width: 750rpx;height: 100%;" mode="widthFix"></image>
  4. <image src="https://apps.yiqucbb.cn/h5/tipImg2.png" style="width: 750rpx;height: 100%;" mode="widthFix"></image>
  5. <image src="https://apps.yiqucbb.cn/h5/tipImg3.png" style="width: 750rpx;height: 100%;" mode="widthFix"></image>
  6. <image src="https://apps.yiqucbb.cn/h5/tipImg4.png" style="width: 750rpx;height: 100%;" mode="widthFix"></image>
  7. <!-- <view class="app-bg">
  8. <image src="/static/img/tream_bg.png"></image>
  9. </view>
  10. <uni-nav-bar color="#fff" :border="false" statusBar backgroundColor="transparent" fixed title="我的会馆"></uni-nav-bar>
  11. <view class="swiper-img" id="app-top">
  12. <u-swiper
  13. :list="topData.banner"
  14. keyName="img"
  15. bgColor="transparent"
  16. indicator
  17. indicatorActiveColor="#DB292B"
  18. indicatorInactiveColor="#B7B7B7"
  19. previousMargin="15"
  20. nextMargin="15"
  21. indicatorMode="line"
  22. ></u-swiper>
  23. </view> -->
  24. <!-- <view class="app-body" v-if="user != null">
  25. <view class="pannel fx-r fx-bc fx-ac" v-if="sysData.is_audit == 0">
  26. <view class="item fx-h fx-bc fx-ac" @tap="tapOpen" data-url="/pages/user/detail/integral">
  27. <view class="count">{{ user != null ? user.integral : 0 }}</view>
  28. <view class="label">趣豆</view>
  29. </view>
  30. <view class="line"></view>
  31. <view class="item fx-h fx-bc fx-ac">
  32. <view class="count">{{ user != null ? user.total_earnings : 0 }}</view>
  33. <view class="label">我的收益</view>
  34. </view>
  35. <view class="line"></view>
  36. <view class="item fx-h fx-bc fx-ac" @tap="tapOpen" data-url="/pages/user/detail/anticipate">
  37. <view class="count">{{ user != null ? user.anticipate : 0 }}</view>
  38. <view class="label">易趣卷</view>
  39. </view>
  40. </view>
  41. <view class="team-buy" v-if="data.guData != null">
  42. <view class="team-show">
  43. <view class="bg">
  44. <image src="../../static/ad/team-bg.png" mode="aspectFill"></image>
  45. <view class="h"></view>
  46. </view>
  47. <view class="body fx-h fx-bc fx-ac">
  48. <view class="top-input">
  49. <image src="/static/img/team-top-title.png" class="tbg"></image>
  50. <view class="inner fx-r fx-bc fx-ac">
  51. <image src="/static/img/team-top-location.png"></image>
  52. <view class="label">{{ data.guData.name }}</view>
  53. </view>
  54. </view>
  55. <view class="info fx-r fx-g1 fx-bc fx-ac">
  56. <view class="item fx-h fx-bc fx-ac">
  57. <view class="label" v-if="data.guData.status == 1">开放中</view>
  58. <view class="label" style="color: red;" v-else>闭馆中</view>
  59. <view class="name">状态</view>
  60. </view>
  61. <view class="halving"></view>
  62. <view class="item fx-h fx-bc fx-ac">
  63. <view class="label">{{ data.guData.nickname }}</view>
  64. <view class="name">部门总监</view>
  65. </view>
  66. <view class="halving"></view>
  67. <view class="item fx-h fx-bc fx-ac">
  68. <view class="people fx-r">
  69. <image :src="index == 0 ? '/static/img/hong_people.png' : '/static/img/while_people.png'" v-for="(item,index) in 5"></image>
  70. </view>
  71. <view class="name">流畅</view>
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. <view class="venue-list" v-if="data.auction != null">
  78. <view class="item" v-for="(item,index) in data.auction">
  79. <view class="top-info fx-r">
  80. <view class="avatar">
  81. <image :src="item.image" mode="aspectFill"></image>
  82. </view>
  83. <view class="info">
  84. <view class="title">{{ item.nickname }}</view>
  85. <view class="time fx-r fx-bc" v-if="item.is_today">
  86. <image src="/static/img/c-time.png"></image>
  87. 开售:{{ utils.date('H:i:s',item.radd_time + item.in_time) }}
  88. </view>
  89. <view class="time fx-r fx-bc" v-else>
  90. <image src="/static/img/c-time.png"></image>
  91. 场次时间:{{ item.next_day || "无" }}
  92. </view>
  93. </view>
  94. </view>
  95. <view class="yinfo fx-r">
  96. <view class="y-time">预约时间:
  97. <text v-if="item.add_time > 0">
  98. {{ utils.date('H:i',item.add_time) }}-{{ utils.date('H:i',item.end_time) }}
  99. </text>
  100. </view>
  101. <view class="fx-g1"></view>
  102. <view class="y-time">入场时间:
  103. <text>
  104. {{ utils.date('H:i',item.radd_time) }}-{{ utils.date('H:i',item.rend_time) }}
  105. </text>
  106. </view>
  107. </view>
  108. <view class="yfoot fx-r fx-bc" v-if="item.showType == 0">
  109. <view class="time1 fx-r" style="color: #787878;">预约时间:{{ utils.date('m-d H:i',item.add_time) }}</view>
  110. <view class="fx-g1"></view>
  111. <view class="sbtn-no">未到预约时间</view>
  112. </view>
  113. <view class="yfoot fx-r fx-bc" v-if="item.showType == 1">
  114. <view class="time1 fx-r">
  115. 距预约结束:<countdown :startTime="utils.date('Y-m-d H:i:s')" :endTime="utils.date('Y-m-d H:i:m',item.end_time)" />
  116. </view>
  117. <view class="fx-g1"></view>
  118. <view class="sbtn" v-if="item.booking_count <= 0" @tap="tapBooking(item)">立即预约</view>
  119. <view class="sbtn-no" v-else>已预约</view>
  120. </view>
  121. <view class="yfoot fx-r fx-bc" v-if="item.showType == 2">
  122. <view class="time1 fx-r" style="color: #787878;">入场时间:{{ utils.date('m-d H:i',item.radd_time) }}</view>
  123. <view class="fx-g1"></view>
  124. <view class="sbtn-no">未到入场时间</view>
  125. </view>
  126. <view class="yfoot fx-r fx-bc" v-if="item.showType == 3">
  127. <template v-if="item.booking_count > 0">
  128. <view class="time1 fx-r" v-if=" item.radd_time >= utils.strtotime() && utils.strtotime() < (item.radd_time + item.in_time) ">
  129. 距入场时间:<countdown :startTime="utils.date('Y-m-d H:i:s')" :endTime="utils.date('Y-m-d H:i:s',item.radd_time)" />
  130. </view>
  131. <view class="time1 fx-r" v-if=" (item.radd_time + item.in_time) >= utils.strtotime() && utils.strtotime() < item.rend_time ">
  132. 距开售时间:<countdown :startTime="utils.date('Y-m-d H:i:s')" :endTime="utils.date('Y-m-d H:i:s',(item.radd_time + item.in_time))" />
  133. </view>
  134. <view class="time1 fx-r" v-if=" item.rend_time >= utils.strtotime() && utils.strtotime() > (item.radd_time + item.in_time) ">
  135. 距结束:<countdown :startTime="utils.date('Y-m-d H:i:s')" :endTime="utils.date('Y-m-d H:i:s',item.rend_time)" />
  136. </view>
  137. <view class="fx-g1"></view>
  138. <view class="sbtn" @tap="tapItem(item)">立即进入</view>
  139. </template>
  140. <template v-if="item.booking_count == 0">
  141. <view class="time1 fx-r" v-if=" item.radd_time >= utils.strtotime() && utils.strtotime() < (item.radd_time + item.in_time) ">
  142. 距入场时间:<countdown :startTime="utils.date('Y-m-d H:i:s')" :endTime="utils.date('Y-m-d H:i:s',item.radd_time)" />
  143. </view>
  144. <view class="time1 fx-r" v-if=" (item.radd_time + item.in_time) >= utils.strtotime() && utils.strtotime() < item.rend_time ">
  145. 距开售时间:<countdown :startTime="utils.date('Y-m-d H:i:s')" :endTime="utils.date('Y-m-d H:i:s',(item.radd_time + item.in_time))" />
  146. </view>
  147. <view class="time1 fx-r" v-if=" item.rend_time >= utils.strtotime() && utils.strtotime() > (item.radd_time + item.in_time) ">
  148. 距结束:<countdown :startTime="utils.date('Y-m-d H:i:s')" :endTime="utils.date('Y-m-d H:i:s',item.rend_time)" />
  149. </view>
  150. <view class="fx-g1"></view>
  151. <view class="sbtn-no">未预约无法入场</view>
  152. </template>
  153. </view>
  154. </view>
  155. </view>
  156. </view>
  157. <view v-else :style="'height:60vh;'" class="user-bann fx-h fx-bc fx-ac">
  158. <view class="tips">你还未登录,请点击登录查看</view>
  159. <view class="btn" @tap="tapLogin" style="margin-top: 10px;">立即登录</view>
  160. </view>
  161. <view class="popwin fx-h fx-bc fx-ac" v-if="isShowContent">
  162. <view class="bg"></view>
  163. <view class="body fx-h fx-bc fx-ac">
  164. <view style="font-size: 16px;color: #333;font-weight: bold;">会员须知及寄售协议</view>
  165. <scroll-view scroll-y class="max-he">
  166. <u-parse :content="topData.content" :noData="topData.content" />
  167. </scroll-view>
  168. <view class="btn" @tap="tapAction">已阅读并同意</view>
  169. </view>
  170. </view>
  171. <u-modal :show="isBooking" title="预约场次" :showConfirmButton="false">
  172. <view class="booking">
  173. <view class="booking-content">
  174. 预约<text v-if="itemData != null ">{{ itemData.reserve_count }}单</text>,需要<text v-if="itemData != null ">{{ itemData.all_anticipate }}</text>易趣卷是否立即预约?
  175. </view>
  176. <view class="foot fx-r">
  177. <view class="btn ihover" @tap="tapBookAc">确认</view>
  178. <view class="nbtn ihover" @tap="isBooking = false">取消</view>
  179. </view>
  180. </view>
  181. </u-modal> -->
  182. </view>
  183. </template>
  184. <script>
  185. import countdown from "@/components/cz-countdown/cz-countdown.vue";
  186. import uParse from '@/components/gaoyia-parse/parse.vue';
  187. import { mapState, mapMutations } from 'vuex';
  188. export default {
  189. components: {
  190. countdown,
  191. uParse
  192. },
  193. computed: mapState(['user','sysData']),
  194. data() {
  195. return {
  196. barheight : 0,
  197. data : {
  198. guData : null,
  199. auction : null
  200. },
  201. topData :{
  202. banner : [],
  203. content : ""
  204. } ,
  205. isShowContent : false,
  206. itemData : null,
  207. actionType : "",
  208. isBooking : false,
  209. isSubmit : false,
  210. }
  211. },
  212. onLoad() {
  213. this.initView();
  214. setInterval(this.interval,1000);
  215. },
  216. onShow() {
  217. this.checkUserLogin({ page: this,isLogion: false,fn:this.uInit});
  218. },
  219. methods: {
  220. ...mapMutations(['checkUserLogin']),
  221. initView: function() {
  222. this.$nextTick(() => {
  223. uni.createSelectorQuery().select("#app-top").boundingClientRect(res=>{
  224. this.barheight = res.height;
  225. }).exec();
  226. });
  227. // #ifdef H5
  228. this.footHeight = 60;
  229. // #endif
  230. this
  231. .request
  232. .get("guInit")
  233. .then(res => {
  234. if(res.code == 200) {
  235. this.topData = res.data;
  236. }
  237. });
  238. },
  239. /**
  240. * 获取其他信息
  241. */
  242. uInit:function(){
  243. this
  244. .request
  245. .post("getUserGu")
  246. .then(res => {
  247. uni.hideLoading();
  248. if (res.code == 200) {
  249. this.data = res.data;
  250. this.interval();
  251. }
  252. })
  253. .catch(err => {
  254. this.utils.Tip("加载失败,重新点击尝试!" + JSON.stringify(error));
  255. uni.hideLoading();
  256. });
  257. },
  258. /**
  259. * 预约操作
  260. */
  261. tapBooking:function(item){
  262. if(this.user == null) {
  263. uni.navigateTo({
  264. url:"/pages/login/index"
  265. });
  266. return ;
  267. }
  268. //是否认证
  269. if(this.user.is_auth != 1 ) {
  270. this.utils.showModal("您还未认证,点击进行认证",()=>{
  271. uni.navigateTo({
  272. url:"/pages/user/approve"
  273. });
  274. });
  275. return;
  276. }
  277. //是否填写银行信息
  278. if(this.user.is_bank != 1) {
  279. this.utils.showModal("您还配置收款信息,点击配置",()=>{
  280. uni.navigateTo({
  281. url:"/pages/user/bank/bank"
  282. });
  283. });
  284. return;
  285. }
  286. this.isShowContent = true;
  287. this.itemData = item;
  288. this.actionType = "booking";
  289. },
  290. tapAction:function(){
  291. this.isShowContent = false;
  292. if(this.actionType == "booking") {
  293. this.isBooking = true;
  294. }
  295. },
  296. /**
  297. * 预约单
  298. */
  299. tapBookAc:function(){
  300. this.isBooking = false;
  301. if(this.isSubmit) return ;
  302. this.isSubmit = true;
  303. uni.showLoading({ title: '提交数据..' });
  304. this
  305. .request
  306. .post("auctionSubscribe",{id : this.itemData.id})
  307. .then(res => {
  308. uni.hideLoading();
  309. this.isSubmit = false;
  310. if (res.code == 200) {
  311. this.utils.Tip(res.msg);
  312. this.uInit();
  313. } else {
  314. this.utils.Tip(res.msg);
  315. }
  316. })
  317. .catch(err => {
  318. this.isSubmit = false;
  319. this.utils.Tip("加载失败,重新点击尝试!" + JSON.stringify(error));
  320. uni.hideLoading();
  321. });
  322. },
  323. /**
  324. *
  325. */
  326. tapLogin:function(){
  327. uni.navigateTo({
  328. url:"../login/index"
  329. });
  330. },
  331. tapAdver:function(){
  332. },
  333. /**
  334. * 详情页面
  335. */
  336. tapItem:function(item){
  337. uni.navigateTo({
  338. url:"./rush?id=" + item.id
  339. })
  340. },
  341. /**
  342. * 打开Open
  343. * @param {Object} ev
  344. */
  345. tapOpen: function(ev) {
  346. let url = ev.currentTarget.dataset.url;
  347. this.utils.navigateTo(url);
  348. },
  349. interval:function(){
  350. if(this.data.auction != null) {
  351. let time = this.utils.strtotime();
  352. for(let i in this.data.auction) {
  353. let d = this.data.auction[i];
  354. //判断是否预约时间
  355. if(time >= d.add_time && time < d.end_time ) {
  356. this.$set(this.data.auction[i],'showType',1);
  357. }
  358. //入场时间
  359. if(time >= d.end_time && time < d.radd_time) {
  360. this.$set(this.data.auction[i],'showType',2);
  361. }
  362. //判断是否入场-判断是不是到预约时间-是否已预约
  363. if(d.booking_count > 0 && time >= d.radd_time && time < d.rend_time) {
  364. this.$set(this.data.auction[i],'showType',3);
  365. }
  366. if(d.booking_count <= 0 && time >= d.radd_time && time < d.rend_time && time > d.end_time) {
  367. this.$set(this.data.auction[i],'showType',3);
  368. }
  369. if(time > d.rend_time) {
  370. this.$set(this.data.auction[i],'showType',4);
  371. }
  372. }
  373. }
  374. }
  375. }
  376. }
  377. </script>
  378. <style lang="scss">
  379. @import url("/components/gaoyia-parse/parse.css");
  380. .app-bg{
  381. position: absolute;
  382. image{width: 100vw;height: 45vw;}
  383. }
  384. .app-body{
  385. position: relative;
  386. z-index: 9;
  387. padding: 0px 30rpx;
  388. }
  389. //业绩通道
  390. .pannel{
  391. background: #fff;
  392. border-radius: 20rpx;
  393. margin-top: 20rpx;
  394. padding: 60rpx 0;
  395. .item{
  396. width: calc(33% - 1px);
  397. .label {
  398. font-size: 14px;
  399. color: #666666;
  400. margin-top: 5px;
  401. }
  402. .count{
  403. font-weight: bold;
  404. font-size: 21px;
  405. color: #0C1732;
  406. }
  407. }
  408. .line{
  409. width: 1px;
  410. height: 45px;
  411. background: #DCDCDC;
  412. }
  413. }
  414. //抢货通道
  415. .team-buy{
  416. background: #F8F8FA;
  417. .top{
  418. .label{color:#DB292B;font-size: 30rpx;font-weight: bold;}
  419. .sbtn{border: 2rpx solid #DB292B;border-radius: 10rpx;color: #DB292B;font-size: 24rpx;padding: 14rpx 16rpx;}
  420. }
  421. .team-show{
  422. width: 100%;
  423. height: 260rpx;
  424. border-radius: 20rpx;
  425. margin-top: 20rpx;
  426. position: relative;
  427. .bg{
  428. width: 100%;
  429. height: 260rpx;
  430. position: absolute;
  431. image{
  432. width: 100%;
  433. height: 100%;
  434. border-radius: 20rpx;
  435. }
  436. .h{background-color: rgba(0, 0, 0, 0.2);position: absolute;z-index: 9;width: 100%;height: 100%;border-radius: 20rpx;top: 0;}
  437. }
  438. .body{
  439. position: relative;
  440. z-index: 10;
  441. height: 100%;
  442. .top-input{
  443. position: relative;
  444. .tbg{width: 250rpx;height: 70rpx;}
  445. .inner{
  446. width: 100%;
  447. height: 100%;
  448. position: absolute;
  449. top: 0;left: 0;
  450. image{width: 28rpx;height: 28rpx;}
  451. .label{color: #fff;font-weight: bold;font-size: 36rpx;margin-left: 6rpx;}
  452. }
  453. }
  454. .info{
  455. width: 100%;
  456. .item{
  457. width: calc(33% - 1px);
  458. .name{color: #fff;font-size: 30rpx;margin-top: 24rpx;}
  459. .label{color: #fff;width:80%;font-size: 30rpx;font-weight: bold; overflow: hidden;text-overflow:ellipsis;white-space: nowrap;text-align: center;}
  460. .people{
  461. image{width: 26rpx;height: 34rpx;}
  462. }
  463. }
  464. .halving{
  465. width: 2rpx;
  466. height: 80rpx;
  467. background: #fff;
  468. }
  469. }
  470. }
  471. }
  472. }
  473. .venue-list{
  474. .item{
  475. background: #fff;
  476. border-radius: 20rpx;
  477. padding: 30rpx;
  478. margin-top: 20rpx;
  479. .top-info{
  480. .avatar{
  481. width: 100rpx;
  482. height: 100rpx;
  483. border-radius: 10rpx;
  484. background: #f1f1f1;
  485. image{
  486. width: 100rpx;
  487. height: 100rpx;
  488. border-radius: 10rpx;
  489. }
  490. }
  491. .info{
  492. width: calc(100% - 120rpx);
  493. margin-left: 20rpx;
  494. .title{color: #081734;font-size: 34rpx;font-weight: bold;}
  495. .time{
  496. font-size: 22rpx;
  497. color: #666666;
  498. image{width: 30rpx;height: 28rpx;margin-right: 8rpx;}
  499. margin-top: 20rpx;
  500. }
  501. }
  502. }
  503. .yinfo{
  504. padding: 40rpx 0;
  505. .y-time{
  506. color: #666666;
  507. font-size: 26rpx;
  508. text{color: #081734;}
  509. }
  510. border-bottom: 1px solid #f1f1f1;
  511. }
  512. .yfoot{
  513. padding-top: 10px;
  514. .time1{font-size: 14px;}
  515. .sbtn{background: #d13737;color: #fff;font-size: 14px;border-radius: 20rpx;padding: 4px 10px;}
  516. .sbtn-no{background: #f1f1f1;color: #787878;font-size: 14px;border-radius: 20rpx;padding: 4px 10px}
  517. }
  518. }
  519. }
  520. .user-bann{
  521. .tips{font-size: 14px;color: #787878;}
  522. .btn{background: $ic-appcolor;font-size: 14px;color: #fff;width: 160px;border-radius: 20px;height: 40px;text-align:center;line-height: 40px;}
  523. }
  524. /**弹出框 **/
  525. .popwin{position:fixed;width: 100%;height: 100%;top: 0;left: 0;z-index: 88;}
  526. .popwin .bg{background: rgba(0, 0, 0, 0.5);height: 100%;width: 100%;position: absolute;left: 0;top: 0;}
  527. .popwin .body{padding: 20px;width: 80%;background: #fff;position: relative;border-radius: 8px;
  528. }
  529. .max-he{height: 60vh;}
  530. .popwin .btn{margin-top: 6px;border-radius: 4px;background: #dc262b;font-size:14px;color: #fff;width: 100px;text-align: center;padding: 6px 2px;}
  531. .popwin .btn.no{background: #f1f1f1;color: #ccc}
  532. .booking{
  533. .booking-content{
  534. font-size: 26px;
  535. padding: 10px 0;
  536. text{color: #d13737;}
  537. }
  538. .foot{
  539. padding: 20rpx 0;
  540. .btn{
  541. height: 40px;
  542. background: #dc262b;
  543. border-radius: 5px;
  544. font-size: 14px;
  545. color: #fff;
  546. text-align: center;
  547. line-height: 40px;
  548. width: 30vw;
  549. margin-right: 4vw;
  550. }
  551. .nbtn{
  552. height: 40px;
  553. border: 1px solid #dc262b;
  554. border-radius: 5px;
  555. font-size: 14px;
  556. color: #dc262b;
  557. text-align: center;
  558. line-height: 40px;
  559. width: 30vw;
  560. margin-left: 4vw;
  561. }
  562. }
  563. }
  564. </style>