转账成功页面添加埋点
This commit is contained in:
parent
4dbe88a024
commit
3fd398ffa4
2
main.js
2
main.js
|
|
@ -27,7 +27,7 @@ export function createApp() {
|
||||||
const systemInfo = uni.getStorageSync('systemInfo') || {}
|
const systemInfo = uni.getStorageSync('systemInfo') || {}
|
||||||
app.config.globalProperties.$system = systemInfo.platform == 'ios' ? 'iOS' : 'Android'
|
app.config.globalProperties.$system = systemInfo.platform == 'ios' ? 'iOS' : 'Android'
|
||||||
app.config.globalProperties.$systemInfo = systemInfo
|
app.config.globalProperties.$systemInfo = systemInfo
|
||||||
uni.setStorageSync('version', '1.0.3.sp12')
|
uni.setStorageSync('version', '1.0.3.sp13')
|
||||||
app.config.globalProperties.$version = uni.getStorageSync('version')
|
app.config.globalProperties.$version = uni.getStorageSync('version')
|
||||||
|
|
||||||
app.use(globalMethods);
|
app.use(globalMethods);
|
||||||
|
|
|
||||||
|
|
@ -202,15 +202,18 @@
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
onMounted,
|
onMounted,
|
||||||
reactive
|
reactive,
|
||||||
|
getCurrentInstance
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import {
|
import {
|
||||||
onShow
|
onShow,
|
||||||
|
onLoad
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import {
|
import {
|
||||||
util,
|
util,
|
||||||
numberUtil
|
numberUtil
|
||||||
} from '@/utils/common.js';
|
} from '@/utils/common.js';
|
||||||
|
const { appContext, proxy } = getCurrentInstance();
|
||||||
|
|
||||||
const statusBarHeight = ref(0);
|
const statusBarHeight = ref(0);
|
||||||
const editPopup = ref(null);
|
const editPopup = ref(null);
|
||||||
|
|
@ -227,6 +230,15 @@ const transferData = reactive({
|
||||||
promoPrice: '8'
|
promoPrice: '8'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
// 进入转账页面埋点
|
||||||
|
proxy.$apiUserEvent('all', {
|
||||||
|
type: 'click',
|
||||||
|
key: 'transfer',
|
||||||
|
value: "转账"
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
// 从缓存加载数据
|
// 从缓存加载数据
|
||||||
const loadStorageData = () => {
|
const loadStorageData = () => {
|
||||||
const savedData = uni.getStorageSync(STORAGE_KEY);
|
const savedData = uni.getStorageSync(STORAGE_KEY);
|
||||||
|
|
|
||||||
|
|
@ -136,42 +136,42 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
util,
|
util,
|
||||||
uiUtil
|
uiUtil
|
||||||
} from '@/utils/common.js'
|
} from '@/utils/common.js'
|
||||||
import {
|
import {
|
||||||
storage
|
storage
|
||||||
} from '@/utils/storage.js'
|
} from '@/utils/storage.js'
|
||||||
import {
|
import {
|
||||||
get,
|
get,
|
||||||
postJson
|
postJson
|
||||||
} from '@/utils/requests.js'
|
} from '@/utils/requests.js'
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive,
|
reactive,
|
||||||
toRefs
|
toRefs
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
onShow,
|
onShow,
|
||||||
onHide,
|
onHide,
|
||||||
onUnload,
|
onUnload,
|
||||||
onReady
|
onReady
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
|
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
// NVUE 挂载极快,但给它 100~200ms 的喘息让原生视图确认渲染
|
// NVUE 挂载极快,但给它 100~200ms 的喘息让原生视图确认渲染
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
plus.navigator.closeSplashscreen();
|
plus.navigator.closeSplashscreen();
|
||||||
// #endif
|
// #endif
|
||||||
}, 150);
|
}, 150);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 内部埋点方法
|
// 内部埋点方法
|
||||||
const apiUserEvent = async (type, adminData) => {
|
const apiUserEvent = async (type, adminData) => {
|
||||||
let uni_version = uni.getStorageSync("version")
|
let uni_version = uni.getStorageSync("version")
|
||||||
if (type != 'uni') {
|
if (type != 'uni') {
|
||||||
await postJson('a', 'api/user/event', {
|
await postJson('a', 'api/user/event', {
|
||||||
|
|
@ -184,10 +184,10 @@
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 内部跳转充值页方法
|
// 内部跳转充值页方法
|
||||||
const goRechargePage = () => {
|
const goRechargePage = () => {
|
||||||
// 进入页面
|
// 进入页面
|
||||||
apiUserEvent('all', {
|
apiUserEvent('all', {
|
||||||
type: "event",
|
type: "event",
|
||||||
|
|
@ -200,89 +200,89 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/common/recharge/index'
|
url: '/pages/common/recharge/index'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 菜单列表
|
// 菜单列表
|
||||||
const menuList = [{
|
const menuList = [{
|
||||||
icon: "yuemoni",
|
icon: "yuemoni",
|
||||||
name: "余额模拟",
|
name: "余额模拟",
|
||||||
isHot: false,
|
isHot: false,
|
||||||
path: "/pages/balance/index"
|
path: "/pages/balance/index"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "zhangdanshencheng",
|
icon: "zhangdanshencheng",
|
||||||
name: "账单生成",
|
name: "账单生成",
|
||||||
isHot: false,
|
isHot: false,
|
||||||
path: "/pages/bill/bill-list/bill-list"
|
path: "/pages/bill/bill-list/bill-list"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "licaiheika",
|
icon: "licaiheika",
|
||||||
name: "理财黑卡",
|
name: "理财黑卡",
|
||||||
isHot: true,
|
isHot: true,
|
||||||
path: "/pages/finance-management/index"
|
path: "/pages/finance-management/index"
|
||||||
// path: ""
|
// path: ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "huabei",
|
icon: "huabei",
|
||||||
name: "花呗",
|
name: "花呗",
|
||||||
isHot: false,
|
isHot: false,
|
||||||
path: "/pages/ant-credit-pay/index"
|
path: "/pages/ant-credit-pay/index"
|
||||||
}, {
|
}, {
|
||||||
icon: "zhuanzhang",
|
icon: "zhuanzhang",
|
||||||
name: "转账模拟",
|
name: "转账模拟",
|
||||||
isHot: false,
|
isHot: false,
|
||||||
path: "/pages/balance/transfer/transfer"
|
path: "/pages/balance/transfer/transfer"
|
||||||
}, {
|
}, {
|
||||||
icon: "nianduzhangdan",
|
icon: "nianduzhangdan",
|
||||||
name: "年度账单",
|
name: "年度账单",
|
||||||
isHot: false,
|
isHot: false,
|
||||||
path: "/pages/common/alipay-annual-bill/alipay-annual-bill"
|
path: "/pages/common/alipay-annual-bill/alipay-annual-bill"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
const otherList = [{
|
const otherList = [{
|
||||||
icon: "/static/image/index/qita/jipiao.png",
|
icon: "/static/image/index/qita/jipiao.png",
|
||||||
name: "机票",
|
name: "机票",
|
||||||
path: "/pages/other/tickets-app/index?type=airTicket"
|
path: "/pages/other/tickets-app/index?type=airTicket"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "/static/image/index/qita/huochepiao.png",
|
icon: "/static/image/index/qita/huochepiao.png",
|
||||||
name: "火车票",
|
name: "火车票",
|
||||||
// path: "/pages/other/train-tickets/12306-tickets/12306-tickets"
|
// path: "/pages/other/train-tickets/12306-tickets/12306-tickets"
|
||||||
path: "/pages/other/tickets-app/index?type=trainTicket"
|
path: "/pages/other/tickets-app/index?type=trainTicket"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "/static/image/index/qita/gongzidan.png",
|
icon: "/static/image/index/qita/gongzidan.png",
|
||||||
name: "工资单",
|
name: "工资单",
|
||||||
path: "/pages/other/splash/splash"
|
path: "/pages/other/splash/splash"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "/static/image/index/qita/shipinqunliao.png",
|
icon: "/static/image/index/qita/shipinqunliao.png",
|
||||||
name: "视频群聊",
|
name: "视频群聊",
|
||||||
path: "/pages/other/video-group-chat/video-group-chat"
|
path: "/pages/other/video-group-chat/video-group-chat"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "/static/image/index/qita/card.png",
|
icon: "/static/image/index/qita/card.png",
|
||||||
name: "身份证",
|
name: "身份证",
|
||||||
path: "/pages/other/card/card"
|
path: "/pages/other/card/card"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "/static/image/index/qita/message.png",
|
icon: "/static/image/index/qita/message.png",
|
||||||
name: "短信",
|
name: "短信",
|
||||||
path: "/pages/common/call-and-message-entry/call-and-message-entry?type=message"
|
path: "/pages/common/call-and-message-entry/call-and-message-entry?type=message"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "/static/image/index/qita/call.png",
|
icon: "/static/image/index/qita/call.png",
|
||||||
name: "通话",
|
name: "通话",
|
||||||
path: "/pages/common/call-and-message-entry/call-and-message-entry?type=call"
|
path: "/pages/common/call-and-message-entry/call-and-message-entry?type=call"
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// icon: "/static/image/index/qita/gouwu.png",
|
// icon: "/static/image/index/qita/gouwu.png",
|
||||||
// name: "购物",
|
// name: "购物",
|
||||||
// path: "/pages/shopping/index"
|
// path: "/pages/shopping/index"
|
||||||
// },
|
// },
|
||||||
]
|
]
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
navBarBgColor: 'transparent',
|
navBarBgColor: 'transparent',
|
||||||
statusBarHeight: 0,
|
statusBarHeight: 0,
|
||||||
windowWidth: 0,
|
windowWidth: 0,
|
||||||
|
|
@ -293,9 +293,9 @@
|
||||||
vision: "",
|
vision: "",
|
||||||
platform: '', // 添加平台信息,
|
platform: '', // 添加平台信息,
|
||||||
qqgroup: {}
|
qqgroup: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
const {
|
const {
|
||||||
statusBarHeight,
|
statusBarHeight,
|
||||||
windowWidth,
|
windowWidth,
|
||||||
windowHeight,
|
windowHeight,
|
||||||
|
|
@ -305,12 +305,12 @@
|
||||||
vision,
|
vision,
|
||||||
platform,
|
platform,
|
||||||
qqgroup
|
qqgroup
|
||||||
} = toRefs(data);
|
} = toRefs(data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理页面滚动事件
|
* 处理页面滚动事件
|
||||||
*/
|
*/
|
||||||
const handleScroll = (e) => {
|
const handleScroll = (e) => {
|
||||||
const scrollTop = e.detail.scrollTop
|
const scrollTop = e.detail.scrollTop
|
||||||
// 滚动超过20px时显示蓝色背景,否则显示透明背景
|
// 滚动超过20px时显示蓝色背景,否则显示透明背景
|
||||||
if (scrollTop > 20) {
|
if (scrollTop > 20) {
|
||||||
|
|
@ -318,16 +318,16 @@
|
||||||
} else {
|
} else {
|
||||||
data.navBarBgColor = 'transparent'
|
data.navBarBgColor = 'transparent'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad(async () => {
|
onLoad(async () => {
|
||||||
// 获取平台信息
|
// 获取平台信息
|
||||||
const systemInfo = uni.getSystemInfoSync()
|
const systemInfo = uni.getSystemInfoSync()
|
||||||
data.platform = systemInfo.platform
|
data.platform = systemInfo.platform
|
||||||
data.vision = uni.getStorageSync('version')
|
data.vision = uni.getStorageSync('version')
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
// 启动时获取数据
|
// 启动时获取数据
|
||||||
fetchUserData()
|
fetchUserData()
|
||||||
// 每次显示时刷新数据
|
// 每次显示时刷新数据
|
||||||
|
|
@ -343,12 +343,12 @@
|
||||||
plus.navigator.setStatusBarStyle("dark");
|
plus.navigator.setStatusBarStyle("dark");
|
||||||
}, 500)
|
}, 500)
|
||||||
// #endif
|
// #endif
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户数据(从服务器)
|
* 获取用户数据(从服务器)
|
||||||
*/
|
*/
|
||||||
const fetchUserData = async () => {
|
const fetchUserData = async () => {
|
||||||
try {
|
try {
|
||||||
// 先设置默认值,避免页面显示异常
|
// 先设置默认值,避免页面显示异常
|
||||||
setUserData()
|
setUserData()
|
||||||
|
|
@ -388,12 +388,12 @@
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取用户数据异常:', error)
|
console.error('获取用户数据异常:', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户信息
|
* 获取用户信息
|
||||||
*/
|
*/
|
||||||
const fetchUserInfo = async () => {
|
const fetchUserInfo = async () => {
|
||||||
const data = await get('', 'api/user', {})
|
const data = await get('', 'api/user', {})
|
||||||
if (data.code === 0) {
|
if (data.code === 0) {
|
||||||
uni.setStorageSync('userInfo', data.data)
|
uni.setStorageSync('userInfo', data.data)
|
||||||
|
|
@ -401,12 +401,12 @@
|
||||||
} else {
|
} else {
|
||||||
throw new Error(data.message || '获取用户信息失败')
|
throw new Error(data.message || '获取用户信息失败')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户配置
|
* 获取用户配置
|
||||||
*/
|
*/
|
||||||
const fetchUserConfig = async () => {
|
const fetchUserConfig = async () => {
|
||||||
const data = await get('', 'api/user/config', {})
|
const data = await get('', 'api/user/config', {})
|
||||||
if (data.code === 0) {
|
if (data.code === 0) {
|
||||||
uni.setStorageSync('config', data.data)
|
uni.setStorageSync('config', data.data)
|
||||||
|
|
@ -414,13 +414,13 @@
|
||||||
} else {
|
} else {
|
||||||
throw new Error(data.message || '获取用户配置失败')
|
throw new Error(data.message || '获取用户配置失败')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置用户数据(从本地存储读取)
|
* 设置用户数据(从本地存储读取)
|
||||||
*/
|
*/
|
||||||
const setUserData = () => {
|
const setUserData = () => {
|
||||||
// 用户信息 - 提供默认值
|
// 用户信息 - 提供默认值
|
||||||
const userInfoData = storage.get("userInfo")
|
const userInfoData = storage.get("userInfo")
|
||||||
data.userInfo = userInfoData || {
|
data.userInfo = userInfoData || {
|
||||||
|
|
@ -462,9 +462,9 @@
|
||||||
}
|
}
|
||||||
data.videoHelpList = []
|
data.videoHelpList = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const clickMenu = (item) => {
|
const clickMenu = (item) => {
|
||||||
if (!item.path) {
|
if (!item.path) {
|
||||||
uiUtil.showError('开发中')
|
uiUtil.showError('开发中')
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -475,61 +475,61 @@
|
||||||
}
|
}
|
||||||
util.goPage(url)
|
util.goPage(url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 开通vip
|
// 开通vip
|
||||||
const openVip = () => {
|
const openVip = () => {
|
||||||
goRechargePage()
|
goRechargePage()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点击视频教程
|
* 点击视频教程
|
||||||
* @param item
|
* @param item
|
||||||
*/
|
*/
|
||||||
const clickVideoHelp = (item) => {
|
const clickVideoHelp = (item) => {
|
||||||
const url = item.url
|
const url = item.url
|
||||||
util.goPage(`/pages/common/webview/webview?url=${encodeURIComponent(url)}&title=${item.text}`)
|
util.goPage(`/pages/common/webview/webview?url=${encodeURIComponent(url)}&title=${item.text}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点击公告
|
* 点击公告
|
||||||
*/
|
*/
|
||||||
const clickNotice = () => {
|
const clickNotice = () => {
|
||||||
console.log("点击公告", noticeInfo.value)
|
console.log("点击公告", noticeInfo.value)
|
||||||
if (!noticeInfo.value.url) return
|
if (!noticeInfo.value.url) return
|
||||||
const url = noticeInfo.value.url + `&uni_id=${userInfo.value.user_id}`
|
const url = noticeInfo.value.url + `&uni_id=${userInfo.value.user_id}`
|
||||||
util.goPage(`/pages/common/webview/webview?url=${encodeURIComponent(url)}&title=${noticeInfo.value.title}`)
|
util.goPage(`/pages/common/webview/webview?url=${encodeURIComponent(url)}&title=${noticeInfo.value.title}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终极兼容版复制函数
|
* 终极兼容版复制函数
|
||||||
*/
|
*/
|
||||||
const copyNumber = (number) => {
|
const copyNumber = (number) => {
|
||||||
if (!number) return;
|
if (!number) return;
|
||||||
const text = String(number);
|
const text = String(number);
|
||||||
uni.setClipboardData({
|
uni.setClipboardData({
|
||||||
data: text,
|
data: text,
|
||||||
success: function() {
|
success: function () {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '复制成功',
|
title: '复制成功',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fail: function() {
|
fail: function () {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '复制失败',
|
title: '复制失败',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退出模拟器
|
* 退出模拟器
|
||||||
*/
|
*/
|
||||||
const exit = () => {
|
const exit = () => {
|
||||||
console.log("退出模拟器")
|
console.log("退出模拟器")
|
||||||
// 判断是否为 iOS 环境
|
// 判断是否为 iOS 环境
|
||||||
if (uni.getSystemInfoSync().platform === 'ios') {
|
if (uni.getSystemInfoSync().platform === 'ios') {
|
||||||
|
|
@ -539,25 +539,25 @@
|
||||||
} else {
|
} else {
|
||||||
plus.runtime.quit();
|
plus.runtime.quit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const noticeContainer = ref(null);
|
const noticeContainer = ref(null);
|
||||||
const noticeInner = ref(null);
|
const noticeInner = ref(null);
|
||||||
const noticeBox = ref(null);
|
const noticeBox = ref(null);
|
||||||
|
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
const animation = uni.requireNativePlugin('animation');
|
const animation = uni.requireNativePlugin('animation');
|
||||||
const dom = uni.requireNativePlugin('dom');
|
const dom = uni.requireNativePlugin('dom');
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
let marqueeTimer = null;
|
let marqueeTimer = null;
|
||||||
const currentMarqueeId = ref(0);
|
const currentMarqueeId = ref(0);
|
||||||
const lastMarqueeText = ref('');
|
const lastMarqueeText = ref('');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开始走马灯
|
* 开始走马灯
|
||||||
*/
|
*/
|
||||||
const startMarquee = () => {
|
const startMarquee = () => {
|
||||||
// 避免不必要的重置:如果文本没有变化且正在运行,则忽略
|
// 避免不必要的重置:如果文本没有变化且正在运行,则忽略
|
||||||
if (lastMarqueeText.value === noticeInfo.value.text && currentMarqueeId.value > 0) {
|
if (lastMarqueeText.value === noticeInfo.value.text && currentMarqueeId.value > 0) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -605,12 +605,12 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}, 1000); // 增加延时确保渲染
|
}, 1000); // 增加延时确保渲染
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 执行滚动动画循环
|
* 执行滚动动画循环
|
||||||
*/
|
*/
|
||||||
const runMarqueeAnimation = (containerWidth, textWidth, myId) => {
|
const runMarqueeAnimation = (containerWidth, textWidth, myId) => {
|
||||||
// ID 校验:如果当前ID不匹配,说明已被新动画取代,停止递归
|
// ID 校验:如果当前ID不匹配,说明已被新动画取代,停止递归
|
||||||
if (myId !== currentMarqueeId.value) return;
|
if (myId !== currentMarqueeId.value) return;
|
||||||
if (!noticeInner.value) return;
|
if (!noticeInner.value) return;
|
||||||
|
|
@ -647,12 +647,12 @@
|
||||||
runMarqueeAnimation(containerWidth, textWidth, myId);
|
runMarqueeAnimation(containerWidth, textWidth, myId);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 停止走马灯
|
* 停止走马灯
|
||||||
*/
|
*/
|
||||||
const stopMarquee = () => {
|
const stopMarquee = () => {
|
||||||
// 清除定时器
|
// 清除定时器
|
||||||
if (marqueeTimer) {
|
if (marqueeTimer) {
|
||||||
clearTimeout(marqueeTimer);
|
clearTimeout(marqueeTimer);
|
||||||
|
|
@ -660,42 +660,42 @@
|
||||||
}
|
}
|
||||||
// 增加ID使其失效
|
// 增加ID使其失效
|
||||||
currentMarqueeId.value++;
|
currentMarqueeId.value++;
|
||||||
}
|
}
|
||||||
|
|
||||||
onHide(() => {
|
onHide(() => {
|
||||||
stopMarquee();
|
stopMarquee();
|
||||||
})
|
})
|
||||||
|
|
||||||
onUnload(() => {
|
onUnload(() => {
|
||||||
stopMarquee();
|
stopMarquee();
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.container {
|
.container {
|
||||||
background-color: #F0F4F9;
|
background-color: #F0F4F9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.margin-l-6 {
|
.margin-l-6 {
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.index-bg-img {
|
.index-bg-img {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-bar-box {
|
.nav-bar-box {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-box {
|
.content-box {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0rpx;
|
top: 0rpx;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
@ -705,29 +705,29 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
::v-deep .uni-scroll-view-content {
|
::v-deep .uni-scroll-view-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-box {
|
.status-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-box {
|
.nav-box {
|
||||||
height: 44px;
|
height: 44px;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-box {
|
.left-box {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
@ -736,9 +736,9 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
|
@ -749,33 +749,33 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-box {
|
.right-box {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-box {
|
.user-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 24rpx 32rpx 0;
|
margin: 24rpx 32rpx 0;
|
||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-bg {
|
.user-bg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-info-box {
|
.user-info-box {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
@ -787,49 +787,49 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-info {
|
.user-info {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
width: 72rpx;
|
width: 72rpx;
|
||||||
height: 72rpx;
|
height: 72rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name-box {
|
.name-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.phone-text {
|
.phone-text {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-right: 12rpx;
|
margin-right: 12rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vip-logo {
|
.vip-logo {
|
||||||
width: 60rpx;
|
width: 60rpx;
|
||||||
height: 20rpx;
|
height: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vip-end-time {
|
.vip-end-time {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
margin-top: 8rpx;
|
margin-top: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.open-vip-btn {
|
.open-vip-btn {
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
width: 116rpx;
|
width: 116rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice-box {
|
.notice-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -839,9 +839,9 @@
|
||||||
padding: 0 16rpx;
|
padding: 0 16rpx;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sound-box {
|
.sound-box {
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
width: 50rpx;
|
width: 50rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -849,35 +849,35 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice-content-wrapper {
|
.notice-content-wrapper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice-inner {
|
.notice-inner {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice-content {
|
.notice-content {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #767676;
|
color: #767676;
|
||||||
}
|
}
|
||||||
|
|
||||||
.group-box {
|
.group-box {
|
||||||
margin: 16px;
|
margin: 16px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-img {
|
.title-img {
|
||||||
width: 140rpx;
|
width: 140rpx;
|
||||||
height: 44rpx;
|
height: 44rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-help-box {
|
.video-help-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -888,47 +888,47 @@
|
||||||
margin-top: 16rpx;
|
margin-top: 16rpx;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
padding-top: 8rpx;
|
padding-top: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-help-item {
|
.video-help-item {
|
||||||
margin-top: 16rpx;
|
margin-top: 16rpx;
|
||||||
width: 25%;
|
width: 25%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-help-img {
|
.video-help-img {
|
||||||
width: 96rpx;
|
width: 96rpx;
|
||||||
height: 96rpx;
|
height: 96rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-help-title {
|
.video-help-title {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #1A1A1A;
|
color: #1A1A1A;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-box {
|
.menu-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-top: 16rpx;
|
margin-top: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-box {
|
.item-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 156rpx;
|
height: 156rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
margin-bottom: 32rpx;
|
margin-bottom: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-item {
|
.menu-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
@ -938,47 +938,47 @@
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
padding: 16rpx 32rpx;
|
padding: 16rpx 32rpx;
|
||||||
height: 140rpx;
|
height: 140rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.menu-item-name {
|
.menu-item-name {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name-img {
|
.name-img {
|
||||||
height: 28rpx;
|
height: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-icon {
|
.hot-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 68rpx;
|
width: 68rpx;
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-box {
|
.activity-box {
|
||||||
margin: 0 32rpx;
|
margin: 0 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-box {
|
.footer-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: 40rpx;
|
margin-top: 40rpx;
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vision-text {
|
.vision-text {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #767676;
|
color: #767676;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ios-padding-bottom {
|
.ios-padding-bottom {
|
||||||
margin-bottom: 50rpx;
|
margin-bottom: 50rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
<nav-bar title="京东" bgColor="#F0F4F9">
|
<nav-bar title="京东" bgColor="#F0F4F9">
|
||||||
<template v-slot:center>
|
<template v-slot:center>
|
||||||
<view class="search-box">
|
<view class="search-box">
|
||||||
<input type="text" placeholder="" />
|
<image class="search-icon" src="/static/image/shopping/jingdong/search-icon.png" mode="aspectFit">
|
||||||
|
</image>
|
||||||
|
<input class="input" type="text" placeholder="搜索我的订单" disabled />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</nav-bar>
|
</nav-bar>
|
||||||
|
|
@ -15,14 +17,31 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
::v-deep .uni-navbar__header-btns {
|
::v-deep .uni-navbar__header-btns {
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60rpx;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
|
padding: 12rpx 16rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border: 1rpx solid #E5E5E5;
|
||||||
|
|
||||||
|
.search-icon {
|
||||||
|
width: 36rpx;
|
||||||
|
height: 36rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-right: 14rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::v-deep .input-placeholder {
|
||||||
|
font-size: 26rpx;
|
||||||
|
line-height: 26rpx;
|
||||||
|
color: #CCCCCC;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Loading…
Reference in New Issue