From 3a900f686c74a307191b76c1e5e861a95d1bdb05 Mon Sep 17 00:00:00 2001 From: xuxy <1059738716@qq.com> Date: 星期四, 27 六月 2024 15:48:42 +0800 Subject: [PATCH] 1 --- /dev/null | 0 components/footer/farmer-footer.vue | 4 ++-- common/self.scss | 2 +- pages/user/user.scss | 2 +- sub_pages/farmer/farmer-reg/farmer-reg.vue | 3 ++- common/global.scss | 2 +- pages/login/farmer-login.vue | 2 +- static/imgs/home/home-shop-top-icon.png | 0 pages/user/farmer-user.vue | 4 ++-- components/no-data.vue | 4 +++- components/footer/main.scss | 10 +++++----- pages/home/home.scss | 7 +++++-- 12 files changed, 23 insertions(+), 17 deletions(-) diff --git a/common/global.scss b/common/global.scss index 7e6edbf..4a682d6 100644 --- a/common/global.scss +++ b/common/global.scss @@ -75,7 +75,7 @@ } .component-popup_input{ margin: 0 auto; - margin-top: calc(50% + 200rpx); + margin-top: 160rpx; // margin-left: 78rpx - 26rpx; width: 594rpx; diff --git a/common/self.scss b/common/self.scss index 6943eaa..587608d 100644 --- a/common/self.scss +++ b/common/self.scss @@ -24,7 +24,7 @@ color: var(--topicolor) !important; } .flex-wrap-normal{ - flex-wrap: nowrap; + flex-wrap: nowrap !important; } .topic-gray{ color: var(--topicgray); diff --git a/components/footer/farmer-footer.vue b/components/footer/farmer-footer.vue index ac7c197..090556b 100644 --- a/components/footer/farmer-footer.vue +++ b/components/footer/farmer-footer.vue @@ -11,9 +11,9 @@ </view> <view v-if="index==1"> <image src="../../static/imgs/footer/footer-self-1.png" class="footer-icon m-t-4 m-l-a m-r-0" :class="(''+index)" - v-if="flg==2"></image> + v-if="flg==1"></image> <image src="../../static/imgs/footer/footer-self-0.png" class="footer-icon m-t-4 m-l-a m-r-0" :class="(''+index)" - v-if="flg!=2"></image> + v-if="flg!=1"></image> </view> <view class="m-l-0 m-r-a"> {{item.text}} diff --git a/components/footer/main.scss b/components/footer/main.scss index 3243b6f..cfb2b85 100644 --- a/components/footer/main.scss +++ b/components/footer/main.scss @@ -50,10 +50,7 @@ // height: 50rpx; // margin-top: 20rpx; // } - .footer-icon{ - width: 28rpx; - height: 29rpx; - } + .footer-icon.0 { width: 28rpx; height: 29rpx; @@ -71,7 +68,10 @@ // position: sticky; // top: -10px; // } - +.footer-icon{ + width: 28rpx; + height: 29rpx; +} .footer.farmer-footer{ left: 50%; transform: translateX(-50%); diff --git a/components/no-data.vue b/components/no-data.vue index 833f337..f50e3ea 100644 --- a/components/no-data.vue +++ b/components/no-data.vue @@ -1,6 +1,8 @@ <template> <view> - <image src="../static/common/nodata.png" class="img-nodata"></image> + + <image src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/5e/5e01669de7ec4500b41711b64a7ca0fcnodata.png" class="img-nodata"></image> + <!-- <image src="../static/common/nodata.png" class="img-nodata"></image> --> <view class="txt-nodata">尽力了,没有找到数据</view> </view> </template> diff --git a/pages/address/address.vue b/pages/address/address.vue deleted file mode 100644 index 4c53332..0000000 --- a/pages/address/address.vue +++ /dev/null @@ -1,502 +0,0 @@ -<template> - <!-- 收货地址列表 --> - <view class="p15 container-address"> - <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data> - - <!-- 循环 --> - <view v-for="(item,index) of list" :key="index" class="location-each"> - <view class="flex"> - <view class="container-info"> - <view class="flex"> - <view class="name">{{item.name || '-'}}</view> - <view class="tel">{{item.tel||'-'}}</view> - </view> - <view class="address"> - {{item.address}} - - </view> - </view> - <!-- <view class="h-line"></view> --> - <view class="edit" @click="()=>{ - this.submitForm = { - ...item - } - openAddressForm() - }"> - <uni-icons type="compose" class="icon" color="#666666"></uni-icons> - </view> - </view> - <view class="v-line"></view> - <view class="flex"> - <view class="flex" @click="changeDefaultAddress(item,index)"> - <!-- <label class="radio flex" > --> - <!-- <radio value="r1" :checked="item.defaulted" disabled - style="transform:scale(0.6)" v-if="item.defaulted" /> - <radio value="r1" - style="transform:scale(0.6)" :checked="item.defaulted" v-if="!item.defaulted" @change="changeDefaultAddress(item,index)"/> - --> - - <!-- </label> --> - <view class="radio m-t-2 m-r-10" :class="[item.defaulted?'select':'']"> - - </view> - <span class="desc">{{item.defaulted?'默认地址:':'当前地址:'}}{{item.schoolAreaStr||''}} {{item.blockStr||''}} - {{item.room||''}}</span> - <!-- 当前地址/默认地址勾选 --> - </view> - <view class="desc del t-red" @click="deleteAddress(item)"> - 删除 - </view> - <view class="desc del t-green m-l-10" v-if="source==='select'" @click="selectAddress(item)"> - 选择此地址 - </view> - </view> - - </view> - <view style="height: 92rpx;width: 690rpx;"> - - </view> - <view class="button-green button-fixed-bottom" style="width: 690rpx;line-height: 92rpx;height: 92rpx;" @click=" ()=>{ - delete this.submitForm.id - this.submitForm['name'] = '' - this.submitForm['tel'] = '' - this.submitForm['tel'] = '' - this.submitForm['area'] = '' - - openAddressForm() - }">添加收货地址</view> - - <uni-popup ref="popup_form" type="top" :mask-click="false"> - <view class="popup-address-form"> - <view class="close-parent"> - {{submitForm.id?'新增':'编辑'}}收货地址 - <uni-icons class="close" type="closeempty" @click="closeAddressForm"></uni-icons> - </view> - <!--收货人、手机号、校区、详细地址 --> - <view class="submit form"> - <view class="form-item"> - <view class="form-item-label require"> - 收货人 - </view> - <view class="form-item-value"> - <input v-model="submitForm.name" placeholder="请输入收货人" class="form-input"></input> - </view> - </view> - <view class="form-item"> - <view class="form-item-label require"> - 手机号 - </view> - <view class="form-item-value"> - <input v-model="submitForm.tel" placeholder="请输入手机号" class="form-input"></input> - </view> - </view> - <view class="form-item"> - <view class="form-item-label require"> - 校区 - </view> - <view class="form-item-value"> - <!-- <uni-data-checkbox v-model="submitForm.sex" :localdata="sexs" /> --> - <picker @change="PickerChangeSchool" :value="schoolIndex" :range="schools" range-key="name"> - <view class="picker"> - <uni-icons type="location" class="m-r-10"></uni-icons> - {{ schoolIndex>=0&&schools[schoolIndex].name ? schools[schoolIndex].name : '选择校区' }} - </view> - </picker> - </view> - </view> - <view class="form-item" v-if="schoolIndex>=0&&schools[schoolIndex].name"> - <view class="form-item-label require"> - 楼栋 - </view> - <view class="form-item-value"> - <!-- <uni-data-checkbox v-model="submitForm.sex" :localdata="sexs" /> --> - <picker @change="PickerChangeBlock" :value="blockIndex" :range="blocks" range-key="name"> - <view class="picker"> - <uni-icons type="location" class="m-r-10"></uni-icons> - {{ blockIndex>=0&&blocks[blockIndex].name ? blocks[blockIndex].name : (blockIndex>=0?'选择楼栋':'选择楼栋') }} - </view> - </picker> - </view> - </view> - <view class="form-item"> - <view class="form-item-label require"> - 房间号 - </view> - <view class="form-item-value"> - <input v-model="submitForm.room" placeholder="请输入房间号" class="form-input"></input> - </view> - </view> - <view class="form-item"> - <view class="form-item-label require"> - 详细地址 - </view> - <view class="form-item-value"> - <input v-model="submitForm.address" placeholder="请输入详细地址" class="form-input"></input> - - </view> - </view> - <view class="form-item"> - <view class="form-item-label"> - 是否默认 - </view> - <view class="form-item-value"> - <radio value="r1" :checked="submitForm.defaulted" - @click="submitForm.defaulted=!submitForm.defaulted" - style="transform:scale(0.6);margin-top: -8rpx;" /> - </view> - </view> - </view> - - <view class="button-green m-t-15" @click="saveOrUpdateAddress">保存</view> - </view> - </uni-popup> - - </view> -</template> - -<script> - export default { - async onPullDownRefresh() { - this.page.current = 0 - await this.getList() - uni.stopPullDownRefresh() - }, - async onLoad(options) { - // this.list = [{}, {}] - this.source = options.source || '' - this.listApi = '/api/address/customer/list' - await this.getList() - //得到校区 - this.$http.request('get', '/api/school/area/list', { - - }).then(res => { - if (res.code == 0) { - this.schools = res.data || [] - } - }) - }, - data() { - return { - source: '', - submitForm: { - name: '', - tel: '', - address: '', - schoolArea: '', - block: '', - room: '', - defaulted: false - }, - schoolIndex: -1, - blockIndex: -1, - schools: [], - blocks: [], - }; - }, - methods: { - async changeDefaultAddress(item, index) { - if (item.defaulted) { - return - } - this.$nextTick(() => { - // item.defaulted = false - // this.$set(item,'defaulted',false) - this.$message.confirm('确定设置此地址为默认地址吗').then(async res => { - this.$message.showLoading() - var { - code - } = await this.$http.request('post', '/api/address/customer/default/' + - item.id, {}) - this.$message.hideLoading() - if (code == 0) { - for (var dto of this.list) { - dto.defaulted = false - } - this.$message.showToast('设置成功') - item.defaulted = true - this.$store.commit('setDefaultAddress', { - ...item - }) - - } - }, err => { - this.$nextTick(() => { - this.list[index].defaulted = false - this.$forceUpdate() - console.log('err', err, this.list[index]) - }) - - - }) - }) - }, - async selectAddress(item) { - await this.$message.confirm('确定选择此地址作为收货地址吗') - //携带,然后返回 - this.$store.commit('setDefaultAddress', { - ...item - }) - this.backpage() - }, - async deleteAddress(item) { - await this.$message.confirm('确定删除此地址吗') - this.$message.showLoading() - var { - code - } = await this.$http.request('get', '/api/address/customer/delete/' + item.id, {}) - this.$message.hideLoading() - if (code == 0) { - this.$message.showToast('删除成功') - setTimeout(() => { - this.page.current = 1 - this.getList() - }, 500) - } - }, - async openAddressForm() { - if (this.submitForm.id) { - this.$message.showLoading() - var { - data - } = await this.$http.request('get', '/api/address/customer/get/' + this.submitForm.id, {}) - - - if (data) { - this.submitForm = { - ...this.submitForm, - ...data - } - this.blockIndex = -1 - this.schoolIndex = -1 - } - if (this.submitForm.schoolArea) { - //获取校区this.schoolIndex,和设置漏洞 - var i = -1 - for (var item of this.schools) { - i++; - if (item.id == this.submitForm.schoolArea) { - this.schoolIndex = i - break - } - } - if (this.schoolIndex >= 0) { - //获取楼栋 - var res = await this.$http.request('get', '/api/school/block/list', { - params: { - schoolArea: this.submitForm.schoolArea, - size: 200 - } - }) - data = res.data - this.blocks = data.records || [] - i = -1 - for (var item of this.blocks) { - i++; - if (item.id == this.submitForm.block) { - this.blockIndex = i - break - } - } - } - } - this.$message.hideLoading() - } else { - this.submitForm = { - name: this.currentInfo&&this.currentInfo.nickName || '', - tel: this.currentInfo&&this.currentInfo.tel || '', - address: '', - schoolArea: '', - block: '', - room: '', - defaulted: false - } - this.schoolIndex = -1 - this.blockIndex = -1 - this.blocks = [] - } - - this.$refs.popup_form.open() - - }, - closeAddressForm() { - this.$refs.popup_form.close() - - }, - async saveOrUpdateAddress() { - if (!this.checkFormValues(this.submitForm, ['tel', 'name', 'address', 'room', 'schoolArea', - 'block' - ])) { - this.$message.showToast('字段未填写完整') - return - } - this.$message.showLoading() - const { - code - } = await this.$http.request('post', '/api/address/customer/' + (this.submitForm.id ? 'edit' : - 'new'), { - data: this.submitForm - }) - this.$message.hideLoading() - if (code == 0) { - this.$refs.popup_form.close() - this.$message.showToast(this.submitForm.id ? '修改成功' : '新增成功') - - setTimeout(() => { - this.page.current = 1 - this.getList() - }, 300) - } - }, - async PickerChangeSchool(e) { - if (e.detail.value == '-1') { - this.$message.showToast('未选择校区') - return - } - this.schoolIndex = parseInt(e.detail.value) - this.submitForm.schoolArea = this.schools[this.schoolIndex].id - - this.$message.showLoading() - var { - data - } = await this.$http.request('get', '/api/school/block/list', { - params: { - schoolArea: this.submitForm.schoolArea, - size: 200 - } - }) - this.blocks = data.records || [] - this.$message.hideLoading() - }, - PickerChangeBlock(e) { - if (e.detail.value == '-1') { - this.$message.showToast('未选择楼栋') - return - } - this.blockIndex = parseInt(e.detail.value) - this.submitForm.block = this.blocks[this.blockIndex].id - }, - } - } -</script> - -<style lang="scss" scoped> - .container-address { - .popup-address-form { - background: #FFFFFF; - border-radius: 16rpx; - // width: 690rpx; - height: 882rpx; - margin-top: 120rpx; - margin-left: 30rpx; - margin-right: 30rpx; - padding: 24rpx 36rpx; - - .submit { - margin-top: 30rpx; - - .form-input { - height: 36rpx; - line-height: 36rpx; - } - } - } - - .location-each { - background: #FFFFFF; - border-radius: 16rpx; - margin-bottom: 24rpx; - padding: 36rpx; - - .name { - font-size: 32rpx; - color: #000000; - line-height: 44rpx; - text-align: left; - font-style: normal; - } - - .tel { - font-size: 28rpx; - color: #666666; - line-height: 40rpx; - text-align: left; - font-style: normal; - padding-top: 4rpx; - margin-left: 20rpx; - } - - .address { - font-size: 24rpx; - color: #000000; - line-height: 34rpx; - text-align: left; - font-style: normal; - } - - .desc { - font-size: 24rpx; - color: #666666; - line-height: 34rpx; - text-align: left; - font-style: normal; - } - - .del { - // vertical-align: baseline; - margin-left: auto; - margin-right: 6rpx; - margin-top: 4rpx; - } - - .container-info { - max-width: 540rpx; - } - - .h-line { - width: 2rpx; - height: 46rpx; - background-color: #EEEEEE; - margin-left: 28rpx; - margin-right: 24rpx; - } - - .v-line { - width: 638rpx; - height: 2rpx; - // border: 2rpx solid #EEEEEE; - background-color: #EEEEEE; - margin-top: 24rpx; - margin-bottom: 24rpx; - } - - .edit { - // min-width: 80rpx; - width: fit-content; - margin-left: auto; - margin-right: 0rpx; - display: flex; - position: relative; - - .icon { - // margin: 0 auto; - // mar - margin-left: auto; - margin-right: auto; - margin-top: 20rpx; - display: block; - - } - } - - .edit::before { - content: " "; - width: 2rpx; - height: 46rpx; - background-color: #EEEEEE; - position: absolute; - left: -24rpx; - top: 20rpx; - } - } - } -</style> \ No newline at end of file diff --git a/pages/bussincess/order/bussincess-canteen/bussincess-canteen.vue b/pages/bussincess/order/bussincess-canteen/bussincess-canteen.vue deleted file mode 100644 index 8183fd0..0000000 --- a/pages/bussincess/order/bussincess-canteen/bussincess-canteen.vue +++ /dev/null @@ -1,22 +0,0 @@ -<template> - <view> - - </view> -</template> - -<script> - export default { - data() { - return { - - } - }, - methods: { - - } - } -</script> - -<style> - -</style> diff --git a/pages/bussincess/order/bussincess-good/bussincess-good.vue b/pages/bussincess/order/bussincess-good/bussincess-good.vue deleted file mode 100644 index 8183fd0..0000000 --- a/pages/bussincess/order/bussincess-good/bussincess-good.vue +++ /dev/null @@ -1,22 +0,0 @@ -<template> - <view> - - </view> -</template> - -<script> - export default { - data() { - return { - - } - }, - methods: { - - } - } -</script> - -<style> - -</style> diff --git a/pages/bussincess/order/bussincess-shop/bussincess-shop.vue b/pages/bussincess/order/bussincess-shop/bussincess-shop.vue deleted file mode 100644 index 8183fd0..0000000 --- a/pages/bussincess/order/bussincess-shop/bussincess-shop.vue +++ /dev/null @@ -1,22 +0,0 @@ -<template> - <view> - - </view> -</template> - -<script> - export default { - data() { - return { - - } - }, - methods: { - - } - } -</script> - -<style> - -</style> diff --git a/pages/bussincess/order/bussincess-travel/bussincess-travel.vue b/pages/bussincess/order/bussincess-travel/bussincess-travel.vue deleted file mode 100644 index 8183fd0..0000000 --- a/pages/bussincess/order/bussincess-travel/bussincess-travel.vue +++ /dev/null @@ -1,22 +0,0 @@ -<template> - <view> - - </view> -</template> - -<script> - export default { - data() { - return { - - } - }, - methods: { - - } - } -</script> - -<style> - -</style> diff --git a/pages/home/home.scss b/pages/home/home.scss index 612d4e7..3c0ab36 100644 --- a/pages/home/home.scss +++ b/pages/home/home.scss @@ -2,6 +2,8 @@ .main-container{ // background-image: url('../../static/images/farmer/home/bg.png'); background: #E1F0E7; + // https://hmy-flower.oss-cn-shanghai.aliyuncs.com/2a/2aa62e6bd1f74456b005d3f57daa54adbg.png + .top-bg{ background-image: unset; max-height: unset; @@ -153,6 +155,7 @@ transform: translateY(-50%) rotate(0deg); /* 旋转90度使三角形指向右,并垂直居中 */ border-top: 12rpx solid transparent; border-left: 12rpx solid #20613D; + margin-top: -3rpx; border-bottom: 12rpx solid transparent; } .name.pink::after{ @@ -228,14 +231,14 @@ } .order-icon.shlp{ // margin-top: 16rpx; - margin-top: -4rpx; + margin-top: -1rpx; width: 54rpx; height: 58rpx; } .order-icon.kkjl{ // margin-top: 12rpx; // margin-top: 0rpx; - margin-top: -6rpx; + margin-top: -3rpx; width: 58rpx; height: 58rpx; } diff --git a/pages/login/farmer-login.vue b/pages/login/farmer-login.vue index c348801..240cf10 100644 --- a/pages/login/farmer-login.vue +++ b/pages/login/farmer-login.vue @@ -2,7 +2,7 @@ <view class="main-container login-container img100 relative" style="margin-top: 0rpx;"> <!-- background-image:url('@/static/images/farmer/login/bg.png') --> - <image class="component-bg" src="/static/images/farmer/login/bg.png" mode="scaleToFill" /> + <image class="component-bg" src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/a5/a54508de179a4942918ecb2c5a4aa9f5bg.png" mode="scaleToFill" /> <view class="t-login top-bg"> <view class="nav-title">登录</view> <view class="login"> diff --git a/pages/user/farmer-user.vue b/pages/user/farmer-user.vue index 825be69..e11343e 100644 --- a/pages/user/farmer-user.vue +++ b/pages/user/farmer-user.vue @@ -5,8 +5,8 @@ </view> --> <!-- 背景图 --> <view class="top-bg img100 relative" :style="{'padding-top':(StatusBar)+'px','line-height':CustomBar+'rpx' }"> - <image class="component-bg" src="/static/images/farmer/user/bg.png" mode="scaleToFill" /> - + <image class="component-bg" src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/21/21c95c14e9504be69edff7785e3b44a9bg.png" mode="scaleToFill" /> + <view class="title" style="position: relative;"> 我的 diff --git a/pages/user/user.scss b/pages/user/user.scss index 6fc2444..09c27ce 100644 --- a/pages/user/user.scss +++ b/pages/user/user.scss @@ -7,7 +7,7 @@ .top-bg{ padding: 32rpx; - background-image: url('../../static/images/farmer/user/bg.png'); + // background-image: url('../../static/images/farmer/user/bg.png'); height: 438rpx; max-height: 438rpx; diff --git a/static/common/icon-clock.png b/static/common/icon-clock.png deleted file mode 100644 index 0c7aeb3..0000000 --- a/static/common/icon-clock.png +++ /dev/null Binary files differ diff --git a/static/common/icon-loc-filled.png b/static/common/icon-loc-filled.png deleted file mode 100644 index b6aeee0..0000000 --- a/static/common/icon-loc-filled.png +++ /dev/null Binary files differ diff --git a/static/common/nodata.png b/static/common/nodata.png deleted file mode 100644 index d74eed7..0000000 --- a/static/common/nodata.png +++ /dev/null Binary files differ diff --git a/static/images/farmer/home/bg.png b/static/images/farmer/home/bg.png deleted file mode 100644 index 875a4cb..0000000 --- a/static/images/farmer/home/bg.png +++ /dev/null Binary files differ diff --git a/static/images/farmer/login/bg.png b/static/images/farmer/login/bg.png deleted file mode 100644 index ccccb64..0000000 --- a/static/images/farmer/login/bg.png +++ /dev/null Binary files differ diff --git a/static/images/farmer/user/bg.png b/static/images/farmer/user/bg.png deleted file mode 100644 index 7ed7735..0000000 --- a/static/images/farmer/user/bg.png +++ /dev/null Binary files differ diff --git a/static/imgs/home/home-shop-top-icon.png b/static/imgs/home/home-shop-top-icon.png new file mode 100644 index 0000000..4785021 --- /dev/null +++ b/static/imgs/home/home-shop-top-icon.png Binary files differ diff --git a/sub_pages/farmer/farmer-reg/farmer-reg.vue b/sub_pages/farmer/farmer-reg/farmer-reg.vue index e17cf3c..35b531c 100644 --- a/sub_pages/farmer/farmer-reg/farmer-reg.vue +++ b/sub_pages/farmer/farmer-reg/farmer-reg.vue @@ -1,6 +1,7 @@ <template> <view class="main-container login-container img100 relative" style="margin-top: 0rpx;"> - <image class="component-bg" src="/static/images/farmer/login/bg.png" mode="scaleToFill" /> + <image class="component-bg" src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/a5/a54508de179a4942918ecb2c5a4aa9f5bg.png" mode="scaleToFill" /> + <view class="t-login top-bg"> <view class="nav-title">注册</view> -- Gitblit v1.9.3