| | |
| | | "pages/bookServices/webpage/index", |
| | | "pages/components/webView/index", |
| | | "pages/bookServices/detail/buyResource/index", |
| | | <<<<<<< Updated upstream |
| | | "pages/bookServices/detail/components/learnTask/index" |
| | | ======= |
| | | "pages/bookServices/linkPage/index" |
| | | >>>>>>> Stashed changes |
| | | ] |
| | | } |
| | | ], |
| | |
| | | link |
| | | } = e.currentTarget.dataset; |
| | | wx.navigateTo({ |
| | | url: `/packageBookService/pages/bookServices/webpage/index?url=${link}`, |
| | | url: `/packageBookService/pages/bookServices/linkPage/index?path=${link}`, |
| | | }); |
| | | }, |
| | | // tag切换 |
New file |
| | |
| | | // packageBookService/pages/bookServices/linkPage/index.js |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | path: "" |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | this.setData({ |
| | | path: options.path |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | copyPath() { |
| | | wx.setClipboardData({ |
| | | data: this.data.path, |
| | | success: () => { |
| | | wx.showToast({ |
| | | icon: 'success', |
| | | title: '复制成功', |
| | | }) |
| | | }, |
| | | fail: () => { |
| | | wx.showToast({ |
| | | icon: 'error', |
| | | title: '请重试', |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "usingComponents": { |
| | | "t-button": "tdesign-miniprogram/button/button" |
| | | } |
| | | } |
New file |
| | |
| | | <view class="page"> |
| | | <view class="title-text"> 如需浏览,请长按网址复制后使用浏览器访问 </view> |
| | | <view class="link"> {{path}} </view> |
| | | <view class="bottom-btn"> |
| | | <t-button style="width: 200rpx" bind:tap="copyPath">复制</t-button> |
| | | </view> |
| | | </view> |
New file |
| | |
| | | .page { |
| | | padding: 200rpx 40rpx; |
| | | } |
| | | |
| | | .title-text { |
| | | text-align: center; |
| | | font-size: 42rpx; |
| | | color: #000; |
| | | } |
| | | |
| | | .link, |
| | | .bottom-btn { |
| | | margin-top: 50px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .bottom-btn { |
| | | /* --td-button-width: 100rpx */ |
| | | } |