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
-
+
@@ -57,7 +57,7 @@
-
@@ -78,7 +78,7 @@
export default {
data() {
return {
- phone: '13521030702',
+ mobile: '13521030702',
username: 'delicacylee',
code: '',
password: '1qazxsw2#',
@@ -149,7 +149,7 @@
loginUrl='/auth/login'
} else {
data = {
- phone: this.phone,
+ mobile: this.mobile,
code: this.code,
saveLogin: true,
type: this.wayValue
@@ -197,12 +197,12 @@
}).catch((res) => {})
},
//多店铺的时候点击选择需要登录的店铺
- checkShop(id) {
- this.tui.request("/app/sale/delById", "POST", {
- id: id
- }, false, false).then((res) => {
+ checkShop(item) {
+ this.tui.request("/auth/chooseShop", "POST", {
+ shopId: item.shopId
+ }, false, true).then((res) => {
if (res.code == 200) {
- uni.setStorageSync('shopName',res.result.shopName)
+ uni.setStorageSync('shopName',item.shopName)
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/index'
@@ -218,10 +218,10 @@
},
sendLoginSms() { // 获取验证码
this.isChoose = false
- if (reg(this.phone, this.clock) && this.isChoose == false) {
+ if (reg(this.mobile, this.clock) && this.isChoose == false) {
this.choose = true
this.setTime()
- this.tui.request("/common/captcha/sendLoginSms/" + this.phone, "GET", {
+ this.tui.request("/common/captcha/sendLoginSms/" + this.mobile, "GET", {
type: this.wayValue
}).then((res) => {
if (res.code == 200) {
@@ -233,7 +233,7 @@
this.tui.toast(res.message)
}
}).catch((res) => {})
- } else if (reg(this.phone, this.clock) && this.isChoose == true) {
+ } else if (reg(this.mobile, this.clock) && this.isChoose == true) {
console.log('通过了')
}
},