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.

396 lines
9.2 KiB

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