From 0c5e5798ea3128f58246fe6a186ab998ca4d2880 Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Wed, 22 Jan 2025 13:56:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=B8=83=E5=B1=80=EF=BC=8C=E5=92=8Ch5=E7=BA=A2?= =?UTF-8?q?=E5=8C=85=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commons/config.js | 2 +- pages/index/components/contentlist.vue | 14 +++++++------ pages/index/index.vue | 27 +++++++++++++++----------- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/commons/config.js b/commons/config.js index bf78f27..e11ef6d 100644 --- a/commons/config.js +++ b/commons/config.js @@ -1,6 +1,6 @@ //打包时修改env的值即可 -const env='production' //test , production,local +const env='test' //test , production,local export const encryptKey='1234567890123456' // http数据加解密的key diff --git a/pages/index/components/contentlist.vue b/pages/index/components/contentlist.vue index 4110286..3e25673 100644 --- a/pages/index/components/contentlist.vue +++ b/pages/index/components/contentlist.vue @@ -26,7 +26,7 @@ function seVideo(item) { uni.navigateTo({ - url:"/pages/video/detail?courseId="+item.courseId+"&courseDetailsId="+item.courseDetailsId + url: "/pages/video/detail?courseId=" + item.courseId + "&courseDetailsId=" + item.courseDetailsId }) } @@ -35,7 +35,7 @@ .contentlist { display: flex; align-items: center; - justify-content: space-around; + justify-content: space-between; flex-wrap: wrap; margin-top: 10rpx; padding: 0 26rpx; @@ -44,17 +44,19 @@ border-radius: 21rpx 21rpx 21rpx 21rpx; width: 30%; margin-top: 20rpx; + text-align: center; >view { font-weight: 400; font-size: 25rpx; text-align: left; + margin-left: 10rpx; } } - .liststyle:last-child { - margin-right: auto; - margin-left: 6rpx; - } + // .liststyle:last-child { + // margin-right: auto; + // margin-left: 6rpx; + // } } \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index d810bdb..32a485b 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -45,8 +45,8 @@ + :showCancelButton="datas.version.cancelText!=''" @cancel="cancelUpdateVersion" @confirm='confirmUpdateVersion' + :title="datas.version.title" :title-style="{ fontWeight: '700' }" confirm-color="rgb(255, 117, 129)"> @@ -97,6 +97,9 @@ // console.log('cash:' + uni.getStorageSync('userInfo').userId + "" + new Date().getTime(), 'debug') // 判断ios是否审核 $common.init() + // #ifdef H5 + datas.isExamine = $common.isIosExamine + // #endif // let sysInfo = uni.getSystemInfoSync() // let isIos = sysInfo.platform == 'ios' // if (isIos) { @@ -126,7 +129,7 @@ cancelText: "", downloadLink: "" }, - setindexdata :false + setindexdata: false }) onLoad(() => { versionUpdate() @@ -158,23 +161,23 @@ //获取当前系统版本信息 plus.runtime.getProperty(plus.runtime.appid, widgetInfo => { //请求后台接口 解析数据 对比版本 - selectNewApp().then( async res => { + selectNewApp().then(async res => { res = res[0]; - console.log(uni.getSystemInfoSync().platform == 'ios',1101) + console.log(uni.getSystemInfoSync().platform == 'ios', 1101) let version; if (uni.getSystemInfoSync().platform == 'android') { version = res.version } if (uni.getSystemInfoSync().platform == 'ios') { version = res.iosVersion - } + } let isVersion = await $common.setversion(widgetInfo.version, version) - datas.isExamine = $common.isIosExamine - console.log(isVersion,'') - if ( isVersion == 1 ) { + datas.isExamine = $common.isIosExamine + console.log(isVersion, '') + if (isVersion == 1) { datas.version.downloadLink = res.androidWgtUrl; datas.version.show = true; - datas.version.title = "发现新版本"; + datas.version.title = "发现新版本"; datas.version.content = res.des; uni.hideTabBar() if (res.method == "true") { @@ -189,10 +192,12 @@ }); //#endif } - function cancelUpdateVersion () { + + function cancelUpdateVersion() { uni.showTabBar() datas.version.show = false } + function confirmUpdateVersion() { // plus.runtime.openURL(config.baseUrl + '/pages/login/appEq') linkTo('/pages/login/download')