Browse Source

优化

master
Gao xiaosong 5 years ago
parent
commit
e4535bf89f
  1. 12
      api/order.js
  2. 2
      assets/css/style.css
  3. 2
      assets/css/style.css.map
  4. 27
      assets/css/style.less
  5. 8
      pages/order/MyOrder/index.vue
  6. 2
      pages/order/OrderDetails/index.vue
  7. 8
      pages/order/OrderSubmission/index.vue
  8. 4
      pages/shop/GoodsCollection/index.vue
  9. 16
      pages/user/Recharge/index.vue
  10. 8
      pages/user/User/index.vue
  11. 2
      pages/user/UserAccount/index.vue
  12. 3
      pages/user/address/AddAddress/index.vue
  13. 54
      pages/user/coupon/GetCoupon/index.vue
  14. 6
      pages/user/promotion/UserPromotion/index.vue
  15. BIN
      static/images/promotionBg.png

12
api/order.js

@ -97,9 +97,9 @@ export function postOrderRefund(data) {
* 确认收货 * 确认收货
* @returns {*} * @returns {*}
*/ */
export function takeOrder(uni) { export function takeOrder(orderId) {
return request.post("/order/take", { return request.post("/order/take", {
uni orderId
}); });
} }
@ -107,9 +107,9 @@ export function takeOrder(uni) {
* 删除订单 * 删除订单
* @returns {*} * @returns {*}
*/ */
export function delOrder(uni) { export function delOrder(orderId) {
return request.post("/order/del", { return request.post("/order/del", {
uni orderId
}); });
} }
@ -125,9 +125,9 @@ export function express(params) {
* 订单查询物流信息 * 订单查询物流信息
* @returns {*} * @returns {*}
*/ */
export function payOrder(uni, paytype, from) { export function payOrder(orderId, paytype, from) {
return request.post("order/pay", { return request.post("order/pay", {
uni, orderId,
paytype, paytype,
from from
}); });

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

27
assets/css/style.less

@ -399,13 +399,14 @@ page {
} }
/*优惠券列表公共*/ /*优惠券列表公共*/
.coupon-list { .coupon-list {
padding: 0 0.3*100rpx; padding: 0 0.3*100rpx;
margin-top: 0.25*100rpx; margin-top: 0.25*100rpx;
box-sizing: border-box;
} }
.coupon-list .item { .coupon-list .item {
box-sizing: border-box;
width: 100%; width: 100%;
height: 1.7*100rpx; height: 1.7*100rpx;
margin-bottom: 0.16*100rpx; margin-bottom: 0.16*100rpx;
@ -421,7 +422,10 @@ page {
font-size: 0.36*100rpx; font-size: 0.36*100rpx;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
line-height: 1.7*100rpx; display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
} }
.coupon-list .item .money.moneyGray { .coupon-list .item .money.moneyGray {
@ -433,9 +437,10 @@ page {
} }
.coupon-list .item .text { .coupon-list .item .text {
flex: 1; width: 4.5*100rpx;
padding: 0 0.17*100rpx 0 0.24*100rpx; padding: 0 0.17*100rpx 0 0.24*100rpx;
background-color: #fff; background-color: #fff;
box-sizing: border-box;
} }
.coupon-list .item .text .condition { .coupon-list .item .text .condition {
@ -465,7 +470,10 @@ page {
.coupon-list .item .text .data .bnt.gray { .coupon-list .item .text .data .bnt.gray {
background-color: #ccc; background-color: #ccc;
} }
.coupon-list .pic-num {
color: #ffffff !important;
font-size: 0.24*100rpx !important;
}
/*优惠券列表弹窗*/ /*优惠券列表弹窗*/
.coupon-list-window { .coupon-list-window {
position: fixed; position: fixed;
@ -476,11 +484,22 @@ page {
border-radius: 0.16*100rpx 0.16*100rpx 0 0; border-radius: 0.16*100rpx 0.16*100rpx 0 0;
z-index: 111; z-index: 111;
transition: all .3s cubic-bezier(.25, .5, .5, .9); transition: all .3s cubic-bezier(.25, .5, .5, .9);
-webkit-transition: all .3s cubic-bezier(.25, .5, .5, .9);
-moz-transition: all .3s cubic-bezier(.25, .5, .5, .9);
-o-transition: all .3s cubic-bezier(.25, .5, .5, .9);
transform: translate3d(0, 100%, 0); transform: translate3d(0, 100%, 0);
-webkit-transform: translate3d(0, 100%, 0);
-ms-transform: translate3d(0, 100%, 0);
-moz-transform: translate3d(0, 100%, 0);
-o-transform: translate3d(0, 100%, 0);
} }
.coupon-list-window.on { .coupon-list-window.on {
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
-webkit-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
-o-transform: translate3d(0, 0, 0);
} }
.coupon-list-window .title { .coupon-list-window .title {

8
pages/order/MyOrder/index.vue

@ -4,11 +4,7 @@
<view class="picTxt acea-row row-between-wrapper"> <view class="picTxt acea-row row-between-wrapper">
<view class="text"> <view class="text">
<view class="name">订单信息</view> <view class="name">订单信息</view>
<view> <view>累计订单{{ orderData.orderCount || 0 }} 总消费{{orderData.sumPrice || 0 }}</view>
累计订单{{ orderData.orderCount || 0 }} 总消费{{
orderData.sumPrice || 0
}}
</view>
</view> </view>
</view> </view>
</view> </view>
@ -45,7 +41,7 @@
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</span> <span class="sign cart-color acea-row row-center-wrapper" v-if="order.seckillId > 0">秒杀</span>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</span> <span class="sign cart-color acea-row row-center-wrapper" v-if="order.bargainId > 0">砍价</span>
<span class="sign cart-color acea-row row-center-wrapper" v-if="order.storeId > 0">门店</span> <span class="sign cart-color acea-row row-center-wrapper" v-if="order.storeId > 0">门店</span>
{{ dataFormat(order.addTime) }} {{ order.createTime }}
</view> </view>
<view class="font-color-red">{{ getStatus(order) }}</view> <view class="font-color-red">{{ getStatus(order) }}</view>
</view> </view>

2
pages/order/OrderDetails/index.vue

@ -5,7 +5,7 @@
<view class="data" :class="refundOrder ? 'on' : ''"> <view class="data" :class="refundOrder ? 'on' : ''">
<view class="state">{{ orderInfo._status._msg }}</view> <view class="state">{{ orderInfo._status._msg }}</view>
<view> <view>
<data-format :date="orderInfo.addTime"></data-format> {{ orderInfo.createTime }}
</view> </view>
</view> </view>
</view> </view>

8
pages/order/OrderSubmission/index.vue

@ -12,7 +12,7 @@
class="item font-color-red" class="item font-color-red"
:class="shipping_type === 1 ? 'on' : 'on2'" :class="shipping_type === 1 ? 'on' : 'on2'"
@click="addressType(1)" @click="addressType(1)"
v-if="storeSelfMention" v-if="systemStore"
></view> ></view>
</view> </view>
<view <view
@ -634,7 +634,11 @@ export default {
.catch(err => { .catch(err => {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: err.response.data.msg || "创建订单失败", title:
err.msg ||
err.response.data.msg ||
err.response.data.message ||
"创建订单失败",
icon: "none", icon: "none",
duration: 2000 duration: 2000
}); });

4
pages/shop/GoodsCollection/index.vue

@ -14,7 +14,7 @@
<view class="infor line1">{{ item.storeName }}</view> <view class="infor line1">{{ item.storeName }}</view>
<view class="acea-row row-between-wrapper"> <view class="acea-row row-between-wrapper">
<view class="money font-color-red">{{ item.price }}</view> <view class="money font-color-red">{{ item.price }}</view>
<view class="delete" @click.prevent="delCollection(collectProductListIndex)">删除</view> <view class="delete" @tap.stop="delCollection(collectProductListIndex)">删除</view>
</view> </view>
</view> </view>
</view> </view>
@ -86,7 +86,7 @@ export default {
category = that.collectProductList[index].category; category = that.collectProductList[index].category;
getCollectDel(id, category).then(function() { getCollectDel(id, category).then(function() {
uni.showToast({ uni.showToast({
title: "添加购物车成功", title: "删除成功",
icon: "success", icon: "success",
duration: 2000, duration: 2000,
complete: () => { complete: () => {

16
pages/user/Recharge/index.vue

@ -24,13 +24,13 @@
> >
<view class="pic-number-pic"> <view class="pic-number-pic">
<text> <text>
{{ item.price }} {{ item.value.price }}
<text class="pic-number"></text> <text class="pic-number"></text>
</text> </text>
</view> </view>
<view class="pic-number">赠送{{ item.give_price }} </view> <view class="pic-number" v-if="item.value.give_price > 0">赠送{{ item.value.give_price }} </view>
</view> </view>
<view <!-- <view
class="pic-box pic-box-color acea-row row-center-wrapper" class="pic-box pic-box-color acea-row row-center-wrapper"
@click="picCharge(picList.length, money)" @click="picCharge(picList.length, money)"
> >
@ -40,7 +40,7 @@
v-model="money" v-model="money"
class="pic-box-money pic-number-pic" class="pic-box-money pic-number-pic"
/> />
</view> </view> -->
</view> </view>
<view class="tip">提示充值后帐户的金额不能提现</view> <view class="tip">提示充值后帐户的金额不能提现</view>
<view class="pay-btn bg-color-red" @click="recharge">立即充值</view> <view class="pay-btn bg-color-red" @click="recharge">立即充值</view>
@ -84,8 +84,8 @@ export default {
.then(res => { .then(res => {
this.picList = res.data.recharge_price_ways || []; this.picList = res.data.recharge_price_ways || [];
if (this.picList[0]) { if (this.picList[0]) {
this.paid_price = this.picList[0].price; this.paid_price = this.picList[0].value.price;
this.numberPic = this.picList[0].give_price; this.numberPic = this.picList[0].value.give_price;
} }
}) })
.catch(res => { .catch(res => {
@ -107,8 +107,8 @@ export default {
this.numberPic = ""; this.numberPic = "";
} else { } else {
this.money = ""; this.money = "";
this.paid_price = item.give_price; this.paid_price = item.value.give_price;
this.numberPic = item.price; this.numberPic = item.value.price;
} }
}, },
recharge: function() { recharge: function() {

8
pages/user/User/index.vue

@ -313,6 +313,14 @@ export default {
}); });
return; return;
} }
if (url === "/pages/orderAdmin/OrderCancellation/index" && !this.userInfo.checkStatus) {
uni.showToast({
title: "您没有核销权限,请后台店员设置!!",
icon: "none",
duration: 2000
});
return;
}
this.$yrouter.push({ this.$yrouter.push({
path: this.MyMenus[index].uniapp_url path: this.MyMenus[index].uniapp_url

2
pages/user/UserAccount/index.vue

@ -8,7 +8,7 @@
<view>总资产()</view> <view>总资产()</view>
<view class="money">{{ now_money }}</view> <view class="money">{{ now_money }}</view>
</view> </view>
<!-- <navigator url="/pages/user/Recharge/index" class="recharge font-color-red">充值</navigator> --> <navigator url="/pages/user/Recharge/index" class="recharge font-color-red">充值</navigator>
</view> </view>
<view class="cumulative acea-row row-top"> <view class="cumulative acea-row row-top">
<view class="item"> <view class="item">

3
pages/user/address/AddAddress/index.vue

@ -177,7 +177,8 @@ export default {
this.address = { this.address = {
province: values.province.name || "", province: values.province.name || "",
city: values.city.name || "", city: values.city.name || "",
district: values.district.name || "" district: values.district.name || "",
city_id: values.city.id
}; };
this.addressText = `${this.address.province}${this.address.city}${this.address.district}`; this.addressText = `${this.address.province}${this.address.city}${this.address.district}`;
// this.addressText = // this.addressText =

54
pages/user/coupon/GetCoupon/index.vue

@ -1,30 +1,35 @@
<template> <template>
<view ref="container"> <view ref="container">
<view class="coupon-list" v-if="couponsList.length > 0"> <div class="coupon-list" v-if="couponsList.length > 0">
<view <div
class="item acea-row row-center-wrapper" class="item acea-row row-center-wrapper"
v-for="(item, couponsListIndex) in couponsList" v-for="(item, index) in couponsList"
:key="couponsListIndex" :key="index"
> >
<view class="money" :class="item.isUse ? 'moneyGray' : ''"> <div class="money" :class="item.isUse ? 'moneyGray' : ''">
<div>
<text class="num">{{ item.couponPrice }}</text>
</view> <span class="num">{{ item.couponPrice }}</span>
<view class="text"> </div>
<view class="condition line1">购物满{{ item.useMinPrice }}元可用</view> <div class="pic-num">{{ item.useMinPrice }}元可用</div>
<view class="data acea-row row-between-wrapper"> </div>
<view v-if="item.endTime !== 0"> <div class="text">
<data-format-t :date="item.startTime"></data-format-t>- <div class="condition line1">
<data-format-t :date="item.endTime"></data-format-t> <span class="line-title bg-color-check" v-if="item.ctype === 0">通用劵</span>
</view> <span class="line-title bg-color-check" v-else-if="item.ctype === 1">商品券</span>
<view v-else>不限时</view> <span class="line-title bg-color-check" v-else>未知</span>
<view class="bnt gray" v-if="item.isUse === true">已领取</view> <span>{{ item.cname }}</span>
<view class="bnt gray" v-else-if="item.isUse === 2">已领完</view> </div>
<view class="bnt bg-color-red" v-else @click="getCoupon(item.id, couponsListIndex)">立即领取</view> <div class="data acea-row row-between-wrapper">
</view> <div v-if="item.endTime !== 0">{{ item.startTime }}-{{ item.endTime }}</div>
</view> <div v-else>不限时</div>
</view> <div class="bnt gray" v-if="item.isUse === true">已领取</div>
</view> <div class="bnt gray" v-else-if="item.isUse === 2">已领完</div>
<div class="bnt bg-color-red" v-else @click="getCoupon(item.id, index)">立即领取</div>
</div>
</div>
</div>
</div>
<Loading :loaded="loadend" :loading="loading"></Loading> <Loading :loaded="loadend" :loading="loading"></Loading>
<!--暂无优惠券--> <!--暂无优惠券-->
@ -76,7 +81,8 @@ export default {
}) })
.catch(function(err) { .catch(function(err) {
uni.showToast({ 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", icon: "none",
duration: 2000 duration: 2000
}); });

6
pages/user/promotion/UserPromotion/index.vue

@ -20,7 +20,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="bnt bg-color-red" @click="toCash">立即提现</view> <!-- <view class="bnt bg-color-red" @click="toCash">立即提现</view> -->
<view class="list acea-row row-between-wrapper"> <view class="list acea-row row-between-wrapper">
<view class="item acea-row row-center-wrapper row-column" @click="goPoster()"> <view class="item acea-row row-center-wrapper row-column" @click="goPoster()">
<text class="iconfont icon-erweima"></text> <text class="iconfont icon-erweima"></text>
@ -38,6 +38,10 @@
<text class="iconfont icon-dingdan"></text> <text class="iconfont icon-dingdan"></text>
<view>推广人订单</view> <view>推广人订单</view>
</view> </view>
<view class="item acea-row row-center-wrapper row-column" @click="toCash()">
<text class="iconfont icon-chongzhi"></text>
<view>立即提现</view>
</view>
</view> </view>
</view> </view>
</template> </template>

BIN
static/images/promotionBg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Loading…
Cancel
Save