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

13
App.vue
View File

@ -28,6 +28,9 @@
// #endif // #endif
}, },
onShow(){ onShow(){
// this.getVersion();
},
onLoad() {
}, },
onHide(){ 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> </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

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

View File

@ -2,8 +2,8 @@
<view class="c-coupon" v-if="goodsClass.length" @click="use"> <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="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' }"> <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> <div class="wrap_left_top" v-if="couponInfo.type == 1">{{ couponInfo.vouchertemplate_id == 1 ? '新人专享' : '平台优惠券' }}</div>
{{ couponInfo.type == 2 ? '店铺优惠券' : '平台优惠券' }} <div class="wrap_left_top" v-else-if="couponInfo.type == 2">店铺优惠券</div>
</view> </view>
<view class="coupon-info"> <view class="coupon-info">
<view class="info-usable"> <view class="info-usable">

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

@ -2,7 +2,7 @@
"name" : "德铭阳光", "name" : "德铭阳光",
"appid" : "__UNI__EBFF00A", "appid" : "__UNI__EBFF00A",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.1",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 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> </view>
<text class="child_content">{{ child.content }}</text> <text class="child_content">{{ child.content }}</text>
</view> </view>
<view> <!-- <view> -->
<text class="more-comment" @click="getReplyList(item.id)" v-if="item.reply_count"> <text class="more-comment" @click="getReplyList(item.id)" v-if="item.reply_count">
{{ child_end[item.id] ? "暂无更多回复" : "展开更多回复" }} {{ child_end[item.id] ? "暂无更多回复" : "展开更多回复" }}
</text> </text>
<text></text> <!-- </view> -->
</view>
</view> </view>
</view> </view>
<view class="send-box" @click="openKeyInput"> <view class="send-box" @click="openKeyInput">
@ -678,14 +677,17 @@
} }
.child_content { .child_content {
padding: 4rpx 0; width: 550rpx;
padding-top: 6rpx;
margin-left: 40rpx; margin-left: 40rpx;
font-size: 26rpx; font-size: 26rpx;
} }
.more-comment { .more-comment {
margin: 10rpx 0; width: 150rpx;
height: 40rpx;
font-size: 22rpx; font-size: 22rpx;
line-height: 4;
color: #999; color: #999;
} }

View File

@ -15,6 +15,7 @@
</view> </view>
</view> </view>
</block> </block>
<u-loadmore :status="loadStatus" bg-color="#ECECEC" margin-top="20" v-if="loadStatus=='nomore'" />
</view> </view>
</template> </template>
@ -23,9 +24,8 @@
data() { data() {
return { return {
height:'600', height:'600',
actives: [ actives: [],
loadStatus: 'loadmore'
]
}; };
}, },
onLoad(){ onLoad(){
@ -46,6 +46,8 @@
this.$u.api.messageactivityList({}).then((res)=>{ this.$u.api.messageactivityList({}).then((res)=>{
if (res.errCode == 0) { 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> </view>
</view> </view>
<u-loadmore :status="loadStatus" bg-color="#ECECEC" margin-top="20" @loadmore="loadmore" />
</view> </view>
</template> </template>
@ -26,21 +27,46 @@
data() { data() {
return { return {
actives: [], actives: [],
page: 1 page: 1,
timer: true,
loadStatus: 'loadmore'
}; };
}, },
onLoad() { onLoad() {
this.getCartList(); this.getCartList();
}, },
onReachBottom() {
this.loadmore();
},
methods: { methods: {
getCartList() { loadmore() {
this.$u.post("message/orderDeliveryList",{page: this.page}).then(res => { if(!this.timer) return false;
console.log(res.data.data) this.loadStatus = "loading";
if (res.errCode == 0) { this.page++;
this.actives = res.data.data; 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) { viewLogistics(item) {
let url; let url;
if(item.takeawayer_phone) { if(item.takeawayer_phone) {

View File

@ -2,6 +2,7 @@
<view id="viewes" :style="{height : height + 'px'}"> <view id="viewes" :style="{height : height + 'px'}">
<!-- 公告咨询 --> <!-- 公告咨询 -->
<notice :list="list"></notice> <notice :list="list"></notice>
<u-loadmore :status="loadStatus" bg-color="#ECECEC" margin-top="20" v-if="loadStatus=='nomore'" />
</view> </view>
</template> </template>
@ -11,6 +12,7 @@
data() { data() {
return { return {
list: [], list: [],
loadStatus: 'loadmore'
}; };
}, },
onLoad() { onLoad() {
@ -29,6 +31,8 @@
this.$u.api.informationList({}).then((res) => { this.$u.api.informationList({}).then((res) => {
if (res.errCode == 0) { if (res.errCode == 0) {
this.list = res.data; this.list = res.data;
// ,
if(!this.list.length) this.loadStatus = 'nomore';
} }
}) })
} }

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: `
@ -17,8 +18,12 @@
2. 新增Modal模态框组件<br> 2. 新增Modal模态框组件<br>
3. 新增压窗屏组件可以在APP上以弹窗的形式遮盖导航栏和底部tabbar<br> 3. 新增压窗屏组件可以在APP上以弹窗的形式遮盖导航栏和底部tabbar<br>
`, `,
isAutoUpdate: false,
} }
}, },
onLoad(option) {
this.is_focus_upgrade = option.status == 1 ? false : true;
},
onReady() { onReady() {
this.show = true; this.show = true;
}, },
@ -27,20 +32,37 @@
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() {
const pages = getCurrentPages();
// console.log(pages);
if(pages.length == 2) {
this.$u.route('/pageA/welcome/welcome');
} else {
uni.navigateBack(); uni.navigateBack();
} }
} }
} }
}
</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