Commit d107982b authored by caimeng's avatar caimeng

新增首页和我的页面的埋点

parent 041cfa7f
<script> <script>
import { switchShowTabbar,loadDevice,loadLocation,loadNetwork,loadUuid } from '@/utils/index.js' import { switchShowTabbar, loadDevice, loadLocation, loadNetwork, loadUuid } from '@/utils/index.js'
export default { export default {
onLaunch: function () { onLaunch: function () {
// 手机型号 // 手机型号
...@@ -26,6 +26,20 @@ export default { ...@@ -26,6 +26,20 @@ export default {
} }
} }
// 当前版本号
plus.runtime.getProperty(plus.runtime.appid, function (wgtinfo) {
let versionNumber
if (wgtinfo.version) {
versionNumber = wgtinfo.version;
} else {
versionNumber = plus.runtime.version;
}
// 存储所有请求的头部信息
uni.setStorage({key: 'm-header-version',data: versionNumber});
})
/*** tabbar*/ /*** tabbar*/
switchShowTabbar() switchShowTabbar()
}, },
......
...@@ -6,23 +6,23 @@ ...@@ -6,23 +6,23 @@
const BASE = { const BASE = {
development: { development: {
common: "http://portal.cloudsmake.cn", common: "http://portal.cloudsmake.cn",
event: 'http://118.31.124.88:21111',
h5: 'http://192.168.0.23:8080/index.html#/loan' h5: 'http://192.168.0.23:8080/index.html#/loan'
}, },
stest: { stest: {
common: "http://portal.cloudsmake.cn", common: "http://portal.cloudsmake.cn",
event: 'http://118.31.124.88:21111',
h5: 'http://ddang-h5-s.rockstect.cn/index.html#/' h5: 'http://ddang-h5-s.rockstect.cn/index.html#/'
}, },
ltest: {
common: "https://dell-common-l.meimeiyouxin.com",
h5: ''
},
gray: { gray: {
common: "https://dell-common.meimeiyouxin.com", common: "https://api.yyhock.com",
h5: 'https://mmyx-h5-g.rockstect.com/index.html#/' event: 'https://event.jqtianxia.com',
h5: 'https://ddang-h5-g.rockstect.cn/index.html#/'
}, },
prod: { prod: {
common: "https://api.yyhock.com", common: "https://api.yyhock.com",
h5: 'https://mmyx-h5.rockstect.com/index.html#/' event: 'https://event.jqtianxia.com',
h5: 'https://ddang.rockstect.com/index.html#/'
} }
} }
let env = process.env.VUE_APP_BASE_NODE_ENV let env = process.env.VUE_APP_BASE_NODE_ENV
...@@ -32,7 +32,6 @@ let env = process.env.VUE_APP_BASE_NODE_ENV ...@@ -32,7 +32,6 @@ let env = process.env.VUE_APP_BASE_NODE_ENV
* APP打包运行需自定义环境env * * APP打包运行需自定义环境env *
* development 开发环境 * * development 开发环境 *
* stest S测试环境 * * stest S测试环境 *
* ltest L测试环境
* gray 灰度环境 * * gray 灰度环境 *
* prod 生产环境 * * prod 生产环境 *
* ========================== * ==========================
...@@ -44,7 +43,7 @@ env = "stest"; ...@@ -44,7 +43,7 @@ env = "stest";
const api = { const api = {
common: BASE[env].common, common: BASE[env].common,
buyer: BASE[env].buyer, event: BASE[env].event,
h5: BASE[env].h5 h5: BASE[env].h5
} }
......
...@@ -9,7 +9,9 @@ import Modal from './components/modal/modal' ...@@ -9,7 +9,9 @@ import Modal from './components/modal/modal'
import goodsItem from './components/goodsItem/index' import goodsItem from './components/goodsItem/index'
import upgradePopup from './components/showModal/upgradePopup' import upgradePopup from './components/showModal/upgradePopup'
import request from './utils/request.js' import request from './utils/request.js'
import * as utils from "./utils/index.js";
uni.$util = utils;
Vue.component('view-modal', Modal); Vue.component('view-modal', Modal);
Vue.component('view-goods', goodsItem); Vue.component('view-goods', goodsItem);
Vue.component('upgrade-Popup', upgradePopup); Vue.component('upgrade-Popup', upgradePopup);
......
import {Jump} from "../utils/route.js"; import { Jump } from "@/utils/route.js";
import api from '@/config/api.js'
export default { export default {
data() { data() {
return { return {
isInitOk:false, isInitOk: false,
// 如果页面开启了下拉刷新,用来判断关闭下拉刷新的 // 如果页面开启了下拉刷新,用来判断关闭下拉刷新的
isPullDownRefresh:false isPullDownRefresh: false
} }
}, },
onTabItemTap(e) {
const { text } = e;
switch (text) {
case "贷款":
this.buryingPoint('app:loan_index_tab_click')
break;
case "首页":
this.buryingPoint('app:index_tab_click')
break;
case "分类":
this.buryingPoint('app:category_tab_click')
break;
case "我的":
this.buryingPoint('app:my_tab_click')
break;
}
},
methods: { methods: {
/** 埋点 */
buryingPoint(des, val) {
const mobile = uni.getStorageSync('d-mobile')
const BaseUrl = api.event
try {
const data = {
id: mobile ? mobile : val,
event: des,
type: "DDH-APP",
};
uni.request({
url: `${BaseUrl}/event`,
method: 'POST',
data: {
...data
},
success: (res) => {
console.log(res, '埋点返回')
},
fail: (err) => {
console.log(err, '埋点报错')
}
})
} catch (err) {
console.log(err, "埋点请求报错");
}
},
// 检查是否开启了下拉刷新 // 检查是否开启了下拉刷新
checkPullDownRefresh(){ checkPullDownRefresh() {
if(this.isPullDownRefresh){ if (this.isPullDownRefresh) {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
} }
}, },
...@@ -32,6 +79,11 @@ export default { ...@@ -32,6 +79,11 @@ export default {
} }
return t.split('').reverse().join('') + '.' + r return t.split('').reverse().join('') + '.' + r
}, },
// 跳转到登录页面
JumpToLogin() {
console.log('调到登录页面')
return this.Go('uni:/pages/login/login')
},
// 页面跳转 // 页面跳转
...@@ -39,7 +91,7 @@ export default { ...@@ -39,7 +91,7 @@ export default {
Jump(url, type) Jump(url, type)
}, },
// 返回 // 返回
Back(num=1) { Back(num = 1) {
uni.navigateBack({ uni.navigateBack({
delta: num delta: num
}) })
......
.i-page {
width: 100%;
height: 100vh;
min-height: 1624rpx;
background: #F7FAFF;
}
.i-page .i-header {
position: sticky;
top: 0;
z-index: 9988;
padding-top: 98rpx;
width: 100%;
height: 88rpx;
background: #FFFFFF;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 36rpx;
color: #333333;
line-height: 88rpx;
text-align: center;
font-style: normal;
}
.i-page .i-boxs .i-banner {
margin: 20rpx 22rpx 32rpx;
width: 706rpx;
height: 359rpx;
}
.i-page .i-boxs .i-banner .swiper-item-i {
width: 706rpx;
height: 359rpx;
}
.i-page .i-boxs .i-banner .swiper-item-i .banner-item {
width: 706rpx;
height: 359rpx;
background-size: 690rpx 359rpx;
}
.i-page .i-boxs .i-list {
margin: 0 50rpx;
display: flex;
flex-wrap: wrap;
}
.i-page .i-boxs .i-list .mian-item {
margin-right: 67rpx;
}
.i-page .i-boxs .i-list .mian-item .item-img {
margin: 0 16rpx;
width: 80rpx;
height: 80rpx;
background-size: 100%;
}
.i-page .i-boxs .i-list .mian-item .item-text {
height: 40rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #333333;
line-height: 40rpx;
text-align: center;
font-style: normal;
}
.i-page .i-boxs .i-list .mian-item:nth-of-type(4n) {
margin-right: 0;
}
.i-page .i-boxs .i-malll .hot-tab {
margin: 50rpx 36rpx 16rpx;
height: 86rpx;
display: flex;
align-items: center;
font-size: 28rpx;
line-height: 40rpx;
}
.i-page .i-boxs .i-malll .hot-tab .hot-header-text {
width: 160rpx;
display: flex;
font-family: PingFangSC-Regular, PingFang SC;
color: #999999;
text-align: center;
}
.i-page .i-boxs .i-malll .hot-tab .hot-header-text .hot-ative {
position: relative;
z-index: 1;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
font-size: 30rpx;
color: #333333;
}
.i-page .i-boxs .i-malll .hot-tab .hot-header-text .hot-ative::after {
content: '';
position: absolute;
top: 30%;
left: 0;
width: 100%;
height: 6px;
/* 背景色的高度 */
background-color: #CDE0FE;
/* 背景色 */
z-index: -1;
}
.i-page .i-boxs .i-malll .hot-tab .hot-header-text .hot-icon-show {
margin-top: 10rpx;
margin-left: 10rpx;
width: 22rpx;
height: 22rpx;
background: url('https://ddh.yyhock.com/ddhMall/hot-active-show.png') 0 0 no-repeat;
background-size: 100%;
}
.i-page .i-boxs .i-malll .hot-tab .hot-header-text .hot-icon-show-down {
margin-top: 10rpx;
margin-left: 10rpx;
width: 22rpx;
height: 22rpx;
background: url('https://ddh.yyhock.com/ddhMall/hot-active-show-down.png') 0 0 no-repeat;
background-size: 100%;
}
.i-page .i-boxs .i-malll .hot-tab .hot-icon {
margin-top: 36rpx;
margin-left: 10rpx;
width: 22rpx;
height: 22rpx;
background: url('https://ddh.yyhock.com/ddhMall/hot-active.png') 0 0 no-repeat;
background-size: 100%;
}
.i-page .i-boxs .i-malll .hot-tab .hot-show {
width: 160rpx;
display: flex;
color: #999999;
line-height: 90rpx;
text-align: center;
}
.i-page .i-boxs .i-malll .hot-fixed-show {
position: sticky;
top: 0;
left: 0;
width: 100%;
z-index: 99;
height: 86rpx;
background: #FFFFFF;
font-size: 28rpx;
line-height: 40rpx;
margin-bottom: 220rpx;
}
.i-page .i-boxs .i-malll .hot-fixed-show .hot-text {
padding-top: 108rpx;
width: 100%;
height: 98rpx;
background: #FFFFFF;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 36rpx;
color: #333333;
line-height: 50rpx;
text-align: center;
font-style: normal;
}
.i-page .i-boxs .i-malll .hot-fixed-show .hot-tab-fixed {
height: 86rpx;
display: flex;
align-items: center;
background: #FFFFFF;
font-size: 28rpx;
line-height: 40rpx;
}
.i-page .i-boxs .i-malll .hot-fixed-show .hot-tab-fixed .hot-text {
width: 100%;
height: 98rpx;
background: #FFFFFF;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
font-size: 36rpx;
color: #333333;
line-height: 50rpx;
text-align: center;
font-style: normal;
}
.i-page .i-boxs .i-malll .hot-fixed-show .hot-tab-fixed .hot-header-text {
margin-left: 30rpx;
width: 160rpx;
display: flex;
font-family: PingFangSC-Regular, PingFang SC;
color: #999999;
text-align: center;
}
.i-page .i-boxs .i-malll .hot-fixed-show .hot-tab-fixed .hot-header-text .hot-ative {
position: relative;
z-index: 1;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
font-size: 30rpx;
color: #333333;
}
.i-page .i-boxs .i-malll .hot-fixed-show .hot-tab-fixed .hot-header-text .hot-ative::after {
content: '';
position: absolute;
top: 30%;
left: 0;
width: 100%;
height: 6px;
/* 背景色的高度 */
background-color: #CDE0FE;
/* 背景色 */
z-index: -1;
}
.i-page .i-boxs .i-malll .hot-fixed-show .hot-tab-fixed .hot-header-text .hot-icon-show {
margin-top: 10rpx;
margin-left: 10rpx;
width: 22rpx;
height: 22rpx;
background: url('https://ddh.yyhock.com/ddhMall/hot-active-show.png') 0 0 no-repeat;
background-size: 100%;
}
.i-page .i-boxs .i-malll .hot-fixed-show .hot-tab-fixed .hot-header-text .hot-icon-show-down {
margin-top: 10rpx;
margin-left: 10rpx;
width: 22rpx;
height: 22rpx;
background: url('https://ddh.yyhock.com/ddhMall/hot-active-show-down.png') 0 0 no-repeat;
background-size: 100%;
}
.i-page .i-boxs .i-malll .hot-fixed-show .hot-tab-fixed .hot-icon {
margin-top: 36rpx;
margin-left: 10rpx;
width: 22rpx;
height: 22rpx;
background: url('https://ddh.yyhock.com/ddhMall/hot-active.png') 0 0 no-repeat;
background-size: 100%;
}
.i-page .i-boxs .i-malll .hot-fixed-show .hot-tab-fixed .hot-show {
margin-left: 36rpx;
width: 160rpx;
display: flex;
color: #999999;
line-height: 90rpx;
text-align: center;
}
.i-page .i-boxs .i-malll .box-at-home .main-box {
display: flex;
flex-wrap: wrap;
align-items: center;
margin: 0 30rpx;
}
.i-page .i-boxs .i-malll .box-at-home .main-box .box-item {
margin-bottom: 24rpx;
width: 333rpx;
height: 426rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(232, 232, 232, 0.49);
border-radius: 10rpx;
}
.i-page .i-boxs .i-malll .box-at-home .main-box .box-item .item-top {
display: flex;
width: 333rpx;
height: 272rpx;
position: relative;
}
.i-page .i-boxs .i-malll .box-at-home .main-box .box-item .item-top .top-img {
width: 333rpx;
height: 272rpx;
background-size: 333rpx 272rpx;
border-radius: 10rpx;
}
.i-page .i-boxs .i-malll .box-at-home .main-box .box-item .item-top .top-icon {
position: absolute;
top: 0;
margin-left: 215rpx;
display: inline-block;
width: 118rpx;
height: 110rpx;
background: url('https://ddh.yyhock.com/ddhMall/goods-sale.png') 0 0 no-repeat;
background-size: 118rpx 110rpx ;
}
.i-page .i-boxs .i-malll .box-at-home .main-box .box-item .item-footer {
padding: 9rpx 16rpx 21rpx 0rpx;
}
.i-page .i-boxs .i-malll .box-at-home .main-box .box-item .item-footer .footer-des {
width: 160rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 26rpx;
color: #333333;
line-height: 37rpx;
text-align: left;
font-style: normal;
white-space: nowrap;
/* 确保文本在一行内显示 */
overflow: hidden;
/* 隐藏超出容器的内容 */
text-overflow: ellipsis;
/* 使用省略号表示被截断的文本 */
word-break: break-all;
/* 允许在单词内换行 */
}
.i-page .i-boxs .i-malll .box-at-home .main-box .box-item .item-footer .footer-box {
display: flex;
margin: 9rpx 0 16rpx;
}
.i-page .i-boxs .i-malll .box-at-home .main-box .box-item .item-footer .footer-box .box-num {
display: flex;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #FC4D3E;
line-height: 28rpx;
text-align: left;
font-style: normal;
}
.i-page .i-boxs .i-malll .box-at-home .main-box .box-item .item-footer .footer-box .box-num .num-icon {
margin-top: 4rpx;
font-size: 20rpx;
}
.i-page .i-boxs .i-malll .box-at-home .main-box .box-item .item-footer .footer-line {
display: flex;
align-items: center;
justify-content: space-between;
}
.i-page .i-boxs .i-malll .box-at-home .main-box .box-item .item-footer .footer-line .box-btn {
width: 76rpx;
height: 38rpx;
border-radius: 5rpx;
border: 1rpx solid #2263E6;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 20rpx;
color: #2263E6;
line-height: 38rpx;
text-align: center;
font-style: normal;
}
.i-page .i-boxs .i-malll .box-at-home .main-box .box-item .item-footer .footer-line .box-last {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 20rpx;
color: #999999;
line-height: 38rpx;
text-align: right;
font-style: normal;
}
.i-page .i-boxs .i-malll .box-at-home .main-box :nth-child(2n) {
margin-left: 24rpx;
}
This diff is collapsed.
...@@ -169,13 +169,13 @@ export default { ...@@ -169,13 +169,13 @@ export default {
"verifyCode": self.sendcode "verifyCode": self.sendcode
} }
self.$request('/pawn/client/login', 'POST', params).then(res => { self.$request('/pawn/client/login', 'POST', params).then(res => {
console.log(res, 'login');
const { userInfo, token } = res.result const { userInfo, token } = res.result
if (userInfo) { if (userInfo) {
const { deviceId } = userInfo const { deviceId } = userInfo
uni.setStorageSync('deviceId', deviceId) uni.setStorageSync('deviceId', deviceId)
} }
uni.setStorageSync('token', token) uni.setStorageSync('token', token)
uni.setStorageSync('d-mobile', self.mobile)
self.loginNocheck() self.loginNocheck()
// 设置 // 设置
......
...@@ -72,6 +72,16 @@ export default { ...@@ -72,6 +72,16 @@ export default {
onShow() { onShow() {
this.init(); this.init();
}, },
// 页面下拉刷新
async onPullDownRefresh() {
// 初始化设备
await this.init()
setTimeout(() => {
uni.stopPullDownRefresh();
}, 1000);
},
methods: { methods: {
// 初始化 // 初始化
init() { init() {
...@@ -149,12 +159,41 @@ export default { ...@@ -149,12 +159,41 @@ export default {
}) })
}, },
goPage(item) { goPage(item) {
switch (item.title) {
case "我的浏览":
this.buryingPoint('app:my_browsing_history_click')
break;
case "我的需求":
this.buryingPoint('app:my_requests_click')
break;
case "我的关注":
this.buryingPoint('app:my_favorites_click')
break;
case "用户反馈":
this.buryingPoint('app:my_user_feedback_click')
break;
default:
break;
}
this.Go(item.linkUrl) this.Go(item.linkUrl)
}, },
goLogin() { goLogin() {
this.Go('uni:/pages/login/login') this.Go('uni:/pages/login/login')
}, },
goBar(item) { goBar(item) {
switch (item.title) {
case "我的还款":
this.buryingPoint('app:my_repayment_click')
break;
case "申请记录":
this.buryingPoint('app:my_application_record_click')
break;
default:
break;
}
const self = this const self = this
const token = uni.getStorageSync('token') const token = uni.getStorageSync('token')
if (token != '') { if (token != '') {
...@@ -166,11 +205,27 @@ export default { ...@@ -166,11 +205,27 @@ export default {
} }
}, },
goTel() { goTel() {
this.buryingPoint('app:my_contact_us_click')
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: this.serviceCall //仅为示例 phoneNumber: this.serviceCall //仅为示例
}); });
}, },
goItem(item) { goItem(item) {
switch (item.title) {
case "设置":
this.buryingPoint('app:my_settings_click')
break;
case "帮助中心":
this.buryingPoint('app:my_help_center_click')
break;
default:
break;
}
if (item.linkUrl != '') { if (item.linkUrl != '') {
console.log('66', item) console.log('66', item)
this.Go(item.linkUrl) this.Go(item.linkUrl)
......
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
<view class='label-text'>描述</view> <view class='label-text'>描述</view>
</view> </view>
<view class='box-tarea'> <view class='box-tarea'>
<textarea class='box-con' placeholder="请详细描述您的问题或建议,我们将及时跟进" maxlength="100" @input="sufontnum($event)"></textarea> <textarea class='box-con' placeholder="请详细描述您的问题或建议,我们将及时跟进" maxlength="100"
<text class='contain-length'>{{fountNum}}/<text class="length-total">100</text></text> @input="sufontnum($event)"></textarea>
<text class='contain-length'>{{ fountNum }}/<text class="length-total">100</text></text>
</view> </view>
</view> </view>
</view> </view>
...@@ -19,41 +20,40 @@ ...@@ -19,41 +20,40 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
fountNum:0, fountNum: 0,
desQuest:'' desQuest: ''
}
},
methods: {
needSubmit() {
const content = this.desQuest;
if (!content) {
return this.toast('描述不能为空')
} }
}, this.$request('/pawn/feed/addFeed', 'POST', { content }).then(res => {
methods: { if (res.success) {
needSubmit(){ this.toast('提交成功', 'success')
const self=this setTimeout(() => {
if(self.desQuest==''){ this.Back()
self.toast('描述不能为空') }, 500)
return false
}
const params={
content:self.desQuest
}
self.$request('/pawn/feed/addFeed','POST',params).then(res => {
console.log(res.result,'followGood');
self.toast('提交成功')
self.Go('uni:/pages/index/index','tab')
}).catch(err=>{
console.log(err,'请求出错')
})
},
sufontnum(e){
if(e.detail.value.length>100){
self.toast('不可超过100字')
return false
} }
this.desQuest=e.detail.value }).catch(err => {
this.fountNum=e.detail.value.length console.log(err, '请求出错')
}, })
} },
sufontnum(e) {
if (e.detail.value.length > 100) {
self.toast('不可超过100字')
return false
}
this.desQuest = e.detail.value
this.fountNum = e.detail.value.length
},
} }
}
</script> </script>
<style src='./index.less' lang="less" scoped></style> <style src='./index.less' lang="less" scoped></style>
This diff is collapsed.
This diff is collapsed.
...@@ -4,6 +4,47 @@ import Permission from '@/js_sdk/wa-permission/permission' ...@@ -4,6 +4,47 @@ import Permission from '@/js_sdk/wa-permission/permission'
import { SelectLocation } from "./authPerission"; import { SelectLocation } from "./authPerission";
import API from '@/server/common' import API from '@/server/common'
// 异步请求
export function getNetworkException(requestList) {
return Promise.all(requestList)
.then((res) => {
// console.log('getNetworkException-res----------', res)
})
.catch((err) => {
if (err.code != "20001") return;
uni.$util.showToast("网络有点忙, 请刷新试试~");
})
.finally(() => {
// uni.hideLoading()
// complete()
});
}
// toast 提示框
export function showToast(title = "", duration = 2000, icon = "none") {
return new Promise((resolve, reject) =>
uni.showToast({
title,
duration,
icon,
success: () => setTimeout(() => resolve(), duration),
fail: () => reject(),
})
);
}
// 切换tabBar的显示和隐藏
export const isLogin = () => {
let flag = false
const token = uni.getStorageSync('token')
token ? flag = true : flag = false
return flag
}
// 切换tabBar的显示和隐藏 // 切换tabBar的显示和隐藏
export const switchShowTabbar = async () => { export const switchShowTabbar = async () => {
const token = uni.getStorageSync('token') const token = uni.getStorageSync('token')
......
...@@ -39,45 +39,28 @@ const request = async (url, type, data) => { ...@@ -39,45 +39,28 @@ const request = async (url, type, data) => {
Author: token, //多典花 Author: token, //多典花
}, },
success: (res) => { success: (res) => {
// console.log(res,'333') // #ifdef APP
const { // console.log(res, 'response')
data, // #endif
statusCode const { data, statusCode } = res;
} = res;
if (statusCode === 200) { if (statusCode === 200) {
if (data.success == true) { if (data.success == true) {
return resolve(data) return resolve(data)
} else { } else {
if (data.code == '403') { if (data.code == '403') uni.removeStorageSync('token')
console.log(res, '402'); return reject(data)
uni.showToast({
title: data.message,
icon: "none",
duration: 2000
})
uni.removeStorageSync('token')
} else {
uni.showToast({
title: data.message,
icon: "none",
duration: 2000
})
return false
}
} }
} else { } else {
console.log(res.errMsg, '!200'); return reject({ ...data, message: res.errMsg })
return reject({
data,
message: res.errMsg
})
} }
}, },
fail: (err) => { fail: (err) => {
console.log(err, "AJAX请求报错") uni.showToast({
title: err.message ? err.message : '服务器开小差了~',
icon: "none",
duration: 2000
})
reject(err) reject(err)
} }
}); });
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
export const Jump = function (url, type='navigate') { export const Jump = function (url, type='navigate') {
console.log(url,type,'路径1')
if (!url) return; if (!url) return;
const index = url.indexOf(":"); const index = url.indexOf(":");
...@@ -28,8 +27,7 @@ export const Jump = function (url, type='navigate') { ...@@ -28,8 +27,7 @@ export const Jump = function (url, type='navigate') {
console.log("跳转到其它APP 或者 小程序 或者其它的内容") console.log("跳转到其它APP 或者 小程序 或者其它的内容")
break; break;
} }
console.log(targetPath,'路径')
switch (type) { switch (type) {
case 'redirect': case 'redirect':
uni.redirectTo({ uni.redirectTo({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment