shish 4 anni fa
parent
commit
b904b18648
2 ha cambiato i file con 3 aggiunte e 8 eliminazioni
  1. 3 5
      hdApp/src/admin/goods/detail.vue
  2. 0 3
      hdApp/src/mixins/globalMixins.js

+ 3 - 5
hdApp/src/admin/goods/detail.vue

@@ -85,11 +85,11 @@
           <view class="tui-title">属性</view>
           <view class="tui-title">属性</view>
           <radio-group class="tui-input" @change="flowerChange">
           <radio-group class="tui-input" @change="flowerChange">
             <label class="list" for="flowerLink">
             <label class="list" for="flowerLink">
-              <radio id="flowerLink" value="1" :checked="form.flower == 1" :disabled="option.id && Number(option.id)>0 ? true : false" style="transform: scale(0.8,0.8);" />
+              <radio id="flowerLink" value="1" :checked="form.flower == 1" :disabled="form.id && Number(form.id)>0 ? true : false" style="transform: scale(0.8,0.8);" />
               <span class="checkbox-text">鲜花类</span>
               <span class="checkbox-text">鲜花类</span>
             </label>
             </label>
             <label class="list" for="plantsLink">
             <label class="list" for="plantsLink">
-              <radio id="plantsLink" value="0" :checked="form.flower == 0" :disabled="option.id && Number(option.id)>0 ? true : false" style="transform: scale(0.8,0.8);" />
+              <radio id="plantsLink" value="0" :checked="form.flower == 0" :disabled="form.id && Number(form.id)>0 ? true : false" style="transform: scale(0.8,0.8);" />
               <span class="checkbox-text">绿植盆栽资材</span>
               <span class="checkbox-text">绿植盆栽资材</span>
             </label>
             </label>
           </radio-group>
           </radio-group>
@@ -197,6 +197,7 @@ export default {
   onLoad() {
   onLoad() {
     const token = uni.getStorageSync('token')
     const token = uni.getStorageSync('token')
     this.headers.token = token
     this.headers.token = token
+    this.getDetail()
   },
   },
   methods: {
   methods: {
     imgDeleteFn(res){
     imgDeleteFn(res){
@@ -213,9 +214,6 @@ export default {
     goBack(){
     goBack(){
       uni.navigateBack({delta:1})
       uni.navigateBack({delta:1})
     },
     },
-    init() {
-      this.getDetail()
-    },
     getDetail() {
     getDetail() {
       return getDetailB({ id: this.option.id }) .then(res => {
       return getDetailB({ id: this.option.id }) .then(res => {
         if (this.$util.isEmpty(res.data)) {
         if (this.$util.isEmpty(res.data)) {

+ 0 - 3
hdApp/src/mixins/globalMixins.js

@@ -103,9 +103,6 @@ export default {
 		}
 		}
 	},
 	},
 	onShow(){
 	onShow(){
-		if (this.init) {
-			this.init()
-		}
 	},
 	},
 	methods: {
 	methods: {
     ...mapActions(['setUserShopAll'])
     ...mapActions(['setUserShopAll'])