3 files added
39 files modified
| | |
| | | ); |
| | | // 扫一扫参数 |
| | | $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); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | //底部导航 |
| | | 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); |
| | |
| | | /** |
| | | * 获取指定项设置 |
| | | */ |
| | | 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']; |
| | |
| | | $model = SupplierModel::detail($shop_supplier_id, ['logo', 'business', 'qyQrcode','superUser.user']); |
| | | $category = CategoryModel::getALL(); |
| | | $region = AreaModel::getALL(); |
| | | |
| | | //获取站点设置 |
| | | $storeValues=SettingModel::getItem('store'); |
| | | $areaList=[]; |
| | |
| | | // 用户是否已绑定 |
| | | $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); |
| | | // 修改登录用户 |
| | |
| | | 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; |
| | | |
| | | /** |
| | | * 管理员 |
| | |
| | | |
| | | 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']); |
| New file |
| | |
| | | <?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')); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | public function bottomnav() |
| | | { |
| | | $vars = SettingModel::getItem(SettingEnum::NAV); |
| | | $vars = SettingModel::getItem(SettingEnum::NAV.'_'.$this->getSupplierId()); |
| | | return $this->renderSuccess('', compact('vars')); |
| | | } |
| | | |
| | |
| | | { |
| | | $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() ?: '操作失败'); |
| New file |
| | |
| | | <?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; |
| | | } |
| | | } |
| | |
| | | */ |
| | | 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 |
| | |
| | | |
| | | <script> |
| | | export default { |
| | | props:['vars'], |
| | | data() { |
| | | return { |
| | | /*当前选中*/ |
| | |
| | | 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() { |
| | |
| | | let self = this; |
| | | self._get('index/nav', {}, function(res) { |
| | | self.detail = res.data.vars.data; |
| | | |
| | | uni.setStorageSync('TabBar', res.data.vars.data); |
| | | self.hasmenu(); |
| | | }); |
| | |
| | | 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 |
| | |
| | | <template> |
| | | <view :data-theme='theme()' :class="theme() || ''"> |
| | | <view :data-theme='theme()' :class="theme() || ''"> |
| | | <!-- #ifdef APP-PLUS --> |
| | | <header-bar></header-bar> |
| | | <!-- #endif --> |
| | |
| | | <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> |
| | |
| | | <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)" |
| | |
| | | |
| | | <!--底部按钮--> |
| | | <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> |
| | |
| | | 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'); |
| | |
| | | /*获取产品详情*/ |
| | | 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() { |
| | |
| | | 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; |
| | |
| | | //先把其他商户的去掉 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) |
| | |
| | | /* 店铺全选 */ |
| | | checkStprItem(itemp, index) { |
| | | let self = this; |
| | | |
| | | |
| | | //先把其他商户的去掉 by yj 2024.3.11 |
| | | self.tableData.forEach(item => { |
| | | this.$set(item, 'checked', false); |
| | |
| | | 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() { |
| | |
| | | }); |
| | | 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) { |
| | |
| | | '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() |
| | |
| | | /*减少*/ |
| | | 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; |
| | |
| | | return; |
| | | } |
| | | //最低起卖个数 |
| | | if(item.min_sell >= item.total_num){ |
| | | if (item.min_sell >= item.total_num) { |
| | | return; |
| | | } |
| | | uni.showLoading({ |
| | |
| | | }); |
| | | 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; |
| | |
| | | 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) { |
| | | // 删除选中的商品 |
| | |
| | | } |
| | | }); |
| | | }); |
| | | self.$nextTick(()=>{ |
| | | self.$nextTick(() => { |
| | | // 更新选中记录 |
| | | self.onUpdateChecked(); |
| | | }) |
| | | |
| | | |
| | | return true; |
| | | }, |
| | | /** |
| | |
| | | background: #ffffff; |
| | | z-index: 1000; |
| | | } |
| | | |
| | | // .bottom-btns.is_auto { |
| | | // bottom: calc(env(safe-area-inset-bottom) + 98rpx); |
| | | // } |
| | |
| | | width: 32rpx; |
| | | height: 32rpx; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | :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> |
| | |
| | | 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) { |
| | |
| | | this.isPayPopup = false; |
| | | }, |
| | | toShop(id) { |
| | | uni.setStorageSync('shop_supplier_id', id) |
| | | this.gotoPage('/pages/shop/shop?shop_supplier_id=' + id); |
| | | }, |
| | | /*去支付*/ |
| | |
| | | <!--购物列表--> |
| | | <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> |
| | |
| | | } |
| | | }); |
| | | }, |
| | | 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); |
| | |
| | | //跳转店铺首页 |
| | | 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); |
| | | }, |
| | | }, |
| | |
| | | //跳转店铺首页 |
| | | 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); |
| | | }, |
| | | } |
| | |
| | | }, |
| | | // 跳转到平台 |
| | | goToPlatform() { |
| | | uni.setStorageSync('shop_supplier_id', 1) |
| | | uni.navigateTo({ |
| | | url: '/pages/shop/shop?shop_supplier_id=1' |
| | | }); |
| | |
| | | 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 |
| | | }); |
| | |
| | | } |
| | | 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() { |
| | |
| | | //跳转店铺首页 |
| | | 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); |
| | | }, |
| | | } |
| | |
| | | //跳转店铺首页 |
| | | 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); |
| | | }, |
| | | |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | <!-- #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 { |
| | |
| | | city_supplier_ids:[], |
| | | index_cityname:'', |
| | | index_open_city:0, |
| | | openCategory: { |
| | | color: "#000000", |
| | | open: 0 |
| | | }, |
| | | items: [], |
| | | url:'', |
| | | toplogo:'' |
| | | toplogo:'', |
| | | vars:{} |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | 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; |
| | |
| | | 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){ |
| | |
| | | |
| | | //跳转店铺首页 |
| | | goto_shop(shop_supplier_id) { |
| | | uni.setStorageSync('shop_supplier_id',shop_supplier_id) |
| | | this.gotoPage('/pages/shop/shop?shop_supplier_id=' + shop_supplier_id); |
| | | }, |
| | | //跳转商品页面 |
| | |
| | | <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" |
| | |
| | | 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; |
| | |
| | | }, |
| | | //跳转店铺首页 |
| | | goto_shop(shop_supplier_id) { |
| | | uni.setStorageSync('shop_supplier_id', shop_supplier_id) |
| | | this.gotoPage('/pages/shop/shop?shop_supplier_id=' + shop_supplier_id); |
| | | }, |
| | | //跳转商品页面 |
| | |
| | | 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 |
| | |
| | | <view class="hint" v-if="imList.length==0"> |
| | | 您当前并没有与任何人聊天哦! |
| | | </view> |
| | | <shopTabBar></shopTabBar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <shopTabBar></shopTabBar> |
| | | |
| | | </view> |
| | | </template> |
| | |
| | | <button type="primary" class="btn-gcred" @click="apply()">立即申请入驻</button> |
| | | </view> |
| | | </template> |
| | | <shopTabBar></shopTabBar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | </view> |
| | | <view class="bts"></view> |
| | | </Popup> |
| | | <shopTabBar></shopTabBar> |
| | | |
| | | </view> |
| | | </template> |
| | |
| | | </view> |
| | | |
| | | <view class="add_add" @click="addRelease()">我要发布</view> |
| | | <shopTabBar></shopTabBar> |
| | | |
| | | |
| | | </view> |
| | |
| | | |
| | | </view> |
| | | |
| | | <shopTabBar></shopTabBar> |
| | | |
| | | </view> |
| | | </template> |
| | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <shopTabBar></shopTabBar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | </form> |
| | | |
| | | </view> |
| | | |
| | | <shopTabBar></shopTabBar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | <uni-load-more v-else :loadingType="loadingType"></uni-load-more> |
| | | </view> |
| | | </scroll-view> |
| | | |
| | | <shopTabBar></shopTabBar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | <button type="primary" class="btn-gcred" @click="apply()">立即申请入驻</button> |
| | | </view> |
| | | </template> |
| | | <shopTabBar></shopTabBar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | |
| | | </view> |
| | | |
| | | <shopTabBar></shopTabBar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | </view> |
| | | |
| | | <view class="add_add" @click="addRelease()">我要发布</view> |
| | | |
| | | |
| | | <shopTabBar></shopTabBar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | <!-- <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"> |
| | |
| | | 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, |
| | |
| | | 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) { |
| | |
| | | <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"> |
| | |
| | | <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 { |
| | |
| | | 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) { |
| | |
| | | return { |
| | | /*页面数据*/ |
| | | pages: [ |
| | | /*{ |
| | | url: 'pages/index/index', |
| | | { |
| | | url: 'pages/shop/shop', |
| | | name: '首页', |
| | | type: '页面' |
| | | },*/ |
| | | }, |
| | | { |
| | | url: 'pages/shop/category', |
| | | name: '分类', |
| New file |
| | |
| | | <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> |