You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

413 lines
9.6 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="content">
  3. <view class="banner">
  4. <view class="head-div flex">
  5. <view style="width: 118rpx;height: 118rpx;overflow: hidden;border-radius: 50%;">
  6. <image style="width: 118rpx;" :src="userInfo.image" mode="widthFix"></image>
  7. </view>
  8. <view style="padding: 10rpx 34rpx;">
  9. <view class="nickname">{{ userInfo.title }}</view>
  10. <view class="days">{{ userInfo.notes }}</view>
  11. <view class="font-n" v-if="userInfo.realOk == 'Y'">已完成实名认证</view>
  12. </view>
  13. </view>
  14. <view style="position: absolute; top: 96rpx;right: 32rpx;">
  15. <image src="/static/icons/icon8.png" mode="aspectFit" style="width: 32rpx; height: 32rpx"></image>
  16. </view>
  17. </view>
  18. <view class="flex"
  19. style="padding: 30rpx;">
  20. <view style="
  21. width: 13rpx;height: 30rpx;
  22. background: #EF8C94;border-radius: 6rpx;"/>
  23. <view class="head-title">总佣金</view>
  24. </view>
  25. <view class="one-card b-relative">
  26. <image style="width: 675rpx;height: 200rpx;"
  27. src="/static/ms/tx.png"></image>
  28. <view class="font-4">
  29. <view>总佣金</view>
  30. <view class="font-5">
  31. <span style="font-size: 32rpx;margin-right: 10rpx">¥</span>{{ belece.money }}
  32. </view>
  33. </view>
  34. <view class="button-cz" @click="clickWallet">立即提现</view>
  35. </view>
  36. <view class="flex"
  37. style="padding: 30rpx;">
  38. <view style="
  39. width: 13rpx;height: 30rpx;
  40. background: #EF8C94;border-radius: 6rpx;"/>
  41. <view class="head-title">一键求救</view>
  42. </view>
  43. <view class="Ask-for-help">
  44. <view class=""
  45. style="height: 270rpx;
  46. margin: 10rpx;
  47. flex: 1;
  48. background-size: 100% 100%;
  49. background: url(/static/home/30.png);
  50. position: relative;">
  51. <!-- 这里调用地图 -->
  52. <view style="position: absolute;
  53. bottom: 0;
  54. left: 0;
  55. height: 50rpx;
  56. width: 100%;
  57. color: #FF6470;
  58. font-size: 24rpx;
  59. text-align: center;
  60. line-height: 50rpx;
  61. background-color: #EF8C9433;
  62. ">
  63. 实时获取你当前的位置
  64. </view>
  65. </view>
  66. <view
  67. style="height: 300rpx;flex: 1;font-size: 26rpx;">
  68. <view style="background-color: #00000011;
  69. color: #0E510D;
  70. margin: 10rpx auto;width: 80%;padding: 10rpx;">
  71. 如果你遇到了让你感到不安全情况下可点击下方
  72. </view>
  73. <view
  74. style="width: 80%;margin: 20rpx auto;
  75. background-color: #FF6470;padding: 20rpx 0;
  76. color: #fff;text-align: center;
  77. border-radius: 10rpx;">
  78. 一键求救
  79. </view>
  80. <view style="font-size: 22rpx;text-align: center;">
  81. 我们会立即发送您的求救位置
  82. </view>
  83. </view>
  84. </view>
  85. <!-- <view class="flex"
  86. style="padding: 30rpx;">
  87. <view style="
  88. width: 13rpx;height: 30rpx;
  89. background: #EF8C94;border-radius: 6rpx;"/>
  90. <view class="head-title">请假日历</view>
  91. </view> -->
  92. <van-calendar
  93. title="请假日历"
  94. color="rgb(255, 100, 112)"
  95. type="multiple"
  96. :default-date="defaultDate"
  97. switch-mode="year-month"
  98. :formatter="formatter"
  99. v-model:show="calendarShow"
  100. @confirm="calendarConfirm"
  101. ref="calendar"
  102. @close="$refs.calendar.reset()"
  103. />
  104. <view class="two-card">
  105. <view class="flex">
  106. <view style="width: 10rpx;height: 30rpx;
  107. background: #EF8C94;border-radius: 6rpx;"/>
  108. <view class="head-title">常用功能</view>
  109. </view>
  110. <view style="background-color: #fff;border-radius: 16rpx;">
  111. <view class="flex icons">
  112. <view class="menuItem" @click="clickUpload">
  113. <image class="icon" src="/static/icons/photo-album.png"/>
  114. <view class="title">我的相册</view>
  115. </view>
  116. <view class="menuItem" @click="clickSettled">
  117. <image class="icon" src="/static/icons/m2.png" />
  118. <view class="title">邀请入驻</view>
  119. </view>
  120. <view class="menuItem" @click="clickService">
  121. <image class="icon" src="/static/icons/m3.png" />
  122. <view class="title">联系客服</view>
  123. </view>
  124. <view class="menuItem" @click="clickAuthentication">
  125. <image class="icon" src="/static/icons/m4.png" />
  126. <view class="title">实名认证</view>
  127. </view>
  128. </view>
  129. <view class="flex icons"
  130. style="margin-top: 0;">
  131. <view class="menuItem" @click="clickServerTime">
  132. <image class="icon" src="/static/icons/m1.png" />
  133. <view class="title">服务时间</view>
  134. </view>
  135. <view class="menuItem" @click="clickCalendar">
  136. <image class="icon" src="/static/icons/rl.png" />
  137. <view class="title">请假日历</view>
  138. </view>
  139. <view class="menuItem" @click="logout">
  140. <image class="icon" src="/static/icons/exit.png" />
  141. <view class="title">退出登录</view>
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. <configPopup
  147. :keyValue="keyValue"
  148. :show="configPopupShow"
  149. :list="config"
  150. @close="configPopupShow = false"/>
  151. </view>
  152. </template>
  153. <script>
  154. import configPopup from '@/components/configPopup'
  155. export default {
  156. components : {
  157. configPopup
  158. },
  159. data() {
  160. return {
  161. userInfo : {},
  162. belece : {},
  163. configPopupShow : false,
  164. keyValue : 'phone',
  165. config : [],
  166. phone : '',
  167. defaultDate : [],
  168. calendarShow : false
  169. }
  170. },
  171. onShow() {
  172. this.getUserInfo()
  173. this.getConfig()
  174. },
  175. methods: {
  176. clickCalendar(){
  177. this.calendarShow = true
  178. },
  179. calendarConfirm(){
  180. console.log(1);
  181. },
  182. formatter(day){
  183. this.defaultDate.forEach(n => {
  184. if(day.date.getMonth() == n.getMonth()
  185. && day.date.getDate() == n.getDate()){
  186. day.bottomInfo = '请假';
  187. }
  188. })
  189. return day
  190. },
  191. onSelectCalendar(dates){
  192. console.log(1);
  193. },
  194. getUserInfo() {
  195. this.$api('giveTenInfo', {}, res => {
  196. if (res.code == 200) {
  197. this.userInfo = res.result.msgTen;
  198. this.belece = res.result.belece;
  199. }
  200. if (res.code == 500 && res.message === '操作失败,用户不存在!') {
  201. uni.removeStorageSync('token')
  202. uni.removeStorageSync('userInfo')
  203. uni.navigateTo({
  204. url: '/pages/login/login'
  205. })
  206. }
  207. })
  208. },
  209. getConfig() {
  210. // this.vid = uni.getStorageSync("ivcode");
  211. this.$api('getConfig', {} ,res => {
  212. if(res.code == 200){
  213. res.result.forEach(n => {
  214. if(n.keyValue == 'phone'){
  215. this.phone = n.name
  216. }
  217. })
  218. this.config = res.result
  219. }
  220. })
  221. },
  222. logout(){
  223. uni.removeStorageSync('token')
  224. uni.removeStorageSync('userInfo')
  225. uni.showToast({
  226. title: '已退出',
  227. icon: 'none'
  228. })
  229. uni.navigateTo({
  230. url: '/pages/login/mobile'
  231. })
  232. },
  233. clickUpload(){ uni.navigateTo({ url: '/pages/mine/upload' }) },
  234. clickSettled(){ uni.navigateTo({ url: '/pages/mine/settled' }) },
  235. clickWallet(){ uni.navigateTo({ url: '/pages/mine/wallet'}) },
  236. clickServerTime(){ uni.navigateTo({ url: `/pages/mine/serverTime?uid=${this.userInfo.id}` }) },
  237. clickAuthentication(){ uni.navigateTo({ url: '/pages/mine/authentication'}) },
  238. clickService(){ uni.makePhoneCall({ phoneNumber: this.phone, success:() => {}, fail: () => {} });},
  239. }
  240. }
  241. </script>
  242. <style scoped>
  243. body{
  244. background-color: #f5f5f5;
  245. }
  246. .content{
  247. padding-bottom: 200rpx;
  248. }
  249. .font-n {
  250. height: 42rpx;
  251. line-height: 42rpx;
  252. font-size: 20rpx;
  253. font-family: PingFang SC, PingFang SC-Medium;
  254. font-weight: 500;
  255. text-align: center;
  256. color: #fdfaf8;
  257. width: 168rpx;
  258. background: #4eed78;
  259. border-radius: 8px;
  260. margin-top: 5rpx;
  261. margin-left: 0rpx;
  262. }
  263. .banner {
  264. width: 100%;
  265. /* height: calc(392rpx - 60rpx); */
  266. /* background: #fff; */
  267. }
  268. .head-div{
  269. width: calc(100vw - 72rpx);
  270. height: 168rpx;
  271. padding: 72rpx 36rpx 0;
  272. margin: 0 auto;
  273. }
  274. .nickname{
  275. font-size: 36rpx;
  276. font-family: PingFang SC, PingFang SC-Bold;
  277. font-weight: 700;
  278. text-align: left;
  279. color: #323232;
  280. line-height: 42rpx;
  281. }
  282. .days{
  283. font-size: 28rpx;
  284. font-family: PingFang SC, PingFang SC-Regular;
  285. font-weight: 400;
  286. text-align: left;
  287. color: #ababab;
  288. line-height: 40rpx;
  289. }
  290. .one-card{
  291. width: 678rpx;
  292. border-radius: 16rpx;
  293. margin: 0 auto 0;
  294. }
  295. .two-card{
  296. width: calc(675rpx);
  297. height: 228rpx;
  298. border-radius: 16rpx;
  299. margin: 20rpx auto;
  300. padding: 40rpx 0;
  301. }
  302. .title{
  303. height: 40rpx;
  304. line-height: 40rpx;
  305. font-size: 28rpx;
  306. font-family: PingFang SC, PingFang SC-Regular;
  307. font-weight: 400;
  308. text-align: center;
  309. color: #2f2e2e;
  310. margin-top: 15rpx;
  311. }
  312. .icons{
  313. width: 100%;
  314. box-sizing: border-box;
  315. margin-top: 30rpx;
  316. padding: 20rpx 0rpx;
  317. }
  318. .icon{
  319. margin: 0 32rpx;
  320. width: 48rpx;
  321. height: 48rpx;
  322. border-radius: 50%;
  323. }
  324. .head-title{
  325. font-size: 30rpx;
  326. font-family: PingFang SC, PingFang SC-Bold;
  327. color: #2f2e2e;
  328. line-height: 30rpx;
  329. margin-left: 10rpx;
  330. font-weight: 700;
  331. }
  332. .font-4{
  333. font-size: 28rpx;
  334. font-family: PingFang SC, PingFang SC-Bold;
  335. font-weight: 700;
  336. text-align: left;
  337. color: #ffffff;
  338. text-shadow: 0 4rpx 6rpx 0 rgba(40,170,133,0.81);
  339. line-height: 44rpx;
  340. position: absolute;
  341. top: 32rpx;
  342. left: 52rpx;
  343. z-index: 1;
  344. }
  345. .font-5{
  346. font-size: 42rpx;
  347. font-family: PingFang SC, PingFang SC-Bold;
  348. font-weight: bolder;
  349. text-align: left;
  350. color: #ffffff;
  351. line-height: 72rpx;
  352. text-shadow: 0 4rpx 6rpx 0 rgba(0,0,0,0.16);
  353. }
  354. .button-cz{
  355. width: 200rpx;
  356. height: 58rpx;
  357. line-height: 58rpx;
  358. background: linear-gradient(182deg,#ffffff 2%, #FFD8DC 88%);
  359. border-radius: 30rpx;
  360. box-shadow: 0 6rpx 12rpx 0 #ababab55;
  361. font-size: 28rpx;
  362. font-family: PingFang SC, PingFang SC-Bold;
  363. font-weight: 700;
  364. text-align: center;
  365. color: #EF8C94;
  366. position: absolute;
  367. top: 72rpx;
  368. right: 52rpx;
  369. z-index: 1;
  370. }
  371. .menuItem{
  372. width: 25%;
  373. display: flex;
  374. flex-direction: column;
  375. align-items: center;
  376. }
  377. .Ask-for-help{
  378. background-color: #ffffff;
  379. margin: 0 40rpx;
  380. display: flex;
  381. }
  382. </style>