quanwei
13 hours ago 408c463c5b66bba2aa1c81d8dca23e04c1608e24
商户后台添加供需链接
商户添加底部导航
3 files added
39 files modified
754 ■■■■ changed files
admin/app/api/controller/supplier/Page.php 5 ●●●●● patch | view | raw | blame | history
admin/app/common/model/settings/Setting.php 10 ●●●●● patch | view | raw | blame | history
admin/app/shop/controller/supplier/Supplier.php 1 ●●●● patch | view | raw | blame | history
admin/app/shop/model/supplier/Supplier.php 29 ●●●●● patch | view | raw | blame | history
admin/app/supplier/controller/auth/User.php 4 ●●● patch | view | raw | blame | history
admin/app/supplier/controller/plus/Plus.php 23 ●●●●● patch | view | raw | blame | history
admin/app/supplier/controller/supplier/Page.php 4 ●●●● patch | view | raw | blame | history
admin/app/supplier/model/plus/plus/Category.php 25 ●●●●● patch | view | raw | blame | history
admin/app/supplier/model/settings/Setting.php 4 ●●● patch | view | raw | blame | history
mobile/components/tabbar/footTabbar.vue 12 ●●●● patch | view | raw | blame | history
mobile/main.js 6 ●●●●● patch | view | raw | blame | history
mobile/pages/branch/activity/product/cart.vue 88 ●●●● patch | view | raw | blame | history
mobile/pages/cart/cart.vue 6 ●●●● patch | view | raw | blame | history
mobile/pages/order/myorder.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages/order/order-detail.vue 6 ●●●● patch | view | raw | blame | history
mobile/pages/plus/assemble/detail/detail.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages/plus/bargain/detail/detail.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages/plus/business/detail.vue 4 ●●● patch | view | raw | blame | history
mobile/pages/plus/points/detail/detail.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages/plus/seckill/detail/detail.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages/product/detail/detail.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages/shop/shop.vue 20 ●●●● patch | view | raw | blame | history
mobile/pages/shop/shop_list.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages/user/my-coupon/my-coupon.vue 6 ●●●● patch | view | raw | blame | history
mobile/pages/user/my_collect/my_collect.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages/user/my_shop/my_shop.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages3/release/chat/chat_list.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages3/release/demandapply/apply.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages3/release/demandindex/index.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages3/release/demandorder/index.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages3/release/demandproject/index.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages3/release/project/list.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages3/release/supplyapply/apply.vue 2 ●●● patch | view | raw | blame | history
mobile/pages3/release/supplycash/apply/apply.vue 2 ●●● patch | view | raw | blame | history
mobile/pages3/release/supplycash/list/list.vue 2 ●●● patch | view | raw | blame | history
mobile/pages3/release/supplyindex/index.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages3/release/supplyorder/index.vue 1 ●●●● patch | view | raw | blame | history
mobile/pages3/release/supplyproject/index.vue 3 ●●●● patch | view | raw | blame | history
supplier_vue/src/components/setlink/SetTab.vue 20 ●●●●● patch | view | raw | blame | history
supplier_vue/src/components/setlink/Setlink.vue 23 ●●●●● patch | view | raw | blame | history
supplier_vue/src/components/setlink/part/Pages.vue 6 ●●●● patch | view | raw | blame | history
supplier_vue/src/components/setlink/part/Release.vue 426 ●●●●● patch | view | raw | blame | history
admin/app/api/controller/supplier/Page.php
@@ -54,6 +54,7 @@
        );
        // 扫一扫参数
        $data['signPackage'] = $this->getScanParams($url)['signPackage'];
        $data['vars'] = SettingModel::getItem(SettingEnum::NAV.'_'.$shop_supplier_id,$this->app_id,$shop_supplier_id);
        return $this->renderSuccess('', $data);
    }
@@ -87,9 +88,9 @@
    }
    //底部导航
    public function nav()
    public function nav($shop_supplier_id)
    {
        $data['vars'] = SettingModel::getItem(SettingEnum::NAV);
        $data['vars'] = SettingModel::getItem(SettingEnum::NAV.'_'.$shop_supplier_id,$this->app_id,$shop_supplier_id);
        $data['theme'] = SettingModel::getItem(SettingEnum::THEME);
        $data['points_name'] = SettingModel::getPointsName();
        return $this->renderSuccess('', $data);
admin/app/common/model/settings/Setting.php
@@ -37,9 +37,17 @@
    /**
     * 获取指定项设置
     */
    public static function getItem($key, $app_id = null)
    public static function getItem($key, $app_id = null,$shop_supplier_id=0)
    {
        $data = self::getAll($app_id);
        if (!isset($data[$key])&&strpos($key, 'nav_')!==false){
            if ($shop_supplier_id!=0){
                return [];
            }else{
                $key = 'nav';
            }
        }
        $data_key = $data[$key];
        if(isset($data_key)){
            $data_key = $data[$key]['values'];
admin/app/shop/controller/supplier/Supplier.php
@@ -62,7 +62,6 @@
        $model = SupplierModel::detail($shop_supplier_id, ['logo', 'business', 'qyQrcode','superUser.user']);
        $category = CategoryModel::getALL();
        $region = AreaModel::getALL();
        //获取站点设置
        $storeValues=SettingModel::getItem('store');
        $areaList=[];
admin/app/shop/model/supplier/Supplier.php
@@ -151,21 +151,24 @@
            // 用户是否已绑定
            $user = null;
            $userChange = false;
            if($this['superUser'] && $supplier['user_id'] > 0 && $supplier['user_id'] != $this['superUser']['user_id']){
                $user = UserModel::detail($supplier['user_id']);
                if ($user['user_type'] != 1) {
                    $this->error = '该用户已绑定';
                    return false;
            if (!empty($supplier['user_id'])){
                if($this['superUser'] && $supplier['user_id'] > 0 && $supplier['user_id'] != $this['superUser']['user_id']){
                    $user = UserModel::detail($supplier['user_id']);
                    if ($user['user_type'] != 1) {
                        $this->error = '该用户已绑定';
                        return false;
                    }
                    $isApply = $this->isApply($supplier['user_id']);
                    if ($isApply) {
                        $this->error = '已经申请开店';
                        return false;
                    }
                    $userChange = true;
                }
                $isApply = $this->isApply($supplier['user_id']);
                if ($isApply) {
                    $this->error = '已经申请开店';
                    return false;
                }
                $userChange = true;
                $user=UserModel::detail($supplier['user_id']);
                $supplier['referee_id'] = $user['referee_id'];
            }
            $user=UserModel::detail($supplier['user_id']);
            $supplier['referee_id'] = $user['referee_id'];
            // 修改供应商
            $this->save($supplier);
            // 修改登录用户
admin/app/supplier/controller/auth/User.php
@@ -9,6 +9,7 @@
use app\supplier\model\auth\Role;
use app\supplier\model\auth\User as AuthUserModel;
use app\supplier\model\supplier\member\Member;
use app\supplier\model\supplier\Supplier;
/**
 * 管理员
@@ -146,7 +147,8 @@
        if ($user_info['is_super'] == 1) {
            $model = new AccessModel();
            if($user['supplier_user_id']==1){
            $supplier=(new Supplier())->detail($this->getSupplierId());
            if($supplier['is_vip']==1||$supplier['is_release']==1){
                $menus = $model->getList();
            }else{
                $menus = $model->getMemberAccess($user['supplier_user_id']);
admin/app/supplier/controller/plus/Plus.php
New file
@@ -0,0 +1,23 @@
<?php
namespace app\supplier\controller\plus;
use app\supplier\model\plus\plus\Category as CategoryModel;
use app\supplier\controller\Controller;
/**
 * 插件控制器
 */
class Plus extends Controller
{
    /**
     * 插件列表
     */
    public function index()
    {
        $list = CategoryModel::getAll();
        return $this->renderSuccess('', compact('list'));
    }
}
admin/app/supplier/controller/supplier/Page.php
@@ -227,7 +227,7 @@
     */
    public function bottomnav()
    {
        $vars = SettingModel::getItem(SettingEnum::NAV);
        $vars = SettingModel::getItem(SettingEnum::NAV.'_'.$this->getSupplierId());
        return $this->renderSuccess('', compact('vars'));
    }
@@ -238,7 +238,7 @@
    {
        $model = new SettingModel;
        $data = $this->postData();
        if ($model->edit('nav', $data)) {
        if ($model->edit(SettingEnum::NAV.'_'.$this->getSupplierId(), $data)) {
            return $this->renderSuccess('操作成功');
        }
        return $this->renderError($model->getError() ?: '操作失败');
admin/app/supplier/model/plus/plus/Category.php
New file
@@ -0,0 +1,25 @@
<?php
namespace app\supplier\model\plus\plus;
use app\common\model\plus\plus\Category as CategoryModel;
use app\shop\model\shop\Access as AccessModel;
/**
 * 插件分类模型
 */
class Category extends CategoryModel
{
    /**
     * 获取所有插件
     */
    public static function getAll()
    {
        $model = new static();
        $list = $model::withoutGlobalScope()->order(['sort' => 'asc', 'create_time' => 'asc'])->select();
        // 查询分类下的插件
        foreach ($list as $category){
            $category['children'] = AccessModel::getListByPlusCategoryId($category['plus_category_id']);
        }
        return $list;
    }
}
admin/app/supplier/model/settings/Setting.php
@@ -13,12 +13,14 @@
     */
    public function edit($key, $values,$shop_supplier_id=0)
    {
        // 处理 key,如果包含 nav_ 则只保留 nav 部分
        $processedKey = strpos($key, 'nav_') !== false ? 'nav' : $key;
        $model = self::detail($key,$shop_supplier_id) ?: $this;
        // 删除系统设置缓存
        Cache::delete('setting_' . self::$app_id. '_'.$shop_supplier_id);
        return $model->save([
                'key' => $key,
                'describe' => SettingEnum::data()[$key]['describe'],
                'describe' => SettingEnum::data()[$processedKey]['describe'],
                'values' => $values,
                'app_id' => self::$app_id,
                'shop_supplier_id' => $shop_supplier_id
mobile/components/tabbar/footTabbar.vue
@@ -21,6 +21,7 @@
<script>
    export default {
        props:['vars'],
        data() {
            return {
                /*当前选中*/
@@ -60,7 +61,15 @@
            this.platform = this.getPlatform();
            this.detail = uni.getStorageSync('TabBar');
            // this.hasmenu();
            this.getData();
            if(!this.vars){
                this.getData();
            }else{
                this.detail = this.vars.data;
                console.log(this.detail);
                uni.setStorageSync('TabBar', this.detail);
                this.hasmenu();
            }
        },
        methods: {
            hasmenu() {
@@ -100,7 +109,6 @@
                let self = this;
                self._get('index/nav', {}, function(res) {
                    self.detail = res.data.vars.data;
                    uni.setStorageSync('TabBar', res.data.vars.data);
                    self.hasmenu();
                });
mobile/main.js
@@ -35,6 +35,12 @@
    active: 'home'
};
/*底部数据*/
import shopTabBar from "@/components/shoptabbar/footTabbar.vue"
Vue.component('shopTabBar', shopTabBar)
Vue.prototype.shopFootTabberData = {
    active: 'home'
};
Vue.prototype.$fire = new onfire()
Vue.config.productionTip = false
mobile/pages/branch/activity/product/cart.vue
@@ -1,5 +1,5 @@
<template>
    <view  :data-theme='theme()' :class="theme() || ''">
    <view :data-theme='theme()' :class="theme() || ''">
        <!-- #ifdef APP-PLUS -->
        <header-bar></header-bar>
        <!-- #endif -->
@@ -21,8 +21,7 @@
                                        <checkbox color="red" value="cb" class="checkbox"
                                            :checked="supplier_item.checked" />
                                    </label>
                                    <view class="d-a-c"
                                        @tap="gotoPage('/pages/shop/shop?shop_supplier_id='+supplier_item.supplier.shop_supplier_id)">
                                    <view class="d-a-c" @tap="gotoShopPage(supplier_item.supplier.shop_supplier_id)">
                                        <i class="icon iconfont icon-dianpu1"></i>
                                        <text class="f32 gray3">{{supplier_item.supplier.name}}</text>
                                    </view>
@@ -43,12 +42,13 @@
                                            <view class="price">
                                                ¥
                                                <text class="num">{{ item.product_price }}</text>
                                                <view v-if="item.service_name">{{ item.service_name }}:¥ {{ item.service_price }}</view>
                                                <view v-if="item.service_name">{{ item.service_name }}:¥
                                                    {{ item.service_price }}</view>
                                            </view>
                                            <view class="num-wrap">
                                                <view class="" @tap.stop="reduceFunc(item)" v-if="item.total_num > 1">
                                                    <image class="reduce_icon" src="/static/icon/reduce.png"
                                                        mode=""></image>
                                                    <image class="reduce_icon" src="/static/icon/reduce.png" mode="">
                                                    </image>
                                                </view>
                                                <view class="text-wrap">{{item.total_num}}</view>
                                                <view class="" @tap.stop="addFunc(item)"
@@ -74,10 +74,10 @@
                <!--底部按钮-->
                <view class="bottom-btns f28" :class="is_auto?'is_auto':''" v-if="tableData.length > 0">
                     <label class="d-c-c mr20" @tap="onCheckedAll()">
                    <label class="d-c-c mr20" @tap="onCheckedAll()">
                        <!--<checkbox color="red" class="checkbox" :checked="checkedAll" value="cb" />
                        全选-->
                    </label>
                    </label>
                    <view class="d-e-c pr20" v-if="!isEdit">
                        <view class="total d-s-c flex-1 mr20">
                            <text class="f24 gray9">合计:</text>
@@ -123,15 +123,15 @@
                totalPrice: 0,
                totalProduct: 0,
                store_open: 1,
                is_auto:0,
                activity_id:0,
                longitude:'',
                latitude:'',
                is_auto: 0,
                activity_id: 0,
                longitude: '',
                latitude: '',
            };
        },
        onLoad(e) {
            this.activity_id  = e.activity_id;
            if(!Object.hasOwn(e, 'activity_id')){
            this.activity_id = e.activity_id;
            if (!Object.hasOwn(e, 'activity_id')) {
                uni.navigateBack();
            }
            this.longitude = uni.getStorageSync('userLongitude');
@@ -141,9 +141,9 @@
            /*获取产品详情*/
            this.getData();
            // this.getTabBarLinks();
            if(uni.getStorageSync('citySupplierRes')){
                let resData=uni.getStorageSync('citySupplierRes');
                this.city_supplier_ids=resData.supplier_ids;
            if (uni.getStorageSync('citySupplierRes')) {
                let resData = uni.getStorageSync('citySupplierRes');
                this.city_supplier_ids = resData.supplier_ids;
            }
        },
        mounted() {
@@ -167,9 +167,9 @@
                let self = this;
                self.isloadding = true;
                self._get('branch.activityCart/lists', {
                    longitude:self.longitude,
                    latitude:self.latitude,
                    activity_id:self.activity_id
                    longitude: self.longitude,
                    latitude: self.latitude,
                    activity_id: self.activity_id
                }, function(res) {
                    let auto = uni.getStorageSync('TabBar').is_auto && uni.getStorageSync('TabBar').is_auto != 0;
                    self.is_auto = auto;
@@ -223,15 +223,15 @@
                //先把其他商户的去掉 by yj 2024.3.11
                let self = this;
                self.tableData.forEach(item => {
                    if(item.shop_supplier_id != this.tableData[supplier_index].shop_supplier_id ){
                    if (item.shop_supplier_id != this.tableData[supplier_index].shop_supplier_id) {
                        this.$set(item, 'checked', false);
                        item.productList.forEach(product => {
                            product.checked = false;
                        });
                    }
                });
                e.checked = !e.checked;
                this.$set(this.tableData[supplier_index].productList, index, e);
                console.log(this.tableData)
@@ -275,7 +275,7 @@
            /* 店铺全选 */
            checkStprItem(itemp, index) {
                let self = this;
                //先把其他商户的去掉 by yj 2024.3.11
                self.tableData.forEach(item => {
                    this.$set(item, 'checked', false);
@@ -283,18 +283,22 @@
                        product.checked = false;
                    });
                });
                //console.log(itemp)
                itemp.checked = !itemp.checked;
                itemp.productList.forEach((item, index) => {
                    item.checked = itemp.checked;
                })
                self.updateTotalPrice();
                // 更新选中记录
                self.onUpdateChecked();
                // 更新全选状态
                this.checkedAll = this.getCheckedData().length == this.totalProduct;
            },
            gotoShopPage(shop_supplier_id) {
                uni.setStorageSync('shop_supplier_id', shop_supplier_id)
                this.gotoPage('/pages/shop/shop?shop_supplier_id=' + shop_supplier_id)
            },
            /*全选*/
            onCheckedAll() {
@@ -336,7 +340,8 @@
                    });
                    return false;
                }
                this.gotoPage('/pages/order/confirm-order?&branch_activity_id='+self.activity_id+'&order_type=cart&cart_ids=' + arrIds);
                this.gotoPage('/pages/order/confirm-order?&branch_activity_id=' + self.activity_id +
                    '&order_type=cart&cart_ids=' + arrIds);
            },
            /*添加*/
            addFunc(item) {
@@ -351,10 +356,10 @@
                    'branch.activityCart/add', {
                        product_id: product_id,
                        spec_sku_id: spec_sku_id,
                        activity_id:self.activity_id,
                        activity_id: self.activity_id,
                        total_num: 1,
                        longitude:self.longitude,
                        latitude:self.latitude
                        longitude: self.longitude,
                        latitude: self.latitude
                    },
                    function(res) {
                        uni.hideLoading()
@@ -369,7 +374,7 @@
            /*减少*/
            reduceFunc(item) {
                let self = this;
                let product_id = item.product_id;
                let spec_sku_id = item.spec_sku_id;
                let service_index = item.service_index;
@@ -377,7 +382,7 @@
                    return;
                }
                //最低起卖个数
                if(item.min_sell >= item.total_num){
                if (item.min_sell >= item.total_num) {
                    return;
                }
                uni.showLoading({
@@ -385,11 +390,11 @@
                });
                self._post(
                    'branch.activityCart/sub', {
                        activity_id:self.activity_id,
                        activity_id: self.activity_id,
                        product_id: product_id,
                        spec_sku_id: spec_sku_id,
                        longitude:self.longitude,
                        latitude:self.latitude
                        longitude: self.longitude,
                        latitude: self.latitude
                    },
                    function(res) {
                        self.loadding = false;
@@ -417,9 +422,9 @@
                            self._post(
                                'branch.activityCart/delete', {
                                    cart_id: cartIds,
                                    activity_id:self.activity_id,
                                    longitude:self.longitude,
                                    latitude:self.latitude
                                    activity_id: self.activity_id,
                                    longitude: self.longitude,
                                    latitude: self.latitude
                                },
                                function(res) {
                                    // 删除选中的商品
@@ -458,11 +463,11 @@
                        }
                    });
                });
                self.$nextTick(()=>{
                self.$nextTick(() => {
                    // 更新选中记录
                    self.onUpdateChecked();
                })
                return true;
            },
            /**
@@ -652,6 +657,7 @@
        background: #ffffff;
        z-index: 1000;
    }
    // .bottom-btns.is_auto {
    //     bottom: calc(env(safe-area-inset-bottom) + 98rpx);
    // }
@@ -712,4 +718,4 @@
        width: 32rpx;
        height: 32rpx;
    }
</style>
</style>
mobile/pages/cart/cart.vue
@@ -22,7 +22,7 @@
                                            :checked="supplier_item.checked" />
                                    </label>
                                    <view class="d-a-c"
                                        @tap="gotoPage('/pages/shop/shop?shop_supplier_id='+supplier_item.supplier.shop_supplier_id)">
                                        @tap="gotoShopPage(supplier_item.supplier.shop_supplier_id)">
                                        <i class="icon iconfont icon-dianpu1"></i>
                                        <text class="f32 gray3">{{supplier_item.supplier.name}}</text>
                                    </view>
@@ -208,6 +208,10 @@
                let checkedData = uni.getStorageSync('checkedData');
                return checkedData ? checkedData : [];
            },
            gotoShopPage(shop_supplier_id) {
                uni.setStorageSync('shop_supplier_id', shop_supplier_id)
                this.gotoPage('/pages/shop/shop?shop_supplier_id=' + shop_supplier_id)
            },
            /*单选*/
            checkItem(e, supplier_index, index) {
mobile/pages/order/myorder.vue
@@ -433,6 +433,7 @@
                this.isPayPopup = false;
            },
            toShop(id) {
                uni.setStorageSync('shop_supplier_id', id)
                this.gotoPage('/pages/shop/shop?shop_supplier_id=' + id);
            },
            /*去支付*/
mobile/pages/order/order-detail.vue
@@ -74,7 +74,7 @@
        <!--购物列表-->
        <view class="shops group bg-white">
            <view class="group-hd border-b-e"
                @tap="gotoPage('/pages/shop/shop?shop_supplier_id='+detail.supplier.shop_supplier_id)">
                @tap="gotoShopPage(detail.supplier.shop_supplier_id)">
                <view class="left ">
                    <i class="icon iconfont icon-dianpu1"></i>
                    <text class="min-name">{{detail.supplier.name}}</text>
@@ -551,6 +551,10 @@
                    }
                });
            },
            gotoShopPage(shop_supplier_id) {
                uni.setStorageSync('shop_supplier_id', self.shop_supplier_id)
                this.gotoPage('/pages/shop/shop?shop_supplier_id=' + shop_supplier_id)
            },
            /*查看物流*/
            gotoExpress(order_id) {
                this.gotoPage('/pages/order/express/express?order_id=' + order_id);
mobile/pages/plus/assemble/detail/detail.vue
@@ -489,6 +489,7 @@
            //跳转店铺首页
            goto_shop() {
                let self = this;
                uni.setStorageSync('shop_supplier_id', self.detail.supplier.shop_supplier_id)
                self.gotoPage('/pages/shop/shop?shop_supplier_id=' + self.detail.supplier.shop_supplier_id);
            },
        },
mobile/pages/plus/bargain/detail/detail.vue
@@ -451,6 +451,7 @@
            //跳转店铺首页
            goto_shop() {
                let self = this;
                uni.setStorageSync('shop_supplier_id', self.detail.supplier.shop_supplier_id)
                self.gotoPage('/pages/shop/shop?shop_supplier_id=' + self.detail.supplier.shop_supplier_id);
            },
        }
mobile/pages/plus/business/detail.vue
@@ -238,6 +238,7 @@
            },
            // 跳转到平台
            goToPlatform() {
                uni.setStorageSync('shop_supplier_id', 1)
                uni.navigateTo({
                    url: '/pages/shop/shop?shop_supplier_id=1'
                });
@@ -249,6 +250,7 @@
                    user_id: _this.businessInfo.user_id
                }, function(res) {
                    if (res.data.list) {
                        uni.setStorageSync('shop_supplier_id', res.data.list.shop_supplier_id)
                        uni.navigateTo({
                            url: '/pages/shop/shop?shop_supplier_id=' + res.data.list.shop_supplier_id
                        });
@@ -322,7 +324,7 @@
            }
            return {
                title: '电子名片',
                path: `/pages/plus/business/detail?business_card_id=${this.business_card_id}`
                path: `/pages/plus/business/detail?business_card_id=${this.business_card_id}&referee_id=${this.businessInfo.user_id}`
            };
        },
        onShareTimeline() {
mobile/pages/plus/points/detail/detail.vue
@@ -371,6 +371,7 @@
            //跳转店铺首页
            goto_shop() {
                let self = this;
                uni.setStorageSync('shop_supplier_id',  self.detail.supplier.shop_supplier_id)
                self.gotoPage('/pages/shop/shop?shop_supplier_id=' + self.detail.supplier.shop_supplier_id);
            },
        }
mobile/pages/plus/seckill/detail/detail.vue
@@ -416,6 +416,7 @@
            //跳转店铺首页
            goto_shop() {
                let self = this;
                uni.setStorageSync('shop_supplier_id',  self.detail.supplier.shop_supplier_id)
                self.gotoPage('/pages/shop/shop?shop_supplier_id=' + self.detail.supplier.shop_supplier_id);
            },
mobile/pages/product/detail/detail.vue
@@ -860,6 +860,7 @@
            if(store_id){
                this.gotoPage('pages2/goodstore/detail?store_id=' + store_id);
            }else{
                uni.setStorageSync('shop_supplier_id',self.shop_supplier_id)
                self.gotoPage('/pages/shop/shop?shop_supplier_id=' + self.shop_supplier_id);
            }
            
mobile/pages/shop/shop.vue
@@ -32,15 +32,18 @@
        <!-- #endif -->
        <diy style="position: relative;" :diyItems="items" :city_supplier_ids="city_supplier_ids"
            :index_open_city="index_open_city"></diy>
        <tabBar :vars="vars"></tabBar>
    </view>
</template>
<script>
    import uniLoadMore from "@/components/uni-load-more.vue";
    import diy from '@/components/diy/diy.vue';
    import tabBar from "@/components/shoptabbar/footTabbar.vue"
    export default {
        components: {
            uniLoadMore
            uniLoadMore,
            tabBar
        },
        data() {
            return {
@@ -119,9 +122,14 @@
                city_supplier_ids:[],    
                index_cityname:'',    
                index_open_city:0,
                openCategory: {
                    color: "#000000",
                    open: 0
                },
                items: [],
                url:'',
                toplogo:''
                toplogo:'',
                vars:{}
            }
        },
        computed: {
@@ -141,8 +149,10 @@
        onLoad(option) {
            let self = this;
            self.GetStatusBarHeight();
            self.shop_supplier_id = option.shop_supplier_id;
            uni.setStorageSync('shop_supplier_id',self.shop_supplier_id)
            if( option.shop_supplier_id){
                uni.setStorageSync('shop_supplier_id',option.shop_supplier_id)
            }
            self.shop_supplier_id = option.shop_supplier_id||uni.getStorageSync('shop_supplier_id');
            //#ifdef H5
            if (this.isWeixin()) {
                this.url = window.location.href;
@@ -521,6 +531,8 @@
                    self.title_type = res.data.page.params.title_type;
                    self.titleTextColor = res.data.page.style.titleTextColor;
                    self.openCategory = res.data.page.category;
                    self.vars = res.data.vars;
                    console.log(self.vars);
                    self.index_open_city=res.data.setting.store.index_open_city;
                    self.underline_price_show=res.data.setting.store.underline_price_show;
                    if(res.data.setting.store.index_open_city==1){
mobile/pages/shop/shop_list.vue
@@ -287,6 +287,7 @@
            //跳转店铺首页
            goto_shop(shop_supplier_id) {
                uni.setStorageSync('shop_supplier_id',shop_supplier_id)
                this.gotoPage('/pages/shop/shop?shop_supplier_id=' + shop_supplier_id);
            },
            //跳转商品页面
mobile/pages/user/my-coupon/my-coupon.vue
@@ -17,7 +17,7 @@
                            <view class="con_tit">{{item.name}}</view>
                        </view>
                        <view>
                            <button v-if="item.shop_supplier_id>0" class="btn-red-border btn-to-shop" @click="gotoPage('/pages/shop/shop?shop_supplier_id=' + item.shop_supplier_id)">进店</button>
                            <button v-if="item.shop_supplier_id>0" class="btn-red-border btn-to-shop" @click="gotoShopPage(item.shop_supplier_id)">进店</button>
                        </view>
                    </view>
                    <view v-for="(sup_item,sup_index) in item.list" :key="sup_index" class="coupon_item"
@@ -184,6 +184,10 @@
                    self.getSup();
                });
            },
            gotoShopPage(shop_supplier_id) {
                uni.setStorageSync('shop_supplier_id', shop_supplier_id)
                this.gotoPage('/pages/shop/shop?shop_supplier_id=' + shop_supplier_id)
            },
            /* 优惠券分类 */
            getSup() {
                let self = this;
mobile/pages/user/my_collect/my_collect.vue
@@ -126,6 +126,7 @@
            },
            //跳转店铺首页
            goto_shop(shop_supplier_id) {
                uni.setStorageSync('shop_supplier_id', shop_supplier_id)
                this.gotoPage('/pages/shop/shop?shop_supplier_id=' + shop_supplier_id);
            },
            //跳转商品页面
mobile/pages/user/my_shop/my_shop.vue
@@ -317,6 +317,7 @@
                        self.store_open = true;
                    }
                    self.menu_list[0].url = '/pages/shop/shop?shop_supplier_id=' + self.shop_supplier_id;
                    uni.setStorageSync('shop_supplier_id',  self.shop_supplier_id)
                    //#ifdef MP-WEIXIN
                    self.store_open = res.data.store_open;
                    //#endif
mobile/pages3/release/chat/chat_list.vue
@@ -19,6 +19,7 @@
        <view class="hint" v-if="imList.length==0">
            您当前并没有与任何人聊天哦!
        </view>
        <shopTabBar></shopTabBar>
    </view>
</template>
mobile/pages3/release/demandapply/apply.vue
@@ -45,6 +45,7 @@
                </view>
            </view>
        </template>
        <shopTabBar></shopTabBar>
    </view>
</template>
mobile/pages3/release/demandindex/index.vue
@@ -116,6 +116,7 @@
                <button type="primary" class="btn-gcred" @click="apply()">立即申请入驻</button>
            </view>
        </template>
        <shopTabBar></shopTabBar>
    </view>
</template>
mobile/pages3/release/demandorder/index.vue
@@ -107,6 +107,7 @@
            </view>
            <view class="bts"></view>
        </Popup>
        <shopTabBar></shopTabBar>
        
    </view>
</template>
mobile/pages3/release/demandproject/index.vue
@@ -56,6 +56,7 @@
        </view>
        
        <view class="add_add" @click="addRelease()">我要发布</view> 
        <shopTabBar></shopTabBar>
        
        
    </view>
mobile/pages3/release/project/list.vue
@@ -79,6 +79,7 @@
        </view>
        
        <shopTabBar></shopTabBar>
        
    </view>
</template>
mobile/pages3/release/supplyapply/apply.vue
@@ -45,7 +45,7 @@
                </view>
            </view>
        </template>
        <shopTabBar></shopTabBar>
    </view>
</template>
mobile/pages3/release/supplycash/apply/apply.vue
@@ -91,7 +91,7 @@
            </form>
        </view>
        <shopTabBar></shopTabBar>
    </view>
</template>
mobile/pages3/release/supplycash/list/list.vue
@@ -43,7 +43,7 @@
                <uni-load-more v-else :loadingType="loadingType"></uni-load-more>
            </view>
        </scroll-view>
        <shopTabBar></shopTabBar>
    </view>
</template>
mobile/pages3/release/supplyindex/index.vue
@@ -127,6 +127,7 @@
                <button type="primary" class="btn-gcred" @click="apply()">立即申请入驻</button>
            </view>
        </template>
        <shopTabBar></shopTabBar>
    </view>
</template>
mobile/pages3/release/supplyorder/index.vue
@@ -66,6 +66,7 @@
        </view>
        
        <shopTabBar></shopTabBar>
    </view>
</template>
mobile/pages3/release/supplyproject/index.vue
@@ -56,8 +56,7 @@
        </view>
        
        <view class="add_add" @click="addRelease()">我要发布</view> 
        <shopTabBar></shopTabBar>
    </view>
</template>
supplier_vue/src/components/setlink/SetTab.vue
@@ -14,6 +14,9 @@
      <!-- <el-tab-pane label="产品" name="product"><Product v-if="activeName == 'product'" @changeData="activeDataFunc"></Product></el-tab-pane> -->
      <el-tab-pane label="文章" name="Article"><Article v-if="activeName == 'Article'" @changeData="activeDataFunc"></Article></el-tab-pane>
      <el-tab-pane label="自定义" name="diypage"><DiyPage v-if="activeName == 'diypage'" @changeData="activeDataFunc"></DiyPage></el-tab-pane>
      <el-tab-pane v-if="supplier.is_release" label="供需" name="release">
        <Release v-if="activeName == 'release'" @changeData="activeDataFunc"></Release>
      </el-tab-pane>
    </el-tabs>
    <div slot="footer" class="dialog-footer d-b-c">
      <div class="flex-1">
@@ -46,8 +49,11 @@
import Article from './part/Article.vue';
import SmallProgram from './part/SmallProgram.vue';
import H5 from './part/H5.vue';
import Release from "./part/Release.vue";
import SettingApi from '@/api/setting.js';
export default {
  components: {
    Release,
    Pages,
    Marketing,
    Product,
@@ -62,14 +68,26 @@
      dialogVisible: true,
      /*选中的链接*/
      activeData: null,
      activeName: 'pages'
      activeName: 'pages',
      supplier: {}
    };
  },
  props: ['is_linkset'],
  created() {
    this.getSupplier();
    this.dialogVisible = this.is_linkset;
  },
  methods: {
    /*获取供应商列表*/
    getSupplier(){
      SettingApi.getSupplier().then(res => {
        console.log(res);
        this.supplier = res.data.model;
      })
        .catch(error => {
          this.loading = false;
        });
    },
    /*关闭弹窗*/
    dialogFormVisible(e) {
      if (e) {
supplier_vue/src/components/setlink/Setlink.vue
@@ -13,6 +13,9 @@
      <el-tab-pane label="产品" name="product">
        <Product v-if="activeName == 'product'" @changeData="activeDataFunc"></Product>
      </el-tab-pane>
      <el-tab-pane v-if="supplier.is_release" label="供需" name="release">
        <Release v-if="activeName == 'release'" @changeData="activeDataFunc"></Release>
      </el-tab-pane>
    </el-tabs>
    <div slot="footer" class="dialog-footer d-b-c">
      <div class="flex-1">
@@ -40,10 +43,13 @@
<script>
import Product from './part/Product.vue';
import Pages from './part/Pages.vue';
import Release from './part/Release.vue';
import SettingApi from '@/api/setting.js';
export default {
  components: {
    Product,
    Pages
    Pages,
    Release
  },
  data() {
    return {
@@ -51,14 +57,27 @@
      dialogVisible: true,
      /*选中的链接*/
      activeData: null,
      activeName: 'product'
      activeName: 'pages',
      /*供应商列*/
      supplier: []
    };
  },
  props: ['is_linkset'],
  created() {
    this.getSupplier();
    this.dialogVisible = this.is_linkset;
  },
  methods: {
    /*获取供应商列表*/
    getSupplier(){
      SettingApi.getSupplier().then(res => {
        console.log(res);
        this.supplier = res.data.model;
      })
      .catch(error => {
        this.loading = false;
      });
    },
    /*关闭弹窗*/
    dialogFormVisible(e) {
      if (e) {
supplier_vue/src/components/setlink/part/Pages.vue
@@ -15,11 +15,11 @@
            return {
                /*页面数据*/
                pages: [
                    /*{
                        url: 'pages/index/index',
                    {
                        url: 'pages/shop/shop',
                        name: '首页',
                        type: '页面'
                    },*/
                    },
                    {
                        url: 'pages/shop/category',
                        name: '分类',
supplier_vue/src/components/setlink/part/Release.vue
New file
@@ -0,0 +1,426 @@
<template>
  <!--
        作者:luoyiming
        时间:2020-06-08
        描述:超链接选择-供需
    -->
  <div class="marketing-box">
    <el-tabs v-model="activeTab">
      <el-tab-pane label="页面" name="pages"></el-tab-pane>
      <el-tab-pane label="需求" name="demand"></el-tab-pane>
      <el-tab-pane label="供应" name="supply"></el-tab-pane>
      <el-tab-pane label="分类" name="classification"></el-tab-pane>
    </el-tabs>
    <div v-if="activeTab == 'pages'">
      <el-select v-model="activePage" placeholder="请选择" class="percent-w100" @change="changeFunc" value-key="url">
        <el-option v-for="item in pages" :key="item.url" :value-key="item.name" :label="item.name" :value="item"></el-option>
      </el-select>
    </div>
    <div class="product" v-if="activeTab == 'classification'">
      <!--内容-->
      <div class="product-content" v-loading="loading">
        <div class="table-wrap type-table">
          <el-cascader class="ww100"
                       ref="cascader"
                       v-model="categoryActive"
                       :options="categoryList"
                       :props="{ children: 'child', value: 'category_id', label: 'name' }"
                       @change="changeCategory">
          </el-cascader>
        </div>
      </div>
    </div>
    <div class="product-list" v-if="activeTab == 'demand'" v-loading="loading">
      <!--搜索表单-->
      <div class="common-seach-wrap">
        <el-form size="small" :inline="true" :model="searchForm" class="demo-form-inline">
          <el-form-item label="名称"><el-input size="small" v-model="searchForm.name" placeholder="请输入名称"></el-input></el-form-item>
          <el-form-item>
            <el-button size="small" icon="el-icon-search" @click="onSubmit">查询</el-button>
          </el-form-item>
        </el-form>
      </div>
      <!--内容-->
      <div class="product-content">
        <div class="table-wrap setlink-product-table">
          <el-table size="mini" :data="tableData" border style="width: 100%">
            <el-table-column prop="product_name" label="需求">
              <template slot-scope="scope">
                <div class="product-info">
                  <!--                  <div class="pic"><img v-img-url="scope.row.image[0].file_path" alt="" /></div>-->
                  <div class="info">
                    <div class="name text-ellipsis">{{ scope.row.name }}</div>
                  </div>
                </div>
              </template>
            </el-table-column>
            <el-table-column prop="price" label="价格" width="100">
              <template slot-scope="scope">
                <span class="red">{{scope.row.price}}</span>
              </template>
            </el-table-column>
            <el-table-column label="操作" width="80">
              <template slot-scope="scope">
                <el-button size="mini" @click="changeFunc(scope.row)">选择</el-button>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </div>
      <!--分页-->
      <div class="pagination">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          background
          :current-page="curPage"
          :page-size="pageSize"
          layout="total, prev, pager, next, jumper"
          :total="totalDataNumber"
        ></el-pagination>
      </div>
    </div>
    <div class="product-list" v-if="activeTab == 'supply'" v-loading="loading">
    <!--搜索表单-->
    <div class="common-seach-wrap">
      <el-form size="small" :inline="true" :model="searchForm" class="demo-form-inline">
        <el-form-item label="名称"><el-input size="small" v-model="searchForm.name" placeholder="请输入名称"></el-input></el-form-item>
        <el-form-item>
          <el-button size="small" icon="el-icon-search" @click="onSubmit">查询</el-button>
        </el-form-item>
      </el-form>
    </div>
    <!--内容-->
    <div class="product-content">
      <div class="table-wrap setlink-product-table">
        <el-table size="mini" :data="tableData" border style="width: 100%">
          <el-table-column prop="product_name" label="需求">
            <template slot-scope="scope">
              <div class="product-info">
                <!--                  <div class="pic"><img v-img-url="scope.row.image[0].file_path" alt="" /></div>-->
                <div class="info">
                  <div class="name text-ellipsis">{{ scope.row.name }}</div>
                </div>
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="price" label="价格" width="100">
            <template slot-scope="scope">
              <span class="red">{{scope.row.price}}</span>
            </template>
          </el-table-column>
          <el-table-column label="操作" width="80">
            <template slot-scope="scope">
              <el-button size="mini" @click="changeFunc(scope.row)">选择</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </div>
    <!--分页-->
    <div class="pagination">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        background
        :current-page="curPage"
        :page-size="pageSize"
        layout="total, prev, pager, next, jumper"
        :total="totalDataNumber"
      ></el-pagination>
    </div>
  </div>
  </div>
</template>
<script>
import releaseApi from '@/api/plus/release.js';
export default {
  data() {
    return {
      /*是否正在加载*/
      loading: true,
      /*tab切换选择中值*/
      activeTab: 'pages',
      /*产品类别列表*/
      categoryList:[],
      /*当前选中*/
      categoryActive:[],
      /*搜索表单对象*/
      searchForm: {
        name: ''
      },
      /*产品数据表*/
      tableData: [],
      /*一页多少条*/
      pageSize: 5,
      /*一共多少条数据*/
      totalDataNumber: 0,
      /*当前是第几页*/
      curPage: 1,
      /*选中的页面值*/
      activePage: null,
      /*页面数据*/
      pages: [
        {
            url: 'pages3/release/demandapply/apply',
            name: '需求方申请',
            type: '页面'
        },
        {
          url: 'pages3/release/supplyapply/apply',
          name: '供求方申请',
          type: '页面'
        },
        {
            url: 'pages3/release/demandindex/index',
            name: '需求方',
            type: '页面',
        },
        {
            url: 'pages3/release/supplyindex/index',
            name: '供求方',
            type: '页面',
        },
        {
            url: 'pages3/release/demandproject/index',
            name: '发布需求',
            type: '页面',
        },
        {
            url: 'pages3/release/demandproject/release',
            name: '我要发布',
            type: '页面',
        },
        {
            url: 'pages3/release/demandproject/edit',
            name: '修改信息',
            type: '页面',
        },
        {
            url: 'pages3/release/supplyproject/index',
            name: '发布服务',
            type: '页面',
        },
        {
            url: 'pages3/release/project/list',
            name: '供需大厅',
            type: '页面',
        },
        {
            url: 'pages3/release/project/detail',
            name: '供需详情',
            type: '页面',
        },
        {
            url: 'pages3/release/demandorder/index',
            name: '需求订单',
            type: '页面',
        },
        {
            url: 'pages3/release/supplyorder/index',
            name: '供求订单',
            type: '页面',
        },
        {
            url: 'pages3/release/chat/chat_list',
            name: '聊天列表',
            type: '页面',
        },
      ],
    };
  },
  created() {
    /*获取产品类别*/
    this.getData();
  },
  watch: {
    activeTab: function(n, o) {
      if (n != o) {
        this.tableData = [];
        if (n == 'type') {
          this.autoType();
        }
        if (n == 'demand') {
          self.curPage=0
          this.getTableList();
        }
        if (n == 'supply') {
          self.curPage=0
          this.getSupplyList();
        }
      }
    }
  },
  methods: {
    /*选择第几页*/
    handleCurrentChange(val) {
      let self = this;
      self.curPage = val;
      self.getData();
    },
    /*每页多少条*/
    handleSizeChange(val) {
      this.pageSize = val;
      this.curPage=0;
      this.getData();
    },
    /*获取列表*/
    getData() {
      let self = this;
      releaseApi.catList({}, true)
        .then(data => {
          self.loading = false;
          self.categoryList = data.data.list;
        })
        .catch(error => {
          self.loading = false;
        });
    },
    /*获取列表*/
    getTableList() {
      let self = this;
      let Params = self.searchForm;
      Params.page = self.curPage;
      Params.list_rows = self.pageSize;
      releaseApi.demandProject(Params, true)
        .then(data => {
          self.loading = false;
          console.log(data);
          self.tableData = data.data.list.data;
          self.totalDataNumber = data.data.list.total;
        })
        .catch(error => {
        });
    },
    /*获取列表*/
    getSupplyList() {
      let self = this;
      let Params = self.searchForm;
      Params.page = self.curPage;
      Params.list_rows = self.pageSize;
      releaseApi.supplyProject(Params, true)
        .then(data => {
          self.loading = false;
          self.tableData = data.data.list.data;
          self.totalDataNumber = data.data.list.total;
        })
        .catch(error => {
        });
    },
    /*获取列表*/
    /*getData() {
      let self = this;
      self.loading = true;
      let Params = {};
      Params.page = self.curPage;
      Params.list_rows = self.pageSize;
      Params.product_name = self.searchForm.product_name;
      PorductApi.productList(Params, true)
        .then(data => {
          self.loading = false;
          self.tableData = data.data.list.data;
          self.categoryList = data.data.category;
          self.totalDataNumber = data.data.list.total;
          if(self.curPage==1&&self.tableData.length>0){
            self.changeFunc(self.tableData[0]);
          }
        })
        .catch(error => {
          self.loading = false;
        });
    },*/
    /*搜索查询*/
    onSubmit() {
      if (this.activeTab  == 'demand') {
        self.curPage=0
        this.getTableList();
      }
      if (this.activeTab  == 'supply') {
        self.curPage=0
        this.getSupplyList();
      }
    },
    /*选中的值*/
    changeFunc(e) {
      let obj={};
      if (this.activeTab == 'demand') {
        obj.name = e.name;
        obj.url = 'pages3/release/project/detail?project_id=' + e.category_id;
        obj.type = '需求';
      }
      if (this.activeTab == 'supply') {
        obj.name = e.name;
        obj.url = 'pages3/release/project/detail?project_id=' + e.category_id;
        obj.type = '供应';
      }
      if (this.activeTab == 'pages') {
        obj=e;
      }
      if (this.activeTab == 'classification') {
        obj.name = e.name;
        obj.url = 'pages2/release/project/list?category_id=' + e.category_id;
        obj.type = '供需分类';
      }
      this.$emit('changeData', obj);
    },
    /*自动选择类别*/
    autoType(i){
      i=i|0;
      this.categoryActive=[];
      if(this.categoryList.length>0){
        let item=this.categoryList[i];
        this.categoryActive.push(item.category_id);
        if(item.child&&typeof item.child!='undefined'&&item.child.length>0){
          this.categoryActive.push(item.child[0].category_id);
          this.changeFunc(item.child[0]);
        }else{
          i++;
          this.autoType(i);
        }
      }
    },
    /*选择类别*/
    changeCategory(e){
      let item= this.$refs['cascader'].getCheckedNodes();
      this.changeFunc(item[0].data);
    },
  }
};
</script>
<style scoped>
.table-wrap.setlink-product-table .product-info .pic {
  width: 20px;
  height: 20px;
  background: #FFFFFF;
}
.table-wrap.setlink-product-table .product-info .pic img {
  width: 20px;
  height: 20px;
}
.marketing-box .el-tree-node__content {
  height: 30px;
}
.marketing-box .el-tree-node__content {
  margin-bottom: 10px;
}
</style>