调整分包,完成隐私协议(样式待优化)

This commit is contained in:
2024-07-18 14:18:05 +08:00
parent 765b3ad111
commit 00384d7382
1045 changed files with 34254 additions and 98 deletions

View File

@@ -0,0 +1,104 @@
// pages/agreements/index.js
import towxml from "towxml"
import { alertInfo } from "../../../utils/index";
Page({
/**
* 页面的初始数据
*/
data: {
url: ""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const { url } = options;
this.getText(url, this.setText)
},
getText: (url, callback) => {
wx.request({
url: url,
header: {
'content-type': 'application/x-www-form-urlencoded'
},
success: (res) => {
if (typeof callback === 'function') {
callback(res);
};
},
fail: (err) => {
alertInfo(err)
}
});
},
async setText(res) {
let obj = towxml(res.data,'markdown',{
       theme:'light', //主题 dark 黑色light白色不填默认是light
//        base:"www.xxx.com",
events:{      //为元素绑定的事件方法
tap:e => {
console.log('tap',e);
},
change:e => {
console.log('todo',e);
}
}
});
     //更新解析数据
this.setData({
text:obj,
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -0,0 +1,5 @@
{
"usingComponents": {
"towxml":"towxml/towxml"
}
}

View File

@@ -0,0 +1,5 @@
<!--pages/agreements/index.wxml-->
<!-- <rich-text text="{{url}}"> -->
<view style="margin-bottom: 30rpx;">
<towxml nodes="{{text}}" />
</view>

View File

@@ -0,0 +1 @@
/* pages/agreements/index.wxss */