xuxueyang
2024-08-03 0c100f6c702db0dd8cf696c595e83fb3fead0232
add 分享
已修改9个文件
292 ■■■■ 文件已修改
pages/home/home.vue 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/supplier-home.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/supplier-login.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/user/supplier-user.vue 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/shop/shop.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/trade/detail.vue 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/trade/list.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/customer/trade/trade.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/partner/delivery/delivery-home.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.vue
@@ -22,9 +22,9 @@
        <view class="search-container m-t-12 flex" @click="goto('/pages/home/components/home-search',false)">
            <view class="flex1 input">
                <u-input placeholder="请输入花名" disabled v-model="search_flow">
                    <template slot="suffix">
                    <template slot="suffix">
                        <!-- @click="buttonSearchFlow" -->
                        <uni-icons color="#20613D" type="search" size="24" ></uni-icons>
                        <uni-icons color="#20613D" type="search" size="24"></uni-icons>
                    </template>
                </u-input>
            </view>
@@ -165,32 +165,33 @@
                currentNotice: {}
            };
        },
        // onShareAppMessage() {
        // let that = this;
        // var url =
        //     `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${this.currentInfo&&this.currentInfo.nickName||''}`; //你的转发页面路径拼接参数
        // return {
        //     title: "校购GO小狗狗",
        //     path: url,
        // }
        // },
        // onShareTimeline() {
        //     let that = this;
        //     var url = "/pages/home/home" //你的分享页面路径
        //     return {
        //         title: '校购GO小狗狗',
        //         path: url,
        //         query: `shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${this.currentInfo&&this.currentInfo.nickName||''}`, //你的参数拼接,注意:不需要加?
        //         // imageUrl: 'https://cdn.uviewui.com/uview/swiper/1.jpg' //你分享的封面
        //     };
        // },
        onShareAppMessage() {
            let that = this;
            var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
            var url =
                `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫",
                path: url,
            }
        },
        onShareTimeline() {
            let that = this;
            var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
            var url =
                `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫",
                path: url,
            }
        },
        onLoad(options) {
            // if(options.partnerUserId){
            //     //需要前往注册了
            //     uni.navigateTo({
            //         url: '/pages/login/supplier-login'
            //     })
        onLoad(options) {
            // if(options.partnerUserId){
            //     //需要前往注册了
            //     uni.navigateTo({
            //         url: '/pages/login/supplier-login'
            //     })
            // }
            // console.log('home created')
            //这里进行一次初始化即可
pages/home/supplier-home.vue
@@ -204,6 +204,28 @@
            };
        },
        onShareAppMessage() {
            let that = this;
            var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO &&
                currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || ''
            var url =
                `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫",
                path: url,
            }
        },
        onShareTimeline() {
            let that = this;
            var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO &&
                currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || ''
            var url =
                `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫",
                path: url,
            }
        },
        async onPullDownRefresh() {
            await this.$store.dispatch('getCurrentInfo')
            uni.stopPullDownRefresh()
@@ -289,7 +311,7 @@
                        }
                    },
                    fail: (res) => {
                        console.log("蓝牙状态",res)
                        console.log("蓝牙状态", res)
                        that.$message.showToast('获取蓝牙状态失败')
                    }
@@ -350,7 +372,7 @@
                                },
                                fail: function(res) {
                                    console.log('createBLEConnection fail',res)
                                    console.log('createBLEConnection fail', res)
                                    that.$message.showToast('连接打印机失败')
                                },
                                complete() {
pages/login/supplier-login.vue
@@ -186,6 +186,26 @@
            }
            // #endif
        },
        onShareAppMessage() {
            let that = this;
            var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
            var url =
                `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫",
                path: url,
            }
        },
        onShareTimeline() {
            let that = this;
            var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
            var url =
                `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫",
                path: url,
            }
        },
        data() {
            return {
pages/user/supplier-user.vue
@@ -336,14 +336,51 @@
                order_pendding_num: 0,
            };
        },
        // watch: {
        //     currentInfo(nv, ov) {
        //         if (!cacheUserId) {
        //         }
        //     }
        // },
        },
        // #ifndef PUB_CUSTOMER
        onShareAppMessage() {
            let that = this;
            var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
            var url =
                `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫",
                path: url,
            }
        },
        onShareTimeline() {
            let that = this;
            var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
            var url =
                `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫",
                path: url,
            }
        },
        // #endif
        // #ifdef PUB_CUSTOMER
        onShareAppMessage() {
            let that = this;
            var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
            var url =
                `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫",
                path: url,
            }
        },
        onShareTimeline() {
            let that = this;
            var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
            var url =
                `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫",
                path: url,
            }
        },
        // #endif
        onShow() {
            this.getTj()
        },
@@ -392,7 +429,7 @@
                        console.log('条码内容:' + res.result);
                        var dto = undefined
                        try {
                            if (res.result && res.result.startsWith('http://') && res.result.indexOf(
                            if (res.result && (res.result.startsWith('https://')||res.result.startsWith('http://')) && res.result.indexOf(
                                    'partnerUserId') >= 0) {
                                var arr = res.result.split("?")[1].split("&")
                                dto = {}
@@ -417,7 +454,8 @@
                            } else {
                                that.$message.showToast('二维码格式不正确扫码失败')
                            }
                        } catch (e) {
                        } catch (e) {
                            console.log('e',e)
                            that.$message.showToast('二维码扫码错误')
                        }
                    },
sub_pages/customer/shop/shop.vue
@@ -205,6 +205,30 @@
            this.query.supplierId = this.id
            this.getList('post')
        },
        // #ifdef PUB_CUSTOMER
        onShareAppMessage() {
            let that = this;
            var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO &&
                currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || ''
            var url =
                `/sub_pages/customer/shop/shop?id=${this.id}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: this.dto.id && this.dto.name ? (this.dto.name + " 的店铺") : "花满芫",
                path: url,
            }
        },
        onShareTimeline() {
            let that = this;
            var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO &&
                currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || ''
            var url =
                `/sub_pages/customer/shop/shop?id=${this.id}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: this.dto.id && this.dto.name ? (this.dto.name + " 的店铺") : "花满芫",
                path: url,
            }
        },
        // #endif
        onReachBottom() {
            if (this.flg === '0') {
                this.getMore('post')
sub_pages/customer/trade/detail.vue
@@ -148,9 +148,9 @@
                shopnum: 0,
            }
        },
        onShow() {
            if (this.id) {
                this.getDetail()
        onShow() {
            if (this.id) {
                this.getDetail()
            }
            this.refreshShopNum()
        },
@@ -161,6 +161,31 @@
            }
            this.refreshShopNum()
        },
        // #ifdef PUB_CUSTOMER
        onShareAppMessage() {
            let that = this;
            var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO &&
                currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || ''
            var url =
                `/sub_pages/customer/trade/detail?id=${this.id}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: this.dto.id ? (this.dto.name + " " + (this.dto.price || '-') + '元/扎 ' + (this.dto.unit || '')) : "花满芫",
                path: url,
            }
        },
        onShareTimeline() {
            let that = this;
            var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO &&
                currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || ''
            var url =
                `/sub_pages/customer/trade/detail?id=${this.id}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: this.dto.id ? (this.dto.name + " " + (this.dto.price || '-') + '元/扎 ' + (this.dto.unit || '')) : "花满芫",
                path: url,
            }
        },
        // #endif
        methods: {
            async updateItemNum(item) {
                const res = await this.$message.confirm('', {
@@ -175,7 +200,7 @@
                    } else {
                        if (!item.stock || t > item.stock) {
                            this.$message.showToast('库存不足无法修改')
                            this.$message.showToast('库存不足无法修改')
                            return
                        }
                        this.addnum(item, (t - item.shopnum))
@@ -219,16 +244,16 @@
                })
                this.$message.hideLoading()
                if (code === 0) {
                    item.shopnum += addnum
                    item.shopnum += addnum
                    this.refreshShopNum()
                    this.$forceUpdate()
                }
            },
            async refreshShopNum() {
                this.shopnum = await this.$store.dispatch('countShopping');
                this.$store.dispatch('sign_add','shopnum')
                this.shopnum = await this.$store.dispatch('countShopping');
                this.$store.dispatch('sign_add', 'shopnum')
            },
            async collectItem(dto) {
                if (!this.currentInfo.id) {
sub_pages/customer/trade/list.vue
@@ -184,7 +184,29 @@
                    []
                ]
            }
        },
        },
        // #ifdef PUB_CUSTOMER
        onShareAppMessage() {
            let that = this;
            var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
            var url =
                `/sub_pages/customer/trade/list?category=${this.query.category}&zoneId=${this.query.zoneId}&name=${this.query.name}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫-商品列表",
                path: url,
            }
        },
        onShareTimeline() {
            let that = this;
            var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
            var url =
                `/sub_pages/customer/trade/list?category=${this.query.category}&zoneId=${this.query.zoneId}&name=${this.query.name}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫-商品列表",
                path: url,
            }
        },
        // #endif
        async onLoad(options) {
            // this.list = [{},{}]
            console.log('options', options)
sub_pages/customer/trade/trade.vue
@@ -109,7 +109,29 @@
                currentCategory: {}
            }
        },
        },
        // #ifdef PUB_CUSTOMER
        onShareAppMessage() {
            let that = this;
            var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
            var url =
                `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫",
                path: url,
            }
        },
        onShareTimeline() {
            let that = this;
            var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
            var url =
                `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫",
                path: url,
            }
        },
        // #endif
        onPullDownRefresh() {
            this.$http.request('get', '/api/customer/flower/category/tree', {}).then(res => {
                var data = res.data
sub_pages/partner/delivery/delivery-home.vue
@@ -123,6 +123,26 @@
        created() {
        },
        onShareAppMessage() {
            let that = this;
            var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
            var url =
                `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫",
                path: url,
            }
        },
        onShareTimeline() {
            let that = this;
            var name = that.currentInfo.customerDTO&&currentInfo.customerDTO.name || that.currentInfo.supplierDTO&&currentInfo.supplierDTO.name || that.currentInfo.partnerDTO&&currentInfo.partnerDTO.name || ''
            var url =
                `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
            return {
                title: "花满芫",
                path: url,
            }
        },
        async onPullDownRefresh() {
            await this.$store.dispatch('getCurrentInfo')
            uni.stopPullDownRefresh()