Merge branch 'master' of http://git.luyuan.tk/luyuan/deming into xbx

This commit is contained in:
luyuan 2020-08-25 14:37:35 +08:00
commit f4de9fe13b
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
17 changed files with 192 additions and 53 deletions

15
App.vue
View File

@ -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
});
}
})
},
}
}
</script>

View File

@ -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 }) ()
```

View File

@ -2,8 +2,8 @@
<view class="c-coupon">
<view class="coupon-usable">
<view class="info-type" :style="{ backgroundImage: 'url(' + '/static/image/mine/30.png' + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }">
<div class="wrap_left_top"></div>
{{ couponInfo.type == 2 ? '店铺优惠券' : '平台优惠券' }}
<div class="wrap_left_top" v-if="couponInfo.type == 1">{{ couponInfo.vouchertemplate_id == 1 ? '新人专享' : '平台优惠券' }}</div>
<div class="wrap_left_top" v-else-if="couponInfo.type == 2">店铺优惠券</div>
</view>
<view class="coupon-info">
<view class="info-usable">

View File

@ -2,8 +2,8 @@
<view class="c-coupon" v-if="goodsClass.length" @click="use">
<view :class="couponInfo.voucher_state != 1 ? 'coupon-unable' : 'coupon-usable'" :style="{'width': type ? '650rpx' : '' }">
<view class="info-type" :style="{ backgroundImage: 'url(' + (couponInfo.voucher_state == 1 ? '/static/image/mine/30.png' : '/static/image/mine/31.png') + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }">
<div class="wrap_left_top"></div>
{{ couponInfo.type == 2 ? '店铺优惠券' : '平台优惠券' }}
<div class="wrap_left_top" v-if="couponInfo.type == 1">{{ couponInfo.vouchertemplate_id == 1 ? '新人专享' : '平台优惠券' }}</div>
<div class="wrap_left_top" v-else-if="couponInfo.type == 2">店铺优惠券</div>
</view>
<view class="coupon-info">
<view class="info-usable">

View File

@ -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)
//

View File

@ -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'

View File

@ -2,7 +2,7 @@
"name" : "德铭阳光",
"appid" : "__UNI__EBFF00A",
"description" : "",
"versionName" : "1.0.0",
"versionName" : "1.0.1",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */

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

@ -71,12 +71,11 @@
</view>
<text class="child_content">{{ child.content }}</text>
</view>
<view>
<!-- <view> -->
<text class="more-comment" @click="getReplyList(item.id)" v-if="item.reply_count">
{{ child_end[item.id] ? "暂无更多回复" : "展开更多回复" }}
</text>
<text></text>
</view>
<!-- </view> -->
</view>
</view>
<view class="send-box" @click="openKeyInput">
@ -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;
}

View File

@ -15,6 +15,7 @@
</view>
</view>
</block>
<u-loadmore :status="loadStatus" bg-color="#ECECEC" margin-top="20" v-if="loadStatus=='nomore'" />
</view>
</template>
@ -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';
}
})
}

View File

@ -18,6 +18,7 @@
</view>
</view>
</view>
<u-loadmore :status="loadStatus" bg-color="#ECECEC" margin-top="20" @loadmore="loadmore" />
</view>
</template>
@ -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;

View File

@ -2,6 +2,7 @@
<view id="viewes" :style="{height : height + 'px'}">
<!-- 公告咨询 -->
<notice :list="list"></notice>
<u-loadmore :status="loadStatus" bg-color="#ECECEC" margin-top="20" v-if="loadStatus=='nomore'" />
</view>
</template>
@ -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';
}
})
}

View File

@ -1,7 +1,7 @@
<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">
<rich-text :nodes="content"></rich-text>
<!-- <rich-text :nodes="content"></rich-text> -->
</view>
</u-modal>
</template>
@ -10,6 +10,7 @@
export default {
data() {
return {
is_focus_upgrade: Boolean, //
show: true,
// uni-app"rich-text"使"<br>"
content: `
@ -17,8 +18,12 @@
2. 新增Modal模态框组件<br>
3. 新增压窗屏组件可以在APP上以弹窗的形式遮盖导航栏和底部tabbar<br>
`,
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();
}
}
}
}
</script>
<style scoped lang="scss">
<style lang="scss">
page {
background-color: rgba(0, 0, 0, 0);
}
/deep/ .u-mode-center-box {
.u-mode-center-box {
background-color: transparent;
}
// .u-full-content {

View File

@ -3,7 +3,7 @@
<view class="header">
<image src="../../pageD/images/file.png" class="tit-img" mode=""></image>
<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 class="main">
<view @click="viewAboutUs">
@ -12,8 +12,8 @@
</view>
<view class="version-view">
<text class="title">版本更新</text>
<text class="tips" v-if="1">已是最新版本</text>
<text class="tips" v-else @click="updateVersion">发现新版本</text>
<text class="tips" v-if="version" @click="updateVersion">发现新版本: {{ version }}</text>
<text class="tips" v-else>已是最新版本</text>
</view>
</view>
</view>
@ -22,8 +22,9 @@
export default {
data() {
return {
version: "",
version: '',
phone_type: "",
status: '',
}
},
onLoad() {
@ -33,9 +34,12 @@ export default {
methods: {
//
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);
this.version = res.data.app_version;
if(res.data.app_version != this.$app_version) {
this.version = res.data.app_version;
this.status = res.data.is_focus_upgrade; // 0 1
}
})
},
viewAboutUs() {
@ -44,7 +48,9 @@ export default {
});
},
updateVersion() {
this.$u.route('/pageE/setting/updateVersion');
this.$u.route('/pageE/setting/updateVersion', {
status: this.status,
});
}
}
};

View File

@ -56,6 +56,7 @@
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"backgroundColorBottom":"#000000",
"app-plus": {
"titleNView": false
}
@ -79,6 +80,13 @@
{
"root": "pageB",
"pages": [
{
"path": "playVideo/index",
"style": {
"navigationStyle":"custom",
"backgroundColor":"#000000"
}
},
{
"path": "follow/index",
"style": {
@ -1011,10 +1019,10 @@
"style": {
"navigationStyle": "custom", //
"app-plus": {
"animationType": "fade-in", // fade-in
"background": "transparent", //
"backgroundColor": "rgba(0,0,0,0)", //
"popGesture": "none" // IOS
"animationType": "fade-in",
"background": "transparent",
"backgroundColor": "rgba(0,0,0,0)",
"popGesture": "none"
}
}
},

View File

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

BIN
static/image/clons.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB