my.QUPropertiesSetString

Sets the string value for the specified key. The value is sent back to the server and can be used in the intercept.

Sample Code

copy
my.call('QUPropertiesSetString',{
  key: params.currentTarget.dataset.key,
  value: params.currentTarget.dataset.value,
}).then((values)=>{
  my.alert({
    content:JSON.stringify(values)
  });
}).catch((value)=>{
  my.alert({
    title:'faile',
    content:JSON.stringify(value)
  });
})

Parameters

Name

Type

Required

Description

value

string

true

Key Specifies the corresponding value

key

string

true

The Key of the corresponding property

Success Callback Function

Name

Type

Required

Description

success

bool

true

Whether the JSAPI call was successful

code

number

true

0:success, -1:fail