From ee738e9f80c5b1948215fb8c93f922684b62ec39 Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Fri, 17 May 2024 19:19:01 +0800 Subject: [PATCH] add --- api/supplier.js | 9 + config/app.js | 5 +- manifest.json | 6 +- pages.json | 8 +- pages/bindSupplier/index.vue | 1366 ++++++++++++++++++++++++++++++++++ utils/requestSupplier.js | 10 +- 6 files changed, 1394 insertions(+), 10 deletions(-) create mode 100644 pages/bindSupplier/index.vue diff --git a/api/supplier.js b/api/supplier.js index 4f26d84..b013f89 100644 --- a/api/supplier.js +++ b/api/supplier.js @@ -34,4 +34,13 @@ export const OpurchaseGoodsOfferApi = (data) => { export const aboutUsApi = (data) => { return request.post('operation/OpurchaseGoodsOffer/offer', data); +} + + +export const applysApi = (data) => { + return request.post('shop/index/apply', data); +} + +export const merchatTypeApi = (data) => { + return request.get('shop/index/merchat_type', data); } \ No newline at end of file diff --git a/config/app.js b/config/app.js index fec7d0c..13ede59 100644 --- a/config/app.js +++ b/config/app.js @@ -29,13 +29,14 @@ switch (env) { case 'prew': httpApi = 'https://test.shop.lihaink.cn' //预发布环境 httpSix = 'https://ceshi-new-wokr.lihaink.cn' - httpTwo = 'https://erp.lihaink.cn' + httpTwo = 'http://192.168.1.22:8546' wsApi = 'wss://test.shop.lihaink.cn' break; default: httpApi = "https://crmeb-test.shop.lihaink.cn" // 测试 httpSix = 'https://ceshi-new-wokr.lihaink.cn' - httpTwo = 'https://erp.lihaink.cn' + // httpTwo = 'https://erp.lihaink.cn' + httpTwo = 'http://192.168.1.22:8546' // wsApi = 'ws://192.168.1.22:8324' wsApi = 'wss://crmeb-test.shop.lihaink.cn' } diff --git a/manifest.json b/manifest.json index aec1b5c..7a44b01 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name": "惠农生活", "appid": "__UNI__3A527D1", "description": "", - "versionName": "2.0.53", - "versionCode": 2053, + "versionName": "2.0.55", + "versionCode": 2055, "transformPx": false, /* 5+App特有相关 */ "app-plus": { @@ -350,4 +350,4 @@ } } } -} +} \ No newline at end of file diff --git a/pages.json b/pages.json index 987c2dc..632eb60 100644 --- a/pages.json +++ b/pages.json @@ -93,7 +93,13 @@ "navigationBarTitleText": "账户绑定" } }, - + { + "path": "pages/bindSupplier/index", + "style": { + "enablePullDownRefresh": false, + "navigationBarTitleText": "供应商入驻" + } + }, { "path": "pages/gather/gather", "style": { diff --git a/pages/bindSupplier/index.vue b/pages/bindSupplier/index.vue new file mode 100644 index 0000000..0d88038 --- /dev/null +++ b/pages/bindSupplier/index.vue @@ -0,0 +1,1366 @@ + + + + + \ No newline at end of file diff --git a/utils/requestSupplier.js b/utils/requestSupplier.js index 9a026b4..da02383 100644 --- a/utils/requestSupplier.js +++ b/utils/requestSupplier.js @@ -10,7 +10,7 @@ import { HTTP_REQUEST_URL_TWO, HEADER, - + TOKENNAME } from '@/config/app'; import { checkLogin @@ -18,14 +18,12 @@ import { import store from '../store'; import pako from '../plugin/pako/pako.es5.min.js' -let TOKENNAME = 'Token' +// let TOKENNAME = 'Token' function toLogin() { } -console.log(HTTP_REQUEST_URL_TWO, 'HTTP_REQUEST_URL_TWO') - function decompress(str) { return pako.inflateRaw(base64ToUint8Array(str), { to: 'string' @@ -93,6 +91,10 @@ function baseRequest(url, method, data, { header: header, data: data || {}, success: (res) => { + if (res.data.code == 1) { + reslove(res.data, res); + } + if (res.data && res.data.encode) { try { res.data = JSON.parse(decompress(res.data.data));