index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698
  1. <template>
  2. <view class="page">
  3. <uni-nav-bar :fixed="true" background-color="#FFE05C" :border="false" :statusBar="true" title="首页" />
  4. <view class="flex-row tuni ">
  5. <image class="profile" :src="userInfo.avatarUrl || '/static/ud4.png'"></image>
  6. <view class="tuniMsg">
  7. <view class="name ">
  8. <text >{{userInfo.name}}</text>
  9. </view>
  10. <view>
  11. <text class="biaoqian ">{{userInfo.post}}</text>
  12. </view>
  13. </view>
  14. <view class="flex-row justify-around tuni-right ">
  15. <view class="flex-col">
  16. <view class="flex-row justify-center dakaIcon ">
  17. <text>{{userInfo.subNumber}}</text>
  18. </view>
  19. <view class="flex-row justify-center dakaText ">
  20. <text>今日预约</text>
  21. </view>
  22. </view>
  23. <view class="flex-col" @click="promotion">
  24. <view class="flex-row justify-center dakaIcon ">
  25. <u-icon name="/static/index/erweima.png" size="35"></u-icon>
  26. </view>
  27. <!-- <view class="flex-row justify-center dakaText " >-->
  28. <!-- <text>拓客码</text>-->
  29. <!-- </view>-->
  30. </view>
  31. <view class="flex-col " @click="userScanCode">
  32. <view class="flex-row justify-center dakaIcon ">
  33. <u-icon name="/static/index/saoma.png" size="25"></u-icon>
  34. </view>
  35. <view class="flex-row justify-center dakaText ">
  36. <text>报到打卡</text>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="flex-row justify-around buttons">
  42. <!-- <view class="buttonItem" @click="call" v-if="currService && currService.callState == '2'">-->
  43. <!-- <text>叫号</text>-->
  44. <!-- </view>-->
  45. <view class="buttonItem" :class="{buttonState:buttonState[0]}" @click="next">
  46. <text>下一位</text>
  47. </view>
  48. <view class="buttonItem" :class="{buttonState:buttonState[1]}" @click="takePlace">
  49. <text>已就位</text>
  50. </view>
  51. <view class="buttonItem" :class="{buttonState:buttonState[2]}" @click="settle">
  52. <text>结算</text>
  53. </view>
  54. <view class="buttonItem" :class="{buttonState:buttonState[3]}" @click="addService">
  55. <text>添加服务</text>
  56. </view>
  57. </view>
  58. <view class="flex-row justify-center ">
  59. <view class="serviceMsg " v-if="currService">
  60. <view class="flex-row serviceInfo ">
  61. <image class="serviceProfile" :src="currService.avatar || '/static/ud4.png'" @click="avatarOpen"></image>
  62. <view class="flex-col justify-end serviceInfo-rigth ">
  63. <view class="flex-row justify-between ">
  64. <view class="">
  65. <view class="flex-row">
  66. <text class="servicename">{{currService.serviceObjectName}}</text>
  67. <text v-if="currService.isVip" class="biaoqian">会员客户</text>
  68. <text v-else class="biaoqian">现金客户</text>
  69. </view>
  70. <view class="">
  71. <text class="servicename">{{currService.no}}</text>
  72. </view>
  73. </view>
  74. <view class="flex-col justify-center ">
  75. <view class="flex-row justify-center tag" @click="openSelectServiceObjectPopup">
  76. <text>切换</text>
  77. <u-icon name="/static/index/qiehuan.png" size="18"></u-icon>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. <view :style="{'height':'120rpx'}"></view>
  84. <view class="flex-row justify-center" v-if="!currService.balanceFlag">
  85. <view class="flex-row justify-center hintView">
  86. <view class="hint">
  87. <text>!</text>
  88. </view>
  89. <view class="hintCentent">
  90. <text>娇宝余额不足哟~</text>
  91. </view>
  92. </view>
  93. </view>
  94. <view class="flex-row justify-center" v-if="currService.balanceFlag && currService.balance *1 <= 200">
  95. <view class="flex-row justify-center hintView"
  96. :class="{hintViewBgColor2: currService.balance *1 > 38 && currService.balance *1 <= 100,
  97. hintViewBgColor3: currService.balance *1 > 100 && currService.balance *1 <= 200}">
  98. <view class="hint">
  99. <text>!</text>
  100. </view>
  101. <view class="hintCentent">
  102. <text>娇宝余额充足~</text>
  103. </view>
  104. </view>
  105. </view>
  106. <view class="flex-col orderMsg">
  107. <view class="flex-row justify-between">
  108. <view class="flex-row">
  109. <u-icon name="/static/index/quhao.png" size="20"></u-icon>
  110. <text class="key">排号:</text>
  111. <text class="value">{{currService.planNumber}}</text>
  112. </view>
  113. <view class="flex-col justify-center stateStr">
  114. <text>{{currService.statusDesc}}</text>
  115. </view>
  116. </view>
  117. <view class="flex-row">
  118. <u-icon name="/static/index/orderNo1.png" size="20"></u-icon>
  119. <text class="key">订单编号:</text>
  120. <text class="value">{{currService.orderNo}}</text>
  121. </view>
  122. <view class="flex-row">
  123. <u-icon name="/static/index/jiandao.png" size="20"></u-icon>
  124. <text class="key">服务项目:</text>
  125. <text class="value">{{currService.serviceProject}}</text>
  126. </view>
  127. <view class="flex-row">
  128. <u-icon name="/static/index/tel.png" size="20"></u-icon>
  129. <text class="key">手机尾号:</text>
  130. <text class="value">{{currService.phone.substring(7,11)}}</text>
  131. </view>
  132. </view>
  133. <view class="flex-row justify-center">
  134. <view class="imgs">
  135. <view class="mmImgView" :class="{floatRight: (index+1) % 2==0,marginTop:index>1}" v-for="(i,index) in 0" :key="index">
  136. <image class="mmImg" mode="widthFix" src="/static/mn1.webp"></image>
  137. </view>
  138. </view>
  139. </view>
  140. <view class="flex-row justify-center" v-if="currService.status!==12">
  141. <view class="like">
  142. <text>{{currService.preference || '暂无'}}</text>
  143. </view>
  144. </view>
  145. </view>
  146. <view class="flex-col" :style="{'height':sysHeight}" v-else>
  147. <view class="flex-row justify-center">
  148. <image class="dataNull" src="/static/index/dataNull.png"></image>
  149. </view>
  150. <view class="flex-row justify-center dataNullText">
  151. <text>暂无服务项目,请点击下一位刷新页面</text>
  152. </view>
  153. </view>
  154. </view>
  155. <uni-popup ref="avatarPopup" type="center">
  156. <view class="avatarView "v-if="currService">
  157. <view class="flex-row justify-center" >
  158. <image class="avatarOpen" mode="widthFix" :src="currService.avatar || '/static/ud4.png'"></image>
  159. </view>
  160. <view class="flex-row justify-center" :style="{'marginTop':'20rpx'}">
  161. <text>服务对象:{{currService.serviceObjectName}}</text>
  162. </view>
  163. </view>
  164. </uni-popup>
  165. <uni-popup ref="reminderPopup" type="center">
  166. <view class="reminderView ">
  167. <view class="reminderTitle">
  168. <text>保存用户喜好</text>
  169. </view>
  170. <view class="textareaView flex-row justify-center ">
  171. <textarea class="textarea" v-model="content" placeholder-style="color:#999999;fontSize:28rpx"
  172. placeholder="请输入用户喜好" />
  173. </view>
  174. <view class="flex-row justify-around" :style="{'marginTop':'20rpx'}">
  175. <view class="cancelButton " @click="closeReminderPopup">
  176. <text>取消</text>
  177. </view>
  178. <view class="confirmButton " @click="preference">
  179. <text>确定</text>
  180. </view>
  181. </view>
  182. </view>
  183. </uni-popup>
  184. <uni-popup ref="addServicePopup" @change="popupChange" type="bottom">
  185. <view class="addService">
  186. <scroll-view class="scrollY1 " scroll-y>
  187. <view class="flex-col">
  188. <view class="popupTitle">
  189. <text>选择服务项目</text>
  190. </view>
  191. <view class="flex-row justify-center">
  192. <view class="serviceItems ">
  193. <view class="serviceItem "
  194. :class="{vBackGround: serviceProjectListIndex === index,marginLeft16: (index+3) % 3!==0,marginTop24:index>2}"
  195. v-for="(item,index) in serviceProjectList" :key="index" @click="selectProject(item,index)">
  196. <text>{{item.serviceName}}</text>
  197. </view>
  198. </view>
  199. </view>
  200. <view class="popupTitle marginTop24">
  201. <text>选择服务技师</text>
  202. </view>
  203. <view class="flex-row justify-center">
  204. <view class="serviceItems ">
  205. <view class="flex-col serviceTeach "
  206. :class="{marginLeft28: (index+4) % 4!==0,marginTop24:index>3}" v-for="(item,index) in servicePersonList" :key="index" @click="servicePersonListIndex = index">
  207. <image class="serviceTeachImg" :src="item.facePhotoUrl ||'/static/ud4.png'" :class="{vBackGround: servicePersonListIndex === index}"></image>
  208. <view class="serviceTeachName">
  209. <text>{{item.personName}}</text>
  210. </view>
  211. <image v-if="servicePersonListIndex === index" class="vImage" src="/static/index/xuanzhong.png"></image>
  212. </view>
  213. </view>
  214. </view>
  215. </view>
  216. </scroll-view>
  217. <view class="flex-row justify-around">
  218. <view class="cancelButton " @click="closeAddServicePopup">
  219. <text>取消</text>
  220. </view>
  221. <view class="confirmButton" @click="addServiceProject">
  222. <text>确定</text>
  223. </view>
  224. </view>
  225. </view>
  226. </uni-popup>
  227. <uni-popup ref="selectServiceObjectPopup" @change="popupChange" type="bottom">
  228. <view class="addService" >
  229. <view class="popupTitle">
  230. <text>切换服务对象</text>
  231. </view>
  232. <scroll-view class="scrollY" scroll-y>
  233. <view class="flex-row objectItem" :class="{'vBackGround': selectServiceObjectIndex === index}" v-for="(item,index) in selectServiceObjectList" :key="index" @click="selectServiceObjectIndex = index">
  234. <image class="objectImage" :src="item.facePhotoUrl || '/static/ud4.png'"></image>
  235. <view class="flex-col objectName ">
  236. <text>{{item.nickName}}</text>
  237. </view>
  238. <image v-if="selectServiceObjectIndex === index" class="vImage" src="/static/index/xuanzhong.png"></image>
  239. </view>
  240. </scroll-view>
  241. <view class="flex-row justify-around">
  242. <view class="cancelButton" @click="closeSelectServiceObjectPopup">
  243. <text>取消</text>
  244. </view>
  245. <view class="confirmButton" @click="switchServiceObject">
  246. <text>确定</text>
  247. </view>
  248. </view>
  249. </view>
  250. </uni-popup>
  251. <uni-popup ref="promotionPopup" type="center">
  252. <view class="promotionView" >
  253. <view class="flex-row justify-center qrcodeView">
  254. <uv-qrcode ref="qrcode" size="400rpx" :value="qrcodeUrl" :options="options"></uv-qrcode>
  255. </view>
  256. <view class="flex-row justify-center">
  257. <text>娇骄儿造型</text>
  258. </view>
  259. </view>
  260. </uni-popup>
  261. </view>
  262. </template>
  263. <script>
  264. import MescrollItem from "./module/mescrollUni-item.vue";
  265. import QQMapWX from '../../common/js/qqmap/myqqmap-sdk.js'
  266. export default {
  267. components: {
  268. MescrollItem
  269. },
  270. data() {
  271. return {
  272. buttonState:[0,0,0,0],//0:不禁用按钮,1:禁用按钮。
  273. previousServiceOrderId:'',
  274. content:'',
  275. selectServiceObjectList:[],
  276. selectServiceObjectIndex:-1,
  277. servicePersonList:[],
  278. servicePersonListIndex:0,
  279. serviceProjectList:[],
  280. serviceProjectListIndex:0,
  281. tabIndex: 0,
  282. sysHeight: '',
  283. readerHeight: '',
  284. readerWidth: '',
  285. userInfo: {},
  286. storeId: '',
  287. storeName: '',
  288. currService: null,
  289. qqMap:new QQMapWX({key: 'ZIABZ-543WB-747UM-JL5Y7-NDS4E-HWB4M',vm: this}),
  290. qrcodeUrl:'https://jje.admin.xinyuekj.com.cn/recharge/recharge?storeId={promotionStoreId}&techNo={techNo}',
  291. options: {
  292. // 指定二维码前景,一般可在中间放logo
  293. foregroundImagePadding:2,
  294. foregroundImageBorderRadius:5,
  295. foregroundImageSrc: '/static/logo.png'
  296. }
  297. }
  298. },
  299. onLoad() {
  300. let sysInfo = uni.getSystemInfoSync()
  301. this.sysHeight = sysInfo.windowHeight - (sysInfo.windowWidth / 750) * 400 + 'px'
  302. this.readerHeight = sysInfo.windowHeight + 'px'
  303. this.readerWidth = sysInfo.windowWidth + 'px'
  304. },
  305. onShow() {
  306. this.getUserInfo()
  307. // this.userInfo = uni.getStorageSync('userInfo')
  308. // if (this.userInfo.signIn){
  309. // this.currServiceInfo()
  310. // }
  311. },
  312. methods: {
  313. avatarOpen(){
  314. this.$refs.avatarPopup.open()
  315. },
  316. promotion(){
  317. let data = {
  318. promotionStoreId: this.userInfo.workStoreId || '',
  319. techNo: this.userInfo.techNo || ''
  320. };
  321. for (let key in data) {
  322. let regexp = new RegExp("{" + key + "}"); // 构造正则表达式
  323. this.qrcodeUrl = this.qrcodeUrl.replace(regexp, data[key]); // 执行替换操作
  324. }
  325. console.log('++++qrcodeUrl+++++',this.qrcodeUrl)
  326. this.$refs.promotionPopup.open()
  327. },
  328. closeReminderPopup(){
  329. this.previousServiceOrderId = ''
  330. this.$refs.reminderPopup.close()
  331. },
  332. openSelectServiceObjectPopup(){
  333. this.$api.service.getServiceObjectList({
  334. orderServiceId:this.currService.orderServiceId,
  335. }).then(res=>{
  336. this.selectServiceObjectList= res.data.data
  337. this.getServiceObjectUrl(this.selectServiceObjectList)
  338. uni.hideTabBar()
  339. this.$refs.selectServiceObjectPopup.open()
  340. })
  341. },
  342. // 获取图片
  343. getServiceObjectUrl(items) {
  344. for (let i = 0; i < items.length; i++) {
  345. let ptoto = items[i].facePhoto || items[i].personPhoto
  346. if (ptoto) {
  347. this.$api.service.getImgUrlByOssId({
  348. ossId: ptoto
  349. }).then(res => {
  350. items[i].facePhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
  351. this.$forceUpdate()
  352. })
  353. }
  354. }
  355. },
  356. closeSelectServiceObjectPopup(){
  357. this.serviceProjectListIndex = -1
  358. this.$refs.selectServiceObjectPopup.close()
  359. },
  360. switchServiceObject(){
  361. if (this.selectServiceObjectIndex === -1){
  362. uni.showToast({
  363. icon: 'none',
  364. duration: 2000,
  365. title: '请选择服务对象'
  366. });
  367. return
  368. }
  369. this.$api.service.switchServiceObject({
  370. orderServiceId:this.currService.orderServiceId,
  371. serviceObjectId:this.selectServiceObjectList[this.selectServiceObjectIndex].id
  372. }).then(res=>{
  373. this.currServiceInfo()
  374. this.closeSelectServiceObjectPopup()
  375. })
  376. },
  377. addService() {
  378. if (!this.currService){
  379. uni.showToast({
  380. icon: 'error',
  381. duration: 2000,
  382. title: '没有服务对象'
  383. });
  384. return
  385. }
  386. this.serviceProjectListIndex = 0
  387. this.$api.service.serviceProjectList().then(res=>{
  388. this.serviceProjectList= res.data.data
  389. this.serviceUserList(res.data.data[0])
  390. uni.hideTabBar()
  391. this.$refs.addServicePopup.open()
  392. })
  393. },
  394. selectProject(item,index){
  395. this.serviceProjectListIndex = index
  396. this.serviceUserList(item)
  397. },
  398. serviceUserList(item){
  399. this.$api.service.serviceUserList({
  400. serviceProjectId:item.id,
  401. storeId:this.storeId
  402. }).then(res=>{
  403. this.servicePersonListIndex = 0
  404. this.servicePersonList=res.data.data
  405. this.getServiceObjectUrl(this.servicePersonList)
  406. })
  407. },
  408. closeAddServicePopup(){
  409. this.serviceProjectListIndex = 0
  410. this.$refs.addServicePopup.close()
  411. },
  412. addServiceProject(){
  413. this.previousServiceOrderId = this.currService.serviceObjectId
  414. this.$api.service.addServiceProject(
  415. {
  416. orderServiceId:this.currService.orderServiceId,
  417. serviceProjectId:this.serviceProjectList[this.serviceProjectListIndex].id,
  418. serviceUserId:this.servicePersonList[this.servicePersonListIndex].personId
  419. }
  420. ).then(res=>{
  421. this.closeAddServicePopup()
  422. this.currServiceInfo()
  423. this.$refs.reminderPopup.open()
  424. })
  425. },
  426. popupChange(e) {
  427. if (!e.show) {
  428. uni.showTabBar()
  429. }
  430. },
  431. takePlace() {
  432. if (!this.currService){
  433. uni.showToast({
  434. icon: 'error',
  435. duration: 2000,
  436. title: '没有服务对象'
  437. });
  438. return
  439. }
  440. this.$api.service.takePlace({
  441. orderServiceId: this.currService.orderServiceId
  442. }).then(res => {
  443. uni.showToast({
  444. icon: 'success',
  445. duration: 2000,
  446. title: '操作成功'
  447. });
  448. this.currServiceInfo()
  449. })
  450. },
  451. preference(){
  452. this.$refs.reminderPopup.close()
  453. this.$api.service.preference({
  454. serviceObjectId:this.previousServiceOrderId,
  455. preference:this.content
  456. }).then(res=>{
  457. if (this.currService){
  458. if (this.currService.serviceObjectId == this.previousServiceOrderId ){
  459. this.currService.preference = this.content
  460. }
  461. }
  462. this.previousServiceOrderId=''
  463. this.content=''
  464. uni.showToast({
  465. icon: 'success',
  466. duration: 2000,
  467. title: '保存成功'
  468. });
  469. })
  470. },
  471. settle() {
  472. let that = this
  473. if (!that.currService){
  474. uni.showToast({
  475. icon: 'error',
  476. duration: 2000,
  477. title: '没有服务对象'
  478. });
  479. return
  480. }
  481. uni.showModal({
  482. title:'温馨提示',
  483. content:'是否确定结算',
  484. editable:false,
  485. success:(e)=>{
  486. if (e.confirm){
  487. that.previousServiceOrderId = that.currService.serviceObjectId
  488. that.$api.service.settle({
  489. orderServiceId: that.currService.orderServiceId
  490. }).then(res => {
  491. that.currServiceInfo()
  492. that.$refs.reminderPopup.open()
  493. })
  494. }
  495. }
  496. })
  497. },
  498. start() {
  499. this.$api.service.start({
  500. orderServiceId: this.currService.orderServiceId
  501. }).then(res => {
  502. this.currServiceInfo()
  503. })
  504. },
  505. end() {
  506. this.$api.service.end({
  507. orderServiceId: this.currService.orderServiceId
  508. }).then(res => {
  509. this.currServiceInfo()
  510. })
  511. },
  512. call(){
  513. this.$api.service.call({
  514. orderServiceId: this.currService.orderServiceId
  515. }).then(res => {
  516. this.currServiceInfo()
  517. })
  518. },
  519. next() {
  520. if (!this.userInfo.signIn){
  521. uni.showToast({
  522. icon: 'error',
  523. duration: 2000,
  524. title: '请先扫码签到'
  525. });
  526. return
  527. }
  528. uni.showModal({
  529. title:'温馨提示',
  530. content:'是否确定下一位',
  531. editable:false,
  532. success:(e)=>{
  533. if (e.confirm){
  534. console.log(e.confirm)
  535. this.$api.service.next({
  536. orderServiceId: this.currService ? this.currService.orderServiceId : null,
  537. storeId:this.storeId
  538. }).then(res => {
  539. this.currServiceInfo(true)
  540. })
  541. }
  542. }
  543. })
  544. },
  545. currServiceInfo(e) {
  546. if (!this.userInfo.signIn){
  547. uni.showToast({
  548. icon: 'error',
  549. duration: 2000,
  550. title: '请先扫码签到'
  551. });
  552. return
  553. }
  554. this.$api.service.currServiceInfo({
  555. storeId: this.userInfo.workStoreId
  556. }).then(res => {
  557. if (e){
  558. console.log(res.data.data)
  559. if (res.data.data === null){
  560. uni.showModal({
  561. title:'温馨提示',
  562. content:'暂无需要服务的客户',
  563. editable:false,
  564. showCancel:false,
  565. success:(e)=>{
  566. if (e.confirm){
  567. }
  568. }
  569. })
  570. }
  571. }
  572. this.currService = res.data.data
  573. this.setButtomState(this.currService)
  574. this.currService.avatar=this.currService.avatar.replace(/^http:/, "https:")
  575. }).catch(err=>{
  576. console.log("出错了+++++++++++出错了+++++++",err)
  577. })
  578. },
  579. setButtomState(currService){
  580. if (currService){
  581. if (currService.status == 12){
  582. //叫号中
  583. this.buttonState=[0,0,1,1]
  584. }else if (currService.status == 8){
  585. //服务中
  586. this.buttonState=[1,1,0,0]
  587. }
  588. }else {
  589. this.buttonState=[0,1,1,1]
  590. }
  591. },
  592. getUserInfo() {
  593. this.$api.user.getUserInfo().then(res => {
  594. this.userInfo = res.data.data
  595. this.storeId = res.data.data.workStoreId
  596. uni.setStorageSync('userInfo', this.userInfo )
  597. if (this.userInfo.avatar){
  598. this.getImgUrlByOssId(this.userInfo.avatar)
  599. }
  600. if (this.userInfo.signIn){
  601. this.buttonState=[0,1,1,1]
  602. this.currServiceInfo()
  603. }
  604. this.$forceUpdate()
  605. })
  606. },
  607. getImgUrlByOssId(ossId){
  608. this.$api.service.getImgUrlByOssId({ossId:ossId}).then(res=>{
  609. this.$set(this.userInfo,'avatarUrl', res.data.data[0].url.replace(/^http:/, "https:"))
  610. uni.setStorageSync('userInfo', this.userInfo )
  611. })
  612. },
  613. userScanCode() {
  614. let that = this
  615. uni.navigateTo({
  616. url: '/pages/scanCode/scanCode',
  617. events: {
  618. getScancode: function(data) {
  619. let param ={
  620. storeId:JSON.parse(data).storeId,
  621. timestamp:JSON.parse(data).timestamp
  622. }
  623. that.$api.service.clockIn(param).then(res=>{
  624. uni.showToast({
  625. icon: 'success',
  626. duration: 2000,
  627. title: '签到成功'
  628. });
  629. uni.setStorageSync('userInfo', that.userInfo )
  630. that.getUserInfo()
  631. })
  632. },
  633. }
  634. })
  635. },
  636. clickTab(e) {
  637. this.tabIndex = e
  638. if (e === 0) {
  639. this.currServiceInfo()
  640. }
  641. },
  642. }
  643. }
  644. </script>
  645. <style lang="scss" scoped>
  646. @import './index.rpx.css';
  647. </style>