增加师傅详情
This commit is contained in:
parent
31b3a1b9a7
commit
632edb3982
|
@ -301,4 +301,10 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
worker: {
|
||||
detail: {
|
||||
url: "/wxapp/orderb/getworkerbyid",
|
||||
showLoading: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import Vue from "vue"
|
||||
let prototype = Vue.prototype;
|
||||
|
||||
export default {
|
||||
workerTypeText(type) {
|
||||
switch (type) {
|
||||
|
@ -7,4 +10,16 @@ export default {
|
|||
default: return ['未知'];
|
||||
}
|
||||
},
|
||||
}
|
||||
workerDetail(uid) {
|
||||
return new Promise((resolve, reject) => {
|
||||
prototype.$request({
|
||||
api: "worker.detail",
|
||||
data: {
|
||||
uid: uid,
|
||||
}
|
||||
}).then(response => {
|
||||
console.log(response);
|
||||
}).catch(e => { });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ export default {
|
|||
*/
|
||||
showWorker() {
|
||||
if (this.$utils.isType(this.order.worker, "object") && this.$utils.isType(this.order.worker.id, "number")) {
|
||||
console.log("跳转师傅" + this.order.worker.id);
|
||||
this.$utils.toPage("/pages/worker/detail?id=" + this.order.worker.id);
|
||||
} else {
|
||||
this.switchTab(0);
|
||||
}
|
||||
|
|
|
@ -51,7 +51,13 @@ export default {
|
|||
AppLayout,
|
||||
},
|
||||
onLoad(e) {
|
||||
if (!e.id) {
|
||||
return this.$utils.tosat("参数错误").then(() => {
|
||||
this.$utils.toPage("", "", "back");
|
||||
});
|
||||
}
|
||||
this.id = e.id;
|
||||
let [typeText, typeTextColor] = this.$models.worker.workerTypeText(this.data.type);
|
||||
},
|
||||
onShow() {},
|
||||
onReady() {},
|
||||
|
|
Loading…
Reference in New Issue