首页+我的
This commit is contained in:
@@ -1,10 +1,129 @@
|
||||
|
||||
import uniCopy from '@/js_sdk/xb-copy/uni-copy.js'
|
||||
import $http from '@/config/requestConfig'
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
|
||||
export default {
|
||||
showTost(title, icon) {
|
||||
... mapMutations(["setUserInfo"]) ,
|
||||
showToast(title, icon) {
|
||||
return uni.showToast({
|
||||
title: title,
|
||||
icon: icon ? icon : 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
//拨打电话
|
||||
handleMakingPhoneCalls(value, title) {
|
||||
uni.showModal({
|
||||
title: title ? title : '联系我们',
|
||||
content: value,
|
||||
confirmText: '确认',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: value, //电话号码
|
||||
success: function (e) {
|
||||
console.log(e);
|
||||
},
|
||||
fail: function (e) {
|
||||
console.log(e);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//复制内容
|
||||
handleCopy(value, title) {
|
||||
uniCopy({
|
||||
content: value,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
title: title + '复制成功',
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
error: (e) => {
|
||||
// uni.showToast({
|
||||
// title: e,
|
||||
// icon: 'none',
|
||||
// duration:3000,
|
||||
// })
|
||||
}
|
||||
})
|
||||
},
|
||||
async getCheckCourseStatus(data) {
|
||||
var result
|
||||
await $http
|
||||
.post('app/phone.do?getCheckCourseStatus', {
|
||||
customerType
|
||||
:
|
||||
"D",
|
||||
token
|
||||
: uni.getStorageSync("token")
|
||||
,
|
||||
customerOid
|
||||
: uni.getStorageSync("customerOid"),
|
||||
oid: data.oid
|
||||
|
||||
|
||||
|
||||
})
|
||||
.then(async res => {
|
||||
|
||||
result = res.obj
|
||||
|
||||
|
||||
})
|
||||
return result
|
||||
},
|
||||
// 退出登录
|
||||
signOut() {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "确定要退出当前账户吗?",
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
setUserInfo({ token: null });
|
||||
uni.reLaunch({
|
||||
url: "/pages/user/login/login",
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
// 取消操作
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
// this.signShow = false;
|
||||
// this.setUserInfo({ token: null });
|
||||
// uni.reLaunch({
|
||||
// url: "/pages/user/login/login",
|
||||
// });
|
||||
}, // 注销账户
|
||||
logout() {
|
||||
let that = this;
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "确定要注销当前账户吗?",
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
showCancel: false,
|
||||
content: `注销申请已提交成功,请联系客服进行后续操作:022-24142321`,
|
||||
success: function (res1) {
|
||||
if (res1.confirm) {
|
||||
that.signOut();
|
||||
}
|
||||
},
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
// 取消操作
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user