14 Commits

10 changed files with 124 additions and 29 deletions

12
App.vue
View File

@@ -28,7 +28,7 @@
// #endif // #endif
}, },
onShow(){ onShow(){
this.getVersion();
}, },
onHide(){ onHide(){
@@ -45,6 +45,16 @@
} }
}) })
}, },
getVersion() {
this.$u.post("Specialci/checkVersion",{ app_version: this.$app_version }).then(res => {
// console.log(res);
if(res.data.app_version != this.$app_version) {
this.$u.route('/pageE/setting/updateVersion', {
status: res.data.is_focus_upgrade
});
}
})
},
} }
} }
</script> </script>

View File

@@ -49,4 +49,12 @@ unescapeHTML(temp){}
* @return { object } promise 对象 resolve 返回文件服务器地址 reject 返回错误信息 * @return { object } promise 对象 resolve 返回文件服务器地址 reject 返回错误信息
*/ */
uploadFile({ url, name, filePath }) {} uploadFile({ url, name, filePath }) {}
/**
* 广告位跳转
* @param { String } type 跳转类型 1 商品 2 店铺 3 领取优惠券
* @param { String | Number } id 跳转id 商品id/商家id...
* @return { undefined } undefined
*/
jumpPage({ type, id }) ()
``` ```

View File

@@ -50,8 +50,8 @@
data() { data() {
return { return {
remaining: 7, remaining: 7,
type: true, type: false,
banner: false, banner: true,
protocol: false, protocol: false,
heightOut: '', heightOut: '',
imgurl: [], imgurl: [],
@@ -116,18 +116,18 @@
}, },
// 3秒倒计时 // 3秒倒计时
remaining_time() { remaining_time() {
this.timer = setInterval(() => { // this.timer = setInterval(() => {
this.remaining--; // this.remaining--;
if (this.remaining <= 0) { // if (this.remaining <= 0) {
clearInterval(this.timer); // clearInterval(this.timer);
console.log("完了") // console.log("完了")
this.type = !this.type; // // this.type = !this.type;
this.banner = !this.banner; // // this.banner = !this.banner;
} // }
}, 1000); // }, 1000);
}, },
leap_over() { leap_over() {
this.type = !this.type // this.type = !this.type
this.banner = !this.banner; this.banner = !this.banner;
clearInterval(this.timer) clearInterval(this.timer)
// 获取屏幕高度 // 获取屏幕高度

View File

@@ -5,6 +5,10 @@ import uView from "uview-ui";
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(uView); Vue.use(uView);
App.mpType = 'app' App.mpType = 'app'
// 当前 app 版本号
Vue.prototype.$app_version = '1.0.0';
Vue.prototype.imService = new IMService(); Vue.prototype.imService = new IMService();
Vue.prototype.a = 1; Vue.prototype.a = 1;
import store from '@/common/store/index.js' import store from '@/common/store/index.js'

View File

@@ -0,0 +1,44 @@
<template>
<view style="width:750rpx" :style="{'height':height}">
<image @click="calose()" style="width:30rpx;height:30rpx;position: fixed;top:80rpx;right:30rpx;" src="/static/image/clons.png"></image>
<video :src="url" class="video" :style="{'padding-top':top,'height': width}" :autoplay="true"></video>
</view>
</template>
<style>
.video{
width: 750rpx;
}
</style>
<script>
export default {
name:"video",
data(){
return {
url:"",
top:0,
height:0,
width:0
}
},
onLoad(a){
const res = uni.getSystemInfoSync();
let height = res.windowHeight
let width = res.windowWidth
this.width = width + ( (height - width) / 2) + 'px'
console.log(this.width)
this.top = (height - width) / 2+ 'px'
console.log(this.top)
this.height = height + 'px';
console.log(a)
this.url = a.url
},
methods:{
calose(){
uni.navigateBack({
delta: 1
});
}
}
}
</script>

View File

@@ -1,7 +1,7 @@
<template> <template>
<u-modal v-model="show" :show-cancel-button="true" confirm-text="升级" title="发现新版本" @cancel="cancel" @confirm="confirm"> <u-modal v-model="show" :show-cancel-button="is_focus_upgrade" confirm-text="升级" title="发现新版本" @cancel="cancel" @confirm="confirm">
<view class="u-update-content"> <view class="u-update-content">
<rich-text :nodes="content"></rich-text> <!-- <rich-text :nodes="content"></rich-text> -->
</view> </view>
</u-modal> </u-modal>
</template> </template>
@@ -10,6 +10,7 @@
export default { export default {
data() { data() {
return { return {
is_focus_upgrade: Boolean, // 是否强制更新
show: true, show: true,
// 传递给uni-app"rich-text"组件的内容,可以使用"<br>"进行换行 // 传递给uni-app"rich-text"组件的内容,可以使用"<br>"进行换行
content: ` content: `
@@ -19,6 +20,9 @@
`, `,
} }
}, },
onLoad(option) {
this.is_focus_upgrade = option.status == 1 ? false : true;
},
onReady() { onReady() {
this.show = true; this.show = true;
}, },
@@ -27,7 +31,18 @@
this.closeModal(); this.closeModal();
}, },
confirm() { confirm() {
// #ifdef APP-PLUS
if (plus.os.name == "Android") {
const appurl = "market://details?id=com.tencent.mobileqq"; //这个是通用应用市场如果想指定某个应用商店需要单独查这个应用商店的包名或scheme及参数
plus.runtime.openURL(appurl);
} else if(plus.os.name == "ios") {
const appurl = "itms-apps://itunes.apple.com/cn/app/id1144816653?mt=8";
plus.runtime.openURL(appurl);
}
// endif
// ifdef H5
this.closeModal(); this.closeModal();
// #endif
}, },
closeModal() { closeModal() {
uni.navigateBack(); uni.navigateBack();
@@ -36,11 +51,11 @@
} }
</script> </script>
<style scoped lang="scss"> <style lang="scss">
page { page {
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
} }
/deep/ .u-mode-center-box { .u-mode-center-box {
background-color: transparent; background-color: transparent;
} }
// .u-full-content { // .u-full-content {

View File

@@ -3,7 +3,7 @@
<view class="header"> <view class="header">
<image src="../../pageD/images/file.png" class="tit-img" mode=""></image> <image src="../../pageD/images/file.png" class="tit-img" mode=""></image>
<view class="title">德铭阳光</view> <view class="title">德铭阳光</view>
<view class="tit-info">版本:{{ version }} for {{ phone_type }}</view> <view class="tit-info">版本: {{ $app_version }} for {{ phone_type }}</view>
</view> </view>
<view class="main"> <view class="main">
<view @click="viewAboutUs"> <view @click="viewAboutUs">
@@ -12,8 +12,8 @@
</view> </view>
<view class="version-view"> <view class="version-view">
<text class="title">版本更新</text> <text class="title">版本更新</text>
<text class="tips" v-if="1">已是最新版本</text> <text class="tips" v-if="version" @click="updateVersion">发现新版本: {{ version }}</text>
<text class="tips" v-else @click="updateVersion">发现新版本</text> <text class="tips" v-else>已是最新版本</text>
</view> </view>
</view> </view>
</view> </view>
@@ -22,8 +22,9 @@
export default { export default {
data() { data() {
return { return {
version: "", version: '',
phone_type: "", phone_type: "",
status: '',
} }
}, },
onLoad() { onLoad() {
@@ -33,9 +34,12 @@ export default {
methods: { methods: {
// 检查版本号 // 检查版本号
getVersion() { getVersion() {
this.$u.post("Specialci/checkVersion",{ app_version: 1 }).then(res => { this.$u.post("Specialci/checkVersion",{ app_version: this.$app_version }).then(res => {
// console.log(res); // console.log(res);
if(res.data.app_version != this.$app_version) {
this.version = res.data.app_version; this.version = res.data.app_version;
this.status = res.data.is_focus_upgrade; // 0 不强制 1 强制
}
}) })
}, },
viewAboutUs() { viewAboutUs() {
@@ -44,7 +48,9 @@ export default {
}); });
}, },
updateVersion() { updateVersion() {
this.$u.route('/pageE/setting/updateVersion'); this.$u.route('/pageE/setting/updateVersion', {
status: this.status
});
} }
} }
}; };

View File

@@ -56,6 +56,7 @@
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "custom", "navigationStyle": "custom",
"backgroundColorBottom":"#000000",
"app-plus": { "app-plus": {
"titleNView": false "titleNView": false
} }
@@ -79,6 +80,13 @@
{ {
"root": "pageB", "root": "pageB",
"pages": [ "pages": [
{
"path": "playVideo/index",
"style": {
"navigationStyle":"custom",
"backgroundColor":"#000000"
}
},
{ {
"path": "follow/index", "path": "follow/index",
"style": { "style": {
@@ -1011,10 +1019,10 @@
"style": { "style": {
"navigationStyle": "custom", // 取消本页面的导航栏 "navigationStyle": "custom", // 取消本页面的导航栏
"app-plus": { "app-plus": {
"animationType": "fade-in", // 设置fade-in淡入动画为最合理的动画类型 "animationType": "fade-in",
"background": "transparent", // 背景透明 "background": "transparent",
"backgroundColor": "rgba(0,0,0,0)", // 背景透明 "backgroundColor": "rgba(0,0,0,0)",
"popGesture": "none" // 关闭IOS屏幕左边滑动关闭当前页面的功能 "popGesture": "none"
} }
} }
}, },

View File

@@ -179,8 +179,8 @@ export default {
}) })
} else { } else {
this.getOrderNumber(); this.getOrderNumber();
}
this.getUserInfo(); this.getUserInfo();
}
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
// console.log(e); // console.log(e);

BIN
static/image/clons.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB