在Wix上方打开新的灯箱时保存灯箱数据

当用户填写其详细信息

在Wix上方打开新的灯箱时保存灯箱数据

,然后打开注册灯箱

时,我正在丢失用户的数据。

例如-用户打开灯箱,填写了他的详细信息,但是他没有注册,因此用户转到了注册灯箱,但是当他完成注册后,先前的灯箱都消失了(自动关闭),并且填充了用户数据

为解决此问题,我尝试启用缓存

在Wix上方打开新的灯箱时保存灯箱数据


灯箱按代码运行

wixData.query("Projects").find().then( (results) => {
  $w('#repeater1').data = results.items;

  console.log("Number of projects:",results.length);
  renderProjects();
});


export function renderProjects () {
  console.log("renderProjects() was called");
  $w('#repeater1').forEachItem(($item,itemData,index) => {


    $item("#projectName").text = itemData.title;
    $item("#descriptionField").text = itemData.description.substring(0,50);
    $item("#categoryField").text = itemData.category;
iCMS 回答:在Wix上方打开新的灯箱时保存灯箱数据

Corvid确实使您能够使用wix-storage API访问本地浏览器存储。您可以使用它临时存储然后恢复他们的响应。

本文链接:https://www.f2er.com/2225408.html

大家都在问