承接 andrewdanilov/yii2-city-switch 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

andrewdanilov/yii2-city-switch

Composer 安装命令:

composer require andrewdanilov/yii2-city-switch

包简介

Widget for switching city on site

README 文档

README

Warning: component is under cunstruction. Do not use it.

Component for switching city on site. You can display a personificated info associated to selected city (for example address or phone in that city). It uses cookies, so pay attention to that fact, that by changing city you do not change page web address.

Installation

The preferred way to install this extension is through composer.

Either run

composer require andrewdanilov/yii2-city-switch "~1.0.0"

or add

"andrewdanilov/yii2-city-switch": "~1.0.0"

to the require section of your composer.json file.

Then you need to run migrations, to create cities table

yii migrate --migrationPath=@andrewdanilov/cityswitch/migrations

Usage

Add to bootstrap section in main config of your backend:

return [
	...
	'bootstrap' => [
		...
		'cityswitch' => [
			'class' => andrewdanilov\cityswitch\backend\Bootstrap,
			// data params which you want to be associated with each city
			// in addition to city alias (`city`) and city name (`city_name`)
			'dataParams' => [
				'address' => 'City address',
				'phone' => 'City phone',
				'coords' => 'City address coordinates',
			],
			// defining access to module
			'access' => ['admin'],
		],
	],
];

This needs to edit cities data in backend of your site. Backend url would be:

admin/cityswitch

To display city switcher menu, use:

<?= \andrewdanilov\cityswitch\CitySwitchMenu::widget() ?>

To display current city value:

<?= \andrewdanilov\cityswitch\CitySwitchValue::widget(['param' => 'phone']) ?>

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固