Skip to content

Commit a0d2e06

Browse files
committed
chore(release): Merge branch 'dev' into master
2 parents 66159aa + e038d21 commit a0d2e06

26 files changed

+19383
-3
lines changed

demos/common/nav.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ <h3>业务组件</h3>
157157
<li class="item">
158158
<a href="/demos/components/goods-selector/index.html">商品选择器/goods-selector</a>
159159
</li>
160+
<li class="item">
161+
<a href="/demos/components/shop-selector/index.html">店铺选择器/shop-selector</a>
162+
</li>
160163
<li class="item">
161164
<a href="/demos/components/customer-profile-board/index.html">用户全视图/customer-profile</a>
162165
</li>

demos/components/select/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,14 @@ <h4>当前值: {{ctrl.value6}} {{ctrl.value7}}</h4>
125125
placeholder="选择城市"
126126
model="ctrl.value6"
127127
datalist="ctrl.cascadeDataList"
128+
searchable="true"
128129
on-select-change="ctrl.cascadeSelectChange(model)"
129130
>
130131
</cc-dropdown-select>
131132
<cc-dropdown-select
132133
placeholder="选择区"
133134
model="ctrl.value7"
135+
searchable="true"
134136
datalist="ctrl.cascadeAreaDataList"
135137
>
136138
</cc-dropdown-select>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<meta charset="UTF-8">
3+
<title>Shop Selector</title>
4+
<link rel="import" href="../../common/layout.html">
5+
6+
<main ng-app="app" ng-controller="ctrl as Ctrl">
7+
<button type="button" ng-click="openSingleShopSelector()">Open Shop Selector(单选店铺选择器)</button>
8+
<button type="button" ng-click="openMultipleShopSelector()">Open Shop Selector(多选店铺选择器)</button>
9+
</main>
10+
11+
<script src="/components.js"></script>
12+
<script src="index.js"></script>
13+
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
;(function(angular) {
2+
3+
'use strict';
4+
5+
angular.module('app', ['ccms.components'])
6+
7+
.controller('ctrl', function($scope, $ccShopSelector) {
8+
let hasFooter = false;
9+
let tenantId = 'yangyangyang3';
10+
let serverName = '';
11+
let isSupportedChannel = true;
12+
let singleSelectedShop = ['jos_317761122']; // ['qiakr_6998868227'];
13+
let multipleSelectedShop = ['yhd_012231211', 'qiakr_2260']; // ['qiakr_6998868227', 'taobao_69988684534586', 'taobao_6956469886888l'];
14+
15+
let singleOptions = {
16+
hasFooter,
17+
selectedShop: singleSelectedShop,
18+
isSingleSelected: true,
19+
serverName,
20+
isSupportedChannel
21+
};
22+
23+
let multipleOptions = {
24+
hasFooter,
25+
selectedShop: multipleSelectedShop,
26+
isSingleSelected: false,
27+
serverName,
28+
isSupportedChannel
29+
};
30+
31+
// 单选店铺选择器
32+
$scope.openSingleShopSelector = function() {
33+
$ccShopSelector.shopSelector(tenantId, singleOptions)
34+
.open()
35+
.result
36+
.then(function(response) {
37+
console.log('-----------ok-----------');
38+
console.log(response);
39+
}, function() {
40+
console.log('-----------ok-----------');
41+
});
42+
};
43+
// 多选店铺选择器
44+
$scope.openMultipleShopSelector = function() {
45+
$ccShopSelector.shopSelector(tenantId, multipleOptions)
46+
.open()
47+
.result
48+
.then(function(response) {
49+
console.log('-----------ok-----------');
50+
console.log(response);
51+
}, function() {
52+
console.log('-----------ok-----------');
53+
});
54+
};
55+
});
56+
57+
})(window.angular);

0 commit comments

Comments
 (0)