user.vue 26 KB

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