帖子
帖子
用户
博客
课程
显示全部楼层
1
帖子
0
勋章
31
Y币

[BUG] 显示问题

[复制链接]
发表于 2015-4-9 11:30:35
  这样的一段代码,  在海马模拟器上面可以显示出来。 在ios设备上面显示不出来,  怎么破。

如下:
pc.open({
                y: 0,
                height: 200,
                fixedOn: 'user',
                fixed: true,
                placeHoldImg: photo,
                showLeftBtn: false,
                showRightBtn: false,
                 username:user,
                 count: point,
                 predepoit:predepoit,
                //point: point,
                modButton: {
                    bgImg: 'widget://image/edit.png',
                    lightImg: 'widget://image/edit.png'
                },     

                btnArray: [
                    {
                        bgImg: 'widget://image/personal_btn_nor.png',
                        lightImg: 'widget://image/personal_btn_light.png',
                        selectedImg: 'widget://image/personal_btn_sele.png',
                        title: '待付款',
                        titleColor: '#ffffff',
                        titleLightColor: '#55abce',
                        countColor: '#ffffff',
                        countLightColor: '#55abce',                     
                    },           

US}Z1K9%%{%_21JFSGCPRMM.png
稍等 我试下
请自行检查相关资源文件是否在对应位置.代码,和代码效果,如图
  1. /* 示例简介:
  2. 打开 个人中心;
  3. 点击 "好友", "回帖", "主题", "修改", "设置"会获得对应的toast提示;
  4. 点击 头像旁 的修改按钮可以 拍照或者从图库选择图片来修改 头像;
  5. */
  6. var personalCenter = api.require('personalCenter');

  7. var btnArray = [
  8.     {
  9.         "bgImg": "widget://image/personalCenter/personal_btn_nor.png",
  10.         "selectedImg": "widget://image/personalCenter/personal_btn_sele.png",
  11.         "lightImg": "widget://image/personalCenter/personal_btn_light.png",
  12.         "title": "好友",
  13.         "count": "5"
  14.     },
  15.     {
  16.         "bgImg": "widget://image/personalCenter/personal_btn_nor.png",
  17.         "selectedImg": "widget://image/personalCenter/personal_btn_sele.png",
  18.         "lightImg": "widget://image/personalCenter/personal_btn_light.png",
  19.         "title": "回贴",
  20.         "count": "240"
  21.     },
  22.     {
  23.         "bgImg": "widget://image/personalCenter/personal_btn_nor.png",
  24.         "selectedImg": "widget://image/personalCenter/personal_btn_sele.png",
  25.         "lightImg": "widget://image/personalCenter/personal_btn_light.png",
  26.         "title": "主题",
  27.         "count": "27"
  28.     }
  29. ];

  30. var count = 382;

  31. var y = 44;

  32. if("ios" == api.systemType && parseInt(api.systemVersion) >= 7){
  33.     y = 64;
  34. }

  35. personalCenter.open({
  36.     "y": y,
  37.     "imgPath": "http://file.apicloud.com/mcm/A6965066817858/d7d1d308fe165b984c09728e7118e9f1.jpg",
  38.     "placeholderImg": "widget://image/common/placeHolder.png",
  39.     "userName": "APICloud",
  40.     "count": count,
  41.     showLeftBtn: false,
  42.     "btnArray": btnArray
  43. },function(ret,err){
  44.     alert(ret.click);
  45.     /* 头像修改按钮. */
  46.     if(btnArray.length === ret.click){
  47.         api.confirm({
  48.             title: "聊天盒子",
  49.             msg: "您想要从哪里选取图片 ?",
  50.             buttons:["优雅自拍", "相册收藏", "取消"]
  51.         },function(ret,err){
  52.             var sourceType = "album";

  53.             if(3 == ret.buttonIndex){ // 取消
  54.                 return;
  55.             }

  56.             if(1 == ret.buttonIndex){ // 打开相机
  57.                 sourceType = "camera";
  58.             }

  59.             api.getPicture({
  60.                 sourceType: sourceType,
  61.                 encodingType: 'png',
  62.                 mediaValue: 'pic'
  63.             }, function(ret, err){
  64.                 if (ret) {
  65.                     personalCenter.updateValue({
  66.                         imgPath: ret.data,
  67.                         count:count
  68.                     });

  69.                 }
  70.             });

  71.         });

  72.         return;
  73.     }

  74.     var msg;

  75.     /* 修改按钮. */
  76.     if(btnArray.length + 1 == ret.click){
  77.         msg = "您没有修改权限!";
  78.     }

  79.     if(btnArray.length + 2 == ret.click){
  80.         msg = "您没有设置权限!"
  81.     }

  82.     if(btnArray.length > ret.click){
  83.         btn = btnArray[ret.click];
  84.         msg = btn.title + " 数量为 " + btn.count
  85.     }

  86.     api.toast({
  87.         msg: msg,
  88.         duration: 1000,
  89.         location: "top"
  90.     });
  91. });
复制代码



IMG_0290.PNG
您需要登录后才可以回帖 登录

本版积分规则