user.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509
  1. <template>
  2. <view class="container">
  3. <view style="position: absolute;padding-left: 80%; display: flex;">
  4. <image @click='smBtnClick' style='width:21px;height:21px;' src="../../static/img/saoma.png"></image>
  5. <image @click='setting' style='width:21px;height:21px;margin-left: 20rpx;'
  6. src="../../static/img/sign/shezhi@3x.png"></image>
  7. </view>
  8. <view class="indexUp flex justify-between">
  9. <view class='flex'>
  10. <image v-bind:src="headUrl" class="headPortrait"></image>
  11. <view class="personal">
  12. <view @click="toLogin" class="information">{{hasLogin? username : '立即登录' }}</view>
  13. <view style='font-size:13px;color:#8F97AB;' class="information">{{hasLogin?starUserphone:''}}</view>
  14. <view v-if="haveCompany">
  15. <view v-if='hasLogin' @click='show=true' class="company">
  16. <image class='icon' style='width:19px;height:19px;' src="../../static/img/icon_qiye@3x.png"
  17. mode=""></image> {{compName}}>
  18. </view>
  19. <u-picker @confirm='compconfirm' mode="selector" v-model="show" :range="companyList"
  20. range-key="compName"></u-picker>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. <view style='background:transparent;margin-bottom:0;padding:0;' class="cu-list grid"
  26. :class="['col-' + gridCol,gridBorder?'':'no-border']">
  27. <view class="cu-item" v-for="(item,index) in gridList" :key="index" @click="gridClick(item, index)"
  28. v-if="index<gridCol*2">
  29. <view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
  30. <image :src="item.src" class="sign"></image>
  31. <text style="color: #333333;">{{item.name}}</text>
  32. </view>
  33. </view>
  34. </view>
  35. <view v-if="hasLogin" class="cover-container">
  36. <view class='cover-container-item'>
  37. <view style='font-size:16px;padding-left:14px;'>我的功能</view>
  38. <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
  39. <view class="cu-item" style='text-align:center;' v-for="(item,index) in gridList1" :key="index"
  40. @click="gridClick(item, index)" v-show="item.show">
  41. <view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
  42. <text v-if='item.num==3&&taskTip&&taskTip<100' class='badge_user'>{{taskTip}}</text>
  43. <text v-if='item.num==3&&taskTip&&taskTip>100' class='badge_user'>...</text>
  44. <image :src="item.src" class="sign1"></image>
  45. </view>
  46. <text style="color: #333333;">{{item.name}}</text>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  52. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
  53. showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
  54. </view>
  55. <!-- <view style="margin-top: 10rpx;">
  56. <web-view src="https://datav.aliyuncs.com/share/01de6913a5761ab4d3171b1f0b3e0704"></web-view>
  57. </view> -->
  58. <!-- <view style='text-align:center;'>
  59. <navigator
  60. url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/userAgreement.html"
  61. class="path" hover-class="navigator-hover">《服务协议》</navigator>
  62. <navigator
  63. url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/screctAgreement.html"
  64. class="path" hover-class="navigator-hover">《隐私政策》</navigator>
  65. </view> -->
  66. <!-- <view class="guess-section-wrap">
  67. <view class='flex justify-between'>
  68. <view class='title Medium'>工厂价格</view>
  69. </view>
  70. <view class=' guess-section-wrap-item clearfix' v-for='(item,index1) in plantList' :key="index1">
  71. <view class='factory'>{{item.factory}}</view>
  72. <view class='wrap'>{{item.city}} {{item.factoryType}}</view>
  73. <view class='price'>
  74. <text class='currectprice '>{{item.price}}</text>
  75. 较昨日
  76. <image v-if='item.comparePrice>0' style="width:7.5px;height:9px;"
  77. src='../../static/img/homepage/shangsheng.png'></image>
  78. <image v-if='item.comparePrice<0' style="width:7.5px;height:9px;"
  79. src='../../static/img/homepage/xiajiang.png'></image>
  80. <text v-if='item.comparePrice>0' class='yesterday up'>{{item.comparePrice}}</text>
  81. <text v-if='item.comparePrice<0' class='yesterday down'>{{-item.comparePrice}}</text>
  82. <text v-if='item.comparePrice==0' class='yesterday'>-</text>
  83. </view>
  84. </view>
  85. </view>
  86. <u-back-top :scroll-top="scrollTop" mode="circle" icon="arrow-upward"></u-back-top> -->
  87. </view>
  88. </template>
  89. <script>
  90. import helper from '@/common/helper.js';
  91. import dragButton from "@/components/drag-button/drag-button.vue";
  92. import {
  93. mapState
  94. } from 'vuex';
  95. let startY = 0,
  96. moveY = 0,
  97. pageAtTop = true;
  98. export default {
  99. components: {
  100. dragButton
  101. },
  102. data() {
  103. return {
  104. isShowAlert: false,
  105. content: '您尚未登录,是否立即登录?',
  106. haveCompany: false,
  107. scrollTop: 0,
  108. inputShow: false,
  109. modalName: '',
  110. compName: '',
  111. mycarStyle: '',
  112. show: false,
  113. feild: undefined,
  114. inputContent: '',
  115. coverTransform: 'translateY(0px)',
  116. coverTransition: '0s',
  117. moving: false,
  118. footprintList: [],
  119. isVip: false,
  120. userInfoTmp: [],
  121. inputStatus: 'none',
  122. carInfo: [],
  123. plantList: [],
  124. headUrl: "../../static/img/myimg/YongHu@3x.png",
  125. userphone: "",
  126. gridCol: 4,
  127. gridBorder: false,
  128. username: "请更改昵称",
  129. companyList: [],
  130. gridList: [{
  131. num: 0,
  132. name: '认证',
  133. // icon: 'cuIcon-apps',
  134. src: '../../static/img/myimg/renzheng@3x.png',
  135. tips: 0,
  136. url: '/pages/attestation/index',
  137. show: true
  138. },
  139. {
  140. num: 1,
  141. name: '粮脉',
  142. // icon: 'cuIcon-apps',
  143. src: '../../static/img/myimg/liangmai@3x.png',
  144. tips: 0,
  145. url: '/pages/grain_pulse/my_grain_pulse',
  146. show: true
  147. },
  148. {
  149. num: 2,
  150. name: '发布',
  151. // icon: 'cuIcon-news',
  152. src: '../../static/img/myimg/fabu@3x.png',
  153. tips: 0,
  154. url: `/pages/release/release`,
  155. show: true
  156. },
  157. {
  158. num: 3,
  159. name: '货运收发',
  160. // icon: 'cuIcon-copy',
  161. src: '../../static/img/sign/receiveGoods@2x.png',
  162. tips: 0,
  163. url: `/pageA/freightTransport/index`,
  164. show: true
  165. },
  166. ],
  167. gridList1: [
  168. // {
  169. // num: 2,
  170. // name: '我的票据',
  171. // // icon: 'cuIcon-news',
  172. // src: '../../static/img/sign/piaoju@3x.png',
  173. // tips: 0,
  174. // url: `/pages/bill/index`,
  175. // show: true
  176. // },
  177. // {
  178. // num: 3,
  179. // name: '我的合同',
  180. // // icon: 'cuIcon-calendar',
  181. // src: '../../static/img/sign/myContract@2x.png',
  182. // tips: 0,
  183. // url: '/pageB/contract/contract',
  184. // show: true
  185. // },
  186. // {
  187. // num: 4,
  188. // name: '我的任务',
  189. // // icon: 'cuIcon-copy',
  190. // src: '../../static/img/sign/myTask@2x.png',
  191. // tips: 0,
  192. // url: '/pages/task/my_task',
  193. // show: true
  194. // },
  195. // {
  196. // num: 5,
  197. // name: '联系客服',
  198. // // icon: 'cuIcon-edit',
  199. // src: '../../static/img/sign/service.png',
  200. // tips: 0,
  201. // url: `/pages/erp/contactCustomerService/contactCustomerService`,
  202. // show: true
  203. // },
  204. // {
  205. // num: 6,
  206. // name: '数据报表',
  207. // // icon: 'cuIcon-edit',
  208. // src: '../../static/img/sign/shujubaobiao@2x.png',
  209. // tips: 0,
  210. // url: `/pages/user/report`,
  211. // show: false
  212. // },
  213. // {
  214. // num: 7,
  215. // name: '库点监控',
  216. // // icon: 'cuIcon-edit',
  217. // src: '../../static/img/sign/kudianjiankong@2x.png',
  218. // tips: 0,
  219. // url: `/pages/user/depotMonitoring`,
  220. // show: false
  221. // },
  222. // {
  223. // num: 8,
  224. // name: '库点收购',
  225. // // icon: 'cuIcon-edit',
  226. // src: '../../static/img/sign/kdsg.png',
  227. // tips: 0,
  228. // url: `/pages/user/depotAcquisition/depotAcquisition`,
  229. // show: true
  230. // },
  231. // {
  232. // num: 2,
  233. // name: '我的合同',
  234. // // icon: 'cuIcon-calendar',
  235. // src: '../../static/img/sign/myContract@2x.png',
  236. // tips: 0,
  237. // url: '/pageB/contract/contract',
  238. // show: true
  239. // },
  240. {
  241. num: 0,
  242. name: 'ERP业务',
  243. // icon: 'cuIcon-copy',
  244. src: '../../static/img/myimg/erp.png',
  245. tips: 0,
  246. url: `/pages/erp/index`,
  247. show: uni.getStorageSync('pcUserInfo') ? true : false
  248. },
  249. {
  250. num: 1,
  251. // name: '入库管理',
  252. name: '收购业务',
  253. // icon: 'cuIcon-copy',
  254. src: '../../static/img/myimg/sg.png',
  255. tips: 0,
  256. url: `/pages/erpbusiness/index`,
  257. show: uni.getStorageSync('pcUserInfo') ? true : false
  258. },
  259. {
  260. num: 2,
  261. name: '我的票据',
  262. // icon: 'cuIcon-news',
  263. src: '../../static/img/sign/piaoju@3x.png',
  264. tips: 0,
  265. url: `/pages/bill/index`,
  266. show: true
  267. },
  268. {
  269. num: 3,
  270. name: '我的任务',
  271. // icon: 'cuIcon-copy',
  272. src: '../../static/img/sign/myTask@2x.png',
  273. tips: 0,
  274. url: '/pages/task/my_task',
  275. show: uni.getStorageSync('pcUserInfo') ? true : false
  276. },
  277. {
  278. num: 4,
  279. name: '联系客服',
  280. // icon: 'cuIcon-edit',
  281. src: '../../static/img/sign/service.png',
  282. tips: 0,
  283. url: `/pages/erp/contactCustomerService/contactCustomerService`,
  284. show: true
  285. },
  286. {
  287. num: 5,
  288. name: '库点收购',
  289. // icon: 'cuIcon-edit',
  290. src: '../../static/img/sign/kdsg.png',
  291. tips: 0,
  292. url: `/pages/user/depotAcquisition/depotAcquisition`,
  293. show: true
  294. },
  295. {
  296. num: 6,
  297. name: '数据报表',
  298. // icon: 'cuIcon-edit',
  299. src: '../../static/img/sign/shujubaobiao@2x.png',
  300. tips: 0,
  301. url: `/pages/user/newReport`,
  302. show: uni.getStorageSync('pcUserInfo') ? true : false
  303. },
  304. {
  305. num: 7,
  306. name: '库点监控',
  307. // icon: 'cuIcon-edit',
  308. src: '../../static/img/sign/kudianjiankong@2x.png',
  309. tips: 0,
  310. url: `/pages/user/depotMonitoring`,
  311. show: uni.getStorageSync('pcUserInfo') ? true : false
  312. },
  313. {
  314. num: 8,
  315. name: 'OA办公',
  316. // icon: 'cuIcon-edit',
  317. src: '../../static/img/oa_office/oaOffice.png',
  318. tips: 0,
  319. url: `/pages/oa_office/the_oaOffice`,
  320. show: uni.getStorageSync('pcUserInfo') ? true : false
  321. },
  322. // {
  323. // num: 9,
  324. // name: '打卡',
  325. // // icon: 'cuIcon-edit',
  326. // src: '../../static/img/sign/daka.png',
  327. // tips: 0,
  328. // url: `/pages/clock/the_clock`,
  329. // show: true
  330. // },
  331. // {
  332. // num: 10,
  333. // name: '请假',
  334. // // icon: 'cuIcon-edit',
  335. // src: '../../static/img/sign/qingjia.png',
  336. // tips: 0,
  337. // url: `/pages/leave/the_leave`,
  338. // show: true
  339. // },
  340. // {
  341. // num: 11,
  342. // name: '加油',
  343. // // icon: 'cuIcon-edit',
  344. // src: '../../static/img/sign/jiayou.png',
  345. // tips: 0,
  346. // url: `/pages/fuelfilling/the_fuel_filling`,
  347. // show: true
  348. // },
  349. // {
  350. // num: 10,
  351. // name: '短途记录',
  352. // // icon: 'cuIcon-edit',
  353. // src: '../../static/img/sign/dt.png',
  354. // tips: 0,
  355. // url: `/pages/shortDistance/short_distance_record`,
  356. // show: true
  357. // }
  358. ],
  359. showTran: true,
  360. companyId: 1,
  361. current: 4
  362. }
  363. },
  364. // #ifndef MP
  365. onNavigationBarButtonTap(e) {
  366. const index = e.index;
  367. if (index === 0) {
  368. this.navTo('/pages/set/set');
  369. } else if (index === 1) {
  370. // #ifdef APP-PLUS
  371. const pages = getCurrentPages();
  372. const page = pages[pages.length - 1];
  373. const currentWebview = page.$getAppWebview();
  374. currentWebview.hideTitleNViewButtonRedDot({
  375. index
  376. });
  377. // #endif
  378. uni.navigateTo({
  379. url: '/pages/notice/notice'
  380. })
  381. }
  382. },
  383. // #endif
  384. computed: {
  385. ...mapState(['hasLogin', 'userInfo', 'clientId']),
  386. // 手机号中间4位加*
  387. starUserphone() {
  388. let reg = /^(\d{3})\d{4}(\d{4})$/;
  389. if (this.userphone) {
  390. return this.userphone.replace(reg, "$1****$2");
  391. }
  392. }
  393. },
  394. onPageScroll(e) {
  395. this.scrollTop = e.scrollTop;
  396. },
  397. onShow() {
  398. // uni.showLoading({
  399. // title: '加载中',
  400. // mask: true
  401. // })
  402. // console.log(111111111)
  403. this.pcUserInfo = uni.getStorageSync('pcUserInfo')
  404. if (this.pcUserInfo) {
  405. // console.log(2222222)
  406. for (var i = 0; i < this.gridList1.length; i++) {
  407. if (this.gridList1[i].num == 0 || this.gridList1[i].num == 1 || this.gridList1[i].num == 3 || this
  408. .gridList1[i].num == 6 || this.gridList1[i].num == 7 || this.gridList1[i].num == 8) {
  409. this.gridList1[i].show = true
  410. }
  411. }
  412. } else {
  413. // console.log(33333333)
  414. for (var i = 0; i < this.gridList1.length; i++) {
  415. if (this.gridList1[i].num == 0 || this.gridList1[i].num == 1 || this.gridList1[i].num == 3 || this
  416. .gridList1[i].num == 6 || this.gridList1[i].num == 7 || this.gridList1[i].num == 8) {
  417. this.gridList1[i].show = false
  418. }
  419. }
  420. }
  421. // console.log("uni.getStorageSync('compName1')")
  422. // console.log(uni.getStorageSync("compName1"))
  423. // if (uni.getStorageSync("compName1")) {
  424. // this.haveCompany = true
  425. // } else {
  426. // this.haveCompany = false
  427. // }
  428. this.isShow();
  429. uni.hideKeyboard()
  430. uni.showTabBar()
  431. uni.removeTabBarBadge({
  432. index: 4
  433. })
  434. this.loadData()
  435. console.log("hasLogin", this.hasLogin)
  436. var that = this
  437. if (this.userInfo) {
  438. if (!this.userInfo.avatarUrl) {
  439. this.headUrl = "../../static/img/myimg/YongHu@3x.png"
  440. } else {
  441. this.headUrl = this.userInfo.avatarUrl
  442. }
  443. this.username = this.userInfo.userName ? this.userInfo.userName : uni.getStorageSync("userInfo").data
  444. .userName
  445. this.userphone = this.userInfo.phone ? this.userInfo.phone : uni.getStorageSync("userInfo").data.phone
  446. this.$api.doRequest('get', '/newNoticeTask/query/noticeTasks').then(res => {
  447. console.log("noticeNumber", res)
  448. if (res.data.data) {
  449. let name = 'myTip';
  450. let value = res.data.data.total;
  451. that.$store.commit('$uStore', {
  452. name,
  453. value
  454. });
  455. if (value != 0 && value) {
  456. uni.setTabBarBadge({
  457. index: 4,
  458. text: value + ""
  459. })
  460. }
  461. name = 'taskTip';
  462. value = res.data.data.total;
  463. that.$store.commit('$uStore', {
  464. name,
  465. value
  466. });
  467. // name = 'contractTip';
  468. // value = res.data.data.contractTip;
  469. // that.$store.commit('$uStore', {
  470. // name,
  471. // value
  472. // });
  473. }
  474. })
  475. console.log("this.1111")
  476. // uni.getStorage({
  477. // key: 'compName1',
  478. // success: function (res) {
  479. // console.log("this.2222")
  480. // console.log(res.data);
  481. // if(res.data){
  482. // that.compName = res.data
  483. // that.haveCompany = true
  484. // }
  485. // },
  486. // fail() {
  487. // }
  488. // });
  489. console.log(uni.getStorageSync('compName1'))
  490. if(uni.getStorageSync('compName1')){
  491. that.compName = uni.getStorageSync('compName1').company
  492. }
  493. that.$api.doRequest('get', '/commonUser/getCompOwn', {
  494. phone: that.userInfo.phone
  495. }).then(res => {
  496. if (res.data.data) {
  497. // uni.hideLoading()
  498. that.companyList = res.data.data
  499. if(that.pcUserInfo){
  500. for(let i=0;i<that.companyList.length;i++){
  501. if(that.pcUserInfo.compId == that.companyList[i].compId){
  502. // uni.setStorageSync('compName1',that.companyList[i])
  503. uni.setStorageSync('compName1', {company:that.companyList[i].compName})
  504. that.compName = that.companyList[i].compName
  505. }
  506. }
  507. }
  508. // uni.setStorageSync('companyList', that.companyList)
  509. console.log("that.3333")
  510. console.log(that.companyList)
  511. if (that.companyList.length > 0) {
  512. console.log("this.compName1")
  513. console.log(that.compName)
  514. if (!that.compName) {
  515. console.log(111111111111)
  516. that.compName = that.companyList[0].compName
  517. uni.setStorageSync('compName1', {company:that.companyList[0].compName})
  518. }else{
  519. uni.setStorageSync('compName1', {company:that.compName})
  520. }
  521. console.log("this.compName2")
  522. console.log(that.compName)
  523. that.haveCompany = true
  524. } else {
  525. that.haveCompany = false
  526. }
  527. }
  528. })
  529. } else {
  530. this.headUrl = "../../static/img/myimg/YongHu@3x.png"
  531. this.username = "立即登录"
  532. }
  533. console.log("this.userInfo", this.userInfo)
  534. },
  535. methods: {
  536. alertBtn() {
  537. uni.navigateTo({
  538. url: '/pages/public/login'
  539. })
  540. },
  541. cancelClick() {
  542. this.isShowAlert = false
  543. },
  544. compconfirm(e) {
  545. var that = this
  546. uni.showLoading({
  547. title: '登录中',
  548. mask: true
  549. })
  550. console.log("clinetId", this.clientId)
  551. this.$api.doRequest('get', '/commonUser/login', {
  552. phone: this.userInfo.phone,
  553. password: "999999",
  554. cid: this.clientId
  555. }).then(res => {
  556. if (res.data.code == 200) {
  557. console.log("userInfo", res.data.data)
  558. uni.setStorageSync('userInfo', res.data.data)
  559. this.$api.doRequest('post', '/commonUser/api/loginQuickly', {
  560. mobilePhone: this.userInfo.phone,
  561. companyName: this.companyList[e[0]].compName,
  562. veriCode: "123456",
  563. }).then(res1 => {
  564. console.log("loginQuickly", res)
  565. uni.setStorageSync("cangid",'')
  566. if (res1.data.code == 200) {
  567. uni.setStorageSync('pcUserInfo', res1.data.data)
  568. uni.setStorageSync('compName1', that.companyList[e[0]].compName)
  569. that.compName = that.companyList[e[0]].compName
  570. helper.getListByUserId()
  571. } else {
  572. // that.$api.doRequest('post','/commonUser/api/loginQuickly',{mobilePhone: '14444444444',
  573. // veriCode: "123456",}).then(res2 => {
  574. // uni.setStorageSync('pcUserInfo', res2.data.data)
  575. // helper.getListByUserId()
  576. // })
  577. }
  578. that.$store.commit('login', res.data.data)
  579. var name = 'userInfo';
  580. var value = res.data.data;
  581. that.$store.commit('$uStore', {
  582. name,
  583. value
  584. });
  585. // that.liangxinLogin()
  586. // uni.switchTab({
  587. // url: '/pages/sale/information'
  588. // });
  589. uni.hideLoading()
  590. uni.hideKeyboard()
  591. uni.showTabBar()
  592. uni.removeTabBarBadge({
  593. index: 4
  594. })
  595. that.loadData()
  596. that.username = that.userInfo.userName ? that.userInfo.userName : uni
  597. .getStorageSync("userInfo").data
  598. .userName
  599. that.userphone = that.userInfo.phone ? that.userInfo.phone : uni
  600. .getStorageSync("userInfo").data.phone
  601. that.$api.doRequest('get', '/newNoticeTask/query/noticeTasks').then(res => {
  602. console.log("noticeNumber", res)
  603. if (res.data.data) {
  604. let name = 'myTip';
  605. let value = res.data.data.total;
  606. that.$store.commit('$uStore', {
  607. name,
  608. value
  609. });
  610. if (value != 0 && value) {
  611. uni.setTabBarBadge({
  612. index: 4,
  613. text: value + ""
  614. })
  615. }
  616. name = 'taskTip';
  617. value = res.data.data.total;
  618. that.$store.commit('$uStore', {
  619. name,
  620. value
  621. });
  622. // name = 'contractTip';
  623. // value = res.data.data.contractTip;
  624. // that.$store.commit('$uStore', {
  625. // name,
  626. // value
  627. // });
  628. }
  629. })
  630. that.$api.msg('切换成功')
  631. })
  632. } else {
  633. uni.hideLoading()
  634. uni.showToast({
  635. title: res.data.message,
  636. icon: 'none',
  637. duration: 2000
  638. })
  639. }
  640. })
  641. .catch(res => {
  642. console.log(res);
  643. });
  644. // var that = this
  645. // this.$api.doRequest('post', '/commonUser/api/loginQuickly', {
  646. // mobilePhone: this.userInfo.phone,
  647. // companyName: this.companyList[e[0]].compName,
  648. // veriCode: "123456",
  649. // }).then(res1 => {
  650. // if (res1.data.code == 200) {
  651. // uni.setStorageSync('pcUserInfo', res1.data.data)
  652. // uni.setStorageSync('compName1', that.companyList[e[0]].compName)
  653. // that.compName = that.companyList[e[0]].compName
  654. // helper.getListByUserId()
  655. // that.$api.msg('切换成功')
  656. // } else {
  657. // that.$api.doRequest('post', '/commonUser/api/loginQuickly', {
  658. // mobilePhone: '14444444444',
  659. // companyName: this.companyList[e[0]].compName,
  660. // veriCode: "123456",
  661. // }).then(res2 => {
  662. // uni.setStorageSync('pcUserInfo', res2.data.data)
  663. // uni.setStorageSync('compName1', that.companyList[e[0]].compName)
  664. // that.compName = that.companyList[e[0]].compName
  665. // helper.getListByUserId()
  666. // that.$api.msg('切换成功')
  667. // })
  668. // }
  669. // })
  670. },
  671. getRoles: function(role) {
  672. let _roles = uni.getStorageSync('rolesList')
  673. for (let i = 0; i < _roles.length; i++) {
  674. if (_roles[i] == role) {
  675. return true
  676. }
  677. }
  678. return false
  679. },
  680. isShow() {
  681. for (let k = 0; k < this.gridList1.length; k++) {
  682. if (k == 6) {
  683. this.gridList1[k].show = this.getRoles('reportData.view')
  684. } else if (k == 7) {
  685. this.gridList1[k].show = this.getRoles('monitoring.view')
  686. }
  687. }
  688. },
  689. smBtnClick() {
  690. if (!this.hasLogin) {
  691. this.isShowAlert = true;
  692. // uni.showModal({
  693. // title: '提示',
  694. // content: '您尚未登录,是否立即登录?',
  695. // showCancel: true,
  696. // confirmText: '登录',
  697. // success: (e) => {
  698. // if (e.confirm) {
  699. // uni.navigateTo({
  700. // url: '/pages/public/login'
  701. // })
  702. // }
  703. // },
  704. // fail: () => {},
  705. // complete: () => {}
  706. // })
  707. } else {
  708. uni.scanCode({
  709. success: function(res) {
  710. console.log('条码内容:' + res.result);
  711. uni.navigateTo({
  712. url: "/pages/erpbusiness/sm/sm?data=" + res.result
  713. })
  714. }
  715. });
  716. }
  717. },
  718. fankui() {
  719. uni.navigateTo({
  720. url: `/pages/user/fankui`
  721. })
  722. },
  723. zhibo() {
  724. uni.navigateTo({
  725. url: `/pageB/video/broadcast`
  726. })
  727. },
  728. look() {
  729. uni.navigateTo({
  730. url: `/pageB/video/look`
  731. })
  732. },
  733. contactUs() {
  734. const that = this
  735. uni.makePhoneCall({
  736. // 手机号
  737. phoneNumber: '18241771147',
  738. // 成功回调
  739. success: (res) => {},
  740. // 失败回调
  741. fail: (res) => {}
  742. });
  743. },
  744. loadData() {
  745. // 工厂价格
  746. // let that = this
  747. // that.$api.request('news', 'getFactoryPriceInfo', {
  748. // category: this.category,
  749. // page: 1,
  750. // limit: 99999
  751. // }, failres => {
  752. // that.$api.msg(failres.errmsg)
  753. // this.isLoadMore = false
  754. // this.loadStatus = 'nomore'
  755. // if (this.pages > 1) {
  756. // this.pages = 1
  757. // }
  758. // uni.hideLoading()
  759. // }).then(res => {
  760. // let data = res.data
  761. // that.plantList = data
  762. // // that.makeScrollData(that.plantList, 8)
  763. // uni.hideLoading()
  764. // })
  765. // const that = this
  766. // if(uni.getStorageSync("PageCur")){
  767. // that.PageCur = uni.getStorageSync("PageCur");
  768. // }
  769. // that.userInfoTmp = uni.getStorageSync("userInfo")
  770. // uni.showLoading({
  771. // title: '正在加载',
  772. // mask:true
  773. // })
  774. // that.$api.request('integral', 'getIndexData', failres => {
  775. // that.$api.msg(failres.errmsg)
  776. // uni.hideLoading()
  777. // }).then(res => {
  778. // let data = res.data
  779. // uni.setStorageSync("message", data.message);
  780. // uni.setStorageSync("task", data.task);
  781. // uni.setStorageSync("contract", data.contract);
  782. // uni.setStorageSync('showTran', data.showTran);
  783. // that.showTran = data.showTran
  784. // that.gridList[4].tips = data.task
  785. // that.gridList[2].tips = data.contract
  786. // that.companyId = data.companyId
  787. // uni.hideLoading()
  788. // })
  789. },
  790. gridClick(item, index) {
  791. var that = this
  792. if (item.name == "退出登录") {
  793. this.logout()
  794. return;
  795. } else if (item.name == "联系我们") {
  796. //#ifdef MP
  797. this.inputShow = true
  798. this.inputStatus = 'inline'
  799. this.feild = "nickname"
  800. this.inputContent = ''
  801. //#endif
  802. //#ifdef APP-PLUS
  803. this.contactUs()
  804. //#endif
  805. return;
  806. } else if (item.name == '我的车辆') {
  807. const that = this
  808. uni.showLoading({
  809. title: '正在加载',
  810. mask: true
  811. })
  812. that.$api.request('tran', 'getMyCarList', failres => {
  813. that.$api.msg(failres.errmsg)
  814. uni.hideLoading()
  815. }).then(res => {
  816. that.carInfo = res.data
  817. if (that.carInfo.length == 0) {
  818. that.$api.msg('暂无车辆信息')
  819. } else {
  820. var height = that.carInfo.length * 100
  821. var width = 500
  822. that.mycarStyle = "height:" + height + "rpx;width:" + width + "rpx"
  823. that.modalName = 'MycarModal'
  824. }
  825. uni.hideLoading()
  826. })
  827. return;
  828. }
  829. if (!this.hasLogin) {
  830. this.isShowAlert = true;
  831. // uni.showModal({
  832. // title: '提示',
  833. // content: '您尚未登录,是否立即登录?',
  834. // showCancel: true,
  835. // confirmText: '登录',
  836. // success: (e) => {
  837. // if (e.confirm) {
  838. // uni.navigateTo({
  839. // url: '/pages/public/login'
  840. // })
  841. // }
  842. // },
  843. // fail: () => {},
  844. // complete: () => {}
  845. // })
  846. } else {
  847. if (item.url) {
  848. uni.navigateTo({
  849. url: item.url + `?companyId=${that.companyId}`
  850. })
  851. }
  852. }
  853. },
  854. setting() {
  855. if (!this.hasLogin) {
  856. this.isShowAlert = true;
  857. // uni.showModal({
  858. // title: '提示',
  859. // content: '您尚未登录,是否立即登录?',
  860. // showCancel: true,
  861. // confirmText: '登录',
  862. // success: (e) => {
  863. // if (e.confirm) {
  864. // uni.navigateTo({
  865. // url: '/pages/public/login'
  866. // })
  867. // }
  868. // },
  869. // fail: () => {},
  870. // complete: () => {}
  871. // })
  872. } else {
  873. uni.navigateTo({
  874. url: '/pages/user/setUp'
  875. })
  876. }
  877. },
  878. toLogin() {
  879. console.log("userInfo", this.userInfo)
  880. if (!this.hasLogin || !this.userInfo || this.username == "立即登录") {
  881. uni.navigateTo({
  882. url: '/pages/public/login_account_number'
  883. })
  884. } else {
  885. uni.navigateTo({
  886. url: '/pages/user/setUp'
  887. })
  888. }
  889. // else if(!this.userInfo.nickname){
  890. // this.inputShow = true
  891. // this.inputStatus = 'inline'
  892. // this.feild = "nickname"
  893. // this.inputContent = ''
  894. // }
  895. },
  896. confirm() {
  897. const that = this
  898. if (!that.inputContent) {
  899. that.$api.msg('输入不能为空')
  900. return
  901. }
  902. let obj = {}
  903. obj[that.feild] = that.inputContent
  904. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  905. that.userInfo.nickname = that.inputContent
  906. that.inputContent = ''
  907. that.$store.commit('login', that.userInfo)
  908. })
  909. },
  910. cancel() {
  911. this.inputShow = false
  912. this.inputStatus = 'none'
  913. this.genderShow = false
  914. },
  915. myAccount() {
  916. uni.navigateTo({
  917. url: `/pageA/pages/contract`
  918. })
  919. },
  920. logout() {
  921. // const that = this
  922. this.isShowAlert = true
  923. // uni.showModal({
  924. // title: '询问',
  925. // content: '您确定要退出吗?',
  926. // cancelText: '取消',
  927. // confirmText: '确定',
  928. // success: (e) => {
  929. // if (e.confirm) {
  930. // uni.hideTabBarRedDot({
  931. // index: 3
  932. // })
  933. // uni.clearStorageSync();
  934. // that.$store.commit('logout')
  935. // that.$api.logout()
  936. // uni.navigateTo({
  937. // url: `/pages/public/login`
  938. // })
  939. // }
  940. // }
  941. // })
  942. },
  943. /**
  944. * 统一跳转接口,拦截未登录路由
  945. * navigator标签现在默认没有转场动画,所以用view
  946. */
  947. navTo(url) {
  948. if (!this.hasLogin) {
  949. url = '/pages/public/login';
  950. }
  951. uni.navigateTo({
  952. url
  953. })
  954. },
  955. mycarClick(carNo) {
  956. this.modalName = null
  957. uni.navigateTo({
  958. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  959. })
  960. },
  961. qrClick(userInfo) {
  962. this.modalName = null
  963. uni.navigateTo({
  964. url: `/pages/user/qr`
  965. })
  966. },
  967. scanCode() {
  968. uni.scanCode({
  969. success: function(res) {
  970. uni.navigateTo({
  971. url: res.result
  972. })
  973. }
  974. })
  975. },
  976. hideModal(e) {
  977. this.modalName = null
  978. },
  979. }
  980. }
  981. </script>
  982. <style lang='scss' scoped>
  983. .company {
  984. position: fixed;
  985. right: 0;
  986. top: 10%;
  987. background: url('../../static/img/qiyebeijing.png');
  988. background-size: 100%;
  989. font-size: 11px;
  990. padding-bottom: 5px;
  991. padding-left: 10px;
  992. border-radius: 40rpx 0 0 40rpx;
  993. }
  994. .company .icon {
  995. position: relative;
  996. top: 4px;
  997. }
  998. page {
  999. background: #F8F9FC;
  1000. }
  1001. .container {
  1002. padding-top: 85px;
  1003. padding-top: 35px;
  1004. background-color: #F5F6FA;
  1005. position: relative;
  1006. width: 100vw;
  1007. overflow: hidden;
  1008. background: url('~@/static/img/login/bg_slices/bg@3x.png');
  1009. background-size: 100% 100%;
  1010. margin: 0 auto;
  1011. height: calc(100vh - 0px);
  1012. }
  1013. .cu-tag.badge {
  1014. right: 26rpx;
  1015. }
  1016. .path {
  1017. color: #007aff;
  1018. display: inline-block;
  1019. text-align: center;
  1020. }
  1021. .icon {
  1022. margin-right: 10rpx;
  1023. }
  1024. .portrait-box {
  1025. margin-top: 20rpx;
  1026. }
  1027. .qr-wrap {
  1028. margin-top: 20upx;
  1029. color: #fff;
  1030. font-size: 32rpx;
  1031. }
  1032. .cu-list {
  1033. /* height: 483rpx;
  1034. overflow-y: scroll; */
  1035. margin-top: 16rpx;
  1036. margin-bottom: 80rpx;
  1037. }
  1038. .cu-list.grid>.cu-item .badge_user {
  1039. color: #fff;
  1040. display: flex;
  1041. justify-content: center;
  1042. align-items: center;
  1043. border: 1px solid #fff;
  1044. background-color: #f43530;
  1045. padding: 4px;
  1046. position: absolute;
  1047. font-size: 12px;
  1048. font-weight: 700;
  1049. width: 22px;
  1050. height: 22px;
  1051. right: 19px;
  1052. top: -12px;
  1053. z-index: 2;
  1054. border-radius: 50%;
  1055. }
  1056. @keyframes move_wave {
  1057. 0% {
  1058. transform: translateX(0) translateZ(0) scaleY(1)
  1059. }
  1060. 50% {
  1061. transform: translateX(-25%) translateZ(0) scaleY(0.55)
  1062. }
  1063. 100% {
  1064. transform: translateX(-50%) translateZ(0) scaleY(1)
  1065. }
  1066. }
  1067. .bg {
  1068. position: relative;
  1069. height: 300rpx;
  1070. /* background: linear-gradient(to bottom, #56ccf2, #2f80ed); */
  1071. /*background: linear-gradient(to bottom, #0be9fe, #4bb0fe); */
  1072. background: linear-gradient(to bottom, #d5f8ff, #56ccf2);
  1073. }
  1074. .bg_ware {
  1075. position: absolute;
  1076. left: 0;
  1077. bottom: -2rpx;
  1078. width: 100%;
  1079. mix-blend-mode: screen;
  1080. height: 224rpx;
  1081. }
  1082. %flex-center {
  1083. display: flex;
  1084. flex-direction: column;
  1085. justify-content: center;
  1086. align-items: center;
  1087. }
  1088. %section {
  1089. display: flex;
  1090. justify-content: space-around;
  1091. align-content: center;
  1092. background: #fff;
  1093. border-radius: 10upx;
  1094. }
  1095. .grid-item-box {
  1096. flex: 1;
  1097. /* position: relative;
  1098. */
  1099. /* #ifndef APP-NVUE */
  1100. display: flex;
  1101. /* #endif */
  1102. flex-direction: column;
  1103. align-items: center;
  1104. justify-content: center;
  1105. padding: 15px 0;
  1106. }
  1107. .user-section {
  1108. height: 520upx;
  1109. padding: 100upx 30upx 0;
  1110. position: relative;
  1111. .bg {
  1112. position: absolute;
  1113. left: 0;
  1114. top: 0;
  1115. width: 100%;
  1116. height: 100%;
  1117. filter: blur(1px);
  1118. box-shadow: 0px 1px 8px #ccc;
  1119. /* background:linear-gradient(#0eb0c9,#126bae); */
  1120. /* opacity: .7; */
  1121. }
  1122. }
  1123. .user-info-box {
  1124. height: 180upx;
  1125. /* display:flex; */
  1126. /* align-items:center; */
  1127. text-align: center;
  1128. position: relative;
  1129. z-index: 1;
  1130. .portrait {
  1131. width: 130upx;
  1132. height: 130upx;
  1133. border: 5upx solid #fff;
  1134. border-radius: 50%;
  1135. }
  1136. .username {
  1137. font-size: $font-lg + 3upx;
  1138. color: #fff;
  1139. margin-top: 20upx;
  1140. }
  1141. }
  1142. .vip-card-box {
  1143. display: flex;
  1144. flex-direction: column;
  1145. color: #f7d680;
  1146. height: 240upx;
  1147. background: linear-gradient(left, rgba(0, 0, 0, .7), rgba(0, 0, 0, .8));
  1148. border-radius: 16upx 16upx 0 0;
  1149. overflow: hidden;
  1150. position: relative;
  1151. padding: 20upx 24upx;
  1152. .card-bg {
  1153. position: absolute;
  1154. top: 20upx;
  1155. right: 0;
  1156. width: 380upx;
  1157. height: 260upx;
  1158. }
  1159. .b-btn {
  1160. position: absolute;
  1161. right: 20upx;
  1162. top: 16upx;
  1163. width: 132upx;
  1164. height: 40upx;
  1165. text-align: center;
  1166. line-height: 40upx;
  1167. font-size: 22upx;
  1168. color: #36343c;
  1169. border-radius: 20px;
  1170. background: linear-gradient(left, #f9e6af, #ffd465);
  1171. z-index: 1;
  1172. }
  1173. .tit {
  1174. font-size: $font-base+2upx;
  1175. color: #f7d680;
  1176. margin-bottom: 28upx;
  1177. .yticon {
  1178. color: #f6e5a3;
  1179. margin-right: 16upx;
  1180. }
  1181. }
  1182. .e-b {
  1183. font-size: $font-sm;
  1184. color: #d8cba9;
  1185. margin-top: 10upx;
  1186. }
  1187. }
  1188. .cover-container {
  1189. padding: 1px 10px;
  1190. padding-bottom: 20rpx;
  1191. /* background-color: #F5F6FA; */
  1192. /* border-radius: 20px; */
  1193. margin-top: 12upx;
  1194. .arc {
  1195. position: absolute;
  1196. left: 0;
  1197. top: -34upx;
  1198. width: 100%;
  1199. height: 36upx;
  1200. }
  1201. }
  1202. .tj-sction {
  1203. @extend %section;
  1204. .tj-item {
  1205. @extend %flex-center;
  1206. flex-direction: column;
  1207. height: 140upx;
  1208. font-size: $font-sm;
  1209. color: #75787d;
  1210. }
  1211. .num {
  1212. font-size: $font-lg;
  1213. color: $font-color-dark;
  1214. margin-bottom: 8upx;
  1215. }
  1216. }
  1217. .order-section {
  1218. @extend %section;
  1219. padding: 28upx 0;
  1220. margin-top: 20upx;
  1221. .order-item {
  1222. @extend %flex-center;
  1223. width: 120upx;
  1224. height: 120upx;
  1225. border-radius: 10upx;
  1226. font-size: $font-sm;
  1227. color: $font-color-dark;
  1228. }
  1229. .yticon {
  1230. font-size: 48upx;
  1231. margin-bottom: 18upx;
  1232. color: #fa436a;
  1233. }
  1234. .icon-shouhoutuikuan {
  1235. font-size: 44upx;
  1236. }
  1237. }
  1238. .history-section {
  1239. padding: 30upx 0 0;
  1240. margin-top: 20upx;
  1241. background: #fff;
  1242. border-radius: 10upx;
  1243. .sec-header {
  1244. display: flex;
  1245. align-items: center;
  1246. font-size: $font-base;
  1247. color: $font-color-dark;
  1248. line-height: 40upx;
  1249. margin-left: 30upx;
  1250. .yticon {
  1251. font-size: 44upx;
  1252. color: #5eba8f;
  1253. margin-right: 16upx;
  1254. line-height: 40upx;
  1255. }
  1256. }
  1257. .h-list {
  1258. white-space: nowrap;
  1259. padding: 30upx 30upx 0;
  1260. image {
  1261. display: inline-block;
  1262. width: 160upx;
  1263. height: 160upx;
  1264. margin-right: 20upx;
  1265. border-radius: 10upx;
  1266. }
  1267. }
  1268. }
  1269. .grid {
  1270. display: flex;
  1271. align-items: center;
  1272. flex-wrap: wrap;
  1273. /* border-top: 2upx solid rgba(172,172,172,.2); */
  1274. .grid-item-3 {
  1275. box-sizing: border-box;
  1276. width: calc(100% / 3);
  1277. border-bottom: 2upx solid rgba(172, 172, 172, .2);
  1278. border-right: 2upx solid rgba(172, 172, 172, .2);
  1279. text-align: center;
  1280. padding: 40upx 0;
  1281. position: relative;
  1282. /* view{
  1283. font-size: $font-sm;
  1284. margin-top: 16upx;
  1285. color: $font-color-dark;
  1286. } */
  1287. .grid_icon {
  1288. font-size: 48upx;
  1289. margin-bottom: 18upx;
  1290. color: #fa436a;
  1291. }
  1292. .tip_text {
  1293. display: block;
  1294. padding: 4upx 8upx;
  1295. text-align: center;
  1296. border-radius: 36upx;
  1297. font-size: 24upx;
  1298. background-color: #fa436a;
  1299. color: rgba(255, 255, 255, 1);
  1300. position: absolute;
  1301. right: 6upx;
  1302. top: 6upx;
  1303. }
  1304. }
  1305. .grid-item-3:nth-child(3n + 3),
  1306. .grid-item-4:nth-child(4n + 4) {
  1307. border-right: none;
  1308. }
  1309. }
  1310. .headPortrait {
  1311. width: 112rpx;
  1312. height: 112rpx;
  1313. border-radius: 40px;
  1314. border: 2px solid #ffffff;
  1315. }
  1316. .personal {
  1317. margin-top: 10px;
  1318. margin-left: 10px;
  1319. }
  1320. .information {
  1321. font-size: 15px;
  1322. font-weight: 600;
  1323. height: 60rpx;
  1324. }
  1325. .indexlow {
  1326. /* margin-top: 30px; */
  1327. border-radius: 10px;
  1328. }
  1329. .cu-list>.cu-item:after {
  1330. border: none;
  1331. }
  1332. .sign {
  1333. width: 35px;
  1334. height: 35px;
  1335. top: 4px;
  1336. }
  1337. .sign1 {
  1338. width: 26px;
  1339. height: 26px;
  1340. top: 4px;
  1341. }
  1342. .indexUp {
  1343. padding: 0 20px;
  1344. align-items: center;
  1345. }
  1346. .cu-list.grid>.cu-item .cu-tag.badge {
  1347. color: #fff;
  1348. background: #FF6600;
  1349. font-size: 9px;
  1350. line-height: 5px;
  1351. padding: 5px;
  1352. }
  1353. .cover-container-item {
  1354. background: #fff;
  1355. border-radius: 10px;
  1356. padding: 10px 0;
  1357. }
  1358. .cover-container-item .cu-list {
  1359. margin: 0;
  1360. }
  1361. .cover-container-item .cu-list.grid>.cu-item [class*=cuIcon] {
  1362. margin: 0;
  1363. }
  1364. .guess-section-wrap-item {
  1365. float: left;
  1366. width: 38vw;
  1367. background: #F9F9FA;
  1368. padding: 7px;
  1369. margin: 20rpx;
  1370. border-radius: 3px;
  1371. // width:50%;
  1372. }
  1373. .guess-section-wrap-item:first-child {
  1374. // margin-left:2px;
  1375. }
  1376. .clearfix:after {
  1377. content: "";
  1378. display: block;
  1379. clear: both;
  1380. }
  1381. .guess-section-wrap {
  1382. padding: 15px;
  1383. margin: 10rpx 20rpx;
  1384. border-radius: 5px;
  1385. background: #fff;
  1386. overflow: hidden;
  1387. }
  1388. .guess-section-wrap .price {
  1389. color: #B2B3BB;
  1390. display: flex;
  1391. align-items: center;
  1392. }
  1393. .title {
  1394. font-size: 28upx;
  1395. color: $font-color-dark;
  1396. font-weight: bold;
  1397. height: 50upx;
  1398. line-height: 50upx;
  1399. flex: 2.5;
  1400. }
  1401. .factory {
  1402. font-size: 26rpx;
  1403. font-weight: 900;
  1404. }
  1405. .currectprice {
  1406. color: rgba(253, 113, 79, 1);
  1407. font-size: 18px;
  1408. font-weight: 550;
  1409. vertical-align: middle;
  1410. margin-right: 10px;
  1411. }
  1412. .yesterday {
  1413. font-size: 14px;
  1414. font-weight: 600;
  1415. vertical-align: middle;
  1416. }
  1417. .yesterday.up {
  1418. color: rgba(253, 113, 79, 1);
  1419. }
  1420. .yesterday.down {
  1421. color: #22C572;
  1422. }
  1423. </style>