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

问题描述 投票:0回答:1

[当用户填写详细信息into my lightbox,然后打开注册灯箱时,我丢失了用户的数据

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

为了解决这个问题,我尝试启用缓存enter image description here通过代码工作的灯箱

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;
javascript caching lightbox wixcode
1个回答
0
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.