|
- function picFocus(paths, captions) {
- if (UIScrollPicture) {
- UIScrollPicture.reloadData({
- data: {
- paths: paths,
- captions: captions
- }
- });
- return;
- }
- UIScrollPicture = api.require('UIScrollPicture');
- UIScrollPictureHeight = api.winWidth * 0.625;
- $("#topbanner-div").css({
- "height": UIScrollPictureHeight
- });
- UIScrollPicture.open({
- rect: {
- x: 0,
- y: 0,
- w: api.winWidth,
- h: UIScrollPictureHeight
- },
- data: {
- paths: paths,
- captions: captions
- },
- styles: {
- caption: {
- height: 35,
- color: '#333',
- size: 13,
- bgColor: '#EEF0F8',
- position: 'bottom'
- },
- indicator: {
- dot: {
- w: 10,
- h: 10,
- r: 5,
- margin: 5
- },
- align: 'right',
- color: '#FFFFFF',
- activeColor: '#BD262B'
- }
- },
- placeholderImg: 'widget://res/slide1.jpg',
- contentMode: 'scaleToFill',
- interval: 5,
- fixedOn: api.frameName,
- loop: true,
- fixed: false,
- // touchWait: true
- }, function(ret, err) {
- if (ret) {
- if (ret.eventType == 'click') {
- openBanner(UIScrollPictureIds[ret.index], 1);
- }
- } else {
- // alert(JSON.stringify(err));
- console.log(JSON.stringify(err))
- }
- });
- }
复制代码
|
|