index.vue 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816
  1. <template>
  2. <view class="workbench">
  3. <image class="page-bg" src="/static/workbench/indexBg.png" mode="" />
  4. <view class="page-content">
  5. <!-- 头部:头像、昵称、经营状态 -->
  6. <view class="header-section">
  7. <view class="header-main" @click="goProfile">
  8. <view class="avatar-wrap">
  9. <image class="avatar"
  10. :src="merchantInfo.cPortrait ? $globalData.publicUrl + merchantInfo.cPortrait : '/static/common/avatar.png'"
  11. mode="aspectFill" />
  12. </view>
  13. <view class="header-info">
  14. <view class="nickname">
  15. {{ merchantInfo.cNickName || merchantInfo.cName || '技师昵称' }}
  16. </view>
  17. <view class="status-bar">
  18. <view class="status-tag">
  19. <image class="status-tag-icon" src="/static/workbench/store.png" mode="aspectFit" />
  20. <text>正常经营</text>
  21. </view>
  22. <view class="status-select" @click.stop="openStatusPopup">
  23. <text>{{ isWorking ? '在线接单' : '休息中' }}</text>
  24. <image class="status-arrow" src="/static/workbench/down.png" mode="aspectFit" />
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- 统计 -->
  31. <view class="card stats-section">
  32. <view class="stat-item" @click="goTodayOrders">
  33. <view class="stat-value">{{ todayOrderCount }}<text class="unit">笔</text></view>
  34. <view class="stat-label">今日订单</view>
  35. </view>
  36. <view class="stat-item" @click="goBankList">
  37. <view class="stat-value">{{ bankCardCount }}<text class="unit">张</text></view>
  38. <view class="stat-label">银行卡</view>
  39. </view>
  40. <view class="stat-item" @click="goReviewList">
  41. <view class="stat-value">{{ ratingScore }}</view>
  42. <view class="stat-label">评分</view>
  43. </view>
  44. <view class="stat-item">
  45. <view class="stat-value">{{ onlineHours }}<text class="unit">小时</text></view>
  46. <view class="stat-label">在线时长</view>
  47. </view>
  48. </view>
  49. <!-- 钱包 -->
  50. <view class="card wallet-section">
  51. <view class="balance-row">
  52. <view class="balance-main" @click="goWithdraw">
  53. <text class="balance-amount">{{ formatMoney(balance) }}</text>
  54. <text class="balance-label">余额(元)</text>
  55. </view>
  56. <view class="withdraw-btn" @click.stop="goWithdraw">提现</view>
  57. </view>
  58. <view class="wallet-grid">
  59. <view class="wallet-item" @click="goIncome">
  60. <view class="wallet-value">{{ formatMoney(myIncome.tAmount) }}</view>
  61. <view class="wallet-label">收入(元)</view>
  62. </view>
  63. <view class="wallet-item" @click="goIncome">
  64. <view class="wallet-value">{{ formatMoney(myIncome.wAmount) }}</view>
  65. <view class="wallet-label">待结算(元)</view>
  66. </view>
  67. <view class="wallet-item" @click="goIncome">
  68. <view class="wallet-value">{{ formatMoney(myIncome.yAmount) }}</view>
  69. <view class="wallet-label">已结算(元)</view>
  70. </view>
  71. <view class="wallet-item" @click="goWithdrawRecord">
  72. <view class="wallet-value">{{ formatMoney(myIncome.gAmount) }}</view>
  73. <view class="wallet-label">已提现(元)</view>
  74. </view>
  75. </view>
  76. </view>
  77. <!-- 新订单 -->
  78. <view class="order-section" v-if="pendingOrder">
  79. <view class="order-header">
  80. <view class="order-header-bg">
  81. <image src="/static/workbench/orderTop.png" mode="scaleToFill" />
  82. </view>
  83. <view class="order-header-content">
  84. <image class="order-bell" src="/static/workbench/orderTip.png" mode="aspectFit" />
  85. <text>有新的订单</text>
  86. </view>
  87. </view>
  88. <view class="order-card">
  89. <view class="order-title-row">
  90. <text class="order-title one-line-text">{{ orderTitle }}服务项目</text>
  91. <!-- v-if="isNewCustomer" -->
  92. <text class="tag-new">新客户</text>
  93. </view>
  94. <view class="order-time">
  95. <image class="order-icon" src="/static/workbench/orderTime.png" mode="aspectFit" />
  96. <text>{{ orderServiceTime }}5月12日</text>
  97. </view>
  98. <view class="order-address">
  99. <image class="order-icon" src="/static/workbench/orderAddress.png" mode="aspectFit" />
  100. <text>{{ orderAddress }}订单地址orderAddress</text>
  101. </view>
  102. <view class="order-actions">
  103. <view class="reject-btn" @click="onRejectOrder">拒绝</view>
  104. <view class="slide-wrap" id="slideWrap">
  105. <view class="slide-track">
  106. <text class="slide-hint">滑动接单</text>
  107. <view class="slide-thumb" :style="{ transform: `translateX(${slideX}px)` }"
  108. @touchstart="onSlideStart" @touchmove.stop.prevent="onSlideMove"
  109. @touchend="onSlideEnd">
  110. <image class="slide-arrow" src="/static/workbench/move.png" mode="aspectFit" />
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. <!-- 我的技能 -->
  118. <view class="card skills-section" v-if="skillList">
  119. <view class="section-header">
  120. <view class="section-heading-wrap">
  121. <view class="section-heading-box">
  122. <view class="section-heading">我的技能({{ skillList.length }}项)</view>
  123. </view>
  124. <image class="skill-tip" src="/static/workbench/skillTip.png" mode="aspectFit" />
  125. </view>
  126. <view class="section-link" @click="goSkillManage">
  127. <text>管理</text>
  128. <image class="link-arrow" src="/static/workbench/right.png" mode="aspectFit" />
  129. </view>
  130. </view>
  131. <!-- 单个:全宽静态展示 -->
  132. <view v-if="skillList.length === 1" class="skill-single">
  133. <view class="skill-card skill-card--single">
  134. <view class="skill-img">
  135. <image :src="public + skillList[0].projectMasterImage" mode="aspectFill" />
  136. </view>
  137. <view class="skill-info">
  138. <view class="skill-name one-line-text">{{ skillList[0].projectName }}</view>
  139. <view class="skill-tags" v-if="skillList[0].highlight && skillList[0].highlight.length">
  140. <view class="skill-tag" v-for="(tag, tagIndex) in skillList[0].highlight"
  141. :key="tagIndex">
  142. {{ tag }}</view>
  143. </view>
  144. <view class="skill-price">¥{{ formatMoney(skillList[0].projectCurrentPrice) }}</view>
  145. </view>
  146. </view>
  147. </view>
  148. <!-- 多个:横向滑动 -->
  149. <scroll-view v-else scroll-x class="skill-scroll" :show-scrollbar="false" enable-flex>
  150. <view class="skill-list">
  151. <view class="skill-card skill-card--multi" v-for="(item, index) in skillList" :key="index">
  152. <view class="skill-img">
  153. <image :src="public + item.projectMasterImage" mode="aspectFill" />
  154. </view>
  155. <view class="skill-info">
  156. <view class="skill-name one-line-text">{{ item.projectName }}</view>
  157. <view class="skill-price">¥{{ formatMoney(item.projectCurrentPrice) }}</view>
  158. </view>
  159. </view>
  160. </view>
  161. </scroll-view>
  162. </view>
  163. <!-- 我的地址 -->
  164. <view class="card-address address-section">
  165. <view class="address-heading-wrap">
  166. <view class="section-heading">我的地址</view>
  167. <image class="address-tip" src="/static/workbench/skillTip.png" mode="aspectFit" />
  168. </view>
  169. <view class="address-row">
  170. <image class="address-icon" src="/static/workbench/address.png" mode="aspectFit" />
  171. <text class="address-text">{{ currentAddress || '暂无地址' }}</text>
  172. </view>
  173. <view class="address-actions">
  174. <view class="addr-btn" @click="goSwitchAddress">切换地址</view>
  175. <view class="addr-divider" />
  176. <view class="addr-btn" @click="goUpdateAddress">更新地址</view>
  177. </view>
  178. </view>
  179. <!-- 更多功能 -->
  180. <view class="card more-section">
  181. <view class="more-heading-wrap">
  182. <view class="section-heading">更多功能</view>
  183. <image class="more-tip" src="/static/workbench/skillTip.png" mode="aspectFit" />
  184. </view>
  185. <view class="more-grid">
  186. <view class="more-item" v-for="(item, index) in moreFeatures" :key="index"
  187. @click="onMoreFeature(item)">
  188. <image class="more-icon" :src="item.icon" mode="aspectFit" />
  189. <text class="more-label">{{ item.label }}</text>
  190. </view>
  191. </view>
  192. </view>
  193. </view>
  194. <!-- 拒绝接单弹窗 -->
  195. <view class="popup-mask" v-if="showRejectPopup" @click="closeRejectPopup">
  196. <view class="popup-box" @click.stop>
  197. <view class="popup-title">请输入拒绝接单原因</view>
  198. <input class="popup-input" v-model="rejectReason" maxlength="10" placeholder="请输入拒绝原因,最多10个字" />
  199. <view class="popup-btns">
  200. <view class="popup-btn" @click="closeRejectPopup">取消</view>
  201. <view class="popup-btn confirm" @click="submitReject">提交</view>
  202. </view>
  203. </view>
  204. </view>
  205. <!-- 接单状态底部弹窗 -->
  206. <view class="popup-mask bottom" v-if="showStatusPopup" @click="showStatusPopup = false">
  207. <view class="status-panel" @click.stop>
  208. <view class="panel-title">接单状态</view>
  209. <view class="status-option" :class="{ active: statusDraft === 'rest' }" @click="statusDraft = 'rest'">
  210. <view class="option-body">
  211. <text class="option-name">{{ !isWorking ? '休息中' : '下线休息' }}</text>
  212. <text class="option-desc">{{ getStatusDesc('rest') }}</text>
  213. </view>
  214. <view class="option-check" v-if="statusDraft === 'rest'">
  215. <image src="@/static/workbench/checkCircle.png" mode=""></image>
  216. </view>
  217. </view>
  218. <view class="status-option" :class="{ active: statusDraft === 'working' }"
  219. @click="statusDraft = 'working'">
  220. <view class="option-body">
  221. <text class="option-name">在线接单</text>
  222. <text class="option-desc">{{ getStatusDesc('working') }}</text>
  223. </view>
  224. <view class="option-check" v-if="statusDraft === 'working'">
  225. <image src="@/static/workbench/checkCircle.png" mode=""></image>
  226. </view>
  227. </view>
  228. <view class="panel-btns">
  229. <view class="panel-btn" @click="showStatusPopup = false">取消</view>
  230. <view class="panel-btn confirm" @click="confirmStatusChange">确定</view>
  231. </view>
  232. </view>
  233. </view>
  234. <!-- 未入驻提示 -->
  235. <u-popup :show="showModal" mode="center" :round="16" :mask-close-able="false">
  236. <view class="modal-wrap">
  237. <!-- 标题居中 -->
  238. <view class="title">{{ auditStatus == 0 ? '提示' : '入驻审核驳回' }}</view>
  239. <!-- 正文 -->
  240. <view class="content">
  241. 请提交入驻资料并由后台人员审核通过后,即可开通操作权限
  242. </view>
  243. <!-- 底部双按钮(必显示) -->
  244. <view class="btn-box">
  245. <view v-if="auditStatus == 3" class="btn">修改入驻信息</view>
  246. <view v-if="auditStatus == 0" class="btn left" @click="cancel">我在想想</view>
  247. <view v-if="auditStatus == 0" class="btn right" @click="goEnter">立即入驻</view>
  248. </view>
  249. </view>
  250. </u-popup>
  251. <!-- 退出登录弹窗 -->
  252. <u-popup :show="showModal2" mode="center" :round="16" :mask-close-able="false">
  253. <view class="modal-wrap">
  254. <!-- 标题居中 -->
  255. <view class="title">提示</view>
  256. <!-- 正文 -->
  257. <view class="content">
  258. 确定退出登录吗?
  259. </view>
  260. <!-- 底部双按钮(必显示) -->
  261. <view class="btn-box">
  262. <view class="btn left" @click="showModal2 = false">取消</view>
  263. <view class="btn right" @click="goLogout">确定</view>
  264. </view>
  265. </view>
  266. </u-popup>
  267. <!-- 技能完善新手引导 -->
  268. <view v-show="showSkillGuide" class="guide-full-mask" @click="closeSkillGuide">
  269. <!-- 镂空高亮区域 -->
  270. <view class="guide-hole" :style="holeStyle"></view>
  271. <!-- 提示气泡 -->
  272. <view class="guide-tip-pop" :style="tipPopStyle">
  273. <text>欢迎入驻~完善你的服务技能标签,用户能快速找到你、下单更多!</text>
  274. <view class="guide-hand">👆</view>
  275. </view>
  276. </view>
  277. </view>
  278. </template>
  279. <script>
  280. import {
  281. getMerchantData,
  282. getInfo,
  283. myIncome,
  284. getStaffWorkData,
  285. getWaitOrder,
  286. myBank,
  287. getProjectByJsId,
  288. netStaffWork,
  289. logout,
  290. getJsLocation,
  291. } from '@/api/index';
  292. import {
  293. orderDeatails,
  294. takeOrder,
  295. refuseOrder
  296. } from '@/api/order.js';
  297. import {
  298. switchToOffline,
  299. getSkillList
  300. } from '@/api/workbench.js';
  301. import { normalizeStorageValue } from '@/utils/technicianProfile.js';
  302. export default {
  303. data() {
  304. return {
  305. showModal2: false, // 控制退出登录弹窗显隐
  306. showModal: false, // 控制弹窗显隐
  307. merchantInfo: {},
  308. cJsId: '',
  309. isWorking: false,
  310. todayOrderCount: '6',
  311. bankCardCount: '3',
  312. ratingScore: '4.8',
  313. onlineHours: '3',
  314. workStartTime: null,
  315. restStartTime: null,
  316. balance: 12341.56,
  317. myIncome: {
  318. tAmount: '12341.56',
  319. wAmount: '12341.56',
  320. yAmount: '12341.56',
  321. gAmount: '12341.56',
  322. kAmount: '12341.56',
  323. deductAmount: '12341.56',
  324. },
  325. pendingOrder: true,
  326. currentAddress: '',
  327. showRejectPopup: false,
  328. rejectReason: '',
  329. showStatusPopup: false,
  330. statusDraft: 'working',
  331. slideX: 0,
  332. slideStartX: 0,
  333. slideMax: 0,
  334. isSliding: false,
  335. skillList: [],
  336. public: this.$globalData.publicUrl, //图片前缀
  337. serviceTag: '', //服务标签(1:按摩推拿 2:陪玩)
  338. moreFeatures: [
  339. { label: '免车费', icon: '/static/workbench/freeCar.png', path: '/workbench/fare/index' },
  340. { label: '开通新技能', icon: '/static/workbench/newSkill.png', path: '/workbench/skill/add' },
  341. { label: '我的合同', icon: '/static/workbench/contract.png', path: '/workbench/contract/index' },
  342. { label: '我的资料', icon: '/static/workbench/info.png', path: '/pages/join/applyJoin?title=编辑资料' },
  343. { label: '城市管理', icon: '/static/workbench/city.png', path: '/workbench/city/index' },
  344. { label: '退出登录', icon: '/static/workbench/logout.png', },
  345. ],
  346. auditStatus: 0,
  347. // 原有数据不动,追加下面两行
  348. showSkillGuide: false,
  349. holeStyle: {},
  350. tipPopStyle: {}
  351. }
  352. },
  353. computed: {
  354. orderTitle() {
  355. if (!this.pendingOrder) return ''
  356. const goods = this.pendingOrder.cGoods || []
  357. return goods[0]?.cTitle || '服务项目'
  358. },
  359. orderServiceTime() {
  360. if (!this.pendingOrder) return ''
  361. return this.formatOrderTime(
  362. this.pendingOrder.reachTime || this.pendingOrder.dtCreateTime || ''
  363. )
  364. },
  365. deductionAmount() {
  366. return (
  367. this.myIncome.kAmount ??
  368. this.myIncome.deductAmount ??
  369. this.myIncome.dAmount ??
  370. 0
  371. )
  372. },
  373. orderAddress() {
  374. if (!this.pendingOrder) return ''
  375. return this.pendingOrder.address || this.pendingOrder.atlasAdd || ''
  376. },
  377. isNewCustomer() {
  378. return this.pendingOrder?.nB2 == 1
  379. },
  380. },
  381. onShow() {
  382. setTimeout(() => {
  383. this.loadPageData()
  384. this.getSkillList();
  385. // 新增:判断是否需要展示技能引导
  386. const guideFlag = uni.getStorageSync('merchant_skill_manage_guide')
  387. if (!guideFlag && this.auditStatus === 2) { // 仅审核通过正式商户展示
  388. this.$nextTick(() => this.getManageBtnRect())
  389. }
  390. }, 300)
  391. },
  392. async onLoad() {
  393. this.auditStatus = await this.checkMerchantStatus()
  394. this.auditStatus = 0 //guo
  395. if (this.auditStatus == 0 || this.auditStatus == 3) {
  396. this.showModal = true
  397. return
  398. }
  399. if (this.auditStatus == 1) {
  400. uni.showToast({
  401. title: '入驻审核中,暂无操作权限',
  402. icon: 'none'
  403. })
  404. }
  405. console.log('onLoad')
  406. },
  407. methods: {
  408. //查询商户状态 auditStatus 审核状态:-1-申请入住,0-待入驻,1-待审核,2-审核通过,3-审核驳回"
  409. async checkMerchantStatus() {
  410. const openid = uni.getStorageSync('wx_copenid')
  411. const merchantInfo = await this.$utils.checkMerchantStatus(openid)
  412. if (!merchantInfo) return
  413. this.cJsId = merchantInfo.merchant.id; //用户id
  414. /**
  415. * 服务标签(1:按摩推拿 2:陪玩)
  416. */
  417. this.serviceTag = merchantInfo.merchant.serviceTag
  418. uni.setStorageSync('serviceTag', normalizeStorageValue(merchantInfo.merchant.serviceTag))
  419. uni.setStorageSync('userId', normalizeStorageValue(merchantInfo.merchant.id))
  420. return merchantInfo.merchant.auditStatus//用户状态
  421. },
  422. // 我在想想:关闭弹窗
  423. cancel() {
  424. this.showModal = false
  425. },
  426. // 立即入驻:跳转入驻页
  427. goEnter() {
  428. this.showModal = false
  429. uni.navigateTo({
  430. url: '/pages/join/applyJoin' // 替换你的入驻页面路径
  431. })
  432. },
  433. loadPageData() {
  434. // this.fetchMerchantInfo()
  435. // this.fetchWalletInfo()
  436. // this.fetchIncome()
  437. // this.fetchWorkData()
  438. // this.fetchBankCards()
  439. },
  440. getSkillList() {
  441. let params = {
  442. auditStatus: "1", //审核状态:0-待审核,1-审核通过,2-审核驳回
  443. userId: this.cJsId, //商户ID
  444. typeId: this.serviceTag //服务标签ID
  445. }
  446. getSkillList(params).then(res => {
  447. console.log('res----我的技能', res)
  448. if (res.data.code == 200) {
  449. this.skillList = res.data.result;
  450. }
  451. })
  452. },
  453. fetchMerchantInfo() {
  454. const params = {
  455. cOpenId: uni.getStorageSync('wx_copenid')
  456. }
  457. getMerchantData(params).then(res => {
  458. if (res.data.code != 200 || !res.data.data) return
  459. const data = res.data.data
  460. this.merchantInfo = data
  461. this.cJsId = data.id
  462. this.isWorking = data.nStatus2 == '0'
  463. this.ratingScore = data.nStar != null ? Number(data.nStar).toFixed(1) : '0.0'
  464. this.workStartTime = data.dtWorkStart || data.dtOnlineStart || null
  465. this.restStartTime = data.dtRestStart || data.restStartTime || null
  466. this.syncCurrentAddress(data)
  467. this.fetchTodayOrders()
  468. this.fetchPendingOrder()
  469. this.fetchSkills()
  470. })
  471. },
  472. fetchWalletInfo() {
  473. getInfo().then(res => {
  474. if (res.data.code == 200 && res.data.data) {
  475. this.cJsId = res.data.data.id;
  476. }
  477. })
  478. },
  479. fetchIncome() {
  480. myIncome().then(res => {
  481. if (res.data.code == 200 && res.data.data) {
  482. this.myIncome = res.data.data
  483. }
  484. })
  485. },
  486. fetchWorkData() {
  487. getStaffWorkData({
  488. openId: uni.getStorageSync('wx_copenid')
  489. }).then(res => {
  490. if (res.data.code == 200 && res.data.data) {
  491. const minutes = res.data.data.onLine || 0
  492. // this.onlineHours = (minutes / 60).toFixed(1).replace(/\.0$/, '')
  493. }
  494. })
  495. },
  496. fetchBankCards() {
  497. myBank().then(res => {
  498. if (res.data.code == 200 && Array.isArray(res.data.data)) {
  499. // this.bankCardCount = res.data.data.length
  500. }
  501. })
  502. },
  503. fetchTodayOrders() {
  504. if (!this.cJsId) return
  505. getWaitOrder({
  506. cJsId: this.cJsId
  507. }).then(res => {
  508. if (res.data.code == 200) {
  509. this.todayOrderCount = res.data.data || 0
  510. }
  511. })
  512. },
  513. fetchSkills() {
  514. // TODO: 接口联调后开启,当前使用假数据展示
  515. return
  516. const openId = uni.getStorageSync('wx_copenid')
  517. if (!openId) return
  518. getProjectByJsId({
  519. openId
  520. }).then(res => {
  521. if (res.data.code == 200 && Array.isArray(res.data.data)) {
  522. this.skillList = res.data.data
  523. }
  524. })
  525. },
  526. fetchPendingOrder() {
  527. if (!this.cJsId) return
  528. orderDeatails({
  529. cJsId: this.cJsId,
  530. nStatus: 0,
  531. current: 1,
  532. size: 1,
  533. }).then(res => {
  534. if (res.data.code == 200 && res.data.data?.records?.length) {
  535. this.pendingOrder = res.data.data.records[0]
  536. this.slideX = 0
  537. this.initSlideRange()
  538. } else {
  539. this.pendingOrder = null
  540. }
  541. })
  542. },
  543. formatMoney(amount) {
  544. const num = parseFloat(amount)
  545. if (isNaN(num)) return '0.00'
  546. return num.toFixed(2)
  547. },
  548. skillPriceUnit(item) {
  549. if (item.cUnit) return `/ ${ item.cUnit } `
  550. if (item.nMinute) return '/小时'
  551. return ''
  552. },
  553. formatOrderTime(timeStr) {
  554. if (!timeStr) return ''
  555. const str = String(timeStr)
  556. const d = new Date(str.replace(/-/g, '/'))
  557. if (Number.isNaN(d.getTime())) return str
  558. const m = d.getMonth() + 1
  559. const day = d.getDate()
  560. const hh = String(d.getHours()).padStart(2, '0')
  561. const mm = String(d.getMinutes()).padStart(2, '0')
  562. if (str.includes('-') && str.length > 16) {
  563. const end = str.slice(11, 16)
  564. if (end && end !== `${ hh }:${ mm } `) {
  565. return `${ m }月${ day }日 ${ hh }:${ mm }至${ end } `
  566. }
  567. }
  568. return `${ m }月${ day }日 ${ hh }:${ mm } `
  569. },
  570. getStatusDurationHours(type) {
  571. const since =
  572. type === 'working' ?
  573. this.workStartTime :
  574. this.restStartTime
  575. if (!since) return 0
  576. const start = new Date(String(since).replace(/-/g, '/')).getTime()
  577. if (Number.isNaN(start)) return 0
  578. return Math.max(0, Math.floor((Date.now() - start) / 3600000))
  579. },
  580. getStatusDesc(type) {
  581. const isCurrent =
  582. type === 'working' ? this.isWorking : !this.isWorking
  583. if (isCurrent) {
  584. const hours = this.getStatusDurationHours(type)
  585. if (type === 'working') {
  586. return `已连续辛勤工作${ hours } 个小时`
  587. }
  588. return `已休息${ hours } 个小时`
  589. }
  590. if (type === 'working') {
  591. return '早起的人已经接单,勤奋的人账户常满'
  592. }
  593. return '今日辛苦啦,早点下线休息,注意劳逸结合!'
  594. },
  595. openStatusPopup() {
  596. this.statusDraft = this.isWorking ? 'working' : 'rest'
  597. this.showStatusPopup = true
  598. },
  599. confirmStatusChange() {
  600. const wantWorking = this.statusDraft === 'working'
  601. this.showStatusPopup = false
  602. if (wantWorking === this.isWorking) return
  603. this.updateWorkStatus(wantWorking)
  604. },
  605. updateWorkStatus(working) {
  606. if (!this.cJsId) {
  607. uni.showToast({
  608. title: '请先登录',
  609. icon: 'none'
  610. })
  611. return
  612. }
  613. switchToOffline({
  614. userId: this.cJsId,
  615. forceConfirm: working,
  616. }).then(res => {
  617. if (res.data.code == 200) {
  618. this.isWorking = working
  619. const now = new Date().toISOString()
  620. if (working) {
  621. this.workStartTime = now
  622. } else {
  623. this.restStartTime = now
  624. }
  625. uni.showToast({
  626. title: working ? '已上线' : '已下线',
  627. icon: 'none'
  628. })
  629. } else {
  630. uni.showToast({
  631. title: res.data.msg || '设置失败',
  632. icon: 'none'
  633. })
  634. }
  635. })
  636. },
  637. async onRejectOrder() {
  638. this.auditStatus = await this.checkMerchantStatus()
  639. if (this.auditStatus == 0 || this.auditStatus == 3) {
  640. this.showModal = true
  641. return
  642. }
  643. if (this.auditStatus == 1) {
  644. uni.showToast({
  645. title: '入驻审核中,暂无操作权限',
  646. icon: 'none'
  647. })
  648. return
  649. }
  650. this.showRejectPopup = true
  651. this.rejectReason = ''
  652. },
  653. closeRejectPopup() {
  654. this.showRejectPopup = false
  655. this.rejectReason = ''
  656. },
  657. submitReject() {
  658. const reason = this.rejectReason.trim()
  659. if (!reason) {
  660. uni.showToast({
  661. title: '拒绝原因不能为空',
  662. icon: 'none'
  663. })
  664. return
  665. }
  666. refuseOrder({
  667. cId: this.pendingOrder.cId,
  668. reasonRefusal: reason,
  669. }).then(res => {
  670. if (res.data.code == 200) {
  671. uni.showToast({
  672. title: '已拒绝',
  673. icon: 'none'
  674. })
  675. this.closeRejectPopup()
  676. this.pendingOrder = null
  677. this.fetchTodayOrders()
  678. } else {
  679. uni.showToast({
  680. title: res.data.msg || '操作失败',
  681. icon: 'none'
  682. })
  683. }
  684. })
  685. },
  686. initSlideRange() {
  687. this.$nextTick(() => {
  688. const query = uni.createSelectorQuery().in(this)
  689. query.select('.slide-track').boundingClientRect()
  690. query.select('.slide-thumb').boundingClientRect()
  691. query.exec(res => {
  692. const trackRect = res[0]
  693. const thumbRect = res[1]
  694. if (trackRect && thumbRect) {
  695. this.slideMax = Math.max(0, trackRect.width - thumbRect.width)
  696. }
  697. })
  698. })
  699. },
  700. async onSlideStart(e) {
  701. this.auditStatus = await this.checkMerchantStatus()
  702. if (this.auditStatus == 0 || this.auditStatus == 3) {
  703. this.showModal = true
  704. return
  705. }
  706. if (this.auditStatus == 1) {
  707. uni.showToast({
  708. title: '入驻审核中,暂无操作权限',
  709. icon: 'none'
  710. })
  711. return
  712. }
  713. this.isSliding = true
  714. this.slideStartX = e.touches[0].clientX - this.slideX
  715. this.initSlideRange()
  716. },
  717. onSlideMove(e) {
  718. if (!this.isSliding) return
  719. let x = e.touches[0].clientX - this.slideStartX
  720. if (x < 0) x = 0
  721. if (x > this.slideMax) x = this.slideMax
  722. this.slideX = x
  723. },
  724. onSlideEnd() {
  725. if (!this.isSliding) return
  726. this.isSliding = false
  727. if (this.slideX >= this.slideMax * 0.85) {
  728. this.acceptOrder()
  729. }
  730. this.slideX = 0
  731. },
  732. acceptOrder() {
  733. if (!this.pendingOrder) return
  734. uni.showToast({
  735. title: '接单失败',
  736. icon: 'none'
  737. })
  738. return;
  739. takeOrder({
  740. cId: this.pendingOrder.cId
  741. }).then(res => {
  742. if (res.data.code == 200) {
  743. uni.showToast({
  744. title: '已接单',
  745. icon: 'none'
  746. })
  747. this.pendingOrder = null
  748. this.fetchTodayOrders()
  749. } else {
  750. uni.showToast({
  751. title: res.data.msg || '接单失败',
  752. icon: 'none'
  753. })
  754. }
  755. })
  756. },
  757. goProfile() {
  758. uni.navigateTo({
  759. url: '/pages/my/indent?title=编辑资料'
  760. })
  761. },
  762. goTodayOrders() {
  763. uni.navigateTo({
  764. url: '/pages/my/js_order'
  765. })
  766. },
  767. goBankList() {
  768. uni.navigateTo({
  769. url: '/workbench/bank/index'
  770. })
  771. },
  772. goReviewList() {
  773. uni.navigateTo({
  774. url: '/workbench/rating/index'
  775. })
  776. },
  777. async goWithdraw() {
  778. this.auditStatus = await this.checkMerchantStatus()
  779. if (this.auditStatus == 0 || this.auditStatus == 3) {
  780. this.showModal = true
  781. return
  782. }
  783. if (this.auditStatus == 1) {
  784. uni.showToast({
  785. title: '入驻审核中,暂无操作权限',
  786. icon: 'none'
  787. })
  788. return
  789. }
  790. uni.navigateTo({
  791. url: '/workbench/withdraw/apply'
  792. })
  793. },
  794. goIncome() {
  795. uni.navigateTo({
  796. url: '/workbench/income/index'
  797. })
  798. },
  799. goWithdrawRecord() {
  800. uni.navigateTo({
  801. url: '/workbench/withdraw/record'
  802. })
  803. },
  804. goSkillManage() {
  805. uni.navigateTo({
  806. url: `/ workbench / skill / index ? serviceTag = ${ this.serviceTag } `
  807. })
  808. },
  809. syncCurrentAddress(merchantData) {
  810. const sl = uni.getStorageSync('staffLocation')
  811. if (sl?.address || sl?.name) {
  812. this.currentAddress = `${ sl.address || '' }${ sl.name || '' } `
  813. return
  814. }
  815. const data = merchantData || this.merchantInfo
  816. this.currentAddress = data?.address || data?.name || ''
  817. },
  818. goSwitchAddress() {
  819. uni.chooseLocation({
  820. success: (res) => {
  821. console.log('切换地址', res)
  822. }
  823. });
  824. },
  825. async goUpdateAddress() {
  826. // if (!this.cJsId) {
  827. // uni.showToast({ title: '请先登录', icon: 'none' })
  828. // return
  829. // }
  830. try {
  831. const res = await this.$utils.addressService.chooseLocation()
  832. const params = {
  833. id: this.cJsId,
  834. cPhone: this.merchantInfo.cPhone,
  835. name: res.name,
  836. address: res.address,
  837. latitude: res.latitude,
  838. longitude: res.longitude,
  839. cOpenId: uni.getStorageSync('wx_copenid'),
  840. }
  841. const apiRes = await getJsLocation(params)
  842. if (apiRes.data.code == 200) {
  843. uni.setStorageSync('staffLocation', {
  844. name: res.name,
  845. address: res.address,
  846. latitude: res.latitude,
  847. longitude: res.longitude,
  848. })
  849. this.syncCurrentAddress()
  850. uni.showToast({
  851. title: '地址已更新',
  852. icon: 'none'
  853. })
  854. } else {
  855. uni.showToast({
  856. title: apiRes.data.msg || '更新失败',
  857. icon: 'none'
  858. })
  859. }
  860. } catch (err) {
  861. if (err?.cancelled) return
  862. uni.showToast({
  863. title: err?.message || '获取位置失败',
  864. icon: 'none'
  865. })
  866. }
  867. },
  868. onMoreFeature(item) {
  869. if (item.label == '退出登录') {
  870. this.showModal2 = true
  871. return
  872. }
  873. if (!item.path) {
  874. uni.showToast({
  875. title: '功能开发中',
  876. icon: 'none'
  877. })
  878. return
  879. }
  880. uni.navigateTo({
  881. url: item.path
  882. })
  883. },
  884. // 退出登录
  885. goLogout() {
  886. this.$router.go(0)
  887. logout().then(res => {
  888. if (res.data.code == 200) {
  889. this.showModal2 = false
  890. uni.removeStorageSync('access-token')
  891. this.$router.go(0)
  892. uni.showToast({
  893. title: '已退出登录',
  894. icon: 'none'
  895. })
  896. } else {
  897. this.showModal2 = false
  898. }
  899. });
  900. },
  901. // 获取管理按钮坐标,生成镂空引导
  902. getManageBtnRect() {
  903. const query = uni.createSelectorQuery().in(this)
  904. query.select('.section-link')
  905. .boundingClientRect(res => {
  906. if (!res) return
  907. const { top, left, width, height } = res
  908. // 镂空挖空样式,遮罩全覆盖只透出按钮
  909. this.holeStyle = {
  910. position: 'fixed',
  911. top: `${top}px`,
  912. left: `${left}px`,
  913. width: `${width}px`,
  914. height: `${height}px`,
  915. borderRadius: '12rpx',
  916. boxShadow: '0 0 0 9999px rgba(0,0,0,0.65)',
  917. zIndex: 99999
  918. }
  919. // 气泡定位:按钮左上方
  920. this.tipPopStyle = {
  921. position: 'fixed',
  922. top: `${top - 120}px`,
  923. left: `${left - 620}rpx
  924. }`,
  925. background: '#fff',
  926. padding: '24rpx',
  927. borderRadius: '16rpx',
  928. maxWidth: '580rpx',
  929. zIndex: 100000
  930. }
  931. this.showSkillGuide = true
  932. }).exec()
  933. },
  934. // 关闭引导并永久标记完成
  935. closeSkillGuide() {
  936. this.showSkillGuide = false
  937. uni.setStorageSync('merchant_skill_manage_guide', 'done')
  938. },
  939. },
  940. }
  941. </script>
  942. <style scoped>
  943. .uni-modal {
  944. background: #eb0000 !important;
  945. border-radius: 16rpx !important;
  946. }
  947. </style>
  948. <style lang="scss" scoped>
  949. $primary: #1ecbc3;
  950. $primary-dark: #0fa89e;
  951. $text-main: #333333;
  952. $text-sub: #999999;
  953. $page-bg: #f6f7f9;
  954. // 新手引导全局遮罩
  955. .guide-full-mask {
  956. position: fixed;
  957. top: 0;
  958. left: 0;
  959. width: 100vw;
  960. height: 100vh;
  961. z-index: 99998;
  962. }
  963. .guide-tip-pop {
  964. font-size: 26rpx;
  965. color: #333;
  966. line-height: 1.6;
  967. position: relative;
  968. }
  969. .guide-hand {
  970. position: absolute;
  971. right: -50rpx;
  972. bottom: -40rpx;
  973. font-size: 50rpx;
  974. pointer-events: none;
  975. }
  976. .workbench {
  977. min-height: 100vh;
  978. background: $page-bg;
  979. position: relative;
  980. box-sizing: border-box;
  981. }
  982. .page-bg {
  983. position: absolute;
  984. top: -170rpx;
  985. left: 0;
  986. width: 100%;
  987. z-index: 0;
  988. height: 420rpx;
  989. }
  990. .page-content {
  991. position: relative;
  992. z-index: 1;
  993. padding: 20rpx 24rpx 40rpx;
  994. box-sizing: border-box;
  995. }
  996. .card {
  997. background: #ffffff;
  998. border-radius: 24rpx;
  999. margin-bottom: 24rpx;
  1000. padding: 28rpx 24rpx;
  1001. box-sizing: border-box;
  1002. box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.04);
  1003. }
  1004. .card-address {
  1005. background: #ffffff;
  1006. border-radius: 24rpx;
  1007. margin-bottom: 24rpx;
  1008. padding: 28rpx 24rpx 0 24rpx;
  1009. box-sizing: border-box;
  1010. box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.04);
  1011. }
  1012. /* 头部 */
  1013. .header-section {
  1014. padding: 16rpx 8rpx 32rpx;
  1015. }
  1016. .header-main {
  1017. display: flex;
  1018. align-items: center;
  1019. }
  1020. .avatar-wrap {
  1021. width: 112rpx;
  1022. height: 112rpx;
  1023. border-radius: 50%;
  1024. border: 4rpx solid rgba(255, 255, 255, 0.8);
  1025. overflow: hidden;
  1026. background: #eee;
  1027. flex-shrink: 0;
  1028. box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
  1029. }
  1030. .avatar {
  1031. width: 100%;
  1032. height: 100%;
  1033. }
  1034. .header-info {
  1035. margin-left: 24rpx;
  1036. flex: 1;
  1037. min-width: 0;
  1038. }
  1039. .nickname {
  1040. font-size: 36rpx;
  1041. color: $text-main;
  1042. font-weight: 600;
  1043. line-height: 1.4;
  1044. }
  1045. .status-bar {
  1046. display: flex;
  1047. align-items: center;
  1048. gap: 16rpx;
  1049. margin-top: 16rpx;
  1050. }
  1051. .status-tag {
  1052. display: flex;
  1053. align-items: center;
  1054. padding: 6rpx 16rpx;
  1055. font-size: 22rpx;
  1056. border-radius: 24rpx;
  1057. color: #1D2129;
  1058. background: linear-gradient(263deg, #45FFD7 0%, #78FFA5 100%);
  1059. }
  1060. .status-tag-icon {
  1061. width: 24rpx;
  1062. height: 24rpx;
  1063. margin-right: 6rpx;
  1064. }
  1065. .status-select {
  1066. display: flex;
  1067. align-items: center;
  1068. padding: 6rpx 16rpx;
  1069. font-size: 22rpx;
  1070. border-radius: 24rpx;
  1071. color: $text-main;
  1072. background: rgba(255, 255, 255, 0.9);
  1073. }
  1074. .status-arrow {
  1075. width: 20rpx;
  1076. height: 20rpx;
  1077. margin-left: 6rpx;
  1078. }
  1079. /* 统计栏 */
  1080. .stats-section {
  1081. display: flex;
  1082. justify-content: space-between;
  1083. padding: 32rpx 16rpx;
  1084. }
  1085. .stat-item {
  1086. flex: 1;
  1087. text-align: center;
  1088. }
  1089. .stat-value {
  1090. font-size: 36rpx;
  1091. color: $text-main;
  1092. font-weight: 600;
  1093. line-height: 1.4;
  1094. }
  1095. .stat-label {
  1096. font-size: 22rpx;
  1097. color: $text-sub;
  1098. margin-top: 10rpx;
  1099. }
  1100. .unit {
  1101. font-size: 24rpx;
  1102. font-weight: 400;
  1103. margin-left: 2rpx;
  1104. }
  1105. /* 钱包 */
  1106. .wallet-section {
  1107. padding: 32rpx 32rpx;
  1108. background: radial-gradient(109.56% 48.07% at 10.06% 5%, #E7FDF9 0%, #FFFFFF 100%), #FFFFFF;
  1109. }
  1110. .balance-row {
  1111. display: flex;
  1112. align-items: center;
  1113. justify-content: space-between;
  1114. padding-bottom: 28rpx;
  1115. }
  1116. .balance-main {
  1117. display: flex;
  1118. flex-direction: column;
  1119. }
  1120. .balance-amount {
  1121. font-size: 56rpx;
  1122. font-weight: 700;
  1123. color: $text-main;
  1124. line-height: 1.2;
  1125. font-family: DIN, 'Helvetica Neue', sans-serif;
  1126. }
  1127. .balance-label {
  1128. font-size: 24rpx;
  1129. color: $text-sub;
  1130. margin-top: 8rpx;
  1131. }
  1132. .withdraw-btn {
  1133. padding: 16rpx 48rpx;
  1134. background: linear-gradient(90deg, #3dd9cf 0%, #1ecbc3 100%);
  1135. border-radius: 40rpx;
  1136. font-size: 28rpx;
  1137. color: #ffffff;
  1138. font-weight: 500;
  1139. flex-shrink: 0;
  1140. box-shadow: 0 8rpx 20rpx rgba(30, 203, 195, 0.35);
  1141. }
  1142. .wallet-grid {
  1143. display: flex;
  1144. justify-content: space-between;
  1145. }
  1146. .wallet-item {
  1147. text-align: center;
  1148. }
  1149. .wallet-value {
  1150. font-size: 28rpx;
  1151. color: $text-main;
  1152. font-weight: 600;
  1153. line-height: 1.4;
  1154. }
  1155. .wallet-label {
  1156. font-size: 22rpx;
  1157. color: $text-sub;
  1158. margin-top: 10rpx;
  1159. }
  1160. /* 新订单 */
  1161. .order-section {
  1162. margin-bottom: 24rpx;
  1163. border-radius: 24rpx;
  1164. overflow: hidden;
  1165. background: #1D2129;
  1166. box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.04);
  1167. }
  1168. .order-header {
  1169. position: relative;
  1170. height: 88rpx;
  1171. .order-header-bg {
  1172. position: absolute;
  1173. right: 0;
  1174. bottom: -10rpx;
  1175. image {
  1176. width: 410rpx;
  1177. height: 50rpx;
  1178. }
  1179. }
  1180. }
  1181. .order-header-content {
  1182. position: relative;
  1183. z-index: 1;
  1184. display: flex;
  1185. align-items: center;
  1186. height: 100%;
  1187. padding: 0 28rpx;
  1188. font-size: 28rpx;
  1189. color: #45FFD7;
  1190. font-weight: 500;
  1191. }
  1192. .order-bell {
  1193. width: 36rpx;
  1194. height: 36rpx;
  1195. margin-right: 12rpx;
  1196. }
  1197. .order-card {
  1198. background-color: #fff;
  1199. margin: 4rpx;
  1200. border-radius: 24rpx;
  1201. padding: 28rpx 24rpx 32rpx;
  1202. }
  1203. .order-title-row {
  1204. display: flex;
  1205. align-items: center;
  1206. justify-content: space-between;
  1207. gap: 16rpx;
  1208. }
  1209. .order-title {
  1210. flex: 1;
  1211. font-size: 32rpx;
  1212. color: #1D2129;
  1213. font-weight: 600;
  1214. line-height: 1.5;
  1215. }
  1216. .tag-new {
  1217. font-size: 28rpx;
  1218. color: #FF8D2F;
  1219. }
  1220. .order-time,
  1221. .order-address {
  1222. display: flex;
  1223. align-items: center;
  1224. font-size: 28rpx;
  1225. color: #1D2129;
  1226. margin-top: 10rpx;
  1227. line-height: 1.6;
  1228. }
  1229. .order-icon {
  1230. width: 28rpx;
  1231. height: 28rpx;
  1232. margin-right: 12rpx;
  1233. margin-top: 4rpx;
  1234. flex-shrink: 0;
  1235. }
  1236. .order-actions {
  1237. display: flex;
  1238. align-items: center;
  1239. gap: 20rpx;
  1240. margin-top: 32rpx;
  1241. }
  1242. .reject-btn {
  1243. width: 128rpx;
  1244. height: 88rpx;
  1245. display: flex;
  1246. align-items: center;
  1247. justify-content: center;
  1248. font-size: 26rpx;
  1249. color: #333333;
  1250. background: rgba(255, 141, 47, 0.12);
  1251. border-radius: 2000rpx 2000rpx 2000rpx 2000rpx;
  1252. border: 1rpx solid #FF8D2F;
  1253. }
  1254. .slide-wrap {
  1255. flex: 1;
  1256. }
  1257. .slide-track {
  1258. position: relative;
  1259. height: 96rpx;
  1260. background: linear-gradient(263deg, #45FFD7 0%, #7FFFBD 100%), #1D2129;
  1261. border-radius: 48rpx;
  1262. overflow: hidden;
  1263. box-shadow: 0 8rpx 20rpx rgba(30, 203, 195, 0.3);
  1264. }
  1265. .slide-hint {
  1266. position: absolute;
  1267. left: 0;
  1268. right: 80rpx;
  1269. top: 0;
  1270. bottom: 0;
  1271. line-height: 96rpx;
  1272. text-align: center;
  1273. font-size: 28rpx;
  1274. color: #000;
  1275. font-weight: 500;
  1276. pointer-events: none;
  1277. }
  1278. .slide-thumb {
  1279. position: absolute;
  1280. left: 0;
  1281. top: 0;
  1282. width: 96rpx;
  1283. height: 96rpx;
  1284. display: flex;
  1285. align-items: center;
  1286. justify-content: center;
  1287. // background: rgba(255, 255, 255, 0.35);
  1288. border-radius: 50%;
  1289. z-index: 1;
  1290. }
  1291. .slide-thumb .slide-arrow {
  1292. width: 40rpx;
  1293. height: 40rpx;
  1294. }
  1295. /* 技能 */
  1296. .skills-section {
  1297. .section-header {
  1298. display: flex;
  1299. align-items: center;
  1300. justify-content: space-between;
  1301. margin-bottom: 24rpx;
  1302. }
  1303. .section-heading-wrap {
  1304. display: flex;
  1305. align-items: flex-start;
  1306. }
  1307. .section-heading-box {
  1308. position: relative;
  1309. display: inline-flex;
  1310. flex-direction: column;
  1311. }
  1312. .section-heading {
  1313. position: relative;
  1314. z-index: 1;
  1315. font-size: 32rpx;
  1316. color: #1D2129;
  1317. font-weight: 600;
  1318. line-height: 1.4;
  1319. padding-bottom: 10rpx;
  1320. background-image: url('/static/workbench/skill.png');
  1321. background-repeat: no-repeat;
  1322. background-size: 80%;
  1323. }
  1324. .skill-tip {
  1325. width: 40rpx;
  1326. height: 40rpx;
  1327. margin-left: 8rpx;
  1328. margin-top: 2rpx;
  1329. flex-shrink: 0;
  1330. }
  1331. .section-link {
  1332. display: flex;
  1333. align-items: center;
  1334. font-size: 28rpx;
  1335. color: #86909C;
  1336. flex-shrink: 0;
  1337. }
  1338. .link-arrow {
  1339. width: 30rpx;
  1340. height: 30rpx;
  1341. margin-left: 4rpx;
  1342. }
  1343. }
  1344. .skill-single {
  1345. width: 100%;
  1346. }
  1347. .skill-scroll {
  1348. width: 100%;
  1349. }
  1350. .skill-list {
  1351. display: flex;
  1352. flex-direction: row;
  1353. flex-wrap: nowrap;
  1354. }
  1355. .skill-card {
  1356. display: flex;
  1357. align-items: center;
  1358. padding: 16rpx;
  1359. border: 1rpx solid #eeeeee;
  1360. border-radius: 16rpx;
  1361. background: #ffffff;
  1362. box-sizing: border-box;
  1363. }
  1364. .skill-card--single {
  1365. width: 100%;
  1366. .skill-img {
  1367. width: 160rpx;
  1368. height: 160rpx;
  1369. margin-right: 20rpx;
  1370. }
  1371. }
  1372. .skill-card--multi {
  1373. flex-shrink: 0;
  1374. width: 380rpx;
  1375. margin-right: 20rpx;
  1376. &:last-child {
  1377. margin-right: 0;
  1378. }
  1379. }
  1380. .skill-img {
  1381. width: 88rpx;
  1382. height: 88rpx;
  1383. background: #f5f5f5;
  1384. border-radius: 10rpx;
  1385. overflow: hidden;
  1386. flex-shrink: 0;
  1387. margin-right: 14rpx;
  1388. image {
  1389. width: 100%;
  1390. height: 100%;
  1391. }
  1392. }
  1393. .skill-info {
  1394. flex: 1;
  1395. min-width: 0;
  1396. display: flex;
  1397. flex-direction: column;
  1398. justify-content: center;
  1399. }
  1400. .skill-name {
  1401. font-size: 28rpx;
  1402. color: $text-main;
  1403. margin-bottom: 8rpx;
  1404. font-weight: 500;
  1405. line-height: 1.3;
  1406. }
  1407. .skill-tags {
  1408. display: flex;
  1409. flex-wrap: wrap;
  1410. gap: 8rpx;
  1411. margin-bottom: 10rpx;
  1412. }
  1413. .skill-tag {
  1414. font-size: 20rpx;
  1415. color: #c9a227;
  1416. background: #fff8e6;
  1417. padding: 4rpx 12rpx;
  1418. border-radius: 6rpx;
  1419. line-height: 1.4;
  1420. }
  1421. .skill-price {
  1422. font-size: 30rpx;
  1423. color: #ff5d75;
  1424. font-weight: 600;
  1425. line-height: 1.2;
  1426. }
  1427. .empty-tip {
  1428. font-size: 26rpx;
  1429. color: $text-sub;
  1430. text-align: center;
  1431. padding: 32rpx 0;
  1432. }
  1433. /* 地址 */
  1434. .address-section {
  1435. .address-heading-wrap {
  1436. display: flex;
  1437. align-items: flex-start;
  1438. margin-bottom: 20rpx;
  1439. }
  1440. .section-heading {
  1441. font-size: 32rpx;
  1442. color: #1D2129;
  1443. font-weight: 600;
  1444. line-height: 1.4;
  1445. padding-bottom: 10rpx;
  1446. background-image: url('/static/workbench/more.png');
  1447. background-repeat: no-repeat;
  1448. background-size: 80%;
  1449. }
  1450. .address-tip {
  1451. width: 40rpx;
  1452. height: 40rpx;
  1453. margin-left: 8rpx;
  1454. margin-top: 2rpx;
  1455. flex-shrink: 0;
  1456. }
  1457. }
  1458. .address-row {
  1459. display: flex;
  1460. align-items: flex-start;
  1461. margin-bottom: 28rpx;
  1462. }
  1463. .address-icon {
  1464. width: 32rpx;
  1465. height: 32rpx;
  1466. margin-right: 12rpx;
  1467. margin-top: 4rpx;
  1468. flex-shrink: 0;
  1469. }
  1470. .address-text {
  1471. flex: 1;
  1472. font-size: 26rpx;
  1473. color: #666666;
  1474. line-height: 1.6;
  1475. }
  1476. .address-actions {
  1477. display: flex;
  1478. align-items: center;
  1479. border-top: 1rpx solid #f0f0f0;
  1480. }
  1481. .addr-btn {
  1482. flex: 1;
  1483. height: 80rpx;
  1484. line-height: 80rpx;
  1485. text-align: center;
  1486. font-size: 30rpx;
  1487. color: $text-main;
  1488. }
  1489. .addr-divider {
  1490. width: 1rpx;
  1491. height: 120rpx;
  1492. background: #e8e8e8;
  1493. }
  1494. /* 更多功能 */
  1495. .more-section {
  1496. .more-heading-wrap {
  1497. display: flex;
  1498. align-items: flex-start;
  1499. margin-bottom: 20rpx;
  1500. }
  1501. .section-heading {
  1502. font-size: 32rpx;
  1503. color: #1D2129;
  1504. font-weight: 600;
  1505. line-height: 1.4;
  1506. padding-bottom: 10rpx;
  1507. background-image: url('/static/workbench/more.png');
  1508. background-repeat: no-repeat;
  1509. background-size: 80%;
  1510. }
  1511. .more-tip {
  1512. width: 40rpx;
  1513. height: 40rpx;
  1514. margin-left: 8rpx;
  1515. margin-top: 2rpx;
  1516. flex-shrink: 0;
  1517. }
  1518. }
  1519. .more-grid {
  1520. display: flex;
  1521. flex-wrap: wrap;
  1522. }
  1523. .more-item {
  1524. width: 25%;
  1525. display: flex;
  1526. flex-direction: column;
  1527. align-items: center;
  1528. padding: 24rpx 0 8rpx;
  1529. }
  1530. .more-icon {
  1531. width: 80rpx;
  1532. height: 80rpx;
  1533. margin-bottom: 12rpx;
  1534. }
  1535. .more-label {
  1536. font-size: 24rpx;
  1537. color: #666666;
  1538. text-align: center;
  1539. line-height: 1.4;
  1540. }
  1541. /* 弹窗 */
  1542. .popup-mask {
  1543. position: fixed;
  1544. left: 0;
  1545. top: 0;
  1546. right: 0;
  1547. bottom: 0;
  1548. background: rgba(0, 0, 0, 0.4);
  1549. z-index: 999;
  1550. display: flex;
  1551. align-items: center;
  1552. justify-content: center;
  1553. }
  1554. .popup-box {
  1555. width: 600rpx;
  1556. background: #fff;
  1557. border-radius: 8rpx;
  1558. padding: 32rpx;
  1559. }
  1560. .popup-title {
  1561. font-size: 28rpx;
  1562. color: #333;
  1563. text-align: center;
  1564. margin-bottom: 24rpx;
  1565. }
  1566. .popup-input {
  1567. width: 100%;
  1568. height: 72rpx;
  1569. border: 1rpx solid #ddd;
  1570. border-radius: 6rpx;
  1571. padding: 0 20rpx;
  1572. font-size: 26rpx;
  1573. box-sizing: border-box;
  1574. }
  1575. .popup-btns {
  1576. display: flex;
  1577. gap: 24rpx;
  1578. margin-top: 32rpx;
  1579. }
  1580. .popup-btn {
  1581. flex: 1;
  1582. height: 72rpx;
  1583. line-height: 72rpx;
  1584. text-align: center;
  1585. border: 1rpx solid #ccc;
  1586. border-radius: 6rpx;
  1587. font-size: 28rpx;
  1588. color: #666;
  1589. &.confirm {
  1590. background: linear-gradient(90deg, #3dd9cf 0%, #1ecbc3 100%);
  1591. border-color: #1ecbc3;
  1592. color: #fff;
  1593. }
  1594. }
  1595. .popup-mask.bottom {
  1596. align-items: flex-end;
  1597. }
  1598. .status-panel {
  1599. width: 100%;
  1600. background: #fff;
  1601. border-radius: 24rpx 24rpx 0 0;
  1602. padding: 32rpx;
  1603. padding-bottom: calc(env(safe-area-inset-bottom) + 32rpx);
  1604. box-sizing: border-box;
  1605. }
  1606. .panel-title {
  1607. font-size: 32rpx;
  1608. font-weight: 600;
  1609. color: #333;
  1610. text-align: center;
  1611. margin-bottom: 32rpx;
  1612. }
  1613. .status-option {
  1614. display: flex;
  1615. align-items: center;
  1616. padding: 28rpx 0;
  1617. border-bottom: 1rpx solid #f5f5f5;
  1618. // &.active .option-name {
  1619. // color: #1ecbc3;
  1620. // }
  1621. }
  1622. .option-body {
  1623. flex: 1;
  1624. min-width: 0;
  1625. }
  1626. .option-check {
  1627. font-size: 36rpx;
  1628. color: #1ecbc3;
  1629. font-weight: 600;
  1630. flex-shrink: 0;
  1631. margin-left: 16rpx;
  1632. image {
  1633. width: 50rpx;
  1634. height: 50rpx;
  1635. }
  1636. }
  1637. .option-name {
  1638. display: block;
  1639. font-size: 30rpx;
  1640. color: #333;
  1641. font-weight: 500;
  1642. }
  1643. .option-desc {
  1644. display: block;
  1645. font-size: 24rpx;
  1646. color: #999;
  1647. margin-top: 8rpx;
  1648. line-height: 1.5;
  1649. }
  1650. .panel-btns {
  1651. display: flex;
  1652. gap: 24rpx;
  1653. margin-top: 32rpx;
  1654. }
  1655. .panel-btn {
  1656. flex: 1;
  1657. height: 80rpx;
  1658. line-height: 80rpx;
  1659. text-align: center;
  1660. background: rgba(51, 51, 53, 0.05);
  1661. border-radius: 60rpx 60rpx 60rpx 60rpx;
  1662. font-size: 32rpx;
  1663. color: #1D2129;
  1664. &.confirm {
  1665. background: #333335;
  1666. border-radius: 60rpx 60rpx 60rpx 60rpx;
  1667. color: #fff;
  1668. }
  1669. }
  1670. .one-line-text {
  1671. overflow: hidden;
  1672. text-overflow: ellipsis;
  1673. white-space: nowrap;
  1674. }
  1675. </style>