Skip to content

Commit 04a56b5

Browse files
committed
【合并】合并主分支
2 parents 8c22012 + cf2c604 commit 04a56b5

File tree

68 files changed

+335
-4164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+335
-4164
lines changed

CoreCms.Net.Uni-App/CoreShop/common/request/http.interceptor.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -51,40 +51,17 @@ const install = (Vue, vm) => {
5151
//console.log(page.route);
5252
// 登录信息过期或者未登录
5353
if (result.data === 14007 || result.data === 14006) {
54-
// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
55-
if (page.route.indexOf('pages/login/loginBySMS/loginBySMS') < 0) {
56-
db.del("userToken");
57-
uni.showToast({
58-
title: result.msg,
59-
icon: 'none',
60-
duration: 1000,
61-
complete: function () {
62-
setTimeout(function () {
63-
uni.hideToast();
64-
uni.navigateTo({
65-
url: '/pages/login/loginBySMS/loginBySMS'
66-
});
67-
},
68-
1000);
69-
}
70-
});
71-
}
72-
// #endif
73-
// #ifdef MP-WEIXIN || MP-ALIPAY || MP-TOUTIAO
7454
db.del("userToken");
7555
console.log("开启登录弹窗");
7656
//Vue.prototype.$store.commit('showLoginTip', true);
7757
Vue.prototype.$store.commit('hasLogin', false);
78-
// #endif
7958
}
8059
}
8160

8261
return result;
8362
// res为服务端返回值,可能有code,result等字段
8463
// 这里对res.result进行返回,将会在this.$u.post(url).then(res => {})的then回调中的res的到
8564
// 如果配置了originalData为true,请留意这里的返回值
86-
87-
8865
}
8966
}
9067

CoreCms.Net.Uni-App/CoreShop/common/setting/constVarsHelper.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
export const apiBaseUrl = 'http://localhost:2015';
88
//项目静态资源请求地址,如果使用官方的静态文件地址可以直接替换为:https://files.cdn.coreshop.cn
99
export const apiFilesUrl = 'https://files.cdn.coreshop.cn';
10-
export const h5Url = apiBaseUrl + "/wap/"; //H5端网站地址,
1110

1211
// #ifdef H5
1312
export const baseUrl = process.env.NODE_ENV === 'development' ? window.location.origin + '/' : apiBaseUrl
@@ -22,11 +21,6 @@ export const paymentType = {
2221
serviceOrder: 5, //服务订单
2322
};
2423

25-
// #ifdef MP-TOUTIAO
26-
export const ttPlatform = 'toutiao'; //toutiao=今日头条小程序, douyin=抖音小程序, pipixia=皮皮虾小程序, huoshan=火山小视频小程序
27-
// #endif
28-
29-
3024
//nav页面导航类型
3125
export const navLinkType = {
3226
urlLink: 1, //"URL链接"

CoreCms.Net.Uni-App/CoreShop/components/coreshop-login-modal/coreshop-login-modal.vue

Lines changed: 0 additions & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,6 @@
11
<template>
22
<view>
33
<u-toast ref="uToast" />
4-
<!-- #ifndef MP-WEIXIN -->
5-
<u-popup class="coreshop-bottom-popup-box" v-if="showLogin" v-model="showLogin" cathctouchmove @tap="hideModal" mode="bottom">
6-
<view class="radius coreshop-bg-white" @tap.stop style="background: none;overflow: visible;">
7-
<view class="modal-box">
8-
<image class="head-bg" src="/static/images/login/nologin_bg.png" mode=""></image>
9-
<view class="detail">
10-
<view class="user-avatar">
11-
<!-- #ifndef MP-TOUTIAO -->
12-
<open-data type="userAvatarUrl"></open-data>
13-
<!-- #endif -->
14-
<!-- #ifdef MP-TOUTIAO -->
15-
<image class="toutiao-logo" :src="logoImage"></image>
16-
<!-- #endif -->
17-
<!-- #ifdef H5 || APP-PLUS -->
18-
<u-avatar :src="$store.state.config.shopLogo" size="large"></u-avatar>
19-
<!-- #endif -->
20-
</view>
21-
<open-data class="user-name" type="userNickName"></open-data>
22-
<view class="title2">为了提供更优质的服务</view>
23-
<view class="title2">需要获取您的头像昵称</view>
24-
</view>
25-
<view class="u-margin-top-80 coreshop-flex coreshop-flex-direction coreshop-align-center">
26-
<!-- #ifdef MP-ALIPAY -->
27-
<u-button type="success" @click="getALICode()">授权并查看</u-button>
28-
<!-- #endif -->
29-
<!-- #ifdef MP-TOUTIAO -->
30-
<u-button type="success" @click="ttLogin()">授权并查看</u-button>
31-
<!-- #endif -->
32-
<!-- #ifdef H5 || APP-PLUS -->
33-
<u-button type="success" @click="toAccountLogin()">授权并查看</u-button>
34-
<!-- #endif -->
35-
<u-button @click="closeAuth">暂不授权</u-button>
36-
</view>
37-
</view>
38-
</view>
39-
</u-popup>
40-
<!-- #endif -->
41-
<!-- #ifdef MP-WEIXIN -->
424
<u-popup class="coreshop-bottom-popup-box" v-if="showLogin" v-model="showLogin" mode="center">
435
<view class="radius coreshop-bg-white" @tap.stop style="background: none;overflow: visible;">
446
<view class="modal-box">
@@ -79,7 +41,6 @@
7941
</view>
8042
</view>
8143
</u-popup>
82-
<!-- #endif -->
8344
</view>
8445
</template>
8546

@@ -193,11 +154,6 @@
193154
hideModal() {
194155
this.showLogin = false;
195156
},
196-
// 去登录
197-
toAccountLogin() {
198-
this.showLogin = false;
199-
this.$u.route('/pages/login/loginByAccount/loginByAccount');
200-
},
201157
// 小程序,取消登录
202158
closeAuth() {
203159
this.showLogin = false;
@@ -236,12 +192,7 @@
236192
_this.$refs.uToast.show({ title: '登录成功', type: 'success', })
237193
return false
238194
} else {
239-
// #ifdef MP-WEIXIN
240195
_this.sessionAuthIdTool = res.data.sessionAuthId;
241-
// #endif
242-
// #ifndef MP-WEIXIN
243-
_this.$u.route({ type: 'navigateTo', url: '/pages/login/loginBySMS/loginBySMS?sessionAuthId=' + res.data.sessionAuthId });
244-
// #endif
245196
}
246197
} else {
247198
_this.$refs.uToast.show({ title: '登录失败,请重试', type: 'error', })
@@ -290,122 +241,7 @@
290241
_this.$u.toast('登录失败,请重试')
291242
}
292243
})
293-
},
294-
// #ifdef MP-ALIPAY
295-
getALICode() {
296-
let that = this
297-
uni.login({
298-
scopes: 'auth_user',
299-
success: (res) => {
300-
if (res.authCode) {
301-
uni.getUserInfo({
302-
provider: 'alipay',
303-
success: function (infoRes) {
304-
if (infoRes.errMsg == "getUserInfo:ok") {
305-
let userInfo = {
306-
'nickname': infoRes.nickName,
307-
'avatar': infoRes.avatar
308-
}
309-
that.aLiLoginStep1(res.authCode, userInfo);
310-
}
311-
},
312-
fail: function (errorRes) {
313-
this.$u.toast('未取得用户昵称头像信息');
314-
}
315-
});
316-
} else {
317-
this.$u.toast('未取得code');
318-
}
319-
},
320-
fail: function (res) {
321-
this.$u.toast('用户授权失败my.login');
322-
}
323-
});
324-
},
325-
aLiLoginStep1(code, userInfo) {
326-
let data = {
327-
'code': code,
328-
'userInfo': userInfo
329-
}
330-
this.$u.api.alilogin1(data).then(res => {
331-
this.alipayNoLogin = false;
332-
if (res.status) {
333-
this.sessionAuthIdTool = res.data.sessionAuthId
334-
//判断是否返回了token,如果没有,就说明没有绑定账号,跳转到绑定页面
335-
if (!res.data.hasOwnProperty('token')) {
336-
this.$u.route({ type: 'redirectTo', url: '/pages/login/loginBySMS/loginBySMS?sessionAuthId=' + res.data.sessionAuthId });
337-
} else {
338-
this.$db.set('userToken', res.data.token)
339-
uni.navigateBack({
340-
delta: 1
341-
});
342-
}
343-
} else {
344-
this.$u.toast(res.msg)
345-
}
346-
})
347-
},
348-
// #endif
349-
// #ifdef MP-TOUTIAO
350-
ttLogin() {
351-
let that = this
352-
uni.login({
353-
provider: 'toutiao',
354-
success: (res) => {
355-
//console.log(res);
356-
if (res.errMsg == "login:ok") {
357-
uni.getUserInfo({
358-
provider: 'toutiao',
359-
success: function (infoRes) {
360-
//console.log(infoRes);
361-
if (infoRes.errMsg == "getUserInfo:ok") {
362-
let code = res.code;
363-
let userInfo = {
364-
'nickname': infoRes.userInfo.nickName,
365-
'avatar': infoRes.userInfo.avatarUrl,
366-
'gender': infoRes.userInfo.gender,
367-
'language': infoRes.userInfo.language,
368-
'country': infoRes.userInfo.country,
369-
'city': infoRes.userInfo.city,
370-
'province': infoRes.userInfo.province
371-
}
372-
that.ttLoginStep(code, userInfo);
373-
}
374-
},
375-
fail: function (errorRes) {
376-
this.$u.toast('未取得用户昵称头像信息');
377-
}
378-
});
379-
} else {
380-
this.$u.toast('未取得code');
381-
}
382-
},
383-
fail: function (res) {
384-
this.$u.toast('用户授权失败my.login');
385-
}
386-
});
387-
},
388-
ttLoginStep(code, userInfo) {
389-
let data = {
390-
'code': code,
391-
'userInfo': userInfo
392-
}
393-
this.$u.api.ttlogin(data).then(res => {
394-
if (res.status) {
395-
if (!res.data.hasOwnProperty('token')) {
396-
this.$u.route({ type: 'redirectTo', url: '/pages/login/loginBySMS/loginBySMS?sessionAuthId=' + res.data.userId });
397-
} else {
398-
this.$db.set('userToken', res.data.token)
399-
uni.navigateBack({
400-
delta: 1
401-
});
402-
}
403-
} else {
404-
this.$u.toast(res.msg)
405-
}
406-
})
407244
}
408-
// #endif
409245
}
410246
};
411247
</script>

CoreCms.Net.Uni-App/CoreShop/components/coreshop-page/coreshop-video.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
2626
},
2727
onReady: function (res) {
28-
// #ifndef MP-ALIPAY
29-
this.videoContext = uni.createVideoContext('myVideo')
30-
// #endif
28+
3129
},
3230
methods: {
3331

0 commit comments

Comments
 (0)