• 游客,欢迎来到米坛社区。
    米坛社区是大型中文智能穿戴设备交流社区,在这里交流你的极客思想,共同建造我们的智能世界
    为了更加方便的获取支持与帮助,请加入米坛社区官方QQ频道

米环7小程序 腕間暖暖包

淘汰郎

LV8
🔥社区作者
普通成员
UID
77922
2021-12-01
594
6,273
我只有做好代碼,你們幫我測式

JavaScript:
try {
    (() => {
      var e = __$$hmAppManager$$__.currentApp;
      var t = e.current,
        { px: o } =
          (new DeviceRuntimeCore.WidgetFactory(
            new DeviceRuntimeCore.HmDomApi(e, t)
          ),
          e.app.__globals__);
  try {
    (() => {
      var e = __$$hmAppManager$$__.currentApp,
      t = e.current;
    new DeviceRuntimeCore.WidgetFactory(
      new DeviceRuntimeCore.HmDomApi(e, t),
      "drink"
    );
  DeviceRuntimeCore.HmLogger.getLogger("sanjiao");
  t.module = DeviceRuntimeCore.Page({
      init_view() {
        /* 小米手环7并未适配小程序,
        因此所有小程序均以480*480大小渲染,
        而小米手环7分辨率192*490,
        下方10px像素无法利用,
        有超出h480的组件就能上下滑动 */
        hmUI.setLayerScrolling(false);
        //禁用页面上下滑动
        var cc=0
        var aa=0
        const Text = hmUI.createWidget(hmUI.widget.TEXT, {
          //HelloWorld文本
          x: 0,
          y: 0,
          w: 192,
          h: 200,
          color: 0xffffff,
          text_size: 30,
          align_h: hmUI.align.CENTER_H,
          align_v: hmUI.align.CENTER_V,
          text_style: hmUI.text_style.WRAP,
          text: "暖暖包🔥"
        })
        const aText = hmUI.createWidget(hmUI.widget.TEXT, {
            //HelloWorld文本
            x: 0,
            y: 200,
            w: 192,
            h: 280,
            color: 0xffffff,
            text_size: 30,
            align_h: hmUI.align.CENTER_H,
            align_v: hmUI.align.CENTER_V,
            text_style: hmUI.text_style.WRAP,
            text: cc+"次執行\n已經過"+aa+"s"
          })
        const a=setInterval(() => {
            cc++
          }, 10)
         const d=setInterval(() => {
            aa++
            aText.setProperty(prop.MORE, {
                text: cc+"次執行\n已經過"+aa+"s"
              })
          }, 1000)
      },
      onInit() {
        console.log("index page.js on init invoke"), this.init_view();
      },
      onReady() {
        console.log("index page.js on ready invoke");
      },
      onShow() {
        console.log("index page.js on show invoke");
      },
      onHide() {
        console.log("index page.js on hide invoke");
      },
      onDestory() {
        console.log("index page.js on destory invoke");
      }
    });
  })();
  } catch (e) {
  console.log(e);
  }
  })();
  } catch (e) {
  console.log(e);
  }
花了18分鐘做的
 

附件

  • 暖暖包🔥.txt
    2.4 KB · 查看: 139
最后编辑:
淘汰郎

还可以输入20字数。

vfduytgf

LV0
普通成员
UID
173719
2022-12-13
1
0
感谢楼主的红包!

vfduytgf领取了您的红包获得了0.00生米粒
 

z s t

LV1
普通成员
UID
54582
2020-11-29
147
45
我只有做好代碼,你們幫我測式

JavaScript:
try {
    (() => {
      var e = __$$hmAppManager$$__.currentApp;
      var t = e.current,
        { px: o } =
          (new DeviceRuntimeCore.WidgetFactory(
            new DeviceRuntimeCore.HmDomApi(e, t)
          ),
          e.app.__globals__);
  try {
    (() => {
      var e = __$$hmAppManager$$__.currentApp,
      t = e.current;
    new DeviceRuntimeCore.WidgetFactory(
      new DeviceRuntimeCore.HmDomApi(e, t),
      "drink"
    );
  DeviceRuntimeCore.HmLogger.getLogger("sanjiao");
  t.module = DeviceRuntimeCore.Page({
      init_view() {
        /* 小米手环7并未适配小程序,
        因此所有小程序均以480*480大小渲染,
        而小米手环7分辨率192*490,
        下方10px像素无法利用,
        有超出h480的组件就能上下滑动 */
        hmUI.setLayerScrolling(false);
        //禁用页面上下滑动
        var cc=0
        var aa=0
        const Text = hmUI.createWidget(hmUI.widget.TEXT, {
          //HelloWorld文本
          x: 0,
          y: 0,
          w: 192,
          h: 200,
          color: 0xffffff,
          text_size: 30,
          align_h: hmUI.align.CENTER_H,
          align_v: hmUI.align.CENTER_V,
          text_style: hmUI.text_style.WRAP,
          text: "暖暖包🔥"
        })
        const aText = hmUI.createWidget(hmUI.widget.TEXT, {
            //HelloWorld文本
            x: 0,
            y: 200,
            w: 192,
            h: 280,
            color: 0xffffff,
            text_size: 30,
            align_h: hmUI.align.CENTER_H,
            align_v: hmUI.align.CENTER_V,
            text_style: hmUI.text_style.WRAP,
            text: cc+"次執行\n已經過"+aa+"s"
          })
        const a=setInterval(() => {
            cc++
          }, 10)
         const d=setInterval(() => {
            aa++
            aText.setProperty(prop.MORE, {
                text: cc+"次執行\n已經過"+aa+"s"
              })
          }, 1000)
      },
      onInit() {
        console.log("index page.js on init invoke"), this.init_view();
      },
      onReady() {
        console.log("index page.js on ready invoke");
      },
      onShow() {
        console.log("index page.js on show invoke");
      },
      onHide() {
        console.log("index page.js on hide invoke");
      },
      onDestory() {
        console.log("index page.js on destory invoke");
      }
    });
  })();
  } catch (e) {
  console.log(e);
  }
  })();
  } catch (e) {
  console.log(e);
  }
花了18分鐘做的
 

結冷簡碳

LV3
普通成员
UID
90537
2022-06-28
109
112
感谢楼主的红包!

結冷簡碳领取了您的红包获得了0.00生米粒
 

wang欣

LV0
普通成员
UID
71952
2021-08-13
146
16
感谢楼主的红包!

wang欣领取了您的红包获得了0.00生米粒
 

浅丶瑟

LV0
普通成员
UID
49089
2020-09-25
32
2
感谢楼主的红包!

浅丶瑟领取了您的红包获得了0.00生米粒
 

啦啦啦06

LV0
普通成员
UID
181428
2023-01-03
1
0
感谢楼主的红包!

啦啦啦06领取了您的红包获得了0.00生米粒
 

zjzs0203

LV0
普通成员
UID
146930
2022-10-27
24
1
我只有做好代碼,你們幫我測式

JavaScript:
try {
    (() => {
      var e = __$$hmAppManager$$__.currentApp;
      var t = e.current,
        { px: o } =
          (new DeviceRuntimeCore.WidgetFactory(
            new DeviceRuntimeCore.HmDomApi(e, t)
          ),
          e.app.__globals__);
  try {
    (() => {
      var e = __$$hmAppManager$$__.currentApp,
      t = e.current;
    new DeviceRuntimeCore.WidgetFactory(
      new DeviceRuntimeCore.HmDomApi(e, t),
      "drink"
    );
  DeviceRuntimeCore.HmLogger.getLogger("sanjiao");
  t.module = DeviceRuntimeCore.Page({
      init_view() {
        /* 小米手环7并未适配小程序,
        因此所有小程序均以480*480大小渲染,
        而小米手环7分辨率192*490,
        下方10px像素无法利用,
        有超出h480的组件就能上下滑动 */
        hmUI.setLayerScrolling(false);
        //禁用页面上下滑动
        var cc=0
        var aa=0
        const Text = hmUI.createWidget(hmUI.widget.TEXT, {
          //HelloWorld文本
          x: 0,
          y: 0,
          w: 192,
          h: 200,
          color: 0xffffff,
          text_size: 30,
          align_h: hmUI.align.CENTER_H,
          align_v: hmUI.align.CENTER_V,
          text_style: hmUI.text_style.WRAP,
          text: "暖暖包🔥"
        })
        const aText = hmUI.createWidget(hmUI.widget.TEXT, {
            //HelloWorld文本
            x: 0,
            y: 200,
            w: 192,
            h: 280,
            color: 0xffffff,
            text_size: 30,
            align_h: hmUI.align.CENTER_H,
            align_v: hmUI.align.CENTER_V,
            text_style: hmUI.text_style.WRAP,
            text: cc+"次執行\n已經過"+aa+"s"
          })
        const a=setInterval(() => {
            cc++
          }, 10)
         const d=setInterval(() => {
            aa++
            aText.setProperty(prop.MORE, {
                text: cc+"次執行\n已經過"+aa+"s"
              })
          }, 1000)
      },
      onInit() {
        console.log("index page.js on init invoke"), this.init_view();
      },
      onReady() {
        console.log("index page.js on ready invoke");
      },
      onShow() {
        console.log("index page.js on show invoke");
      },
      onHide() {
        console.log("index page.js on hide invoke");
      },
      onDestory() {
        console.log("index page.js on destory invoke");
      }
    });
  })();
  } catch (e) {
  console.log(e);
  }
  })();
  } catch (e) {
  console.log(e);
  }
花了18分鐘做的
帅啊
 

哦吼的人

LV0
普通成员
UID
164769
2022-11-24
10
1
感谢楼主的红包!

哦吼的人领取了您的红包获得了0.00生米粒
 

崑之陌

LV0
普通成员
UID
97139
2022-07-17
3
0
感谢楼主的红包!

崑之陌领取了您的红包获得了0.00生米粒
 

NoTitle2077

LV0
普通成员
UID
179903
2022-12-30
1
0
感谢楼主的红包!

NoTitle2077领取了您的红包获得了0.00生米粒
 

TomHoray

LV3
普通成员
UID
89509
2022-06-25
257
166
感谢楼主的红包!

TomHoray领取了您的红包获得了0.00生米粒
 

*这是一则由 Google AdSense 自动推荐的广告,与本站无关,不对其真实性与可靠性负责