From 713f595cbc4aca336909d6bf8f012b04726ad17b Mon Sep 17 00:00:00 2001 From: "tianyi@bogon" Date: Sun, 29 Oct 2023 13:27:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=80=89=E6=8B=A9=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E3=80=81=E9=A6=96=E9=A1=B5=E5=88=87=E6=8D=A2=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/addHangOrder.vue | 50 +++++++++++++++++++------- pages/index/checkShop.vue | 68 +++++++++++++++++++++--------------- pages/index/index.vue | 7 ++-- pages/login/login.vue | 24 ++++++------- 4 files changed, 92 insertions(+), 57 deletions(-) diff --git a/pages/index/addHangOrder.vue b/pages/index/addHangOrder.vue index 081a9d2..a7a9cea 100644 --- a/pages/index/addHangOrder.vue +++ b/pages/index/addHangOrder.vue @@ -5,7 +5,7 @@ - +
  • @@ -18,12 +18,12 @@ 编辑 扫码开单 - 语音备注 + 语音备注
- + 备注: @@ -32,11 +32,11 @@ 女士连衣裙(HD738206579) - + 颜色:黑色,尺码:s码 * 2 颜色:黑色,尺码:s码 * 2 - @@ -115,7 +115,7 @@ ¥2952.00 - 选好了 + 选好了 @@ -146,7 +146,6 @@ export default { data() { return { - isCollapse: false, voiceText: '', recordState: false, pageNumber: 1, @@ -170,8 +169,12 @@ } } this.tui.request("/app/sale/listPages", "POST", obj, false, false).then((res) => { - if (res.code == 200) { - this.regList = res.result.records; + if (res.code == 200) { + for (let i=0;i { + if (res.code == 200) { + + } else { + this.tui.toast(res.message) + } + }).catch((res) => {}) }, //弹出商品规格选择 toggle(type, id) { @@ -281,10 +305,10 @@ //通过商品id查询商品详细信息 getById(id) { this.tui.request("/app/product/getById", "POST", { - id: id + id: "XD1718301576285786112" }, false, true).then((res) => { if (res.code == 200) { - + } else { this.tui.toast(res.message) } diff --git a/pages/index/checkShop.vue b/pages/index/checkShop.vue index eeccb76..c167186 100644 --- a/pages/index/checkShop.vue +++ b/pages/index/checkShop.vue @@ -8,13 +8,13 @@ :options="options1" index="1" v-for="item in shopList" - :key="item.id" + :key="item.shopId" @click="onActionItemSwipe(item)" > - + {{ item.shopName }} - + @@ -71,38 +71,45 @@ export default { shopNameOld: '', shopList: [], shopId: null, - current: '' + current: '', + name:'' } }, onLoad() { this.getList() }, - mounted() { - console.log(this.shopIndex) - this.current = this.shopIndex - }, methods: { ...mapMutations(['setShopIndex']), - submit() { - const shop = this.shopList.find(v => v.id === this.current) - if (shop.hasOwnProperty('id')) { - this.setShopIndex(shop) - this.tui.toast('切换店铺名称成功!', 2000,) - setTimeout(() => { - uni.reLaunch({ - url: '/pages/index/index' - // url: '/pages/index/index' - }) - }, 200) - } - }, + submit() { + this.tui.request("/auth/chooseShop", "POST", { + shopId: this.current + }, false, true).then((res) => { + if (res.code == 200) { + uni.setStorageSync('shopName',this.name) + this.tui.toast('切换店铺成功', 2000, true) + setTimeout(() => { + uni.reLaunch({ + url: '/pages/index/index' + }) + }, 200) + } else { + this.tui.toast(res.message) + return + } + }).catch((res) => {}) + }, + //初始化店铺列表 getList() { - this.tui.request("/app/shop/getAll", "get", { + this.tui.request("/auth/getShopByUser", "post", { // shopId: 1, }, false, true).then((res) => { if(res.code == 200){ - console.log(this.shopIndex) - this.shopList = res.result + for (let i=0;i