xuxy
2024-07-15 e3898caa56109a29f94e4dabc7db421a5bd4b730
update fix bug
已修改10个文件
89 ■■■■■ 文件已修改
environments/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/supplier-home.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/supplier-login.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
plugins/http.js 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
store/index.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/flower-manage/flower-add.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/flower-manage/flower-manage.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/order-records/order-records.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/supplier-info/supplier-info.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/supplier-reg/supplier-reg.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
environments/index.js
@@ -1,7 +1,7 @@
export default {
    
    // httpBaseUri: 'https://www.hmyxianhua.com/flower',
    httpBaseUri: 'http://47.99.58.211/flower',
    httpBaseUri: 'https://www.hmyxianhua.com/flower',
    // httpBaseUri: 'http://47.99.58.211/flower',
    clientId: '',
    secret: '',
pages/home/supplier-home.vue
@@ -114,7 +114,7 @@
        </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" />
                :scrollable="scrollable" :text="currentNotice.title||'暂无公告'" :key="currentNotice.id" />
            <span v-if="!currentNotice||!currentNotice.id">&nbsp;</span>
        </view>
        <view class="item-container">
pages/login/supplier-login.vue
@@ -135,6 +135,10 @@
                        icon: "none"
                    });
                    this.setTimer(); //调用定时器方法
                }else{
                    this.getCodeText = "获取验证码" //发送验证码
                    this.getCodeisWaiting = false;
                    this.getCodeBtnColor = "#20613D";
                }
                // setTimeout(() => {
                //     uni.showToast({
@@ -198,7 +202,7 @@
                    }
                }
                if (this.loginType == 'code') {
                    if (!that.tel) {
                    if (!that.phoneNumber) {
                        uni.showToast({
                            title: '请输入手机号',
                            icon: 'none'
@@ -242,10 +246,10 @@
                    // }, 1000);
                } else {
                    uni.showToast({
                        title: '登录失败!',
                        icon: 'none'
                    });
                    // uni.showToast({
                    //     title: '登录失败!',
                    //     icon: 'none'
                    // });
                    return;
                }
plugins/http.js
@@ -64,29 +64,30 @@
                                msg: ''
                            })
                        } else {
                            console.log('res',res.data)
                            if (res.data.code == ('0')) {
                                resolve({
                                    data: res.data.data,
                                    code: 0,
                                    msg: ''
                                })
                            } else if (res.data.code === '3000'||res.data.code === '30000') {
                            } else if (res.data.code === '3000'||res.data&&res.data.code&&res.data.code.startsWith('3000')) {
                                if (Array.isArray(res.data.data)) {
                                    if (res.data.data.length > 0 && res.data.data[0]
                                        .errorMessage) {
                                        message.showToast(res.data.data[0].errorMessage)
                                        .msg) {
                                        message.showToast(res.data.data[0].msg)
                                    }
                                } else if (res.data.data && res.data.data.errorMessage) {
                                    message.showToast(res.data.data.errorMessage)
                                } else if (res.data && res.data.msg) {
                                    message.showToast(res.data.msg)
                                } else if (res.data.data && typeof res.data.data === 'string') {
                                    message.showToast(res.data.data)
                                }
                                reject({
                                    data: null,
                                    code: parseInt(res.data.code),
                                    msg: res.data.data
                                    msg: res.data.data || res.data.msg
                                })
                            } else if (res.data.code === '4000'||res.data.code === '40000') {
                            } else if (res.data.code === '4000'||res.data&&res.data.code&&res.data.code.startsWith('4000')) {
                                    message.showToast('系统异常')
                            } else {
                                if (res.data.data && typeof res.data.data === 'string') {
store/index.js
@@ -35,6 +35,8 @@
                    // remoteip:'',//服务器ip
                    sign: {
                        'enterprise': 0,
                        'info':0,
                        'flower':0,
                    },
                    defaultaddress: {}
                },
@@ -279,8 +281,8 @@
                        state
                    }, data) {
                        {
                            const resp = await http.request('post', '/api/login/partner' + (data
                                .phoneNumber ? '/phone' : ''), {
                            const resp = await http.request('post', '/api/login/partner' + ((data
                                .phoneNumber||data.tel) ? '/phone' : ''), {
                                data: {
                                    username: data.username,
                                    password: data.password,
@@ -339,10 +341,10 @@
                        state
                    }, data) {
                        {
                            const resp = await http.request('post', '/api/login/supplier' + (data
                                .phoneNumber ? '/phone' : ''), {
                            const resp = await http.request('post', '/api/login/supplier' + ((data
                                .phoneNumber ||data.tel) ? '/phone' : ''), {
                                data: {
                                    username: data.username,
                                    username: (data.phoneNumber ||data.tel)?(data.phoneNumber || data.tel): data.username,
                                    password: data.password,
                                    tel: data.phoneNumber || data.tel,
                                    smsCode: data.smsCode || ''
@@ -403,7 +405,7 @@
                            const resp = await http.request('post', '/api/login/customer' + (data
                                .phoneNumber ? '/phone' : ''), {
                                data: {
                                    username: data.username,
                                    username: (data.phoneNumber ||data.tel)?(data.phoneNumber || data.tel): data.username,
                                    password: data.password,
                                    tel: data.phoneNumber || data.tel,
                                    smsCode: data.smsCode || ''
sub_pages/supplier/flower-manage/flower-add.vue
@@ -529,7 +529,7 @@
                if (re.code == 2000 || re.code == 0) {
                    this.$message.showToast('操作成功')
                    //需要标记加一下
                    // this.$store.dispatch('sign_add', 'application');
                    this.$store.dispatch('sign_add', 'flower');
                    this.backpage()
                }
sub_pages/supplier/flower-manage/flower-manage.vue
@@ -61,10 +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'||item.status=='FORCE_OFF'">上架</view>
                        <view class="button" @click.stop="buttonStatus(item,'off')"
                            v-if="item.status=='UP'||item.status=='up'">下架</view>
                        <view class="button" @click.stop="buttonStatus(item,'up')"
                            v-if="item.status=='OFF'||item.status=='off'||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>
@@ -127,7 +127,13 @@
                inputplaceholder: '',
            }
        },
        onLoad(options) {
        onShow(){
            if (this.sign['flower']) {
                this.$store.dispatch('sign_clear', 'flower');
                this.refreshList()
            }
        },
        async onLoad(options) {
            this.type = options.type || 'all'
            var title = ''
            //todo 根据type切换查询条件
@@ -160,6 +166,7 @@
                    title: title
                })
            }
            await this.$store.dispatch('sign_clear', 'flower');
            this.getList()
        },
        onReachBottom() {
@@ -221,7 +228,7 @@
                })
            },
            async buttonStatus(item, status) {
                await this.$message.confirm(`确定${status==='OFF'?'下降':'上架'}此商品吗`)
                await this.$message.confirm(`确定${status==='off'?'下降':'上架'}此商品吗`)
                this.$message.showLoading()
                this.$http.request('get', '/api/supplier/flower/list/' + status, {
                    params: {
@@ -231,7 +238,7 @@
                    if (res.code == 0) {
                        this.$message.showToast('操作成功')
                        item.status = status
                        item.statusStr = (status == 'OFF' ? '下架' : '上架')
                        item.statusStr = (status == 'off' ? '下架' : '上架')
                    }
                }).finally(() => {
                    this.$message.hideLoading()
sub_pages/supplier/order-records/order-records.vue
@@ -3,7 +3,7 @@
        <view class="tj-container-p">
            <view class="tj-container flex">
                <view class="tj-each flex1">
                    <view class="value">9</view>
                    <view class="value">0</view>
                    <view class="label">买家</view>
                </view>
                <view class="tj-each flex1">
sub_pages/supplier/supplier-info/supplier-info.vue
@@ -420,7 +420,7 @@
                if (re.code == 2000 || re.code == 0) {
                    this.$message.showToast('操作成功')
                    //需要标记加一下
                    this.$store.dispatch('sign_add', 'application');
                    this.$store.dispatch('sign_add', 'info');
                    this.$store.dispatch('getCurrentInfo')
                    this.backpage()
@@ -435,6 +435,7 @@
                } else {
                    this.dto[key] = ''
                }
                this.$forceUpdate()
            },
            uploadIcon(key) {
                const that = this
sub_pages/supplier/supplier-reg/supplier-reg.vue
@@ -130,6 +130,10 @@
                        icon: "none"
                    });
                    this.setTimer(); //调用定时器方法
                }else{
                    this.getCodeText = "获取验证码" //发送验证码
                    this.getCodeisWaiting = false;
                    this.getCodeBtnColor = "#20613D";
                }
                // setTimeout(() => {
                //     //弹出提示框
@@ -223,10 +227,10 @@
                    }, 1000);
                } else {
                    uni.showToast({
                        title: '登录失败!',
                        icon: 'none'
                    });
                    // uni.showToast({
                    //     title: '登录失败!',
                    //     icon: 'none'
                    // });
                    return;
                }