1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- (function (angular) {
- var app = angular.module('app.mobile', [
- 'ngResource',
- 'base.param',
- 'eccrm.angular'
- ]);
- app.service('CommunityImportService', function (CommonUtils, $resource) {
- return $resource(CommonUtils.contextPathURL('/wx/house/:method'), {}, {
- // 查询区域价格
- queryAreaPrice: {method: 'POST', params: {method: 'price-area'}, isArray: false},
- // 查询价格
- queryHousePrices: {method: 'POST', params: {method: 'price-house'}, isArray: false}
- })
- });
- app.service('AlertService', function () {
- return {
- /**
- * 弹出层提示
- * @param content
- */
- alert: function (content) {
- layer.closeAll();
- layer.open({
- content: content,
- btn: '确认'
- });
- },
- /**
- * 简单的信息提示
- * @param content 提示内容
- * @param closeTime 多少秒过后关闭
- */
- info: function (content, closeTime) {
- closeTime = closeTime || 2;
- layer.open({
- content: content
- , skin: 'msg'
- , time: closeTime
- });
- },
- loading: function () {
- layer.closeAll();
- return layer.open({
- type: 2
- });
- },
- /**
- * 确认执行某个操作
- * @param title 标题
- * @param btnName 按钮名称
- * @param okFn 点击按钮要执行的事件
- */
- confirm: function (title, btnName, okFn) {
- layer.open({
- content: title
- , btn: [btnName, '取消']
- , skin: 'footer'
- , yes: function (index) {
- okFn();
- }
- });
- },
- close: function (index) {
- layer.close(index);
- },
- closeAll: function () {
- layer.closeAll();
- }
- }
- });
- })(angular);
|