tianyi 2 days ago
parent
commit
9228dc4adb
  1. 18
      pages/index/index.vue
  2. 4
      pages/login/login.vue

18
pages/index/index.vue

@ -258,7 +258,7 @@
getBusinessStatus(){ getBusinessStatus(){
this.NB.sendRequest("/app/shoptakeaway/getByShopId", { this.NB.sendRequest("/app/shoptakeaway/getByShopId", {
shopId: uni.getStorageSync('shopId') shopId: uni.getStorageSync('shopId')
}, true, 'GET', 'application/x-www-form-urlencoded').then((res) => { }, false, 'GET', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.shop = res.result this.shop = res.result
this.shop.shopIcon = uni.getStorageSync('shopIcon') this.shop.shopIcon = uni.getStorageSync('shopIcon')
@ -299,12 +299,18 @@
that.NB.sendRequest("/app/shoptakeaway/update", { that.NB.sendRequest("/app/shoptakeaway/update", {
shopId: uni.getStorageSync('shopId'), shopId: uni.getStorageSync('shopId'),
status:that.businessStatus == "1"?'0':that.businessStatus == "0"?'1':'2' status:that.businessStatus == "1"?'0':that.businessStatus == "0"?'1':'2'
}, true, 'post', 'application/x-www-form-urlencoded').then((res) => { }, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast("更改成功") uni.showToast({
title: '更改成功',
icon:'none'
});
that.businessStatus = that.businessStatus == "1"?'0':that.businessStatus == "0"?'1':'2' that.businessStatus = that.businessStatus == "1"?'0':that.businessStatus == "0"?'1':'2'
} else { } else {
that.tui.toast(res.message) uni.showToast({
title: res.message,
icon:'none'
});
} }
uni.hideLoading() uni.hideLoading()
}).catch((res) => {}) }).catch((res) => {})
@ -355,7 +361,7 @@
}, },
getData(){ getData(){
let that = this; let that = this;
that.NB.sendRequest("/mall/order/countByShop/"+uni.getStorageSync('shopId'), {}, true, 'GET', 'application/x-www-form-urlencoded').then((res) => { that.NB.sendRequest("/mall/order/countByShop/"+uni.getStorageSync('shopId'), {}, false, 'GET', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.shopData = res.result this.shopData = res.result
for(let i=0;i<this.shopData.orderStatusCount.length;i++){ for(let i=0;i<this.shopData.orderStatusCount.length;i++){
@ -393,7 +399,7 @@
if (res1.confirm) { if (res1.confirm) {
that.NB.sendRequest("/mall/order/complete", { that.NB.sendRequest("/mall/order/complete", {
orderId: productId orderId: productId
}, true, 'post', 'application/x-www-form-urlencoded').then((res) => { }, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
title: '核销成功', title: '核销成功',

4
pages/login/login.vue

@ -320,7 +320,7 @@
that.NB.sendRequest('/auth/chooseShop', { that.NB.sendRequest('/auth/chooseShop', {
shopId: item.shop.id, shopId: item.shop.id,
deviceId:res1.deviceId deviceId:res1.deviceId
}, true, 'POST', 'application/x-www-form-urlencoded').then(res => { }, false, 'POST', 'application/x-www-form-urlencoded').then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.setStorageSync('type',item.type) uni.setStorageSync('type',item.type)
uni.setStorageSync('warehouseKeeperFlag',item.warehouseKeeperFlag) uni.setStorageSync('warehouseKeeperFlag',item.warehouseKeeperFlag)
@ -393,7 +393,7 @@
mask: true mask: true
}); });
that.NB.sendRequest(url, data, true, 'POST', 'application/x-www-form-urlencoded').then(res => { that.NB.sendRequest(url, data, false, 'POST', 'application/x-www-form-urlencoded').then(res => {
if (res.code !== 200) return if (res.code !== 200) return
console.log('shopList',res.result.shopList) console.log('shopList',res.result.shopList)
console.log('shopList.shop',res.result.shopList[0].shop) console.log('shopList.shop',res.result.shopList[0].shop)

Loading…
Cancel
Save