index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  1. <template>
  2. <view>
  3. <view @touchstart="touchStart" @touchmove="move" @touchend="end">
  4. <view class="cons" :style="'height:'+systems.windowHeights+'rpx;'">
  5. <view class="banner">
  6. <image :src="merchant.mainGraph" mode="aspectFill" :style="'height:'+(500+conTop) + 'rpx;'" :class="isPlay==1?'isPlay':isPlay==2?'isPlaasf':''"></image>
  7. </view>
  8. <!-- <view @click="saoma()" style="z-index: 999;position: relative;">扫码</view> -->
  9. <view class="con-ss" :style="'top:'+conTop+'rpx'">
  10. <view class="top">
  11. <view class="merchant ddflex" v-if="merchant">
  12. <image :src="merchant.logo" mode="aspectFill" class="m-logo"></image>
  13. <view class="fflex" v-if="merchant && merchant.title">
  14. <view class="m-name ddflex">
  15. <view @click="jumpUrl('/topic/about/about?id='+merchant.id)">{{ getMerchantTitle() }}</view>
  16. <view class="change ddflex" @click="merchantFun()" v-if="config.Many_Store == 1">切换门店<image src="../../static/pages/images/change.png"></image></view>
  17. </view>
  18. <view class="m-bot ddflex" v-if="merchant.label">
  19. <view class="m-tag ddflex fflex">
  20. <text v-for="(it,idx) in merchant.label.split(',')" :key="index">{{it}}</text>
  21. </view>
  22. <!-- <image :src="picUrlss+'lvluo/gsjs_ico.png'" class="gsjs-ico" @click.stop="jumpUrl('/topic/about/about')"></image> -->
  23. </view>
  24. </view>
  25. <view class="fflex" v-else>
  26. <view class="m-name ddflex">
  27. 绿萝云·私域诊所系统
  28. <image src="../../static/pages/images/change.png"></image>
  29. </view>
  30. <view class="m-bot ddflex">
  31. <view class="m-tag ddflex fflex">
  32. <text>医疗营业许可</text>
  33. <text>到店分期</text>
  34. </view>
  35. <image :src="picUrlss+'lvluo/gsjs_ico.png'" class="gsjs-ico" @click.stop="jumpUrl('/topic/about/about')"></image>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="card" :style="'height:'+cardHeight+'rpx;'">
  40. <image :src="picUrlss+'lvluo/logo_lv.png'" class="logo"></image>
  41. <image :src="picUrlss+'lvluo/card_logo.png'" class="card-logo"></image>
  42. <view class="card-top">
  43. <view class="card-no">NO.{{userinfoVip.userCode?userinfoVip.userCode:'000000'}}</view>
  44. <view class="card-info ddflex">
  45. <view class="fflex">
  46. <view class="card-name">{{userinfoVip.levelName?userinfoVip.levelName:'家庭爱牙卡'}}</view>
  47. <view class="card-user">{{userinfoVip.realName?userinfoVip.realName:userinfoVip.nickName?userinfoVip.nickName:'代名'}}<text>{{userinfoVip.cardNo ? userinfoVip.cardNo:'8888**********8888'}}</text></view>
  48. </view>
  49. <image :src="picUrlss+'lvluo/card_ma.png'" class="card-ma" @click="jumpUrl('/mine/payCode/payCode')"></image>
  50. </view>
  51. <image :src="userinfoVip.icon" mode="heightFix" class="vip-img" v-if="userinfoVip.icon"></image>
  52. </view>
  53. <view class="card-bot">
  54. <view class="datas ddflex">
  55. <view class="li" @click="jumpUrl('/wallet/index/index')">
  56. <view class="numbers" v-if="isShowBalance">{{userInfo.balance ? userInfo.balance : 0}}</view>
  57. <view class="numbers" v-else>****</view>
  58. <view class="ddflex">余额<image :src="picUrlss+(isShowBalance?'lvluo/eye_shows.png':'lvluo/eye_hides.png')" class="card-eye" @click.stop="optBalance"></image></view>
  59. </view>
  60. <view class="li" @click="jumpUrl('/service/secondCard/secondCard')">
  61. <view class="numbers">{{cardCount?cardCount:0}}</view>
  62. <view>权益卡</view>
  63. </view>
  64. <view class="li" @click="jumpUrl('/mine/coupons/coupons')">
  65. <view class="numbers">{{userInfo.coupon?userInfo.coupon:0}}</view>
  66. <view>优惠券</view>
  67. </view>
  68. </view>
  69. <block v-if="doctor&&doctor.id">
  70. <view class="zhuanshu-t ddflex">
  71. <image :src="picUrlss+'lvluo/card_zhuanshu.png'"></image>
  72. </view>
  73. <view class="zhuanshu-info ddflex" @click="jumpUrl('/topic/teacherDet/teacherDet?id='+doctor.id)">
  74. <image :src="doctor.headUrl ? doctor.headUrl : picUrlss+'lvluo/zhuanshu_img.png'" mode="aspectFill" class="zhuanshu-img"></image>
  75. <view class="fflex">
  76. <view class="zhuanshu-name ddflex">{{doctor.username}}<text v-if="doctor.label"><block v-for="(it,idx) in doctor.label.split(',')" :key="idx" v-if="idx == 0">{{it}}</block></text></view>
  77. <view class="zhuanshu-mobile">{{doctor.mobile}}</view>
  78. </view>
  79. <image :src="picUrlss+'lvluo/zhuanshu_weixin.png'" class="zhuanshu-weixin"></image>
  80. </view>
  81. </block>
  82. </view>
  83. <button class="open-card ddflex" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" hover-class="none" v-if="!userinfoVip.levelGrade || (userinfoVip.levelGrade > 0 && userinfoVip.end)">
  84. <image :src="picUrlss+'lvluo/open_ico.png'"></image>
  85. <view>一键领取健康卡</view>
  86. </button>
  87. </view>
  88. </view>
  89. <view class="bottom">
  90. <view class="bot-name">湖南绿萝口腔集团有限公司</view>
  91. <view class="bot-xuke ddflex">医疗执业许可证<image :src="picUrlss+'lvluo/bot_xuke.png'" @click="scanCode()"></image></view>
  92. </view>
  93. </view>
  94. </view>
  95. <view class="coupon" @click="jumpUrl('/product/couponList/index')">
  96. <view class="coupon-img"><image :src="picUrlss+'lvluo/quan_img.png'"></image></view>
  97. <view class="coupon-text">领券中心</view>
  98. </view>
  99. <navigator :url="'/other/contact/index?id='+advisor.id" hover-class="none" class="contact" v-if="advisor&&advisor.id">
  100. <image :src="advisor.headUrl ? advisor.headUrl : picUrlss+'lvluo/fixed_img.png'" mode="aspectFill"></image>
  101. <view class="contact-text">{{advisor.realName}}<text>服务顾问</text></view>
  102. </navigator>
  103. <button open-type="contact" hover-class="none" class="contact" v-else>
  104. <image :src="picUrlss+'lvluo/fixed_img.png'"></image>
  105. <view class="contact-text">杨经理<text>服务顾问</text></view>
  106. </button>
  107. </view>
  108. <!-- <button open-type="contact" hover-class="none" class="contact" v-else>
  109. <image :src="picUrlss+'lvluo/fixed_img.png'"></image>
  110. <view class="contact-text">杨经理<text>健康顾问</text></view>
  111. </button> -->
  112. <footer-copyright></footer-copyright>
  113. <!-- #ifdef MP-WEIXIN -->
  114. <foot channel="home" :isUpdate="isUpdate"></foot>
  115. <!-- #endif -->
  116. <update-userinfo
  117. :update-info="isUpdateInfo"
  118. :update-mobile="isUpdateMobile"
  119. v-if="isShowUpdate"
  120. @closeUpdate="closeUpdate"
  121. @updateInfo="updateInfo"
  122. @updateMobile="updateMobile"
  123. ></update-userinfo>
  124. <!-- #ifdef H5 -->
  125. <wx-share ref="wxshare" />
  126. <!-- #endif -->
  127. </view>
  128. </template>
  129. <script>
  130. //index.js
  131. //获取应用实例
  132. const app = getApp();
  133. const req = require('../../utils/request.js');
  134. const api = require('../../utils/api.js');
  135. const utils = require('../../utils/util.js');
  136. const mes = require('../../utils/requestmessage.js');
  137. const route = require('../../utils/route');
  138. const QQMapWX = require('../../utils/qqmap.js');
  139. import foot from '../../components/nav-bar/index';
  140. import footerCopyright from '../../components/footer-copyright/footer-copyright';
  141. export default {
  142. data() {
  143. return {
  144. picUrlss: req.public.picUrls,
  145. isUpdate: false, // 是否更新消息
  146. config: {},
  147. systems: {},
  148. merchant: '',
  149. cardHeight: 800,
  150. userinfoVip: {},
  151. userInfo: {},
  152. clientData: {
  153. // 用户手指Y轴
  154. clientStartY: '', //开始按下的位置
  155. clientMoveY: '', //按下
  156. clientEndY: '', //抬起
  157. // 页面Y轴
  158. pageY: ''
  159. },
  160. sheight: 100,
  161. isPlay: 0, //是否播放动画
  162. isRefresh: true,
  163. cardCount: '',//次卡数量
  164. isShowBalance: true,
  165. chatPrams: '',//客服类型
  166. conTop: '',
  167. pxToRpxScale: '',//比例
  168. doctor: '',//专属医生
  169. advisor: '',//服务顾问
  170. sessionKey: '',
  171. scene: '',
  172. isShowUpdate: false, //是否显示更新信息弹窗
  173. isUpdateInfo: false, //更新用户信息
  174. isUpdateMobile: false, //绑定手机号
  175. };
  176. },
  177. components: {
  178. foot,
  179. footerCopyright
  180. },
  181. props: {},
  182. onLoad: async function(options) {
  183. this.query = options;
  184. console.log('首页参数',options,options.scene)
  185. if(options.scene){
  186. this.scene = options.scene;
  187. await this.loadCode();
  188. }else{
  189. req.silenceLogin(options.userId, '');
  190. }
  191. QQMapWX.initMap(req.public.mapLBSKEY);
  192. req.getLocation(res => {
  193. const to = {
  194. latitude: res.latitude,
  195. longitude: res.longitude
  196. };
  197. QQMapWX.reverseGeocoder(to, resp => {
  198. if(req.isAuth()){
  199. this.getuserVip();
  200. this.getUserInfo();
  201. this.getCardCount();
  202. this.getShowUpdata();
  203. }
  204. });
  205. });
  206. app.globalData.getCheckSessoin(json => {
  207. this.sessionKey = json.session_key;
  208. });
  209. },
  210. onHide(){
  211. if(this.isPlay == 1){
  212. this.isPlay = 2;
  213. }
  214. },
  215. async onShow() {
  216. let _ts = this;
  217. _ts.getChatPrams();
  218. if(isLogin){
  219. _ts.getuserVip();
  220. _ts.getUserInfo();
  221. _ts.getCardCount();
  222. }
  223. await this.getConfig().then(async res => {
  224. await _ts.getMerchant();
  225. if(this.isRefresh){
  226. await _ts.getViewInfo();
  227. }
  228. await _ts.getDoctor();
  229. await _ts.getAdvisor();
  230. });
  231. let isLogin = req.isAuth();
  232. },
  233. onShareAppMessage: function() {
  234. return this.onShareMessage();
  235. },
  236. onShareTimeline() {
  237. return {
  238. title: this.getShareTitle(),
  239. query: this.getSharePath()
  240. };
  241. },
  242. onUnload() {
  243. this.isPlay = 2;
  244. },
  245. onReady() {
  246. // #ifdef H5
  247. var that = this;
  248. //初始化分享内容
  249. setTimeout(function() {
  250. var shareContent = that.onShareMessage();
  251. if (shareContent) {
  252. shareContent.path = window.location.origin + shareContent.path;
  253. }
  254. console.log('分享内容》》》》》', shareContent);
  255. that.$refs.wxshare.init(shareContent);
  256. }, 4 * 1000);
  257. // #endif
  258. },
  259. methods: {
  260. onShareMessage(){
  261. return {
  262. title: this.getShareTitle(),
  263. path: this.getSharePath()
  264. };
  265. },
  266. getShowUpdata(){
  267. // #ifdef MP-WEIXIN||MP-TOUTIAO
  268. let userInfo = req.getStorage('userInfo');
  269. if (req.isAuth()) {
  270. setTimeout(res => {
  271. console.log('setTimeoutuserInfo》》》》', userInfo);
  272. if (!userInfo.avatar || userInfo.nickName == '微信用户') {
  273. this.isShowUpdate = true;
  274. this.isUpdateInfo = true;
  275. }
  276. if (userInfo.avatar && !userInfo.mobile && (this.userInfo && !this.userInfo.mobile)) {
  277. this.isShowUpdate = true;
  278. this.isUpdateMobile = true;
  279. }
  280. }, 2000);
  281. }
  282. // #endif
  283. },
  284. loadCode() {
  285. let _ts = this;
  286. console.log('解码参数scene==',_ts.scene)
  287. return new Promise((resolve, reject) => {
  288. let form = {
  289. scene: _ts.scene
  290. };
  291. req.getRequest('/api/code/params', form, data => {
  292. console.log('解码参数==',data)
  293. req.silenceLogin(data.userId, '');
  294. req.setStorage('pidCode', data.userId);
  295. resolve();
  296. });
  297. });
  298. },
  299. getPhoneNumber(event) {
  300. // console.log('绑定手机号==',event)
  301. const detail = event.detail;
  302. const _ts = this;
  303. if (!detail || !detail.encryptedData || !detail.iv) return false;
  304. req.postRequest('/api/weixin/mobile', {
  305. encryptedData: detail.encryptedData,
  306. iv: detail.iv,
  307. sessionKey: _ts.sessionKey
  308. }, res => {
  309. console.log('res==',res)
  310. if(res.mobile){
  311. var userInfo = req.getStorage('userInfo');
  312. userInfo.mobile = res.mobile;
  313. req.setStorage('userInfo', userInfo);
  314. _ts.jumpUrl('/open/info/index');
  315. }
  316. });
  317. },
  318. getDoctor(){
  319. return new Promise((resolve,reject)=>{
  320. req.getRequest('/api/v3/user/doctor',{},data=>{
  321. console.log('医生==',data)
  322. this.doctor = data;
  323. resolve();
  324. })
  325. })
  326. },
  327. getAdvisor(){
  328. return new Promise((resolve,reject)=>{
  329. req.getRequest('/api/distribution/advisorInfo',{},data=>{
  330. console.log('服务顾问==',data)
  331. this.advisor = data;
  332. resolve();
  333. })
  334. })
  335. },
  336. customerServiceChat() {
  337. let chatPrams = this.chatPrams;
  338. wx.openCustomerServiceChat({
  339. extInfo: {
  340. url: chatPrams.url
  341. },
  342. corpId: chatPrams.enterpriseId,
  343. success(res) {
  344. console.log('调用微信客服')
  345. }
  346. })
  347. },
  348. getChatPrams() {
  349. let that = this;
  350. let chatPrams = req.getStorage('chatService');
  351. if(chatPrams){
  352. that.chatPrams = chatPrams;
  353. that.type = chatPrams.type;
  354. console.log('type==', that.type)
  355. that.$forceUpdate();
  356. }
  357. },
  358. optBalance(){
  359. this.isShowBalance = !this.isShowBalance;
  360. req.setStorage('isShowBalance',this.isShowBalance);
  361. },
  362. touchStart(e){
  363. // console.log('开始移动==',e)
  364. this.clientData.clientStartY = e.changedTouches[0].clientY;
  365. },
  366. move(e) {
  367. // console.log('触摸移动==',e);
  368. if (this.clientData.pageY < 1) {
  369. let distance = e.changedTouches[0].clientY - this.clientData.clientStartY;
  370. if(this.isPlay != 1){
  371. if(distance > 0){
  372. if(distance > this.sheight){
  373. this.conTop = this.sheight*this.pxToRpxScale;
  374. }else{
  375. this.conTop = distance*this.pxToRpxScale;
  376. }
  377. }
  378. }
  379. if (distance > this.sheight) {
  380. this.isPlay = 1;
  381. this.conTop = 0;
  382. } else {
  383. return;
  384. }
  385. }
  386. },
  387. // 手指抬起
  388. end(e) {
  389. let endY = e.changedTouches[0].clientY;
  390. let subY = endY - this.clientData.clientStartY;
  391. this.conTop = 0;
  392. if (subY < -50) {
  393. console.log('上滑')
  394. if(subY*-1 > this.sheight){
  395. if(this.isPlay == 1){
  396. uni.pageScrollTo({
  397. duration: 300,
  398. scrollTop: 0
  399. })
  400. this.isPlay = 2;
  401. }
  402. }
  403. } else if (subY > 50) {
  404. console.log('下滑')
  405. if(subY > this.sheight){
  406. this.isPlay = 1;
  407. }else{
  408. uni.pageScrollTo({
  409. duration: 300,
  410. scrollTop: 0
  411. })
  412. }
  413. }else{
  414. uni.pageScrollTo({
  415. duration: 300,
  416. scrollTop: 0
  417. })
  418. }
  419. },
  420. getUserInfo(){
  421. req.getRequest('/api/user/my',{},data=>{
  422. this.userInfo = data;
  423. if(req.getStorage('isShowBalance') != ''){
  424. this.isShowBalance = req.getStorage('isShowBalance');
  425. }else{
  426. this.isShowBalance = true;
  427. }
  428. })
  429. },
  430. getCardCount(){
  431. req.getRequest('/api/v3/secondary/card/count',{},data=>{
  432. this.cardCount = data;
  433. })
  434. },
  435. getuserVip() {
  436. req.getRequest('/api/user/levelDetails', {}, data => {
  437. let expireTime = Array;
  438. if (data.expireTime) {
  439. expireTime = data.expireTime.split(' ');
  440. data.expireTime = data.expireTime.replace(/-/g, '/');
  441. }
  442. let nowTime = new Date().getTime();
  443. let endTime = new Date(data.expireTime).getTime();
  444. let times = parseInt((endTime - nowTime) / 1000);
  445. if(data.cardNo) data.cardNo = data.cardNo.replace(/(.{4}).*(.{4})/, '$1********$2');
  446. this.userinfoVip = data;
  447. this.userinfoVip.expireTime = expireTime[0];
  448. if (times <= 0) {
  449. this.userinfoVip.end = true;
  450. } else {
  451. this.userinfoVip.end = false;
  452. }
  453. });
  454. },
  455. getSharePath() {
  456. let path = '/pages/index/index?isShare=' + true+'&appId='+req.getStorage('appId');
  457. if (req.getStorage('userInfo')) {
  458. path += '&userId=' + req.getStorage('userInfo').id;
  459. }
  460. if (req.getStorage('MERCHANT') && req.getStorage('MERCHANT').id != null) {
  461. path += '&merchantId=' + req.getStorage('MERCHANT').id;
  462. if (req.getStorage('smallShop') && req.getStorage('MERCHANT').id != null) {
  463. path += '&shopId=' + req.getStorage('smallShop').id;
  464. }
  465. }
  466. return path;
  467. },
  468. getShareTitle() {
  469. let title = '';
  470. if (this.merchant && this.merchant.title && this.merchant.title != '默认门店') {
  471. title = this.merchant.title;
  472. } else {
  473. title = this.config.CONFIG_PROJECT_TITLE;
  474. }
  475. return (req.excludeSpecial(req.getStorage('userInfo').nickName) ? req.excludeSpecial(req.getStorage('userInfo').nickName) : '') + '为你推荐' + title;
  476. },
  477. /**
  478. * 显示门店标题
  479. */
  480. getMerchantTitle() {
  481. let title = '';
  482. if (this.merchant && this.merchant.title && this.merchant.title != '默认门店') {
  483. if (this.merchant.title.length > 12) {
  484. title = this.merchant.title.substring(0, 12) + '...';
  485. } else {
  486. title = this.merchant.title;
  487. }
  488. } else {
  489. title = this.config.CONFIG_PROJECT_TITLE;
  490. }
  491. return title;
  492. },
  493. callPhone() {
  494. uni.makePhoneCall({
  495. phoneNumber: this.merchant.phone
  496. });
  497. },
  498. merchantFun() {
  499. app.globalData.openPage('merchant/nearby/nearby');
  500. },
  501. getConfig() {
  502. return new Promise((resolve, reject) => {
  503. req.getRequest('/api/config', {}, data => {
  504. req.setStorage('configRes', JSON.stringify(data));
  505. this.config = data;
  506. resolve();
  507. });
  508. });
  509. },
  510. getMerchant() {
  511. let _ts = this;
  512. return new Promise((resolve, reject) => {
  513. api.getMerchant(_ts.query, req, data => {
  514. console.log('===', data);
  515. if (data == 1) {
  516. uni.showModal({
  517. title: '温馨提示',
  518. content: '获取定位失败,请前往设置打开定位权限',
  519. showCancel: false,
  520. success(res) {
  521. if (res.confirm) {
  522. // console.log('用户点击确定');
  523. uni.openSetting({
  524. success(res) {
  525. console.log(res.authSetting); // res.authSetting = {
  526. }
  527. });
  528. }
  529. }
  530. });
  531. } else {
  532. _ts.merchant = data;
  533. }
  534. resolve();
  535. });
  536. });
  537. },
  538. getViewInfo(){
  539. let that = this;
  540. const systemInfo = uni.getSystemInfoSync();
  541. let pxToRpxScale = 750 / systemInfo.windowWidth;
  542. return new Promise((resolve, reject) => {
  543. const query = uni.createSelectorQuery();
  544. query.select('.merchant').boundingClientRect(res => {
  545. let height = res.height*pxToRpxScale + res.top*pxToRpxScale+40
  546. that.cardHeight = that.systems.windowHeight - height;
  547. }).exec();
  548. setTimeout(res=>{
  549. query.select('.bottom').boundingClientRect(data => {
  550. let height = data.height*pxToRpxScale;
  551. that.cardHeight = that.cardHeight - height - 115 - that.systems.safeBottomHeight;
  552. that.isRefresh = false;
  553. }).exec();
  554. },200)
  555. resolve();
  556. })
  557. },
  558. jumpVip(url) {
  559. if (req.isLogins(true)) {
  560. let userInfo = req.getStorage('userInfo');
  561. if (userInfo.levelId && userInfo.levelId > 0) {
  562. uni.navigateTo({
  563. url: '/mine/vip/vip'
  564. });
  565. } else {
  566. uni.navigateTo({
  567. url: url
  568. });
  569. }
  570. }
  571. },
  572. jumpUrl(url) {
  573. if (req.isLogins(true)) {
  574. uni.navigateTo({
  575. url: url
  576. });
  577. }
  578. },
  579. scanCode() {
  580. var _this = this; // 允许从相机和相册扫码
  581. uni.scanCode({
  582. success: res => {
  583. console.log('扫码结果1111==',res)
  584. let path = res.path.split('?scene=')[0];
  585. let scene = res.path.split('?scene=')[1];
  586. let paths = '/'+path + '?scene=' +encodeURIComponent(scene);
  587. console.log('paths===',paths)
  588. uni.navigateTo({
  589. url: paths
  590. }); // this.scene = '1290926887903780865';
  591. }
  592. });
  593. },
  594. closeUpdate() {
  595. this.isShowUpdate = false;
  596. },
  597. updateInfo(e) {
  598. this.isUpdateInfo = e;
  599. this.getuserVip();
  600. this.getUserInfo();
  601. },
  602. updateMobile(e) {
  603. this.isUpdateMobile = e;
  604. this.jumpUrl('/open/info/index');
  605. },
  606. },
  607. beforeMount() {
  608. const systemInfo = uni.getSystemInfoSync();
  609. console.log('systemInfo==',systemInfo)
  610. // px转换到rpx的比例
  611. let pxToRpxScale = 750 / systemInfo.windowWidth;
  612. this.pxToRpxScale = pxToRpxScale;
  613. let systems = {
  614. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  615. navigationHeight: 44 * pxToRpxScale, // 导航栏的高度
  616. windowHeight: systemInfo.screenHeight * pxToRpxScale ,// 导航栏的高度
  617. safeBottomHeight: systemInfo.safeAreaInsets.bottom * pxToRpxScale
  618. };
  619. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  620. systems.windowHeights = systems.windowHeight - 115- systems.safeBottomHeight;
  621. // this.sheight = (500/pxToRpxScale)/2;
  622. this.systems = systems;
  623. console.log('systems==',systems)
  624. },
  625. onPageScroll(e) {
  626. this.clientData.pageY = e.scrollTop;
  627. },
  628. };
  629. </script>
  630. <style>
  631. @import './index.css';
  632. </style>