已删除1个文件
已修改22个文件
已重命名19个文件
已复制1个文件
已添加6个文件
| | |
| | | // console.log('init info',res,this.currentInfo) |
| | | if (this.currentInfo && this.currentInfo.id && !this.currentInfo.openId) { |
| | | uni.reLaunch({ |
| | | url: '/pages/home/farmer-home' |
| | | url: '/pages/home/supplier-home' |
| | | }) |
| | | } |
| | | }, 200); |
| | |
| | | // console.log('init info',res,this.currentInfo) |
| | | if (this.currentInfo && this.currentInfo.id && !this.currentInfo.openId) { |
| | | // uni.reLaunch({ |
| | | // url: '/pages/home/farmer-home' |
| | | // url: '/pages/home/supplier-home' |
| | | // }) |
| | | } |
| | | }, 200); |
| | |
| | | |
| | | .uni-noticebar{ |
| | | border-radius: 10rpx; |
| | | height: 68rpx; |
| | | height: 82rpx; |
| | | .self-uni-notice-bar-icon-left{ |
| | | width: 58rpx; |
| | | height: 52rpx; |
| | | width: 38rpx; |
| | | height: 38rpx; |
| | | margin-right: 16rpx; |
| | | } |
| | | .self-uni-notice-bar-icon{ |
| | | width: 16rpx; |
| | |
| | | line-height: 96rpx; |
| | | } |
| | | } |
| | | .text-left{ |
| | | text-align: left; |
| | | } |
| | | .img100{ |
| | | background-size: 100% 100%; |
| | | } |
| | |
| | | uni-image>img{ |
| | | opacity: 1 !important; |
| | | } |
| | | .component-radio{ |
| | | width: 26rpx; |
| | | height: 26rpx; |
| | | min-width: 26rpx; |
| | | min-height: 26rpx; |
| | | border-radius: 50%; |
| | | border: 2rpx solid #20613D; |
| | | &.cur{ |
| | | background-color:#20613D; |
| | | } |
| | | } |
| | |
| | | <view class="title">{{dto.title}}</view> |
| | | <view class="flex location"> |
| | | <!-- <uni-icons type="checkbox"></uni-icons> --> |
| | | <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-clock.png"></image> |
| | | <!-- <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-clock.png"></image> --> |
| | | <view> |
| | | {{dto.startTimeStr&&(dto.startTimeStr.substring(5,10)+'到')}}{{dto.endTimeStr&&dto.endTimeStr.substring(5,10) || ''}} |
| | | </view> |
| | |
| | | flex: 1; |
| | | border-radius: 50rpx; |
| | | padding: 8rpx; |
| | | |
| | | .item { |
| | | |
| | | font-family: PingFangSC-Regular, PingFang SC; |
| | |
| | | // top: -10px; |
| | | // } |
| | | .footer-icon{ |
| | | width: 28rpx; |
| | | height: 29rpx; |
| | | width: 36rpx; |
| | | height: 36rpx; |
| | | } |
| | | .footer.farmer-footer{ |
| | | .footer.supplier-footer{ |
| | | left: 50%; |
| | | transform: translateX(-50%); |
| | | background-image: unset; |
| | |
| | | padding-top: 12rpx; |
| | | line-height: 50rpx; |
| | | .footer-icon{ |
| | | margin-top: 12rpx; |
| | | margin-top: 8rpx; |
| | | } |
| | | } |
| | | &.cur { |
| | | |
| | | } |
| | | .footer-item.cur { |
| | | // font-weight: 600; |
| | | // font-size: 28rpx; |
| | | // color: #000000; |
| | |
| | | background: #E1F0E7; |
| | | border-radius: 50rpx; |
| | | color: var(--topicolor); |
| | | } |
| | | } |
| | | } |
文件名从 components/footer/farmer-footer.vue 修改 |
| | |
| | | <template> |
| | | <view class="footer flex farmer-footer"> |
| | | <view class="footer flex supplier-footer"> |
| | | <view v-for="(item,index) in tabBar" :key="index" class="footer-item" :class="[flg==index?'cur':'']"> |
| | | <view class="item flex" @click="go(index,item)"> |
| | | |
| | | <view v-if="index==0"> |
| | | <image src="../../static/imgs/footer/footer-home-1.png" class="footer-icon m-t-4 m-l-a m-r-0" :class="(''+index)" |
| | | <view v-if="index==0" class=" m-l-a m-r-6"> |
| | | <image src="../../static/imgs/footer/footer-home-1.png" class="footer-icon" :class="(''+index)" |
| | | v-if="flg==0"></image> |
| | | <image src="../../static/imgs/footer/footer-home-0.png" class="footer-icon m-t-4 m-l-a m-r-0" :class="(''+index)" |
| | | <image src="../../static/imgs/footer/footer-home-0.png" class="footer-icon " :class="(''+index)" |
| | | v-if="flg!=0"></image> |
| | | </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)" |
| | | <view v-if="index==1" class="m-l-a m-r-2"> |
| | | <image src="../../static/imgs/footer/footer-self-1.png" class="footer-icon" :class="(''+index)" |
| | | 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)" |
| | | <image src="../../static/imgs/footer/footer-self-0.png" class="footer-icon" :class="(''+index)" |
| | | v-if="flg!=1"></image> |
| | | </view> |
| | | <view class="m-l-0 m-r-a"> |
| | |
| | | tabBar: [ |
| | | |
| | | { |
| | | "pagePath": "/pages/home/farmer-home", |
| | | "pagePath": "/pages/home/supplier-home", |
| | | "iconPath": "/static/tabbar/home.png", |
| | | "selectedIconPath": "/static/tabbar/home_s.png", |
| | | "text": "工作台" |
| | | }, |
| | | { |
| | | "pagePath": "/pages/user/farmer-user", |
| | | "pagePath": "/pages/user/supplier-user", |
| | | "iconPath": "/static/tabbar/my.png", |
| | | "selectedIconPath": "/static/tabbar/my_s.png", |
| | | "text": "我的" |
| | |
| | | |
| | | |
| | | |
| | | import farmerfooter from '@/components/footer/farmer-footer' |
| | | Vue.component('farmer-footer', farmerfooter) |
| | | import supplierfooter from '@/components/footer/supplier-footer' |
| | | Vue.component('supplier-footer', supplierfooter) |
| | | import nodata from '@/components/no-data' |
| | | Vue.component('no-data', nodata) |
| | | // import bfooter from '@/components/footer/bussincess-footer' |
| | |
| | | { |
| | | "name" : "hmy_farmer", |
| | | "name" : "hmy_supplier", |
| | | "appid" : "__UNI__EF9B7A3", |
| | | "description" : "", |
| | | "versionName" : "1.0.0", |
| | |
| | | return state.hasLogin || false |
| | | }, |
| | | selftype: state => { |
| | | return state.type || '' |
| | | return (state.currentInfo || {}).type || '' |
| | | }, |
| | | currentInfo: state => { |
| | | return state.currentInfo || {} |
| | |
| | | { |
| | | "name": "hmy_farmer", |
| | | "name": "hmy_supplier", |
| | | "lockfileVersion": 2, |
| | | "requires": true, |
| | | "packages": { |
| | |
| | | "BROWSER": "Chrome", |
| | | "env": { |
| | | "UNI_PLATFORM": "MP", |
| | | "SERVER_COMMON": "FARMER" |
| | | "SERVER_COMMON": "supplier" |
| | | }, |
| | | "define": { |
| | | "H5-SERVERLOCAL": true |
| | |
| | | "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" |
| | | }, |
| | | "pages": [{ |
| | | "path": "pages/login/farmer-login", |
| | | "path": "pages/login/supplier-login", |
| | | "style": { |
| | | "navigationBarTitleText": "登录", |
| | | "enablePullDownRefresh": false, |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, { |
| | | "path": "pages/home/farmer-home", |
| | | "path": "pages/home/supplier-home", |
| | | "style": { |
| | | "navigationBarTitleText": "首页", |
| | | "enablePullDownRefresh": false, |
| | | "enablePullDownRefresh": true, |
| | | "navigationStyle": "custom" |
| | | } |
| | | |
| | | }, { |
| | | "path": "pages/user/farmer-user", |
| | | "path": "pages/user/supplier-user", |
| | | "style": { |
| | | "navigationBarTitleText": "我的", |
| | | "enablePullDownRefresh": false, |
| | | "enablePullDownRefresh": true, |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | |
| | | ], |
| | | |
| | | "subPackages": [{ |
| | | "root": "sub_pages/farmer", |
| | | "root": "sub_pages/supplier", |
| | | "pages": [{ |
| | | "path": "farmer-info/farmer-info", |
| | | "path": "supplier-info/supplier-info", |
| | | "style": { |
| | | "navigationBarTitleText": "信息维护", |
| | | "enablePullDownRefresh": false |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "farmer-reg/farmer-reg", |
| | | "path": "supplier-reg/supplier-reg", |
| | | "style": { |
| | | "navigationBarTitleText": "申请入住", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "protocol", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "协议", |
| | | "enablePullDownRefresh" : false |
| | | } |
| | | } |
| | | ] |
| | | |
| | | |
| | | },{ |
| | | "root": "sub_pages/partner", |
| | | "pages": [{ |
| | | "path" : "order-manage/order-manage", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "订单管理", |
| | | "enablePullDownRefresh" : false |
| | | } |
| | | }, |
| | | { |
| | | "path" : "markup-config/markup-config", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "加价配置", |
| | | "enablePullDownRefresh" : false |
| | | } |
| | | } |
| | | |
| | | ] |
| | | }], |
| | | "globalStyle": { |
| | | "navigationBarTextStyle": "black", |
| | |
| | | |
| | | .main-container{ |
| | | // background-image: url('../../static/images/farmer/home/bg.png'); |
| | | background: #E1F0E7; |
| | | // background-image: url('../../static/images/supplier/home/bg.png'); |
| | | background-color: #E1F0E7; |
| | | // https://hmy-flower.oss-cn-shanghai.aliyuncs.com/2a/2aa62e6bd1f74456b005d3f57daa54adbg.png |
| | | |
| | | .top-bg{ |
| | |
| | | |
| | | |
| | | |
| | | .main-container.farmer.home{ |
| | | // background-image: url('../../static/images/farmer/home/bg.png'); |
| | | .main-container.home{ |
| | | background-image: url('https://hmy-flower.oss-cn-shanghai.aliyuncs.com/2a/2aa62e6bd1f74456b005d3f57daa54adbg.png'); |
| | | min-height: 99vh; |
| | | padding: 30rpx; |
| | | .item-container{ |
| | | padding: 22rpx 28rpx; |
| | | background-color: #fff; |
| | | border-radius: 8rpx; |
| | | .title{ |
| | | font-weight: 600; |
| | | font-size: 32rpx; |
| | |
| | | } |
| | | .title{ |
| | | margin-top: 12rpx; |
| | | |
| | | font-weight: 400; |
| | | } |
| | | |
| | | } |
| | | .tj-panel.pink{ |
| | | background: #E7F6EB; |
| | | margin-left: auto; |
| | | |
| | | .title{ |
| | | color: #936E32; |
| | | } |
| | | } |
| | | .tj-panel.green{ |
| | | background: #FDF4E5; |
| | | margin-left: auto; |
| | | |
| | | .title{ |
| | | color: #20613D; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | .item-container.partner{ |
| | | padding-bottom: 0rpx; |
| | | .tj-container{ |
| | | .tj-each{ |
| | | // width: fit-content; |
| | | flex: 1; |
| | | .num.total{ |
| | | text-align: left; |
| | | } |
| | | .num.status{ |
| | | font-size: 24rpx; |
| | | text-align: right; |
| | | // margin-left: auto; |
| | | // margin-right: 0rpx; |
| | | // display: inline-block; |
| | | } |
| | | } |
| | | .tj-each:first-child{ |
| | | margin-left: 0rpx; |
| | | margin-right: auto; |
| | | flex: unset; |
| | | } |
| | | .tj-each:last-child{ |
| | | margin-left: 0rpx; |
| | | margin-right: auto; |
| | | flex: unset; |
| | | } |
| | | } |
| | | .line{ |
| | | margin-top: 0rpx; |
| | | margin-bottom: 0rpx; |
| | | } |
| | | } |
| | | .order-icon{ |
| | |
| | | // margin-top: 24rpx; |
| | | } |
| | | .order-desc{ |
| | | font-size: 28rpx; |
| | | font-size: 24rpx; |
| | | color: #000000; |
| | | text-align: center; |
| | | margin-top: 12rpx; |
| | | } |
| | | .order-desc.syst{ |
| | | margin-top: 0rpx; |
| | | } |
| | | .order-desc.wbsp{ |
| | | margin-top: 0rpx; |
| | | } |
| | | |
| | | .img-c{ |
| | | // min-height: 68rpx; |
| | | // width: fit-content; |
| | |
| | | // margin-left: auto; |
| | | // margin-right: auto; |
| | | } |
| | | .order-icon.ddgl{ |
| | | margin-top: 8rpx; |
| | | width: 42rpx; |
| | | height: 52rpx; |
| | | } |
| | | .order-icon.jjpz{ |
| | | margin-top: 8rpx; |
| | | width: 42rpx; |
| | | height: 52rpx; |
| | | } |
| | | .order-icon.zdjs{ |
| | | // margin-top: -8rpx; |
| | | width: 54rpx; |
| | | height: 58rpx; |
| | | margin-top: 8rpx; |
| | | width: 42rpx; |
| | | height: 52rpx; |
| | | } |
| | | .order-icon.spgl{ |
| | | margin-top: 6rpx; |
| | |
| | | } |
| | | .order-icon.shlp{ |
| | | // margin-top: 16rpx; |
| | | margin-top: -1rpx; |
| | | margin-top: 10rpx; |
| | | width: 54rpx; |
| | | height: 58rpx; |
| | | |
| | | } |
| | | .order-icon.kkjl{ |
| | | // margin-top: 12rpx; |
| | | // margin-top: 0rpx; |
| | | margin-top: -3rpx; |
| | | // margin-top: -3rpx; |
| | | margin-top: 10rpx; |
| | | width: 58rpx; |
| | | height: 58rpx; |
| | | } |
| | |
| | | </view> |
| | | <view style="padding-bottom:200rpx"> |
| | | </view> |
| | | <farmer-footer flg="0"></farmer-footer> |
| | | <supplier-footer flg="0"></supplier-footer> |
| | | |
| | | </view> |
| | | </template> |
对比新文件 |
| | |
| | | <template> |
| | | <view class="main-container home relative"> |
| | | <!-- <image class="component-bg" |
| | | src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/21/21c95c14e9504be69edff7785e3b44a9bg.png" mode="scaleToFill" /> |
| | | --> |
| | | <!-- <view> |
| | | 我的 |
| | | </view> --> |
| | | <!-- 背景图 --> |
| | | <view class="top-bg" :style="{'padding-top':(StatusBar)+'px','line-height':CustomBar+'rpx' }"> |
| | | <view class="title" style="position: relative;"> |
| | | 首页 |
| | | |
| | | </view> |
| | | <view class="flex user-info" v-if="currentInfo&&(currentInfo.id)"> |
| | | <!-- 头像 --> |
| | | <image class="user-icon" v-if="!currentInfo.picture" src="../../static/imgs/home/home-shop-top-icon.png" |
| | | mode="aspectFit"></image> |
| | | <image class="user-icon" v-if="currentInfo.picture" :src="currentInfo.picture" mode="aspectFit"></image> |
| | | |
| | | <view class="name"> |
| | | <view class="t1">{{currentInfo.nickName || currentInfo.loginName || '-'}}<span |
| | | v-if="currentInfo.supplierDTO&¤tInfo.supplierDTO.status!=='P'"> |
| | | ({{currentInfo.supplierDTO?currentInfo.supplierDTO.statusStr:''}})</span> |
| | | </view> |
| | | <view class="t2">{{currentInfo.tel || '暂无电话'}}</view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <view class="item-container" :class="[selftype?selftype:'']"> |
| | | <view class="title">我的收益</view> |
| | | <view class="flex tj-container" v-if="selftype==='partner'">. |
| | | <view class="tj-each"> |
| | | <view class="num total"> |
| | | ¥999.80 |
| | | </view> |
| | | </view> |
| | | <view class="tj-each" style="flex: 1;"> |
| | | <view class="num status"> |
| | | 待结算 |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="line"></view> |
| | | |
| | | <view class="flex tj-container" v-if="selftype==='supplier'"> |
| | | <view class="tj-each"> |
| | | <view class="num"> |
| | | 0扎 |
| | | </view> |
| | | <view class="name"> |
| | | 上月成交 |
| | | </view> |
| | | </view> |
| | | <view class="tj-each"> |
| | | <view class="num"> |
| | | 0扎 |
| | | </view> |
| | | <view class="name"> |
| | | 今日成交 |
| | | </view> |
| | | </view> |
| | | <view class="tj-each"> |
| | | <view class="num"> |
| | | 0扎 |
| | | </view> |
| | | <view class="name"> |
| | | 近30天成交 |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="flex tj-container"> |
| | | <view class="tj-each"> |
| | | <view class="num"> |
| | | 0扎 |
| | | </view> |
| | | <view class="name"> |
| | | 今日订单数 |
| | | </view> |
| | | </view> |
| | | <view class="tj-each"> |
| | | <view class="num"> |
| | | 0扎 |
| | | </view> |
| | | <view class="name"> |
| | | 昨日订单数 |
| | | </view> |
| | | </view> |
| | | <view class="tj-each"> |
| | | <view class="num"> |
| | | 0扎 |
| | | </view> |
| | | <view class="name"> |
| | | 本月订单数 |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="item-container flex m-t-12" style="padding: 34rpx 44rpx;"> |
| | | <view class="rate-view flex1" style="max-width: 140rpx;"> |
| | | <view class="title">售后率</view> |
| | | <view class="title" style="color: red;">0.02%</view> |
| | | </view> |
| | | <view class="tj-panel pink flex1"> |
| | | <view class="name">今日待配送</view> |
| | | <view class="title">12扎</view> |
| | | </view> |
| | | <view class="tj-panel green flex1"> |
| | | <view class="name green">今日配送汇总</view> |
| | | <view class="title">12扎</view> |
| | | </view> |
| | | </view> |
| | | <view class="m-t-12" @click="getNoticeMore"> |
| | | <uni-notice-bar class="notice-bar" color="#333" background-color="#fff" show-get-more show-icon |
| | | :scrollable="scrollable" :text="currentNotice.title" :key="currentNotice.id" /> |
| | | <span v-if="!currentNotice||!currentNotice.id"> </span> |
| | | </view> |
| | | <view class="item-container"> |
| | | <view class="title">常用功能</view> |
| | | <view class="flex order-icons m-t-12"> |
| | | <view class="nav row margin-tb" v-if="selftype==='partner'" |
| | | @click="goto('/sub_pages/partner/order-manage/order-manage',true)"> |
| | | <view class="img-c"> |
| | | <image class="icon margin-bottom order-icon ddgl" |
| | | src="/static/images/partner/user/user-icon-ddgl.png" mode="scaleToFill" /> |
| | | </view> |
| | | <view class="order-desc tg">订单管理</view> |
| | | </view> |
| | | |
| | | <view class="nav row margin-tb" |
| | | @click="goto('/sub_pages/supplier/order-settlement/order-settlement',true)"> |
| | | <view class="img-c"> |
| | | <image class="icon margin-bottom order-icon zdjs" |
| | | src="/static/images/supplier/user/user-icon-zdjs.png" mode="scaleToFill" /> |
| | | </view> |
| | | <view class="order-desc tg">账单结算</view> |
| | | </view> |
| | | <view class="nav row margin-tb" @click="toFlowManage" v-if="selftype==='supplier'"> |
| | | <view class="img-c"> |
| | | <image class="icon margin-bottom order-icon spgl" |
| | | src="/static/images/supplier/user/user-icon-spgl.png" mode="scaleToFill" /> |
| | | </view> |
| | | <view class="order-desc cqw">商品管理</view> |
| | | </view> |
| | | <view class="nav row margin-tb" v-if="selftype==='partner'" |
| | | @click="goto('/sub_pages/partner/markup-config/markup-config',true)"> |
| | | <view class="img-c"> |
| | | <image class="icon margin-bottom order-icon jjpz" |
| | | src="/static/images/partner/user/user-icon-jjpz.png" mode="scaleToFill" /> |
| | | </view> |
| | | <view class="order-desc tg">加价配置</view> |
| | | </view> |
| | | <view class="nav row margin-tb" @click="goto('/sub_pages/supplier/order-sale/order-sale',true)"> |
| | | <view class="img-c"> |
| | | <image class="icon margin-bottom order-icon shlp" |
| | | src="/static/images/supplier/user/user-icon-shlp.png" mode="scaleToFill" /> |
| | | </view> |
| | | <view class="order-desc syst">售后理赔</view> |
| | | </view> |
| | | <view class="nav row margin-tb" @click="goto('/sub_pages/supplier/order-records/order-records',true)"> |
| | | <view class="img-c"> |
| | | <image class="icon margin-bottom order-icon kkjl" |
| | | src="/static/images/supplier/user/user-icon-kkjl.png" mode="scaleToFill" /> |
| | | </view> |
| | | <view class="order-desc wbsp">扣款记录</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view style="padding-bottom:200rpx"> |
| | | </view> |
| | | <supplier-footer flg="0"></supplier-footer> |
| | | |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | CustomBar: uni.getStorageSync('CustomBar'), |
| | | StatusBar: uni.getStorageSync('StatusBar'), |
| | | tcode: '', |
| | | inviterName: '', |
| | | // StatusBar:0, |
| | | |
| | | //公告的 |
| | | noticeList: [], |
| | | currentNoticeIndex: 0, |
| | | currentNotice: { |
| | | |
| | | }, |
| | | scrollable: false, |
| | | |
| | | }; |
| | | }, |
| | | async onPullDownRefresh() { |
| | | await this.$store.dispatch('getCurrentInfo') |
| | | uni.stopPullDownRefresh() |
| | | }, |
| | | onLoad(options) { |
| | | const url = options.q ? decodeURIComponent(options.q) : ''; |
| | | const urlcode = options.url && decodeURIComponent(options.url) || '' |
| | | }, |
| | | created() { |
| | | //公告 |
| | | this.$http.request('get', '/api/announcement/page', { |
| | | params: { |
| | | size: 5, |
| | | status: 'A' |
| | | } |
| | | }).then(res => { |
| | | if (res.code == 0) { |
| | | this.noticeList = (res.data && res.data.records || []) |
| | | console.log('this.noticeList', this.noticeList) |
| | | if (this.noticeList.length > 0) { |
| | | this.currentNotice = this.noticeList[0] |
| | | if (this.currentNotice.title && this.currentNotice.title.length >= 30) { |
| | | this.scrollable = true |
| | | } else { |
| | | this.scrollable = false |
| | | } |
| | | let that = this |
| | | if (this.noticeList.length >= 1) { |
| | | setInterval(() => { |
| | | console.log('interval,1') |
| | | that.currentNoticeIndex += 1 |
| | | that.currentNoticeIndex %= that.noticeList.length |
| | | that.currentNotice = that.noticeList[that.currentNoticeIndex] |
| | | that.scrollable = false |
| | | that.$nextTick(() => { |
| | | if (that.currentNotice.title && that.currentNotice.title |
| | | .length >= 30) { |
| | | that.scrollable = true |
| | | } else { |
| | | that.scrollable = false |
| | | } |
| | | }) |
| | | |
| | | }, 8000) |
| | | } |
| | | |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | methods: { |
| | | async toFlowManage() { |
| | | if (!this.currentInfo.supplierDTO) { |
| | | await this.$message.confirm('尚未入住店铺信息,是否前往入住?') |
| | | this.goto('/sub_pages/supplier/supplier-info/supplier-info', true) |
| | | return |
| | | } |
| | | if (this.currentInfo.supplierDTO) { |
| | | if (this.currentInfo.supplierDTO.status == 'P') { |
| | | |
| | | } else { |
| | | if (this.currentInfo.supplierDTO.status == 'R') { |
| | | await this.$message.confirm('店铺信息审核不通过,是否前往修改信息?') |
| | | this.goto('/sub_pages/supplier/supplier-info/supplier-info', true) |
| | | return |
| | | } else { |
| | | this.$message.showToast('审核中请耐心等待') |
| | | return |
| | | } |
| | | |
| | | } |
| | | } |
| | | this.goto('/sub_pages/supplier/flower-manage/flower-manage', true) |
| | | }, |
| | | getNoticeMore() { |
| | | uni.navigateTo({ |
| | | url: '/pages/notice/list?id=' + this.currentNotice.id |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "../user/user.scss"; |
| | | |
| | | @import "./home.scss"; |
| | | </style> |
| | | |
| | | <style lang="scss" scoped> |
| | | </style> |
| | |
| | | .login-container{ |
| | | min-height: 99vh; |
| | | // background-image: url('@/static/images/farmer/login/bg.png'); |
| | | // background-image: url('@/static/images/supplier/login/bg.png'); |
| | | |
| | | .nav-title{ |
| | | font-weight: 400; |
文件名从 pages/login/farmer-login.vue 修改 |
| | |
| | | <template> |
| | | <view class="main-container login-container img100 relative" style="margin-top: 0rpx;"> |
| | | <!-- background-image:url('@/static/images/farmer/login/bg.png') --> |
| | | <!-- background-image:url('@/static/images/supplier/login/bg.png') --> |
| | | |
| | | <image class="component-bg" src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/a5/a54508de179a4942918ecb2c5a4aa9f5bg.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"> |
| | |
| | | <input type="text" :password="true" name="password" placeholder="请输入密码" v-model="password" /> |
| | | </view> |
| | | <view class="t-a input" v-if="loginType=='code'"> |
| | | |
| | | |
| | | <input type="text" name="userName" placeholder="请输入手机号" v-model="phoneNumber" /> |
| | | <view class="get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()"> |
| | | {{getCodeText}} |
| | | </view> |
| | | |
| | | <input type="text" name="userName" placeholder="请输入手机号" v-model="phoneNumber" /> |
| | | |
| | | </view> |
| | | |
| | | |
| | |
| | | // import gzmzApi from '@/api/gzmzApi.js' |
| | | // import myCache from '@/utils/myCache.js' |
| | | export default { |
| | | props: { |
| | | // apitype: 'loginSupplier', |
| | | apitype: { |
| | | type:String, |
| | | default(){ |
| | | return 'loginSupplier' |
| | | |
| | | // return 'loginPartner' |
| | | } |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | openId: '-1', |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | getCode() { |
| | | async getCode() { |
| | | uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。 |
| | | if (this.getCodeisWaiting) { |
| | | return; |
| | | } |
| | | if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) { //校验手机号码是否有误 |
| | | uni.showToast({ |
| | | title: '请填写正确手机号码', |
| | | icon: "none" |
| | | }); |
| | | this.$message.showToast('请填写正确手机号码') |
| | | return false; |
| | | } |
| | | this.getCodeText = "发送中..." //发送验证码 |
| | | this.getCodeisWaiting = true; |
| | | this.getCodeBtnColor = "rgba(255,255,255,0.5)" //追加样式,修改颜色 |
| | | this.getCodeBtnColor = "#000" //追加样式,修改颜色 |
| | | //示例用定时器模拟请求效果 |
| | | //setTimeout(()用于在指定的毫秒数后调用函数或计算表达式 |
| | | setTimeout(() => { |
| | | const { |
| | | code |
| | | } = await this.$http.request('post', '/api/sms/send/code', { |
| | | data: { |
| | | tel: this.phoneNumber, |
| | | userType: 'supplier' |
| | | } |
| | | }) |
| | | if (code == 0) { |
| | | uni.showToast({ |
| | | title: '验证码已发送', |
| | | icon: "none" |
| | | }); //弹出提示框 |
| | | //示例默认1234,生产中请删除这一句。 |
| | | // this.code = '1234'; //发送验证码,进行填入 |
| | | }); |
| | | this.setTimer(); //调用定时器方法 |
| | | }, 1000) |
| | | } |
| | | // setTimeout(() => { |
| | | // uni.showToast({ |
| | | // title: '验证码已发送', |
| | | // icon: "none" |
| | | // }); //弹出提示框 |
| | | // //示例默认1234,生产中请删除这一句。 |
| | | // // this.code = '1234'; //发送验证码,进行填入 |
| | | // this.setTimer(); //调用定时器方法 |
| | | // }, 1000) |
| | | }, |
| | | //setTimer: 需要每隔一段时间执行一件事的的时候就需要使用SetTimer函数 |
| | | setTimer() { |
| | |
| | | // url: '/pages/index/index' |
| | | // }) |
| | | uni.redirectTo({ |
| | | url: '/sub_pages/farmer/farmer-reg/farmer-reg' |
| | | url: '/sub_pages/supplier/supplier-reg/supplier-reg' |
| | | }) |
| | | |
| | | }, |
| | |
| | | title: '登陆中' |
| | | }); |
| | | var that = this; |
| | | if (this.loginType == 'pwd') { |
| | | if (!that.userName) { |
| | | uni.showToast({ |
| | | title: '请输入用户名', |
| | |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | if (this.loginType == 'code') { |
| | | if (!that.tel) { |
| | | uni.showToast({ |
| | | title: '请输入手机号', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | if (!that.smsCode) { |
| | | uni.showToast({ |
| | | title: '请输入手机验证码', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | // if (this.pcfvalue == undefined) { |
| | | // util.showMyToast('必须勾选《用户服务协议》及《隐私政策》'); |
| | | // return; |
| | |
| | | let post = { |
| | | username: this.userName, |
| | | password: this.password, |
| | | tel: this.phoneNumber, |
| | | smsCode: this.smsCode |
| | | // openId: '123456789' |
| | | } |
| | | // const { |
| | | // code |
| | | // } = await this.$http.request('get', '/api/login/admin') |
| | | const resp = await this.$store.dispatch('loginSupplier', post); |
| | | const resp = await this.$store.dispatch(this.apitype, post); |
| | | // uni.hideLoading() |
| | | |
| | | if (resp.code == 0) { |
| | |
| | | <view v-for="(item,index) in list" :key="index" class="m-b-24"> |
| | | <view @click.stop="toDetail(item)" class="notice-item"> |
| | | <view>{{item.title}}</view> |
| | | <view class="time">{{item.updatedDate}}</view> |
| | | <view class="time">{{item.publishDate}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
文件名从 pages/user/farmer-user.vue 修改 |
| | |
| | | </view> --> |
| | | <!-- 背景图 --> |
| | | <view class="top-bg img100 relative" :style="{'padding-top':(StatusBar)+'px','line-height':CustomBar+'rpx' }"> |
| | | <image class="component-bg" src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/21/21c95c14e9504be69edff7785e3b44a9bg.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;"> |
| | | 我的 |
| | |
| | | <image class="user-icon" v-if="currentInfo.picture" :src="currentInfo.picture" mode="aspectFit"></image> |
| | | |
| | | <view class="name"> |
| | | <view class="t1">{{currentInfo.nickName || '-'}}</view> |
| | | <view class="t1">{{currentInfo.nickName || currentInfo.loginName || '-'}}<span |
| | | v-if="currentInfo.supplierDTO&¤tInfo.supplierDTO.status!=='P'"> |
| | | ({{currentInfo.supplierDTO?currentInfo.supplierDTO.statusStr:''}})</span> |
| | | </view> |
| | | <view class="t2">{{currentInfo.tel || '暂无电话'}}</view> |
| | | </view> |
| | | <image class="icon-setting" src="../../static/common/icon-setting.png" mode="aspectFit"></image> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="user-utils m-20"> |
| | | <view class="user-util m-b-5 flex" @click="goto('/pages/user/user-info/user-info',true)"> |
| | | <view class="user-util m-t-12 flex" @click="goto('/pages/user/user-info/user-info',true)"> |
| | | <view class="title">个人信息</view> |
| | | <view class="right-icon"> |
| | | <uni-icons type="right"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="user-util m-t-12 flex" @click="goto('/sub_pages/farmer/farmer-info/farmer-info',true)"> |
| | | <view class="user-util m-t-12 flex" v-if="selftype==='supplier'" |
| | | @click="goto('/sub_pages/supplier/supplier-info/supplier-info',true)"> |
| | | <view class="title">店铺信息</view> |
| | | <view class="right-icon"> |
| | | <uni-icons type="right"></uni-icons> |
| | |
| | | <uni-icons type="right"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="user-util m-t-12 " @click="callTel"> |
| | | <view class="user-util m-t-12 " @click="callTel" v-if="selftype==='supplier'"> |
| | | <view class="title">我的客服</view> |
| | | <view class="flex"> |
| | | <image class="icon-clock m-r-6 m-t-2" src="../../static/common/icon-call.png"></image> |
| | | <view class="name"> |
| | | 客服电话: <span class="topic-gray">{{tel}}</span> |
| | | 客服电话 : <span class="topic-gray">{{tel}}</span> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="user-util m-t-12 " @click="callTel" v-if="selftype==='partner'"> |
| | | <view class="name"> |
| | | 账号: <span class="topic-gray">{{tel}}</span> |
| | | </view> |
| | | <view class="name"> |
| | | 密码: <span class="topic-gray">{{tel}}</span> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | |
| | | |
| | |
| | | |
| | | <view style="padding-bottom:200rpx"> |
| | | </view> |
| | | <farmer-footer flg="1"></farmer-footer> |
| | | <supplier-footer flg="1"></supplier-footer> |
| | | |
| | | |
| | | </view> |
| | |
| | | created() { |
| | | |
| | | }, |
| | | async onPullDownRefresh() { |
| | | await this.$store.dispatch('getCurrentInfo') |
| | | uni.stopPullDownRefresh() |
| | | }, |
| | | methods: { |
| | | |
| | | async clearlogout() { |
| | |
| | | this.$store.commit('updateLogin', false) |
| | | |
| | | uni.reLaunch({ |
| | | url: '/pages/login/farmer-login' |
| | | url: '/pages/login/supplier-login' |
| | | }) |
| | | }, |
| | | async callTel() { |
| | |
| | | .top-bg{ |
| | | |
| | | padding: 32rpx; |
| | | // background-image: url('../../static/images/farmer/user/bg.png'); |
| | | // background-image: url('../../static/images/supplier/user/bg.png'); |
| | | |
| | | height: 438rpx; |
| | | max-height: 438rpx; |
| | |
| | | // background: #FFFFFF; |
| | | border-radius: 16rpx; |
| | | // line-height: 116rpx; |
| | | position: relative; |
| | | .name{ |
| | | font-weight: 600; |
| | | font-size: 32rpx; |
| | |
| | | margin-right: 30rpx; |
| | | border-radius: 50%; |
| | | } |
| | | .icon-setting{ |
| | | position: absolute; |
| | | right: 0rpx; |
| | | top: -30rpx; |
| | | height: 54rpx; |
| | | width: 54rpx; |
| | | } |
| | | |
| | | } |
| | | .order-info{ |
| | |
| | | } |
| | | return resp |
| | | }, |
| | | loginSupplier: async function({ |
| | | regSupplier: async function({ |
| | | commit, |
| | | dispatch, |
| | | state |
| | | }, data) { |
| | | { |
| | | const resp = await http.request('post', '/api/login/supplier'+(data.phoneNumber?'/phone':''), { |
| | | const resp = await http.request('post', '/api/register/supplier', { |
| | | data: { |
| | | username: data.username, |
| | | password: data.password, |
| | | tel:data.phoneNumber, |
| | | tel: data.phoneNumber || data.tel, |
| | | smsCode: data.smsCode || '' |
| | | }, |
| | | params: { |
| | | clientType: data.clientType || 'app' |
| | | } |
| | | }) |
| | | console.log('resp', resp) |
| | | if (resp && resp.code == 0) { |
| | | |
| | | |
| | | } else { |
| | | |
| | | } |
| | | return resp |
| | | } |
| | | |
| | | }, |
| | | loginPartner: async function({ |
| | | commit, |
| | | dispatch, |
| | | state |
| | | }, data) { |
| | | { |
| | | const resp = await http.request('post', '/api/login/partner' + (data |
| | | .phoneNumber ? '/phone' : ''), { |
| | | data: { |
| | | username: data.username, |
| | | password: data.password, |
| | | tel: data.phoneNumber || data.tel, |
| | | smsCode:data.smsCode || '' |
| | | }, |
| | | params: { |
| | |
| | | // url: '/views/app/app-home/app-home' |
| | | // }) |
| | | uni.reLaunch({ |
| | | url: '/pages/home/farmer-home' |
| | | url: '/pages/home/supplier-home' |
| | | }) |
| | | } else { |
| | | // this.$message.showToast('登录失败') |
| | | |
| | | } |
| | | return resp |
| | | } |
| | | |
| | | }, |
| | | loginSupplier: async function({ |
| | | commit, |
| | | dispatch, |
| | | state |
| | | }, data) { |
| | | { |
| | | const resp = await http.request('post', '/api/login/supplier' + (data |
| | | .phoneNumber ? '/phone' : ''), { |
| | | data: { |
| | | username: data.username, |
| | | password: data.password, |
| | | tel: data.phoneNumber || data.tel, |
| | | smsCode: data.smsCode || '' |
| | | }, |
| | | params: { |
| | | clientType: data.clientType || 'app' |
| | | } |
| | | }) |
| | | console.log('resp', resp) |
| | | if (resp && resp.code == 0) { |
| | | // await getCurrentInfo() |
| | | // // this.$message.showToast('登录成功') |
| | | // console.log(resp) |
| | | storage.setItem('token', resp.data.access_token) |
| | | commit("updateLogin", true) |
| | | await dispatch('getCurrentInfo') |
| | | |
| | | console.log('login,reLaunch') |
| | | // #ifdef APP |
| | | var KeepAliveModule = uni.requireNativePlugin("yh-nl") //保活组件 |
| | | |
| | | KeepAliveModule && KeepAliveModule.startLocation({ |
| | | intervalTime: 5000, //定位间隔时间 |
| | | gaodeApiKey: "0eef1axxxxxx7964", //高德地图Key,已停用,引入插件配置 |
| | | locationMode: 1, //定位模式 |
| | | purpose: 0, //定位场景 |
| | | ifUpload: true, //是否上报服务器 |
| | | uploadUrl: "http://bio51-api.fixbug.fun/api/current/employee/location", //上报接口 |
| | | params: "{'lat':'1','lng':'3'}", //其他参数 |
| | | headers: "{'authorization1':'Bearer xOHeJhg'}", |
| | | }, function(res) { |
| | | console.log("启用结果:", res); |
| | | let ret = KeepAliveModule.getCurrentLocation(); |
| | | console.log("启用结果2:", ret); |
| | | }); |
| | | // #endif |
| | | // uni.redirectTo({ |
| | | // url: '/views/app/app-home/app-home' |
| | | // }) |
| | | uni.reLaunch({ |
| | | url: '/pages/home/supplier-home' |
| | | }) |
| | | } else { |
| | | // this.$message.showToast('登录失败') |
对比新文件 |
| | |
| | | <template> |
| | | <view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
copy from sub_pages/farmer/order-settlement/order-settlement.vue
copy to sub_pages/partner/order-manage/order-manage.vue
文件从 sub_pages/farmer/order-settlement/order-settlement.vue 复制 |
| | |
| | | <template> |
| | | <view class="list-container order-settlement farmer"> |
| | | <view class="list-container order-settlement supplier"> |
| | | <view class="component-tab-container m-t-12"> |
| | | <view class="tab-item" :class="[tabIndex==0?'cur':'']" @click="changeIndex(0)">本月</view> |
| | | <view class="tab-item" :class="[tabIndex==1?'cur':'']" @click="changeIndex(1)">全部</view> |
| | | <view class="tab-item" :class="[tabIndex==0?'cur':'']" @click="changeIndex(0)">带配送</view> |
| | | <view class="tab-item" :class="[tabIndex==1?'cur':'']" @click="changeIndex(1)">已配送</view> |
| | | </view> |
| | | |
| | | <view class="p15" style="min-height: calc(100vh - 160rpx);"> |
| | |
| | | <view v-for="(item,index) in list" :key="index" class="m-b-24 order-settlement-list list-container"> |
| | | <view class="order-settlement-item list-item"> |
| | | <view class="title flex"> |
| | | <image class="icon-date m-r-6 m-t-2" src="@/static/common/icon-date.png"></image> |
| | | <view>{{item.title}}</view> |
| | | <view> |
| | | 订单:27799880327543 |
| | | </view> |
| | | <view class="status m-l-a m-r-0">已结算</view> |
| | | </view> |
| | | <view class="line"></view> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="label">均价</view> |
| | | <view class="value">¥32.00</view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="label">买家</view> |
| | | <view class="value">1位</view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="label">数量</view> |
| | | <view class="value red">1扎</view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="label">商家赔付</view> |
| | | <view class="value red">1</view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="label">服务费</view> |
| | | <view class="value">¥32.00</view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="label">理赔</view> |
| | | <view class="value">¥32.00</view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="label">运费</view> |
| | | <view class="value">¥32.00</view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="line"></view> |
| | | <view class="flex"> |
| | | <view class="flex1 tj"> |
| | | <view class="label">交易合计:</view> |
| | | <view class="value">¥32.00</view> |
| | | </view> |
| | | <view class="flex1 tj text-right"> |
| | | <view class="label">结算金额:</view> |
| | | <view class="value">¥32.00</view> |
| | | </view> |
| | | </view> |
| | | <view class="button-green-1">确认配送完成</view> |
| | | </view> |
| | | </view> |
| | | </view> |
文件名从 sub_pages/farmer/flower-manage/flower-add.vue 修改 |
| | |
| | | <view> |
| | | <view class="form-item"> |
| | | <view class="label required">商品分类</view> |
| | | <view class="m-l-a m-r-0 flex " :class="[!dto.category?'desc-gray':'']" @click="()=>{ |
| | | <!-- <view class="m-l-a m-r-0 flex " :class="[!dto.category?'desc-gray':'']" @click="()=>{ |
| | | // show_select_category=true |
| | | $refs.picker_category.showPicker() |
| | | }"> |
| | | <view>{{dto.categoryStr||dto.category || '请选择'}}</view> |
| | | <u-icon class="m-l-a" name="arrow-right"></u-icon> |
| | | </view> --> |
| | | <view class="m-l-a m-r-0 flex " :class="[!dto['category']?'desc-gray':'']"> |
| | | <uni-data-picker @change="(e)=>{PickCategory(dto,e)}" placeholder="" @search="updateSearch" |
| | | :localdata="columns_categorys_picker"> |
| | | {{dto.categoryStr||dto.category || '请选择'}} |
| | | </uni-data-picker> |
| | | <u-icon class="m-l-a" name="arrow-right"></u-icon> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="form-item before-line"> |
| | | <view class="label required">商品名称</view> |
| | | <view class="m-l-a m-r-0 flex"> |
| | | <input v-model="dto.name" placeholder="请输入商品名称" style="margin-top: 16px;text-align: right;"></input> |
| | | <input v-model="dto.name" placeholder="请选择分类" disabled |
| | | style="margin-top: 16px;text-align: right;"></input> |
| | | |
| | | </view> |
| | | </view> |
| | | <view class="form-item before-line"> |
| | | <view class="label required">商品单位</view> |
| | | <view class="m-l-a m-r-0 flex"> |
| | | <input v-model="dto.unit" placeholder="请输入商品单位" style="margin-top: 16px;text-align: right;"></input> |
| | | <input v-model="dto.unit" placeholder="请选择分类" disabled |
| | | style="margin-top: 16px;text-align: right;"></input> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="form-item before-line"> |
| | | <view class="label required">商品颜色</view> |
| | | <!-- <view class="m-l-a m-r-0 flex " :class="[!dto.color?'desc-gray':'']" @click="()=>{ |
| | |
| | | <u-icon class="m-l-a" name="arrow-right"></u-icon> |
| | | </view> --> |
| | | <view class="m-l-a m-r-0 flex"> |
| | | <input v-model="dto.color" placeholder="请输入商品颜色" |
| | | <input v-model="dto.color" placeholder="请选择分类" disabled |
| | | style="margin-top: 16px;text-align: right;"></input> |
| | | </view> |
| | | </view> |
| | |
| | | id: '', |
| | | dto: { |
| | | id: '', |
| | | name: '', |
| | | category: '', |
| | | name: '', |
| | | unit: '', |
| | | color: '', |
| | | cover: '', |
| | |
| | | show_select_category: false, |
| | | show_select_level: false, |
| | | columns_categorys: [], |
| | | columns_categorys_picker: [], |
| | | columns_categorys_dict: {}, |
| | | columns_categorys_search: '', |
| | | columns_levels: [], |
| | | // columns_params: [], //弹窗选择具体的值 |
| | | // cancel: { |
| | |
| | | // ] |
| | | } |
| | | }, |
| | | |
| | | async onLoad(options) { |
| | | //tree |
| | | this.$http.request('get', '/api/flower/category/tree', {}).then(res => { |
| | | var data = res.data |
| | | this.columns_categorys = data || [] |
| | | console.log('columns_categorys', this.columns_categorys) |
| | | |
| | | // console.log('columns_categorys', this.columns_categorys) |
| | | //递归mao |
| | | this.mapCategoryTree(this.columns_categorys_picker, this.columns_categorys) |
| | | // console.log('columns_categorys_picker', this.columns_categorys_picker) |
| | | // this.columns_categorys = [data || []] |
| | | // this.columns_categorys[0].unshift({ |
| | | // label: '全部', |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | async updateSearch(search) { |
| | | this.columns_categorys_search = search || '' |
| | | this.columns_categorys_picker = [] |
| | | this.mapCategoryTree(this.columns_categorys_picker, this.columns_categorys) |
| | | console.log('change updateSearch', search, this.columns_categorys_picker) |
| | | }, |
| | | async PickCategory(item, e) { |
| | | console.log('PickCategory', item, e) |
| | | if (e.detail.value) { |
| | | if (this.dto.category) { |
| | | await this.$message.confirm('修改分类将清空商品参数,确定修改吗') |
| | | } { |
| | | var currentnode = this.columns_categorys_dict['@' + e.detail.value[e.detail.value.length - 1] |
| | | .value] |
| | | // console.log('currentnode',currentnode,this.columns_categorys_dict,'@'+e.detail.value[e.detail.value.length - 1].value) |
| | | this.dto.categoryStr = currentnode.name |
| | | this.dto.category = currentnode.id |
| | | this.dto.name = currentnode.name |
| | | this.dto.unit = currentnode.unit |
| | | this.dto.color = currentnode.color |
| | | //递归获取category的其他数据,用来做map? |
| | | this.$message.showLoading() |
| | | await this.refresh_category() |
| | | this.$message.hideLoading() |
| | | } |
| | | } |
| | | }, |
| | | mapCategoryTree(node, arr) { |
| | | var has = true |
| | | if (arr) { |
| | | var hasTrue = false |
| | | if(!this.columns_categorys_search){ |
| | | hasTrue = true |
| | | } |
| | | for (var item of arr) { |
| | | has = true |
| | | if (this.columns_categorys_search) { |
| | | has = false |
| | | } |
| | | var tmp = { |
| | | ...item, |
| | | name: item.name, |
| | | text: item.name, |
| | | label: item.name, |
| | | value: item.id, |
| | | children: undefined |
| | | } |
| | | if (item.name == this.columns_categorys_search) { |
| | | has = true |
| | | } |
| | | this.columns_categorys_dict['@' + item.id] = item |
| | | if (item.children && item.children.length > 0) { |
| | | tmp.children = [] |
| | | var childrenhas = this.mapCategoryTree(tmp.children, item.children) |
| | | if (childrenhas) { |
| | | has = true |
| | | hasTrue = true |
| | | } |
| | | } else { |
| | | tmp.children = undefined |
| | | } |
| | | if (hasTrue || has) { |
| | | console.log('has ',tmp) |
| | | node.push(tmp) |
| | | |
| | | } else { |
| | | console.log('not has ',tmp) |
| | | } |
| | | |
| | | } |
| | | } |
| | | return hasTrue |
| | | }, |
| | | async confirmPickerCategory(picker) { |
| | | console.log('confirmPickerCategory', picker) |
| | | var id = picker.value |
| | |
| | | } |
| | | this.dto.categoryStr = name |
| | | this.dto.category = id |
| | | // name: '', |
| | | // unit: '', |
| | | // color: '', |
| | | //递归获取category的其他数据,用来做map? |
| | | this.$message.showLoading() |
| | | await this.refresh_category() |
| | | this.$message.hideLoading() |
文件名从 sub_pages/farmer/flower-manage/flower-manage.vue 修改 |
| | |
| | | }, |
| | | toDetail(item) { |
| | | uni.navigateTo({ |
| | | url: '/sub_pages/farmer/flower-manage/flower-add?id=' + item.id |
| | | url: '/sub_pages/supplier/flower-manage/flower-add?id=' + item.id |
| | | }) |
| | | }, |
| | | toDetailAdd(item) { |
| | | uni.navigateTo({ |
| | | url: '/sub_pages/farmer/flower-manage/flower-add?copyId=' + item.id |
| | | url: '/sub_pages/supplier/flower-manage/flower-add?copyId=' + item.id |
| | | }) |
| | | }, |
| | | clickButton(type) { |
| | | if (type == 'add') { |
| | | //添加页面 |
| | | uni.navigateTo({ |
| | | url: '/sub_pages/farmer/flower-manage/flower-add' |
| | | url: '/sub_pages/supplier/flower-manage/flower-add' |
| | | }) |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: '/sub_pages/farmer/flower-manage/flower-manage?type=' + type |
| | | url: '/sub_pages/supplier/flower-manage/flower-manage?type=' + type |
| | | }) |
| | | } |
| | | }, |
| | |
| | | } |
| | | |
| | | .button-add { |
| | | background-image: url('@/static/images/farmer/flower/flower-mange-icon-add-flower.png'); |
| | | background-image: url('@/static/images/supplier/flower/flower-mange-icon-add-flower.png'); |
| | | |
| | | } |
| | | |
| | | .button-search-in { |
| | | background-image: url('@/static/images/farmer/flower/flower-mange-icon-flower-in.png'); |
| | | background-image: url('@/static/images/supplier/flower/flower-mange-icon-flower-in.png'); |
| | | |
| | | } |
| | | |
| | | .button-search-unpass { |
| | | background-image: url('@/static/images/farmer/flower/flower-mange-icon-flower-unpass.png'); |
| | | background-image: url('@/static/images/supplier/flower/flower-mange-icon-flower-unpass.png'); |
| | | |
| | | } |
| | | |
| | | .button-search-inpass { |
| | | background-image: url('@/static/images/farmer/flower/flower-mange-icon-flower-inpass.png'); |
| | | background-image: url('@/static/images/supplier/flower/flower-mange-icon-flower-inpass.png'); |
| | | |
| | | } |
| | | |
| | | .button-search-delete { |
| | | background-image: url('@/static/images/farmer/flower/flower-mange-icon-flower-delete.png'); |
| | | background-image: url('@/static/images/supplier/flower/flower-mange-icon-flower-delete.png'); |
| | | |
| | | } |
| | | } |
文件名从 sub_pages/farmer/order-sale/order-sale.vue 修改 |
| | |
| | | <template> |
| | | <view class="list-container order-sale farmer"> |
| | | <view class="list-container order-sale supplier"> |
| | | <view class="component-tab-container m-t-12"> |
| | | <view class="tab-item" :class="[tabIndex==0?'cur':'']" @click="changeIndex(0)">本月</view> |
| | | <view class="tab-item" :class="[tabIndex==1?'cur':'']" @click="changeIndex(1)">全部</view> |
文件名从 sub_pages/farmer/order-settlement/order-settlement.vue 修改 |
| | |
| | | <template> |
| | | <view class="list-container order-settlement farmer"> |
| | | <view class="list-container order-settlement supplier"> |
| | | <view class="component-tab-container m-t-12"> |
| | | <view class="tab-item" :class="[tabIndex==0?'cur':'']" @click="changeIndex(0)">本月</view> |
| | | <view class="tab-item" :class="[tabIndex==1?'cur':'']" @click="changeIndex(1)">全部</view> |
对比新文件 |
| | |
| | | <template> |
| | | <view> |
| | | 入住协议todo |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | |
| | | </style> |
文件名从 sub_pages/farmer/farmer-info/farmer-info.vue 修改 |
| | |
| | | |
| | | methods: { |
| | | PickArea(item, e) { |
| | | // console.log('PickArea', item, e) |
| | | console.log('PickArea', item, e) |
| | | if (e.detail.value) { |
| | | this.dto.province = '' |
| | | this.dto.city = '' |
| | | this.dto.region = '' |
| | | if(e.detail.value.length<=3){ |
| | | if (!!e.detail.value[0]) |
| | | this.dto.province = e.detail.value[0].value |
| | | if (!!e.detail.value[1]) |
| | | this.dto.city = e.detail.value[1].value |
| | | if (!!e.detail.value[2]) |
| | | this.dto.region = e.detail.value[2].value |
| | | }else{ |
| | | //说明有重复的 |
| | | var plusnum = e.detail.value.length - 3 |
| | | if (!!e.detail.value[plusnum+0]) |
| | | this.dto.province = e.detail.value[plusnum+0].value |
| | | if (!!e.detail.value[plusnum+1]) |
| | | this.dto.city = e.detail.value[plusnum+1].value |
| | | if (!!e.detail.value[plusnum+2]) |
| | | this.dto.region = e.detail.value[plusnum+2].value |
| | | } |
| | | |
| | | this.$forceUpdate() |
| | | |
| | | } |
| | |
| | | // console.log('area', JSON.parse(res.data)) |
| | | this.regionDataPlus = res.data && JSON.parse(res.data.replaceAll('code', 'value').replaceAll('name', |
| | | 'text')) || [] |
| | | |
| | | console.log('area', this.regionDataPlus) |
| | | |
| | | |
| | | }, |
| | |
| | | this.dto.idCards = JSON.parse(this.dto.idCards) |
| | | } |
| | | |
| | | // if (this.dto.idCards.length > 0) { |
| | | // this.dto.idcardType = '身份证' |
| | | // } |
| | | if (this.dto.idcardType == '1') { |
| | | this.dto.idcardType = '身份证' |
| | | } |
| | | this.dto.userId = this.currentInfo.id |
| | | |
| | | } |
| | |
| | | }else if(typeof this.dto.idCards == 'string'){ |
| | | this.dto.idCards = JSON.parse(this.dto.idCards) |
| | | } |
| | | if (this.dto.idCards.length > 0) { |
| | | if (this.dto.idcardType == '1') { |
| | | this.dto.idcardType = '身份证' |
| | | } |
| | | } |
| | |
| | | |
| | | var dto = { |
| | | ...this.dto, |
| | | idcardType: this.dto.idcardType === '身份证' ? "1" : '2' |
| | | } |
| | | this.$message.showLoading() |
| | | const re = await this.$http.request('post', '/api/supplier/addOrUpdate', { |
| | |
| | | this.$message.showToast('操作成功') |
| | | //需要标记加一下 |
| | | this.$store.dispatch('sign_add', 'application'); |
| | | this.$store.dispatch('getCurrentInfo') |
| | | |
| | | this.backpage() |
| | | } |
文件名从 sub_pages/farmer/farmer-reg/farmer-reg.vue 修改 |
| | |
| | | <template> |
| | | <view class="main-container login-container img100 relative" style="margin-top: 0rpx;"> |
| | | <image class="component-bg" src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/a5/a54508de179a4942918ecb2c5a4aa9f5bg.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"> |
| | |
| | | <form class="cl"> |
| | | <view class="t-a titles-top"> |
| | | <view class="title-1">HELLO</view> |
| | | <view class="title-2">欢迎注册<span class="title-3">花满芜</span></view> |
| | | <view class="title-2">欢迎入住<span class="title-3">花满芜</span></view> |
| | | </view> |
| | | |
| | | |
| | | <view class="t-a input" v-if="loginType=='code'"> |
| | | |
| | | |
| | | <input type="text" name="userName" placeholder="请输入手机号" v-model="phoneNumber" /> |
| | | <view class="get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()"> |
| | | {{getCodeText}} |
| | | </view> |
| | | |
| | | <input type="text" name="userName" placeholder="请输入手机号" v-model="phoneNumber" /> |
| | | |
| | | </view> |
| | | |
| | | |
| | |
| | | |
| | | <view class="flex"> |
| | | <view class="topic-font m-l-a m-r-0" @click="toLogin">前往登录</view> |
| | | </view> |
| | | <view class="flex flex-wrap-normal" style="position: fixed;bottom: 40rpx;left: 40rpx;right: 40rpx;"> |
| | | <view :style="{'margin-top': '8rpx','margin-right': '12rpx','font-size':'24rpx'}" |
| | | @click="protocal=!protocal" |
| | | class="component-radio" :class="[protocal?'cur':'']"> |
| | | |
| | | </view> |
| | | <view class="topic-gray" @click="toProtocol">请仔细阅读《花满芜合伙人供应商入口小程序隐私保护指引》如您同意该指引,请勾选开始使用本小程序</view> |
| | | </view> |
| | | </form> |
| | | </view> |
| | |
| | | getCodeText: '获取验证码', |
| | | getCodeBtnColor: "#20613D", |
| | | getCodeisWaiting: false, |
| | | Timer: undefined |
| | | Timer: undefined, |
| | | protocal:false |
| | | }; |
| | | }, |
| | | methods: { |
| | | getCode() { |
| | | toProtocol(){ |
| | | uni.navigateTo({ |
| | | url:'/sub_pages/supplier/protocol' |
| | | }) |
| | | }, |
| | | async getCode() { |
| | | uni.hideKeyboard() //隐藏已经显示的软键盘,如果软键盘没有显示则不做任何操作。 |
| | | if (this.getCodeisWaiting) { |
| | | return; |
| | |
| | | } |
| | | this.getCodeText = "发送中..." //发送验证码 |
| | | this.getCodeisWaiting = true; |
| | | this.getCodeBtnColor = "rgba(255,255,255,0.5)" //追加样式,修改颜色 |
| | | this.getCodeBtnColor = "#000" //追加样式,修改颜色 |
| | | //示例用定时器模拟请求效果 |
| | | //setTimeout(()用于在指定的毫秒数后调用函数或计算表达式 |
| | | setTimeout(() => { |
| | | const { |
| | | code |
| | | } = await this.$http.request('post', '/api/sms/send/code', { |
| | | data: { |
| | | tel: this.phoneNumber, |
| | | userType: 'supplier' |
| | | } |
| | | }) |
| | | if (code == 0) { |
| | | uni.showToast({ |
| | | title: '验证码已发送', |
| | | icon: "none" |
| | | }); //弹出提示框 |
| | | //示例默认1234,生产中请删除这一句。 |
| | | // this.code = '1234'; //发送验证码,进行填入 |
| | | }); |
| | | this.setTimer(); //调用定时器方法 |
| | | }, 1000) |
| | | } |
| | | // setTimeout(() => { |
| | | // //弹出提示框 |
| | | // //示例默认1234,生产中请删除这一句。 |
| | | // // this.code = '1234'; //发送验证码,进行填入 |
| | | |
| | | // }, 1000) |
| | | }, |
| | | //setTimer: 需要每隔一段时间执行一件事的的时候就需要使用SetTimer函数 |
| | | setTimer() { |
| | |
| | | }, |
| | | toLogin() { |
| | | uni.redirectTo({ |
| | | url: '/pages/login/farmer-login' |
| | | url: '/pages/login/supplier-login' |
| | | }) |
| | | |
| | | }, |
| | |
| | | title: '登陆中' |
| | | }); |
| | | var that = this; |
| | | if (!that.userName) { |
| | | if (!that.phoneNumber) { |
| | | uni.showToast({ |
| | | title: '请输入用户名', |
| | | title: '请输入手机号', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | if (!that.smsCode) { |
| | | uni.showToast({ |
| | | title: '请输入手机验证码', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | |
| | | // return; |
| | | // } |
| | | let post = { |
| | | username: this.userName, |
| | | tel: this.phoneNumber, |
| | | smsCode: this.smsCode, |
| | | password: this.password, |
| | | // openId: '123456789' |
| | | } |
| | | // const { |
| | | // code |
| | | // } = await this.$http.request('get', '/api/login/admin') |
| | | const resp = await this.$store.dispatch('loginSupplier', post); |
| | | const resp = await this.$store.dispatch('regSupplier', post); |
| | | // uni.hideLoading() |
| | | |
| | | if (resp.code == 0) { |
| | |
| | | // if (userRes.status) { |
| | | // myCache.cache("userInfo", JSON.stringify(userRes.data)) |
| | | // } |
| | | // setTimeout(() => { |
| | | // uni.navigateBack(); |
| | | // }, 1000); |
| | | uni.showToast({ |
| | | title: '注册成功!', |
| | | icon: 'none' |
| | | }); |
| | | setTimeout(() => { |
| | | this.toLogin() |
| | | }, 1000); |
| | | |
| | | } else { |
| | | uni.showToast({ |
| | |
| | | <view class="dialog-close-plus dialog-close-rotate" data-id="close"></view> |
| | | </view> |
| | | </view> |
| | | <view v-if="false" |
| | | style="margin-left:40rpx;margin-right:40rpx;; border-bottom:1px solid #eee;padding-bottom:20rpx;display:flex"> |
| | | <input v-model="search" style="height:60rpx;line-height:60rpx;color:#000" placeholder="请输入搜索内容"></input> |
| | | <button @click="()=>{search='';updateSearch()}" |
| | | style="height:60rpx;line-height:60rpx;margin-left:auto;margin-right:0rpx">清空</button> |
| | | <button @click="updateSearch" |
| | | style="height:60rpx;line-height:60rpx;margin-left:auto;margin-right:0rpx">搜索</button> |
| | | </view> |
| | | <data-picker-view class="picker-view" ref="pickerView" v-model="dataValue" :localdata="localdata" |
| | | :preload="preload" :collection="collection" :field="field" :orderby="orderby" :where="where" |
| | | :step-searh="stepSearh" :self-field="selfField" :parent-field="parentField" :managed-mode="true" :map="map" |
| | | :ellipsis="ellipsis" @change="onchange" @datachange="ondatachange" @nodeclick="onnodeclick"> |
| | | :key="showpicker" |
| | | :step-searh="stepSearh" :self-field="selfField" :parent-field="parentField" :managed-mode="true" |
| | | :map="map" :ellipsis="ellipsis" @change="onchange" @datachange="ondatachange" @nodeclick="onnodeclick"> |
| | | </data-picker-view> |
| | | </view> |
| | | </view> |
| | |
| | | data() { |
| | | return { |
| | | isOpened: false, |
| | | inputSelected: [] |
| | | inputSelected: [], |
| | | search: '', |
| | | showpicker:(new Date().getTime()), |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | watch: { |
| | | localdata: { |
| | | handler() { |
| | | console.log('localdata update') |
| | | this.load() |
| | | }, |
| | | deep: true |
| | | }, |
| | | // search() { |
| | | // handler() {}, |
| | | // } |
| | | }, |
| | | methods: { |
| | | async updateSearch() { |
| | | //todo 递归搜索下面的数据,,并标记为可展示的 |
| | | console.log('updateSearch',this.localdata) |
| | | await this.$emit('search',this.search) |
| | | // console.log('updateSearch',this.localdata) |
| | | setTimeout(() => { |
| | | console.log('updateSearch2',this.localdata) |
| | | this.showpicker = new Date().getTime() |
| | | // this.load() |
| | | this.$refs.pickerView.updateData({ |
| | | treeData: this.localdata, |
| | | selected: [], |
| | | selectedIndex: this.selectedIndex |
| | | }) |
| | | }, 200) |
| | | // this.$nextTick(()=>{ |
| | | // // this.showpicker = true |
| | | // this.showpicker = new Date().getTime() |
| | | // this._treeData = []; |
| | | // this.selectedIndex = 0; |
| | | |
| | | // this.load(); |
| | | // }) |
| | | }, |
| | | clear() { |
| | | this._dispatchEvent([]); |
| | | }, |