Browse Source

set is_show pm_url

master
tmkook 3 years ago
parent
commit
a18c6a3552
  1. 24
      packages/sonpingDetail/viewDetail.vue
  2. 13
      service/grading.js

24
packages/sonpingDetail/viewDetail.vue

@ -71,12 +71,12 @@
<view class="flex-row group_13 centerItem"> <view class="flex-row group_13 centerItem">
<text class="text_19">平台显示</text> <text class="text_19">平台显示</text>
<!-- <text class="text_20">{{ ['不正常','正常'][item.result_type] }}</text> --> <!-- <text class="text_20">{{ ['不正常','正常'][item.result_type] }}</text> -->
<u-switch style="margin-left: 18rpx;" activeColor="#e7a23f"></u-switch>
<u-switch style="margin-left: 18rpx;" asyncChange @change="setIsShow(index)" v-model="order.sub_orders[index].is_show" activeColor="#e7a23f"></u-switch>
</view> </view>
<view class="flex-row group_13 centerItem"> <view class="flex-row group_13 centerItem">
<text class="text_19">拍卖链接</text> <text class="text_19">拍卖链接</text>
<!-- <text class="text_20">{{ ['不正常','正常'][item.result_type] }}</text> --> <!-- <text class="text_20">{{ ['不正常','正常'][item.result_type] }}</text> -->
<u-input v-model="couponText" placeholder="非必填,请输入优惠券码"></u-input>
<u-input @blur="setPmUrl(index)" v-model="order.sub_orders[index].pm_url" placeholder="非必填,请输入拍卖链接"></u-input>
</view> </view>
<view class="flex-col group_20" v-if="item.images"> <view class="flex-col group_20" v-if="item.images">
<view class="flex-row"> <view class="flex-row">
@ -96,13 +96,13 @@
</template> </template>
<script> <script>
import { gradingDetail } from '@/service/grading.js'
import { gradingDetail,updateSubOrder } from '@/service/grading.js'
export default { export default {
data() { data() {
return { return {
id: '', id: '',
order: {}
order: {},
}; };
}, },
onLoad(options){ onLoad(options){
@ -110,10 +110,22 @@
this.getViewGradingDetail(); this.getViewGradingDetail();
}, },
methods: { methods: {
setIsShow(index){
let item = this.order.sub_orders[index];
item.is_show = !item.is_show;
updateSubOrder(item.series_num,'is_show',item.is_show? 1 : 0);
},
setPmUrl(index){
let item = this.order.sub_orders[index];
updateSubOrder(item.series_num,'pm_url',item.pm_url);
},
async getViewGradingDetail(){ async getViewGradingDetail(){
let res = await gradingDetail(this.id); let res = await gradingDetail(this.id);
console.log("res", res)
this.order = res.data.datas.order;
let order = res.data.datas.order;
for(var i in order.sub_orders){
order.sub_orders[i].is_show=order.sub_orders[i].is_show? true : false;
}
this.order = order;
}, },
itemImages(images){ itemImages(images){
if(!images) return images if(!images) return images

13
service/grading.js

@ -59,4 +59,17 @@ export async function ratingSearch(series_num) {
series_num series_num
} }
}) })
}
// 评卡查询
export async function updateSubOrder(sn,fn,value) {
return await request({
url: '/api/v1/suborder_update',
method: 'post',
data: {
sn:sn,
fn:fn,
value:value
}
})
} }
Loading…
Cancel
Save