Browse Source

修改充值,增加门店地图显示

master
Gao xiaosong 5 years ago
parent
commit
841c40762d
  1. 2
      assets/css/style.css
  2. 2
      assets/css/style.css.map
  3. 2
      assets/css/style.less
  4. 2
      config/index.js
  5. 6
      libs/order.js
  6. 6
      pages.json
  7. 128
      pages/activity/DargainDetails/index.vue
  8. 57
      pages/map/index.vue
  9. 125
      pages/orderAdmin/OrderCancellation/index.vue
  10. 30
      pages/shop/GoodsCon/index.vue
  11. 2
      pages/user/Recharge/index.vue
  12. 15
      pages/user/User/index.vue

2
assets/css/style.css

File diff suppressed because one or more lines are too long

2
assets/css/style.css.map

File diff suppressed because one or more lines are too long

2
assets/css/style.less

@ -4498,7 +4498,7 @@ page {
color: #00c17b;
background-image: linear-gradient(to right, #fff 0%, #fff 100%);
background-image: -moz-linear-gradient(to right, #fff 0%, #fff 100%);
width: 5.96*100rpx;
width: 100%;
height: 0.76*100rpx;
}

2
config/index.js

@ -1,4 +1,4 @@
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
export const VUE_APP_API_URL = 'https://h5api.dayouqiantu.cn/api';
export const VUE_APP_RESOURCES_URL = 'https://h5.dayouqiantu.cn/static';
export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static';

6
libs/order.js

@ -87,7 +87,7 @@ export function payOrderHandle(orderId, type, from) {
case "EXTEND_ORDER":
case "PAY_ERROR":
case "PAY_DEFICIENCY":
dialog.toast({ mes: res.msg });
uni.showToast({ title: res.msg, icon: 'none', duration: 2000 });
reject(data);
break;
case "SUCCESS":
@ -108,7 +108,9 @@ export function payOrderHandle(orderId, type, from) {
})
.catch(err => {
uni.hideLoading()
dialog.toast({ mes: "订单支付失败" });
uni.showToast({
title: '订单支付失败', icon: 'none', duration: 2000
});
});
});
}

6
pages.json

@ -395,6 +395,12 @@
"style": {
"navigationBarTitleText": "秒杀详情"
}
},
{
"path": "pages/map/index",
"style": {
"navigationBarTitleText": "地图"
}
}
],
"globalStyle": {

128
pages/activity/DargainDetails/index.vue

@ -24,9 +24,13 @@
></count-down>
</view>
<view class="wrapper">
<view class="pictxt acea-row row-between-wrapper">
<view class="pictxt acea-row row-between-wrapper" @click="openAlone">
<view class="pictrue">
<image :src="bargain.image" />
<view class="bargain_view">
查看商品
<view class="iconfont icon-jiantou iconfonts"></view>
</view>
</view>
<view class="text acea-row row-column-around">
<view class="line2" v-text="bargain.title"></view>
@ -52,29 +56,68 @@
<view v-else v-text="'还剩' + surplusPrice + '元'"></view>
</view>
<!-- 帮助砍价帮砍成功-->
<!--<view class='bargainSuccess'><text class='iconfont icon-xiaolian'></text>已成功帮助好友砍价</view>-->
<view class="bargainBnts">
<view
class="bargainSuccess"
v-if="bargainPartake != userInfo.uid && !statusUser && !helpListLoading"
>
<span class="iconfont icon-xiaolian"></span>已成功帮助好友砍价
</view>
<!-- 砍价成功-->
<view
class="bargainSuccess"
v-if="
surplusPrice === 0 &&
bargainPartake === userInfo.uid &&
userBargainStatus === 1 &&
!helpListLoading
"
>
<span class="iconfont icon-xiaolian"></span>恭喜您砍价成功快去支付吧~
</view>
<view
v-if="userBargainStatus == 0 && bargainPartake === userInfo.uid"
class="bargainBnt"
@click="goParticipate"
>立即参与砍价</view>
<view
class="bargainBnt"
@click="goPoster"
v-if="bargainPartake === userInfo.uid && surplusPrice > 0"
v-if="
surplusPrice > 0 &&
bargainPartake === userInfo.uid &&
userBargainStatus === 1 &&
!helpListLoading
"
>邀请好友帮砍价</view>
<view
class="bargainBnt"
@click="getBargainHelp"
v-else-if="bargainPartake != userInfo.uid"
v-else-if="
bargainPartake != userInfo.uid &&
userBargainStatus == 1 &&
statusUser &&
!helpListLoading
"
>帮好友砍一刀</view>
<view class="bargainBnt" @click="getBargainStart" v-if="bargainPartake != userInfo.uid">开启砍价</view>
<view
class="bargainBnt"
@click="getBargainStart"
v-if="bargainPartake != userInfo.uid && !statusUser && !helpListLoading"
>我也要参与</view>
<view
class="bargainBnt"
@click="goPay"
v-if="surplusPrice === 0 && bargainPartake === userInfo.uid && userBargainStatus === 1"
v-if="
surplusPrice === 0 &&
bargainPartake === userInfo.uid &&
userBargainStatus === 1
"
>立即支付</view>
<view class="bargainBnt on" @click="goList">抢更多商品</view>
</view>
<view class="tip">
已有
<text class="font-color-red" v-text="helpCount"></text>位好友成功帮您砍价
<span class="font-color-red" v-text="helpCount"></span>
位好友成功帮您砍价
</view>
<view class="lock"></view>
</view>
@ -84,9 +127,9 @@
<image src="@/static/images/left.png" />
</view>
<view class="titleCon">砍价帮</view>
<!-- <view class="pictrue on">
<view class="pictrue on">
<image src="@/static/images/left.png" />
</view> -->
</view>
</view>
<view class="list">
<view
@ -145,7 +188,7 @@
<!-- <view class="pictrue">
<image src="@/static/images/bargainBg.jpg" />
<view class="iconfont icon-guanbi" @click="close"></view>
</view> -->
</view>-->
<view class="cutOff" v-if="bargainPartake === userInfo.uid">
您已砍掉
<text class="font-color-red" v-text="bargainHelpPrice"></text>听说分享次数越多砍价成功的机会越大哦
@ -210,7 +253,8 @@ export default {
alreadyPrice: 0, //
pricePercent: 0, //
bargainUserInfo: [], //
userBargainStatus: 2 //
userBargainStatus: 2, //
statusUser: false // ,truefalse
};
},
computed: mapGetters(["userInfo", "isLogin"]),
@ -230,6 +274,15 @@ export default {
}, 500);
},
methods: {
//
goParticipate() {
if (this.bargainPartake === this.userInfo.uid) this.getBargainStart();
else this.getBargainStartUser();
this.getBargainHelpCount();
},
openAlone: function() {
this.$yrouter.push({ path: "/detail/" + this.bargain.productId });
},
mountedStart: function() {
var that = this;
let url = handleQrCode();
@ -256,11 +309,12 @@ export default {
that.getBargainHelpCountStart();
that.getBargainDetail();
that.getBargainShare(0);
if (that.bargainPartake === that.userInfo.uid) that.getBargainStart();
else that.getBargainStartUser();
},
updateTitle() {
// document.title = this.bargain.title || this.$yroute.meta.title;
// if (that.bargainPartake !== that.userInfo.uid) that.getBargainStartUser();
if (that.bargainPartake === that.userInfo.uid) {
// that.getBargainStart();
} else {
that.getBargainStartUser();
}
},
goPay: function() {
var data = {};
@ -279,7 +333,8 @@ export default {
})
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message,
title:
err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000
});
@ -507,12 +562,35 @@ export default {
</script>
<style lang="less">
.bargain{
background: #00c17b;
page{
background-color: #00c17b;
}
.bargainBnt_hui {
font-size: 0.3rem;
font-weight: bold;
color: #fff;
width: 6rem;
height: 0.8rem;
border-radius: 0.4rem;
background: #bbb;
text-align: center;
line-height: 0.8rem;
margin-top: 0.32rem;
}
.bargain_view {
width: 1.8rem;
height: 0.48rem;
background: rgba(0, 0, 0, 0.5);
opacity: 1;
border-radius: 0 0 0.06rem 0.06rem;
position: absolute;
bottom: 0;
font-size: 0.22rem;
color: #fff;
text-align: center;
line-height: 0.48rem;
}
.bargainBnts {
display: flex;
align-items: center;
flex-direction: column;
.iconfonts {
font-size: 0.22rem;
}
</style>

57
pages/map/index.vue

@ -0,0 +1,57 @@
<template>
<map
id="map"
:longitude="map.longitude"
:latitude="map.latitude"
:markers="mapConfig"
scale="15"
show-location
style="width: 100%; height: 100%;"
></map>
</template>
<script>
export default {
name: "Index",
components: {},
props: {},
data: function() {
return {
mapConfig: {
latitude: "",
longitude: "",
name: "",
address: ""
},
map: {
latitude: "",
longitude: ""
}
};
},
onShow: function() {
this.map = {
latitude: this.$yroute.query.latitude,
longitude: this.$yroute.query.longitude
};
this.mapConfig = [{
id: 1,
width: 50,
height: 50,
iconPath: this.$yroute.query.image,
latitude: this.$yroute.query.latitude,
longitude: this.$yroute.query.longitude,
title: this.$yroute.query.name,
name: this.$yroute.query.name,
address: this.$yroute.query.detailedAddress
}];
console.log(this.mapConfig);
},
methods: {}
};
</script>
<style lang="less">
page {
width: 100%;
height: 100%;
}
</style>

125
pages/orderAdmin/OrderCancellation/index.vue

@ -1,6 +1,8 @@
<template>
<view class="OrderCancellation">
<view class="header"></view>
<view class="header">
<image mode="aspectFit" src="@/static/images/writeOffBg.jpg" @click="openQRCode" />
</view>
<view class="whiteBg">
<view class="input">
<input type="number" placeholder="0" v-model="verify_code" />
@ -13,63 +15,7 @@
<WriteOff :iShidden="iShidden" :orderInfo="orderInfo" @cancel="cancel" @confirm="confirm"></WriteOff>
</view>
</template>
<style scoped lang="less">
.OrderCancellation .header {
background: url("https://h5.dayouqiantu.cn/static/images/writeOffBg.jpg")
no-repeat;
width: 100%;
height: 3 * 100rpx;
background-size: 100% 100%;
}
.OrderCancellation .whiteBg {
width: 6.9 * 100rpx;
background-color: #fff;
margin: -0.93 * 100rpx auto 0 auto;
padding-top: 0.8 * 100rpx;
border-radius: 0.06 * 100rpx 0.06 * 100rpx 0 0;
}
.OrderCancellation .whiteBg .input {
width: 5.8 * 100rpx;
margin: 0 auto;
border-bottom: 0.01 * 100rpx solid #eee;
}
.OrderCancellation .whiteBg .input input {
padding-bottom: 0.25 * 100rpx;
font-size: 0.6 * 100rpx;
color: #282828;
width: 100%;
text-align: center;
}
.OrderCancellation .whiteBg .bnt {
font-size: 0.32 * 100rpx;
color: #fff;
width: 5.8 * 100rpx;
height: 0.86 * 100rpx;
border-radius: 0.43 * 100rpx;
background-image: linear-gradient(to right, #f67a38 0%, #f11b09 100%);
background-image: -webkit-linear-gradient(to right, #f67a38 0%, #f11b09 100%);
background-image: -moz-linear-gradient(to right, #f67a38 0%, #f11b09 100%);
text-align: center;
line-height: 0.86 * 100rpx;
margin: 0.55 * 100rpx auto 0 auto;
}
.OrderCancellation .scan {
width: 3 * 100rpx;
height: 3 * 100rpx;
margin: 1.1 * 100rpx auto 0 auto;
}
.OrderCancellation .scan image {
width: 100%;
height: 100%;
display: block;
}
</style>
<script>
import WriteOff from "@/components/WriteOff";
import { isWeixin } from "@/utils";
@ -154,3 +100,68 @@ export default {
}
};
</script>
<style scoped lang="less">
.OrderCancellation .header {
width: 100%;
height: 3 * 100rpx;
background-size: 100% 100%;
image{
width: 100%;
height: 3 * 100rpx;
}
}
.OrderCancellation .whiteBg {
width: 6.9 * 100rpx;
background-color: #fff;
margin: -0.93 * 100rpx auto 0 auto;
padding-top: 0.8 * 100rpx;
padding-bottom: 30rpx;
z-index: 99;
position: relative;
border-radius: 0.06 * 100rpx 0.06 * 100rpx 0 0;
}
.OrderCancellation .whiteBg .input {
width: 5.8 * 100rpx;
margin: 0 auto;
border-bottom: 0.01 * 100rpx solid #eee;
}
.OrderCancellation .whiteBg .input input {
padding-bottom: 0.25 * 100rpx;
font-size: 0.6 * 100rpx;
height:auto;
color: #282828;
width: 100%;
text-align: center;
}
.OrderCancellation .whiteBg .bnt {
font-size: 0.32 * 100rpx;
color: #fff;
width: 5.8 * 100rpx;
height: 0.86 * 100rpx;
border-radius: 0.43 * 100rpx;
background-image: linear-gradient(to right, #00c17b 0%, #00c17b 100%);
background-image: -webkit-linear-gradient(to right, #00c17b 0%, #00c17b 100%);
background-image: -moz-linear-gradient(to right, #00c17b 0%, #00c17b 100%);
text-align: center;
line-height: 0.86 * 100rpx;
margin: 0.55 * 100rpx auto 0 auto;
}
.OrderCancellation .scan {
width: 3 * 100rpx;
height: 3 * 100rpx;
margin: 1.1 * 100rpx auto 0 auto;
}
.OrderCancellation .scan image {
width: 100%;
height: 100%;
display: block;
}
</style>

30
pages/shop/GoodsCon/index.vue

@ -63,7 +63,7 @@
</view>
<view class="text">
<view class="name line1">{{ systemStore.name }}</view>
<view class="address acea-row row-middle" @click="showChang">
<view class="address acea-row row-middle" @click="showChang(systemStore)">
<text class="addressTxt">{{systemStore.address}}</text>
<text class="iconfont icon-youjian"></text>
</view>
@ -170,15 +170,6 @@
</view>
</view>
<view class="mask" @touchmove.prevent @click="listenerActionClose" v-show="posters"></view>
<view class="geoPage" v-if="mapShow">
<iframe
width="100%"
height="100%"
frameborder="0"
scrolling="no"
:src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' +systemStore.latitude +',' +systemStore.longitude +'&referer=' +mapKey"
></iframe>
</view>
<view class="posterCanvasWarp">
<canvas class="posterCanvas" canvas-id="myCanvas"></canvas>
</view>
@ -276,7 +267,7 @@ export default {
goodList: [],
systemStore: {},
qqmapsdk: null,
productConClass: "product-con"
productConClass: "product-con",
};
},
computed: mapGetters(["isLogin", "location"]),
@ -322,21 +313,10 @@ export default {
});
},
showChang: function(data) {
let config = {
latitude: data.latitude,
longitude: data.longitude,
name: data.name,
address: data._detailed_address
};
if (!this.mapKey) {
uni.showToast({
title: "暂无法使用查看地图,请配置您的腾讯地图key",
icon: "none",
duration: 2000
this.$yrouter.push({
path: "/pages/map/index",
query: data
});
return;
}
this.mapShow = true;
},
updateTitle() {
// document.title = this.storeInfo.storeName || this.$yroute.meta.title;

2
pages/user/Recharge/index.vue

@ -32,7 +32,6 @@
</view>
<view
class="pic-box pic-box-color acea-row row-center-wrapper"
:class="activePic == picList.length ? 'pic-box-color-active' : ''"
@click="picCharge(picList.length, money)"
>
<input
@ -40,7 +39,6 @@
placeholder="其他"
v-model="money"
class="pic-box-money pic-number-pic"
:class="activePic == picList.length ? 'pic-box-color-active' : ''"
/>
</view>
</view>

15
pages/user/User/index.vue

@ -130,6 +130,11 @@
<text class="iconfont icon-jiantou"></text>
</view>
</template>
<!-- <view class="item" @click="goPages2()">
<view class="pictrue"></view>
<view class="cell">hexiao</view>
<text class="iconfont icon-jiantou"></text>
</view> -->
</view>
</view>
<!--<view -->
@ -182,7 +187,7 @@ export default {
},
computed: mapGetters(["userInfo"]),
methods: {
...mapMutations(["updateAuthorizationPage", ]),
...mapMutations(["updateAuthorizationPage"]),
goReturnList() {
this.$yrouter.push("/pages/order/ReturnList/index");
},
@ -327,6 +332,11 @@ export default {
this.$yrouter.push({
path: this.MyMenus[index].uniapp_url
});
},
goPages2: function() {
this.$yrouter.push({
path: "/pages/orderAdmin/OrderCancellation/index"
});
}
},
watch: {
@ -346,7 +356,7 @@ export default {
}
},
onHide() {
console.log('离开用户中心')
console.log("离开用户中心");
this.updateAuthorizationPage(false);
}
};
@ -393,7 +403,6 @@ export default {
.by {
text-align: center;
padding: 30rpx 0;
}
.by-text {
text-align: center;

Loading…
Cancel
Save