Commit e2ac3edf by huangzhi

feat: 已购和首页

parent 1842bd1a
......@@ -7,6 +7,9 @@ module.exports = {
sourceType: 'module',
allowImportExportEverywhere: true,
},
globals: {
uni: 'readonly',
},
// 此项指定环境的全局变量,下面的配置指定为浏览器环境
env: {
browser: true,
......
......@@ -6,10 +6,11 @@ let h2Prefix
let ydlH5Prefix
if (isDevelopment) {
// hostPrefix = 'https://testnewm.ydl.com'
// apiPrefix = 'https://testapi.ydl.com'
hostPrefix = 'https://newm-test.ydl.com' // 下云
apiPrefix = 'https://api-test.ydl.com' // 下云
hostPrefix = 'https://testnewm.ydl.com'
// hostPrefix = 'http://192.168.211.138'
apiPrefix = 'https://testapi.ydl.com'
// hostPrefix = 'https://newm-test.ydl.com' // 下云
// apiPrefix = 'https://api-test.ydl.com' // 下云
h2Prefix = 'https://h2.yidianling.com'
ydlH5Prefix = 'https://testh5.ydl.com'
} else {
......
......@@ -54,7 +54,7 @@
"quickapp" : {},
/* 快应用特有相关 */
"mp-weixin" : {
"appid" : "",
"appid" : "wx1106c32a36d87d49",
"setting" : {
"urlCheck" : 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 @@
src="https://static.ydlcdn.com/mini/mini_consult/pic_default_avatar.png"
@click="handleLoginClick"
/>
<text
v-if="isLogin"
class="user-name"
>
<view v-if="isLogin">
<text class="user-name-phone">
{{ userInfo.nickName }}
</text>
<text class="user-name-phone">
{{ userPhoneTxt }}
</text>
</view>
<view
v-else
@click="handleLoginClick"
......@@ -70,7 +72,7 @@
</template>
<script>
import { hostPrefix, h2Prefix } from '@/config'
import { hostPrefix } from '@/config'
import { setTrackData } from '@/utils/util'
export default {
......@@ -79,26 +81,6 @@ export default {
return {
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',
label: '联系客服',
callback: () => {
......@@ -142,6 +124,13 @@ export default {
isLogin() {
return this.$store.getters.isLogin
},
// 混淆手机号码
userPhoneTxt() {
if (this.userInfo.phone) {
return String(this.userInfo.phone).replace(/(.{3})(.{4})(.+$)/, '$1****$3')
}
return ''
},
},
mounted() {
// 页面访问埋点
......@@ -243,6 +232,14 @@ export default {
font-size: 18px;
margin-bottom: 4px;
}
.user-name-phone {
margin-left: 16px;
color: #000000;
font-weight: 400;
font-size: 15px;
margin-bottom: 4px;
display: block;
}
.login-tips {
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