helper.js 568 B

12345678910111213141516171819202122232425262728293031323334
  1. import * as config from '../config'
  2. const ossUploadUrl = 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/';
  3. const contactCustomerService = (item) => {
  4. console.log(item)
  5. if (!item) {
  6. item = '110'
  7. }
  8. console.log("联系客服")
  9. uni.makePhoneCall({
  10. phoneNumber: item,
  11. success: (res) => {
  12. console.log('调用成功!')
  13. },
  14. // 失败回调
  15. fail: (res) => {
  16. console.log('调用失败!')
  17. contactCustomerService(item)
  18. }
  19. });
  20. }
  21. const logout = () => {
  22. uni.removeStorage({
  23. key: 'userInfo'
  24. })
  25. }
  26. export default {
  27. logout,
  28. contactCustomerService
  29. }