index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968
  1. <template>
  2. <scroll-view
  3. @scrolltolower="scrollTolower"
  4. :scroll-top="userScrollTop"
  5. scroll-y="true"
  6. class="container"
  7. @scroll="userScroll">
  8. <view class="top-cont">
  9. <view :class="fixedTop?'inner fixed':'inner'">
  10. <!-- 状态栏 -->
  11. <view :class="fixedTop?'status-bar es-bc-theme':'status-bar'" :style="{ background:headerBG }"></view>
  12. <view class="top-title-box show" :style="{ background:headerBG }">
  13. <view>个人中心</view>
  14. </view>
  15. </view>
  16. <view class="my-header-right inner fixed">
  17. <image src="@/static/image/my/set_icon.png" mode="aspectFill" @tap="navTo('./userInfo')"></image>
  18. <image :class="isNew ? 'badge':''" @tap="goToMsg()" src="@/static/image/hall/new_hall_icon.png" mode="aspectFill"></image>
  19. </view>
  20. <!-- 用于顶部固定定位后占位 -->
  21. <view :class="fixedTop?'seat show':'seat'"></view>
  22. <view class="mybox">
  23. <view class="mybox-info">
  24. <image class="heads es-br-ban" @tap="navToUserInfo('./userInfo')" :src="!$isEmpty(user.avatar)?user.avatar:avatar" mode="aspectFill"></image>
  25. <view>
  26. <view class="flex-center" @tap="navToUserInfo('./userInfo')">
  27. <text class="mybox-info-name">{{ isLogin&&user&&user.nickName || '请登录' }}</text>
  28. <image class="arrow_black" src="@/static/image/my/right_arrow_black_icon.png" mode="aspectFill"></image>
  29. </view>
  30. <view class="flex-center" style="margin-top: 22rpx;">
  31. <view class="flex-center vipbox" v-if="user.isVip==1" @click="loginNavTo('/pages/course/vipBuy')">
  32. <image class="arrow_black" src="@/static/image/my/lv_icon.png" mode="aspectFill"></image>
  33. <text>会员</text>
  34. </view>
  35. <view class="flex-center pointsbox" style="margin-left: 16rpx;" @click="loginNavTo('/pages/user/integral/points')">
  36. <image class="arrow_blacks" src="@/static/image/my/lv_icon16@2x.png" mode="aspectFill"></image>
  37. <text>{{user.integral}}积分</text>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. <!-- 芳华币,币,券信息 -->
  43. <!-- <view class="mybox-integral" >
  44. <view class="mybox-integral-item" @click="loginNavTo('/pages/user/integral/points')">
  45. <view class="num">{{user.integral}}</view>
  46. <view>芳华币</view>
  47. </view>
  48. <view class="mybox-integral-item" @click="loginNavTo('/pages/user/coupon/myCouponList?type=0')">
  49. <view class="num">{{coupons.notUsedCount}}</view>
  50. <view>待用券</view>
  51. </view>
  52. <view class="mybox-integral-item" @click="loginNavTo('/pages/user/coupon/myCouponList?type=1')">
  53. <view class="num">{{coupons.usedCount}}</view>
  54. <view>已用券</view>
  55. </view>
  56. <view class="mybox-integral-item" @click="loginNavTo('/pages/user/coupon/myCouponList?type=2')">
  57. <view class="num">{{coupons.expiredCount}}</view>
  58. <view>过期券</view>
  59. </view>
  60. </view> -->
  61. <!-- vip会员 -->
  62. <view class="vip-card" v-if="user.userId!=null">
  63. <view>
  64. <view class="flex-center vip-card-info">
  65. <image src="@/static/image/my/VIP_member.png" mode="aspectFill"></image>
  66. <text>{{getDayMix(user.vipEndDate)}}</text>
  67. </view>
  68. <view class="flex-center vip-card-price">续费享季卡会员约<text>6.5</text>折</view>
  69. </view>
  70. <view class="buyvip" @click="loginNavTo('/pages/course/vipBuy')" >立即续费</view>
  71. </view>
  72. <!-- 我的订单 医疗服务等 -->
  73. <view class="mybox-menu" v-for="(item, index) in menuList" :key="index">
  74. <view class="mybox-menu-title">{{item.menuTitle}}</view>
  75. <view class="mybox-menu-box">
  76. <view class="mybox-menu-item" v-for="(menu, idx) in item.menus" :key="idx" @click="handleMenu(menu)">
  77. <image :src="menu.icon" mode="aspectFill"></image>
  78. <text>{{menu.name}}</text>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. <view class="btns" v-if="isLogin" >
  84. <view class="login-btn" @click="showLogout">退出登录</view>
  85. </view>
  86. </view>
  87. </scroll-view>
  88. </template>
  89. <script>
  90. import {startDrugReport,getUserFollowDoctor} from '@/api/drugReport';
  91. import {getUserInfo,getMyCouponCount} from '@/api/user'
  92. // #ifdef APP-PLUS
  93. import permision1 from "@/utils/permission.js"
  94. // #endif
  95. const avatar="/static/image/hall/my_heads_icon.png";
  96. export default {
  97. data() {
  98. return {
  99. isLogin: false,
  100. coupons:{
  101. expiredCount:0,
  102. notUsedCount: 0,
  103. usedCount: 0
  104. },
  105. show:false,
  106. defUser:{
  107. avatar:avatar,
  108. nickName:"请登录",
  109. userName:"请登录",
  110. phone:"",
  111. integral:0,
  112. balance:0
  113. },
  114. user:{
  115. avatar:"/static/image/hall/my_heads_icon.png",
  116. userName:"",
  117. phone:"",
  118. nickName:"",
  119. integral:0,
  120. balance:0,
  121. userId:null
  122. },
  123. isNew:false,
  124. top:0,
  125. userScrollTop: 0,
  126. fixedTop: false, // 是否固定头部
  127. statusBarHeight: uni.getStorageSync('statusBarHeight'),
  128. menuList:
  129. [
  130. {
  131. menuTitle: "我的订单",
  132. menus: [
  133. {
  134. name: '问诊订单',
  135. icon: "../../static/image/my/my_order_icon.png",
  136. pageUrl:"/pages/store/inquiryOrderList"
  137. },{
  138. name: '处方订单',
  139. icon: "../../static/image/my/my_cforder_icon.png",
  140. pageUrl:"/pages/store/storeOrderList"
  141. },{
  142. name: '课程订单',
  143. icon: "../../static/image/my/my_order_icon.png",
  144. pageUrl: "/pages/course/studyCenter/orderList?status=0"
  145. },{
  146. name: '健康疗法',
  147. icon: "../../static/image/my/my_health_therapy_icon.png",
  148. pageUrl:"/pages/store/packageOrderList"
  149. },{
  150. name: '售后服务',
  151. icon: "../../static/image/my/my_service_icon.png",
  152. pageUrl:"/pages/store/storeOrderRefundList"
  153. }
  154. ]
  155. },
  156. {
  157. menuTitle: "医疗服务",
  158. menus: [
  159. {
  160. name: '我的处方',
  161. icon: "../../static/image/my/my_prescription_icon.png",
  162. pageUrl:"/pages/store/prescribeList"
  163. },{
  164. name: '我的医生',
  165. icon: "../../static/image/my/my_doctor_icon.png",
  166. pageUrl:"./myDoctorList"
  167. },{
  168. name: '随访服务',
  169. icon: "../../static/image/my/follow_up_icon.png",
  170. pageUrl:"/pages/user/followList"
  171. },{
  172. name: '用药咨询',
  173. icon: "../../static/image/my/medical_consultation_icon.png",
  174. pageUrl:"/pages/store/inquiryOrderList",
  175. isIm:true
  176. },{
  177. name: '用药报告',
  178. icon: "../../static/image/my/medication_report_icon.png",
  179. pageUrl:"/pages/user/drugReportList"
  180. }
  181. ,{
  182. name: '健康档案',
  183. icon: "../../static/image/my/my_order_icon.png",
  184. pageUrl: "/pages/user/healthRecords/index"
  185. }
  186. ]
  187. },
  188. {
  189. menuTitle: "我的应用",
  190. menus: [
  191. {
  192. name: '就诊管理',
  193. icon: "../../static/image/my/visit_icon.png",
  194. pageUrl:"./patient"
  195. }
  196. ,{
  197. name: '地址管理',
  198. icon: "../../static/image/my/address_management_icon.png",
  199. pageUrl:"./address"
  200. }
  201. ,{
  202. name: '芳华币商城',
  203. icon: "../../static/image/my/my_points_icon.png",
  204. pageUrl:"/pages/user/integral/integralGoodsList"
  205. }
  206. ,{
  207. name: '会员中心',
  208. icon: "../../static/image/my/member_icon.png",
  209. isUserService:true,
  210. pageUrl:""
  211. }
  212. ,{
  213. name: '舌苔报告',
  214. icon: "../../static/image/my/shetai.png",
  215. pageUrl: "/pages/user/tongue/tongueList"
  216. }
  217. ,{
  218. name: '健康管家',
  219. icon: "../../static/image/my/my_doctor_icon.png",
  220. pageUrl: "/pages/user/addHealthButler"
  221. }
  222. ,{
  223. name: '开票历史',
  224. icon: "../../static/image/my/invoicing_icon.png",
  225. pageUrl:"/pages/store/invoice/invoiceList",
  226. },{
  227. name: '客服中心',
  228. icon: "../../static/image/my/service_center_icon.png",
  229. pageUrl:""
  230. },{
  231. name: '看课通知',
  232. icon: "../../static/image/my/my_order_icon.png",
  233. pageUrl: "/pages/courseAnswer/list"
  234. },{
  235. name: '在学课程',
  236. icon: "../../static/image/my/my_points_icon.png",
  237. pageUrl: "/pages/course/learning"
  238. },{
  239. name: '学习笔记',
  240. icon: "../../static/image/my/study_notes.png",
  241. pageUrl: "/pages/course/noteList"
  242. },{
  243. name: '课程收藏',
  244. icon: "../../static/image/my/course_collection.png",
  245. pageUrl: "/pages/course/studyCenter/courseCollect"
  246. }
  247. ]
  248. },
  249. {
  250. menuTitle: "我的视频",
  251. menus: [
  252. {
  253. name: '我的收藏',
  254. icon: "../../static/image/my/collect_icon.png",
  255. pageUrl:"./myFavoriteVideo"
  256. },{
  257. name: '我的评论',
  258. icon: "../../static/image/my/evaluate_icon.png",
  259. pageUrl:"/pages/store/inquiryOrderPingList"
  260. }
  261. ]
  262. },
  263. {
  264. menuTitle: "管理应用",
  265. menus: [
  266. {
  267. name: '医生入驻',
  268. icon: "../../static/image/my/doctor_entrance_icon.png",
  269. pageUrl:"/pages/user/registerDoctor?type=1"
  270. },{
  271. name: '药师入驻',
  272. icon: "../../static/image/my/pharmacist_entrance_icon.png",
  273. pageUrl:"/pages/user/registerDoctor?type=2"
  274. }
  275. ,{
  276. name: '达人主页',
  277. icon: "../../static/image/my/drzy_icon.png",
  278. pageUrl:"/pages/expert/index"
  279. }
  280. ,{
  281. name: '客服登录',
  282. icon: "../../static/image/my/login_icon.png",
  283. isService:true,
  284. pageUrl:"",
  285. },{
  286. name: '关于我们',
  287. icon: "../../static/image/my/feedback_icon.png",
  288. pageUrl:"./about"
  289. }
  290. ]
  291. }
  292. ]
  293. }
  294. },
  295. onLoad(){
  296. let that=this;
  297. uni.$on('refreshUserInfo', function() {
  298. if(that.$isLogin()){
  299. that.getUserInfo();
  300. that.$updateMsgDot();
  301. } else {
  302. that.isLogin = that.$isLogin()
  303. }
  304. });
  305. if(!this.$qconfig.isAppStore){ //应用市场版本隐藏芳华币商城
  306. let integralMenus=(this.menuList[2]).menus;
  307. let integralSubMenu={name: '芳华币商城',icon: "../../static/image/my/my_points_icon.png",pageUrl:"/pages/user/integral/integralGoodsList"};
  308. integralMenus.splice(2, 0, integralSubMenu);
  309. }
  310. // #ifdef APP-PLUS
  311. permision1.checkPush();
  312. // #endif
  313. },
  314. onUnload() {
  315. uni.$off('refreshUserInfo');
  316. },
  317. onShow() {
  318. this.isLogin = this.$isLogin()
  319. let token= uni.getStorageSync('AppToken');
  320. if(this.$isLogin()){
  321. this.getUserInfo();
  322. this.getMyCouponCount();
  323. this.$updateMsgDot()
  324. }else{
  325. this.user=this.defUser;
  326. uni.navigateTo({
  327. url: '/pages/auth/loginIndex'
  328. })
  329. return;
  330. }
  331. },
  332. methods: {
  333. doIM(){
  334. uni.showLoading({
  335. title:"处理中..."
  336. })
  337. getUserFollowDoctor().then(res => {
  338. if(res.code==200){
  339. if(res.data!=null){
  340. var data={followId:res.data.followId};
  341. startDrugReport(data).then(
  342. res => {
  343. uni.hideLoading();
  344. // uni.switchTab({
  345. // url:"/pages/TUIKit/TUIPages/TUIConversation/index"
  346. // })
  347. var id="C2CD-"+data.followDoctorId;
  348. store.commit("timStore/setOrderId",data.orderId);
  349. store.commit("timStore/setFollowId",data.followId);
  350. store.commit("timStore/setImType", 2);
  351. store.commit("timStore/setConversationID", id);
  352. //uni.$TUIKit.TUIChatServer.updateStore(conversationId)
  353. uni.$TUIKit.TUIConversationServer.setMessageRead(id);
  354. uni.$TUIKit.TUIConversationServer.getConversationProfile(id).then((res) => {
  355. console.log(res)
  356. // uni.$TUIKit.TUIConversationServer.setConversationValue(id,that.orderId.toString())
  357. // .then((res) => {
  358. // console.log("更新order")
  359. // })
  360. // .catch((err) => {
  361. // });
  362. //通知 TUIChat 关闭当前会话
  363. const { conversation } = res.data;
  364. store.commit("timStore/setConversation", conversation);
  365. let url = "/pages/TUIKit/TUIPages/TUIChat/index";
  366. const { nick: name } = conversation.userProfile;
  367. url = `${url}?conversationName=${
  368. conversation.userProfile.nick?.nick ||
  369. conversation.userProfile.userID
  370. }`;
  371. uni.redirectTo({ url });
  372. })
  373. .catch((err) => {
  374. uni.hideLoading()
  375. console.warn("获取 group profile 异常 = ", err);
  376. });
  377. },
  378. rej => {}
  379. );
  380. }
  381. else{
  382. uni.hideLoading()
  383. uni.showToast({
  384. icon:'none',
  385. title: "当前没有药师为您服务",
  386. });
  387. }
  388. }else{
  389. uni.showToast({
  390. icon:'none',
  391. title: "请求失败",
  392. });
  393. }
  394. },
  395. rej => {}
  396. );
  397. },
  398. toIM(){
  399. if(this.$isLogin()){
  400. this.doIM();
  401. }
  402. else{
  403. this.$showLoginPage();
  404. }
  405. },
  406. toCompany(){
  407. if(this.$isLogin()){
  408. var token = uni.getStorageSync('CompanyUserToken');
  409. if (token) {
  410. uni.navigateTo({
  411. url: '/pages/company/index'
  412. })
  413. } else {
  414. uni.navigateTo({
  415. url: '/pages/company/login'
  416. })
  417. }
  418. }else{
  419. this.$showLoginPage();
  420. }
  421. },
  422. showLogout(){
  423. //this.show=true;
  424. let that = this;
  425. uni.showActionSheet({
  426. title:"确认退出吗",
  427. itemList: ["确定"],
  428. success: function(res) {
  429. that.logout()
  430. that.isLogin = that.$isLogin()
  431. // uni.navigateTo({
  432. // url: '/pages/auth/loginIndex'
  433. // })
  434. }
  435. });
  436. },
  437. hideLogout(){
  438. this.show=false;
  439. },
  440. logout(){
  441. this.$logout();
  442. uni.$TUIKit.logout();
  443. if(uni.$TUICallKit!=null){
  444. uni.$TUICallKit.logout();
  445. }
  446. this.user=this.defUser;
  447. this.coupons.expiredCount=0;
  448. this.coupons.notUsedCount=0;
  449. this.coupons.usedCount=0;
  450. },
  451. handleMenu(item) {
  452. if(item.isIm!=undefined && item.isIm){
  453. this.toIM();
  454. }
  455. else if(item.isService!=undefined && item.isService){
  456. this.toCompany();
  457. }
  458. else if(item.isUserService!=undefined && item.isUserService){
  459. this.loginNavTo('/pages/course/vipBuy')
  460. }
  461. else if(item.isServerCenter!=undefined && item.isServerCenter){
  462. this.gotoMiniProgram("/page_user/service");
  463. } else if(item.name == '客服中心') {
  464. const url = getApp().globalData.kfurl //企业微信客服链接
  465. const corpId = getApp().globalData.corpId //企业id
  466. this.openCustomerServiceChat(url,corpId)
  467. } else{
  468. this.loginNavTo(item.pageUrl)
  469. }
  470. },
  471. navTo(url){
  472. uni.navigateTo({
  473. url: url
  474. });
  475. },
  476. loginNavTo(url){
  477. if(!this.$isLogin()){
  478. this.$showLoginPage();
  479. return;
  480. }
  481. uni.navigateTo({
  482. url: url
  483. });
  484. },
  485. navToUserInfo(url){
  486. if(!this.$isLogin()){
  487. this.$showLoginPage();
  488. return;
  489. }
  490. uni.navigateTo({
  491. url: "./userInfo?userId="+this.user.userId
  492. });
  493. },
  494. navToServerCenter(){
  495. if(!this.$isLogin()){
  496. this.$showLoginPage();
  497. return;
  498. }
  499. },
  500. getUserInfo(){
  501. let that=this;
  502. getUserInfo().then(res => {
  503. if(res.code==200){
  504. if(res.user!=null){
  505. uni.setStorageSync('userInfo',JSON.stringify(res.user));
  506. this.user=res.user;
  507. }
  508. else{
  509. uni.showToast({
  510. icon:'none',
  511. title: res.msg,
  512. });
  513. }
  514. }
  515. },
  516. rej => {}
  517. );
  518. },
  519. getMyCouponCount(){
  520. let that=this;
  521. getMyCouponCount().then(res => {
  522. if(res.code==200){
  523. this.coupons=res.data;
  524. }
  525. },
  526. rej => {}
  527. );
  528. },
  529. getUserNickName(){
  530. let nickName="";
  531. if(!this.$isLogin()){ //已登录
  532. nickName="请登录";
  533. return nickName;
  534. }
  535. nickName=this.$isEmpty(this.user.nickName)?"请登录":this.user.nickName;
  536. return nickName;
  537. },
  538. userScroll(e) {
  539. if(e.detail.scrollTop >= 50) {
  540. this.fixedTop = true
  541. } else {
  542. this.fixedTop = false
  543. }
  544. this.top=e.detail.scrollTop;
  545. },
  546. scrollTolower(){
  547. },
  548. getDayMix(vipEndDate){
  549. // 假设 vipEndDate 字符串
  550. //let vipEndDate = "2024-09-06T14:43:36.000+0800";
  551. // 将 vipEndDate 解析为日期对象
  552. let endDate = new Date(vipEndDate);
  553. // 获取当前日期
  554. let currentDate = new Date();
  555. // 计算时间差(毫秒)
  556. let timeDiff = endDate - currentDate;
  557. // 计算天数差
  558. let dayDiff = Math.ceil(timeDiff / (1000 * 3600 * 24));
  559. let dayStr="";
  560. // 输出结果
  561. if (dayDiff > 0) {
  562. dayStr=`VIP到期还有${dayDiff}天`;
  563. } else if (dayDiff === 0) {
  564. dayStr="今天是VIP到期日";
  565. } else {
  566. dayStr=`VIP已过期${Math.abs(dayDiff)}天`;
  567. }
  568. return dayStr;
  569. },
  570. goToMsg(){
  571. uni.switchTab({
  572. url: '/pages/TUIKit/TUIPages/TUIConversation/index'
  573. });
  574. },
  575. async openCustomerServiceChat(url,corpId) {
  576. // #ifdef H5
  577. window.location.href = url
  578. // #endif
  579. // #ifdef MP-WEIXIN
  580. wx.openCustomerServiceChat({
  581. extInfo: {
  582. url
  583. },
  584. corpId,
  585. success(res) {
  586. console.log('成功');
  587. },
  588. fail(err) {
  589. console.log(err, '报错');
  590. }
  591. })
  592. // #endif
  593. // #ifdef APP-PLUS
  594. let shares = await this.getAppShare().catch(err => {
  595. throw Error(err)
  596. });
  597. shares['weixin'].openCustomerServiceChat({
  598. corpid: corpId,
  599. url
  600. }, suc => {
  601. console.log("客服打开成功", JSON.stringify(res))
  602. }, err => {
  603. console.log("error", JSON.stringify(err))
  604. })
  605. // #endif
  606. },
  607. getAppShare() {
  608. // #ifdef APP-PLUS
  609. return new Promise((re, rj) => {
  610. let shares = null;
  611. var pusher = plus.share.getServices(function(s) {
  612. shares = {};
  613. s.forEach(e => shares[e.id] = e);
  614. re(shares)
  615. }, function(e) {
  616. rj(e);
  617. });
  618. });
  619. // #endif
  620. },
  621. gotoMiniProgram(pageUrl){
  622. plus.share.getServices(function(res){
  623. var sweixin = null;
  624. for(var i=0;i<res.length;i++){
  625. var t = res[i];
  626. if(t.id == 'weixin'){
  627. sweixin = t;
  628. }
  629. }
  630. if(sweixin){
  631. //唤起微信跳转小程序
  632. sweixin.launchMiniProgram({
  633. id:"gh_7a6a32e5ef61",
  634. path:pageUrl,
  635. type:0
  636. },function(){
  637. console.log("微信唤起成功");
  638. return true;
  639. },function(e){
  640. console.log("微信唤起失败",e);
  641. uni.showToast({
  642. title:'微信唤起失败,请检查是否有微信应用',
  643. icon:'none'
  644. })
  645. return false;
  646. })
  647. }
  648. else{
  649. uni.showToast({
  650. title:'微信唤起失败,请检查是否有微信应用',
  651. icon:'none',
  652. duration:3000
  653. })
  654. return false;
  655. }
  656. },function(res){
  657. });
  658. }
  659. },
  660. computed: {
  661. // 计算属性的 getter
  662. headerBG:function() {
  663. var top=this.top/88;
  664. return 'rgba(253,224,204, ' + top + ')';
  665. },
  666. }
  667. }
  668. </script>
  669. <style scoped lang="scss">
  670. page{
  671. height: 100%;
  672. background: #f7f7f7;
  673. }
  674. .top-cont{
  675. // height: 370rpx;
  676. position: relative;
  677. &::after{
  678. content: '';
  679. width: 100%;
  680. height: 370rpx;
  681. position: absolute;
  682. z-index: -1;
  683. left: 0;
  684. top: 0;
  685. border-radius: 0 0 50rpx 50rpx;
  686. }
  687. .inner.fixed{
  688. width: 100%;
  689. position: fixed;
  690. top: 0;
  691. left: 0;
  692. z-index: 999;
  693. }
  694. .seat{
  695. display: none;
  696. height: var(--status-bar-height);
  697. &.show{
  698. display: block;
  699. }
  700. }
  701. .status-bar{
  702. background-color:rgba(253,224,204,1) ;
  703. height: var(--status-bar-height);
  704. }
  705. .status-bar.main-bg {
  706. background-color: #fff;
  707. }
  708. .top-title-box{
  709. height: 88rpx;
  710. line-height: 88rpx;
  711. text-align: center;
  712. background-color: #fff;
  713. font-size: 18px;
  714. color: #333;
  715. font-weight: 550;
  716. display: none;
  717. &.show{
  718. display: block;
  719. }
  720. }
  721. }
  722. .top-section{
  723. .bg-img{
  724. position: fixed;
  725. width: 100%;
  726. top: 0;
  727. left: 0;
  728. right: 0;
  729. height: 524rpx;
  730. z-index: 0;
  731. }
  732. }
  733. @mixin u-flex($flexD, $alignI, $justifyC) {
  734. display: flex;
  735. flex-direction: $flexD;
  736. align-items: $alignI;
  737. justify-content: $justifyC;
  738. }
  739. .flex-center {
  740. @include u-flex(row, center, flex-start);
  741. }
  742. .container {
  743. background-image: url("@/static/image/hall/home_top_bg.png");
  744. background-repeat: no-repeat;
  745. background-size: 100%;
  746. font-family: PingFang SC, PingFang SC;
  747. // padding-top: var(--status-bar-height);
  748. padding-bottom: 20rpx;
  749. height: 100%;
  750. }
  751. .my-header-right {
  752. height: 88rpx;
  753. padding-right: 28rpx;
  754. margin-top: var(--status-bar-height);
  755. @include u-flex(row,center, flex-end);
  756. image {
  757. margin-left: 32rpx;
  758. width: 48rpx;
  759. height: 48rpx;
  760. position: relative;
  761. }
  762. .badge::after {
  763. content: "";
  764. width: 16rpx;
  765. height: 16rpx;
  766. background: #FF5C03;
  767. border-radius: 50%;
  768. position: absolute;
  769. right: 0;
  770. top: 0;
  771. }
  772. }
  773. .mybox {
  774. padding: 12rpx 24rpx;
  775. &-info {
  776. @include u-flex(row, center, flex-start);
  777. &-name {
  778. font-weight: 600;
  779. font-size: 40rpx;
  780. color: #222222;
  781. }
  782. .heads {
  783. width: 128rpx;
  784. height: 128rpx;
  785. border-radius: 50%;
  786. margin-right: 16rpx;
  787. }
  788. .arrow_black {
  789. width: 40rpx;
  790. height: 40rpx;
  791. }
  792. .arrow_blacks {
  793. width: 28rpx;
  794. height: 28rpx;
  795. margin-right: 8rpx;
  796. }
  797. .vipbox {
  798. background: linear-gradient( 90deg, #F26F00 0%, #FF9D1F 100%);
  799. border-radius: 40rpx;
  800. border: 1rpx solid #FEDDB9;
  801. font-weight: 500;
  802. font-size: 22rpx;
  803. color: #FEF5EA;
  804. padding: 0 24rpx;
  805. }
  806. .pointsbox{
  807. background: linear-gradient( 90deg, #F5CE3C 0%, #E39414 100%);
  808. border-radius: 40rpx ;
  809. border: 1rpx solid #FEDDB9;
  810. font-weight: 500;
  811. font-size: 22rpx;
  812. color: #FEF5EA;
  813. padding: 4rpx 18rpx;
  814. }
  815. }
  816. &-integral {
  817. margin-top: 48rpx;
  818. @include u-flex(row, center, flex-start);
  819. &-item {
  820. width: 25%;
  821. text-align: center;
  822. font-weight: 400;
  823. font-size: 24rpx;
  824. color: #757575;
  825. }
  826. .num {
  827. margin-bottom: 12rpx;
  828. font-family: DIN, DIN;
  829. font-weight: 500;
  830. font-size: 40rpx;
  831. color: #313131;
  832. }
  833. }
  834. &-menu {
  835. background: #FFFFFF;
  836. border-radius: 16rpx 16rpx 16rpx 16rpx;
  837. padding: 32rpx 32rpx 36rpx 32rpx;
  838. margin: 20rpx 0;
  839. &-title {
  840. font-weight: 600;
  841. font-size: 36rpx;
  842. color: #222222;
  843. margin-bottom: 42rpx;
  844. }
  845. &-box {
  846. @include u-flex(row, center, flex-start);
  847. margin-bottom: -40rpx;
  848. flex-wrap: wrap;
  849. }
  850. &-item {
  851. width: 25%;
  852. margin-bottom: 40rpx;
  853. @include u-flex(column, center, center);
  854. font-weight: 400;
  855. font-size: 24rpx;
  856. color: #222222;
  857. image {
  858. height: 48rpx;
  859. width: 48rpx;
  860. margin-bottom: 10rpx;
  861. }
  862. }
  863. }
  864. }
  865. .vip-card {
  866. height: 172rpx;
  867. margin-top: 28rpx;
  868. background: url("@/static/image/my/vip_bg_left.png") no-repeat left / 128rpx 172rpx,
  869. url("@/static/image/my/vip_bg_right.png") no-repeat right / 324rpx 172rpx,
  870. linear-gradient( 90deg, #FFF3DF 0%, #FADBA9 100%);
  871. border-radius: 16rpx 16rpx 16rpx 16rpx;
  872. padding: 0 32rpx;
  873. box-sizing: border-box;
  874. @include u-flex(row, center, space-between);
  875. &-info {
  876. font-weight: 400;
  877. font-size: 24rpx;
  878. color: #834F00;
  879. margin-bottom: 26rpx;
  880. image {
  881. width: 126rpx;
  882. height: 30rpx;
  883. margin-right: 34rpx;
  884. }
  885. }
  886. &-price {
  887. font-weight: 500;
  888. font-size: 32rpx;
  889. color: #885201;
  890. line-height: 38rpx;
  891. text {
  892. font-family: Roboto, Roboto;
  893. font-weight: bold;
  894. font-size: 40rpx;
  895. color: #EA8F07;
  896. margin: 0 8rpx;
  897. }
  898. }
  899. .buyvip {
  900. height: 72rpx;
  901. background: #885201;
  902. border-radius: 36rpx 36rpx 36rpx 36rpx;
  903. font-weight: 600;
  904. font-size: 28rpx;
  905. color: #FFF6E7;
  906. line-height: 72rpx;
  907. padding: 0 32rpx;
  908. display: inline-block;
  909. }
  910. }
  911. .btns{
  912. height: 110rpx;
  913. }
  914. .login-btn {
  915. display: flex;
  916. align-items: center;
  917. justify-content: center;
  918. flex: 1;
  919. margin:0 30rpx;
  920. height: 80rpx;
  921. background: #fff;
  922. // box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);
  923. border-radius: 40rpx;
  924. font-size: 30rpx;
  925. font-family: PingFang SC;
  926. font-weight: 500;
  927. color: #333;
  928. }
  929. </style>