提交 2feb0b05 编写于 作者: DCloud_JSON's avatar DCloud_JSON

Update uni-starter.md

上级 48cdb943
...@@ -332,25 +332,25 @@ uni-starter ...@@ -332,25 +332,25 @@ uni-starter
```js ```js
//4. 同步客户端push_clientid至uni-id-device表 //4. 同步客户端push_clientid至uni-id-device表
if (uniCloud.onRefreshToken) { if (uniCloud.onRefreshToken) {
uniCloud.onRefreshToken(() => { uniCloud.onRefreshToken(() => {
console.log('onRefreshToken'); console.log('onRefreshToken');
if (uni.getPushClientId) { if (uni.getPushClientId) {
uni.getPushClientId({ uni.getPushClientId({
success: async function(e) { success: async function(e) {
console.log(e) console.log(e)
let pushClientId = e.cid let pushClientId = e.cid
console.log(pushClientId); console.log(pushClientId);
let res = await uniIdCo.setPushCid({ let res = await uniIdCo.setPushCid({
pushClientId pushClientId
}) })
console.log('getPushClientId', res); console.log('getPushClientId', res);
}, },
fail(e) { fail(e) {
console.error(e,'更多详情:https://uniapp.dcloud.net.cn/uniCloud/uni-starter.html#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9') console.error(e,'更多详情:https://uniapp.dcloud.net.cn/uniCloud/uni-starter.html#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9')
} }
}) })
} }
}) })
} }
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册