Page({ data: { result: '', // 用于存储计算结果 }, onLoad: function(options) { const encodedResult = options.result; // 解码URL编码的字符串 const decodedResult = decodeURIComponent(encodedResult); // 将解码后的字符串转换为JSON对象 const resultArray = JSON.parse(decodedResult); // 更新页面数据以显示结果 this.setData({ result: resultArray[0].toString() }); }, });