Browse Source

升级nuxt后手机端vuex错误修改,手机求购bug修改

yangc 7 years ago
parent
commit
ad1ed15a73

+ 7 - 6
components/mobile/applyPurchase/PublishSeek.vue

@@ -22,7 +22,7 @@
             <!--size="mini">-->
           <!--</el-date-picker>-->
         </div>
-        <div class="content-line">
+        <!--<div class="content-line">
           <span>币种:</span>
           <a v-text="applyObj.currency" @click="setShowCurrencyList(!showCurrencyList, $event)"></a>
           <img v-if="!showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
@@ -32,15 +32,15 @@
             <li @click="setCurrency('RMB')">RMB</li>
             <li @click="setCurrency('USD')">USD</li>
           </ul>
-        </div>
+        </div>-->
         <div class="content-line">
           <span>数量:</span>
           <input type="text" v-model="applyObj.amount" @blur="checkAmount" @input="onAmountInput">
         </div>
-        <div class="content-line">
+        <!--<div class="content-line">
           <span>生产日期:</span>
           <input type="text" v-model="applyObj.produceDate" @input="onProduceDateChange">
-        </div>
+        </div>-->
         <a @click="goPublish">确认发布</a>
       </div>
     </div>
@@ -167,7 +167,8 @@
           }
           let date = new Date()
           let endDate = formatDate(this.applyObj.deadline, 'yyyy-MM-dd hh:mm:ss')
-          let currency = this.applyObj.currency === '不限' ? null : this.applyObj.currency
+//          let currency = this.applyObj.currency === '不限' ? null : this.applyObj.currency
+          let currency = null
           inquiry.recorderUU = this.user.data.userUU
           inquiry.code = 'MALL' + date.getTime()
           inquiry.date = date
@@ -185,7 +186,7 @@
           inquiryItem.custCurrency = currency
           inquiryItem.cmpCode = (this.applyObj.code).toUpperCase()
           inquiryItem.unitPrice = this.applyObj.unitPrice
-          inquiryItem.produceDate = this.applyObj.produceDate
+          inquiryItem.produceDate = null
           inquiryItem.date = date
           inquiryItem.endDate = endDate
           inquiryItem.encapsulation = this.applyObj.encapsulation

+ 6 - 6
components/mobile/applyPurchase/SayPrice.vue

@@ -31,10 +31,10 @@
             <span class="fl">价格梯度<span>(PCS)</span></span>
             <span class="fr">
           <!--<span v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>-->
-          <span v-if="!purchaseDetail.custCurrency" v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>
-          <span v-if="purchaseDetail.custCurrency" v-text="purchaseDetail.custCurrency"></span>
-          <img v-if="!purchaseDetail.custCurrency && !showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
-          <img v-if="!purchaseDetail.custCurrency && showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-up.png" alt="">
+          <span v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>
+          <!--<span v-if="purchaseDetail.custCurrency" v-text="purchaseDetail.custCurrency"></span>-->
+          <img v-if="!showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
+          <img v-if="showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-up.png" alt="">
           <ul v-if="showCurrencyList">
             <li @click="setCurrency('RMB')">RMB</li>
             <li @click="setCurrency('USD')">USD</li>
@@ -120,7 +120,7 @@
     },
     computed: {
       purchaseDetail () {
-        return this.$store.state.applyPurchase.purchaseManList.purchaseManDetail.data
+        return JSON.parse(JSON.stringify(this.$store.state.applyPurchase.purchaseManList.purchaseManDetail.data))
       },
       user () {
         return this.$store.state.option.user
@@ -173,7 +173,7 @@
           purchaseMan.vendUU = this.user.data.enterprise.uu
           purchaseMan.vendUserUU = this.user.data.userUU
           purchaseMan.qutoApp = 'MALL'
-          purchaseMan.currency = purchaseMan.custCurrency || this.sayPriceObj.currency
+          purchaseMan.currency = this.sayPriceObj.currency
           this.$http.post('/inquiry/sale/item/save', purchaseMan).then(response => {
             this.showLoading = false
             if (response.data.success === false) {

+ 1 - 1
components/mobile/brand/BrandCenter.vue

@@ -69,7 +69,7 @@
     },
     computed: {
       brandList () {
-        let brandsList = this.$store.state.product.brand.brandList.data
+        let brandsList = JSON.parse(JSON.stringify(this.$store.state.product.brand.brandList.data))
         if (brandsList) {
           for (let i in brandsList) {
             brandsList[i] = brandsList[i].sort(sortList('nameEn'))

+ 1 - 1
pages/mobile/shop/index.vue

@@ -78,7 +78,7 @@
     },
     computed: {
       list () {
-        let list = this.$store.state.provider.stores.storeList.data
+        let list = JSON.parse(JSON.stringify(this.$store.state.provider.stores.storeList.data))
         if (this.isChange) {
           this.searchLists = []
           this.page = 1

+ 2 - 1
pages/mobile/user/index.vue

@@ -240,6 +240,7 @@
         this.seekType = 'wait'
         this.seekKeyword = ''
         this.$router.push('/mobile/user' + (this.userType === 'saler' ? '?type=buyer' : '?type=saler'))
+        this.reloadData()
       },
       searchSeek: function () {
         this.isChange = true
@@ -339,7 +340,7 @@
         return this.$store.state.applyPurchase.purchaseManList.purchaseManList
       },
       purchaseManList () {
-        let list = this.purchase.data.content
+        let list = this.purchase.data.content.slice()
         if (this.isChange) {
           this.purchaseManListData = []
           this.seekPage = 1

+ 2 - 2
store/product.js

@@ -3,7 +3,7 @@ import axios from '~/plugins/axios'
 // 保存一列收藏记录, 此方法仅限于在登陆界面使用
 function saveStores ({ commit }, params = {}) {
   commit('common/REQUEST_COLLECTLIST')
-  return axios.get(`trade/collection/list`, { params })
+  return axios.get(`/trade/collection/list`, { params })
     .then(response => {
       commit('common/GET_COLLECTLIST_SUCCESS', response.data)
     }, err => {
@@ -128,7 +128,7 @@ export const actions = {
   // 保存一列收藏记录, 此方法仅限于在登陆界面使用
   saveStores ({ commit }, params = {}) {
     commit('common/REQUEST_COLLECTLIST')
-    return axios.get(`trade/collection/list`, { params })
+    return axios.get(`/trade/collection/list`, { params })
       .then(response => {
         commit('common/GET_COLLECTLIST_SUCCESS', response.data)
       }, err => {