联调设备存储
This commit is contained in:
@@ -9,6 +9,10 @@
|
||||
<!-- #ifdef H5 -->
|
||||
<view style="height:50rpx"></view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<button @click="handleDelete">删除缓存</button>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- 搜索 @confirm="handleSearch" -->
|
||||
<view class="search search-sao" >
|
||||
<uni-search-bar class="custom-search" radius="28"
|
||||
@@ -153,7 +157,30 @@ import { getWeekStr,formatTimestamp } from '@/utils/datetime.js'
|
||||
import { formatMoney } from '@/utils/formatter.js'
|
||||
import {showLoading,hideLoading} from '@/utils/message.js'
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// 获取 存储手机的module
|
||||
const safeSave = uni.requireNativePlugin("Tm-TmSafeSaveFileModule");
|
||||
|
||||
const handleDelete=()=>{
|
||||
safeSave.delSafeFile({
|
||||
"key": "app_device_id"
|
||||
}, (res) => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
uni.showModal({
|
||||
title: "删除成功",
|
||||
content:"删除成功",
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: "读取失败",
|
||||
content: res.msg,
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
|
||||
|
||||
onLoad(async(opt) => {
|
||||
|
||||
Reference in New Issue
Block a user