index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859
  1. <template>
  2. <view class="content">
  3. <view class="">
  4. <loading isFullScreen color="#2f7ff5" :active="isloading" text="开门中..."></loading>
  5. <u-navbar :is-back="false" title=" ">
  6. <view class="slot-wrap">
  7. <picker @change="typeChange" :value="plotIndex" :range="plotArray">
  8. <view class="padding-left-20 ">
  9. <u-icon name="map" size="34"></u-icon>
  10. <text class="padding-left-sm " style="font-size: 34rpx;">{{plot?plot:'暂无小区信息'}}</text>
  11. </view>
  12. </picker>
  13. </view>
  14. </u-navbar>
  15. <!-- 头图 -->
  16. <swiper class="screen-swiper square-dot " :indicator-dots="true" :circular="true"
  17. :autoplay="true" interval="5000" duration="500">
  18. <swiper-item v-for="(item,index) in adList" :key="index">
  19. <image v-if="item.videoType==0" :src="item.videoUri" mode="aspectFill" ></image>
  20. <video v-if="item.videoType==1" :src="item.videoUri" autoplay loop muted :show-play-btn="false" :controls="false" objectFit="cover"></video>
  21. </swiper-item>
  22. </swiper>
  23. <view class="">
  24. <view class="bg-white" style="height: 10rpx;"></view>
  25. <hotConsult @onTap="jump('../notice/notice')" @detailTap="goNoticeDetail" :swiperTexts="noticeList"></hotConsult>
  26. </view>
  27. <view style="background-color: #FFFFFF;">
  28. <view style="padding: 30rpx 30rpx 0 30rpx;">
  29. <text class="text-bold text-lg">智慧社区</text>
  30. </view>
  31. <view style="padding: 40rpx 10rpx 0rpx;" class="cu-list grid col-5 no-border" >
  32. <view class="cu-item" :class="item.index==5?'img1-lg':''" @click="top(item.index)" v-for="(item,index) in gridList" :key="index">
  33. <block v-if="item.index==5">
  34. <view class="grid-icon" >
  35. <image style="width: 100rpx;height: 100rpx;" :src="modalShow?'../../static/grid1/kaisuo1.png':'../../static/grid1/kaisuo0.png'"/>
  36. </view>
  37. <text style="color: #333333;font-size: 30rpx;font-weight: 800;" >{{item.title}}</text>
  38. </block>
  39. <block v-else>
  40. <view class="grid-icon" >
  41. <image style="width: 48rpx;height: 48rpx;" :src="item.icon"/>
  42. </view>
  43. <text style="color: #333333;font-size: 26rpx;" >{{item.title}}</text>
  44. </block>
  45. <view class="cu-tag bg-orange badge" v-if="item.badge>0">{{item.badge}}</view>
  46. </view>
  47. </view>
  48. <!-- 设备列表 -->
  49. <view v-if="modalShow==true" class="flex justify-around margin-top-30" >
  50. <view @click="open(item.id)" v-for="(item,index) in device_list" :key="index" style="flex-direction: column;" class="flex justify-center align-center">
  51. <image style="width: 60rpx;height: 60rpx;" src="../../static/grid1/kaimen.png"/>
  52. <view class="text-center padding-top-20" style="font-size: 24rpx;">
  53. {{item.name}}
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="nav-list bg-white padding-top-20" >
  59. <view hover-class="none"
  60. @click="top(item.index)"
  61. class="nav-li light" navigateTo :style="{backgroundColor:item.color}"
  62. v-for="(item,index) in elements" :key="index">
  63. <view class="nav-title" style="color: #000000;font-size: 28rpx;">{{item.title}}</view>
  64. <view class="" style="padding-top: 10rpx;font-size: 24rpx;color: #acacac;">{{item.name}}</view>
  65. <image :src="item.icon" mode=""></image>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="bg-white">
  70. <image src="/static/banner.png" style="width: 100%;" mode="widthFix"></image>
  71. </view>
  72. <view >
  73. <view class="tj-title">
  74. <view class="">
  75. <text class="text-lg text-bold">为您推荐</text>
  76. <text class="sub-title">有料</text>
  77. <text class="sub-title">好物</text>
  78. <text class="sub-title">有优惠</text>
  79. </view>
  80. <view class="sub-title" style="color: #969696;padding-top: 8rpx;font-size: 24rpx;" @click="jump('/pages/life/life','type')">
  81. <text >查看更多></text>
  82. </view>
  83. </view>
  84. <view>
  85. <goods :goodsList="goodsList"></goods>
  86. </view>
  87. </view>
  88. <view style="height: 80rpx;">
  89. <u-divider bgColor="#f1f1f1;" height="80">到底了</u-divider>
  90. </view>
  91. </view>
  92. </template>
  93. <script>
  94. import loading from "@/comps/loading/loading.vue"
  95. import hotConsult from "@/comps/hot-consult/hot-consult.vue"
  96. import goods from "@/comps/goods/goods.vue"
  97. var app = getApp();
  98. let that;
  99. export default {
  100. components:{
  101. goods,hotConsult,loading
  102. },
  103. data() {
  104. return {
  105. isloading:false,
  106. modalShow:false,
  107. //开门设备列表
  108. device_list: [],
  109. background: {
  110. backgroundColor: '#e54d42',
  111. },
  112. noticeList:[],
  113. userInfo:{},
  114. jsCode:'',
  115. openid:'',
  116. sessionKey:'',
  117. isFirst:false,
  118. goodsList:[],
  119. isIPX:false,
  120. //广告轮播图
  121. swiperIndex: 0,
  122. plot: null,
  123. plotArray: [],
  124. //小区名字
  125. plotIndex: 0,
  126. residentialIdList: [] ,//小区id
  127. adList: [
  128. {
  129. 'videoType': 0,
  130. 'videoUri': "http://139.9.103.171:1888/miniofile/app/abcd.png"
  131. },
  132. ],
  133. elements: [{
  134. title: '防疫登记',
  135. name: '在线防疫登记',
  136. color: '#e3f5ff',
  137. icon: '../../static/home/fanyi1.png',
  138. index:6
  139. }, {
  140. title: '物业缴费',
  141. name: '在线物业缴费',
  142. color: '#e9f9f3',
  143. icon: '../../static/home/jiaofei.png',
  144. index:7
  145. },
  146. {
  147. title: '物业报修',
  148. name: '在线物业报修',
  149. color: '#ffefef',
  150. icon: '../../static/home/baoxiu1.png',
  151. index:8
  152. }, {
  153. title: '更多服务',
  154. name: '更多智慧服务',
  155. color: '#eeeeee',
  156. icon: '../../static/home/more.png',
  157. index:99
  158. }],
  159. gridList:[
  160. {
  161. icon:'../../static/grid1/fangwu.png',
  162. title:"我的房屋",
  163. badge:0,
  164. index:1
  165. },
  166. {
  167. icon:'../../static/grid1/renyuan.png',
  168. title:"家庭成员",
  169. badge:0,
  170. index:2
  171. },
  172. {
  173. icon:'../../static/grid1/kaisuo1.png',
  174. title:"开门",
  175. badge:0,
  176. index:5
  177. },
  178. {
  179. icon:'../../static/grid1/cheliang.png',
  180. title:"我的车辆",
  181. badge:0,
  182. index:3
  183. },
  184. {
  185. icon:'../../static/grid1/fangke1.png',
  186. title:"访客授权",
  187. badge:0,
  188. index:4
  189. },
  190. ]
  191. }
  192. },
  193. onShow() {
  194. //处理进入小程序的不同场景
  195. this.execParam();
  196. this.loadData()
  197. //每次打开此页面都把商品数组打乱
  198. this.$u.randomArray(this.goodsList)
  199. if(this.isFirst){
  200. this.isFirst=false
  201. }else{
  202. this.getRoomByMemberId()
  203. }
  204. },
  205. onLoad(options) {
  206. that=this
  207. //处理进入小程序的场景
  208. this.handelShare(options)
  209. this.isFirst=true
  210. //拉取后台用户信息
  211. this.getOpenId();
  212. this.isIPX=uni.getStorageSync('isIPX')
  213. //获取轮播列表
  214. this.getAdList();
  215. //获取推荐商品列表
  216. this.fetchGoodsList()
  217. },
  218. methods: {
  219. open(id){
  220. //进度条加载
  221. this.isloading=true
  222. let that=this
  223. setTimeout(()=>{
  224. that.openDoor(id)
  225. },2300)
  226. },
  227. //立即开门
  228. openDoor: function (id) {
  229. let device_id=id
  230. let that = this;
  231. let params = {};
  232. params['member_id'] = app.globalData.member.id;
  233. params['device_id'] = device_id;
  234. let operation = 'member/openDoor';
  235. app.globalData.postRequest(params, operation, function (res) {
  236. that.isloading=false
  237. app.globalData.oneFailHint(res.data.result_msg,function(){
  238. that.modalShow=false
  239. });
  240. });
  241. },
  242. getAuthDevice: function () {
  243. let that = this;
  244. let params = {};
  245. params['member_id'] = app.globalData.member.id;
  246. let operation = 'member/getAuthDeviceByMemberId';
  247. app.globalData.postRequest(params, operation, function (res) {
  248. console.info("设备列表:" ,res.data); //获取成功
  249. if (res.data.result_code == 1) {
  250. let list = [];
  251. if (uni.getStorageSync('plotName')) {
  252. res.data.list.map(item => {
  253. if (item.residentialId.indexOf(uni.getStorageSync('residentialId'))>=0) {
  254. list.push(item);
  255. }
  256. });
  257. } else {
  258. console.log(res.data.list)
  259. list = res.data.list;
  260. }
  261. console.log(list)
  262. that.setData({
  263. device_list: list
  264. });
  265. app.globalData.device_list = list;
  266. }
  267. });
  268. },
  269. async loadData(options){
  270. //进入小程序时进行游客登陆,
  271. //以免直接进入商品详情时会提示用户未授权
  272. await this.$nextTick(function(){
  273. this.touristLogin()
  274. })
  275. //加载通知公告
  276. this.fetchNoticeList()
  277. },
  278. getParam(e){
  279. // 用来保存所有的属性名称和值
  280. let param = "";
  281. // 开始遍历
  282. for(let p in e){
  283. // 方法
  284. if(typeof(e[p])!="function" && p != 'type'){
  285. // p 为属性名称,e[p]为对应属性的值
  286. param += (param.length > 1 ? '&' : '') + p + "=" + e[p];
  287. }
  288. }
  289. // 最后显示所有的属性
  290. return param;
  291. },
  292. execParam(){
  293. let _this = this;
  294. if(this.e != null){
  295. setTimeout(function(){
  296. if(_this.e == null) return;
  297. if(_this.e.type == "share"){
  298. let path = _this.e.path == null || _this.e.path.length <= 0 ? 'pagesM/pages/goods_des' : '/' + _this.e.path;
  299. let param = _this.getParam(_this.e);
  300. let url = `${path}?${param}`;
  301. console.error("url = " + url);
  302. _this.e = null;
  303. uni.navigateTo({url: url});
  304. }
  305. }, 1000);
  306. }
  307. },
  308. handelShare(e){
  309. this.e = e;
  310. console.log(12,e)
  311. //二维码扫描链接 start
  312. if(e != null && e.q != null){
  313. let url = decodeURIComponent(e.q);
  314. let param = {};
  315. // 把参数按&拆分成数组
  316. let index = url.indexOf("?");
  317. let query = url.substring(index+1,index.length);
  318. var param_arr = query.split("&");
  319. for (var i = 0; i < param_arr.length; i++) {
  320. var pair = param_arr[i].split("=");
  321. param[pair[0]]=pair[1];
  322. }
  323. if(param['type'] == "share"){
  324. let path = 'pagesM/pages/goods_des';
  325. let params = `id=${param['id']}&storeId=${param['storeId']}&inviteCode=${param['inviteCode']}`
  326. let url = `${path}?${params}`;
  327. console.error("url = " + url);
  328. this.e = null;
  329. uni.navigateTo({url: url});
  330. }
  331. }
  332. //二维码扫描链接 end
  333. //点击转发卡片进入的小程序
  334. this.execParam();
  335. wx.showShareMenu({
  336. withShareTicket: true
  337. })
  338. },
  339. tab(index){
  340. console.log(index);
  341. },
  342. jump(url,type){
  343. if(!this.$isEmpty(type)){
  344. uni.switchTab({
  345. url:url
  346. })
  347. }else{
  348. uni.navigateTo({
  349. url:url
  350. })
  351. }
  352. },
  353. /**
  354. * 获取商品推荐列表
  355. */
  356. async fetchGoodsList(){
  357. let indexProduct = await this.$api.storeHomeProducts();
  358. this.goodsList=indexProduct[1].products
  359. this.$u.randomArray(this.goodsList)
  360. },
  361. //轮播圆点
  362. bindchange(e) {
  363. this.setData({
  364. swiperIndex: e.detail.current
  365. });
  366. },
  367. //改变小区
  368. typeChange: function (e) {
  369. let _this = this;
  370. Promise.all([_this.getRoomByMemberId()]).then(result => {
  371. let value = _this.plotArray[e.detail.value];
  372. let residentialId = _this.residentialIdList[e.detail.value];
  373. uni.removeStorageSync("plotName");
  374. uni.removeStorageSync("residentialId");
  375. uni.setStorageSync("plotName", value);
  376. uni.setStorageSync("residentialId", residentialId);
  377. _this.setData({
  378. plotIndex: e.detail.value,
  379. plot: value
  380. });
  381. //更新设备列表
  382. _this.getAuthDevice()
  383. }).catch(error => {
  384. console.log(error);
  385. });
  386. },
  387. //一键开门
  388. goOpen: function () {
  389. var that = this;
  390. var member = app.globalData.member;
  391. var anyHousePass = app.globalData.anyHousePass; //会员认证状态:{ 0:未认证,1:待审审核,2:已认证 }
  392. if (member == null) {
  393. //未注册
  394. app.globalData.footaddmore();
  395. return;
  396. } else if (member.state == 0 && !anyHousePass) {
  397. //未认证
  398. app.globalData.choosePlot();
  399. return;
  400. } else if (member.state == 1 && !anyHousePass) {
  401. //待审核
  402. that.pending();
  403. return;
  404. } else if (member.state == 2 || anyHousePass) {
  405. //已认证
  406. uni.navigateTo({
  407. url: '/pages/oneButton/oneButton'
  408. });
  409. }
  410. },
  411. /**
  412. * 获取轮播图列表
  413. */
  414. getAdList: function () {
  415. let that = this;
  416. let params = {};
  417. let operation = 'adPushApp/getList';
  418. app.globalData.postRequest(params, operation, function (res) {
  419. //获取成功
  420. if (res.data.result_code == 1) {
  421. let adList = res.data.list;
  422. if (adList && adList.length > 0) {
  423. that.setData({
  424. adList: adList
  425. });
  426. }
  427. }
  428. });
  429. },
  430. fetchNoticeList(){
  431. let that=this
  432. let operation='notice/noticeList'
  433. let params={}
  434. app.globalData.postRequest(params, operation, function (res) {
  435. //获取成功
  436. that.noticeList=res.data.noticeList
  437. });
  438. },
  439. //获取openid
  440. getOpenId: function () {
  441. var openid = uni.getStorageSync("openid");
  442. console.info("缓存中获取的openid=" + openid);
  443. var that = this;
  444. if (openid == null || openid == '') {
  445. uni.login({
  446. success: res => {
  447. let params = {};
  448. params['js_code'] = res.code;
  449. params['name'] = 'community';
  450. that.jsCode=res.code
  451. let operation = 'miniprogram/getOpenid'; //发起请求
  452. app.globalData.postRequest(params, operation, function (res) {
  453. //获取成功
  454. if (res.data.result_code == 1) {
  455. console.log("获取openid成功")
  456. //openid存入缓存
  457. uni.setStorageSync("openid", res.data.openid);
  458. that.openid=res.data.openid
  459. that.sessionKey=res.data.sessionKey
  460. that.getMemberByOpenid(res.data.openid);
  461. } else {
  462. app.globalData.oneFailHint(res.data.result_msg);
  463. }
  464. });
  465. }
  466. });
  467. } else {
  468. that.getMemberByOpenid(openid);
  469. }
  470. },
  471. //根据openid获取用户信息
  472. getMemberByOpenid: function (openid) {
  473. let _this = this;
  474. let params = {};
  475. params['openid'] = openid;
  476. let operation = 'miniprogram/getMemberByOpenid';
  477. app.globalData.postRequest(params, operation, function (res) {
  478. console.info("getMemberByOpenid==" + res.data.result_msg); //获取成功
  479. if (res.data.result_code == 1) {
  480. app.globalData.member = res.data.member;
  481. app.globalData.anyHousePass = res.data.anyHousePass; //获取房屋列表
  482. _this.getRoomByMemberId();
  483. _this.getAuthDevice()
  484. } else {
  485. }
  486. });
  487. },
  488. /**
  489. * 游客登陆
  490. */
  491. async touristLogin() {
  492. // 检查是否登录
  493. this.isLogin = this.$auth.isAuth
  494. console.log(this.$auth.isAuth);
  495. if (!this.$auth.isAuth) { // 就算是游客,也重新登录
  496. console.log('需要使用游客身份,执行游客登录!')
  497. let resp = await this.$api.touristLogin()
  498. console.log("Resp",resp);
  499. let userType = this.$global.userType.tourist
  500. this.$auth.login(userType, resp.sessionId, resp.userId, resp)
  501. console.log('游客登录成功!', resp)
  502. } else {
  503. console.log(`已登录!`)
  504. }
  505. },
  506. //根据会员id获取我的房屋列表
  507. getRoomByMemberId: function () {
  508. let that = this;
  509. let params = {};
  510. params['member_id'] = app.globalData.member.id;
  511. let operation = 'estate/getRoomByMemberId';
  512. app.globalData.postRequest(params, operation, function (res) {
  513. console.info("获取成功" , res.data); //获取成功
  514. let list = [];
  515. let residentialIdList = [];
  516. if (res.data.result_code == 1) {
  517. app.globalData.userId=res.data.list[0].userId
  518. res.data.list.map(item => {
  519. if (list.indexOf(item.residentialName) == -1) {
  520. list.push(item.residentialName);
  521. residentialIdList.push(item.residentialId);
  522. }
  523. });
  524. if (list.length < 1) {
  525. uni.removeStorageSync("plotName");
  526. uni.removeStorageSync("residentialId");
  527. } else {
  528. //获取本地储存的当前所在小区
  529. let plot = that.plot;
  530. if (uni.getStorageSync('plotName')) {
  531. plot = uni.getStorageSync('plotName');
  532. that.setData({
  533. plot: plot
  534. });
  535. } else {
  536. uni.setStorageSync("plotName", list[0]);
  537. uni.setStorageSync("residentialId", residentialIdList[0]);
  538. that.setData({
  539. plot: list[0]
  540. });
  541. }
  542. }
  543. let residentialList=[]
  544. list.forEach((item,index)=>{
  545. let tmp={}
  546. tmp.residentialName=item
  547. tmp.residentialId=residentialIdList[index]
  548. residentialList.push(tmp)
  549. })
  550. uni.setStorage({
  551. key:"residentialList",
  552. data:residentialList
  553. })
  554. //为 小区 picker 设置默认项
  555. let defaultPlotId=uni.getStorageSync("residentialId")
  556. if (!that.$isEmpty(defaultPlotId)) {
  557. that.plotIndex=residentialIdList.indexOf(defaultPlotId)
  558. }
  559. that.setData({
  560. plotArray: list,
  561. residentialIdList: residentialIdList
  562. });
  563. }
  564. });
  565. },
  566. /**
  567. * 跳转
  568. * @param {Object} index 当前项的index属性,而不是当前项的下标
  569. */
  570. top: function (index) {
  571. if (index==5) {
  572. if (this.$isEmpty(this.device_list)) {
  573. uni.showToast({
  574. title:"暂无设备",
  575. icon:"none"
  576. })
  577. return
  578. }
  579. this.modalShow=!this.modalShow
  580. return
  581. }
  582. if (index==99) {
  583. //查看更多
  584. uni.navigateTo({
  585. url:"../tool-list/tool-list"
  586. })
  587. return
  588. }
  589. var that = this;
  590. var member = app.globalData.member;
  591. var anyHousePass = app.globalData.anyHousePass; //会员认证状态:{ 0:未认证,1:待审审核,2:已认证 }
  592. if (member == null) {
  593. //去注册
  594. uni.navigateTo({
  595. url:"../empty/empty"
  596. })
  597. return
  598. } else if (member.state == 0 && !anyHousePass) {
  599. //去认证
  600. uni.navigateTo({
  601. url:"../empty/empty?type=2"
  602. })
  603. return
  604. } else if (member.state == 1 && !anyHousePass) {
  605. //待审核
  606. that.pending();
  607. } else if (member.state == 2 || anyHousePass) {
  608. //已认证
  609. //获取页面传过来的值
  610. var url;
  611. switch (index) {
  612. case 1:
  613. //我的家人
  614. url='/pages/myhome/myhome';
  615. break;
  616. case 2:
  617. //家庭成员
  618. url = '/pages/myFamily/myFamily';
  619. break;
  620. case 3:
  621. //我的车辆
  622. uni.showToast({
  623. title:"待开发",
  624. icon:"none"
  625. })
  626. break;
  627. case 4:
  628. //访客授权
  629. url = '/pages/authorize_record/authorize_record';
  630. break;
  631. case 5:
  632. //一键开门
  633. uni.switchTab({
  634. url:"../device/device"
  635. })
  636. break;
  637. case 6:
  638. //防疫登记
  639. url = '/pages/tool-list/epidemic-pass/epidemic-pass';
  640. break;
  641. case 7:
  642. //物业缴费
  643. uni.showToast({
  644. title:"待开发",
  645. icon:"none"
  646. })
  647. break;
  648. case 8:
  649. //物业报修
  650. url = '/pages/services/property/property';
  651. break;
  652. default:
  653. url = "";
  654. break;
  655. }
  656. if (url != '') {
  657. uni.navigateTo({
  658. url: url,
  659. success: function (res) {
  660. that.setData({
  661. firstJump: false
  662. });
  663. }
  664. });
  665. }
  666. }
  667. },
  668. openBluetoothAdapter: function () {
  669. uni.openBluetoothAdapter({
  670. success: function (res) {
  671. uni.navigateTo({
  672. url: "/pages/bluetooth/bluetooth"
  673. });
  674. },
  675. fail: function (res) {
  676. uni.showModal({
  677. content: '请开启手机蓝牙后再试'
  678. });
  679. }
  680. });
  681. },
  682. //用户信息待审核中
  683. pending: function () {
  684. var openid = uni.getStorageSync("openid");
  685. let params = {};
  686. params['openid'] = openid;
  687. let operation = 'miniprogram/getMemberByOpenid';
  688. app.globalData.postRequest(params, operation, function (res) {
  689. //获取成功
  690. if (res.data.result_code == 1) {
  691. let member = res.data.member; //待审核
  692. if (member.state == 1 && !res.data.anyHousePass) {
  693. app.globalData.oneFailHint('亲,你的信息正在审核,请耐心等待');
  694. } else if (member.state == 2) {
  695. app.globalData.oneFailHint('亲,你的信息已审核通过');
  696. }
  697. app.globalData.member = member;
  698. app.globalData.anyHousePass = res.data.anyHousePass;
  699. } else {
  700. app.globalData.oneFailHint(res.data.result_msg);
  701. }
  702. });
  703. },
  704. goNoticeDetail(item){
  705. app.globalData.noticeDetail=item
  706. uni.navigateTo({
  707. url:"../notice/detail",
  708. })
  709. }
  710. }
  711. }
  712. </script>
  713. <style lang="scss">
  714. .img1-lg{
  715. margin-top: -80rpx;
  716. }
  717. .location_item{
  718. background-color: #FFFFFF;
  719. display: flex;
  720. padding: 30rpx;
  721. font-size: 32rpx;
  722. }
  723. .active {
  724. transform: none;
  725. transition: all 0.2s ease-in 0s;
  726. }
  727. .tj-title{
  728. display: flex;
  729. justify-content: space-between;
  730. padding: 30rpx;
  731. background-color: #FFFFFF;
  732. font-size: 32rpx;
  733. .sub-title{
  734. font-size: 26rpx;
  735. padding-left: 16rpx;
  736. color: #c7c7c7;
  737. }
  738. }
  739. .nav-list {
  740. display: flex;
  741. flex-wrap: wrap;
  742. justify-content: center;
  743. }
  744. .nav-li {
  745. padding: 30upx 20rpx;
  746. border-radius: 12upx;
  747. width: 40%;
  748. margin: 20rpx 1% 10upx;
  749. // background-image: url(/static/unicorn-base/index/cc3b1807-c684-4b83-8f80-80e5b8a6b975.png);
  750. background-size: cover;
  751. background-position: center;
  752. position: relative;
  753. z-index: 1;
  754. }
  755. .nav-li::after {
  756. content: "";
  757. position: absolute;
  758. z-index: -1;
  759. background-color: inherit;
  760. width: 100%;
  761. height: 100%;
  762. left: 0;
  763. bottom: -10%;
  764. border-radius: 10upx;
  765. opacity: 0.2;
  766. transform: scale(0.9, 0.9);
  767. }
  768. .nav-li.cur {
  769. color: #fff;
  770. background: rgb(94, 185, 94);
  771. box-shadow: 4upx 4upx 6upx rgba(94, 185, 94, 0.4);
  772. }
  773. .nav-title {
  774. font-size: 32upx;
  775. font-weight: 300;
  776. }
  777. .nav-title::first-letter {
  778. font-size: 40upx;
  779. margin-right: 4upx;
  780. }
  781. .nav-name {
  782. font-size: 28upx;
  783. text-transform: Capitalize;
  784. margin-top: 20upx;
  785. position: relative;
  786. }
  787. .nav-name::before {
  788. content: "";
  789. position: absolute;
  790. display: block;
  791. width: 40upx;
  792. height: 6upx;
  793. background: #fff;
  794. bottom: 0;
  795. right: 0;
  796. opacity: 0.5;
  797. }
  798. .nav-name::after {
  799. content: "";
  800. position: absolute;
  801. display: block;
  802. width: 100upx;
  803. height: 1px;
  804. background: #fff;
  805. bottom: 0;
  806. right: 40upx;
  807. opacity: 0.3;
  808. }
  809. .nav-name::first-letter {
  810. font-weight: bold;
  811. font-size: 36upx;
  812. margin-right: 1px;
  813. }
  814. .nav-li image {
  815. position: absolute;
  816. right: 30upx;
  817. top: 30upx;
  818. font-size: 52upx;
  819. width: 70upx;
  820. height: 70upx;
  821. text-align: center;
  822. line-height: 60upx;
  823. }
  824. </style>