tips:在面板小程序中打开电话短信服务页面

小程序开发相关产品技术讨论,包括面板、智能小程序、React Native、Ray跨端框架、Panel SDK、微信小程序、小程序开发工具(IDE)及其他开发技术相关等话题


Post Reply
ziyang
Posts: 13

这两天遇到有同学在问,如何从面板小程序打开电话短信服务页面,其实很简单,就是页面跳转。

当前电话服务、短信服务也是用小程序实现的,

Code: Select all

// 在小程序中使用如下代码打开。

// 短信
      ty.navigateToMiniProgram({
        appId: 'tyexczjhdrlot85xhu',
        path: 'pages/product/index?serveType=sms_notification',
      })

// 电话
      ty.navigateToMiniProgram({
        appId: 'tyexczjhdrlot85xhu',
        path: 'pages/product/index?serveType=phone_notify_serve',
      })

电话短信服务,涉及到业务流程,真正发布前最好把整个购买、使用流程测试一遍。

Immersed in the beauty of mountains and rivers.


Tags:
lshinylee
Posts: 381

Re: tips:在面板小程序中打开电话短信服务页面

Code: Select all

// 短信
ty.router({
  url: 'tuyaSmart://miniApp?uniqueCode=entrydi2emltfyufzm&serveType=sms_notification',
  success: d => {
    console.log('Success');
  },
  fail: e => {
    console.log('Fail', e);
  },
});

// 电话
ty.router({
  url: 'tuyaSmart://miniApp?uniqueCode=entrydi2emltfyufzm&serveType=phone_notify_serve',
  success: d => {
    console.log('Success');
  },
  fail: e => {
    console.log('Fail', e);
  },
});

后续建议可采用 uniqueCode 的方式跳转,该方案能够进一步适配 OEM App

:D :D :D

Post Reply