AI销管
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

357 satır
7.1 KiB

  1. <script>
  2. import Vue from 'vue';
  3. //app.js
  4. var config = require("./config");
  5. export default {
  6. onLaunch: function(options) {
  7. uni.getSystemInfo({
  8. success: function(e) {
  9. console.log(e, 'adjsakljdklasjdklsakjdslakjd')
  10. // #ifdef MP-WEIXIN
  11. Vue.prototype.StatusBar = e.statusBarHeight;
  12. let custom = wx.getMenuButtonBoundingClientRect();
  13. Vue.prototype.Custom = custom;
  14. Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
  15. Vue.prototype.windowHeight = e.safeArea.height
  16. // #endif
  17. Vue.mixin({
  18. data() {
  19. return {
  20. StatusBar: Vue.prototype.StatusBar,
  21. CustomBar: Vue.prototype.CustomBar,
  22. windowHeight: Vue.prototype.windowHeight
  23. };
  24. }
  25. });
  26. }
  27. });
  28. if (wx.canIUse('getUpdateManager')) {
  29. const updateManager = wx.getUpdateManager()
  30. updateManager.onCheckForUpdate(function(res) {
  31. if (res.hasUpdate) {
  32. updateManager.onUpdateReady(function() {
  33. uni.showModal({
  34. title: '更新提示',
  35. cancelColor: "#999999",
  36. content: '新版本已经准备好,是否重启应用?',
  37. success: function(res) {
  38. if (res.confirm) {
  39. updateManager.applyUpdate()
  40. }
  41. }
  42. })
  43. })
  44. updateManager.onUpdateFailed(function() {
  45. uni.showModal({
  46. title: '已经有新版本了哟~',
  47. cancelColor: "#999999",
  48. content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
  49. })
  50. })
  51. }
  52. })
  53. } else {
  54. uni.showModal({
  55. title: '提示',
  56. cancelColor: "#999999",
  57. content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
  58. })
  59. }
  60. const token = uni.getStorageSync("weapp_session_login_data")
  61. if (typeof token.token != "string") {
  62. return
  63. }
  64. uni.request({
  65. url: config.service.getUser,
  66. method: "GET",
  67. header: {
  68. 'content-type': 'application/json',
  69. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  70. },
  71. success: (res) => {
  72. let rescor = res.data.data;
  73. console.log(res, '数据', rescor)
  74. // return
  75. if (res.statusCode == 401) {
  76. uni.showToast({
  77. title: '登录过期请重新登录',
  78. icon: "none",
  79. duration: 2000,
  80. })
  81. uni.navigateTo({
  82. url: `/pages/login/index`
  83. })
  84. return
  85. }
  86. if (rescor.user.total == 0) {
  87. uni.showToast({
  88. title: '暂无绑定楼盘',
  89. duration: 2000,
  90. icon: "none"
  91. });
  92. return
  93. } else {
  94. let lopan = {
  95. id: rescor.houseList[0].id,
  96. name: rescor.houseList[0].propertyName
  97. }
  98. let users = rescor.user
  99. users.zkProperties = rescor.houseList
  100. console.log(users, '角色数据')
  101. uni.setStorageSync("weapp_session_userInfo_data", users); //写入缓存
  102. }
  103. }
  104. })
  105. // this.$u.get("/user/getUser")
  106. // .then(data => {
  107. // if (data.user.total==0) {
  108. // uni.showToast({
  109. // title: '暂无绑定楼盘',
  110. // duration: 2000,
  111. // icon:"none"
  112. // });
  113. // return
  114. // } else {
  115. // let lopan = {
  116. // id: data.houseList[0].id,
  117. // name: data.houseList[0].propertyName
  118. // }
  119. // let users=data.user
  120. // users.zkProperties=data.houseList
  121. // uni.setStorageSync("weapp_session_userInfo_data",users); //写入缓存
  122. // }
  123. // })
  124. wx.setInnerAudioOption({
  125. obeyMuteSwitch: false
  126. });
  127. },
  128. onShow(options) {
  129. const token = uni.getStorageSync("weapp_session_login_data")
  130. if (typeof token.token != "string") {
  131. console.log("没有")
  132. return
  133. } else {}
  134. },
  135. onHide() {},
  136. methods: {}
  137. };
  138. </script>
  139. <style>
  140. @import "./app.css";
  141. </style>
  142. <style lang="scss">
  143. @import "uview-ui/index.scss";
  144. /*每个页面公共css */
  145. //图表样式等
  146. .single {
  147. width: 100%;
  148. background: #FFFFFF;
  149. .title {
  150. width: 100%;
  151. height: 90rpx;
  152. border-bottom: 1rpx solid #E0E0E0;
  153. display: flex;
  154. .title1 {
  155. flex: 2;
  156. font-size: 30rpx;
  157. font-weight: 600;
  158. color: #333333;
  159. line-height: 90rpx;
  160. text-indent: 30rpx;
  161. }
  162. .title3 {
  163. flex: 3;
  164. height: 90rpx;
  165. display: flex;
  166. align-items: center;
  167. justify-content: flex-end;
  168. .title3-box {
  169. display: flex;
  170. align-items: center;
  171. width: 25%;
  172. justify-content: center;
  173. .activecltab {
  174. border-bottom: 2px solid #2671E2;
  175. }
  176. }
  177. }
  178. .title2 {
  179. flex: 3;
  180. height: 90rpx;
  181. display: flex;
  182. align-items: center;
  183. .title2-che {
  184. width: 178rpx;
  185. height: 48rpx;
  186. background: #FFFFFF;
  187. border-radius: 6rpx;
  188. border: 1px solid #E0E0E0;
  189. line-height: 48rpx;
  190. font-size: 28rpx;
  191. font-weight: 400;
  192. color: #666666;
  193. text-indent: 12rpx;
  194. margin-left: 35rpx;
  195. position: relative;
  196. .righttochoose {
  197. width: 18rpx;
  198. height: 24rpx;
  199. position: absolute;
  200. top: 12rpx;
  201. right: 12rpx;
  202. }
  203. }
  204. }
  205. }
  206. .swiper-box {
  207. width: 97%;
  208. margin: 0 auto;
  209. }
  210. .hejibox {
  211. width: 100%;
  212. height: 80rpx;
  213. display: flex;
  214. .heji {
  215. width: 50%;
  216. height: 100%;
  217. font-size: 28rpx;
  218. font-weight: 400;
  219. color: #666666;
  220. line-height: 80rpx;
  221. text-indent: 30rpx;
  222. }
  223. }
  224. .danwei {
  225. width: 100%;
  226. height: 40rpx;
  227. font-size: 24rpx;
  228. font-weight: 400;
  229. color: #999999;
  230. line-height: 40rpx;
  231. text-indent: 30rpx;
  232. }
  233. .uchaserbox {
  234. width: 95%;
  235. height: 470rpx;
  236. }
  237. .jindu {
  238. width: 100%;
  239. height: 300rpx;
  240. .jindu-box {
  241. width: 100%;
  242. padding-left: 30rpx;
  243. padding-right: 30rpx;
  244. .jindu-boxche {
  245. width: 100%;
  246. height: 46rpx;
  247. display: flex;
  248. align-items: center;
  249. height: 50rpx;
  250. .jindu-name {
  251. width: 120rpx;
  252. font-size: 28rpx;
  253. color: #666666;
  254. }
  255. .jindu-zxl {
  256. width: 120rpx;
  257. font-size: 26rpx;
  258. margin-left: 16rpx;
  259. color: #666666;
  260. text-align: center;
  261. }
  262. }
  263. }
  264. }
  265. }
  266. //时间切换的样式
  267. .boxtittab {
  268. width: 100;
  269. height: 92rpx;
  270. background: #FFFFFF;
  271. border: 1px solid #E0E0E0;
  272. display: flex;
  273. align-items: center;
  274. .tabbox {
  275. flex: 1;
  276. height: 100%;
  277. text-align: center;
  278. line-height: 92rpx;
  279. color: #666666;
  280. font-size: 28rpx;
  281. display: flex;
  282. justify-content: center;
  283. .activecllasscet {
  284. width: 96rpx;
  285. border-bottom: 2px solid #2671E2;
  286. }
  287. }
  288. }
  289. //多个格子的样式
  290. .boxzonglan {
  291. width: 100%;
  292. min-height: 496rpx;
  293. background: #FFFFFF;
  294. padding: 30rpx 30rpx 30rpx 30rpx;
  295. .zonglantit {
  296. font-size: 30rpx;
  297. color: #333333;
  298. font-family: PingFangSC-Semibold, PingFang SC;
  299. font-weight: 600;
  300. }
  301. .zonglanbox {
  302. width: 100%;
  303. display: flex;
  304. flex-wrap: wrap;
  305. margin-top: 24rpx;
  306. .grid {
  307. width: 50%;
  308. height: 128rpx;
  309. border: 1px solid #E0E0E0;
  310. .audonum {
  311. color: #666666;
  312. text-indent: 40rpx;
  313. font-size: 26rpx;
  314. margin-top: 20rpx;
  315. }
  316. .num {
  317. color: #333333;
  318. text-indent: 40rpx;
  319. font-size: 32rpx;
  320. font-weight: 600;
  321. margin-top: 10rpx;
  322. }
  323. }
  324. }
  325. }
  326. </style>