Commit 569da69b authored by lizhan's avatar lizhan

📝 【TASK-20240806-01】TASK:APP我的积分静态页面完成

首页nav栏入口增加,我的积分页面完成,增加图片,增加icon组件
parent 003f471f
...@@ -267,7 +267,13 @@ ...@@ -267,7 +267,13 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
} },
{
"path": "pages/integral/integral",
"style": {
"navigationStyle": "custom"
}
}
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
......
<template> <template>
<view class="main"> <view class="main">
<view class="hd-v">
<view class="hd-v"> <view class="start-bar"></view>
<view class="start-bar"></view> <view class="tabs">
<view class="tabs"> <view class="">{{ $lang.lang.index.index }}</view>
<view class="">{{$lang.lang.index.index}}</view> <view class="igs">
<view class="igs"> <view class="index_msg" @click="$request.goPage('../msg/msg')">
<view class="index_msg" @click="$request.goPage('../msg/msg')"> <image src="../../static/img/notice.png" mode=""></image>
<image src="../../static/img/notice.png" mode=""></image> <view v-if="msgHave" class="msg_dian"></view>
<view v-if="msgHave" class="msg_dian"></view> </view>
</view> <view class="" @click="goPage('../site/site')">
<view class="" @click="goPage('../site/site')"> <image src="../../static/img/site.png" mode=""></image>
<image src="../../static/img/site.png" mode=""></image> </view>
</view> </view>
</view> </view>
</view> <view class="banner">
<view class="banner"> <swiper class="swiper" circular indicator-dots autoplay interval="2000" duration="500">
<swiper class="swiper" circular indicator-dots autoplay interval="2000" duration="500"> <swiper-item v-for="(item, index) in banner" @click="toBanner(item.id)" :key="index">
<swiper-item v-for="(item, index) in banner" @click="toBanner(item.id)" :key="index"> <image :src="item.bannerUrlApp" mode=""></image>
<image :src="item.bannerUrlApp" mode=""></image> </swiper-item>
</swiper-item> </swiper>
</swiper> </view>
</view> </view>
</view> <view class="nvs">
<view class="nvs"> <!-- <view class="index_msg" v-for="(item, index) in nvs" @click="toPage(item.url)" :key="index">-->
<!-- <view class="index_msg" v-for="(item, index) in nvs" @click="toPage(item.url)" :key="index">--> <view
<view class="index_msg" v-for="(item, index) in nvs" @click="toPage(item.url,item.isHttp)" :key="index"> class="index_msg"
<image :src="item.icon" mode=""></image> v-for="(item, index) in nvs"
<view v-if="item.num>0" class="order_dian">{{item.num}}</view> @click="toPage(item.url, item.isHttp)"
<text>{{item.name}}</text> :key="index"
</view> >
</view> <image :src="item.icon" mode=""></image>
<!-- 搜索 --> <view v-if="item.num > 0" class="order_dian">{{ item.num }}</view>
<!-- <view class="order-tabs"> <text>{{ item.name }}</text>
</view>
</view>
<!-- 搜索 -->
<!-- <view class="order-tabs">
<view class="order-tabs-v2"> <view class="order-tabs-v2">
<view class="order-tabs-v2s"> <view class="order-tabs-v2s">
<image class="search" src="../../static/img/search.png" mode=""></image> <image class="search" src="../../static/img/search.png" mode=""></image>
...@@ -41,482 +45,537 @@ ...@@ -41,482 +45,537 @@
</view> </view>
</view> </view>
</view>--> </view>-->
<view class="mssgv"> <view class="mssgv">
<view class="mssgv-v" @click="$request.goPage('../notice/notice')"> <view class="mssgv-v" @click="$request.goPage('../notice/notice')">
<view class="mssgv-v-1"> <view class="mssgv-v-1">
<text>{{$lang.lang.index.system}}</text> <text>{{ $lang.lang.index.system }}</text>
<text>{{$lang.lang.index.notice}}</text> <text>{{ $lang.lang.index.notice }}</text>
</view> </view>
<view class="notice"> <view class="notice">
<swiper class="swiper-nav" <swiper
:circular="true" class="swiper-nav"
:vertical="true" :circular="true"
:autoplay="true" :vertical="true"
:interval="4000" :autoplay="true"
:duration="1000" :interval="4000"
style="height:70px" :duration="1000"
> style="height: 70px"
<swiper-item style="display: table;" @touchmove.stop='stopTouchMove' v-for="(item,index) in noticeData" :key="index"> >
<view class="mssgv-v-2"> <swiper-item
<view class="">{{$lang.locale=='zh'?item.titleZh:item.titleEn}}</view> style="display: table"
<view class=""> @touchmove.stop="stopTouchMove"
<image src="../../static/img/time.png" mode=""></image> v-for="(item, index) in noticeData"
<text>{{getDate(item.createTime)}}</text> :key="index"
</view> >
</view> <view class="mssgv-v-2">
<image class="rgt" src="../../static/img/rgt.png" mode="widthFix"></image> <view class="">{{ $lang.locale == 'zh' ? item.titleZh : item.titleEn }}</view>
</swiper-item> <view class="">
</swiper> <image src="../../static/img/time.png" mode=""></image>
</view> <text>{{ getDate(item.createTime) }}</text>
</view>
</view>
<image class="rgt" src="../../static/img/rgt.png" mode="widthFix"></image>
</swiper-item>
</swiper>
</view>
</view>
</view>
<view class="actions">
<view class="title">
<image src="../../static/img/dongtai.png" mode=""></image>
<text>{{ $lang.lang.index.dynamic }}</text>
</view>
<view class="act-list">
<view v-if="orderData.length == 0" class="noData">
<image src="../../static/img/empty.png" mode="widthFix"></image>
<text>{{ $lang.lang.notices.noData }}~</text>
</view>
<template v-else>
<view
class="item"
v-for="(item, index) in orderData"
:key="item.orderId"
@click="toOrderInfo(item.orderId)"
>
<view class="item-til">
<image src="../../static/img/sn.png" mode=""></image>
<text>{{ $lang.lang.index.orderNo }}:{{ item.orderNo }}</text>
<view class="">{{ $lang.lang.index.marks }}:{{ item.marks }}</view>
</view>
<view class="item-body">
<view class="item-body-v">{{ item.departureName }}</view>
<view class="item-body-v-2">
<view class="">{{ getStatusName(item.status) }}</view>
<image src="../../static/img/jiant1.png" mode="widthFix"></image>
</view>
<view class="item-body-v">{{ item.objectiveName }}</view>
</view>
<view class="item-times">
<image src="../../static/img/time.png" mode=""></image>
<text>{{ item.createTime }}</text>
</view>
</view>
</template>
</view>
</view>
<view class="bom">
<view class="" @click="$request.goPage('../help/help')">
<image src="../../static/img/help.png" mode=""></image>
<text>{{ $lang.lang.index.help }}</text>
</view>
<view class="" @click="$request.goPage('../consult/consult')">
<image src="../../static/img/zixun.png" mode=""></image>
<text>{{ $lang.lang.index.consult }}</text>
</view>
</view>
<uni-popup ref="adpopup" type="center" :mask-click="false">
<view class="ad-conten">
<image @click="closeAd" class="ad-bg" src="../../static/img/index_close.png"></image>
<view class="ad-title">{{ $lang.locale == 'zh' ? adData.titleZh : adData.titleEn }}</view>
<view class="ad-info">
<rich-text
:nodes="$lang.locale == 'zh' ? adData.htmlAppZh : adData.htmlAppEn"
></rich-text>
</view>
<view class="ad-btns">
<view class="ad-btn" @click="closeAd">
<view>{{ $lang.lang.index.know }}</view>
</view>
</view>
</view>
</uni-popup>
<uni-popup ref="choiceTransport" type="center" :mask-click="false">
<view class="ad-conten type-1">
<image @click="closeTransport" class="ad-bg1" src="../../static/img/colse1.png"></image>
</view> <view class="transport-title">
</view> <span>{{ $lang.lang.notices.transport }}</span>
<view class="actions"> </view>
<view class="title"> <image class="type-bg" src="../../static/img/type-1.png"></image>
<image src="../../static/img/dongtai.png" mode=""></image> <view class="transport-info">
<text>{{$lang.lang.index.dynamic}}</text> <view
</view> v-for="item in transType"
<view class="act-list"> @click="toCreatOrder(item.value)"
<view v-if="orderData.length==0" class="noData"> :class="'type' + item.value"
<image src="../../static/img/empty.png" mode="widthFix"></image> >{{ $lang.locale == 'zh' ? item.label : item.labelEn }}</view
<text>{{$lang.lang.notices.noData}}~</text> >
</view> </view>
<view v-else class="item" v-for="(item,index) in orderData" @click="toOrderInfo(item.orderId)"> </view>
<view class="item-til"> </uni-popup>
<image src="../../static/img/sn.png" mode=""></image> <uni-popup ref="vepopup" type="center" :mask-click="false">
<text>{{$lang.lang.index.orderNo}}:{{item.orderNo}}</text> <view class="ad-conten">
<view class="">{{$lang.lang.index.marks}}:{{item.marks}}</view> <image
</view> v-if="!forceUpdate"
<view class="item-body"> @click="closeVe"
<view class="item-body-v">{{item.departureName}}</view> class="ad-bg"
<view class="item-body-v-2"> src="../../static/img/index_close.png"
<view class="">{{getStatusName(item.status)}}</view> ></image>
<image src="../../static/img/jiant1.png" mode="widthFix"></image> <view class="ad-title">V{{ appVersion }}{{ $lang.lang.notices.newVersion }}</view>
</view> <view class="ad-info">
<view class="item-body-v">{{item.objectiveName}}</view> <rich-text :nodes="veData"></rich-text>
</view> </view>
<view class="item-times"> <view class="ad-btns">
<image src="../../static/img/time.png" mode=""></image> <view class="ad-btn" @click="toupdate">
<text>{{item.createTime}}</text> <view>{{ $lang.lang.notices.update }}</view>
</view> </view>
</view> <view v-if="!forceUpdate" class="ad-btn" @click="closeVe">
</view> <view>{{ $lang.lang.notices.close }}</view>
</view> </view>
<view class="bom"> </view>
<view class="" @click="$request.goPage('../help/help')"> <view class="progress" v-if="showdownLine">
<image src="../../static/img/help.png" mode=""></image> <progress :percent="downloadNum" show-info stroke-width="3" />
<text>{{$lang.lang.index.help}}</text> </view>
</view> </view>
<view class="" @click="$request.goPage('../consult/consult')"> </uni-popup>
<image src="../../static/img/zixun.png" mode=""></image> </view>
<text>{{$lang.lang.index.consult}}</text>
</view>
</view>
<uni-popup ref="adpopup" type="center" :mask-click="false">
<view class="ad-conten">
<image @click="closeAd" class="ad-bg" src='../../static/img/index_close.png'></image>
<view class="ad-title">{{$lang.locale=='zh'?adData.titleZh:adData.titleEn}}</view>
<view class="ad-info">
<rich-text :nodes="$lang.locale=='zh'?adData.htmlAppZh:adData.htmlAppEn"></rich-text>
</view>
<view class="ad-btns">
<view class="ad-btn" @click="closeAd">
<view>{{$lang.lang.index.know}}</view>
</view>
</view>
</view>
</uni-popup>
<uni-popup ref="choiceTransport" type="center" :mask-click="false">
<view class="ad-conten type-1">
<image @click="closeTransport" class="ad-bg1" src="../../static/img/colse1.png"></image>
<view class="transport-title">
<span>{{$lang.lang.notices.transport}}</span>
</view>
<image class="type-bg" src="../../static/img/type-1.png"></image>
<view class="transport-info">
<view v-for="item in transType" @click="toCreatOrder(item.value)" :class="'type'+item.value">{{$lang.locale=='zh'?item.label:item.labelEn}}</view>
</view>
</view>
</uni-popup>
<uni-popup ref="vepopup" type="center" :mask-click="false">
<view class="ad-conten">
<image v-if="!forceUpdate" @click="closeVe" class="ad-bg" src='../../static/img/index_close.png'></image>
<view class="ad-title">V{{appVersion}}{{$lang.lang.notices.newVersion}}</view>
<view class="ad-info">
<rich-text :nodes="veData"></rich-text>
</view>
<view class="ad-btns">
<view class="ad-btn" @click="toupdate">
<view>{{$lang.lang.notices.update}}</view>
</view>
<view v-if="!forceUpdate" class="ad-btn" @click="closeVe">
<view>{{$lang.lang.notices.close}}</view>
</view>
</view>
<view class="progress" v-if="showdownLine">
<progress :percent="downloadNum" show-info stroke-width="3" />
</view>
</view>
</uni-popup>
</view>
</template> </template>
<script> <script>
import md5 from 'js-md5'; import md5 from 'js-md5'
export default { export default {
data() { data() {
return { return {
nvs: [ nvs: [
{name: this.$lang.lang.index.delivery, icon: '../../static/img/express.png', url: '../create_order/create_order',num:0}, {
{name: this.$lang.lang.index.order, icon: '../../static/img/order.png', url: '../order/order',num:0}, name: this.$lang.lang.index.delivery,
// {name: this.$lang.lang.index.consolidation, icon: '../../static/img/order.png', url: '../consolidation/consolidation',num:0}, icon: '../../static/img/express.png',
// {name: this.$lang.lang.index.coupon, icon: '../../static/img/copue.png', url: '../coupon/coupon',num:0}, url: '../create_order/create_order',
{name: this.$lang.lang.index.old_system, icon: '../../static/img/copue.png', url: '',num:0,isHttp:true}, num: 0
// {name: this.$lang.lang.index.price, icon: '../../static/img/wallet.png', url: '../price_inquiry/price_inquiry',num:0}, },
], {
banner: [], name: this.$lang.lang.index.order,
orderData: [], icon: '../../static/img/order.png',
page: 1, url: '../order/order',
isIdcard:false, num: 0
statusData:[], },
name:{}, // {name: this.$lang.lang.index.consolidation, icon: '../../static/img/order.png', url: '../consolidation/consolidation',num:0},
adData:{}, // {name: this.$lang.lang.index.coupon, icon: '../../static/img/copue.png', url: '../coupon/coupon',num:0},
noticeData:[], {
msgHave:false, name: this.$lang.lang.index.old_system,
version:'1.0.2', icon: '../../static/img/copue.png',
appUrl:'', url: '',
veData:'', num: 0,
versionCode:0, isHttp: true
appVersion:'', },
forceUpdate:0, {
showdownLine:false, name: this.$lang.lang.index.integral,
downloadNum:0,//下载百分比 icon: '../../static/img/copue.png',
totalSize:0,//下载总量 url: '/pages/integral/integral',
transType:[], num: 0
preLoginPage:false, }
searchKey:'' //搜索关键词 // {name: this.$lang.lang.index.price, icon: '../../static/img/wallet.png', url: '../price_inquiry/price_inquiry',num:0},
} ],
}, banner: [],
onLoad(options) { orderData: [],
this.getIdcard() page: 1,
this.getStatusData() isIdcard: false,
this.orderConfig() statusData: [],
this.getNoticeData() name: {},
this.getVersion() adData: {},
this.getAdData() noticeData: [],
}, msgHave: false,
onShow() { version: '1.0.2',
appUrl: '',
this.getOrder() veData: '',
if(this.banner.length == 0){ versionCode: 0,
this.getBanner() appVersion: '',
} forceUpdate: 0,
if(this.orderData.length == 0){ showdownLine: false,
this.getOrderData() downloadNum: 0, //下载百分比
} totalSize: 0, //下载总量
}, transType: [],
methods: { preLoginPage: false,
toupdate(){ searchKey: '' //搜索关键词
let that = this }
if(that.showdownLine) return },
// #ifdef APP-PLUS onLoad(options) {
this.getIdcard()
let platform = uni.getSystemInfoSync().platform.toLocaleLowerCase() this.getStatusData()
if (platform == 'ios') { this.orderConfig()
plus.runtime.openURL('https://apps.apple.com/us/app/e-c-logistics/id6466407990') this.getNoticeData()
}else{ this.getVersion()
uni.showLoading({ this.getAdData()
title: this.$lang.lang.notices.startDown, },
}) onShow() {
that.showdownLine = true this.getOrder()
var dtask = plus.downloader.createDownload( if (this.banner.length == 0) {
that.appUrl, this.getBanner()
{ }
}, (d, status) => { if (this.orderData.length == 0) {
uni.hideLoading() this.getOrderData()
if (status == 200) { }
that.closeVe() },
that.showdownLine = false methods: {
console.log("下载成功安装: " + d.filename); toupdate() {
plus.runtime.install(d.filename) let that = this
} else { if (that.showdownLine) return
that.showdownLine = false // #ifdef APP-PLUS
that.closeVe()
plus.nativeUI.alert(that.$lang.lang.notices.failDown)
}
});
// uni.navigateTo({
// url:'../updateView/updateView?url='+this.appUrl
// })
// 下载进度
dtask.addEventListener("statechanged", function (download, status) {
if(that.downloadNum==100){
uni.hideLoading();
}
switch (download.state) {
case 2:
break;
case 3://进度条百分比 totalSize为总量,baifen为当前下载的百分比
if(that.totalSize==0){
that.totalSize=parseInt(download.totalSize);
}
if(parseInt(download.downloadedSize/that.totalSize*100)!=that.downloadNum){
that.downloadNum=parseInt(download.downloadedSize/that.totalSize*100);
}
break;
case 4:
// mui.toast("下载完成");
uni.hideLoading();
break;
}
});
dtask.start();
}
// #endif
},
getVersion(){
this.version = uni.getStorageSync('appversion');
this.versionCode = uni.getStorageSync('versionCode');
this.getVeData()
},
old() {
const code = md5(md5('jiedaoguoji' + this.userInfo.mobile))
const url = 'http://backend.groupage.cn/#/pages/login/free_login?phone=' + this.userInfo.mobile + '&code=' + code + '&area_code=+' + this.userInfo.areaCode
// #ifdef APP-PLUS
plus.runtime.openURL(url)
// #endif
// #ifdef H5
window.open(url) let platform = uni.getSystemInfoSync().platform.toLocaleLowerCase()
// #endif if (platform == 'ios') {
}, plus.runtime.openURL('https://apps.apple.com/us/app/e-c-logistics/id6466407990')
getUserInfo(){ } else {
let that = this uni.showLoading({
that.$request.get('/app-api/member/user/get').then(res => { title: this.$lang.lang.notices.startDown
console.log(res.data) })
if(res.code==0&&res.data){ that.showdownLine = true
var dtask = plus.downloader.createDownload(that.appUrl, {}, (d, status) => {
uni.hideLoading()
if (status == 200) {
that.closeVe()
that.showdownLine = false
console.log('下载成功安装: ' + d.filename)
plus.runtime.install(d.filename)
} else {
that.showdownLine = false
that.closeVe()
plus.nativeUI.alert(that.$lang.lang.notices.failDown)
}
})
if(res.data.isSimplePassword){ // uni.navigateTo({
uni.showModal({ // url:'../updateView/updateView?url='+this.appUrl
title: that.$lang.lang.notices.notice, // })
confirmText:that.$lang.lang.site.editPsd, // 下载进度
cancelText:that.$lang.lang.index.know, dtask.addEventListener('statechanged', function (download, status) {
content: that.$lang.lang.notices.easyPass, if (that.downloadNum == 100) {
success: function (res) { uni.hideLoading()
if (res.confirm) { }
uni.navigateTo({ switch (download.state) {
url:"../editPsd/editPsd" case 2:
}) break
}else if(!that.preLoginPage){ case 3: //进度条百分比 totalSize为总量,baifen为当前下载的百分比
that.openAd() if (that.totalSize == 0) {
// #ifdef APP-PLUS that.totalSize = parseInt(download.totalSize)
if(that.appVersion){ }
that.openVe() if (parseInt((download.downloadedSize / that.totalSize) * 100) != that.downloadNum) {
} that.downloadNum = parseInt((download.downloadedSize / that.totalSize) * 100)
// #endif }
} break
} case 4:
}); // mui.toast("下载完成");
}else if(!that.preLoginPage){ uni.hideLoading()
that.openAd() break
// #ifdef APP-PLUS }
if(that.appVersion){ })
that.openVe() dtask.start()
} }
// #endif // #endif
} },
that.userInfo = res.data getVersion() {
} this.version = uni.getStorageSync('appversion')
}) this.versionCode = uni.getStorageSync('versionCode')
}, this.getVeData()
getOrder(){ },
this.$request.get('/app-api/member/user/angle-mark').then(res=>{ old() {
if(res.code==0&&res.data){ const code = md5(md5('jiedaoguoji' + this.userInfo.mobile))
this.nvs[1].num = res.data.allOrderNum const url =
this.nvs[2].num = res.data.couponNum 'http://backend.groupage.cn/#/pages/login/free_login?phone=' +
if(res.data.unreadMessageNum&&res.data.unreadMessageNum>0){ this.userInfo.mobile +
this.msgHave = true '&code=' +
}else{ code +
this.msgHave = false '&area_code=+' +
} this.userInfo.areaCode
} // #ifdef APP-PLUS
}) plus.runtime.openURL(url)
}, // #endif
getStatusName(status){ // #ifdef H5
var statusName = ''
let that = this
if(that.statusData.length>0){
var name = that.statusData.filter(item=>item.value == status)||[]
if(name.length>0) {
if(that.$lang.locale=='zh'){
statusName = name[0].label
}else{
statusName = name[0].labelEn
}
}
}
return statusName
},
openAd(){
console.log(this.adData)
if(JSON.stringify(this.adData) != "{}"){
this.$refs.adpopup.open()
}
},
closeAd(){
this.preLoginPage = false
this.$refs.adpopup.close()
},
closeTransport(){
this.$refs.choiceTransport.close()
},
openTransport(){
this.$refs.choiceTransport.open()
},
openVe(){
this.$refs.vepopup.open()
},
closeVe(){
this.$refs.vepopup.close()
// this.getUserInfo()
},
getBanner () {
this.$request.get('/app-api/ecw/banner/page', {page: 1, rows: 20,status:0}).then(res => {
if(res.code==0&&res.data&&res.data.list&&res.data.list.length>0){
this.banner = res.data.list
}
})
},
getOrderData () {
this.$request.get('/app-api/my/order/dynamic/page', { page: this.page, rows: 6}).then(res => {
if(res.code==0&&res.data&&res.data.list&&res.data.list.length>0){
this.orderData = res.data.list
}
})
},
getNoticeData(){
this.$request.get('/app-api/system/notice/page', { page: 1, rows: 6}).then(res => {
if(res.code==0&&res.data&&res.data.list&&res.data.list.length>0){
this.noticeData = res.data.list
}
})
},
getDate(time) {
const date = new Date(time);
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
month = month > 9 ? month : '0' + month; window.open(url)
day = day > 9 ? day : '0' + day; // #endif
return `${year}-${month}-${day}`; },
}, getUserInfo() {
getAdData(){ let that = this
this.$request.get('/app-api/ecw/banner-pop/page', { page: 1, rows: 6}).then(res => { that.$request.get('/app-api/member/user/get').then((res) => {
if(res.code==0&&res.data&&res.data.list&&res.data.list.length>0){ console.log(res.data)
this.adData = res.data.list[0] if (res.code == 0 && res.data) {
let pages = getCurrentPages() // 获取栈实例 if (res.data.isSimplePassword) {
if(pages.length>1){ uni.showModal({
let prevPage = pages[pages.length - 2] title: that.$lang.lang.notices.notice,
if(prevPage&&prevPage.route=='pages/login/login'){ confirmText: that.$lang.lang.site.editPsd,
this.preLoginPage = true cancelText: that.$lang.lang.index.know,
} content: that.$lang.lang.notices.easyPass,
} success: function (res) {
} if (res.confirm) {
//#ifdef APP-PLUS uni.navigateTo({
this.getUserInfo() url: '../editPsd/editPsd'
//#endif })
//#ifdef H5 } else if (!that.preLoginPage) {
this.getUserInfo() that.openAd()
//#endif // #ifdef APP-PLUS
}) if (that.appVersion) {
that.openVe()
}
// #endif
}
}
})
} else if (!that.preLoginPage) {
that.openAd()
// #ifdef APP-PLUS
if (that.appVersion) {
that.openVe()
}
// #endif
}
that.userInfo = res.data
}
})
},
getOrder() {
this.$request.get('/app-api/member/user/angle-mark').then((res) => {
if (res.code == 0 && res.data) {
this.nvs[1].num = res.data.allOrderNum
this.nvs[2].num = res.data.couponNum
if (res.data.unreadMessageNum && res.data.unreadMessageNum > 0) {
this.msgHave = true
} else {
this.msgHave = false
}
}
})
},
getStatusName(status) {
var statusName = ''
let that = this
if (that.statusData.length > 0) {
var name = that.statusData.filter((item) => item.value == status) || []
if (name.length > 0) {
if (that.$lang.locale == 'zh') {
statusName = name[0].label
} else {
statusName = name[0].labelEn
}
}
}
return statusName
},
openAd() {
console.log(this.adData)
if (JSON.stringify(this.adData) != '{}') {
this.$refs.adpopup.open()
}
},
closeAd() {
this.preLoginPage = false
this.$refs.adpopup.close()
},
closeTransport() {
this.$refs.choiceTransport.close()
},
openTransport() {
this.$refs.choiceTransport.open()
},
openVe() {
this.$refs.vepopup.open()
},
closeVe() {
this.$refs.vepopup.close()
// this.getUserInfo()
},
getBanner() {
this.$request
.get('/app-api/ecw/banner/page', { page: 1, rows: 20, status: 0 })
.then((res) => {
if (res.code == 0 && res.data && res.data.list && res.data.list.length > 0) {
this.banner = res.data.list
}
})
},
getOrderData() {
this.$request
.get('/app-api/my/order/dynamic/page', { page: this.page, rows: 6 })
.then((res) => {
if (res.code == 0 && res.data && res.data.list && res.data.list.length > 0) {
this.orderData = res.data.list
}
})
},
getNoticeData() {
this.$request.get('/app-api/system/notice/page', { page: 1, rows: 6 }).then((res) => {
if (res.code == 0 && res.data && res.data.list && res.data.list.length > 0) {
this.noticeData = res.data.list
}
})
},
getDate(time) {
const date = new Date(time)
let year = date.getFullYear()
let month = date.getMonth() + 1
let day = date.getDate()
}, month = month > 9 ? month : '0' + month
getVeData(){ day = day > 9 ? day : '0' + day
let that = this return `${year}-${month}-${day}`
var addType = uni.getSystemInfoSync().platform=='ios'?'userIos':'userAndroid' },
that.$request.get('/app-api/system/version/latestVersion', { appType: addType,versionCode:that.versionCode}).then(res => { getAdData() {
console.log(res) this.$request.get('/app-api/ecw/banner-pop/page', { page: 1, rows: 6 }).then((res) => {
if(res.code==0&&res.data){ if (res.code == 0 && res.data && res.data.list && res.data.list.length > 0) {
that.veData = res.data.desp this.adData = res.data.list[0]
that.appUrl = res.data.appUrl let pages = getCurrentPages() // 获取栈实例
that.appVersion = res.data.appVersion if (pages.length > 1) {
that.forceUpdate = res.data.forceUpdate let prevPage = pages[pages.length - 2]
// that.openVe() if (prevPage && prevPage.route == 'pages/login/login') {
}else{ this.preLoginPage = true
// that.getUserInfo() }
} }
}) }
}, //#ifdef APP-PLUS
getStatusData(){ this.getUserInfo()
this.$request.getConfig('order_status').then(res => { //#endif
if(res.code==0&&res.data&&res.data.list&&res.data.list.length>0){ //#ifdef H5
this.statusData = res.data.list this.getUserInfo()
} //#endif
}) })
}, },
getIdcard () { getVeData() {
this.$request.get('/app-api/member/user/get-auth-idcard-info').then(res => { let that = this
if(res.code==0&&res.data&&res.data.status==2){ var addType = uni.getSystemInfoSync().platform == 'ios' ? 'userIos' : 'userAndroid'
this.isIdcard = true that.$request
} .get('/app-api/system/version/latestVersion', {
}) appType: addType,
}, versionCode: that.versionCode
toPage(url,isHttp){ })
if(isHttp){ .then((res) => {
// window.location.href=url; console.log(res)
this.old() if (res.code == 0 && res.data) {
}else{ that.veData = res.data.desp
if(url=='../create_order/create_order'){ that.appUrl = res.data.appUrl
this.openTransport() that.appVersion = res.data.appVersion
}else{ that.forceUpdate = res.data.forceUpdate
uni.navigateTo({ // that.openVe()
url:url } else {
}) // that.getUserInfo()
} }
} })
}, },
toCreatOrder(id){ getStatusData() {
this.closeTransport() this.$request.getConfig('order_status').then((res) => {
uni.navigateTo({ if (res.code == 0 && res.data && res.data.list && res.data.list.length > 0) {
url:'../create_order/create_order?transportId='+id this.statusData = res.data.list
}) }
}, })
toBanner(id){ },
uni.navigateTo({ getIdcard() {
url:'../banner_info/banner_info?id='+id this.$request.get('/app-api/member/user/get-auth-idcard-info').then((res) => {
}) if (res.code == 0 && res.data && res.data.status == 2) {
}, this.isIdcard = true
toOrderInfo(id){ }
uni.navigateTo({ })
url:'../orderInfo/orderInfo?id='+id },
}) toPage(url, isHttp) {
}, if (isHttp) {
orderConfig () { // window.location.href=url;
let that = this this.old()
that.$request.getConfig('transport_type').then(res => { } else {
if(res.code==0&&res.data&&res.data.list.length > 0){ if (url == '../create_order/create_order') {
that.transType = res.data.list this.openTransport()
} } else {
}) uni.navigateTo({
}, url: url
goPage(url){ })
uni.redirectTo({ }
url:url, }
}) },
}, toCreatOrder(id) {
toMyOrder(){ this.closeTransport()
uni.navigateTo({ uni.navigateTo({
url:'../order/order?key='+this.searchKey url: '../create_order/create_order?transportId=' + id
}) })
} },
} toBanner(id) {
uni.navigateTo({
url: '../banner_info/banner_info?id=' + id
})
},
toOrderInfo(id) {
uni.navigateTo({
url: '../orderInfo/orderInfo?id=' + id
})
},
orderConfig() {
let that = this
that.$request.getConfig('transport_type').then((res) => {
if (res.code == 0 && res.data && res.data.list.length > 0) {
that.transType = res.data.list
}
})
},
goPage(url) {
uni.redirectTo({
url: url
})
},
toMyOrder() {
uni.navigateTo({
url: '../order/order?key=' + this.searchKey
})
}
}
} }
</script> </script>
<style> <style>
@import url(../../static/css/index.css); @import url(../../static/css/index.css);
</style> </style>
<template>
<view class="gift">
<view class="gift-remark">不同网点兑换积分不同</view>
<view class="gift-select">
<view class="select-list">
<view class="list-item"
>中国
<uni-icons class="list-icon" type="right" color="#B3B3B3" size="12"></uni-icons>
</view>
<view class="list-item"
>大连
<uni-icons class="list-icon" type="right" color="#B3B3B3" size="12"></uni-icons>
</view>
</view>
<view class="select-right">
请选择网点
<uni-icons class="list-icon" type="right" color="#B3B3B3" size="12"></uni-icons>
</view>
</view>
<view class="gift-content">
<view class="gift-item" v-for="item in 7" :key="item">
<view class="gift-image-box">
<image class="gift-image" mode="cover" src="../../../static/img/wallet.png"></image>
<view class="gift-tag">
<view class="tags">
<image class="tag-image" src="../../../static/img/score.png"></image>
<view class="tag-text">{{ item }}</view>
</view>
</view>
<view class="foot-tag">剩余99份</view>
</view>
<view class="gift-name">商品名称</view>
<view class="gift-menu">
<view class="gift-menu-text">包邮</view>
<view class="gift-menu-text">到付</view>
<view class="gift-menu-text">自提</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {}
</script>
<style lang="scss" scoped>
.gift {
width: 100%;
height: 100%;
box-sizing: border-box;
}
.gift-remark {
padding: 0 32upx;
width: 100%;
height: 42upx;
display: flex;
align-items: center;
justify-content: right;
box-sizing: border-box;
font-size: 20upx;
color: red;
}
.gift-select {
padding: 0 32upx;
display: flex;
width: 100%;
height: 70upx;
color: #b3b3b3;
box-sizing: border-box;
align-items: center;
border-bottom: 2upx solid #e7e7e7;
}
.select-list {
font-size: 20upx;
display: flex;
align-items: center;
}
.list-item {
display: flex;
align-items: center;
margin-right: 20upx;
&:last-child {
margin-right: 0;
}
}
.list-icon {
font-weight: 600;
margin-left: 50upx;
&:last-child {
margin-left: 20upx;
}
}
.select-right {
margin-left: auto;
font-size: 24upx;
}
.gift-content {
overflow-y: auto;
width: 100%;
height: calc(100% - 152upx);
padding: 32upx 32upx;
gap: 22upx;
display: flex;
flex-wrap: wrap;
box-sizing: border-box;
justify-content: space-between;
}
.gift-item {
display: flex;
flex-direction: column;
width: 300upx;
height: 318upx;
box-sizing: border-box;
// background-color: red;
}
.gift-image {
margin: 0;
width: 300upx;
height: 200upx;
}
.gift-name {
margin: 0;
display: flex;
height: 60upx;
font-size: 24upx;
color: #000000;
align-items: center;
}
.gift-menu {
display: flex;
height: 58upx;
font-size: 20upx;
color: #b3b3b3;
align-items: center;
}
.gift-menu-text {
padding: 4upx 4upx;
border: 2upx solid #ef8d15;
font-size: 24upx;
color: #ef8d15;
border-radius: 20upx;
margin-right: 10upx;
&:last-child {
margin-right: 0;
}
}
.gift-image-box {
position: relative;
}
.gift-tag {
position: absolute;
top: 0;
left: 0;
z-index: 9;
display: flex;
align-items: center;
justify-content: center;
width: 80upx;
height: 32upx;
background: linear-gradient(#ef7e1a, #f1b009);
transform: skewX(15deg);
border-top-right-radius: 10upx;
border-bottom-left-radius: 10upx;
}
.tag-image {
width: 24upx;
height: 24upx;
}
.tags {
display: flex;
align-items: center;
justify-content: center;
transform: skewX(-15deg);
}
.tag-text {
margin-left: 4upx;
font-weight: 500;
color: #fff;
font-size: 24upx;
}
.foot-tag {
position: absolute;
padding: 0 8upx;
bottom: 0;
right: 0;
z-index: 9;
display: flex;
align-items: center;
justify-content: center;
min-width: 110upx;
height: 32upx;
color: #fff;
font-size: 22upx;
box-sizing: border-box;
background: linear-gradient(#ef7e1a, #f1b009);
border-top-right-radius: 10upx;
border-bottom-left-radius: 10upx;
}
</style>
<template>
<view class="int">
<view class="int-centent" v-for="item in 6" :key="item">
<view class="int-centent-left">
<view class="centent-tag">
<view class="tag-text">APP注册</view>
</view>
<image class="centent-image" src="../../../static/img/company.png"></image>
</view>
<view class="int-centent-right">
<view class="centent-title">此处是活动标题</view>
<view class="centent-text"
>此处是活动内容,此处是活动内容,此处是活动内容,此处是活动内容,此处是活动内容,此处是活动内容,此处是活动内容,</view
>
</view>
</view>
</view>
</template>
<script>
export default {}
</script>
<style lang="scss" scoped>
.int {
padding: 30upx 0;
height: inherit;
overflow-y: auto;
}
.int-centent {
margin-bottom: 20upx;
width: 100%;
height: 220upx;
display: flex;
padding: 0 30upx;
box-sizing: border-box;
border-bottom: 2upx solid #e7e7e7;
&:last-child {
margin-bottom: 0;
}
}
.int-centent-left {
position: relative;
width: 200upx;
height: inherit;
.centent-image {
width: 200upx;
height: 200upx;
}
}
.int-centent-right {
flex: 1;
height: inherit;
padding-left: 20upx;
box-sizing: border-box;
.centent-title {
font-size: 28upx;
color: #333;
margin-bottom: 20upx;
}
.centent-text {
font-size: 20upx;
color: #666;
line-height: 36upx;
}
}
.centent-tag {
position: absolute;
top: 0;
left: 0;
z-index: 9;
display: flex;
font-size: 24upx;
min-width: 120upx;
height: 40upx;
color: #fff;
align-items: center;
justify-content: center;
box-sizing: border-box;
transform: skewX(15deg);
background-color: #ff4d4f;
border-top-right-radius: 10upx;
border-bottom-left-radius: 10upx;
}
.tag-text {
transform: skewX(-15deg);
}
</style>
<template>
<view class="integral">
<dHeader :title="$lang.lang.integral.info"></dHeader>
<view class="container">
<view class="header">
<view class="avatar">
<image src="../../static/img/vip_avatar.png" mode=""></image>
</view>
<view class="content">
<view class="content-title">{{ $lang.lang.integral.headerTitle }}白金会员</view>
<view class="content-text">
<view class="text">{{ $lang.lang.integral.spend }} 100</view>
<view class="text">{{ $lang.lang.integral.available }} 88</view>
</view>
<view class="divider">
<view class="divider-active"></view>
<view class="divider-unm">238</view>
<view class="divider-level">VIP2</view>
</view>
</view>
<view class="classification">
<image class="classification-image" src="../../static/img/vip_2.png"></image>
<view class="log-menu">
<view class="menu-item">积分日志 &gt;</view>
<view class="menu-item">兑换日志 &gt;</view>
</view>
</view>
</view>
<view class="main">
<view class="main-nav">
<view class="nav-item" :class="{ 'nav-active1': navIndex === 0 }" @click="navIndex = 0"
>兑换礼品</view
>
<view class="nav-item" :class="{ 'nav-active2': navIndex === 1 }" @click="navIndex = 1"
>积分活动</view
>
</view>
<view class="main-content">
<gift v-if="navIndex === 0"></gift>
<points v-if="navIndex === 1"></points>
</view>
</view>
</view>
</view>
</template>
<script>
import dHeader from '../../components/dHeader/index.vue'
import points from './components/points.vue'
import gift from './components/gift.vue'
export default {
components: {
dHeader,
gift,
points
},
data() {
return {
navIndex: 0
}
}
}
</script>
<style>
@import url(../../static/css/integral.css);
</style>
page {
/* #ifdef H5 */
padding-top: 140upx;
/* #endif */
/* #ifdef APP-PLUS */
padding-top: calc(var(--status-bar-height) + 100upx);
/* #endif */
height: 100%;
}
.integral {
padding: 0 32upx;
height: inherit;
}
.container {
width: 100%;
display: flex;
height: inherit;
flex-direction: column;
box-sizing: border-box;
background-color: #C3C8D3;
border-top-left-radius: 12upx;
border-top-right-radius: 12upx;
}
.header {
padding: 32upx 32upx 20upx;
height: 240upx;
display: flex;
color: #8C8E97;
font-size: 24upx;
box-sizing: border-box;
}
.avatar image {
width: 68upx;
height: 68upx;
}
.content {
flex: 1;
margin-left: 10upx;
}
.content .content-title {
font-size: 32upx;
color: #2A426B;
margin-bottom: 16upx;
text-shadow: 2upx 4upx 12upx rgba(0, 0, 0, 0.5);
}
.content .content-text {
display: flex;
}
.content .content-text .text {
text-align: left;
margin-right: 20upx;
font-size: 20upx;
/* transform: scale(0.8); */
}
.content .divider {
position: relative;
margin-top: 76upx;
width: 260upx;
height: 4upx;
background-color: #fff;
border-radius: 4upx;
}
.divider-active {
position: absolute;
top: 0;
left: 0;
width: 130upx;
height: 4upx;
background-color: #2A426B;
border-radius: 4upx;
}
.divider-unm {
position: absolute;
top: 0;
right: 50%;
color: #2A426B;
transform: translate(50%, -110%);
}
.divider-level {
position: absolute;
top: 0;
right: 0;
color: #2A426B;
transform: translate(130%, -50%);
}
.classification {
position: relative;
display: flex;
flex-direction: column;
}
.classification-image {
position: absolute;
width: 164upx;
height: 116upx;
transform: translateY(-60upx);
}
.log-menu {
margin-top: auto;
text-align: right;
color: #8A8E96;
}
.menu-item {
font-size: 24upx;
margin-top: 10upx;
}
.main {
overflow: hidden;
flex: 1;
height: calc(100% - 240upx);
background-color: #fff;
border-top-left-radius: 18upx;
border-top-right-radius: 18upx;
box-shadow: -2px 0px 12px 0 rgba(0, 0, 0, 0.1)
}
.main-nav {
display: flex;
width: 100%;
height: 80upx;
align-items: center;
justify-content: space-around;
background-color: #D1D5E1;
box-sizing: border-box;
}
.nav-item {
flex: 1;
display: flex;
height: 80upx;
font-size: 28upx;
color: #3F4044;
align-items: center;
justify-content: center;
border: 0;
}
.nav-active1 {
clip-path: polygon(0% 0%, 0% 100%, 100% 100%, 80% 0%);
/* clip-path: path('M 0 0 H 80 Q 100 0 100 20 V 100 H 0 Z'); */
font-weight: 600;
background-color: #fff !important;
color: #000 !important;
position: relative;
overflow: hidden;
}
.nav-active2 {
clip-path: polygon(20% 0%, 0% 100%, 100% 100%, 100% 0%);
/* clip-path: path('M 0 0 H 80 Q 100 0 100 20 V 100 H 0 Z'); */
font-weight: 600;
background-color: #fff !important;
color: #000 !important;
position: relative;
overflow: hidden;
}
.main-content {
height: calc(100% - 80upx);
box-sizing: border-box;
}
...@@ -456,7 +456,14 @@ export default { ...@@ -456,7 +456,14 @@ export default {
old_system: 'Old Order', old_system: 'Old Order',
sea: 'Groupage container', sea: 'Groupage container',
seaAir: 'Sea&air Cargo', seaAir: 'Sea&air Cargo',
air: 'Air Cargo' air: 'Air Cargo',
integral: 'my integral'
},
integral: {
info: 'my integral',
headerTitle: 'Honorable',
spend: 'redeemed points are',
available: 'The available credits are'
}, },
levite: { levite: {
levite: 'warehousing notes' levite: 'warehousing notes'
......
...@@ -451,7 +451,14 @@ export default { ...@@ -451,7 +451,14 @@ export default {
old_system: '旧订单', old_system: '旧订单',
sea: '海运拼柜', sea: '海运拼柜',
seaAir: '海空联运', seaAir: '海空联运',
air: '空运专线' air: '空运专线',
integral: '我的积分'
},
integral: {
info: '我的积分',
headerTitle: '尊贵的',
spend: '已兑换积分为',
available: '可用积分为'
}, },
levite: { levite: {
levite: '入仓须知' levite: '入仓须知'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment