chenrui %!s(int64=4) %!d(string=hai) anos
pai
achega
e5edad25c9

+ 3 - 3
src/api/login.js

@@ -3,7 +3,7 @@ import { axios } from '@/utils/request'
 
 
 export function login ({ username, password }) {
 export function login ({ username, password }) {
   return axios({
   return axios({
-    url: '/login',
+    url: 'login',
     headers: { 'content-type': 'application/x-www-form-urlencoded' },
     headers: { 'content-type': 'application/x-www-form-urlencoded' },
     data: `username=${username}&password=${password}`,
     data: `username=${username}&password=${password}`,
     method: 'post'
     method: 'post'
@@ -57,8 +57,8 @@ export function get2step (parameter) {
 // 修改密码
 // 修改密码
 export function changePwd (parameter) {
 export function changePwd (parameter) {
   return axios({
   return axios({
-    // url: '/user/changePWD',
-    url: 'employee/changePWD',
+    url: 'user/changePWD',
+    // url: 'employee/changePWD',
     method: 'post',
     method: 'post',
     data: parameter
     data: parameter
   })
   })

+ 2 - 1
src/views/CarWashManagement/AddCarWashModal.vue

@@ -633,7 +633,8 @@
       },
       },
       carWashId (newValue, oldValue){
       carWashId (newValue, oldValue){
         console.log(newValue,'-----新增编辑')
         console.log(newValue,'-----新增编辑')
-        if(newValue){
+        if(newValue && this.isShow){
+          console.log('进来    编辑')
           this.getCarWashInfo(newValue)
           this.getCarWashInfo(newValue)
         }
         }
       }
       }

+ 12 - 2
src/views/CarWashManagement/CarWashManagement.vue

@@ -77,13 +77,13 @@
       :pageType="pageType"
       :pageType="pageType"
       :carWashId="carWashId"
       :carWashId="carWashId"
       @success="carWashSubmit"
       @success="carWashSubmit"
-      @close="openModal=false"
+      @close="closeModal"
     />
     />
     <!-- 查看详情 洗车机 -->
     <!-- 查看详情 洗车机 -->
     <details-car-wash-modal
     <details-car-wash-modal
       :openModal="openDetailsModal"
       :openModal="openDetailsModal"
       :carWashId="carWashId"
       :carWashId="carWashId"
-      @close="openDetailsModal=false"
+      @close="closeDetailsModal"
     />
     />
     <!-- 查看小程序码 -->
     <!-- 查看小程序码 -->
     <a-modal class="qrCodeModal" title="查看小程序码" :width="500" :footer="null" :destroyOnClose="true" @cancel="isQrCodeModal=false" v-model="isQrCodeModal">
     <a-modal class="qrCodeModal" title="查看小程序码" :width="500" :footer="null" :destroyOnClose="true" @cancel="isQrCodeModal=false" v-model="isQrCodeModal">
@@ -246,6 +246,16 @@
             }
             }
           }
           }
         }
         }
+      },
+      // 新增、编辑 弹框关闭
+      closeModal(){
+        this.carWashId = ''
+        this.openModal = false
+      },
+      // 详情 弹框关闭
+      closeDetailsModal(){
+        this.carWashId = ''
+        this.openDetailsModal = false
       }
       }
     },
     },
     mounted(){
     mounted(){

+ 9 - 5
src/views/CarWashManagement/DetailsCarWashModal.vue

@@ -136,15 +136,15 @@
           _this.labelList = arr
           _this.labelList = arr
         },0)
         },0)
         // 时段价格
         // 时段价格
-        console.log(this.carWashInfo)
         this.setPeriodPrice(this.carWashInfo.storeItemPriceDTOList)
         this.setPeriodPrice(this.carWashInfo.storeItemPriceDTOList)
       },
       },
       // 时段价格  赋值处理
       // 时段价格  赋值处理
       setPeriodPrice(storeItemPriceDTOList){
       setPeriodPrice(storeItemPriceDTOList){
         let arrInd = 0
         let arrInd = 0
         this.storeItemPriceDTOList = []
         this.storeItemPriceDTOList = []
-        for (var key in storeItemPriceDTOList) {
+        for (let key in storeItemPriceDTOList) {
           if (storeItemPriceDTOList.hasOwnProperty(key)) {
           if (storeItemPriceDTOList.hasOwnProperty(key)) {
+            console.log(key,'====key ---------for in')
             this.storeItemPriceDTOList.push({
             this.storeItemPriceDTOList.push({
               beginTime: key.split(',')[0],
               beginTime: key.split(',')[0],
               endTime: key.split(',')[1],
               endTime: key.split(',')[1],
@@ -159,8 +159,12 @@
             arrInd++
             arrInd++
           }
           }
         }
         }
-        console.log(this.storeItemPriceDTOList)
-        console.log(this.serviceType)
+        Object.getOwnPropertyNames(storeItemPriceDTOList).forEach(function(key){
+          console.log(key+ '---'+storeItemPriceDTOList[key],'----------foreach')
+        })
+        console.log(Object.keys(storeItemPriceDTOList),'----------Object.keys')
+        // console.log(this.storeItemPriceDTOList)
+        // console.log(this.serviceType)
       },
       },
     },
     },
     watch: {
     watch: {
@@ -175,7 +179,7 @@
         }
         }
       },
       },
       carWashId (newValue, oldValue){
       carWashId (newValue, oldValue){
-        if(newValue){
+        if(newValue && this.isShow){
           this.getCarWashInfo(newValue)
           this.getCarWashInfo(newValue)
         }
         }
       }
       }