index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296
  1. <template>
  2. <view v-if="userinfo.user_type == 3">
  3. <view class="hang" v-if="screenState===0"></view>
  4. <view class="IndexContainer" v-if="screenState===1">
  5. <view class="countTime" v-if="countTime.value > 0">
  6. <view class="animate"></view>
  7. <view class="name">{{ countTime.status ? '距活动结束' : '距活动开始' }}</view>
  8. <view class="timeContainer">
  9. <view class="day">{{ Math.floor(countTime.value / 24 / 60 / 60) }}</view>
  10. <text class="fixed">天</text>
  11. <view class="hour">{{ Math.floor((countTime.value / 60 / 60) % 24) }}</view>
  12. <text class="fixed">时</text>
  13. <view class="minutes">{{ Math.floor((countTime.value / 60) % 60) }}</view>
  14. <text class="fixed">分</text>
  15. <view class="seconds">
  16. <view class="seconds_ten">{{ Math.floor((countTime.value % 60) / 10) }}</view>
  17. <swiper :autoplay="true" :interval="1000" :duration="1000" :vertical="true" :circular="true"
  18. :disable-touch="true" class="seconds_one" :current="countTime.index" @change="countTiming">
  19. <swiper-item v-for="i in 10" :key="i">
  20. <view class="swiper-item">{{ 10 - i }}</view>
  21. </swiper-item>
  22. </swiper>
  23. </view>
  24. <text class="fixed">秒</text>
  25. </view>
  26. </view>
  27. <view class="NoticeView">
  28. <view class="noticeTop">
  29. <view class="noticeIcon" />
  30. <view class="noticeText" />
  31. <swiper :autoplay="true" :vertical="true" :circular="true" class="noticeContents">
  32. <swiper-item v-for="item in messageList" :key="item.id" @click="showMessageInfo(item)">
  33. <text>{{ item.contents }}</text>
  34. </swiper-item>
  35. </swiper>
  36. </view>
  37. </view>
  38. <view class="functionView">
  39. <view v-for="(v, k, i) in functionList" :key="k" class="functionList">
  40. <view v-for="(item, i) in v" :key="i" class="functionItem" @click="moduleListFun(item)">
  41. <image :src="item.icon" class="functionIcon"></image>
  42. <view class="functionName">{{ item.name }}</view>
  43. <view v-if="item.num" class="messageNumber">{{ userinfo[item.num] || 0 }}</view>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="messageToast" v-if="messageVis">
  48. <view class="messageToastBody">
  49. <view class="close" @click="
  50. messageInfo = {};
  51. messageVis = false;
  52. "></view>
  53. <view class="title">公告</view>
  54. <scroll-view :scroll-y="true" class="contents">{{ messageInfo.contents }}</scroll-view>
  55. </view>
  56. </view>
  57. </view>
  58. <view v-if="shopCar" class="shop" @click="goShop">
  59. <view class="shop_car" :style="{ 'margin-left' : (shopNum ? '14rpx' : '24rpx') }">
  60. <image src="../../static/icon/shop_car.png" mode="widthFix" style="width: 55rpx;"></image>
  61. <view class="messageNumber" v-if="shopNum">
  62. {{ shopNum }}
  63. </view>
  64. </view>
  65. </view>
  66. <view class="showTotal" v-if="fillOut">
  67. <view class="show">
  68. <image src="../../static/team/lALPDiQ3NdD0r2DNAhDNAmw_620_528.png" mode="widthFix" class="show-image">
  69. </image>
  70. <view class="show-button" @click="toFeed">立即填写</view>
  71. </view>
  72. <view class="over"></view>
  73. </view>
  74. <view class="online flexCC" :class="screenState===2?'all':''">
  75. <view class="exit flexCC" v-if="screenState===2" @click="logout">退出登录</view>
  76. </view>
  77. <!-- 契约弹窗 -->
  78. <view class="pop_up" v-if="showContract">
  79. <view class="pop_con">
  80. <image src="../../static/new_index/hint.png" class="hint_icon"></image>
  81. <view class="hint">{{isShowCode?'契约锁认证':'未完成契约锁认证'}}</view>
  82. <view v-if="isShowCode" class="flexCC">
  83. <image :src="contractCode" class="code_img"></image>
  84. <view class="identify">长按识别二维码进行验证</view>
  85. </view>
  86. <view v-else class="flexCC">
  87. <view class="intr">点击下方按钮查看二维码进行验证</view>
  88. <view class="close_btn" @click="getAuthCode">查看二维码</view>
  89. </view>
  90. </view>
  91. </view>
  92. <view v-if="overlay" class="overlay" />
  93. </view>
  94. </template>
  95. <script>
  96. import {
  97. _API_Logout
  98. } from '@/apis/verify.js'
  99. import {
  100. formatDate,
  101. remove
  102. } from '../../filters/index.js';
  103. import {
  104. deepClone
  105. } from '@/common/util/index.js';
  106. import {
  107. _API_IndexIndex,
  108. _API_GetActivityTime,
  109. _API_getMessage,
  110. _API_CheckAuth,
  111. _API_Auth
  112. } from '@/apis/app.js';
  113. import {
  114. _API_GetUserStatus,
  115. _API_GetUserInfo,
  116. getWxJSSDKConfig
  117. } from '@/apis/user.js';
  118. import {
  119. GetQueryString
  120. } from '../../filters/index.js';
  121. import QR from '../../common/util/wxqrcode.js'; // 二维码生成器
  122. import {
  123. mapState
  124. } from 'vuex';
  125. import {
  126. myStock
  127. } from '@/apis/stock.js';
  128. export default {
  129. data() {
  130. return {
  131. overlay: false,
  132. isShowCode: false, // 是否显示契约二维码
  133. showContract: false, //显示契约弹窗
  134. contractCode: '', // 契约二维码
  135. swiper: [],
  136. messageList: [],
  137. messageVis: false,
  138. messageInfo: {},
  139. fillOut: false,
  140. shopNum: 0,
  141. shopCar: false,
  142. countTime: {
  143. value: 0,
  144. status: 0,
  145. index: 0
  146. },
  147. total: 0,
  148. screenState: 0 // 0白屏 1 正常 2 只显示实战营
  149. };
  150. },
  151. onLoad() {
  152. this.shopNum = this.$store.getters['cart/shopcarNum']
  153. uni.hideTabBar()
  154. },
  155. computed: {
  156. tabBerList() {
  157. return this.$store.state.tabBer.list;
  158. },
  159. ...mapState(['userinfo']),
  160. functionList() {
  161. const requireBaseUrl = 'static/new_index/function_icon/';
  162. // 订单
  163. let orderModules = [{
  164. name: '订单列表',
  165. icon: require(`@/${requireBaseUrl}1_2.png`),
  166. url: 'my-order/my-order'
  167. },
  168. {
  169. name: '订货汇总',
  170. icon: require(`@/${requireBaseUrl}1_3.png`),
  171. url: 'order-sum/order-sum',
  172. num: 'no_money'
  173. },
  174. {
  175. name: '公司发货',
  176. icon: require(`@/${requireBaseUrl}1_4.png`),
  177. url: 'deliver-detail/deliver-detail'
  178. }
  179. ];
  180. // 库存
  181. let stockModules = [
  182. {
  183. name: '入库',
  184. icon: require(`@/${requireBaseUrl}2_1.png`),
  185. url: 'stock/ruku_type'
  186. },
  187. {
  188. name: '出库',
  189. icon: require(`@/${requireBaseUrl}2_2.png`),
  190. url: 'stock/chuku'
  191. },
  192. {
  193. name: '库存',
  194. icon: require(`@/${requireBaseUrl}2_3.png`),
  195. url: 'stock/stock'
  196. },
  197. {
  198. name: '盘库',
  199. icon: require(`@/${requireBaseUrl}2_4.gif`),
  200. url: 'stock/panku'
  201. }
  202. ]
  203. //测试账号
  204. if (this.userinfo.mobile == 15866666666) {
  205. orderModules.length = 0
  206. }
  207. if (this.userinfo.user_type === 3) {
  208. orderModules.unshift({
  209. name: '订货下单',
  210. icon: require(`@/${requireBaseUrl}1_1.png`),
  211. url: 'place-order/place-order'
  212. })
  213. }
  214. let teamModules = []
  215. teamModules.push({
  216. name: '实战营报名',
  217. icon: require(`@/${requireBaseUrl}3_4.png`),
  218. url: 'payment-xx/payment'
  219. })
  220. // teamModules.push({
  221. // name: '争霸赛报名',
  222. // icon: require(`@/${requireBaseUrl}3_4.png`),
  223. // url: 'zbs/detail'
  224. // })
  225. this.shopCar = true
  226. const modules = {
  227. order: orderModules,
  228. stock: this.userinfo.user_type == 3 ? stockModules : [],
  229. team: teamModules
  230. };
  231. return modules;
  232. }
  233. },
  234. onPullDownRefresh() {
  235. this.init();
  236. },
  237. onShow() {
  238. // this.$store.commit('app/HELPERSTATUS', 0) // 助手状态
  239. // // 如果是助理登录默认跳转到助手页面
  240. // if (this.$store.state.app.token && uni.getStorageSync('isHelper')) {
  241. // uni.reLaunch({
  242. // url: '../helper/helper'
  243. // })
  244. // return false
  245. // }
  246. if (this.$store.state.app.token) {
  247. // 当用户处于登录状态
  248. if (window.location.pathname.split('/').length > 4) {
  249. window.history.replaceState({}, '', '/api/gzh');
  250. }
  251. uni.showLoading({
  252. mask: true
  253. })
  254. this.init();
  255. this.activityTime();
  256. this.getMessageList();
  257. } else {
  258. this.toWxchatLogin(`/pages/login-reg/login-reg`, null)
  259. }
  260. uni.$on('noopening', () => uni.showToast({
  261. title: '暂未开放',
  262. duration: 2333,
  263. icon: 'none'
  264. }));
  265. uni.$on('RELAUNCH', () => this.toClearToken()); // 监听 token 失效事件,移除token, 跳转到登录页
  266. uni.$on('INIT', () => this.init())
  267. },
  268. methods: {
  269. // 移除token,跳转登录页
  270. toClearToken() {
  271. this.$store.commit('app/LOGOUT')
  272. this.toWxchatLogin(`/pages/login-reg/login-reg`, null)
  273. },
  274. //获取契约锁二维码
  275. getAuthCode(type) {
  276. _API_Auth().then(res => {
  277. if (res.code === 200) {
  278. this.contractCode = QR.createQrCodeImg(res.data.url, {
  279. size: parseInt(300) //二维码大小
  280. });
  281. if (this.contractCode) {
  282. this.isShowCode = true
  283. } else {
  284. uni.showToast({
  285. title: '获取二维码失败'
  286. })
  287. }
  288. } else {
  289. uni.showModal({
  290. content: res.data || '获取二维码失败',
  291. showCancel: false
  292. })
  293. }
  294. })
  295. },
  296. // 检查是否完成契约锁认证
  297. checkContract() {
  298. _API_CheckAuth().then(res => {
  299. if (res.code === 200) {
  300. // 已完成认证
  301. } else {
  302. uni.hideTabBar()
  303. this.showContract = true
  304. }
  305. })
  306. },
  307. // 退出登录(只有18888888888账号才显示)
  308. logout() {
  309. uni.showLoading({
  310. mask: true
  311. })
  312. _API_Logout().then(() => {
  313. if (this.$store.state.app.token) {
  314. this.$store.commit('app/LOGOUT')
  315. // window.history.replaceState({}, '', '/api/gzh/#/pages/login-reg/login-reg')
  316. // location.reload()
  317. this.toWxchatLogin("/pages/login-reg/login-reg", null)
  318. } else {
  319. this.$store.commit('app/LOGOUT')
  320. this.toWxchatLogin("/pages/login-reg/login-reg", null)
  321. }
  322. })
  323. },
  324. // 跳转到报名支付
  325. goSigup() {
  326. uni.navigateTo({
  327. url: '../payment/payment'
  328. })
  329. },
  330. goShop() {
  331. uni.navigateTo({
  332. url: '../shop-car1/shop-car1'
  333. });
  334. },
  335. toFeed() {
  336. uni.navigateTo({
  337. url: '../feedback/index'
  338. });
  339. },
  340. skipDetail() {
  341. uni.navigateTo({
  342. url: '../article-detail/article-detail?id=' + this.article.id
  343. });
  344. },
  345. skipMore() {
  346. uni.navigateTo({
  347. url: '../article-list/article-list'
  348. });
  349. },
  350. moduleListFun(item) {
  351. let specModuleMap = new Map([
  352. ['stock/panku', this.getMyStock]
  353. ]);
  354. if (specModuleMap.get(item.url)) {
  355. specModuleMap.get(item.url)();
  356. } else {
  357. this.toUrlLink(item.url);
  358. }
  359. },
  360. getMyStock() {
  361. myStock()
  362. .then(res => {
  363. if (res.code === 200) {
  364. this.toUrlLink(res.data.status ? 'stock/first_panku' : 'stock/panku');
  365. } else {
  366. uni.showModal({
  367. content: res.message || '获取我的库存失败',
  368. showCancel: false
  369. });
  370. }
  371. })
  372. .catch(() => {
  373. uni.showModal({
  374. content: '获取我的库存失败',
  375. showCancel: false
  376. });
  377. });
  378. },
  379. countTiming() {
  380. --this.countTime.value;
  381. },
  382. // 跳转
  383. toUrlLink(url) {
  384. console.log(url)
  385. if (!url) return false;
  386. // if (url == 'place-order/place-order') {
  387. // uni.showToast({
  388. // title: '该功能暂未开放',
  389. // icon: 'none'
  390. // })
  391. // return false
  392. // }
  393. uni.navigateTo({
  394. url: `../../pages/${url}`
  395. })
  396. },
  397. showMessageInfo(data) {
  398. this.messageInfo = data;
  399. this.messageVis = true;
  400. },
  401. getMessageList() {
  402. _API_getMessage().then(res => {
  403. if (res.code === 200) {
  404. this.messageList = res.data.list.info;
  405. if (res.data.list.notice) {
  406. this.messageList.unshift(res.data.list.notice);
  407. }
  408. }
  409. });
  410. },
  411. activityTime() {
  412. _API_GetActivityTime().then(res => {
  413. if (res.code === 200) {
  414. let {
  415. end_time,
  416. start_time
  417. } = res.data;
  418. let now = Date.now();
  419. if ((now >= start_time && now <= end_time) || now <= start_time) {
  420. this.countTime.value = now <= start_time ? start_time - now : end_time - now;
  421. this.countTime.value = Math.ceil(this.countTime.value / 1000);
  422. this.countTime.status = now <= start_time ? 0 : 1;
  423. this.countTime.index = 9 - Math.floor((this.countTime.value % 60) % 10);
  424. }
  425. }
  426. });
  427. },
  428. toSwiperDetail(index) {
  429. // 点击轮播图
  430. if (this.swiper[index].is_jump == 1) {
  431. uni.navigateTo({
  432. url: `../app-webview/app-webview?url=${this.swiper[index].url}`
  433. });
  434. }
  435. },
  436. indexRequest() {
  437. // 请求首页数据
  438. _API_IndexIndex().then(res => {
  439. uni.stopPullDownRefresh();
  440. this.swiper = res.data.swiper;
  441. });
  442. },
  443. init() {
  444. _API_GetUserStatus()
  445. .then(res => {
  446. // 禁止进入系统
  447. if (res.data.user_type == 1) {
  448. const that = this
  449. that.overlay = true
  450. uni.showModal({
  451. content: '抱歉,您没有权限进入系统',
  452. showCancel: false,
  453. success: function(res) {
  454. if (res.confirm) {
  455. that.$store.commit('app/LOGOUT')
  456. that.toWxchatLogin(`/pages/login-reg/login-reg`, null)
  457. }
  458. }
  459. })
  460. }
  461. // 账号被冻结
  462. if (res.code == 20014) {
  463. uni.navigateTo({
  464. url: '../freeze/freeze?type=' + 1
  465. })
  466. return false;
  467. }
  468. // 账号被删除
  469. if (res.data.deleted_at) {
  470. uni.reLaunch({
  471. url: '../freeze/freeze?type=' + 2
  472. })
  473. return false;
  474. }
  475. // 获取用户状态
  476. this.$store.commit('userinfo/UPDATA_USERINFO', res.data); // 获取用户状态后保存在 vuex 中
  477. //只显示实战营报名
  478. if (res.data.mobile === '18888888888') {
  479. // if (res.data.mobile === '15138929587') {
  480. this.screenState = 2
  481. uni.hideTabBar()
  482. } else {
  483. this.screenState = 1
  484. uni.showTabBar()
  485. }
  486. // 根据类别,判断是否完成契约锁认证
  487. if (res.data.user_type === 3) {
  488. this.checkContract()
  489. // 初始化契约锁二维码,预防第一次加载失败
  490. _API_Auth().then(res => {
  491. if (res.code === 200) {
  492. this.contractCode = QR.createQrCodeImg(res.data.url, {
  493. size: parseInt(300) //二维码大小
  494. });
  495. }
  496. })
  497. }
  498. //测试begin
  499. this.is_weiliao = res.data.is_weiliao;
  500. //测试end
  501. if (res.data.status == 1) {
  502. // 用户状态为 1 表示正常
  503. if ((res.data.cert_status == 3 || res.data.cert_status == 6) && res.data.in_group == 1) {
  504. // 用户认证完成
  505. this.indexRequest(); // 请求首页数据
  506. /*获取用户信息*/
  507. _API_GetUserInfo({
  508. wxcode: this.$store.state.userinfo.code
  509. }).then(res => {
  510. // res.data.user_type = 2
  511. // 请求用户信息
  512. uni.stopPullDownRefresh();
  513. this.$store.commit('userinfo/UPDATA_USERINFO', res
  514. .data); // 获取用户信息后保存在 vuex 中
  515. if (this.$store.state.userinfo.pass_status) {
  516. uni.showModal({
  517. title: '提示',
  518. content: '为了保障您的账户安全,请立即修改密码',
  519. showCancel: false,
  520. success: res => {
  521. uni.reLaunch({
  522. url: '../updata-psw/updata-psw'
  523. });
  524. }
  525. });
  526. }
  527. if (!this.$store.state.userinfo.openid) {
  528. let _this = this;
  529. uni.showModal({
  530. title: '提示',
  531. content: '获取微信信息失败,请重新登录',
  532. showCancel: false,
  533. success() {
  534. _this.$store.commit('app/LOGOUT');
  535. _this.toWxchatLogin('/pages/login-reg/login-reg', _this.$store.state.userinfo.id);
  536. }
  537. });
  538. }
  539. });
  540. // _API_InviteCode().then(res => {
  541. // this.$store.commit('userinfo/UPDATA_USERINFO', {
  542. // invite_code: res.data.invite_code.toUpperCase()
  543. // }); // 获取用户邀请码后保存在 vuex 中
  544. // });
  545. } else {
  546. uni.showModal({
  547. title: '提示',
  548. content: '抱歉,您没有权限进入到个人中心',
  549. showCancel: false,
  550. success: res => {
  551. uni.reLaunch({
  552. url: '/pages/login-reg/login-reg'
  553. });
  554. }
  555. });
  556. }
  557. } else if (res.data.status == 0) {
  558. // 用户状态为 0 表示用户已被冻结
  559. this.$store.commit('app/LOGOUT');
  560. this.$refs.ltm.modal('提示', ['您已退出大卫博士'], 'noCancle').then(() => {
  561. uni.reLaunch({
  562. url: '../login-reg/login-reg'
  563. });
  564. });
  565. }
  566. })
  567. .catch(e => {
  568. // uni.showModal({
  569. // content: e
  570. // })
  571. });
  572. },
  573. // 跳转微信登录
  574. toWxchatLogin(url, state) {
  575. url = url || '/pages/index/index';
  576. state = state || 'cli';
  577. const redirect_uri = encodeURIComponent(`${this.$config.redirect_uri}/api/gzh#${url}`);
  578. const auth = () =>
  579. (window.location.href = `${this.$config.wxURL}?appid=${
  580. this.$config.appid
  581. }&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=${state}#wechat_redirect`);
  582. auth();
  583. }
  584. }
  585. };
  586. </script>
  587. <style lang="scss" scoped>
  588. .overlay {
  589. position: fixed;
  590. z-index: 999;
  591. top: 0;
  592. right: 0;
  593. left: 0;
  594. bottom: 0;
  595. background: #909399
  596. }
  597. .pop_up {
  598. width: 100vw;
  599. height: 100vh;
  600. background-color: rgba(0, 0, 0, 0.7);
  601. position: fixed;
  602. top: 0;
  603. left: 0;
  604. display: flex;
  605. align-items: center;
  606. justify-content: center;
  607. z-index: 102;
  608. .code_box {
  609. .close_icon {
  610. margin-top: 60rpx;
  611. width: 50rpx;
  612. height: 50rpx;
  613. }
  614. }
  615. .pop_con {
  616. width: 620rpx;
  617. background: #fff;
  618. border-radius: 24rpx;
  619. padding: 30rpx;
  620. box-sizing: border-box;
  621. display: flex;
  622. align-items: center;
  623. justify-content: center;
  624. flex-direction: column;
  625. .hint_icon {
  626. width: 183rpx;
  627. height: 135rpx;
  628. margin-top: -90rpx;
  629. }
  630. .code_img {
  631. margin: 40rpx 0 24rpx;
  632. width: 370rpx;
  633. height: 370rpx;
  634. }
  635. .hint {
  636. font-size: 36rpx;
  637. font-weight: bold;
  638. margin-top: 20rpx;
  639. }
  640. .identify {
  641. font-size: 32rpx;
  642. }
  643. .intr {
  644. font-size: 32rpx;
  645. color: #333;
  646. margin: 20rpx 0 40rpx 0;
  647. }
  648. .close_btn {
  649. width: 430rpx;
  650. height: 88rpx;
  651. text-align: center;
  652. line-height: 88rpx;
  653. background: linear-gradient(93deg, #F97C55 0%, #F44545 100%);
  654. border-radius: 44rpx;
  655. font-size: 32rpx;
  656. color: #fff;
  657. }
  658. }
  659. }
  660. .hang {
  661. width: 100vw;
  662. height: 100vh;
  663. }
  664. .online {
  665. position: fixed;
  666. right: 40rpx;
  667. bottom: 160rpx;
  668. z-index: 100;
  669. .showSigup {
  670. width: 132rpx;
  671. height: 132rpx;
  672. // padding: 30rpx;
  673. background: linear-gradient(150deg, #FFAA01 0%, #FE0000 100%);
  674. box-shadow: 0px 3px 10px rgba(254, 34, 0, 0.43);
  675. border-radius: 50%;
  676. opacity: 1;
  677. font-weight: bold;
  678. display: flex;
  679. align-items: center;
  680. justify-content: center;
  681. flex-direction: column;
  682. text {
  683. color: #fff;
  684. }
  685. }
  686. .exit {
  687. width: 308rpx;
  688. height: 78rpx;
  689. background: #FFF4F3;
  690. border: 2rpx solid #FB231F;
  691. opacity: 1;
  692. border-radius: 44px;
  693. font-size: 32rpx;
  694. color: #FB231F;
  695. margin-top: 100rpx;
  696. }
  697. }
  698. .all {
  699. position: fixed;
  700. top: 50%;
  701. left: 50%;
  702. transform: translate(-50%, -50%);
  703. z-index: 100;
  704. }
  705. .showTotal {
  706. .show {
  707. width: 620rpx;
  708. position: fixed;
  709. left: 0;
  710. right: 0;
  711. top: 280rpx;
  712. margin: auto;
  713. z-index: 10000;
  714. &-image {
  715. width: 620rpx;
  716. position: relative;
  717. }
  718. &-button {
  719. width: 400rpx;
  720. line-height: 96rpx;
  721. text-align: center;
  722. color: #fff;
  723. font-size: 32rpx;
  724. border-radius: 56rpx;
  725. background: linear-gradient(90deg, #f97c55 0%, #f44545 100%);
  726. position: absolute;
  727. bottom: -40rpx;
  728. left: 110rpx;
  729. }
  730. }
  731. .over {
  732. width: 100%;
  733. height: 100%;
  734. background-color: #000;
  735. opacity: 0.6;
  736. position: fixed;
  737. top: 0;
  738. left: 0;
  739. z-index: 999;
  740. }
  741. .button {
  742. width: 400rpx;
  743. height: 96rpx;
  744. background: linear-gradient(90deg, #f97c55 0%, #f44545 100%);
  745. }
  746. }
  747. .article {
  748. width: 100%;
  749. padding-bottom: 110rpx;
  750. background: #f9f9fb;
  751. .article_title {
  752. padding: 0 30rpx 30rpx;
  753. .recom {
  754. font-size: 32rpx;
  755. font-weight: bold;
  756. &::before {
  757. content: '';
  758. display: inline-block;
  759. width: 18rpx;
  760. height: 18rpx;
  761. border-radius: 50%;
  762. background: linear-gradient(180deg, #ffaa01 0%, #fe0000 100%);
  763. margin-right: 15rpx;
  764. }
  765. }
  766. .look_more {
  767. text {
  768. font-size: 28rpx;
  769. color: #999;
  770. }
  771. image {
  772. width: 40rpx;
  773. height: 40rpx;
  774. vertical-align: middle;
  775. margin-left: 15rpx;
  776. }
  777. }
  778. }
  779. .article_con {
  780. background: #fff;
  781. padding: 30rpx;
  782. position: relative;
  783. image {
  784. width: 176rpx;
  785. flex-shrink: 0;
  786. height: 184rpx;
  787. border-radius: 20rpx;
  788. }
  789. .article_intr {
  790. margin-left: 15rpx;
  791. font-size: 28rpx;
  792. >view:first-child {
  793. font-size: 32rpx;
  794. font-weight: bold;
  795. }
  796. .summary {
  797. width: 100%;
  798. overflow: hidden;
  799. text-overflow: ellipsis;
  800. display: -webkit-box;
  801. -webkit-line-clamp: 2;
  802. -webkit-box-orient: vertical;
  803. margin: 15rpx 0;
  804. }
  805. }
  806. }
  807. }
  808. .recommend_box {
  809. width: 690rpx;
  810. margin: 0 auto;
  811. padding: 24rpx 0;
  812. background: #fff;
  813. border-radius: 24rpx;
  814. .box_item {
  815. padding: 24rpx;
  816. box-sizing: border-box;
  817. .box_icon {
  818. width: 128rpx;
  819. height: 128rpx;
  820. border-radius: 16rpx;
  821. flex-shrink: 0;
  822. }
  823. .center {
  824. width: 68%;
  825. view {
  826. font-size: 32rpx;
  827. font-weight: bold;
  828. margin-bottom: 14rpx;
  829. }
  830. text {
  831. font-size: 26rpx;
  832. color: #999;
  833. }
  834. }
  835. .arrow {
  836. width: 47rpx;
  837. height: 47rpx;
  838. border-radius: 50%;
  839. background: #FFF4F3;
  840. .chat-icon {
  841. font-size: 26rpx;
  842. color: $base-color;
  843. font-weight: bold;
  844. }
  845. }
  846. }
  847. .recommend_title {
  848. height: 88rpx;
  849. line-height: 88rpx;
  850. padding-left: 24rpx;
  851. border-bottom: 2rpx solid #eee;
  852. font-size: 34rpx;
  853. font-weight: bold;
  854. }
  855. }
  856. page {
  857. display: flex;
  858. flex-direction: column;
  859. }
  860. .shop {
  861. width: 112rpx;
  862. height: 112rpx;
  863. background: linear-gradient(150deg, #FFAA01 0%, #FE0000 100%);
  864. box-shadow: 0px 6rpx 20rpx 2rpx rgba(254, 34, 0, 0.43);
  865. border-radius: 50%;
  866. opacity: 1;
  867. position: fixed;
  868. right: 40rpx;
  869. bottom: 160rpx;
  870. z-index: 800;
  871. .shop_car {
  872. width: 55rpx;
  873. margin-top: 40rpx;
  874. margin-left: 15rpx;
  875. position: relative;
  876. }
  877. .messageNumber {
  878. position: absolute;
  879. padding: 0 6rpx;
  880. line-height: 40rpx;
  881. border-radius: 20px;
  882. background-color: #fff;
  883. border: 2rpx solid #FB231F;
  884. color: #FB231F;
  885. line-height: 32rpx;
  886. text-align: center;
  887. font-size: 28rpx;
  888. top: 0;
  889. // left: -10%;
  890. min-width: 48rpx;
  891. box-sizing: border-box;
  892. transform: translate(50%, -16rpx);
  893. }
  894. }
  895. .IndexContainer {
  896. width: 100%;
  897. flex: 1;
  898. min-width: 0;
  899. padding: 30rpx 30rpx 150rpx 30rpx;
  900. background: #f9f9fb;
  901. // padding-bottom: 50px;
  902. .banner {
  903. width: 100%;
  904. height: 344rpx;
  905. margin-bottom: 30rpx;
  906. .bannerImg {
  907. width: 100%;
  908. height: 100%;
  909. background-repeat: no-repeat;
  910. background-size: cover;
  911. background-position: center;
  912. border-radius: 24rpx;
  913. }
  914. }
  915. .functionView {
  916. width: 100%;
  917. background: #ffffff;
  918. margin-bottom: 30rpx;
  919. border-radius: 24rpx;
  920. padding: 30rpx 0;
  921. padding-bottom: 0;
  922. .functionList {
  923. width: 100%;
  924. display: flex;
  925. flex-wrap: wrap;
  926. position: relative;
  927. .functionItem {
  928. display: flex;
  929. align-items: center;
  930. justify-content: center;
  931. flex-direction: column;
  932. width: 25%;
  933. margin-bottom: 20rpx;
  934. position: relative;
  935. .functionIcon {
  936. width: 96rpx;
  937. height: 96rpx;
  938. margin-bottom: 12rpx;
  939. }
  940. .functionName {
  941. color: #333333;
  942. font-size: 24rpx;
  943. line-height: 30rpx;
  944. }
  945. .messageNumber {
  946. position: absolute;
  947. padding: 0 6rpx;
  948. height: 32rpx;
  949. border-radius: 32rpx;
  950. border-bottom-left-radius: 0;
  951. background: linear-gradient(to right, #ffc401 0%, #fe2400 51%, #fe0000 100%);
  952. color: #ffffff;
  953. line-height: 32rpx;
  954. text-align: center;
  955. font-size: 28rpx;
  956. top: 0;
  957. left: 50%;
  958. min-width: 48rpx;
  959. box-sizing: border-box;
  960. transform: translate(50%, -16rpx);
  961. }
  962. }
  963. }
  964. }
  965. .countTime {
  966. width: 100%;
  967. height: 132rpx;
  968. margin-bottom: 44rpx;
  969. background-image: url(../../static/new_index/count_time.png);
  970. background-position: center;
  971. background-size: 100%;
  972. position: relative;
  973. display: flex;
  974. align-items: center;
  975. justify-content: space-between;
  976. padding: 0 40rpx;
  977. box-sizing: border-box;
  978. .animate {
  979. position: absolute;
  980. width: 200rpx;
  981. height: 100%;
  982. top: 50%;
  983. left: 30rpx;
  984. transform: translateY(-50%);
  985. overflow: hidden;
  986. &::before {
  987. content: '';
  988. display: block;
  989. width: 24rpx;
  990. height: calc(100% * 1.5);
  991. background-color: #ffffff;
  992. position: absolute;
  993. top: 40%;
  994. left: -3%;
  995. transform: rotate(20deg) translateY(-50%);
  996. animation: timeAnimate 2s backwards infinite;
  997. opacity: 0;
  998. }
  999. @keyframes timeAnimate {
  1000. 0% {
  1001. opacity: 0;
  1002. left: -3%;
  1003. }
  1004. 33% {
  1005. opacity: 0.2;
  1006. left: 18%;
  1007. }
  1008. 66% {
  1009. opacity: 0.4;
  1010. left: 39%;
  1011. }
  1012. 100% {
  1013. opacity: 0.2;
  1014. left: 60%;
  1015. }
  1016. }
  1017. }
  1018. .timeContainer {
  1019. display: flex;
  1020. align-items: flex-end;
  1021. justify-content: flex-end;
  1022. .day,
  1023. .hour,
  1024. .minutes,
  1025. .seconds {
  1026. width: 66rpx;
  1027. height: 66rpx;
  1028. border-radius: 8rpx;
  1029. text-align: center;
  1030. line-height: 66rpx;
  1031. background-color: #c40604;
  1032. color: #ffe682;
  1033. font-size: 40rpx;
  1034. margin: 0 8rpx;
  1035. overflow: hidden;
  1036. }
  1037. .fixed {
  1038. color: #ffffff;
  1039. font-size: 24rpx;
  1040. }
  1041. .seconds {
  1042. display: flex;
  1043. align-items: center;
  1044. justify-content: space-around;
  1045. .seconds_ten,
  1046. .seconds_one {
  1047. flex: 1;
  1048. overflow: hidden;
  1049. text-align: center;
  1050. height: 100%;
  1051. color: #ffe682;
  1052. }
  1053. .seconds_one {
  1054. background-color: #700706;
  1055. }
  1056. .swiper-item {
  1057. color: #ffe682;
  1058. }
  1059. }
  1060. }
  1061. .name {
  1062. color: #ffffff;
  1063. font-size: 32rpx;
  1064. }
  1065. }
  1066. .NoticeView {
  1067. width: 100%;
  1068. margin-bottom: 30rpx;
  1069. .noticeTop {
  1070. width: calc(100% - 40rpx);
  1071. height: 98rpx;
  1072. margin: 0 auto;
  1073. padding: 0 30rpx;
  1074. box-sizing: border-box;
  1075. display: flex;
  1076. align-items: center;
  1077. justify-content: space-between;
  1078. background: linear-gradient(to right, #ffe9c2, #ffcd81);
  1079. border-top-right-radius: 24rpx;
  1080. border-top-left-radius: 24rpx;
  1081. position: relative;
  1082. .noticeIcon {
  1083. width: 70rpx;
  1084. height: 70rpx;
  1085. background-image: url(../../static/new_index/notice.png);
  1086. background-position: center;
  1087. background-size: cover;
  1088. background-repeat: no-repeat;
  1089. }
  1090. .noticeText {
  1091. width: 82rpx;
  1092. height: 42rpx;
  1093. background-image: url(../../static/new_index/notice2.png);
  1094. background-position: center;
  1095. background-size: cover;
  1096. background-repeat: no-repeat;
  1097. margin: 0 16rpx 0 24rpx;
  1098. }
  1099. .noticeContents {
  1100. flex: 1;
  1101. min-width: 0;
  1102. height: 40rpx;
  1103. color: #333333;
  1104. font-size: 28rpx;
  1105. line-height: 40rpx;
  1106. margin-left: 16rpx;
  1107. }
  1108. &::after {
  1109. content: '';
  1110. display: block;
  1111. width: 100%;
  1112. height: 22rpx;
  1113. background: linear-gradient(90deg, #ffe9c2 0%, #ffcd81 100%);
  1114. position: absolute;
  1115. bottom: -6rpx;
  1116. left: 0;
  1117. right: 0;
  1118. }
  1119. }
  1120. &::after {
  1121. content: '';
  1122. display: block;
  1123. width: 100%;
  1124. height: 12rpx;
  1125. border-radius: 12rpx;
  1126. background: linear-gradient(to right, rgba(228, 142, 14, 0.2), rgba(228, 142, 14, 0.6));
  1127. }
  1128. }
  1129. }
  1130. .messageToast {
  1131. position: fixed;
  1132. top: 0;
  1133. left: 0;
  1134. right: 0;
  1135. bottom: 0;
  1136. z-index: 999;
  1137. background-color: rgba(0, 0, 0, 0.5);
  1138. display: flex;
  1139. justify-content: center;
  1140. align-items: center;
  1141. flex-direction: column;
  1142. .messageToastBody {
  1143. width: calc(100% - 60rpx);
  1144. background-color: #ffffff;
  1145. border-radius: 20rpx;
  1146. padding: 60rpx;
  1147. box-sizing: border-box;
  1148. position: relative;
  1149. .close {
  1150. width: 72rpx;
  1151. height: 72rpx;
  1152. background-color: rgba(0, 0, 0, 0.4);
  1153. display: flex;
  1154. align-items: center;
  1155. justify-content: center;
  1156. position: absolute;
  1157. top: 24rpx;
  1158. right: 24rpx;
  1159. border-radius: 50%;
  1160. &::after {
  1161. content: '\2715';
  1162. display: block;
  1163. color: #ffffff;
  1164. font-size: 36rpx;
  1165. }
  1166. }
  1167. .title {
  1168. width: 150rpx;
  1169. color: #333333;
  1170. font-size: 46rpx;
  1171. margin: 0 auto;
  1172. margin-bottom: 60rpx;
  1173. text-align: center;
  1174. position: relative;
  1175. height: 50rpx;
  1176. line-height: 50rpx;
  1177. &::after {
  1178. content: '';
  1179. display: block;
  1180. width: 100%;
  1181. height: 22rpx;
  1182. position: absolute;
  1183. bottom: 0;
  1184. left: 0;
  1185. right: 0;
  1186. background-image: linear-gradient(rgba(255, 223, 187, 0), rgba(255, 159, 49, 0.8));
  1187. }
  1188. }
  1189. .contents {
  1190. width: 100%;
  1191. height: 600rpx;
  1192. color: #666666;
  1193. font-size: 36rpx;
  1194. line-height: 50rpx;
  1195. }
  1196. }
  1197. }
  1198. </style>