工作记录1
Posted guangzhou11
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了工作记录1相关的知识,希望对你有一定的参考价值。
1.vue 编辑页面
create 调用两个接口
listSpu接口
let vm = this; vm.uistate.loading =true; let payload = { params: { spu_code: ‘‘ }, callback: { success: (result) => { vm.uistate.loading =false; vm.uistate.result = { resultcode: rests.SUCCEED } // 得到的货号的数值 vm.spus = result; vm.filtered_spus = vm.spus; }, failed: (resultcode, message, detail) => { vm.uistate.result = { resultcode: resultcode, messagesizes: message, detail: detail }; }, completed: () => { vm.uistate.loading = false; } } } this.listSpu(payload);
getSku接口
this.model.kid = this.$route.query.kid; if (!this.model.kid) { this.uistate.loading = false; this.uistate.result = { resultcode: -1, message: ‘参数不能为空‘, detail: ‘请返回重试!‘ }; return; } payload={ params:{ kid:vm.model.kid }, callback : { success: (result) => { vm.model.kid=result.kid; vm.model.spu = result.spu_code; //货号 vm.model.remark = result.remark; //备注 vm.model.color = result.color; //颜色 vm.model.size = result.size; //尺码 vm.model.price = parseFloat(result.price/100).toFixed(2); //价格,保留两位小数 vm.model.barcode = result.barcode; //条码 }, failed: (resultcode, message, detail) => { vm.uistate.result = { resultcode: resultcode, message: message, detail: detail }; vm.uistate.loading = false; }, completed: () => {} } }; this.getSku(payload);
以上是关于工作记录1的主要内容,如果未能解决你的问题,请参考以下文章
append() 在这个代码片段中是如何工作的?与特定变量混淆[重复]
错误记录Flutter 混合开发获取 BinaryMessenger 报错 ( FlutterActivityAndFragmentDelegate.getFlutterEngine() )(代码片段