1.对接团油接口

yj-dev
杨杰 3 years ago
parent f6fc4710a0
commit d88bbdedc7
  1. 1
      App.vue
  2. 6
      Utils/Api.js
  3. 18
      pages copy.json
  4. 456
      pages/goods/goods-list/goods-list.vue
  5. 6
      pages/goods/goods.vue
  6. 738
      pages/goods/ratings/ratings.vue
  7. 180
      pages/goods/refuel-confirm/refuel-confirm.vue
  8. 130
      pages/goods/refuel-details/refuel-details.vue
  9. 57
      pages/goods/refuel-succes/refuel-succes.vue
  10. 295
      pages/goods/refuel/refuel.vue
  11. 14
      pages/order/confirmation.vue
  12. 8
      pages/pay/payment/payment.vue
  13. 12
      pages/tabBar/cart/cart.vue
  14. 67
      pages/tabBar/category/category.vue
  15. 82
      pages/tabBar/home/home.vue
  16. 39
      pages/tabBar/user/user.vue
  17. 8
      pages/user/Charge/Charge.vue
  18. 442
      pages/user/address/address.vue
  19. 500
      pages/user/address/edit/edit.vue
  20. 10
      pages/user/business/business.vue
  21. 6
      pages/user/coupon/coupon.vue
  22. 12
      pages/user/deposit/deposit.vue
  23. 8
      pages/user/keep/keep.vue
  24. 6
      pages/user/mineCoupons/mineCoupons.vue
  25. 4
      pages/user/minePromotion/minePromotion.vue
  26. 222
      pages/user/myQR/myQR.vue
  27. 30
      pages/user/order_details/order_details.vue
  28. 62
      pages/user/order_list/order_list.vue
  29. 60
      pages/user/positioning/positioning.vue
  30. 20
      static/css/login.scss
  31. BIN
      static/img/jt.png
  32. 930
      uni.scss

@ -20,6 +20,7 @@
token: '',
brestToken:'',
cityId: '',
cityName:'',
longitude : '',
latitude : ''
},

@ -140,6 +140,12 @@ export const getGasDetailByStoreKey = params => {
return POST('GET', `${base}/highGas/getGasDetailByStoreKey`, params).then(res => res.data);
}
//获取已开通的省份
export const getDredgeProvince = params => {
return POST('GET', `${base}/common/getDredgeProvince`, params).then(res => res.data);
}
/**
* H5 获取用户信息
*/

@ -58,8 +58,8 @@
"style": {
"enablePullDownRefresh": true,
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#f06c7a",
"backgroundColorTop": "#f06c7a",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false, //
@ -109,7 +109,7 @@
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "登录",
"navigationBarBackgroundColor": "#f06c7a",
"navigationBarBackgroundColor": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"bounce": "none", //
@ -121,7 +121,7 @@
"path": "pages/login/register",
"style": {
"navigationBarTitleText": "手机号登录",
"navigationBarBackgroundColor": "#f06c7a",
"navigationBarBackgroundColor": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"bounce": "none", //
@ -133,7 +133,7 @@
"path": "pages/login/resetpasswd",
"style": {
"navigationBarTitleText": "重置密码",
"navigationBarBackgroundColor": "#f06c7a",
"navigationBarBackgroundColor": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"bounce": "none", //
@ -174,7 +174,7 @@
"path": "pages/user/coupon/coupon",
"style": {
"navigationBarTitleText": "优惠券",
"navigationBarBackgroundColor": "#f06c7a",
"navigationBarBackgroundColor": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"bounce": "none"
@ -184,7 +184,7 @@
"path": "pages/user/keep/keep",
"style": {
"navigationBarTitleText": "我的收藏",
"navigationBarBackgroundColor": "#f06c7a",
"navigationBarBackgroundColor": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"bounce": "none"
@ -268,7 +268,7 @@
},
"tabBar": {
"color": "#333333",
"selectedColor": "#f06c7a",
"selectedColor": "#0083f5",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
@ -297,4 +297,4 @@
}
]
}
}
}

@ -1,27 +1,27 @@
<template>
<view>
<!-- 商品数据 -->
<!-- <view class="header" :style="{position:headerPosition,top:headerTop}">
<view class="target" v-for="(target,index) in orderbyList" @tap="select(index)" :key="index" :class="[target.selected?'on':'']">
{{target.text}}
<view v-if="target.orderbyicon" class="icon" :class="target.orderbyicon[target.orderby]"></view>
</view>
</view> -->
<!-- 占位 -->
<!-- 商品数据 -->
<!-- <view class="header" :style="{position:headerPosition,top:headerTop}">
<view class="target" v-for="(target,index) in orderbyList" @tap="select(index)" :key="index" :class="[target.selected?'on':'']">
{{target.text}}
<view v-if="target.orderbyicon" class="icon" :class="target.orderbyicon[target.orderby]"></view>
</view>
</view> -->
<!-- 占位 -->
<view class="place"></view>
<!-- 商品列表 -->
<view class="goods-list">
<view class="product-list">
<view class="product" v-for="(goods) in goodsList" :key="goods.goods_id" @tap="toGoods(goods)">
<image mode="widthFix" :src="goods.img"></image>
<view class="name">{{goods.name}}</view>
<view class="info">
<view class="price">{{goods.price}}</view>
<view class="slogan">{{goods.slogan}}</view>
</view>
</view>
</view>
<view class="loading-text">{{loadingText}}</view>
<!-- 商品列表 -->
<view class="goods-list">
<view class="product-list">
<view class="product" v-for="(goods) in goodsList" :key="goods.goods_id" @tap="toGoods(goods)">
<image mode="widthFix" :src="goods.img"></image>
<view class="name">{{goods.name}}</view>
<view class="info">
<view class="price">{{goods.price}}</view>
<view class="slogan">{{goods.slogan}}</view>
</view>
</view>
</view>
<view class="loading-text">{{loadingText}}</view>
</view>
</view>
</template>
@ -30,219 +30,219 @@
export default {
data() {
return {
goodsList:[
{ goods_id: 0, img: '/static/img/goods/p1.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 1, img: '/static/img/goods/p2.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 2, img: '/static/img/goods/p3.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 3, img: '/static/img/goods/p4.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 4, img: '/static/img/goods/p5.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 5, img: '/static/img/goods/p6.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 6, img: '/static/img/goods/p7.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 7, img: '/static/img/goods/p8.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 8, img: '/static/img/goods/p9.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 9, img: '/static/img/goods/p10.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }
],
loadingText:"正在加载...",
headerTop:"0px",
headerPosition:"fixed",
orderbyList:[
{text:"销量",selected:true,orderbyicon:false,orderby:0},
{text:"价格",selected:false,orderbyicon:['sheng','jiang'],orderby:0},
{text:"好评",selected:false,orderbyicon:false,orderby:0}
],
goodsList:[
{ goods_id: 0, img: '/static/img/goods/p1.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 1, img: '/static/img/goods/p2.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 2, img: '/static/img/goods/p3.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 3, img: '/static/img/goods/p4.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 4, img: '/static/img/goods/p5.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 5, img: '/static/img/goods/p6.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 6, img: '/static/img/goods/p7.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 7, img: '/static/img/goods/p8.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 8, img: '/static/img/goods/p9.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' },
{ goods_id: 9, img: '/static/img/goods/p10.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' }
],
loadingText:"正在加载...",
headerTop:"0px",
headerPosition:"fixed",
orderbyList:[
{text:"销量",selected:true,orderbyicon:false,orderby:0},
{text:"价格",selected:false,orderbyicon:['sheng','jiang'],orderby:0},
{text:"好评",selected:false,orderbyicon:false,orderby:0}
],
orderby:"sheng"
};
},
onLoad: function (option) { //optionobject
console.log(option.cid); //
uni.setNavigationBarTitle({
title: option.name
});
//H5
// #ifdef H5
//onLoadhead
let Timer = setInterval(()=>{
let uniHead = document.getElementsByTagName('uni-page-head');
if(uniHead.length>0){
this.headerTop = uniHead[0].offsetHeight+'px';
clearInterval(Timer);//
}
},1);
// #endif
},
onPageScroll(e){
//iOS
if(e.scrollTop>=0){
this.headerPosition = "fixed";
}else{
this.headerPosition = "absolute";
}
},
//page.json "enablePullDownRefresh": true
onPullDownRefresh() {
setTimeout(()=>{
this.reload();
uni.stopPullDownRefresh();
}, 1000);
},
//page.json"onReachBottomDistance"
onReachBottom(){
uni.showToast({title: '触发上拉加载'});
let len = this.goodsList.length;
if(len>=40){
this.loadingText="到底了";
return false;
}else{
this.loadingText="正在加载...";
}
let end_goods_id = this.goodsList[len-1].goods_id;
for(let i=1;i<=10;i++){
let goods_id = end_goods_id+i;
let p = { goods_id: goods_id, img: '/static/img/goods/p'+(goods_id%10==0?10:goods_id%10)+'.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' };
this.goodsList.push(p);
}
},
methods:{
reload(){
console.log("reload");
let tmpArr = []
this.goodsList = [];
let end_goods_id = 0;
for(let i=1;i<=10;i++){
let goods_id = end_goods_id+i;
let p = { goods_id: goods_id, img: '/static/img/goods/p'+(goods_id%10==0?10:goods_id%10)+'.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' };
this.goodsList.push(p);
}
},
//
toGoods(e){
uni.showToast({title: '商品'+e.goods_id,icon:"none"});
uni.navigateTo({
url: '../goods'
});
},
//
select(index){
let tmpTis = this.orderbyList[index].text+"排序 "
if(this.orderbyList[index].orderbyicon){
let type = this.orderbyList[index].orderby==0?'升序':'降序';
if(this.orderbyList[index].selected){
type = this.orderbyList[index].orderby==0?'降序':'升序';
this.orderbyList[index].orderby = this.orderbyList[index].orderby==0?1:0;
}
tmpTis+=type
}
this.orderbyList[index].selected = true;
let len = this.orderbyList.length;
for(let i=0;i<len;i++){
if(i!=index){
this.orderbyList[i].selected = false;
}
}
uni.showToast({title:tmpTis,icon:"none"});
}
}
},
onLoad: function (option) { //optionobject
console.log(option.cid); //
uni.setNavigationBarTitle({
title: option.name
});
//H5
// #ifdef H5
//onLoadhead
let Timer = setInterval(()=>{
let uniHead = document.getElementsByTagName('uni-page-head');
if(uniHead.length>0){
this.headerTop = uniHead[0].offsetHeight+'px';
clearInterval(Timer);//
}
},1);
// #endif
},
onPageScroll(e){
//iOS
if(e.scrollTop>=0){
this.headerPosition = "fixed";
}else{
this.headerPosition = "absolute";
}
},
//page.json "enablePullDownRefresh": true
onPullDownRefresh() {
setTimeout(()=>{
this.reload();
uni.stopPullDownRefresh();
}, 1000);
},
//page.json"onReachBottomDistance"
onReachBottom(){
uni.showToast({title: '触发上拉加载'});
let len = this.goodsList.length;
if(len>=40){
this.loadingText="到底了";
return false;
}else{
this.loadingText="正在加载...";
}
let end_goods_id = this.goodsList[len-1].goods_id;
for(let i=1;i<=10;i++){
let goods_id = end_goods_id+i;
let p = { goods_id: goods_id, img: '/static/img/goods/p'+(goods_id%10==0?10:goods_id%10)+'.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' };
this.goodsList.push(p);
}
},
methods:{
reload(){
console.log("reload");
let tmpArr = []
this.goodsList = [];
let end_goods_id = 0;
for(let i=1;i<=10;i++){
let goods_id = end_goods_id+i;
let p = { goods_id: goods_id, img: '/static/img/goods/p'+(goods_id%10==0?10:goods_id%10)+'.jpg', name: '商品名称商品名称商品名称商品名称商品名称', price: '¥168', slogan:'1235人付款' };
this.goodsList.push(p);
}
},
//
toGoods(e){
uni.showToast({title: '商品'+e.goods_id,icon:"none"});
uni.navigateTo({
url: '../goods'
});
},
//
select(index){
let tmpTis = this.orderbyList[index].text+"排序 "
if(this.orderbyList[index].orderbyicon){
let type = this.orderbyList[index].orderby==0?'升序':'降序';
if(this.orderbyList[index].selected){
type = this.orderbyList[index].orderby==0?'降序':'升序';
this.orderbyList[index].orderby = this.orderbyList[index].orderby==0?1:0;
}
tmpTis+=type
}
this.orderbyList[index].selected = true;
let len = this.orderbyList.length;
for(let i=0;i<len;i++){
if(i!=index){
this.orderbyList[i].selected = false;
}
}
uni.showToast({title:tmpTis,icon:"none"});
}
}
}
</script>
<style lang="scss">
.icon {
font-size:26upx;
}
.header{
width: 92%;
padding: 0 4%;
height: 79upx;
display: flex;
justify-content: space-around;
align-items: flex-end;
position: fixed;
top: 0;
z-index: 10;
background-color: #fff;
border-bottom: solid 1upx #eee;
.target{
width: 20%;
height: 60upx;
display: flex;
justify-content: center;
align-items: center;
font-size: 28upx;
margin-bottom: -2upx;
color: #aaa;
&.on{
color: #555;
border-bottom: 4upx solid #f06c7a;
font-weight: 600;
font-size: 30upx;
}
}
}
.place{
background-color: #ffffff;
height: 100upx;
<style lang="scss">
.icon {
font-size:26upx;
}
.goods-list{
.loading-text{
width: 100%;
display: flex;
justify-content: center;
align-items: center;
height: 60upx;
color: #979797;
font-size: 24upx;
}
.product-list{
width: 92%;
padding: 0 4% 3vw 4%;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.product{
width: 48%;
border-radius: 20upx;
background-color: #fff;
margin: 0 0 15upx 0;
box-shadow: 0upx 5upx 25upx rgba(0,0,0,0.1);
image{
width: 100%;
border-radius: 20upx 20upx 0 0;
}
.name{
width: 92%;
padding: 8upx 4%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
text-align: justify;
overflow: hidden;
font-size: 30upx;
}
.info{
display: flex;
justify-content: space-between;
align-items: flex-end;
width: 92%;
padding: 10upx 4% 10upx 4%;
.price{
color: #e65339;
font-size: 30upx;
font-weight: 600;
}
.slogan{
color: #807c87;
font-size: 24upx;
}
}
}
}
.header{
width: 92%;
padding: 0 4%;
height: 79upx;
display: flex;
justify-content: space-around;
align-items: flex-end;
position: fixed;
top: 0;
z-index: 10;
background-color: #fff;
border-bottom: solid 1upx #eee;
.target{
width: 20%;
height: 60upx;
display: flex;
justify-content: center;
align-items: center;
font-size: 28upx;
margin-bottom: -2upx;
color: #aaa;
&.on{
color: #555;
border-bottom: 4upx solid #0083f5;
font-weight: 600;
font-size: 30upx;
}
}
}
.place{
background-color: #ffffff;
height: 100upx;
}
.goods-list{
.loading-text{
width: 100%;
display: flex;
justify-content: center;
align-items: center;
height: 60upx;
color: #979797;
font-size: 24upx;
}
.product-list{
width: 92%;
padding: 0 4% 3vw 4%;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.product{
width: 48%;
border-radius: 20upx;
background-color: #fff;
margin: 0 0 15upx 0;
box-shadow: 0upx 5upx 25upx rgba(0,0,0,0.1);
image{
width: 100%;
border-radius: 20upx 20upx 0 0;
}
.name{
width: 92%;
padding: 8upx 4%;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
text-align: justify;
overflow: hidden;
font-size: 30upx;
}
.info{
display: flex;
justify-content: space-between;
align-items: flex-end;
width: 92%;
padding: 10upx 4% 10upx 4%;
.price{
color: #e65339;
font-size: 30upx;
font-weight: 600;
}
.slogan{
color: #807c87;
font-size: 24upx;
}
}
}
}
}
</style>

@ -102,9 +102,7 @@
</image>
</view>
</view>
<!-- #ifdef H5 -->
<authorize></authorize>
<!-- #endif -->
</view>
</template>
@ -981,7 +979,7 @@
}
.buy {
background-color: #f06c7a;
background-color: #0083f5;
}
}
}
@ -1262,4 +1260,4 @@
}
}
</style>
</style>

@ -1,72 +1,72 @@
<template>
<view>
<video id="myVideo" class="myVideo" :src="videoSrc" v-show="isPlayVideo" :show-fullscreen-btn="showFullscreenBtn" :direction="videoDirection" :show-play-btn="showPlayBtn" @pause="videoPause" @fullscreenchange="viderFullscreen">
<cover-image class="stopPlayVideoBtn" @click="stopPlayVideo" src="/static/img/close.png"></cover-image>
<view>
<video id="myVideo" class="myVideo" :src="videoSrc" v-show="isPlayVideo" :show-fullscreen-btn="showFullscreenBtn" :direction="videoDirection" :show-play-btn="showPlayBtn" @pause="videoPause" @fullscreenchange="viderFullscreen">
<cover-image class="stopPlayVideoBtn" @click="stopPlayVideo" src="/static/img/close.png"></cover-image>
</video>
<view class="content">
<view class="label">
<view v-for="(label,index) in labelList" :class="{'on':index==labelIndex}" @tap="loadRatings(index)" :key="label.type">
{{label.name}}({{label.number}})
</view>
</view>
<view class="list">
<view class="row" v-for="(row,Rindex) in ratingsList" :key="Rindex">
<view class="left">
<view class="face">
<image :src="row.face"></image>
</view>
</view>
<view class="right">
<view class="name-date">
<view class="username">
{{row.username}}
</view>
<view class="date">
{{row.date}}
</view>
</view>
<view class="spec">
{{row.spec}}
</view>
<view class="first">
<view class="rat">
{{row.first.content}}
</view>
<view class="img-video">
<view class="box" v-for="item in row.first.video" @tap="playVideo(item.path)" :key="item.path">
<image mode="aspectFill" :src="item.img"></image>
<view class="playbtn">
<view class="icon bofang"></view>
</view>
</view>
<view class="box" v-for="item in row.first.img" @tap="showBigImg(item,row.first.img)" :key="item">
<image mode="aspectFill" :src="item"></image>
</view>
</view>
</view>
<view class="append" v-if="row.append">
<view class="date">
{{row.append.date}}天后追加
</view>
<view class="rat">
{{row.append.content}}
</view>
<view class="img-video">
<view class="box" v-for="item in row.append.video" @tap="playVideo(item.path)" :key="item.path">
<image mode="aspectFill" :src="item.img"></image>
<view class="playbtn">
<view class="icon bofang"></view>
</view>
</view>
<view class="box" v-for="item in row.append.img" @tap="showBigImg(item,row.append.img)" :key="item">
<image mode="aspectFill" :src="item"></image>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="content">
<view class="label">
<view v-for="(label,index) in labelList" :class="{'on':index==labelIndex}" @tap="loadRatings(index)" :key="label.type">
{{label.name}}({{label.number}})
</view>
</view>
<view class="list">
<view class="row" v-for="(row,Rindex) in ratingsList" :key="Rindex">
<view class="left">
<view class="face">
<image :src="row.face"></image>
</view>
</view>
<view class="right">
<view class="name-date">
<view class="username">
{{row.username}}
</view>
<view class="date">
{{row.date}}
</view>
</view>
<view class="spec">
{{row.spec}}
</view>
<view class="first">
<view class="rat">
{{row.first.content}}
</view>
<view class="img-video">
<view class="box" v-for="item in row.first.video" @tap="playVideo(item.path)" :key="item.path">
<image mode="aspectFill" :src="item.img"></image>
<view class="playbtn">
<view class="icon bofang"></view>
</view>
</view>
<view class="box" v-for="item in row.first.img" @tap="showBigImg(item,row.first.img)" :key="item">
<image mode="aspectFill" :src="item"></image>
</view>
</view>
</view>
<view class="append" v-if="row.append">
<view class="date">
{{row.append.date}}天后追加
</view>
<view class="rat">
{{row.append.content}}
</view>
<view class="img-video">
<view class="box" v-for="item in row.append.video" @tap="playVideo(item.path)" :key="item.path">
<image mode="aspectFill" :src="item.img"></image>
<view class="playbtn">
<view class="icon bofang"></view>
</view>
</view>
<view class="box" v-for="item in row.append.img" @tap="showBigImg(item,row.append.img)" :key="item">
<image mode="aspectFill" :src="item"></image>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
@ -74,315 +74,315 @@
<script>
export default {
data() {
return {
labelList:[
{name:'全部',number:25,type:'all'},
{name:'好评',number:23,type:'good'},
{name:'中评',number:1,type:'secondary'},
{name:'差评',number:1,type:'poor'},
{name:'有图',number:12,type:'img'},
{name:'视频',number:2,type:'video'},
{name:'追加',number:2,type:'append'}
],
labelIndex:0,
ratingsList:[
{id:1,username:"大黑哥",face:"/static/img/face.jpg",date:'2019-04-21',spec:"规格: XL",grade:"good",
first:{content:"好看,可以,不愧是专业的,才拿到手上就研究了半天才装上",
img:["https://ae01.alicdn.com/kf/HTB1wREwTXzqK1RjSZFvq6AB7VXaT.jpg","https://ae01.alicdn.com/kf/HTB1sL7hTjDpK1RjSZFrq6y78VXaw.jpg","https://ae01.alicdn.com/kf/HTB111soTbvpK1RjSZPiq6zmwXXaB.jpg","https://ae01.alicdn.com/kf/HTB1O2TRTmzqK1RjSZPcq6zTepXa4.jpg"],
video:[{img:"https://ae01.alicdn.com/kf/HTB1AMEBTcfpK1RjSZFOq6y6nFXaK.jpg",path:"https://mp4.vjshi.com/2018-12-28/1083f3db90334f86e3fc3586b4472914.mp4"}]
},
append:{date:65,content:"用了一段时间,质量很好,体验很流畅,推荐购买",
img:["https://ae01.alicdn.com/kf/HTB1dKZtTgHqK1RjSZFEq6AGMXXaS.jpg","https://ae01.alicdn.com/kf/HTB18h3oTmzqK1RjSZFjq6zlCFXap.jpg"],
video:[{img:"https://ae01.alicdn.com/kf/HTB1AMEBTcfpK1RjSZFOq6y6nFXaK.jpg",path:"https://mp4.vjshi.com/2017-06-17/ed1d63669bea39f5ef078c4e194291d6.mp4"}]
}
},
{id:2,username:"小黑狗",face:"/static/img/face.jpg",date:'2019-04-21',spec:"规格: XL",grade:"secondary",
first:{content:"好评,看图",
img:["https://ae01.alicdn.com/kf/HTB111soTbvpK1RjSZPiq6zmwXXaB.jpg","https://ae01.alicdn.com/kf/HTB1O2TRTmzqK1RjSZPcq6zTepXa4.jpg"],
video:[]
}
},
{id:3,username:"小黑狗",face:"/static/img/face.jpg",date:'2019-04-21',spec:"规格: XL",grade:"poor",
first:{content:"好评,看图",
img:["https://ae01.alicdn.com/kf/HTB111soTbvpK1RjSZPiq6zmwXXaB.jpg","https://ae01.alicdn.com/kf/HTB1O2TRTmzqK1RjSZPcq6zTepXa4.jpg"],
video:[]
}
},
{id:3,username:"小黑狗",face:"/static/img/face.jpg",date:'2019-04-21',spec:"规格: XL",grade:"secondary",
first:{content:"系统默认好评",
img:[],
video:[]
}
}
],
videoDirection:0,
showFullscreenBtn:true,
showPlayBtn:true,
isPlayVideo:true,
return {
labelList:[
{name:'全部',number:25,type:'all'},
{name:'好评',number:23,type:'good'},
{name:'中评',number:1,type:'secondary'},
{name:'差评',number:1,type:'poor'},
{name:'有图',number:12,type:'img'},
{name:'视频',number:2,type:'video'},
{name:'追加',number:2,type:'append'}
],
labelIndex:0,
ratingsList:[
{id:1,username:"大黑哥",face:"/static/img/face.jpg",date:'2019-04-21',spec:"规格: XL",grade:"good",
first:{content:"好看,可以,不愧是专业的,才拿到手上就研究了半天才装上",
img:["https://ae01.alicdn.com/kf/HTB1wREwTXzqK1RjSZFvq6AB7VXaT.jpg","https://ae01.alicdn.com/kf/HTB1sL7hTjDpK1RjSZFrq6y78VXaw.jpg","https://ae01.alicdn.com/kf/HTB111soTbvpK1RjSZPiq6zmwXXaB.jpg","https://ae01.alicdn.com/kf/HTB1O2TRTmzqK1RjSZPcq6zTepXa4.jpg"],
video:[{img:"https://ae01.alicdn.com/kf/HTB1AMEBTcfpK1RjSZFOq6y6nFXaK.jpg",path:"https://mp4.vjshi.com/2018-12-28/1083f3db90334f86e3fc3586b4472914.mp4"}]
},
append:{date:65,content:"用了一段时间,质量很好,体验很流畅,推荐购买",
img:["https://ae01.alicdn.com/kf/HTB1dKZtTgHqK1RjSZFEq6AGMXXaS.jpg","https://ae01.alicdn.com/kf/HTB18h3oTmzqK1RjSZFjq6zlCFXap.jpg"],
video:[{img:"https://ae01.alicdn.com/kf/HTB1AMEBTcfpK1RjSZFOq6y6nFXaK.jpg",path:"https://mp4.vjshi.com/2017-06-17/ed1d63669bea39f5ef078c4e194291d6.mp4"}]
}
},
{id:2,username:"小黑狗",face:"/static/img/face.jpg",date:'2019-04-21',spec:"规格: XL",grade:"secondary",
first:{content:"好评,看图",
img:["https://ae01.alicdn.com/kf/HTB111soTbvpK1RjSZPiq6zmwXXaB.jpg","https://ae01.alicdn.com/kf/HTB1O2TRTmzqK1RjSZPcq6zTepXa4.jpg"],
video:[]
}
},
{id:3,username:"小黑狗",face:"/static/img/face.jpg",date:'2019-04-21',spec:"规格: XL",grade:"poor",
first:{content:"好评,看图",
img:["https://ae01.alicdn.com/kf/HTB111soTbvpK1RjSZPiq6zmwXXaB.jpg","https://ae01.alicdn.com/kf/HTB1O2TRTmzqK1RjSZPcq6zTepXa4.jpg"],
video:[]
}
},
{id:3,username:"小黑狗",face:"/static/img/face.jpg",date:'2019-04-21',spec:"规格: XL",grade:"secondary",
first:{content:"系统默认好评",
img:[],
video:[]
}
}
],
videoDirection:0,
showFullscreenBtn:true,
showPlayBtn:true,
isPlayVideo:true,
videoSrc:''
};
},
onReady: function (res) {
this.videoContext = uni.createVideoContext('myVideo')
},
//page.json "enablePullDownRefresh": true
onPullDownRefresh() {
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
//page.json"onReachBottomDistance"
onReachBottom() {
uni.showToast({ title: '触发上拉加载' });
},
methods: {
loadRatings(index){
this.labelIndex = index;
uni.showToast({
title:"切换评论列表"
})
//this.ratingsList
/*
let type = this.labelList[index].type; //
......
*/
},
playVideo(path) {
this.videoSrc = path;
// this.isPlayVideo = true;
this.$nextTick(function() {
this.videoContext.requestFullScreen({direction:0});
});
},
stopPlayVideo(){
this.videoContext.pause();
},
videoPause(){
// this.isPlayVideo = false;
this.videoSrc = '';
},
viderFullscreen(e){
if(e.detail.fullScreen){
this.videoContext.play();
}else{
this.stopPlayVideo();
}
},
showBigImg(src,srclist){
uni.previewImage({
current:src,
urls: srclist
});
}
},
onReady: function (res) {
this.videoContext = uni.createVideoContext('myVideo')
},
//page.json "enablePullDownRefresh": true
onPullDownRefresh() {
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
//page.json"onReachBottomDistance"
onReachBottom() {
uni.showToast({ title: '触发上拉加载' });
},
methods: {
loadRatings(index){
this.labelIndex = index;
uni.showToast({
title:"切换评论列表"
})
//this.ratingsList
/*
let type = this.labelList[index].type; //
......
*/
},
playVideo(path) {
this.videoSrc = path;
// this.isPlayVideo = true;
this.$nextTick(function() {
this.videoContext.requestFullScreen({direction:0});
});
},
stopPlayVideo(){
this.videoContext.pause();
},
videoPause(){
// this.isPlayVideo = false;
this.videoSrc = '';
},
viderFullscreen(e){
if(e.detail.fullScreen){
this.videoContext.play();
}else{
this.stopPlayVideo();
}
},
showBigImg(src,srclist){
uni.previewImage({
current:src,
urls: srclist
});
}
},
}
</script>
<style lang="scss">
page{
background-color: #fff;
}
.myVideo{
position: fixed;
top: 50%;
right: 100%;
<style lang="scss">
page{
background-color: #fff;
}
.myVideo{
position: fixed;
top: 50%;
right: 100%;
}
.content{
view{
display: flex;
}
width: 94%;
padding: 0 3%;
.label{
width: 100%;
flex-wrap:wrap;
view{
padding: 0 20upx;
height: 50upx;
border-radius: 40upx;
border:solid 1upx #ddd;
align-items: center;
color: #555;
font-size: 26upx;
background-color: #f9f9f9;
margin: 10upx 20upx 10upx 0;
&.on{
border:solid 1upx #f06c7a;
color: #f06c7a;
}
}
}
.list{
width: 100%;
flex-wrap: wrap;
padding: 20upx 0;
.row{
width: 100%;
margin-top: 30upx;
.left{
width: 10vw;
flex-shrink: 0;
margin-right: 10upx;
.face{
width: 100%;
image{
width: 10vw;
height: 10vw;
border-radius: 100%;
}
}
}
.right{
width: 100%;
flex-wrap: wrap;
.name-date{
width: 100%;
justify-content: space-between;
align-items: baseline;
.username{
font-size: 32upx;
color: #555;
}
.date{
font-size:28upx;
color: #aaa;
}
}
.spec{
width: 100%;
color: #aaa;
font-size: 26upx;
}
.first{
width: 100%;
flex-wrap: wrap;
.rat{
font-size: 30upx;
}
.img-video{
width: 100%;
flex-wrap: wrap;
.box{
width: calc((84.6vw - 50upx)/4);
height: calc((84.6vw - 50upx)/4);
margin: 5upx 5upx;
position: relative;
justify-content: center;
align-items: center;
image{
position: absolute;
width: 100%;
height: 100%;
border-radius: 10upx;
}
.playbtn{
position: absolute;
.icon{
font-size: 80upx;
color: rgba(255,255,255,.9)
}
}
}
}
}
.append{
width: 100%;
flex-wrap: wrap;
.date{
width: 100%;
height: 40upx;
border-left: 10upx solid #f06c7a;
padding-left: 10upx;
align-items: center;
font-size: 32upx;
margin: 20upx 0;
}
.rat{
font-size: 30upx;
}
.img-video{
width: 100%;
flex-wrap: wrap;
.box{
width: calc((84.6vw - 10upx - (10upx * 4))/4);
height: calc((84.6vw - 10upx - (10upx * 4))/4);
margin: 5upx 5upx;
position: relative;
justify-content: center;
align-items: center;
image{
position: absolute;
width: 100%;
height: 100%;
border-radius: 10upx;
}
.playbtn{
position: absolute;
.icon{
font-size: 80upx;
color: rgba(255,255,255,.9);
}
}
}
}
}
}
}
}
}
/*
* <view class="list">
<view class="row">
<view class="right">
<view class="spec">
规格XL
</view>
<view class="first">
<view class="rat">
好看可以不愧是专业的才拿到手上就研究了半天才装上
</view>
<view class="img-video">
<view class="box">
<image src="https://ae01.alicdn.com/kf/HTB1wREwTXzqK1RjSZFvq6AB7VXaT.jpg"></image>
<view class="playbtn">
<view class="icon bofang"></view>
</view>
</view>
<view class="box">
<image src="https://ae01.alicdn.com/kf/HTB1wREwTXzqK1RjSZFvq6AB7VXaT.jpg"></image>
</view>
<view class="box">
<image src="https://ae01.alicdn.com/kf/HTB1wREwTXzqK1RjSZFvq6AB7VXaT.jpg"></image>
</view>
</view>
</view>
<view class="append">
<view class="date">
65天后追加
</view>
<view class="rat">
好看可以不愧是专业的才拿到手上就研究了半天才装上
</view>
<view class="img-video">
<view class="box">
<image src="https://ae01.alicdn.com/kf/HTB1wREwTXzqK1RjSZFvq6AB7VXaT.jpg"></image>
</view>
<view class="box">
<image src="https://ae01.alicdn.com/kf/HTB1wREwTXzqK1RjSZFvq6AB7VXaT.jpg"></image>
</view>
</view>
</view>
</view>
</view>
</view>
*
.content{
view{
display: flex;
}
width: 94%;
padding: 0 3%;
.label{
width: 100%;
flex-wrap:wrap;
view{
padding: 0 20upx;
height: 50upx;
border-radius: 40upx;
border:solid 1upx #ddd;
align-items: center;
color: #555;
font-size: 26upx;
background-color: #f9f9f9;
margin: 10upx 20upx 10upx 0;
&.on{
border:solid 1upx #0083f5;
color: #0083f5;
}
}
}
.list{
width: 100%;
flex-wrap: wrap;
padding: 20upx 0;
.row{
width: 100%;
margin-top: 30upx;
.left{
width: 10vw;
flex-shrink: 0;
margin-right: 10upx;
.face{
width: 100%;
image{
width: 10vw;
height: 10vw;
border-radius: 100%;
}
}
}
.right{
width: 100%;
flex-wrap: wrap;
.name-date{
width: 100%;
justify-content: space-between;
align-items: baseline;
.username{
font-size: 32upx;
color: #555;
}
.date{
font-size:28upx;
color: #aaa;
}
}
.spec{
width: 100%;
color: #aaa;
font-size: 26upx;
}
.first{
width: 100%;
flex-wrap: wrap;
.rat{
font-size: 30upx;
}
.img-video{
width: 100%;
flex-wrap: wrap;
.box{
width: calc((84.6vw - 50upx)/4);
height: calc((84.6vw - 50upx)/4);
margin: 5upx 5upx;
position: relative;
justify-content: center;
align-items: center;
image{
position: absolute;
width: 100%;
height: 100%;
border-radius: 10upx;
}
.playbtn{
position: absolute;
.icon{
font-size: 80upx;
color: rgba(255,255,255,.9)
}
}
}
}
}
.append{
width: 100%;
flex-wrap: wrap;
.date{
width: 100%;
height: 40upx;
border-left: 10upx solid #0083f5;
padding-left: 10upx;
align-items: center;
font-size: 32upx;
margin: 20upx 0;
}
.rat{
font-size: 30upx;
}
.img-video{
width: 100%;
flex-wrap: wrap;
.box{
width: calc((84.6vw - 10upx - (10upx * 4))/4);
height: calc((84.6vw - 10upx - (10upx * 4))/4);
margin: 5upx 5upx;
position: relative;
justify-content: center;
align-items: center;
image{
position: absolute;
width: 100%;
height: 100%;
border-radius: 10upx;
}
.playbtn{
position: absolute;
.icon{
font-size: 80upx;
color: rgba(255,255,255,.9);
}
}
}
}
}
}
}
}
}
/*
* <view class="list">
<view class="row">
<view class="right">
<view class="spec">
规格XL
</view>
<view class="first">
<view class="rat">
好看可以不愧是专业的才拿到手上就研究了半天才装上
</view>
<view class="img-video">
<view class="box">
<image src="https://ae01.alicdn.com/kf/HTB1wREwTXzqK1RjSZFvq6AB7VXaT.jpg"></image>
<view class="playbtn">
<view class="icon bofang"></view>
</view>
</view>
<view class="box">
<image src="https://ae01.alicdn.com/kf/HTB1wREwTXzqK1RjSZFvq6AB7VXaT.jpg"></image>
</view>
<view class="box">
<image src="https://ae01.alicdn.com/kf/HTB1wREwTXzqK1RjSZFvq6AB7VXaT.jpg"></image>
</view>
</view>
</view>
<view class="append">
<view class="date">
65天后追加
</view>
<view class="rat">
好看可以不愧是专业的才拿到手上就研究了半天才装上
</view>
<view class="img-video">
<view class="box">
<image src="https://ae01.alicdn.com/kf/HTB1wREwTXzqK1RjSZFvq6AB7VXaT.jpg"></image>
</view>
<view class="box">
<image src="https://ae01.alicdn.com/kf/HTB1wREwTXzqK1RjSZFvq6AB7VXaT.jpg"></image>
</view>
</view>
</view>
</view>
</view>
</view>
*
* */
</style>

@ -1,13 +1,13 @@
<template>
<view>
<view>
<!-- 头部 -->
<view class="width100 height120 backcorfff">
<image src="../../../static/img/noorder.png" class="flleft conImg mart10 margle10"></image>
<image :src="orderList.goodsImg" class="flleft conImg mart10 margle10"></image>
<view class="conCont paddtop15">
<view class="font20 fontwig6 fcor333 text1 paddtright10">乌江能源加油站(大一型国企)</view>
<view class="font14 fcor999 text2 paddtop5 paddtright10">贵州省贵阳市什么什么大道65号</view>
<view class="font20 fontwig6 fcoreb5 paddtop5">6.40
<text class="margle10 slogan font14">6.38</text>
<view class="font20 fontwig6 fcor333 text1 paddtright10">{{orderList.goodsName}}</view>
<view class="font14 fcor999 text2 paddtop5 paddtright10">{{refulAdress}}</view>
<view class="font20 fontwig6 fcoreb5 paddtop5">{{orderList.gasPriceVip}}
<text class="margle10 slogan font14">{{orderList.gasPriceGun}}</text>
</view>
</view>
</view>
@ -19,7 +19,7 @@
油号\油枪
</view>
<view class="flright width40 fotct">
92#/2
{{orderList.gasOilNo}}#/{{orderList.gasGunNo}}
</view>
</view>
<view class="line1"></view>
@ -28,32 +28,171 @@
加油金额
</view>
<view class="flright width40 fotct">
500
{{orderList.totalPrice}}
</view>
</view>
<view class="width100 mart15 fcor333 font16 fontwig6 paddleft10">重要说明</view>
<view class="width95 paddleft10 font14 fcor999 mart5">1.<text class="fcor089 fontwig6">请先加油后下单</text>,即您到站后,与工作人员确认油号,抢号后再付款</view>
<view class="width95 paddleft10 font14 fcor999 mart5">2.请勿先付款后加油,若您已下单付款请于24小时内到加油站完成加油;若您48小时内未完成加油,请及时发起退单;逾期退单可能会退单失败</view>
<view class="width95 paddleft10 font14 fcor999 mart5">1.<text
class="fcor089 fontwig6">请先加油后下单</text>,即您到站后,与工作人员确认油号,抢号后再付款</view>
<view class="width95 paddleft10 font14 fcor999 mart5">
2.请勿先付款后加油,若您已下单付款请于24小时内到加油站完成加油;若您48小时内未完成加油,请及时发起退单;逾期退单可能会退单失败</view>
<!-- 底部按钮 -->
<view class="footer">
<view class="width50 flleft fcoreb5 padleft15 font15">
合计: <text class="font24">0.00</text>
合计: <text class="font24">{{payprice}}</text>
</view>
<button class="reBtn flright">去支付</button>
<button class="reBtn flright" @click="orderToPay">去支付</button>
</view>
</view>
</template>
<script>
import {
getOrderById,
orderToPay
} from '../../../Utils/Api.js';
let app = getApp();
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
export default {
data() {
return {
orderNo: '',
couponId: '',
payprice: '',
orderList: '',
refulAdress: ''
}
},
onLoad(e) {
this.payprice = e.payprice;
this.orderNo = e.orderId;
this.couponId = e.couponId;
this.refulAdress = e.adres;
this.getOrderById();
},
methods: {
getOrderById() {
uni.showLoading({
title: '加载中...'
})
let params = {
orderId: this.orderNo,
}
getOrderById(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.orderList = res.return_data.highChildOrderList[0];
}
})
},
//
orderToPay() {
let that = this;
let params = {
"orderId": that.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
}
orderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
uni.showLoading({
title: '支付中...'
})
uni.requestPayment({
"appId": res.return_data.appId,
"nonceStr": res.return_data.nonceStr,
"package": res.return_data.package,
"paySign": res.return_data.sign,
"signType": "MD5",
"timeStamp": res.return_data.timeStamp,
success: function(res) {
uni.hideLoading();
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '/pages/goods/refuel-succes/refuel-succes?id=' + that
.orderNo
});
},
fail: function(err) {
uni.hideLoading();
},
});
// #endif
//
// #ifdef H5
//
that.payRequest(res);
// #endif
} else {
uni.showToast({
title: res.return_msg,
icon: 'none'
})
}
})
},
payRequest: function(self) {
uni.showLoading({
title: '支付中...'
})
jweixin.config({
// debug: true, // ,apialertpclogpc
appId: self.return_data.appId, //
timestamp: self.return_data.timeStamp, //
nonceStr: self.return_data.nonceStr, //
signature: self.return_data.sign, // 1
jsApiList: ['chooseWXPay'] // 使JSJS2
});
uni.hideLoading();
jweixin.ready(function() {
jweixin.checkJsApi({
jsApiList: ['chooseWXPay'], // JSJS2,
success: function(res) {},
fail: function(res) {}
});
jweixin.chooseWXPay({
appId: self.return_data.appId,
timestamp: self.return_data
.timeStamp, // jssdk使timestamp使timeStampS
nonceStr: self.return_data.nonceStr, // 32
package: self.return_data
.package, // prepay_idprepay_id=***
signType: 'MD5', // 'SHA1'使'MD5'
paySign: self.return_data.sign, //
success: function(res) {
//
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '/pages/goods/refuel-succes/refuel-succes?id=' + that
.orderNo
});
},
cancel: function(r) {},
fail: function(res) {}
});
});
jweixin.error(function(res) {
uni.showToast({
icon: 'none',
title: '支付失败了',
duration: 4000
});
// configerrorconfigdebugresSPA
/*alert("config信息验证失败");*/
});
},
}
}
</script>
@ -62,18 +201,22 @@
page {
background-color: #f7f7f7;
}
.conImg{
.conImg {
width: 100px;
height: 100px;
border-radius: 8px;
}
.conCont{
.conCont {
margin-left: 115px;
}
.slogan {
color: #807c87;
text-decoration: line-through;
}
.footer {
position: fixed;
bottom: 0upx;
@ -86,7 +229,8 @@
display: flex;
justify-content: space-between;
align-items: center;
.reBtn{
.reBtn {
width: 110px;
background-color: #089bf5;
color: #FFFFFF;

@ -7,7 +7,7 @@
<view class="width100 text1 font18 fontwig6 fcor333">{{storeList.gasName}}</view>
<view class="width100 font14 fcor666 mart5">{{storeList.gasAddress}}</view>
</view>
<view class="flright reimg fotct width20">
<view class="flright reimg fotct width20" @click="seeloaction">
<image mode="widthFix" src="../../../static/img/dhl.png"></image>
<view class="fcor089">{{storeList.distance}}km</view>
</view>
@ -65,15 +65,16 @@
<view class="width90 mart15 font16 fcor666">加油金额</view>
<view class="width90 height40 mart10" style="border: 1px solid #f2f2f2;">
<view class="width8 flleft"></view>
<input type="number" class="font16 width70 flleft height40" placeholder="请输入金额" v-model="inputPhone" />
<view class="width20 height40 flright font14 fcor999 fotct"
<input type="number" class="font16 width60 flleft height40" placeholder="请输入金额" v-model="inputMoney"
@blur="Listeningfocus" maxlength="5" />
<view class="width30 height40 flright font14 fcor999 fotct"
style="border-left: 1px solid #f2f2f2;line-height: 40px;">
0.01L
{{litre}}L
</view>
</view>
<view class="list width90">
<view class="box" v-for="(amount,index) in amountList" :key="index" @click="select(amount)"
:class="{'on':amount.id == inputAmount}">
:class="{'on':amount.price == inputMoney}">
<view class="heTitle fcor333" :class="{'fcor089':amount.id == inputAmount}">{{amount.price}}</view>
</view>
</view>
@ -81,9 +82,19 @@
<!-- 底部按钮 -->
<view class="footer">
<view class="width50 flleft fcor666 padleft15 font15">
合计: <text class="font24">0.00</text>
合计: <text class="font24">{{totalPrice}}</text>
</view>
<button class="reBtn flright">去支付</button>
<!-- #ifdef MP -->
<button class="reBtn flright" open-type="getPhoneNumber" v-if="user.phone == null"
@getphonenumber="getPhoneNumber">去支付</button>
<button class="reBtn flright" v-else @click="toPay">去支付</button>
<!-- #endif -->
<!-- #ifdef H5 -->
<button class="reBtn flright" v-if="user.phone == null" @click="jumpH5Bding">去支付</button>
<button class="reBtn flright" v-else @click="toPay">去支付</button>
<!-- #endif -->
</view>
<!-- 底部弹窗 -->
<wybPopup ref="popup" type="bottom" height="600" width="500" radius="6" :showCloseIcon="true">
@ -110,7 +121,8 @@
<script>
import {
getGasDetailByStoreKey
getGasDetailByStoreKey,
addOrder
} from '../../../Utils/Api.js';
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
let app = getApp();
@ -122,6 +134,7 @@
return {
detailList: [],
gunnumber: [],
user: '',
amountList: [{
id: '1',
price: '200'
@ -147,18 +160,36 @@
priceOfficial: '',
priceGun: '',
gunNo: '',
typeId: ''
typeId: '',
counId: '',
inputMoney: '',
gasOilNo: '',
litre: '',
totalPrice: '0.00'
}
},
onLoad(options) {
this.store_key = options.id;
this.counId = options.desId;
this.getGasDetailByStoreKey();
},
onShow() {
this.user = app.globalData.userInfo;
},
methods: {
//
seeloaction() {
uni.openLocation({
latitude: Number(this.storeList.gasAddressLatitude), //
longitude: Number(this.storeList.gasAddressLongitude), //
name: this.storeList.gasName,
address: this.storeList.gasAddress
})
},
//
showPopup(item) {
this.$refs.popup.show();
this.typeId = item;
this.$refs.popup.show();
},
//
getGasDetailByStoreKey() {
@ -182,7 +213,8 @@
this.gunnumber = res.return_data.gasGunList;
for (var i = 0; i < res.return_data.gasGunList.length; i++) {
if (this.oilNo == res.return_data.gasGunList[i].oilNoName) {
this.gunNo = res.return_data.gasGunList[i].gunNo
this.gunNo = res.return_data.gasGunList[i].gunNo;
this.gasOilNo = res.return_data.gasGunList[i].oilNo;
}
}
@ -193,6 +225,7 @@
//
changeValue(item) {
this.oilNo = item.oilNoName;
this.gasOilNo = item.oilNo;
this.priceVip = item.priceVip;
this.priceOfficial = item.priceOfficial;
this.priceGun = item.priceGun;
@ -204,7 +237,80 @@
this.$refs.popup.hide();
},
select(amount) {
this.inputAmount = amount.id;
this.inputMoney = amount.price;
this.litre = parseFloat(amount.price / this.priceGun).toFixed(2);
this.totalPrice = parseFloat(amount.price / this.priceGun * this.priceVip).toFixed(2);
},
//
getPhoneNumber(PhoneNumber) {
let params = {
openId: app.globalData.openId,
iv: PhoneNumber.detail.iv,
encryptedData: PhoneNumber.detail.encryptedData
}
GetPhoneNumber(params).then(res => {
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data
.object
.highUser;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
let that = this;
that.toPay();
}
});
},
// H5
jumpH5Bding() {
uni.navigateTo({
url: '/pages/login/register?id=2'
})
},
//
Listeningfocus() {
this.litre = parseFloat(this.inputMoney / this.priceGun).toFixed(2);
this.totalPrice = parseFloat(this.inputMoney / this.priceGun * this.priceVip).toFixed(2);
},
toPay() {
if (this.inputMoney == '' || this.inputMoney < 1) {
uni.showToast({
title: '请输入正确金额',
icon: "none"
});
return false;
}
uni.showLoading({
title: '提交订单中...'
})
let goods = {
"highChildOrderList": [{
"goodsType": 3,
"goodsId": this.counId,
"saleCount": 1,
"goodsPrice": this.inputMoney,
"gasGunNo": this.gunNo,
"gasOilNo": this.gasOilNo
}]
}
addOrder(goods).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.redirectTo({
url: '/pages/goods/refuel-confirm/refuel-confirm?payprice=' + res.return_data.payPrice + '&orderId=' + res.return_data.id + '&couponId=' + this.counId+'&adres='+this.storeList.gasAddress
})
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
});
}
})
},
}
}

@ -4,7 +4,7 @@
<image class="imageIcon mart15" src="../../../static/img/succes.png"></image>
<view class="fcorfff font15 mart10">已支付</view>
<view class="fcor333 font24 width90 height55 backcorfff mart20 fotct fontwig6">
<text class="font15"></text>499.27
<text class="font15"></text>{{orderInfo.payPrice}}
</view>
<view class="width90 height25">
<image class="width100 height25" style="height: 17px;" src="../../../static/img/suline1.png"></image>
@ -20,7 +20,7 @@
<text class="paddleft10">交易单号</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">342342342433</text>
<text class="paddtright10">{{orderInfo.orderNo}}</text>
</view>
</view>
@ -29,7 +29,7 @@
<text class="paddleft10">油站名称</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">发生发生范德萨发</text>
<text class="paddtright10">{{orderInfo.highChildOrderList[0].goodsName}}</text>
</view>
</view>
@ -38,7 +38,7 @@
<text class="paddleft10">下单时间</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">2021-02-23 12:23:34</text>
<text class="paddtright10">{{orderInfo.createTime | formatDate('-')}}</text>
</view>
</view>
@ -47,7 +47,7 @@
<text class="paddleft10">支付时间</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">2021-02-23 12:23:34</text>
<text class="paddtright10">{{orderInfo.payTime | formatDate('-')}}</text>
</view>
</view>
@ -56,7 +56,7 @@
<text class="paddleft10">加油金额</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">500.00</text>
<text class="paddtright10">{{orderInfo.totalPrice}}</text>
</view>
</view>
@ -65,7 +65,7 @@
<text class="paddleft10">立即优惠</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">0.73</text>
<text class="paddtright10">{{orderInfo.deductionPrice}}</text>
</view>
</view>
<view class="width90 font13 fcor999 mart10">
@ -75,14 +75,53 @@
</template>
<script>
import {
getOrderById
} from '../../../Utils/Api.js';
export default {
data() {
return {
orderInfo: '',
orderNo : ''
}
},
filters: {
//
formatDate: function(value, spe = '/') {
let data = new Date(value);
let year = data.getFullYear();
let month = data.getMonth() + 1;
let day = data.getDate();
let h = data.getHours();
let mm = data.getMinutes();
let s = data.getSeconds();
month = month >= 10 ? month : "0" + month;
day = day >= 10 ? day : "0" + day;
h = h >= 10 ? h : "0" + h;
mm = mm >= 10 ? mm : "0" + mm;
s = s >= 10 ? s : "0" + s;
return `${year}${spe}${month}${spe}${day} ${h}:${mm}:${s}`;
}
},
onLoad(options) {
this.orderNo = options.id;
this.getOrderById();
},
methods: {
getOrderById() {
uni.showLoading({
title: '加载中...'
})
let params = {
orderId: this.orderNo
}
getOrderById(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.orderInfo = res.return_data;
}
})
},
}
}
</script>

File diff suppressed because one or more lines are too long

@ -107,7 +107,7 @@
是否使用优惠券
</view>
<view class="content">
<switch color="#f06c7a" @change="switch2Change" checked="true" />
<switch color="#0083f5" @change="switch2Change" checked="true" />
</view>
</view>
@ -117,7 +117,7 @@
<view class="row" v-for="(item, index) in UserNormalDiscountList" :key="item.value">
<!-- 商品 -->
<view class="carrier">
<radio color="#f06c7a" :value="item.highDiscount.id" :checked="index === current" />
<radio color="#0083f5" :value="item.highDiscount.id" :checked="index === current" />
<!-- 商品信息 -->
<view class="goods-info">
<view class="img">
@ -481,7 +481,7 @@
height: 40upx;
.price {
color: #f06c7a;
color: #0083f5;
width: 30%;
}
@ -553,7 +553,7 @@
justify-content: flex-end;
.money {
color: #f06c7a;
color: #0083f5;
font-weight: 600;
}
}
@ -561,7 +561,7 @@
.btn {
padding: 0 30upx;
height: 60upx;
background-color: #f06c7a;
background-color: #0083f5;
color: #fff;
display: flex;
justify-content: center;
@ -591,7 +591,7 @@
.content {
font-size: 26upx;
color: #f06c7a;
color: #0083f5;
}
}
}
@ -721,4 +721,4 @@
}
}
}
</style>
</style>

@ -32,7 +32,7 @@
金币支付
</view>
<view class="right">
<radio :checked="paytype=='jinbi'" color="#f06c7a" />
<radio :checked="paytype=='jinbi'" color="#0083f5" />
</view>
</view>
<view class="row" @tap="paytype='wxpay'" v-if="pryType == 1 || pryType==3 ">
@ -43,7 +43,7 @@
微信支付
</view>
<view class="right">
<radio :checked="paytype=='wxpay'" color="#f06c7a" />
<radio :checked="paytype=='wxpay'" color="#0083f5" />
</view>
</view>
</view>
@ -350,7 +350,7 @@
justify-content: center;
align-items: center;
color: #fff;
background-color: #f06c7a;
background-color: #0083f5;
box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.2);
}
@ -368,4 +368,4 @@
}
}
}
</style>
</style>

@ -312,7 +312,7 @@
width: 35upx;
height: 35upx;
border-radius: 100%;
border: solid 2upx #f06c7a;
border: solid 2upx #0083f5;
display: flex;
justify-content: center;
align-items: center;
@ -320,7 +320,7 @@
width: 25upx;
height: 25upx;
border-radius: 100%;
background-color: #f06c7a;
background-color: #0083f5;
}
}
.text{
@ -542,8 +542,8 @@
bottom: 0upx;
z-index: 5;
.delBtn{
border: solid 1upx #f06c7a;
color: #f06c7a;
border: solid 1upx #0083f5;
color: #0083f5;
padding: 0 30upx;
height: 50upx;
border-radius: 30upx;
@ -569,7 +569,7 @@
.btn{
padding: 0 30upx;
height: 50upx;
background-color: #f06c7a;
background-color: #0083f5;
color: #fff;
display: flex;
justify-content: center;
@ -579,4 +579,4 @@
}
}
}
</style>
</style>

@ -3,8 +3,9 @@
<!-- 状态栏 -->
<view class="status" :style="{position:headerPosition}"></view>
<view class="header" :style="{position:headerPosition}">
<view class="addr">
<view class="icon location"></view>{{city}}
<view class="addr" @click="goPostion">
<!-- <view class="icon location"></view> -->
{{city}}<image mode="widthFix" style="width: 15px;" src="../../../static/img/jt.png"></image>
</view>
<view class="input-box">
<input placeholder="搜索卡券" placeholder-style="color:#c0c0c0;" @tap="toSearch()" />
@ -91,15 +92,20 @@
}
},
onLoad() {
this.postionIng();
},
onShow() {
this.categoryList = [];
this.MerchantList = [];
if (app.globalData.cityName != '') {
this.city = app.globalData.cityName;
this.getMerchantList();
}else{
this.postionIng();
}
},
methods: {
postionIng() {
uni.showLoading({
title: '加载中'
})
let that = this;
uni.getLocation({
type: 'wgs84',
@ -120,7 +126,6 @@
app.globalData.cityId = res.data.result.ad_info.adcode;
// app.globalData.cityId = '500100';
that.getMerchantList();
uni.hideLoading()
}
})
// #endif
@ -142,31 +147,28 @@
'');
app.globalData.cityId = res.result.ad_info.adcode;
vm.getMerchantList();
uni.hideLoading()
})
.catch(err => {
uni.hideLoading()
console.log(err);
});
},
//
getMerchantList() {
uni.showLoading({
title: '加载中...'
})
let params = {
regionId: app.globalData.cityId
}
getMerchantList(params).then(res => {
if (res.return_code == '000000') {
if (res.return_code == '000000' && res.return_data !='') {
this.MerchantList = res.return_data;
this.getStoreListByMerchant(res.return_data[0].id);
setTimeout(function() {
uni.hideLoading();
}, 2000);
} else {
uni.hideLoading()
this.MerchantList = [];
uni.showToast({
title: '暂无数据',
icon: 'none',
duration: 2000
})
}
})
},
@ -189,6 +191,12 @@
});
},
//
goPostion() {
uni.navigateTo({
url: '/pages/user/positioning/positioning'
})
},
//
getStoreListByMerchant(item) {
uni.showLoading({
@ -201,14 +209,11 @@
latitude: app.globalData.latitude
}
getStoreListByMerchant(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.categoryList = res.return_data
setTimeout(function() {
uni.hideLoading();
}, 2000);
} else {
this.categoryList = [];
uni.hideLoading()
}
})
@ -272,7 +277,7 @@
position: fixed;
top: 0;
z-index: 10;
background-color: #fff;
background-color: #0083f5;
/* #ifdef APP-PLUS */
top: var(--status-bar-height);
/* #endif */
@ -281,10 +286,10 @@
width: 120upx;
height: 60upx;
flex-shrink: 0;
color: #FFFFFF;
display: flex;
align-items: center;
font-size: 28upx;
.icon {
height: 60upx;
margin-right: 5upx;
@ -297,9 +302,9 @@
.input-box {
width: 100%;
height: 60upx;
background-color: #f5f5f5;
border-radius: 30upx;
height: 70rpx;
background-color: #f5f5f5;
border-radius: 10rpx;
position: relative;
display: flex;
align-items: center;
@ -406,7 +411,7 @@
width: 10upx;
height: 80%;
top: 10%;
background-color: #f06c7a;
background-color: #0083f5;
}
}
}
@ -465,4 +470,4 @@
}
}
}
</style>
</style>

@ -8,8 +8,8 @@
:style="{ position: headerPosition,top:headerTop,opacity: afterHeaderOpacity }">
<!-- 定位城市 -->
<view class="addr" @click="goPostion">
<view class="icon location"></view>
{{ city }}
<!-- <view class="icon location"></view> -->
{{ city }} <image mode="widthFix" style="width: 15px;" src="../../../static/img/jt.png"></image>
</view>
<!-- 搜索框 -->
<view class="input-box">
@ -58,8 +58,8 @@
<image class="mart30 width100" mode="widthFix" src="../../../static/img/headzq.png"></image>
</view>
<swiper class="orange-content" style="border: 2px solid #ff5836;" :display-multiple-items="productListleg">
<swiper-item class="swiper-hed" v-for="pro in productList" :key="product.id">
<view class="swiper-item" @tap="tapList" :data-id="pro.id">
<swiper-item class="swiper-hed" v-for="pro in productList" :key="pro.id" @click="toGoods(pro.id)">
<view class="swiper-item" :data-id="pro.id">
<image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit">
</image>
<view class="fotct fcor333 font14 text1 mart10">{{pro.couponName}}</view>
@ -74,8 +74,8 @@
</view>
<!-- v-if="goldproductList&&goldproductList.length>0" -->
<swiper class="orange-content" :display-multiple-items="goldproductListleg" next-margin="50rpx">
<swiper-item class="swiper-hed" v-for="(item,index) in goldproductList" :key="index">
<view class="swiper-item" @tap="tapList" :data-id="item.id">
<swiper-item class="swiper-hed" v-for="(item,index) in goldproductList" :key="index" @click="toGoods(item.id)">
<view class="swiper-item" :data-id="item.id">
<image class="img" :src="imageUrl+item.couponImg" mode="aspectFit"></image>
<view class="fotct fcor333 font14 text1 mart10">{{item.couponName}}</view>
<view class="subject fotct mart5">{{ item.discountPrice}}</view>
@ -84,7 +84,7 @@
</swiper>
<!-- 分期 -->
<view style="width: 90%;margin-left: 5%;">
<!-- <view style="width: 90%;margin-left: 5%;">
<image class="mart30 width100" mode="widthFix" src="../../../static/img/fqhed.png"></image>
</view>
<swiper class="orange-content" :display-multiple-items="productListleg">
@ -97,13 +97,13 @@
</view>
</swiper-item>
</swiper>
-->
<!-- 广告图 -->
<!-- <view class="banner" @click="tao">
<image src="/static/img/banner.jpg"></image>
</view> -->
<!-- 商品列表 -->
<view class="goods-list">
<!-- <view class="goods-list">
<view :class="[cpStuats == 1?'active_tie':'title']" @click="eheckStu(1)">
猜你喜欢
</view>
@ -130,7 +130,7 @@
</view>
</view>
</view>
</view>
</view> -->
<!-- <view class="goods-list">
<view class="title">
@ -163,7 +163,7 @@
</view>
</view>
</view> -->
<view class="height60"></view>
</view>
</template>
@ -212,23 +212,23 @@
categoryList: [{
id: 1,
name: '团油',
img: '/static/img/wxpay.png',
img: '/static/img/user/momey.png',
src: '/pages/goods/refuel/refuel'
},
{
id: 2,
name: '电',
img: '/static/img/wxpay.png'
name: '电影票',
img: '/static/img/user/momey.png'
},
{
id: 3,
name: '服饰',
img: '/static/img/wxpay.png'
name: '肯德基',
img: '/static/img/user/momey.png'
},
{
id: 4,
name: '日用',
img: '/static/img/wxpay.png'
name: '话费充值',
img: '/static/img/user/momey.png'
}
],
//
@ -248,6 +248,11 @@
this.getH5AccessToken(arr2[1]);
}
// #endif
if (app.globalData.cityName != '') {
this.city = app.globalData.cityName;
this.getCouponListArea();
this.getCouponListgold();
}
},
onLoad() {
// 1.wxcode
@ -317,6 +322,8 @@
success: function(res) {
that.city = res.data.result.address_component.city.replace(/市/g,
'');
app.globalData.cityName = res.data.result.address_component.city
.replace(/市/g, '');
app.globalData.cityId = res.data.result.ad_info.adcode;
// app.globalData.cityId = '500100';
that.getCouponListArea();
@ -395,8 +402,8 @@
location: locationObj
})
.then(res => {
vm.city = res.result.address_component.city.replace(/市/g,
'');
vm.city = res.result.address_component.city.replace(/市/g, '');
app.globalData.cityName = res.result.address_component.city.replace(/市/g, '');
app.globalData.cityId = res.result.ad_info.adcode;
vm.getCouponListArea();
vm.getCouponListgold();
@ -414,11 +421,17 @@
})
},
//
goPostion(){
goPostion() {
uni.navigateTo({
url:'/pages/user/positioning/positioning'
url: '/pages/user/positioning/positioning'
})
},
//
toGoods(e) {
uni.navigateTo({
url: '../../goods/goods?id='+e
});
},
//
toScan() {
uni.scanCode({
@ -503,10 +516,17 @@
},
//
toCategory(item) {
uni.navigateTo({
url: item.src
})
if(item.name == '团油'){
uni.navigateTo({
url: item.src
})
}else{
uni.showToast({
title: '暂未开通',
icon: 'none',
duration: 2000
})
}
}
}
};
@ -591,9 +611,9 @@
.input-box {
width: 100%;
height: 60upx;
height: 70rpx;
background-color: #f5f5f5;
border-radius: 30upx;
border-radius: 10rpx;
position: relative;
display: flex;
align-items: center;
@ -761,7 +781,7 @@
view {
height: 30upx;
background-color: #f06c7a;
background-color: #0083f5;
display: flex;
justify-content: center;
align-items: center;
@ -964,7 +984,7 @@
}
.orange-content {
height: 160px;
height: 170px;
width: 90%;
margin-left: 5%;
border-radius: 0 0 10px 10px;
@ -1004,4 +1024,4 @@
color: #777;
font-size: 28rpx;
}
</style>
</style>

@ -53,7 +53,7 @@
<view class="title">我的订单</view>
<view class="list">
<view class="box" v-for="(row,index) in orderList" :key="index" @tap="toOrderList(index)">
<uni-badge style="width: 20px;position: absolute; left: 20%;" v-if="row.text == '待支付' && therrNum "
<uni-badge style="width: 20px;position: absolute; left: 15%;" v-if="row.text == '待支付' && therrNum "
:text="therrNum" type="error" size="normal"></uni-badge>
<view class="img">
<view class="icon" :class="row.icon"></view>
@ -149,15 +149,13 @@
{
text: '已完成',
icon: "shouhuo"
},
// {
// text: '退',
// icon: "pingjia"
// },
{
},{
text: '已退款',
icon: "tuihuo"
},{
text: '已取消',
icon: "pingjia"
},
}
],
//
mytoolbarList: [{
@ -196,12 +194,13 @@
url: '../../login/login?id=2',
text: '我的推广',
img: '/static/img/user/renw.png'
},
{
url: '/pages/user/Charge/Charge',
text: '充话费',
img: '/static/img/user/bank.png'
}
// ,
// {
// url: '/pages/user/Charge/Charge',
// text: '',
// img: '/static/img/user/bank.png'
// }
]
}
},
@ -371,7 +370,7 @@
height: 0;
position: fixed;
z-index: 10;
background-color: #f06c7a;
background-color: #0083f5;
top: 0;
/* #ifdef APP-PLUS */
height: var(--status-bar-height);//
@ -389,7 +388,7 @@
position: fixed;
top: 0;
z-index: 10;
background-color: #f06c7a;
background-color: #0083f5;
/* #ifdef APP-PLUS */
top: var(--status-bar-height);
/* #endif */
@ -419,7 +418,7 @@
height: 0;
position: fixed;
z-index: 10;
background-color: #f06c7a;
background-color: #0083f5;
top: 0;
/* #ifdef APP-PLUS */
height: var(--status-bar-height); //
@ -437,7 +436,7 @@
position: fixed;
top: 0;
z-index: 10;
background-color: #f06c7a;
background-color: #0083f5;
/* #ifdef APP-PLUS */
top: var(--status-bar-height);
@ -461,7 +460,7 @@
}
.place {
background-color: #f06c7a;
background-color: #0083f5;
padding-left: 20px;
padding-right: 20px;
text-align: right;
@ -486,7 +485,7 @@
display: flex;
align-items: center;
// position: relative;
background-color: #f06c7a;
background-color: #0083f5;
padding-bottom: 40rpx;
.left {
@ -728,4 +727,4 @@
}
}
}
</style>
</style>

@ -125,9 +125,9 @@
box-shadow: 0upx 5upx 20upx rgba(0,0,0,0.05);
font-size: 36upx;
background-color: #f1f1f1;
color: #f06c7a;
color: #0083f5;
&.on{
background-color: #f06c7a;
background-color: #0083f5;
color: #ffffff;
}
}
@ -161,7 +161,7 @@
margin: 0 20upx;
height: 60upx;
font-size: 30upx;
color: #f06c7a;
color: #0083f5;
justify-content: flex-end;
align-items: center;
}
@ -214,7 +214,7 @@
justify-content: center;
align-items: center;
color: #fff;
background-color: #f06c7a;
background-color: #0083f5;
box-shadow: 0upx 5upx 10upx rgba(0,0,0,0.2);
}
.tis{

@ -1,239 +1,239 @@
<template>
<view>
<view class="content">
<view class="list">
<view class="row" v-for="(row,index) in addressList" :key="index" @tap="select(row)">
<view class="left">
<view class="head">
{{row.head}}
</view>
</view>
<view class="center">
<view class="name-tel">
<view class="name">{{row.name}}</view>
<view class="tel">{{row.tel}}</view>
<view class="default" v-if="row.isDefault">
默认
</view>
</view>
<view class="address">
{{row.address.region.label}} {{row.address.detailed}}
</view>
</view>
<view class="right">
<view class="icon bianji" @tap.stop="edit(row)">
</view>
</view>
</view>
</view>
</view>
<view class="add">
<view class="btn" @tap="add">
<view class="icon tianjia"></view>新增地址
</view>
<view class="content">
<view class="list">
<view class="row" v-for="(row,index) in addressList" :key="index" @tap="select(row)">
<view class="left">
<view class="head">
{{row.head}}
</view>
</view>
<view class="center">
<view class="name-tel">
<view class="name">{{row.name}}</view>
<view class="tel">{{row.tel}}</view>
<view class="default" v-if="row.isDefault">
默认
</view>
</view>
<view class="address">
{{row.address.region.label}} {{row.address.detailed}}
</view>
</view>
<view class="right">
<view class="icon bianji" @tap.stop="edit(row)">
</view>
</view>
</view>
</view>
</view>
<view class="add">
<view class="btn" @tap="add">
<view class="icon tianjia"></view>新增地址
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
return {
isSelect:false,
addressList:[
{id:1,name:"大黑哥",head:"大",tel:"18816881688",address:{region:{"label":"广东省-深圳市-福田区","value":[18,2,1],"cityCode":"440304"},detailed:'深南大道1111号无名摩登大厦6楼A2'},isDefault:true},
{id:2,name:"大黑哥",head:"大",tel:"15812341234",address:{region:{"label":"广东省-深圳市-福田区","value":[18,2,1],"cityCode":"440304"},detailed:'深北小道2222号有名公寓502'},isDefault:false},
{id:3,name:"老大哥",head:"老",tel:"18155467897",address:{region:{"label":"广东省-深圳市-福田区","value":[18,2,1],"cityCode":"440304"},detailed:'深南大道1111号无名摩登大厦6楼A2'},isDefault:false},
{id:4,name:"王小妹",head:"王",tel:"13425654895",address:{region:{"label":"广东省-深圳市-福田区","value":[18,2,1],"cityCode":"440304"},detailed:'深南大道1111号无名摩登大厦6楼A2'},isDefault:false},
addressList:[
{id:1,name:"大黑哥",head:"大",tel:"18816881688",address:{region:{"label":"广东省-深圳市-福田区","value":[18,2,1],"cityCode":"440304"},detailed:'深南大道1111号无名摩登大厦6楼A2'},isDefault:true},
{id:2,name:"大黑哥",head:"大",tel:"15812341234",address:{region:{"label":"广东省-深圳市-福田区","value":[18,2,1],"cityCode":"440304"},detailed:'深北小道2222号有名公寓502'},isDefault:false},
{id:3,name:"老大哥",head:"老",tel:"18155467897",address:{region:{"label":"广东省-深圳市-福田区","value":[18,2,1],"cityCode":"440304"},detailed:'深南大道1111号无名摩登大厦6楼A2'},isDefault:false},
{id:4,name:"王小妹",head:"王",tel:"13425654895",address:{region:{"label":"广东省-深圳市-福田区","value":[18,2,1],"cityCode":"440304"},detailed:'深南大道1111号无名摩登大厦6楼A2'},isDefault:false},
]
};
},
onShow() {
uni.getStorage({
key:'delAddress',
success: (e) => {
let len = this.addressList.length;
if(e.data.hasOwnProperty('id')){
for(let i=0;i<len;i++){
if(this.addressList[i].id==e.data.id){
this.addressList.splice(i,1);
break;
}
}
}
uni.removeStorage({
key:'delAddress'
})
}
})
uni.getStorage({
key:'saveAddress',
success: (e) => {
let len = this.addressList.length;
if(e.data.hasOwnProperty('id')){
for(let i=0;i<len;i++){
if(this.addressList[i].id==e.data.id){
this.addressList.splice(i,1,e.data);
break;
}
}
}else{
let lastid = this.addressList[len-1];
lastid++;
e.data.id = lastid;
this.addressList.push(e.data);
}
uni.removeStorage({
key:'saveAddress'
})
}
})
},
onLoad(e) {
if(e.type=='select'){
this.isSelect = true;
}
},
methods:{
edit(row){
uni.setStorage({
key:'address',
data:row,
success() {
uni.navigateTo({
url:"edit/edit?type=edit"
})
}
});
},
add(){
uni.navigateTo({
url:"edit/edit?type=add"
})
},
select(row){
//()
if(!this.isSelect){
return ;
}
uni.setStorage({
key:'selectAddress',
data:row,
success() {
uni.navigateBack();
}
})
}
},
onShow() {
uni.getStorage({
key:'delAddress',
success: (e) => {
let len = this.addressList.length;
if(e.data.hasOwnProperty('id')){
for(let i=0;i<len;i++){
if(this.addressList[i].id==e.data.id){
this.addressList.splice(i,1);
break;
}
}
}
uni.removeStorage({
key:'delAddress'
})
}
})
uni.getStorage({
key:'saveAddress',
success: (e) => {
let len = this.addressList.length;
if(e.data.hasOwnProperty('id')){
for(let i=0;i<len;i++){
if(this.addressList[i].id==e.data.id){
this.addressList.splice(i,1,e.data);
break;
}
}
}else{
let lastid = this.addressList[len-1];
lastid++;
e.data.id = lastid;
this.addressList.push(e.data);
}
uni.removeStorage({
key:'saveAddress'
})
}
})
},
onLoad(e) {
if(e.type=='select'){
this.isSelect = true;
}
},
methods:{
edit(row){
uni.setStorage({
key:'address',
data:row,
success() {
uni.navigateTo({
url:"edit/edit?type=edit"
})
}
});
},
add(){
uni.navigateTo({
url:"edit/edit?type=add"
})
},
select(row){
//()
if(!this.isSelect){
return ;
}
uni.setStorage({
key:'selectAddress',
data:row,
success() {
uni.navigateBack();
}
})
}
}
}
</script>
<style lang="scss">
view{
display: flex;
<style lang="scss">
view{
display: flex;
}
.icon {
// &.bianji {
// &:before{content:"\e61b";}
// }
// &.tianjia {
// &:before{content:"\e81a";}
// }
}
.add{
position: fixed;
bottom: 0;
width: 100%;
height: 120upx;
justify-content: center;
align-items: center;
.btn{
box-shadow: 0upx 5upx 10upx rgba(0,0,0,0.4);
width: 70%;
height: 80upx;
border-radius: 80upx;
background-color: #f06c7a;
color: #fff;
justify-content: center;
align-items: center;
.icon{
height: 80upx;
color: #fff;
font-size: 30upx;
justify-content: center;
align-items: center;
}
font-size: 30upx;
}
}
.list{
flex-wrap: wrap;
.row{
width: 96%;
padding: 20upx 2%;
.left{
width: 90upx;
flex-shrink: 0;
align-items: center;
.head{
width: 70upx;
height: 70upx;
background:linear-gradient(to right,#ccc,#aaa);
color: #fff;
justify-content: center;
align-items: center;
border-radius: 60upx;
font-size: 35upx;
}
}
.center{
width: 100%;
flex-wrap: wrap;
.name-tel{
width: 100%;
align-items: baseline;
.name{
font-size: 34upx;
}
.tel{
margin-left: 30upx;
font-size: 24upx;
color: #777;
}
.default{
font-size: 22upx;
background-color: #f06c7a;
color: #fff;
padding: 0 18upx;
border-radius: 24upx;
margin-left: 20upx;
}
}
.address{
width: 100%;
font-size: 24upx;
align-items: baseline;
color: #777;
}
}
.right{
flex-shrink: 0;
align-items: center;
margin-left: 20upx;
.icon{
justify-content: center;
align-items: center;
width: 80upx;
height: 60upx;
border-left: solid 1upx #aaa;
font-size: 40upx;
color: #777;
}
}
}
.icon {
// &.bianji {
// &:before{content:"\e61b";}
// }
// &.tianjia {
// &:before{content:"\e81a";}
// }
}
.add{
position: fixed;
bottom: 0;
width: 100%;
height: 120upx;
justify-content: center;
align-items: center;
.btn{
box-shadow: 0upx 5upx 10upx rgba(0,0,0,0.4);
width: 70%;
height: 80upx;
border-radius: 80upx;
background-color: #0083f5;
color: #fff;
justify-content: center;
align-items: center;
.icon{
height: 80upx;
color: #fff;
font-size: 30upx;
justify-content: center;
align-items: center;
}
font-size: 30upx;
}
}
.list{
flex-wrap: wrap;
.row{
width: 96%;
padding: 20upx 2%;
.left{
width: 90upx;
flex-shrink: 0;
align-items: center;
.head{
width: 70upx;
height: 70upx;
background:linear-gradient(to right,#ccc,#aaa);
color: #fff;
justify-content: center;
align-items: center;
border-radius: 60upx;
font-size: 35upx;
}
}
.center{
width: 100%;
flex-wrap: wrap;
.name-tel{
width: 100%;
align-items: baseline;
.name{
font-size: 34upx;
}
.tel{
margin-left: 30upx;
font-size: 24upx;
color: #777;
}
.default{
font-size: 22upx;
background-color: #0083f5;
color: #fff;
padding: 0 18upx;
border-radius: 24upx;
margin-left: 20upx;
}
}
.address{
width: 100%;
font-size: 24upx;
align-items: baseline;
color: #777;
}
}
.right{
flex-shrink: 0;
align-items: center;
margin-left: 20upx;
.icon{
justify-content: center;
align-items: center;
width: 80upx;
height: 60upx;
border-left: solid 1upx #aaa;
font-size: 40upx;
color: #777;
}
}
}
}
</style>

@ -1,261 +1,261 @@
<template>
<view>
<view class="content">
<view class="row">
<view class="nominal">
收件人
</view>
<view class="input">
<input placeholder="请输入收件人姓名" type="text" v-model="name" />
</view>
</view>
<view class="row">
<view class="nominal">
电话号码
</view>
<view class="input">
<input placeholder="请输入收件人电话号码" type="text" v-model="tel" />
</view>
</view>
<view class="row">
<view class="nominal">
所在地区
</view>
<view class="input" @tap="chooseCity">
{{region.label}}
</view>
</view>
<view class="row">
<view class="nominal">
详细地址
</view>
<view class="input">
<textarea v-model="detailed" auto-height="true" placeholder="输入详细地址"></textarea>
</view>
</view>
<view class="row">
<view class="nominal">
设置默认地址
</view>
<view class="input switch">
<switch color="#f06c7a" :checked="isDefault" @change=isDefaultChange />
</view>
</view>
<view class="row" v-if="editType=='edit'" @tap="del">
<view class="del">
删除收货地址
</view>
</view>
<view>
<view class="content">
<view class="row">
<view class="nominal">
收件人
</view>
<view class="input">
<input placeholder="请输入收件人姓名" type="text" v-model="name" />
</view>
</view>
<view class="row">
<view class="nominal">
电话号码
</view>
<view class="input">
<input placeholder="请输入收件人电话号码" type="text" v-model="tel" />
</view>
</view>
<view class="row">
<view class="nominal">
所在地区
</view>
<view class="input" @tap="chooseCity">
{{region.label}}
</view>
</view>
<view class="row">
<view class="nominal">
详细地址
</view>
<view class="input">
<textarea v-model="detailed" auto-height="true" placeholder="输入详细地址"></textarea>
</view>
</view>
<view class="row">
<view class="nominal">
设置默认地址
</view>
<view class="input switch">
<switch color="#0083f5" :checked="isDefault" @change=isDefaultChange />
</view>
</view>
<view class="row" v-if="editType=='edit'" @tap="del">
<view class="del">
删除收货地址
</view>
</view>
</view>
<view class="save" @tap="save">
<view class="btn">
保存地址
</view>
</view>
<view class="save" @tap="save">
<view class="btn">
保存地址
</view>
</view>
<mpvue-city-picker :themeColor="themeColor" ref="mpvueCityPicker" :pickerValueDefault="cityPickerValue" @onCancel="onCancel" @onConfirm="onConfirm"></mpvue-city-picker>
</view>
</template>
<script>
import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
export default {
components: {
mpvueCityPicker
},
data() {
return {
editType:'edit',
id:'',
name:'',
tel:'',
detailed:'',
isDefault:false,
cityPickerValue: [0, 0, 1],
themeColor: '#007AFF',
region:{label:"请点击选择地址",value:[],cityCode:""}
};
},
methods: {
onCancel(e) {
console.log(e)
},
chooseCity() {
this.$refs.mpvueCityPicker.show()
},
onConfirm(e) {
this.region = e;
this.cityPickerValue = e.value;
},
isDefaultChange(e){
this.isDefault = e.detail.value;
},
del(){
uni.showModal({
title: '删除提示',
content: '你将删除这个收货地址',
success: (res)=>{
if (res.confirm) {
uni.setStorage({
key:'delAddress',
data:{id:this.id},
success() {
uni.navigateBack();
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
save(){
let data={"name":this.name,"head":this.name.substr(0,1),"tel":this.tel,"address":{"region":this.region,"detailed":this.detailed},"isDefault":this.isDefault}
if(this.editType=='edit'){
data.id = this.id
}
if(!data.name){
uni.showToast({title:'请输入收件人姓名',icon:'none'});
return ;
}
if(!data.tel){
uni.showToast({title:'请输入收件人电话号码',icon:'none'});
return ;
}
if(!data.address.detailed){
uni.showToast({title:'请输入收件人详细地址',icon:'none'});
return ;
}
if(data.address.region.value.length==0){
uni.showToast({title:'请选择收件地址',icon:'none'});
return ;
}
uni.showLoading({
title:'正在提交'
})
//ajax,
setTimeout(()=>{
uni.setStorage({
key:'saveAddress',
data:data,
success() {
uni.hideLoading();
uni.navigateBack();
}
})
},300)
}
},
onLoad(e) {
//
this.editType = e.type;
if(e.type=='edit'){
uni.getStorage({
key:'address',
success: (e) => {
this.id = e.data.id;
this.name = e.data.name;
this.tel = e.data.tel;
this.detailed = e.data.address.detailed;
this.isDefault = e.data.isDefault;
this.cityPickerValue = e.data.address.region.value;
this.region = e.data.address.region;
}
})
}
},
onBackPress() {
if (this.$refs.mpvueCityPicker.showPicker) {
this.$refs.mpvueCityPicker.pickerCancel();
return true;
}
},
onUnload() {
if (this.$refs.mpvueCityPicker.showPicker) {
this.$refs.mpvueCityPicker.pickerCancel()
}
}
<script>
import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
export default {
components: {
mpvueCityPicker
},
data() {
return {
editType:'edit',
id:'',
name:'',
tel:'',
detailed:'',
isDefault:false,
cityPickerValue: [0, 0, 1],
themeColor: '#007AFF',
region:{label:"请点击选择地址",value:[],cityCode:""}
};
},
methods: {
onCancel(e) {
console.log(e)
},
chooseCity() {
this.$refs.mpvueCityPicker.show()
},
onConfirm(e) {
this.region = e;
this.cityPickerValue = e.value;
},
isDefaultChange(e){
this.isDefault = e.detail.value;
},
del(){
uni.showModal({
title: '删除提示',
content: '你将删除这个收货地址',
success: (res)=>{
if (res.confirm) {
uni.setStorage({
key:'delAddress',
data:{id:this.id},
success() {
uni.navigateBack();
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
save(){
let data={"name":this.name,"head":this.name.substr(0,1),"tel":this.tel,"address":{"region":this.region,"detailed":this.detailed},"isDefault":this.isDefault}
if(this.editType=='edit'){
data.id = this.id
}
if(!data.name){
uni.showToast({title:'请输入收件人姓名',icon:'none'});
return ;
}
if(!data.tel){
uni.showToast({title:'请输入收件人电话号码',icon:'none'});
return ;
}
if(!data.address.detailed){
uni.showToast({title:'请输入收件人详细地址',icon:'none'});
return ;
}
if(data.address.region.value.length==0){
uni.showToast({title:'请选择收件地址',icon:'none'});
return ;
}
uni.showLoading({
title:'正在提交'
})
//ajax,
setTimeout(()=>{
uni.setStorage({
key:'saveAddress',
data:data,
success() {
uni.hideLoading();
uni.navigateBack();
}
})
},300)
}
},
onLoad(e) {
//
this.editType = e.type;
if(e.type=='edit'){
uni.getStorage({
key:'address',
success: (e) => {
this.id = e.data.id;
this.name = e.data.name;
this.tel = e.data.tel;
this.detailed = e.data.address.detailed;
this.isDefault = e.data.isDefault;
this.cityPickerValue = e.data.address.region.value;
this.region = e.data.address.region;
}
})
}
},
onBackPress() {
if (this.$refs.mpvueCityPicker.showPicker) {
this.$refs.mpvueCityPicker.pickerCancel();
return true;
}
},
onUnload() {
if (this.$refs.mpvueCityPicker.showPicker) {
this.$refs.mpvueCityPicker.pickerCancel()
}
}
};
</script>
<style lang="scss">
<style lang="scss">
.save{
view{
display: flex;
}
position: fixed;
bottom: 0;
width: 100%;
height: 120upx;
display: flex;
justify-content: center;
align-items: center;
.btn{
box-shadow: 0upx 5upx 10upx rgba(0,0,0,0.4);
width: 70%;
height: 80upx;
border-radius: 80upx;
background-color: #f06c7a;
color: #fff;
justify-content: center;
align-items: center;
.icon{
height: 80upx;
color: #fff;
font-size: 30upx;
justify-content: center;
align-items: center;
}
font-size: 30upx;
}
}
.content{
display: flex;
flex-wrap: wrap;
view{
display: flex;
}
.row{
width: 94%;
margin: 0 3%;
border-top: solid 1upx #eee;
.nominal{
width: 30%;
height: 120upx;
font-weight: 200;
font-size: 30upx;
align-items: center;
}
.input{
width: 70%;
padding: 20upx 0;
align-items: center;
font-size: 30upx;
&.switch{
justify-content: flex-end;
}
.textarea{
margin: 20upx 0;
min-height: 120upx;
}
}
.del{
width: 100%;
height: 100upx;
justify-content: center;
align-items: center;
font-size: 36upx;
color: #f06c7a;
background-color: rgba(255,0,0,0.05);
border-bottom: solid 1upx #eee;
}
}
}
.save{
view{
display: flex;
}
position: fixed;
bottom: 0;
width: 100%;
height: 120upx;
display: flex;
justify-content: center;
align-items: center;
.btn{
box-shadow: 0upx 5upx 10upx rgba(0,0,0,0.4);
width: 70%;
height: 80upx;
border-radius: 80upx;
background-color: #0083f5;
color: #fff;
justify-content: center;
align-items: center;
.icon{
height: 80upx;
color: #fff;
font-size: 30upx;
justify-content: center;
align-items: center;
}
font-size: 30upx;
}
}
.content{
display: flex;
flex-wrap: wrap;
view{
display: flex;
}
.row{
width: 94%;
margin: 0 3%;
border-top: solid 1upx #eee;
.nominal{
width: 30%;
height: 120upx;
font-weight: 200;
font-size: 30upx;
align-items: center;
}
.input{
width: 70%;
padding: 20upx 0;
align-items: center;
font-size: 30upx;
&.switch{
justify-content: flex-end;
}
.textarea{
margin: 20upx 0;
min-height: 120upx;
}
}
.del{
width: 100%;
height: 100upx;
justify-content: center;
align-items: center;
font-size: 36upx;
color: #0083f5;
background-color: rgba(255,0,0,0.05);
border-bottom: solid 1upx #eee;
}
}
}
</style>

@ -43,10 +43,10 @@
let datas = {
"code": res.result
}
useCouponCode(datas).then(res => {
useCouponCode(datas).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title: res.return_data,
title: res.return_data,
duration: 2000
})
} else {
@ -90,11 +90,11 @@
align-items: center;
&.on {
color: #f06c7a;
border-bottom: solid 4upx #f06c7a;
color: #0083f5;
border-bottom: solid 4upx #0083f5;
}
}
}
}
</style>
</style>

@ -350,12 +350,12 @@
}
.on {
color: #f06c7a;
color: #0083f5;
}
.border {
height: 4upx;
background-color: #f06c7a;
background-color: #0083f5;
transition: all .3s ease-out;
&.invalid {
@ -620,4 +620,4 @@
* */
}
}
</style>
</style>

@ -44,7 +44,7 @@
支付宝支付
</view>
<view class="right">
<radio :checked="paytype=='alipay'" color="#f06c7a" />
<radio :checked="paytype=='alipay'" color="#0083f5" />
</view>
</view> -->
<view class="row" @tap="paytype='wxpay'">
@ -55,7 +55,7 @@
微信支付
</view>
<view class="right">
<radio :checked="paytype=='wxpay'" color="#f06c7a" />
<radio :checked="paytype=='wxpay'" color="#0083f5" />
</view>
</view>
</view>
@ -285,7 +285,7 @@
color: 333;
&.on {
background-color: #f06c7a;
background-color: #0083f5;
color: #fff;
}
}
@ -313,7 +313,7 @@
margin: 0 20upx;
height: 60upx;
font-size: 30upx;
color: #f06c7a;
color: #0083f5;
justify-content: flex-end;
align-items: center;
}
@ -374,7 +374,7 @@
justify-content: center;
align-items: center;
color: #fff;
background-color: #f06c7a;
background-color: #0083f5;
box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.2);
}
@ -392,4 +392,4 @@
}
}
}
</style>
</style>

@ -228,11 +228,11 @@
color: #999;
}
.on{
color: #f06c7a;
color: #0083f5;
}
.border{
height: 4upx;
background-color: #f06c7a;
background-color: #0083f5;
transition: all .3s ease-out;
&.shop{
transform: translate3d(100%,0,0);
@ -383,7 +383,7 @@
}
.price{
font-size: 30upx;
color: #f06c7a;
color: #0083f5;
}
}
}
@ -393,4 +393,4 @@
}
}
</style>
</style>

@ -167,8 +167,8 @@
align-items: center;
&.on {
color: #f06c7a;
border-bottom: solid 4upx #f06c7a;
color: #0083f5;
border-bottom: solid 4upx #0083f5;
}
}
}
@ -225,4 +225,4 @@
}
}
}
</style>
</style>

@ -160,7 +160,7 @@
width: 15px;
height: 2px;
margin-top: 8px;
background-color: #f06c7a;
background-color: #0083f5;
transform: rotate(100deg);
}
@ -173,7 +173,7 @@
width: 10px;
margin-top: 8px;
height: 2px;
background-color: #f06c7a;
background-color: #0083f5;
transform: rotate(100deg);
}

@ -1,19 +1,19 @@
<template>
<view>
<view class="block">
</view>
<!-- <view class="QR">
<image src="../../../static/img/qr.png"></image>
</view> -->
<view class="title">
扫描二维码加我好友
</view>
<view class="btn" v-show="showBtn" @tap="printscreen">
{{tis}}
</view>
<!-- <view class="logo">
<image mode="widthFix" src="../../../static/img/qrlogo.png"></image>
<view class="block">
</view>
<!-- <view class="QR">
<image src="../../../static/img/qr.png"></image>
</view> -->
<view class="title">
扫描二维码加我好友
</view>
<view class="btn" v-show="showBtn" @tap="printscreen">
{{tis}}
</view>
<!-- <view class="logo">
<image mode="widthFix" src="../../../static/img/qrlogo.png"></image>
</view> -->
</view>
</template>
@ -21,110 +21,110 @@
<script>
export default {
data() {
return {
return {
tis:"保存到相册",
showBtn:false
};
},
onLoad() {
// #ifdef APP-PLUS
this.showBtn = true;
// #endif
},
methods:{
// webviewBitmap
printscreen(){
this.tis = "正在保存"
let ws=this.$mp.page.$getAppWebview();
let bitmap = new plus.nativeObj.Bitmap();
this.showBtn = false;
this.$nextTick(function(){
setTimeout(()=>{
ws.draw(bitmap,(e)=>{
this.showBtn = true;
console.log('bitmap绘制图片成功');
console.log("e: " + JSON.stringify(e));
bitmap.save("_doc/Qr.jpg", {
overwrite: true,
quality: 100
}, (i)=>{
plus.gallery.save(i.target,(e)=>{
uni.showToast({
title:'保存成功'
})
this.tis = "保存到相册"
bitmap.clear(); //
},(e)=>{
bitmap.clear(); //
});
},(e)=>{
console.log('保存图片失败:' + JSON.stringify(e));
});
},(e)=>{
console.log('bitmap绘制图片失败:'+JSON.stringify(e));
});
},200)
})
}
},
onLoad() {
// #ifdef APP-PLUS
this.showBtn = true;
// #endif
},
methods:{
// webviewBitmap
printscreen(){
this.tis = "正在保存"
let ws=this.$mp.page.$getAppWebview();
let bitmap = new plus.nativeObj.Bitmap();
this.showBtn = false;
this.$nextTick(function(){
setTimeout(()=>{
ws.draw(bitmap,(e)=>{
this.showBtn = true;
console.log('bitmap绘制图片成功');
console.log("e: " + JSON.stringify(e));
bitmap.save("_doc/Qr.jpg", {
overwrite: true,
quality: 100
}, (i)=>{
plus.gallery.save(i.target,(e)=>{
uni.showToast({
title:'保存成功'
})
this.tis = "保存到相册"
bitmap.clear(); //
},(e)=>{
bitmap.clear(); //
});
},(e)=>{
console.log('保存图片失败:' + JSON.stringify(e));
});
},(e)=>{
console.log('bitmap绘制图片失败:'+JSON.stringify(e));
});
},200)
})
}
}
}
</script>
<style lang="scss">
page{
background-color: #f06c7a;
}
.block{
width: 100%;
height: 30vh;
background-color: #fff;
display: flex;
justify-content: center;
}
.QR{
width: 60vw;
height: 60vw;
margin: -40vw auto 0 auto;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
image{
width: 50vw;
height: 50vw;
}
}
.title{
width: 100%;
margin-top: 50upx;
display: flex;
justify-content: center;
font-size: 36upx;
color: #fff;
}
.btn{
width: 50%;
height: 80upx;
border-radius: 80upx;
display: flex;
justify-content: center;
align-items: center;
padding: 0 20upx;
margin: 0 auto;
margin-top: 50upx;
background-color: rgba(255,255,255,.8);
}
.logo{
width: 100%;
display: flex;
justify-content: center;
position: absolute;
bottom: 25upx;
image{
width: 39.6%;
}
page{
background-color: #0083f5;
}
.block{
width: 100%;
height: 30vh;
background-color: #fff;
display: flex;
justify-content: center;
}
.QR{
width: 60vw;
height: 60vw;
margin: -40vw auto 0 auto;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
image{
width: 50vw;
height: 50vw;
}
}
.title{
width: 100%;
margin-top: 50upx;
display: flex;
justify-content: center;
font-size: 36upx;
color: #fff;
}
.btn{
width: 50%;
height: 80upx;
border-radius: 80upx;
display: flex;
justify-content: center;
align-items: center;
padding: 0 20upx;
margin: 0 auto;
margin-top: 50upx;
background-color: rgba(255,255,255,.8);
}
.logo{
width: 100%;
display: flex;
justify-content: center;
position: absolute;
bottom: 25upx;
image{
width: 39.6%;
}
}
</style>

@ -5,6 +5,8 @@
<view class="width100 font18 fcorfff fotct height40 backcorf06" v-if="recinfo.orderStatus == 3">已完成</view>
<view class="width100 font18 fcorfff fotct height40 backcorf06" v-if="recinfo.orderStatus == 4">已退款</view>
<view class="width100 font18 fcorfff fotct height40 backcorf06" v-if="recinfo.orderStatus == 5">已取消</view>
<view class="width100 font18 fcorfff fotct height40 backcorf06" v-if="recinfo.orderStatus == 6">退款中</view>
<view class="width100 font18 fcorfff fotct height40 backcorf06" v-if="recinfo.orderStatus == 7">退款失败</view>
<!-- 购买商品列表 -->
<view class="buy-list" v-for="rec in recinfo.highChildOrderList" :key="rec.id"
@click="toGoods(rec.goodsId,rec.goodsType)">
@ -12,7 +14,7 @@
<view class="row">
<view class="goods-info">
<view class="img">
<image :src="imageUrl+rec.goodsImg" v-if="rec.goodsType != 2 "></image>
<image :src="imageUrl+rec.goodsImg" v-if="rec.goodsType == 1 "></image>
<image :src="rec.goodsImg" v-else></image>
</view>
<view class="info">
@ -41,6 +43,14 @@
{{recinfo.orderNo}}
</view>
</view>
<view class="row" v-if="recinfo.highChildOrderList[0].gasOrderNo !=null">
<view class="left">
加油单号 :
</view>
<view class="right">
{{recinfo.highChildOrderList[0].gasOrderNo}}
</view>
</view>
<view class="row" v-if="recinfo.paySerialNo">
<view class="left">
支付流水号 :
@ -106,7 +116,7 @@
</view>
<view class="row" v-if="recinfo.deductionPrice">
<view class="left">
优惠券抵扣 :
优惠金额 :
</view>
<view class="right" v-if="recinfo.payType != 3">
{{recinfo.deductionPrice}}
@ -141,6 +151,14 @@
{{recinfo.cancelTime | formatDate('-')}}
</view>
</view>
<view class="row" v-if="recinfo.refusalRefundContent != null">
<view class="left">
退款失败原因 :
</view>
<view class="right">
{{recinfo.refusalRefundContent}}
</view>
</view>
<view class="row" v-if="recinfo.finishTime">
<view class="left">
完成时间 :
@ -527,7 +545,7 @@
height: 40upx;
.price {
color: #f06c7a;
color: #0083f5;
}
.number {
@ -612,7 +630,7 @@
height: 60upx;
width: 20%;
margin-left: 10px;
background-color: #f06c7a;
background-color: #0083f5;
color: #fff;
display: flex;
justify-content: center;
@ -642,8 +660,8 @@
.content {
font-size: 26upx;
color: #f06c7a;
color: #0083f5;
}
}
}
</style>
</style>

File diff suppressed because one or more lines are too long

@ -1,44 +1,60 @@
<template>
<view>
<view class="width100 backcorfff">
<uSearchBar @confirm="search" @input="input"></uSearchBar>
<view class="line1 mart10"></view>
<!-- <uSearchBar @confirm="search" @input="input"></uSearchBar>
<view class="line1 mart10"></view> -->
<view class="width90 mart20 font15 fcor333">当前定位</view>
<view class="posacname actives width90 mart20">南充</view>
<view class="posacname actives width90 mart20">{{posName}}</view>
<view class="width90 mart20 font14 fcor333">其他地区</view>
<view class="posacname mart20 flleft font14" :class="{'actives':posId===item.name}" v-for="(item,index) in posList" @click="change(item)">
{{item.name}}</view>
<view class="posacname mart20 flleft font14" :class="{'actives':posId===item.regionId}"
v-for="(item,index) in posList" @click="change(item)">
{{item.regionName}}
</view>
</view>
</view>
</template>
<script>
import uSearchBar from '../../../components/uni-search-bar/components/uni-search-bar/uni-search-bar.vue';
import {
getDredgeProvince
} from '../../../Utils/Api.js';
let app = getApp();
export default {
components: {
uSearchBar
},
data() {
return {
posList: [{
name: '南充'
},
{
name: '高坪'
},
{
name: '嘉陵'
},
{
name: '南部'
}
],
posId: ''
posList: [],
posId: '',
posName: ''
}
},
onLoad() {
this.getDredgeProvince();
this.posName = app.globalData.cityName;
},
methods: {
getDredgeProvince() {
uni.showLoading({
title: '加载中'
})
getDredgeProvince().then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
this.posList = res.return_data;
}
});
},
change(item) {
this.posId = item.name;
this.posId = item.regionId;
this.posName = item.regionName;
app.globalData.cityId = item.regionId;
app.globalData.cityName = item.regionName.replace(/市/g,'');
uni.navigateBack({
})
}
}
}
@ -55,8 +71,8 @@
text-align: center;
border-radius: 5px;
}
.actives{
.actives {
color: #089bf5;
background-color: #f4faff;
border: 1px solid #089bf5;

@ -1,5 +1,5 @@
page {
background: linear-gradient(to bottom, #f06c7a 0%, #f06c7a 100%);
background: linear-gradient(to bottom, #0083f5 0%, #0083f5 100%);
height: 100%;
}
.icon {
@ -45,15 +45,15 @@ page {
}
.btn {
color: #f06c7a;
color: #0083f5;
width: 100%;
margin-top: 50rpx;
height: 90rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 45rpx;
background-color: #fff;
margin-top: 50rpx;
height: 90rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 45rpx;
background-color: #fff;
font-size: 40rpx;
}
}
@ -89,4 +89,4 @@ page {
height: 100upx;
color: rgba($color: #ffffff, $alpha: 0.8);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

@ -73,289 +73,294 @@ $uni-font-size-title:40upx;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:36upx;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:30upx;
/* 字体大小 */
.font12 {
font-size: 12px;
}
.font13 {
font-size: 13px;
}
.font14 {
font-size: 14px;
}
.font15 {
font-size: 15px;
}
.font16 {
font-size: 16px;
}
.font18 {
font-size: 18px;
}
.font20 {
font-size: 20px;
}
.font24 {
font-size: 24px;
}
.font28 {
font-size: 28px;
}
// 字体加粗
.fontwig6{
font-weight: 600;
}
/* 字体间距 */
.fontspec {
letter-spacing: 1px;
}
.fontspec10 {
letter-spacing: 10px;
}
/* 字体行间距 */
.linehet {
line-height: 20px;
}
/* 字体位置 */
.fotlt {
text-align: left;
}
.fotrt {
text-align: right;
}
.fotct {
text-align: center;
}
.margle {
margin-left: 6px;
}
.paddleft10 {
margin-left: 10px;
}
.margle20 {
margin-left: 20px;
}
.marglerig{
margin-right: 5px;
}
.marRight20{
margin-right: 20px;
}
.verc {
vertical-align: middle;
}
.versub {
vertical-align: sub;
}
.text1 {
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
}
.text2 {
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
}
/* 字体颜色 */
.fcor333 {
color: #333333;
}
.fcorfff {
color: #ffffff;
}
.fcor666 {
color: #666666;
}
.fcor999 {
color: #b2b2b2;
}
.fcor089 {
color: #089bf5;
}
.fcoreb5 {
color: #eb5823;
}
.fcorred{
color: red;
}
.fcor41c{
color: #41cda2;
}
/* 背景颜色 */
.backcor9 {
background-color: #f6f6f6;
}
.backcor9 {
background-color: #f6f6f6;
}
.backcorf06{
background-color: #f06c7a;
}
.backcor008{
background-color: #0083f5;
}
.backcor89 {
background-color: #089bf5;
}
.backcorfff {
background-color: white;
}
.backshare {
background: rgba(0, 0, 0, 0);
}
/* 页面布局 */
.width90 {
width: 90%;
margin-left: 5%;
}
.width80 {
width: 80%;
margin-left: 10%;
$uni-font-size-paragraph:30upx;
/* 字体大小 */
.font12 {
font-size: 12px;
}
.font13 {
font-size: 13px;
}
.font14 {
font-size: 14px;
}
.font15 {
font-size: 15px;
}
.font16 {
font-size: 16px;
}
.font18 {
font-size: 18px;
}
.font20 {
font-size: 20px;
}
.font24 {
font-size: 24px;
}
.font28 {
font-size: 28px;
}
// 字体加粗
.fontwig6{
font-weight: 600;
}
/* 字体间距 */
.fontspec {
letter-spacing: 1px;
}
.fontspec10 {
letter-spacing: 10px;
}
/* 字体行间距 */
.linehet {
line-height: 20px;
}
/* 字体位置 */
.fotlt {
text-align: left;
}
.fotrt {
text-align: right;
}
.fotct {
text-align: center;
}
.margle {
margin-left: 6px;
}
.paddleft10 {
margin-left: 10px;
}
.margle20 {
margin-left: 20px;
}
.marglerig{
margin-right: 5px;
}
.marRight20{
margin-right: 20px;
}
.verc {
vertical-align: middle;
}
.versub {
vertical-align: sub;
}
.text1 {
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
}
.text2 {
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
}
/* 字体颜色 */
.fcor333 {
color: #333333;
}
.fcorfff {
color: #ffffff;
}
.fcor666 {
color: #666666;
}
.fcor999 {
color: #b2b2b2;
}
.fcor089 {
color: #089bf5;
}
.fcoreb5 {
color: #eb5823;
}
.fcorred{
color: red;
}
.fcor41c{
color: #41cda2;
}
/* 背景颜色 */
.backcor9 {
background-color: #f6f6f6;
}
.backcor9 {
background-color: #f6f6f6;
}
.backcorf06{
background-color: #0083f5;
}
.backcor008{
background-color: #0083f5;
}
.backcor89 {
background-color: #089bf5;
}
.backcorfff {
background-color: white;
}
.backshare {
background: rgba(0, 0, 0, 0);
}
/* 页面布局 */
.width90 {
width: 90%;
margin-left: 5%;
}
.width96 {
width: 96%;
margin-left: 2%;
}
.width80 {
width: 80%;
margin-left: 10%;
}
.width80p {
width: 80%;
}
.width70 {
width: 70%;
}
.width85 {
width: 85%;
}
.width50 {
width: 50%;
}
.width40 {
width: 40%;
}
.width60 {
width: 65%;
margin-left: 5%;
}
.width60w {
width: 60%;
margin-left: 20%;
}
.width30 {
width: 30%;
}
.width20 {
width: 20%;
}
.width15 {
width: 15%;
}
.width8 {
width: 8%;
}
.width95 {
width: 95%;
}
.width100 {
width: 100%;
}
.bor-botm1 {
border-bottom: 1px solid #f4f4f4;
}
/* 高40px */
.height45 {
height: 45px;
}
.height22{
height: 22px;
}
.height100 {
height: 100%;
}
.height10 {
height: 10px;
}
.height60 {
height: 60px;
}
.height90 {
height: 90px;
}
.width70 {
width: 70%;
}
.width85 {
width: 85%;
}
.width50 {
width: 50%;
}
.width40 {
width: 40%;
}
.width60 {
width: 60%
}
.width60w {
width: 60%;
margin-left: 20%;
}
.width30 {
width: 30%;
}
.width20 {
width: 20%;
}
.width15 {
width: 15%;
}
.width8 {
width: 8%;
}
.width95 {
width: 95%;
}
.width100 {
width: 100%;
}
.bor-botm1 {
border-bottom: 1px solid #f4f4f4;
}
/* 高40px */
.height45 {
height: 45px;
}
.height22{
height: 22px;
}
.height100 {
height: 100%;
}
.height10 {
height: 10px;
}
.height60 {
height: 60px;
}
.height90 {
height: 90px;
}
.height100p {
height: 100px;
}
.height120{
height: 120px;
}
@ -366,167 +371,170 @@ $uni-font-size-paragraph:30upx;
.height180{
height: 180px;
}
.height30 {
height: 30px;
line-height: 30px;
}
.height40 {
height: 40px;
line-height: 40px;
}
.height30 {
height: 30px;
line-height: 30px;
}
.height40 {
height: 40px;
line-height: 40px;
}
.heightl60 {
height: 60px;
line-height: 60px;
}
.height20 {
height: 20px;
line-height: 20px;
}
.height25 {
height: 25px;
}
.height20 {
height: 20px;
line-height: 20px;
}
.height50 {
height: 50px;
line-height: 50px;
}
/* 向上下外间距 */
.mart90 {
margin-top: 90px;
}
.mart80{
margin-top: 80px;
}
.mart60{
margin-top: 60px;
}
.mart50 {
margin-top: 50px;
}
.mart40 {
margin-top: 40px;
}
.mart30 {
margin-top: 30px;
}
.mart15 {
margin-top: 15px;
}
.mart20 {
margin-top: 20px;
}
.mart10 {
margin-top: 10px;
}
.mart5 {
margin-top: 5px;
}
.mart1 {
margin-top: 1px;
}
.marb65 {
margin-bottom: 65px;
}
.marb50 {
margin-bottom: 50px;
}
.marb40 {
margin-bottom: 40px;
}
.marb30 {
margin-bottom: 30px;
}
.marb20 {
margin-bottom: 20px;
}
.marb10 {
margin-bottom: 10px;
}
.marb5 {
margin-bottom: 5px;
}
}
.height20 {
height: 20px;
line-height: 20px;
}
.height25 {
height: 25px;
}
.height20 {
height: 20px;
line-height: 20px;
}
.height50 {
height: 50px;
line-height: 50px;
}
/* 向上下外间距 */
.margle10{
margin-left: 10px;
}
.mart90 {
margin-top: 90px;
}
.mart80{
margin-top: 80px;
}
.mart60{
margin-top: 60px;
}
.mart50 {
margin-top: 50px;
}
.mart40 {
margin-top: 40px;
}
.mart30 {
margin-top: 30px;
}
.mart15 {
margin-top: 15px;
}
.mart20 {
margin-top: 20px;
}
.mart10 {
margin-top: 10px;
}
.mart5 {
margin-top: 5px;
}
.mart1 {
margin-top: 1px;
}
.marb65 {
margin-bottom: 65px;
}
.marb50 {
margin-bottom: 50px;
}
.marb40 {
margin-bottom: 40px;
}
.marb30 {
margin-bottom: 30px;
}
.marb20 {
margin-bottom: 20px;
}
.marb10 {
margin-bottom: 10px;
}
.marb5 {
margin-bottom: 5px;
}
/* 向上下内间距 */
.paddtop5 {
padding-top: 5px;
}
.paddtop10 {
padding-top: 10px;
}
.paading10{
padding : 10px;
}
.paddtop13 {
padding-top: 13px;
}
.paddtop15 {
padding-top: 15px;
}
.paddtop25 {
padding-top: 25px;
}
.paddleft10 {
padding-left: 10px;
}
.padleft15 {
padding-left: 15px;
}
.paddtright10 {
padding-right: 10px;
}
.paddbotm10 {
padding-bottom: 10px;
}
/* 左悬浮 */
.flleft {
float: left;
}
/* 右悬浮 */
.flright {
float: right;
}
.paddtop5 {
padding-top: 5px;
}
.paddtop10 {
padding-top: 10px;
}
.paading10{
padding : 10px;
}
.paddtop13 {
padding-top: 13px;
}
.paddtop15 {
padding-top: 15px;
}
.paddtop25 {
padding-top: 25px;
}
.paddleft10 {
padding-left: 10px;
}
.padleft15 {
padding-left: 15px;
}
.paddtright10 {
padding-right: 10px;
}
.paddbotm10 {
padding-bottom: 10px;
}
/* 左悬浮 */
.flleft {
float: left;
}
/* 右悬浮 */
.flright {
float: right;
}
/**
* 圆角
@ -534,47 +542,47 @@ $uni-font-size-paragraph:30upx;
.border-r{
border-radius: 5px;
}
/* button样式 */
.btnw70 {
width: 70%;
color: white;
margin-top: 40px;
background-color: #089bf5;
border-radius: 6px;
/* button样式 */
.btnw70 {
width: 70%;
color: white;
margin-top: 40px;
background-color: #089bf5;
border-radius: 6px;
}
.btnw50 {
.btnw50 {
width: 50%;
margin-left: 25%;
height: 45px;
line-height: 45px;
line-height: 45px;
color: white;
text-align: center;
margin-top: 40px;
background-color: #f06c7a;
border-radius: 6px;
}
/* 下滑线 */
.line1 {
height: 1px;
background-color: #f4f4f4;
}
.line10 {
height: 10px;
background-color: #f4f4f4;
}
.line1089 {
height: 10px;
background-color: #089bf5;
}
/* 展示样式 */
.displ {
display: inline-block;
text-align: center;
margin-top: 40px;
background-color: #0083f5;
border-radius: 6px;
}
/* 下滑线 */
.line1 {
height: 1px;
background-color: #f4f4f4;
}
.line10 {
height: 10px;
background-color: #f4f4f4;
}
.line1089 {
height: 10px;
background-color: #089bf5;
}
/* 展示样式 */
.displ {
display: inline-block;
}
.font12{

Loading…
Cancel
Save