增加师傅详情

This commit is contained in:
TOP糯米 2023-03-29 19:34:42 +08:00
parent 31b3a1b9a7
commit 632edb3982
4 changed files with 29 additions and 2 deletions

View File

@ -301,4 +301,10 @@ export default {
}
}
},
worker: {
detail: {
url: "/wxapp/orderb/getworkerbyid",
showLoading: true,
}
}
}

View File

@ -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 => { });
});
}
}

View File

@ -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);
}

View File

@ -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() {},