Commit e2ac3edf by huangzhi

feat: 已购和首页

parent 1842bd1a
...@@ -7,6 +7,9 @@ module.exports = { ...@@ -7,6 +7,9 @@ module.exports = {
sourceType: 'module', sourceType: 'module',
allowImportExportEverywhere: true, allowImportExportEverywhere: true,
}, },
globals: {
uni: 'readonly',
},
// 此项指定环境的全局变量,下面的配置指定为浏览器环境 // 此项指定环境的全局变量,下面的配置指定为浏览器环境
env: { env: {
browser: true, browser: true,
......
...@@ -6,10 +6,11 @@ let h2Prefix ...@@ -6,10 +6,11 @@ let h2Prefix
let ydlH5Prefix let ydlH5Prefix
if (isDevelopment) { if (isDevelopment) {
// hostPrefix = 'https://testnewm.ydl.com' hostPrefix = 'https://testnewm.ydl.com'
// apiPrefix = 'https://testapi.ydl.com' // hostPrefix = 'http://192.168.211.138'
hostPrefix = 'https://newm-test.ydl.com' // 下云 apiPrefix = 'https://testapi.ydl.com'
apiPrefix = 'https://api-test.ydl.com' // 下云 // hostPrefix = 'https://newm-test.ydl.com' // 下云
// apiPrefix = 'https://api-test.ydl.com' // 下云
h2Prefix = 'https://h2.yidianling.com' h2Prefix = 'https://h2.yidianling.com'
ydlH5Prefix = 'https://testh5.ydl.com' ydlH5Prefix = 'https://testh5.ydl.com'
} else { } else {
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
"quickapp" : {}, "quickapp" : {},
/* 快应用特有相关 */ /* 快应用特有相关 */
"mp-weixin" : { "mp-weixin" : {
"appid" : "", "appid" : "wx1106c32a36d87d49",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"es6" : false, "es6" : false,
......
<template>
<div class="empty">
<img src="//static.ydlcdn.com/m/images/m/course/rectangle.svg"/>
<p>{{text || '暂无数据'}}</p>
</div>
</template>
<script>
export default {
name: 'Empty',
props: ['text'],
}
</script>
<style lang="less" scoped>
.empty {
text-align: center;
p {
margin-top: 12px;
color: #999;
font-size: 13px;
text-align: center;
}
}
</style>
\ No newline at end of file
...@@ -20,12 +20,14 @@ ...@@ -20,12 +20,14 @@
src="https://static.ydlcdn.com/mini/mini_consult/pic_default_avatar.png" src="https://static.ydlcdn.com/mini/mini_consult/pic_default_avatar.png"
@click="handleLoginClick" @click="handleLoginClick"
/> />
<text <view v-if="isLogin">
v-if="isLogin" <text class="user-name-phone">
class="user-name" {{ userInfo.nickName }}
> </text>
{{ userInfo.nickName }} <text class="user-name-phone">
</text> {{ userPhoneTxt }}
</text>
</view>
<view <view
v-else v-else
@click="handleLoginClick" @click="handleLoginClick"
...@@ -70,7 +72,7 @@ ...@@ -70,7 +72,7 @@
</template> </template>
<script> <script>
import { hostPrefix, h2Prefix } from '@/config' import { hostPrefix } from '@/config'
import { setTrackData } from '@/utils/util' import { setTrackData } from '@/utils/util'
export default { export default {
...@@ -79,26 +81,6 @@ export default { ...@@ -79,26 +81,6 @@ export default {
return { return {
menus: [ menus: [
{ {
icon: '/static/icon_order.png',
label: '我的订单',
callback: () => {
this.handleSendMenuTrackData('我的订单')
this.navigateToOrder()
},
},
{
icon: '/static/icon_help_center.png',
label: '帮助中心',
callback: () => {
this.handleSendMenuTrackData('帮助中心')
uni.navigateTo({
url: `/pages/web/web?title=帮助中心&loadUrl=${encodeURIComponent(
`${h2Prefix}/help/list/12`,
)}`,
})
},
},
{
icon: '/static/icon_custom_service.png', icon: '/static/icon_custom_service.png',
label: '联系客服', label: '联系客服',
callback: () => { callback: () => {
...@@ -142,6 +124,13 @@ export default { ...@@ -142,6 +124,13 @@ export default {
isLogin() { isLogin() {
return this.$store.getters.isLogin return this.$store.getters.isLogin
}, },
// 混淆手机号码
userPhoneTxt() {
if (this.userInfo.phone) {
return String(this.userInfo.phone).replace(/(.{3})(.{4})(.+$)/, '$1****$3')
}
return ''
},
}, },
mounted() { mounted() {
// 页面访问埋点 // 页面访问埋点
...@@ -243,6 +232,14 @@ export default { ...@@ -243,6 +232,14 @@ export default {
font-size: 18px; font-size: 18px;
margin-bottom: 4px; margin-bottom: 4px;
} }
.user-name-phone {
margin-left: 16px;
color: #000000;
font-weight: 400;
font-size: 15px;
margin-bottom: 4px;
display: block;
}
.login-tips { .login-tips {
margin-left: 16px; margin-left: 16px;
......
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