diff --git a/api/supplier.js b/api/supplier.js index b0e8704..8aebf5b 100644 --- a/api/supplier.js +++ b/api/supplier.js @@ -4,8 +4,14 @@ import request from "@/utils/request.js"; export function supplierApplyJoin(data) { return request.post(`supplier/apply`, data); } - - +// 入驻申请记录 +export function supplierApplyRecord(data) { + return request.post(`supplier/apply_record`, data); +} +// 入驻申请记录 +export function supplierApplyInfo(data) { + return request.get(`supplier/apply_info`, data); +} diff --git a/pages.json b/pages.json index a448d3a..55da0e7 100644 --- a/pages.json +++ b/pages.json @@ -1335,10 +1335,16 @@ "name": "supplier", "pages": [ { - "path": "apply_join", + "path": "apply/apply_join", "style": { "navigationBarTitleText": "申请入驻" } + }, + { + "path": "apply/record", + "style": { + "navigationBarTitleText": "申请记录" + } } diff --git a/pages/supplier/apply_join.vue b/pages/supplier/apply/apply_join.vue similarity index 93% rename from pages/supplier/apply_join.vue rename to pages/supplier/apply/apply_join.vue index 2163245..5714a74 100644 --- a/pages/supplier/apply_join.vue +++ b/pages/supplier/apply/apply_join.vue @@ -7,9 +7,9 @@ - - - + + 申请记录 + @@ -148,7 +148,7 @@ import {mapGetters} from "vuex"; import authorize from '@/components/Authorize'; import {getSingleAgentInfo} from "@/api/agent"; -import {supplierApplyJoin} from "@/api/supplier"; +import {supplierApplyJoin, supplierApplyInfo} from "@/api/supplier"; export default { name: 'business', @@ -160,6 +160,7 @@ export default { }, data() { return { + apply_id: 0, apply_info:{ invite_agent_id: 0, winery_name: '', @@ -187,13 +188,15 @@ export default { onLoad(options) { let _this = this; if(options.scene){ - console.log('转换前参数:',options.scene) + // console.log('转换前参数:',options.scene) let scene = _this.$util.getUrlParams(decodeURIComponent(options.scene)); - console.log("接收参数",scene) + // console.log("接收参数",scene) this.apply_info.invite_agent_id = scene.agent_id || 0; } + // 申请信息ID + this.apply_id = options.apply_id || 0; // 判断:是否存在邀请人 - if(Number(_this.apply_info.invite_agent_id) <= 0){ + if(Number(_this.apply_info.invite_agent_id) <= 0 && Number(this.apply_id) <= 0){ _this.$util.Tips({ title: '非法访问,无邀请人!', },{tab:1,url:'/pages/user/index'}); @@ -222,6 +225,7 @@ export default { }, // 授权成功 初始化 init () { + if(Number(this.apply_id) > 0) this.getApplyInfo(); this.getInviteAgentInfo() }, // 获取邀请人信息 @@ -274,17 +278,37 @@ export default { submitInfo(){ let _this = this; supplierApplyJoin(_this.apply_info).then(res => { - console.log("提交结果",res) if (res.status == 200) { _this.$util.Tips({ title: '操作成功!', + },{ + tab: 5, + url: '/pages/supplier/apply/record' }); } }).catch(err => { this.$util.Tips({title: err}); }); }, - + // 查看申请记录 + applyRecord(){ + uni.navigateTo({ + url: `/pages/supplier/apply/record` + }) + }, + // 获取申请信息 + getApplyInfo(){ + let _this = this; + supplierApplyInfo({ apply_id: _this.apply_id }).then(res => { + if (res.status == 200) { + let data = res.data || {}; + _this.apply_info = data || {}; + _this.getInviteAgentInfo(); + } + }).catch(err => { + this.$util.Tips({title: err}); + }); + } diff --git a/pages/supplier/apply/record.vue b/pages/supplier/apply/record.vue new file mode 100644 index 0000000..8e065e9 --- /dev/null +++ b/pages/supplier/apply/record.vue @@ -0,0 +1,169 @@ + + + + + diff --git a/static/images/not-pass.png b/static/images/not-pass.png new file mode 100644 index 0000000..4852a33 Binary files /dev/null and b/static/images/not-pass.png differ diff --git a/static/images/passed.png b/static/images/passed.png new file mode 100644 index 0000000..c6f5e2b Binary files /dev/null and b/static/images/passed.png differ diff --git a/static/images/pending.png b/static/images/pending.png new file mode 100644 index 0000000..bcc8ee8 Binary files /dev/null and b/static/images/pending.png differ