没有淘宝小程序,所以只能提示他复制链接网页打开
 跳转京东小程序
  
获取京东小程序
京东小程序appId:wx91d27dbf599dff74
 或者点开京东小程序,查看详情即可获取到京东的appid
店铺页面路径
店铺首页:pages/shop/index/index?shopId=
店铺id
打开h5,点击到自己的店铺下。url路径中index- 后面的那一串数字就是你的店铺Id啦
京东(JD.COM)-正品低价、品质保障、配送及时、轻松购物!

 webView.ts
// packageB/external_websites/index.ts
Page({
  /**
   * 页面的初始数据
   */
  data: {
url:''
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(option:any) {
console.log("网站地址",option.url);
let url=JSON.parse(decodeURIComponent(option.url))
this.setData({
  url:url
})
 console.log("复制",this.data.url);
      wx.setClipboardData({
        data: url,
        success (res) {
          console.log(res);
          wx.getClipboardData({
            success (res) {
              console.log(res.data) // data
              wx.showToast({
                title: '复制链接成功',
                icon: 'success',
                duration: 2000
              });
            },
                fail: function(err) {  
          // 复制失败后的回调函数  
          console.log(err);
          
        } 
          })
        }
      })
      
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
})webView.wxml
<web-view src="{{url}}"/>
goodDetail.ts
  
 goUrl(e:any){
    let type=e.currentTarget.dataset.type
console.log(e.currentTarget.dataset.url);
// let url=e.currentTarget.dataset.url
let url=''
// 
if(type=='jd'){
      wx.navigateToMiniProgram({
        appId: 'wx91d27dbf599dff74',
        path: '/pages/shop/index/index?shopId=******',
        envVersion: 'release',
        success(res) {
            // 打开成功
          console.log(res);
        }
      })
      return
} 
if(type=='tm'){
//天猫的链接是请求接口  后端传过来的
  url=e.currentTarget.dataset.url
} 
wx.navigateTo({
  url:'/packageB/external_websites/index?url='+encodeURIComponent(JSON.stringify(url))
})
  },











![ShardingSphereConnection@4691d] will not be managed by Spring](https://i-blog.csdnimg.cn/direct/ab86c545a7544c02b6bedefec91170f4.png)






