shish 4 лет назад
Родитель
Сommit
b904b18648
2 измененных файлов с 3 добавлено и 8 удалено
  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>
           <radio-group class="tui-input" @change="flowerChange">
             <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>
             </label>
             <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>
             </label>
           </radio-group>
@@ -197,6 +197,7 @@ export default {
   onLoad() {
     const token = uni.getStorageSync('token')
     this.headers.token = token
+    this.getDetail()
   },
   methods: {
     imgDeleteFn(res){
@@ -213,9 +214,6 @@ export default {
     goBack(){
       uni.navigateBack({delta:1})
     },
-    init() {
-      this.getDetail()
-    },
     getDetail() {
       return getDetailB({ id: this.option.id }) .then(res => {
         if (this.$util.isEmpty(res.data)) {

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

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