新增引导图调整购买转跳

This commit is contained in:
唐明明
2021-11-01 18:48:47 +08:00
parent ff8870b9bb
commit 4acbd258b2
13 changed files with 3373 additions and 3082 deletions

35
App.vue
View File

@@ -24,20 +24,33 @@
//#ifdef APP-PLUS
// 获取系统版本号
console.log(plus.runtime.versionCode)
console.log(plus.runtime.uniVersion)
getVersions({
version:
platform: plus.os.name,
version: plus.runtime.versionCode
}).then(res => {
console.log(res)
if(res.update){
uni.showModal({
title: "更新提示",
content: res.note || '版本更新信息',
success: (res) => {
if (res.confirm) {
if (plus.os.name=="Android") {
plus.runtime.openURL(res.data.url);
} else{
uni.showToast({
title: 'IOS应用暂未上架请打开测试工具点击更新'
})
}
}
}
})
}
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
// 请求一个接口
// 是否需要更新
// 弹出更新提示
// 下载文件安装
//#endif
},
onShow() {

21
apis/interfaces/guide.js Normal file
View File

@@ -0,0 +1,21 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
* moduleName: 启动页
*/
import { request } from '../index'
// 欢迎图
const guide = data => {
return request({
url: 'cms/banners',
data
})
}
export {
guide
}

View File

@@ -9,10 +9,11 @@
import { request } from '../index'
// 微信配置信息
// 版本检测
const getVersions = data => {
return request({
url: 'app/version',
method: 'POST',
data
})
}

View File

@@ -1,5 +1,12 @@
{
"pages": [{
"path" : "pages/guide/guide",
"style" : {
"navigationStyle": "custom",
"navigationBarTextStyle": "white",
"disableScroll": true
}
},{
"path": "pages/index/index",
"name": "Index",
"style": {
@@ -591,7 +598,7 @@
},
"name": "clearOpen"
}
],
],
"globalStyle": {
"backgroundColor": "#F5F5F5",
"navigationBarBackgroundColor":"#FFFFFF",
@@ -616,8 +623,8 @@
"pagePath": "pages/found/index"
},{
"text": "通证商城",
"iconPath": "static/tabBar/tabBar_icon_01.png",
"selectedIconPath": "static/tabBar/tabBar_show_01.png",
"iconPath": "static/tabBar/tabBar_icon_03.png",
"selectedIconPath": "static/tabBar/tabBar_show_03.png",
"pagePath": "pages/equity/index"
}, {
"text": "节点中心",

View File

@@ -202,8 +202,6 @@
}
}
apiUrl(data).then(res => {
console.log(res)
debugger;
// 微信支付
if (this.selectTypeId === '2') {
if (typeof res === 'string') {
@@ -249,7 +247,7 @@
})
setTimeout(() => {
this.canPay = true
uni.reLaunch({
uni.navigateTo({
url: '/pages/goods/payStatus?success=true'
})
}, 3000);
@@ -299,7 +297,7 @@
})
setTimeout(() => {
this.canPay = true
uni.reLaunch({
uni.navigateTo({
url: '/pages/goods/payStatus?success=true'
})
}, 3000);

62
pages/guide/guide.vue Normal file
View File

@@ -0,0 +1,62 @@
<template>
<view>
<swiper class="swiper-guide" :indicator-dots="true" indicator-color="rgba(255,255,255,.3)" indicator-active-color="#FFF" @change="swiperChange">
<swiper-item v-for="(item, index) in urls" :key="index">
<view class="swiper-item">
<image :src="item.cover" mode="aspectFill"></image>
</view>
</swiper-item>
</swiper>
<button class="guide-btn" v-if="current === (urls.length - 1)" type="default" @click="$Router.replaceAll({name: 'Index'})">立即开启</button>
</view>
</template>
<script>
import { guide } from '@/apis/interfaces/guide'
export default {
data() {
return {
urls : [],
current : 0
};
},
created() {
guide().then(res=> {
this.urls = res
})
},
methods:{
swiperChange(e){
this.current = e.detail.current
}
}
}
</script>
<style lang="scss" scoped>
.swiper-guide{
width: 100vw;
height: 100vh;
background: #1f1922;
.swiper-item{
image{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
}
.guide-btn{
position: fixed;
bottom: 10vh;
left: 10vw;
right: 10vw;
height: 90rpx;
line-height: 90rpx;
background-color: #774ffd;
color: white;
border: none;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long