xuxy
2024-06-26 563a0f248d37b8820cdb3e46479d7c8c891b3386
update 子包
已修改7个文件
已重命名6个文件
已添加2个文件
1067 ■■■■ 文件已修改
common/global.scss 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/farmer-home.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/farmer-login.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/login.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/user/farmer-user.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/user/user-info/user-info.vue 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/user/user-pwd/user-pwd.vue 234 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/farmer/farmer-info/farmer-info.vue 163 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/farmer/farmer-reg/farmer-reg.vue 358 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/farmer/flower-manage/flower-add.vue 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/farmer/flower-manage/flower-manage.vue 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/farmer/order-records/order-records.vue 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/farmer/order-sale/order-sale.vue 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/farmer/order-settlement/order-settlement.vue 补丁 | 查看 | 原始文档 | blame | 历史
common/global.scss
@@ -54,7 +54,14 @@
        color: #696969;
    }
}
.component-line-vert{
    width: 2rpx;
    background-color: #EEEEEE;
}
.component-popup_input.white{
    background: #fff;
}
.component-popup_input{
    margin: 0 auto;
    margin-top: calc(50% + 200rpx);
@@ -66,6 +73,14 @@
    border-radius: 16rpx;
    padding: 26rpx;
    position: relative;
    .title{
        font-weight: 400;
        font-size: 28rpx;
        color: #333333;
        line-height: 42rpx;
        text-align: center;
        margin-bottom: 32rpx;
    }
    .uni-easyinput{
        width: auto !important;
    }
pages.json
@@ -49,66 +49,85 @@
        },
        {
            "path": "pages/login/farmer-reg",
            "path": "pages/notice/notice",
            "style": {
                "navigationBarTitleText": "申请入住",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/farmer/order-settlement/order-settlement",
            "style": {
                "navigationBarTitleText": "账单结算",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/farmer/flower-manage/flower-manage",
            "style": {
                "navigationBarTitleText": "商品管理",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/farmer/order-sale/order-sale",
            "style": {
                "navigationBarTitleText": "售后理赔",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/farmer/order-records/order-records",
            "style": {
                "navigationBarTitleText": "扣款记录",
                "enablePullDownRefresh": false,
                "navigationBarBackgroundColor": "#E6F2EB"
            }
        },
        {
            "path": "pages/farmer/flower-manage/flower-add",
            "style": {
                "navigationBarTitleText": "",
                "navigationBarTitleText": "通知公告",
                "enablePullDownRefresh": false
            }
        },
        {
            "path" : "pages/notice/notice",
            "style" :
            {
                "navigationBarTitleText" : "通知公告",
                "enablePullDownRefresh" : false
            "path": "pages/notice/list",
            "style": {
                "navigationBarTitleText": "通知公告",
                "enablePullDownRefresh": true
            }
        },
        {
            "path" : "pages/notice/list",
            "path" : "pages/user/user-pwd/user-pwd",
            "style" : 
            {
                "navigationBarTitleText" : "通知公告",
                "enablePullDownRefresh" : true
                "navigationBarTitleText" : "修改密码",
                "enablePullDownRefresh" : false
            }
        }
    ],
    "subPackages": [{
        "root": "sub_pages/farmer",
        "pages": [{
                "path": "farmer-info/farmer-info",
                "style": {
                    "navigationBarTitleText": "信息维护",
                    "enablePullDownRefresh": false
                }
            }, {
                "path": "order-settlement/order-settlement",
                "style": {
                    "navigationBarTitleText": "账单结算",
                    "enablePullDownRefresh": true
                }
            },
            {
                "path": "flower-manage/flower-manage",
                "style": {
                    "navigationBarTitleText": "商品管理",
                    "enablePullDownRefresh": true
                }
            },
            {
                "path": "order-sale/order-sale",
                "style": {
                    "navigationBarTitleText": "售后理赔",
                    "enablePullDownRefresh": true
                }
            },
            {
                "path": "order-records/order-records",
                "style": {
                    "navigationBarTitleText": "扣款记录",
                    "enablePullDownRefresh": false,
                    "navigationBarBackgroundColor": "#E6F2EB"
                }
            },
            {
                "path": "flower-manage/flower-add",
                "style": {
                    "navigationBarTitleText": "",
                    "enablePullDownRefresh": false
                }
            },
            {
                "path": "farmer-reg/farmer-reg",
                "style": {
                    "navigationBarTitleText": "申请入住",
                    "navigationStyle": "custom"
                }
            }
        ]
    }],
    "globalStyle": {
        "navigationBarTextStyle": "black",
        "navigationBarTitleText": "uni-app",
pages/home/farmer-home.vue
@@ -101,28 +101,28 @@
        <view class="item-container">
            <view class="title">常用功能</view>
            <view class="flex order-icons m-t-12">
                <view class="nav row margin-tb" @click="goto('/pages/farmer/order-settlement/order-settlement',true)">
                <view class="nav row margin-tb" @click="goto('/sub_pages/farmer/order-settlement/order-settlement',true)">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon zdjs"
                            src="/static/images/farmer/user/user-icon-kkjl.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc tg">账单结算</view>
                </view>
                <view class="nav row margin-tb" @click="goto('/pages/farmer/flower-manage/flower-manage',true)">
                <view class="nav row margin-tb" @click="goto('/sub_pages/farmer/flower-manage/flower-manage',true)">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon spgl"
                            src="/static/images/farmer/user/user-icon-spgl.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc cqw">商品管理</view>
                </view>
                <view class="nav row margin-tb" @click="goto('/pages/farmer/order-sale/order-sale',true)">
                <view class="nav row margin-tb" @click="goto('/sub_pages/farmer/order-sale/order-sale',true)">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon shlp"
                            src="/static/images/farmer/user/user-icon-shlp.png" mode="scaleToFill" />
                    </view>
                    <view class="order-desc syst">售后理赔</view>
                </view>
                <view class="nav row margin-tb" @click="goto('/pages/farmer/order-records/order-records',true)">
                <view class="nav row margin-tb" @click="goto('/sub_pages/farmer/order-records/order-records',true)">
                    <view class="img-c">
                        <image class="icon margin-bottom order-icon kkjl"
                            src="/static/images/farmer/user/user-icon-kkjl.png" mode="scaleToFill" />
pages/login/farmer-login.vue
@@ -117,8 +117,8 @@
                // uni.switchTab({
                //     url: '/pages/index/index'
                // })
                uni.navigateTo({
                    url: '/pages/login/farmer-reg'
                uni.redirectTo({
                    url: '/sub_pages/farmer/farmer-reg/farmer-reg'
                })
            },
pages/login/login.scss
@@ -1,6 +1,6 @@
.login-container{
    min-height: 99vh;
        background-image: url('../../static/images/farmer/login/bg.png');
        background-image: url('@/static/images/farmer/login/bg.png');
        .nav-title{
            font-weight: 400;
            font-size: 32rpx;
pages/user/farmer-user.vue
@@ -24,12 +24,30 @@
        </view>
        <view class="user-utils m-20">
            <view class="user-util">
            <view class="user-util m-b-5 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="title">店铺信息</view>
                <view class="right-icon">
                    <uni-icons type="right"></uni-icons>
                </view>
            </view>
            <view class="user-util m-t-12 flex" @click="goto('/pages/user/user-pwd/user-pwd',true)">
                <view class="title">修改密码</view>
                <view class="right-icon">
                    <uni-icons type="right"></uni-icons>
                </view>
            </view>
            <view class="user-util m-t-12 " @click="callTel">
                <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">1386785374</span>
                        客服电话: <span class="topic-gray">{{tel}}</span>
                    </view>
                </view>
            </view>
@@ -57,7 +75,7 @@
                tcode: '',
                inviterName: '',
                // StatusBar:0,
                tel:'1386785374'
            };
        },
 
@@ -78,7 +96,12 @@
                    url: '/pages/login/farmer-login'
                })
            },
            async callTel(){
                await this.$message.confirm('是否拨打客服电话')
                uni.makePhoneCall({
                    phoneNumber: this.tel //仅为示例
                });
            }
    
        }
pages/user/user-info/user-info.vue
@@ -16,12 +16,12 @@
                </view>
            </view>
            <view class="form-item">
                <view class="label">姓名</view>
                <view class="label">昵称</view>
                <view class="m-l-a m-r-0 flex text-right">
                    <!-- {{dto.nickName || '-'}} -->
                    <input v-model="dto.nickName" type="nickname" placeholder="请输入昵称"  @blur="bindblur"  @input="bindinput"
                        style="margin-top: 16px;text-align: right;"></input>
                    <input v-model="dto.nickName" type="nickname" placeholder="请输入昵称" @blur="bindblur"
                        @input="bindinput" style="margin-top: 16px;text-align: right;"></input>
                </view>
            </view>
@@ -51,49 +51,6 @@
                </view>
            </view>
            <!--             <view class="form-item">
                <view class="label">用户名</view>
                <view class="m-l-a m-r-0 flex">
                    <input v-model="dto.birthday" placeholder="请输入用户名" style="margin-top: 16px;text-align: right;"></input>
                </view>
            </view> -->
            <!-- #ifndef MP -->
            <view class="form-item">
                <view class="label">部门</view>
                <view class="m-l-a m-r-0 flex desc-gray">
                    <input v-model="dto.departmentName" disabled style="margin-top: 16px;text-align: right;"></input>
                </view>
            </view>
            <view class="form-item">
                <view class="label">邮箱</view>
                <view class="m-l-a m-r-0 flex desc-gray">
                    <input v-model="dto.email" disabled style="margin-top: 16px;text-align: right;"></input>
                </view>
            </view>
            <view class="form-item">
                <view class="label">性别</view>
                <view class="m-l-a m-r-0 flex desc-gray">
                    <input v-model="dto.genderStr" disabled style="margin-top: 16px;text-align: right;"></input>
                </view>
            </view>
            <view class="form-item">
                <view class="label">工号</view>
                <view class="m-l-a m-r-0 flex desc-gray">
                    <input v-model="dto.workNo" disabled style="margin-top: 16px;text-align: right;"></input>
                </view>
            </view>
            <view class="form-item">
                <view class="label">岗位</view>
                <view class="m-l-a m-r-0 flex desc-gray">
                    <input v-model="dto.positionName" disabled style="margin-top: 16px;text-align: right;"></input>
                </view>
            </view>
            <!-- #endif -->
        </view>
        <view class="button-green-1 m-t-20 button-fixed-bottom" @click="update">
@@ -118,27 +75,9 @@
        },
        async mounted() {
            // await this.$store.dispatch('getCurrentInfo');
            // #ifdef MP
            this.dto = {
                ...this.currentInfo,
            }
            // #endif
            // #ifndef MP
            this.$message.showLoading()
            const {
                data
            } = await this.$http.request('get', '/api/personnel/employee/get/' + this.currentInfo.id)
            console.log('data', data)
            this.$message.hideLoading()
            this.dto = {
                // address:this.currentInfo.customerInfo.address||'',
                // email:this.currentInfo.customerInfo.email||'',
                ...this.currentInfo,
                ...data
            }
            // #endif
        },
        methods: {
            bindblur(e) {
@@ -155,12 +94,13 @@
                }
                // "/api/current/user/update"
                this.$message.showLoading()
                if(this.dto.picture&&this.dto.picture.indexOf('http://tmp/')>=0){
                if (this.dto.picture && this.dto.picture.indexOf('http://tmp/') >= 0) {
                    //上传
                    const res = await this.$http.upload(this.dto.picture)
                    var picture = res.data && res.data.length > 0 && res.data[0].url || ''
                    this.dto.picture = picture
                }
                // #ifdef MP
                const {
                    code
@@ -191,12 +131,14 @@
                // // #endif
                this.$message.hideLoading()
                // #ifdef MP
                if (code == 0) {
                    this.$message.showToast('更新成功')
                    // this.$store.commit('updateInfo',this.dto)
                    // }
                    await this.$store.dispatch('getCurrentInfo');
                }
                // #endif
            },
@@ -365,7 +307,7 @@
        border: 1px solid #fff;
        // border-radius: 200%;
        color: #fff;
        &::after {
            border: none;
        }
pages/user/user-pwd/user-pwd.vue
对比新文件
@@ -0,0 +1,234 @@
<template>
    <view class="wrap bg-app-white hidebar" style="min-height: calc(100vh - 150rpx);">
        <u-form :model="model" :rules="rules" ref="uForm">
            <!--         <u-form-item :label-position="labelPosition" label="原始密码" label-width="150" prop="oldpassword">
                <u-input :border="border" type="password" v-model="model.oldpassword" placeholder="请确认密码"></u-input>
            </u-form-item> -->
<!--             <u-form-item :label-position="labelPosition" label="旧密码" prop="oldpassword" label-width="150">
                <u-input :password-icon="true" :border="border" type="password" v-model="model.oldpassword"
                    placeholder="请输入旧密码"></u-input>
            </u-form-item>
            <u-divider></u-divider> -->
            <u-form-item :label-position="labelPosition" label="新密码" prop="password" label-width="150">
                <u-input :password-icon="true" :border="border" type="password" v-model="model.password"
                    placeholder="请输入新密码"></u-input>
            </u-form-item>
            <u-divider></u-divider>
            <u-form-item :label-position="labelPosition" label="确认密码" label-width="150" prop="rePassword">
                <u-input :border="border" type="password" v-model="model.rePassword" placeholder="请确认密码"></u-input>
            </u-form-item>
        </u-form>
        <!-- <u-button @click="submit">提交</u-button> -->
        <view class="button-green-1 m-t-20 button-fixed-bottom" @click="submit">
            保存
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            let that = this;
            return {
                labelPosition: 'left',
                model: {
                    oldpassword: '',
                    password: '',
                    rePassword: ''
                },
                rules: {
                    // oldpassword: [
                    //     {
                    //         required: true,
                    //         message: '请输入密码',
                    //         trigger: ['change', 'blur']
                    //     },
                    //     // {
                    //     //     // 正则不能含有两边的引号
                    //     //     pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]+\S{5,12}$/,
                    //     //     message: '需同时含有字母和数字,长度在6-12之间',
                    //     //     trigger: ['change', 'blur']
                    //     // }
                    // ],
                    oldpassword: [{
                            required: true,
                            message: '请输入旧密码',
                            trigger: ['change', 'blur']
                        }
                    ],
                    password: [{
                            required: true,
                            message: '请输入密码',
                            trigger: ['change', 'blur']
                        }
                    ],
                    rePassword: [{
                            required: true,
                            message: '请重新输入密码',
                            trigger: ['change', 'blur']
                        },
                        {
                            validator: (rule, value, callback) => {
                                return value === this.model.password;
                            },
                            message: '两次输入的密码不相等',
                            trigger: ['change', 'blur']
                        }
                    ]
                },
                border: false,
                check: false,
                selectStatus: 'close',
                errorType: ['message']
            };
        },
        onLoad() {},
        computed: {
            borderCurrent() {
                return this.border ? 0 : 1;
            }
        },
        onReady() {
            this.$refs.uForm.setRules(this.rules);
        },
        methods: {
            back() {
                uni.navigateBack({
                    animationDuration: 500,
                })
            },
            submit() {
                if (!this.model.password) {
                    this.$message.showToast('密码未填写');
                    return
                }
                if (this.model.rePassword === this.model.password) {
                    this.updatePwd();
                } else {
                    this.$message.showToast('两次密码不一样');
                    return
                }
                // this.$refs.uForm.validate(valid => {
                //     if (valid) {
                //         // if(!this.model.agreement) return this.$u.toast('请勾选协议');
                //         // console.log('验证通过');
                //         this.updatePwd();
                //     } else {
                //         // console.log('验证失败');
                //     }
                // });
            },
            async updatePwd() {
                const resp = await this.$http.request('post', '/api/current/user/password/change', {
                    data: {
                        // password: this.model.oldpassword,
                        // newpassword: this.model.password
                        oldPassword: this.model.oldPassword,
                        password: this.model.password
                    }
                });
                if (resp && resp.code == 0) {
                    this.model.password = ''
                    this.model.rePassword = ''
                    this.model.oldPassword = ''
                    this.$message.showToast('修改成功');
                }
            },
            // 点击actionSheet回调
            actionSheetCallback(index) {
                uni.hideKeyboard();
                this.model.sex = this.actionSheetList[index].text;
            },
            // checkbox选择发生变化
            checkboxGroupChange(e) {
                this.model.likeFruit = e;
            },
            // radio选择发生变化
            radioGroupChange(e) {
                this.model.payType = e;
            },
            // 勾选版权协议
            checkboxChange(e) {
                this.model.agreement = e.value;
            },
            // 选择地区回调
            regionConfirm(e) {
                this.model.region = e.province.label + '-' + e.city.label + '-' + e.area.label;
            },
            // 选择商品类型回调
            selectConfirm(e) {
                this.model.goodsType = '';
                e.map((val, index) => {
                    this.model.goodsType += this.model.goodsType == '' ? val.label : '-' + val.label;
                });
            },
            borderChange(index) {
                this.border = !index;
            },
            radioCheckboxChange(index) {
                if (index == 0) {
                    this.radioCheckWrap = false;
                    this.radioCheckWidth = 'auto';
                } else if (index == 1) {
                    this.radioCheckWrap = true;
                    this.radioCheckWidth = 'auto';
                } else if (index == 2) {
                    this.radioCheckWrap = false;
                    this.radioCheckWidth = '50%';
                }
            },
            labelPositionChange(index) {
                this.labelPosition = index == 0 ? 'left' : 'top';
            },
            codeChange(text) {
                this.codeTips = text;
            },
            // 获取验证码
            getCode() {
                if (this.$refs.uCode.canGetCode) {
                    // 模拟向后端请求验证码
                    uni.showLoading({
                        title: '正在获取验证码',
                        mask: true
                    });
                    setTimeout(() => {
                        uni.hideLoading();
                        // 这里此提示会被this.start()方法中的提示覆盖
                        this.$u.toast('验证码已发送');
                        // 通知验证码组件内部开始倒计时
                        this.$refs.uCode.start();
                    }, 2000);
                } else {
                    this.$u.toast('倒计时结束后再发送');
                }
            },
            errorChange(index) {
                if (index == 0) this.errorType = ['message'];
                if (index == 1) this.errorType = ['toast'];
                if (index == 2) this.errorType = ['border-bottom'];
                if (index == 3) this.errorType = ['border'];
            }
        }
    };
</script>
<style scoped lang="scss">
    .wrap {
        padding: 30rpx;
    }
    .agreement {
        display: flex;
        align-items: center;
        margin: 40rpx 0;
        .agreement-text {
            padding-left: 8rpx;
            color: $u-tips-color;
        }
    }
</style>
sub_pages/farmer/farmer-info/farmer-info.vue
文件名从 pages/login/farmer-reg.vue 修改
@@ -21,15 +21,26 @@
                </view>
            </view>
            <view class="form-item before-line">
            <view class="form-item bottom-border-no">
                <view class="label required" style="width: 360rpx;">店铺头像(750*750px)</view>
                <view class="m-l-a m-r-0 flex m-t-20 m-b-20">
                    <view class="component-button-upload" @click="uploadIcon('icon')"
                        :style="{'background-image':dto.icon&&`url('${dto.icon}')`||''}">
                    <view class="component-button-upload" @click="uploadIcon('cover')" >
                    </view>
                </view>
            </view>
            <view v-if="dto.cover">
                <view class="flex p20 form-item bottom-border-no" style="padding-top: 0rpx;padding-bottom: 10rpx" >
                    <view class="m-r-10 ">
                        <image class="banner-img" :src="dto.cover" @click.stop="previewImg(dto.cover)">
                        </image>
                        <view class="t-red text-center" @click.stop="deleteImg('cover','')">删除</view>
                    </view>
                </view>
            </view>
            <u-divider></u-divider>
            <view class="form-item before-line">
                <view class="label required">姓名</view>
                <view class="m-l-a m-r-0 flex">
@@ -87,10 +98,10 @@
            <view class="form-item before-line m-t-20">
                <view class="label required">选择审核方式</view>
                <view class="m-l-a m-r-0 flex">
                    <u-radio-group v-model="dto.idcardType" placement="row">
                        <u-radio :customStyle="{'margin-bottom': '8px','margin-right': '8px','font-size':'28rpx'}" v-for="(item, index) in shTypeList" :key="index"
                            :label="item.name" :name="item.name">
                        <u-radio :customStyle="{'margin-bottom': '8px','margin-right': '8px','font-size':'28rpx'}"
                            v-for="(item, index) in shTypeList" :key="index" :label="item.name" :name="item.name">
                        </u-radio>
                    </u-radio-group>
                </view>
@@ -98,27 +109,41 @@
            <view class="form-item before-line m-t-20 p-b-20" v-if="dto.idcardType=='身份证'">
                <view class="label required">身份证正反面</view>
                <view class="m-l-a m-r-0 flex">
                    <view class="component-button-upload m-r-15" @click="uploadIcon('icon')"
                        :style="{'background-image':dto.icon&&`url('${dto.icon}')`||''}">
                    <view class="component-button-upload m-r-15" @click="uploadIcon('idCards')">
                    </view>
                    <view class="component-button-upload" @click="uploadIcon('icon')"
                        :style="{'background-image':dto.icon&&`url('${dto.icon}')`||''}">
                    <view class="component-button-upload" @click="uploadIcon('idCards')">
                    </view>
                </view>
            </view>
            <view class="flex p20" style="padding-top: 0rpx;padding-bottom: 10rpx"
                v-if="dto.idCards&&dto.idCards.length>0">
                <view class="m-t-12 m-r-10 " v-for="(tBanner,index) of dto.idCards" :key="index">
                    <image class="banner-img" :src="tBanner.url" @click.stop="previewImg(tBanner.url)">
                    </image>
                    <view class="t-red text-center" @click.stop="deleteImg('idCards',index)">删除</view>
                </view>
            </view>
            <view class="form-item before-line m-t-20 p-b-20" v-if="dto.idcardType=='营业执照'">
                <view class="label required">营业执照</view>
                <view class="m-l-a m-r-0 flex">
                    <view class="component-button-upload m-r-15" @click="uploadIcon('icon')"
                        :style="{'background-image':dto.icon&&`url('${dto.icon}')`||''}">
                    <view class="component-button-upload m-r-15" @click="uploadIcon('pictures')">
                    </view>
                </view>
            </view>
            <view class="flex p20" style="padding-top: 0rpx;padding-bottom: 10rpx"
                v-if="dto.pictures&&dto.pictures.length>0">
                <view class="m-t-12 m-r-10 " v-for="(tBanner,index) of dto.pictures" :key="index">
                    <image class="banner-img" :src="tBanner.url" @click.stop="previewImg(tBanner.url)">
                    </image>
                    <view class="t-red text-center" @click.stop="deleteImg('pictures',index)">删除</view>
                </view>
            </view>
@@ -128,7 +153,9 @@
        </view>
        <view style="min-height: 200rpx;">
            &nbsp;
        </view>
        <u-picker @confirm="select_type" keyName="label" @cancel="show_select_type=false" :show="show_select_type"
            :columns="columns_types"></u-picker>
@@ -158,7 +185,9 @@
                api: '',
                dto: {
                    id: '',
                    applicationType: '',
                    pictures: [],
                    idCards: [],
                    cover:''
                },
                show_select_type: false,
                show_select_user: false,
@@ -187,31 +216,6 @@
                this.id = options.id
                this.getDetail()
            } else {
                // this.$http.request('get', '/api/personnel/employee/list', {
                //     params: {
                //         size: 4000,
                //         current: 1
                //     }
                // }).then(res => {
                //     this.userListAll = (res.data && res.data.records || []).map(item => {
                //         item.label = item.label || item.name || item.nickName || item.loginName || '-'
                //         return item
                //     })
                //     var index = 0
                //     this.userList = this.userListAll.map(item => {
                //         index += 1
                //         return `${index}.` + item.label + (item.tel ? `(${item.tel})` : '')
                //     })
                //     var arr = this.userListAll.map(item => {
                //         return {
                //             label: item.label + (item.tel ? `(${item.tel})` : ''),
                //             value: item.id
                //         }
                //     })
                //     this.userListCols = [arr]
                // })
                this.$http.request('get', '/api/code/value', {
                    params: {
@@ -249,16 +253,18 @@
                const {
                    code,
                    data
                } = await this.$http.request('get', "/api/app/application/get/" + this.id, {})
                } = await this.$http.request('get', "/api/supplier/addOrUpdate/detail/" + this.id, {})
                if (code == 0) {
                    this.dto = {
                        ...data,
                    }
                    if (this.dto.applicationDate) {
                        this.dto.applicationDate = this.$util.toDate(new Date(this.dto.applicationDate))
                    if (!this.dto.pictures) {
                        this.dto.pictures = []
                    }
                    // console.log('this.dto', this.dto)
                    if (!this.dto.idCards) {
                        this.dto.idCards = []
                    }
                }
@@ -266,29 +272,15 @@
            },
            async submit() {
                if (!this.dto.applicationType) {
                    this.$message.showToast('未选择类型')
                    return
                }
                if (!this.dto.applicationTitle) {
                    this.$message.showToast('未填写申请主题')
                    return
                }
                if (!this.dto.auditPersonId) {
                    this.$message.showToast('未选择审批人')
                    return
                }
                await this.$message.confirm(`是否确定提交申请${this.auditPersonName?(",审批人为:"+this.auditPersonName):""}`)
                // this.$message.showToast('1')
                // return
                await this.$message.confirm(`是否确定提交/修改店铺信息`)
                var dto = {
                    ...this.dto,
                    applicationDate: this.$util.toDate(new Date()),
                    applicantId: this.currentInfo.id
                }
                this.$message.showLoading()
                const re = await this.$http.request('post', '/api/app/application/create', {
                const re = await this.$http.request('post', '/api/supplier/addOrUpdate', {
                    data: dto
                })
                this.$message.hideLoading()
@@ -300,28 +292,14 @@
                    this.backpage()
                }
            },
            async submitAudit() {
                var url = ''
                if (this.audit_result) {
                    url = '/api/app/application/audit/pass'
                } else {
                    url = '/api/app/application/audit/reject'
                }
                var dto = {
                    id: this.id,
                    auditRemarks: this.audit_remarks
                }
                this.show_audit = false
                this.$message.showLoading()
                const re = await this.$http.request('post', url, {
                    data: dto
                })
                this.$message.hideLoading()
                if (re.code == 2000 || re.code == 0) {
                    this.$message.showToast('操作成功')
                    this.$store.dispatch('sign_add', 'application');
                    this.getDetail()
            async deleteImg(key, index) {
                await this.$message.confirm('是否确认删除此图片')
                if(Array.isArray(this.dto[key])){
                    this.dto[key].splice(index, 1)
                }else{
                    this.dto[key] = ''
                }
            },
            uploadIcon(key) {
@@ -339,10 +317,15 @@
                            that.$message.showLoading()
                            that.$http.upload(tempFiles[0].path).then(async res => {
                                var pic = res.data && res.data.length > 0 && res.data[
                                        0]
                                    .url || ''
                                    0] || {}
                                that.$message.hideLoading()
                                that.dto[key] = pic || ''
                                if(Array.isArray(that.dto[key])){
                                    that.dto[key].push(pic || '')
                                }else{
                                    that.dto[key] = (pic || {}).url || ''
                                }
                                that.$forceUpdate()
                            }).catch(res => {
                                that.$message.hideLoading()
@@ -357,12 +340,18 @@
        computed: {
            ...mapState(['currentInfo'])
        },
        components: {
        }
        components: {}
    }
</script>
<style lang="scss" scoped>
    .banner-img {
        width: 96rpx;
        height: 96rpx;
        border-radius: 4rpx;
        border: 2rpx dashed #CECECE;
    }
    .form-item {
        // padding: 40rpx;
        border-bottom: 2rpx solid #F3F3F3;
sub_pages/farmer/farmer-reg/farmer-reg.vue
对比新文件
@@ -0,0 +1,358 @@
<template>
    <view class="main-container login-container img100" style="margin-top: 0rpx;">
        <view class="t-login top-bg">
            <view class="nav-title">注册</view>
            <view class="login">
                <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>
                    <view class="t-a input" v-if="loginType=='code'">
                        <view class="get-code" :style="{'color':getCodeBtnColor}" @click.stop="getCode()">
                            {{getCodeText}}
                        </view>
                        <input type="text" name="userName" placeholder="请输入手机号" v-model="phoneNumber" />
                    </view>
                    <view class="t-a input" v-if="loginType=='code'">
                        <input type="text" name="userName" placeholder="请输入手机验证码" v-model="smsCode" />
                    </view>
                    <view class="t-a input" v-if="loginType=='code'">
                        <input type="text" :password="true" name="password" placeholder="请输入密码" v-model="password" />
                    </view>
                    <button @tap="login()" class="bottom-button">注 册</button>
                    <view class="flex">
                        <view class="topic-font m-l-a m-r-0" @click="toLogin">前往登录</view>
                    </view>
                </form>
            </view>
        </view>
    </view>
</template>
<script>
    // import util from '@/utils/util.js'
    // import gzmzApi from '@/api/gzmzApi.js'
    // import myCache from '@/utils/myCache.js'
    export default {
        data() {
            return {
                openId: '-1',
                userName: '',
                password: '',
                phoneNumber: '',
                smsCode: '',
                checked: false,
                loginType: 'code', //pwd和code,密码和验证码登录
                pcfvalue: undefined,
                getCodeText: '获取验证码',
                getCodeBtnColor: "#20613D",
                getCodeisWaiting: false,
                Timer: undefined
            };
        },
        methods: {
            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"
                    });
                    return false;
                }
                this.getCodeText = "发送中..." //发送验证码
                this.getCodeisWaiting = true;
                this.getCodeBtnColor = "rgba(255,255,255,0.5)" //追加样式,修改颜色
                //示例用定时器模拟请求效果
                //setTimeout(()用于在指定的毫秒数后调用函数或计算表达式
                setTimeout(() => {
                    uni.showToast({
                        title: '验证码已发送',
                        icon: "none"
                    }); //弹出提示框
                    //示例默认1234,生产中请删除这一句。
                    // this.code = '1234'; //发送验证码,进行填入
                    this.setTimer(); //调用定时器方法
                }, 1000)
            },
            //setTimer: 需要每隔一段时间执行一件事的的时候就需要使用SetTimer函数
            setTimer() {
                let holdTime = 60; //定义变量并赋值
                this.getCodeText = "重新获取(60)"
                //setInterval()是一个实现定时调用的函数,可按照指定的周期(以毫秒计)来调用函数或计算表达式。
                //setInterval方法会不停地调用函数,直到 clearInterval被调用或窗口被关闭。
                this.Timer = setInterval(() => {
                    if (holdTime <= 0) {
                        this.getCodeisWaiting = false;
                        this.getCodeBtnColor = "#20613D";
                        this.getCodeText = "获取验证码"
                        clearInterval(this.Timer); //清除该函数
                        return; //返回前面
                    }
                    this.getCodeText = "重新获取(" + holdTime + ")"
                    holdTime--;
                }, 1000)
            },
            toLogin() {
                uni.redirectTo({
                    url: '/pages/login/farmer-login'
                })
            },
            changeAll(e) {
                this.pcfvalue = e.detail.value[0]
            },
            async login() {
                uni.showLoading({
                    title: '登陆中'
                });
                var that = this;
                if (!that.userName) {
                    uni.showToast({
                        title: '请输入用户名',
                        icon: 'none'
                    });
                    return;
                }
                if (!that.password) {
                    uni.showToast({
                        title: '请输入密码',
                        icon: 'none'
                    });
                    return;
                }
                // if (this.pcfvalue == undefined) {
                //     util.showMyToast('必须勾选《用户服务协议》及《隐私政策》');
                //     return;
                // }
                let post = {
                    username: this.userName,
                    password: this.password,
                    // openId: '123456789'
                }
                // const {
                // code
                // } = await this.$http.request('get', '/api/login/admin')
                const resp = await this.$store.dispatch('loginSupplier', post);
                // uni.hideLoading()
                if (resp.code == 0) {
                    // myCache.cache("userToken", res.data.accessToken)
                    // let userRes = await gzmzApi.getMemberInfo();
                    // if (userRes.status) {
                    //     myCache.cache("userInfo", JSON.stringify(userRes.data))
                    // }
                    // setTimeout(() => {
                    //     uni.navigateBack();
                    // }, 1000);
                } else {
                    uni.showToast({
                        title: '登录失败!',
                        icon: 'none'
                    });
                    return;
                }
            },
            tc1(id) {
                uni.navigateTo({
                    url: '/pages/users/xieyi?id=' + id,
                });
            }
        }
    };
</script>
<style lang="scss" scoped>
    @import '@/pages/login/login.scss';
    .main-container {
        margin: 20px 0;
    }
    .img-a {
        position: absolute;
        width: 100%;
        top: -150rpx;
        right: 0;
    }
    .img-b {
        position: absolute;
        width: 50%;
        bottom: 0;
        left: -120rpx;
    }
    .to-home {
        margin-top: 30rpx;
        font-size: 30rpx;
        color: #5af;
        display: flex;
        flex-direction: row-reverse;
    }
    .t-login {
        width: 100%;
        margin: 0 auto;
        font-size: 28rpx;
        color: #000;
    }
    .t-login .bg {
        width: 100%;
        position: relative;
    }
    .t-login .login {
        width: 650rpx;
        margin: 60rpx auto;
        margin-top: 0rpx;
        font-size: 28rpx;
        color: #000;
    }
    .t-login button {
        font-size: 28rpx;
        background: #5677fc;
        color: #fff;
        height: 90rpx;
        line-height: 90rpx;
        border-radius: 50rpx;
        box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
    }
    .t-login input {
        padding: 0 20rpx 0 120rpx;
        height: 90rpx;
        line-height: 90rpx;
        margin-bottom: 50rpx;
        background: #f8f7fc;
        border: 1px solid #e9e9e9;
        font-size: 28rpx;
        border-radius: 50rpx;
    }
    .t-login .t-a {
        position: relative;
        .get-code {
            position: absolute;
            right: 40rpx;
            top: 20rpx;
        }
    }
    .t-login .t-a .icon {
        width: 40rpx;
        height: 40rpx;
        position: absolute;
        left: 24rpx;
        top: 14rpx;
        margin-right: 20rpx;
    }
    .t-login .t-a .line {
        width: 2rpx;
        height: 40rpx;
        background-color: #dedede;
        position: absolute;
        top: 28rpx;
        left: 98rpx;
    }
    .t-login .t-b {
        text-align: left;
        font-size: 46rpx;
        color: #000;
        padding: 300rpx 0 30rpx 0;
        font-weight: bold;
    }
    .t-login .t-b2 {
        text-align: left;
        font-size: 32rpx;
        color: #aaaaaa;
        padding: 0rpx 0 120rpx 0;
    }
    .t-login .t-c {
        position: absolute;
        right: 22rpx;
        top: 22rpx;
        background: #5677fc;
        color: #fff;
        font-size: 24rpx;
        border-radius: 50rpx;
        height: 50rpx;
        line-height: 50rpx;
        padding: 0 25rpx;
        z-index: 999;
    }
    .t-login .t-d {
        text-align: center;
        color: #999;
        margin: 80rpx 0;
    }
    .t-login .t-e {
        text-align: center;
        width: 250rpx;
        margin: 80rpx auto 0;
    }
    .t-login .t-g {
        float: left;
        width: 50%;
    }
    .t-login .t-e image {
        width: 50rpx;
        height: 50rpx;
    }
    .t-login .t-f {
        text-align: center;
        margin: 200rpx 0 0 0;
        color: #666;
    }
    .t-login .t-f text {
        margin-left: 20rpx;
        color: #aaaaaa;
        font-size: 27rpx;
    }
    .t-login .uni-input-placeholder {
        color: #000;
    }
    .cl {
        zoom: 1;
    }
    .cl:after {
        clear: both;
        display: block;
        visibility: hidden;
        height: 0;
        content: '\20';
    }
</style>
sub_pages/farmer/flower-manage/flower-add.vue
sub_pages/farmer/flower-manage/flower-manage.vue
文件名从 pages/farmer/flower-manage/flower-manage.vue 修改
@@ -61,8 +61,10 @@
                    <view class="buttons">
                        <view class="button" @click.stop="toDetail(item)">编辑</view>
                        <view class="button" @click.stop="buttonStatus(item,'off')" v-if="item.status=='UP'">下架</view>
                        <view class="button" @click.stop="buttonStatus(item,'up')" v-if="item.status=='OFF'">上架</view>
                        <view class="button" @click.stop="buttonStatus(item,'FORCE_OFF')"
                            v-if="item.status=='FORCE_UP'">下架</view>
                        <view class="button" @click.stop="buttonStatus(item,'FORCE_UP')"
                            v-if="item.status=='FORCE_OFF'">上架</view>
                        <view class="button" @click.stop="openValue(item,'price')">价格</view>
                        <view class="button" @click.stop="openValue(item,'stock')">库存</view>
                        <view class="button" @click.stop="toDetailAdd(item)">复制</view>
@@ -77,16 +79,35 @@
        <!-- 判断是否到底了,自动吧 -->
        <footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg>
        <uni-popup ref="popup_input" type="bottom">
            <view class="component-popup_input">
        <uni-popup ref="popup_input" type="bottom" :mask-click="false">
            <view class="component-popup_input white w-fit" style="padding-bottom: 0rpx;padding: 0px;">
                <view class="p20" style="padding-bottom: 10rpx;">
                    <view class="title" v-if="currentInputKey=='price'">
                        修改价格
                    </view>
                    <view class="title" v-if="currentInputKey=='stock'">
                        修改库存
                    </view>
                <!-- 输入框-->
                    <!-- 输入框-->
                    <view class="flex w-fit">
                <u-input class="bg-white"  v-model="content" :placeholder="inputplaceholder" type="digit" v-if="currentInputKey=='price'"/>
                <u-input  class="bg-white"  v-model="content" :placeholder="inputplaceholder" type="number" v-if="currentInputKey=='stock'"/>
                        <u-input v-model="content" :placeholder="inputplaceholder" type="digit"
                            style="max-width: 390rpx;background-color: #F2F2F2;" v-if="currentInputKey=='price'" />
                        <view v-if="currentInputKey=='price'" class="m-l-10" style="line-height: 78rpx;">元</view>
                        <u-input v-model="content" :placeholder="inputplaceholder" type="number"
                            style="max-width: 390rpx;background-color: #F2F2F2;" v-if="currentInputKey=='stock'" />
                    </view>
                </view>
                <!-- 提交按钮 -->
                <view class="button-green" @click="submitValue">提交</view>
                <view class="line-gray" style="margin-bottom: 0px;"></view>
                <view class="flex">
                    <u-button type="default" class="w-fit  flex1 " text="取消"
                        @click="()=>{$refs.popup_input.close()}"></u-button>
                    <view class="component-line-vert"></view>
                    <u-button type="default" class="w-fit flex1 topic-font" t text="确定" @click="submitValue"></u-button>
                </view>
            </view>
        </uni-popup>
    </view>
@@ -103,27 +124,37 @@
                content: '',
                currentInputDto: {},
                currentInputKey: '',
                inputplaceholder:'',
                inputplaceholder: '',
            }
        },
        onLoad(options) {
            this.type = options.type || 'all'
            var title = ''
            //todo 根据type切换查询条件
            if (this.type === 'delete') {
                this.listApi = '/api/supplier/flower/list/rc'
                title = '商品管理-已删除'
            } else {
                this.listApi = '/api/supplier/flower/list'
                this.query.status = ''
                if (this.type === 'inpass') {
                    this.query.status = 'PENDING'
                    title = '商品管理-待审核'
                }
                if (this.type === 'in') {
                    this.query.status = 'UP'
                    title = '商品管理-已上架'
                }
                if (this.type === 'unpass') {
                    this.query.status = 'REJECT'
                    title = '商品管理-审核拒绝'
                }
            }
            if (title) {
                uni.setNavigationBarTitle({
                    title: title
                })
            }
            this.getList()
        },
@@ -141,7 +172,7 @@
                this.content = item[key] || ''
                this.currentInputDto = item
                this.currentInputKey = key
                this.inputplaceholder = key=='price'&&'请输入价格(元)' || key=='stock'&&'请输入库存(整数)'  || '请输入'
                this.inputplaceholder = key == 'price' && '请输入价格(元)' || key == 'stock' && '请输入库存(整数)' || '请输入'
                this.$refs.popup_input.open('top')
            },
            async submitValue() {
@@ -186,7 +217,7 @@
                })
            },
            async buttonStatus(item, status) {
                await this.$message.confirm(`确定${status==='off'?'下降':'上架'}此商品吗`)
                await this.$message.confirm(`确定${status==='FORCE_OFF'?'下降':'上架'}此商品吗`)
                this.$message.showLoading()
                this.$http.request('get', '/api/supplier/flower/list/' + status, {
                    params: {
@@ -196,7 +227,7 @@
                    if (res.code == 0) {
                        this.$message.showToast('操作成功')
                        item.status = status
                        item.statusStr = (status == 'off' ? '下架' : '上架')
                        item.statusStr = (status == 'FORCE_OFF' ? '下架' : '上架')
                    }
                }).finally(() => {
                    this.$message.hideLoading()
@@ -335,16 +366,18 @@
                // min-width: 90rpx;
                flex: 4;
                // max-width: 90rpx;
                margin-left:14rpx;
                margin-right:14rpx;
                margin-left: 14rpx;
                margin-right: 14rpx;
            }
            .button:first-child {
                margin-left: 0rpx
            }
            .button:last-child {
                margin-right: 0rpx
            }
            .button-add {
                background-image: url('@/static/images/farmer/flower/flower-mange-icon-add-flower.png');
sub_pages/farmer/order-records/order-records.vue
sub_pages/farmer/order-sale/order-sale.vue
sub_pages/farmer/order-settlement/order-settlement.vue