新增引导图调整购买转跳
This commit is contained in:
35
App.vue
35
App.vue
@@ -24,20 +24,33 @@
|
|||||||
|
|
||||||
//#ifdef APP-PLUS
|
//#ifdef APP-PLUS
|
||||||
// 获取系统版本号
|
// 获取系统版本号
|
||||||
console.log(plus.runtime.versionCode)
|
|
||||||
console.log(plus.runtime.uniVersion)
|
|
||||||
|
|
||||||
|
|
||||||
getVersions({
|
getVersions({
|
||||||
version:
|
platform: plus.os.name,
|
||||||
|
version: plus.runtime.versionCode
|
||||||
}).then(res => {
|
}).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
|
//#endif
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|||||||
21
apis/interfaces/guide.js
Normal file
21
apis/interfaces/guide.js
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* Web唐明明
|
||||||
|
* 匆匆数载恍如梦,岁月迢迢华发增。
|
||||||
|
* 碌碌无为枉半生,一朝惊醒万事空。
|
||||||
|
* moduleName: 启动页
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { request } from '../index'
|
||||||
|
|
||||||
|
// 欢迎图
|
||||||
|
const guide = data => {
|
||||||
|
return request({
|
||||||
|
url: 'cms/banners',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
guide
|
||||||
|
}
|
||||||
@@ -9,10 +9,11 @@
|
|||||||
|
|
||||||
import { request } from '../index'
|
import { request } from '../index'
|
||||||
|
|
||||||
// 微信配置信息
|
// 版本检测
|
||||||
const getVersions = data => {
|
const getVersions = data => {
|
||||||
return request({
|
return request({
|
||||||
url: 'app/version',
|
url: 'app/version',
|
||||||
|
method: 'POST',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
13
pages.json
13
pages.json
@@ -1,5 +1,12 @@
|
|||||||
{
|
{
|
||||||
"pages": [{
|
"pages": [{
|
||||||
|
"path" : "pages/guide/guide",
|
||||||
|
"style" : {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"navigationBarTextStyle": "white",
|
||||||
|
"disableScroll": true
|
||||||
|
}
|
||||||
|
},{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"name": "Index",
|
"name": "Index",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -591,7 +598,7 @@
|
|||||||
},
|
},
|
||||||
"name": "clearOpen"
|
"name": "clearOpen"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"backgroundColor": "#F5F5F5",
|
"backgroundColor": "#F5F5F5",
|
||||||
"navigationBarBackgroundColor":"#FFFFFF",
|
"navigationBarBackgroundColor":"#FFFFFF",
|
||||||
@@ -616,8 +623,8 @@
|
|||||||
"pagePath": "pages/found/index"
|
"pagePath": "pages/found/index"
|
||||||
},{
|
},{
|
||||||
"text": "通证商城",
|
"text": "通证商城",
|
||||||
"iconPath": "static/tabBar/tabBar_icon_01.png",
|
"iconPath": "static/tabBar/tabBar_icon_03.png",
|
||||||
"selectedIconPath": "static/tabBar/tabBar_show_01.png",
|
"selectedIconPath": "static/tabBar/tabBar_show_03.png",
|
||||||
"pagePath": "pages/equity/index"
|
"pagePath": "pages/equity/index"
|
||||||
}, {
|
}, {
|
||||||
"text": "节点中心",
|
"text": "节点中心",
|
||||||
|
|||||||
@@ -202,8 +202,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
apiUrl(data).then(res => {
|
apiUrl(data).then(res => {
|
||||||
console.log(res)
|
|
||||||
debugger;
|
|
||||||
// 微信支付
|
// 微信支付
|
||||||
if (this.selectTypeId === '2') {
|
if (this.selectTypeId === '2') {
|
||||||
if (typeof res === 'string') {
|
if (typeof res === 'string') {
|
||||||
@@ -249,7 +247,7 @@
|
|||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.canPay = true
|
this.canPay = true
|
||||||
uni.reLaunch({
|
uni.navigateTo({
|
||||||
url: '/pages/goods/payStatus?success=true'
|
url: '/pages/goods/payStatus?success=true'
|
||||||
})
|
})
|
||||||
}, 3000);
|
}, 3000);
|
||||||
@@ -299,7 +297,7 @@
|
|||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.canPay = true
|
this.canPay = true
|
||||||
uni.reLaunch({
|
uni.navigateTo({
|
||||||
url: '/pages/goods/payStatus?success=true'
|
url: '/pages/goods/payStatus?success=true'
|
||||||
})
|
})
|
||||||
}, 3000);
|
}, 3000);
|
||||||
|
|||||||
62
pages/guide/guide.vue
Normal file
62
pages/guide/guide.vue
Normal 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>
|
||||||
BIN
static/tabBar/tabBar_icon_03.png
Normal file
BIN
static/tabBar/tabBar_icon_03.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
static/tabBar/tabBar_show_03.png
Normal file
BIN
static/tabBar/tabBar_show_03.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
6
unpackage/dist/build/app-plus/app-service.js
vendored
6
unpackage/dist/build/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/build/app-plus/app-view.js
vendored
2
unpackage/dist/build/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/build/app-plus/manifest.json
vendored
2
unpackage/dist/build/app-plus/manifest.json
vendored
File diff suppressed because one or more lines are too long
6303
unpackage/dist/dev/app-plus/app-service.js
vendored
6303
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/dev/app-plus/manifest.json
vendored
2
unpackage/dist/dev/app-plus/manifest.json
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user