diff --git a/App.vue b/App.vue index 469409e..aa4518b 100644 --- a/App.vue +++ b/App.vue @@ -28,7 +28,10 @@ // #endif }, onShow(){ - + // this.getVersion(); + }, + onLoad() { + }, onHide(){ @@ -45,6 +48,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 + }); + } + }) + }, } } diff --git a/README.md b/README.md index 762c8f6..d0ab8f7 100644 --- a/README.md +++ b/README.md @@ -49,4 +49,12 @@ unescapeHTML(temp){} * @return { object } promise 对象 resolve 返回文件服务器地址 reject 返回错误信息 */ uploadFile({ url, name, filePath }) {} + +/** +* 广告位跳转 +* @param { String } type 跳转类型 1 商品 2 店铺 3 领取优惠券 +* @param { String | Number } id 跳转id 商品id/商家id... +* @return { undefined } undefined +*/ +jumpPage({ type, id }) () ``` \ No newline at end of file diff --git a/components/mine/coupon/index.vue b/components/mine/coupon/index.vue index f9648e3..0020c37 100644 --- a/components/mine/coupon/index.vue +++ b/components/mine/coupon/index.vue @@ -2,8 +2,8 @@ -
- {{ couponInfo.type == 2 ? '店铺优惠券' : '平台优惠券' }} +
{{ couponInfo.vouchertemplate_id == 1 ? '新人专享' : '平台优惠券' }}
+
店铺优惠券
diff --git a/components/mine/coupon/mine.vue b/components/mine/coupon/mine.vue index 6e19b0c..fe67df5 100644 --- a/components/mine/coupon/mine.vue +++ b/components/mine/coupon/mine.vue @@ -2,8 +2,8 @@ -
- {{ couponInfo.type == 2 ? '店铺优惠券' : '平台优惠券' }} +
{{ couponInfo.vouchertemplate_id == 1 ? '新人专享' : '平台优惠券' }}
+
店铺优惠券
diff --git a/components/remaining/remaining.vue b/components/remaining/remaining.vue index 1519ea0..5c7cdf5 100644 --- a/components/remaining/remaining.vue +++ b/components/remaining/remaining.vue @@ -50,8 +50,8 @@ data() { return { remaining: 7, - type: true, - banner: false, + type: false, + banner: true, protocol: false, heightOut: '', imgurl: [], @@ -116,18 +116,18 @@ }, // 3秒倒计时 remaining_time() { - this.timer = setInterval(() => { - this.remaining--; - if (this.remaining <= 0) { - clearInterval(this.timer); - console.log("完了") - this.type = !this.type; - this.banner = !this.banner; - } - }, 1000); + // this.timer = setInterval(() => { + // this.remaining--; + // if (this.remaining <= 0) { + // clearInterval(this.timer); + // console.log("完了") + // // this.type = !this.type; + // // this.banner = !this.banner; + // } + // }, 1000); }, leap_over() { - this.type = !this.type + // this.type = !this.type this.banner = !this.banner; clearInterval(this.timer) // 获取屏幕高度 diff --git a/main.js b/main.js index 66cc346..c5b63f8 100644 --- a/main.js +++ b/main.js @@ -5,6 +5,10 @@ import uView from "uview-ui"; Vue.config.productionTip = false Vue.use(uView); App.mpType = 'app' + +// 当前 app 版本号 +Vue.prototype.$app_version = '1.0.0'; + Vue.prototype.imService = new IMService(); Vue.prototype.a = 1; import store from '@/common/store/index.js' diff --git a/manifest.json b/manifest.json index e8e0d07..1d1f0a0 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name" : "德铭阳光", "appid" : "__UNI__EBFF00A", "description" : "", - "versionName" : "1.0.0", + "versionName" : "1.0.1", "versionCode" : "100", "transformPx" : false, /* 5+App特有相关 */ diff --git a/pageB/playVideo/index.nvue b/pageB/playVideo/index.nvue new file mode 100644 index 0000000..c848c29 --- /dev/null +++ b/pageB/playVideo/index.nvue @@ -0,0 +1,44 @@ + + + \ No newline at end of file diff --git a/pageB/video/video.nvue b/pageB/video/video.nvue index e11d412..f2b4a88 100644 --- a/pageB/video/video.nvue +++ b/pageB/video/video.nvue @@ -71,12 +71,11 @@ {{ child.content }} - + {{ child_end[item.id] ? "暂无更多回复" : "展开更多回复" }} - - +
@@ -678,14 +677,17 @@ } .child_content { - padding: 4rpx 0; + width: 550rpx; + padding-top: 6rpx; margin-left: 40rpx; font-size: 26rpx; } .more-comment { - margin: 10rpx 0; + width: 150rpx; + height: 40rpx; font-size: 22rpx; + line-height: 4; color: #999; } diff --git a/pageD/activity/activity.vue b/pageD/activity/activity.vue index 0ad1ed7..65645d3 100644 --- a/pageD/activity/activity.vue +++ b/pageD/activity/activity.vue @@ -15,6 +15,7 @@
+
@@ -23,9 +24,8 @@ data() { return { height:'600', - actives: [ - - ] + actives: [], + loadStatus: 'loadmore' }; }, onLoad(){ @@ -45,7 +45,9 @@ messageactivityList(){ this.$u.api.messageactivityList({}).then((res)=>{ if (res.errCode == 0) { - this.actives = res.data; + this.actives = res.data; + // 目前没有分页,只无数据提示用,他们建议这样做 + if(!this.actives.length) this.loadStatus = 'nomore'; } }) } diff --git a/pageD/logistics/logistics.vue b/pageD/logistics/logistics.vue index 7eabb61..3ce9c8e 100644 --- a/pageD/logistics/logistics.vue +++ b/pageD/logistics/logistics.vue @@ -18,6 +18,7 @@
+ @@ -26,20 +27,45 @@ data() { return { actives: [], - page: 1 + page: 1, + timer: true, + loadStatus: 'loadmore' }; }, onLoad() { this.getCartList(); - }, + }, + onReachBottom() { + this.loadmore(); + }, methods: { - getCartList() { - this.$u.post("message/orderDeliveryList",{page: this.page}).then(res => { - console.log(res.data.data) - if (res.errCode == 0) { - this.actives = res.data.data; - } - }) + loadmore() { + if(!this.timer) return false; + this.loadStatus = "loading"; + this.page++; + this.getCartList({ load: 'loadmore' }).then(length => { + if(length == 0) { + this.page--; + this.loadStatus = 'nomore'; + } else { + this.loadStatus = 'loading'; + } + }).catch(() => { + this.loadStatus = "nomore"; + this.page--; + }) + }, + async getCartList({ load = 'reload' } = {}) { + const res = await this.$u.post("message/orderDeliveryList",{ page: this.page }) + this.timer = true; + if (res.errCode == 0) { + if(load == 'reload') { + this.actives = res.data.data; + if(res.data.data.length < 12) this.loadStatus = "nomore"; + } + else if(load == 'loadmore') this.actives.push(...res.data.data); + } + return res.data.data.length; }, viewLogistics(item) { let url; diff --git a/pageD/notice/notice.vue b/pageD/notice/notice.vue index c8ab6a7..2e3162e 100644 --- a/pageD/notice/notice.vue +++ b/pageD/notice/notice.vue @@ -2,6 +2,7 @@ + @@ -11,6 +12,7 @@ data() { return { list: [], + loadStatus: 'loadmore' }; }, onLoad() { @@ -29,6 +31,8 @@ this.$u.api.informationList({}).then((res) => { if (res.errCode == 0) { this.list = res.data; + // 目前没有分页,只无数据提示用 + if(!this.list.length) this.loadStatus = 'nomore'; } }) } diff --git a/pageE/setting/updateVersion.vue b/pageE/setting/updateVersion.vue index 569bf89..8f03321 100644 --- a/pageE/setting/updateVersion.vue +++ b/pageE/setting/updateVersion.vue @@ -1,7 +1,7 @@ @@ -10,6 +10,7 @@ export default { data() { return { + is_focus_upgrade: Boolean, // 是否强制更新 show: true, // 传递给uni-app"rich-text"组件的内容,可以使用"
"进行换行 content: ` @@ -17,8 +18,12 @@ 2. 新增Modal模态框组件
3. 新增压窗屏组件,可以在APP上以弹窗的形式遮盖导航栏和底部tabbar
`, + isAutoUpdate: false, } }, + onLoad(option) { + this.is_focus_upgrade = option.status == 1 ? false : true; + }, onReady() { this.show = true; }, @@ -27,20 +32,37 @@ this.closeModal(); }, 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(); + // #endif }, closeModal() { - uni.navigateBack(); + const pages = getCurrentPages(); + // console.log(pages); + if(pages.length == 2) { + this.$u.route('/pageA/welcome/welcome'); + } else { + uni.navigateBack(); + } } } } -