网站推广营销效果网站制作协议

news/2025/9/28 22:27:06/文章来源:
网站推广营销效果,网站制作协议,跨境进口网站怎么做,交友系统网站建设建议对ionic和AnjularJs有一定了解的人可以用到#xff0c;很多时候我们要用到选择省份、城市、区县的功能#xff0c;现在就跟着我来实现这个功能吧#xff0c;用很少的代码#xff08;我这里是根据客户的要求#xff0c;只显示想要显示的部分省份和其相对应的城市、区县…建议对ionic和AnjularJs有一定了解的人可以用到很多时候我们要用到选择省份、城市、区县的功能现在就跟着我来实现这个功能吧用很少的代码我这里是根据客户的要求只显示想要显示的部分省份和其相对应的城市、区县并且这些数据将通过后台放入数据库并没有引用完整的城市js 1.首先在所需要的HTML页面需要这些代码其中的样式都是自己定义的不喜欢的可以按照自己喜好来写 div classlistdiv classlist styleborder: 0;label classitem item-input item-select styleborder: 0div classinput-labelspanspan stylecolor: #6e6e6e /span/span/divselect stylefont-size: 16px ng-modeldata.currentProvinceIdng-optionspp.Id as pp.RegionName for pp in allProvincesng-changeswitchProvince(data.currentProvinceId)/select/label/divdiv classlist styleborder: 0label classitem item-input item-select styleborder: 0div classinput-labelspanspan stylecolor: #6e6e6e /span/span/divselect stylefont-size: 16px ng-optionscc.Id as cc.RegionName for cc in citiesng-modeldata.currentCityId ng-changeswitchCity(data.currentCityId)/select/label/divdiv classlist styleborder: 0label classitem item-input item-select styleborder: 0div classinput-labelspan stylecolor: #6e6e6e /span/divselect stylefont-size: 16px ng-optionsaa.Id as aa.RegionName for aa in areasng-modeldata.currentAreaId ng-changeswitchArea(data.currentAreaId)/select/label/div/div2.相应的控制器controller.js里 .controller(selectCityCtrl, function ($rootScope, $scope, $state, $filter, $ionicHistory, selectCitySvc, storageSvc, scollImageSvc, classIficationItemSvc) {$scope.currentCity selectCitySvc.getCurrentCity();$scope.allRegions selectCitySvc.getCacheAllAreas();$scope.allProvinces [{Id: 0, RegionName: 请选择省份}];$scope.cities [{Id: 0, RegionName: 请选择城市}];$scope.areas [{Id: 0, RegionName: 请选择区/县}];$scope.data {selectName: ,currentProvinceId: 0,currentCityId: 0,currentAreaId: 0};function getSelectedRegionId() {var regionId $scope.data.currentAreaId;if (regionId 0) {regionId $scope.data.currentCityId;}if (regionId 0) {regionId $scope.data.currentProvinceId;}return regionId;}function updateSelectRegionName() {var currentRegion $filter(filter)($scope.allRegions, {Id: getSelectedRegionId()}, true)[0];if (currentRegion) {$scope.data.selectName currentRegion.RegionName} else {$scope.data.selectName ;}}$scope.switchProvince function (currentProvinceId) {$scope.data.currentCityId 0;$scope.data.currentAreaId 0;$scope.cities.splice(1);$scope.areas.splice(1);var cities $filter(filter)($scope.allRegions, {RegionType: 1, ParentId: currentProvinceId});for (var i in cities) {$scope.cities.push(cities[i]);}updateSelectRegionName();};$scope.switchCity function (currentCityId) {$scope.data.currentAreaId 0;$scope.areas.splice(1);var areas $filter(filter)($scope.allRegions, {RegionType: 2, ParentId: currentCityId});for (var i in areas) {$scope.areas.push(areas[i]);}updateSelectRegionName();};//增加当切换县区的时候更换服务区名$scope.switchArea function (currentAreaId) {updateSelectRegionName();};var allProvinces $filter(filter)($scope.allRegions, {RegionType: 0});for (var i in allProvinces) {$scope.allProvinces.push(allProvinces[i]);}if ($scope.currentCity.RegionType 0) {// 如果上次选择省份$scope.data.currentProvinceId $scope.currentCity.Id;$scope.switchProvince($scope.currentCity.Id);} else if ($scope.currentCity.RegionType 1) {var province $filter(filter)($scope.allRegions, {Id: $scope.currentCity.ParentId}, true)[0];$scope.data.currentProvinceId province.Id;//省份$scope.switchProvince(province.Id);$scope.data.currentCityId $scope.currentCity.Id;$scope.switchCity($scope.currentCity.Id);} else if ($scope.currentCity.RegionType 2) {// 如果上次选择县区var city $filter(filter)($scope.allRegions, {Id: $scope.currentCity.ParentId}, true)[0];var province $filter(filter)($scope.allRegions, {Id: city.ParentId}, true)[0];$scope.data.currentProvinceId province.Id;$scope.switchProvince(province.Id);$scope.data.currentCityId city.Id;$scope.switchCity(city.Id);$scope.data.currentAreaId $scope.currentCity.Id;}$scope.user {province: || storageSvc.load(province.RegionName),city: || storageSvc.load(city.RegionName),area: || storageSvc.load(area.RegionName),currentCity: || storageSvc.load(selectCitySvc.getCurrentCity())};});3.效果如图        转载于:https://www.cnblogs.com/xiaojun-zxj/p/4766704.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/921207.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

企业网站设计文档菏泽做网站优化的

近日,江苏省数字经济学会公布了2023年度江苏省数字经济学会科学技术奖获奖名单。本次在全省范围内共评选出科学技术进步奖、科学技术创新奖、优秀成果奖获奖项目共计19项。“聚合数据资产服务API平台”凭借其前沿的创新性和优秀的应用前景成功获得科学技术创新奖二等…

lc1039-多边形三角剖分的最低得分

难度:中等(温天仁是吧,压境界了)题目描述有一个凸的 n 边形,其每个顶点都有一个整数值 将其剖分为 n-2 个三角形 每个三角形的值都是其三个顶点值的乘积 返回剖分后可以得到的最低分示例输入:values = [3,7,4,5]…

Powershell 进阶语(三)

本篇介绍pwsh的管道用法,补充剩下的进阶语法。目录PowerShell 管道管道输出控制管道输出的格式设置Format-ListFormat-TableFormat-Wide管道选择、排序和度量对象排序和分组Sort-ObjectFormat 的 GroupBy分组度量管道…

随机函数

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

集合进阶-collection集合

细节: collection遍历方式1:迭代器 遍历时不可以删除或者添加元素 增强for遍历(用来简化迭代器书写): 直接数组名.for快速生成 lambda表达式遍历:

工装设计方案网站做网站什么都不懂 怎么做

此博客用于记录2020年9月25日每日分享, 大概讲讲团队里的分工合作那些事儿。 关于带宽啊,网速啊之类的一些事儿 日期:2020年9月25日 主题: 团队合作怎么合作?有什么人?一般用什么工具?诸如此类…

完整教程:前端学习-HTML

完整教程:前端学习-HTML2025-09-28 22:13 tlnshuju 阅读(0) 评论(0) 收藏 举报pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; fo…

素数定理的初等证明

可能有错误,欢迎指出x零、基本介绍 此文中 \(\log\) 指代自然对数,记 \(p, q, r\) 为素数,分解 \(n = p_1^{\alpha_1}p_2^{\alpha_2} \cdots p_m^{\alpha_m}\)。 令 \(\displaystyle \pi(x) = \sum [0 \le p \le x]…

sql2008做网站重庆今天的新消息

对于一个 .NET Core开发人员,你可能没有使用过Docker,但是你不可能没有听说过Docker。Docker是Github上最受欢迎的开源项目之一,它号称要成为所有云应用的基石,并把互联网升级到下一代。Docker是dotCloud公司开源的一款产品&#…

做网站搞个物理服务器做企业内部网站要多久

文章目录 一、指令操作1、PC程序计数器2、目标编码3、总线规则4、算数运算5、逻辑运算6、源编码7、微变址 二、编码和微地址1、指令操作2、我的操作 问题描述 一、指令操作 1、PC程序计数器 PC装载(E/M IP 00): 当 E/M IP 设置为 00 时&…

51c自动驾驶~合集33 - 详解

51c自动驾驶~合集33 - 详解pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", …

【SCI一区】模糊斜率熵 Fuzzy Slope Entropy+状态分类、故障诊断! - 教程

【SCI一区】模糊斜率熵 Fuzzy Slope Entropy+状态分类、故障诊断! - 教程pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family…

Spring Boot项目中集成MyBatis-Plus

Spring Boot项目中集成MyBatis-Plus每天多努力一点,你将会变得更好。

深入解析:ShellExtensionU.dll COMToolKit.dll CardRes.dll grubinst.exe vbar332.dll Vb5db.dll dao360.dll

深入解析:ShellExtensionU.dll COMToolKit.dll CardRes.dll grubinst.exe vbar332.dll Vb5db.dll dao360.dllpre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; displ…

VSCod安装esp-idf插件 ERROR_INVALID_PIP错误解决

报错:D:\Espressif tools\idf-python\3.11.2\python.exe -m pip"is not valid.(ERROR_INVALID_PIP) 原因:已经安装过idf环境了,vs插件再次安装环境会报错 解决办法 方法一.卸载自己安装的环境(推荐) 方法二.…

[解决方案] 回顾一下业务中的网络技术演化

[解决方案] 回顾一下业务中的网络技术演化回顾一下业务中的网络技术演化 这个版本解决了一个几年前遗留的网络问题,近期可能不会再对网络相关的模块进行迭代了,这里回顾一下这些年网络相关技术在业务中的迭代。 背景…

企业网站建设推广含义平台型网站

一、python库camelot安装及使用中的一些注意事项 1)camelot方法有两种解析模式:流解析(stream)、格子解析(lattice),其中格子解析能够保留表格完整的样式,对于复杂表格来说要优于流…

做设计的地图网站网站建设费用申请

作者|秦承刚,吴启翾,喻望,杨伟 编辑|张婵 出处丨高效开发运维 5 月 2 日,谷歌发布了一款新型的沙箱容器运行时 gVisor,号称能够为容器提供更安全的隔离,同时比 VM 更轻量。容器基于共…

深入解析:高性能分布式对象存储RustFS

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

一款在线免费 PDF AI 工具平台,PDF 拆分,合并,加水印,PDF与Word、Excel、PPT、图片、TXT、HTML、Markdown互转的在线AI工具

该网页是一款在线免费 PDF AI 工具平台,核心功能围绕 PDF 处理展开,同时涵盖多格式文件与 PDF 的相互转换,具体信息如下: 一、核心功能板块 (一)PDF 处理功能PDF 拆分:可将单个 PDF 文件拆分为多个独立的 PDF 文…