Merge branch 'main' of https://git.yuzhankeji.cn/TmOct5/BlockChainH5
This commit is contained in:
34
App.vue
34
App.vue
@@ -1,4 +1,5 @@
|
||||
<script>
|
||||
import { getVersions } from './apis/interfaces/versions'
|
||||
export default {
|
||||
onLaunch() {
|
||||
//#ifdef H5
|
||||
@@ -23,12 +24,33 @@
|
||||
|
||||
//#ifdef APP-PLUS
|
||||
// 获取系统版本号
|
||||
console.log(plus.runtime.versionCode)
|
||||
console.log(plus.runtime.uniVersion)
|
||||
// 请求一个接口
|
||||
// 是否需要更新
|
||||
// 弹出更新提示
|
||||
// 下载文件安装
|
||||
getVersions({
|
||||
platform: plus.os.name,
|
||||
version: plus.runtime.versionCode
|
||||
}).then(res => {
|
||||
if(res.update){
|
||||
uni.showModal({
|
||||
title: "更新提示",
|
||||
content: res.note || '版本更新信息',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
if (plus.os.name=="Android") {
|
||||
plus.runtime.openURL("https://www.lianshang.vip/app");
|
||||
} else{
|
||||
uni.showToast({
|
||||
title: 'IOS应用暂未上架,请打开测试工具点击更新'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
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
|
||||
}
|
||||
23
apis/interfaces/versions.js
Normal file
23
apis/interfaces/versions.js
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
/**
|
||||
* Web唐明明
|
||||
* 匆匆数载恍如梦,岁月迢迢华发增。
|
||||
* 碌碌无为枉半生,一朝惊醒万事空。
|
||||
* moduleName: 版本信息
|
||||
*/
|
||||
|
||||
|
||||
import { request } from '../index'
|
||||
|
||||
// 版本检测
|
||||
const getVersions = data => {
|
||||
return request({
|
||||
url: 'app/version',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
getVersions
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "链商星球",
|
||||
"appid" : "__UNI__1F65101",
|
||||
"description" : "安徽星煌,链商星球商家工具",
|
||||
"versionName" : "1.0.7",
|
||||
"versionCode" : 107,
|
||||
"versionName" : "1.0.8",
|
||||
"versionCode" : 108,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
||||
13
pages.json
13
pages.json
@@ -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": "节点中心",
|
||||
|
||||
@@ -202,8 +202,6 @@
|
||||
}
|
||||
}
|
||||
apiUrl(data).then(res => {
|
||||
console.log(res)
|
||||
debugger;
|
||||
// 微信支付
|
||||
if (this.selectTypeId === '2') {
|
||||
if (typeof res === 'string') {
|
||||
@@ -233,7 +231,7 @@
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
uni.navigateTo({
|
||||
url: '/pages/goods/payStatus?success=false'
|
||||
})
|
||||
this.canPay = true
|
||||
@@ -283,7 +281,7 @@
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
uni.navigateTo({
|
||||
url: '/pages/goods/payStatus?success=false'
|
||||
})
|
||||
this.canPay = true
|
||||
@@ -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
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