user.vue 26 KB

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