From 76e97d04bebec7866300cef91106e767a260bd99 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Tue, 19 Dec 2023 09:17:38 +0800 Subject: [PATCH] 11 --- pages/index/index.vue | 40 +++++++++++++++++-------- pages/inventory/goodsList1.vue | 2 +- pages/login/login.vue | 21 +++++++------ pages/other/logistics.vue | 19 ++++++------ pages/other/logisticsAddress.vue | 51 ++++++++++++++++++++++++-------- 5 files changed, 86 insertions(+), 47 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index e37f0d8..0a22ebe 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -186,15 +186,29 @@ val == null || undefined ? '暂无' : val return val; } - }, + }, + // created(){ + // if (uni.getStorageSync('hiver_token')) { + // if(uni.getStorageSync('wayValue') == 1){ + // uni.reLaunch({ + // url: '/pages/other/logistics' + // }) + // }else if(uni.getStorageSync('wayValue') == 2){ + // uni.reLaunch({ + // url: '/pages/other/custom' + // }) + // } + + // } + // }, onShow() { this.shopName = uni.getStorageSync('shopName') this.type = uni.getStorageSync('type') }, - onLoad() { - this.getSaleInfo() - this.getServerData(); - this.getOrderInfoList(); + onLoad() { + this.getSaleInfo() + this.getServerData(); + this.getOrderInfoList(); this.getWaitCount() }, methods: { @@ -428,10 +442,10 @@ padding-left: 0 !important; } - .u-grid-item.data-v-5b3a01af { + .u-grid-item.data-v-b1f995c2 { width: 44% !important; height: 160rpx; - background: linear-gradient(#84C1FF, #C4E1FF) !important; + background-image: linear-gradient(#84C1FF, #C4E1FF) !important; margin-left: 4%; border-radius: 30rpx; margin-top: 20rpx !important; @@ -439,16 +453,16 @@ } - .u-grid-item.data-v-5b3a01af:nth-child(2) { - background: linear-gradient(#FFBB77, #FFDCB9) !important; + .u-grid-item.data-v-b1f995c2:nth-child(2) { + background-image: linear-gradient(#FFBB77, #FFDCB9) !important; } - .u-grid-item.data-v-5b3a01af:nth-child(3) { - background: linear-gradient(#1AFD9C, #7AFEC6) !important; + .u-grid-item.data-v-b1f995c2:nth-child(3) { + background-image: linear-gradient(#1AFD9C, #7AFEC6) !important; } - .u-grid-item.data-v-5b3a01af:nth-child(4) { - background: linear-gradient(#79FF79, #BBFFBB) !important; + .u-grid-item.data-v-b1f995c2:nth-child(4) { + background-image: linear-gradient(#79FF79, #BBFFBB) !important; } .u-count-num { diff --git a/pages/inventory/goodsList1.vue b/pages/inventory/goodsList1.vue index 896a46f..dbbcab2 100644 --- a/pages/inventory/goodsList1.vue +++ b/pages/inventory/goodsList1.vue @@ -3,7 +3,7 @@ - + diff --git a/pages/login/login.vue b/pages/login/login.vue index 7d57fbb..22d3b0b 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -71,13 +71,15 @@ data() { return { mobile: '15101147760', - username: '15101147760', + // username: '15101147760', + username: '15630117759', code: '', - password: '123456', + // password: '123456', + password: '19950123kang', loginWay: true, //true账号密码登录 false验证码登录 captchaImg: '', captchaId: '', - wayValue: 0, + wayValue: 1, range: [{ value: 0, text: "店铺" @@ -99,13 +101,7 @@ }, computed: mapState(['type']), onLoad() { - if (uni.getStorageSync('hiver_token')) { - uni.reLaunch({ - url: '/pages/index/index' - }) - } else { - this.getCaptchaImg(); - } + this.getCaptchaImg(); }, methods: { ...mapMutations(['login']), @@ -147,7 +143,7 @@ } loginUrl='/auth/smsLogin' } - if(this.wayValue == 1){ + if(this.wayValue == 1){ //15630117759 19950123kang this.tui.request("/app/logitics/login", "POST", { username: this.username, password: this.password, @@ -158,6 +154,9 @@ if (res.code == 200) { uni.setStorageSync("hiver_token", res.result.lcomToken) uni.setStorageSync("transCompany", res.result.logiticsCompany.id) + uni.setStorageSync("companyName", res.result.logiticsCompany.companyName) + uni.setStorageSync("signCompany", res.result.logiticsCompany.signCompany) + uni.setStorageSync("wayValue", this.wayValue) this.tui.toast('登录成功', 2000, true) setTimeout(() => { uni.reLaunch({ diff --git a/pages/other/logistics.vue b/pages/other/logistics.vue index 2c32037..68606bc 100644 --- a/pages/other/logistics.vue +++ b/pages/other/logistics.vue @@ -72,15 +72,16 @@ }] } }, - created() { - const id = uni.getStorageSync('transCompany') - const date = this.formatDate(new Date(), 'YYYY-MM-DD') - this.query.saleVO.searchDateVo.startDate = date + ' 00:00:00' - this.query.saleVO.searchDateVo.endDate = date + ' 23:59:59' - this.query.saleVO.transCompany = id - this.range = date - this.getShopList() - this.getAllList() + created() { + uni.hideHomeButton() //左上角HOME按钮 + // const id = uni.getStorageSync('transCompany') + // const date = this.formatDate(new Date(), 'YYYY-MM-DD') + // this.query.saleVO.searchDateVo.startDate = date + ' 00:00:00' + // this.query.saleVO.searchDateVo.endDate = date + ' 23:59:59' + // this.query.saleVO.transCompany = id + // this.range = date + // this.getShopList() + // this.getAllList() }, methods: { sectionChange(index) { diff --git a/pages/other/logisticsAddress.vue b/pages/other/logisticsAddress.vue index 540f62d..beba421 100644 --- a/pages/other/logisticsAddress.vue +++ b/pages/other/logisticsAddress.vue @@ -30,11 +30,11 @@ - - + + - 确认 + 确认 @@ -46,7 +46,7 @@ return { formData: { address1: '', - address: '', + standard: '', province: '', city: '', area: '', @@ -60,7 +60,7 @@ errorMessage: '请选择线路', }] }, - address: { + standard: { rules: [{ required: true, errorMessage: '请输入费用说明', @@ -76,13 +76,40 @@ uni.hideHomeButton() //左上角HOME按钮 }, onLoad(options) { - + this.getList() }, - methods: { - //新增人员 + methods: { + //获取列表 + getList(){ + this.tui.request('/app/operatingArea/getOperatingAreaList', 'POST', { + pageNum:1, + pageSize:10 + }, false, false).then((res) => { + if (res.code == 200){ + this.standardList = res.result + } + + }) + }, + //弹出弹窗 addAddress(data) { this.$refs.inputDialog.open('bottom') }, + //新增修改 + setAddress(){ + this.tui.request('/app/operatingArea/saveOrUpdateOperatingArea', 'post', { + shippingType:uni.getStorageSync("signCompany"), + shippingMethod:uni.getStorageSync("companyName"), + shippingMethodId:uni.getStorageSync("transCompany"), + province:this.formData.province, + city:this.formData.city, + area:this.formData.area, + chargingStandard:this.formData.standard + }, false, false).then(res => { + if (res.code !== 200) return + this.bList = res.result + }) + }, delAddress(){ var that = this; uni.showModal({ @@ -108,11 +135,9 @@ let address = data.province + data.city + data.area; this.show = false this.formData.address1 = address; - this.addressObj = { - province: data.province, - city: data.city, - area: data.area, - } + this.formData.province = data.province + this.formData.city= data.city + this.formData.area= data.area }, } }