Commit c6bdaa88 by luyt

feat;替换wx api

1 parent 853e632b
...@@ -346,7 +346,7 @@ Page({ ...@@ -346,7 +346,7 @@ Page({
filePath: _this.data.posterUrl, //仅为示例,并非真实的资源 filePath: _this.data.posterUrl, //仅为示例,并非真实的资源
success(res) { success(res) {
console.log("res: ", res); console.log("res: ", res);
wx.$api.showToast("下载成功!"); wx.showToast("下载成功!");
}, },
}); });
} }
......
...@@ -220,7 +220,7 @@ Component({ ...@@ -220,7 +220,7 @@ Component({
downVideo(e) { downVideo(e) {
let { url } = e.target.dataset; let { url } = e.target.dataset;
console.log(url); console.log(url);
wx.$api.showToast("正在下载视频..."); wx.showToast("正在下载视频...");
wx.downloadFile({ wx.downloadFile({
url: url, url: url,
success(res) { success(res) {
...@@ -230,7 +230,7 @@ Component({ ...@@ -230,7 +230,7 @@ Component({
filePath: res.tempFilePath, filePath: res.tempFilePath,
success(res) { success(res) {
setTimeout(() => { setTimeout(() => {
wx.$api.showToast("下载成功!"); wx.showToast("下载成功!");
}, 2000); }, 2000);
}, },
}); });
...@@ -370,7 +370,7 @@ Component({ ...@@ -370,7 +370,7 @@ Component({
this.getMoreFn(); this.getMoreFn();
}) })
.catch(({ errMsg }) => { .catch(({ errMsg }) => {
wx.$api.showToast(errMsg || "系统异常"); wx.showToast(errMsg || "系统异常");
// this.setBtnLoading(false) // this.setBtnLoading(false)
}); });
}, },
......
...@@ -582,17 +582,17 @@ Page({ ...@@ -582,17 +582,17 @@ Page({
} }
}) })
}, },
// 打电话 // // 打电话
phoneCallFn(e) { // phoneCallFn(e) {
let { phone } = e.currentTarget.dataset // let { phone } = e.currentTarget.dataset
console.log('phone: ', phone) // console.log('phone: ', phone)
wx.$api.phoneCall(phone) // wx.phoneCall(phone)
}, // },
// 复制号码 // // 复制号码
setCopyDataFn(e) { // setCopyDataFn(e) {
let { phone } = e.currentTarget.dataset // let { phone } = e.currentTarget.dataset
wx.$api.setCopyData(phone) // wx.setCopyData(phone)
}, // },
getClueInit(param) { getClueInit(param) {
// console.log(22222) // console.log(22222)
this.getUnreadApi(param) this.getUnreadApi(param)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!