Browse Source

修改样式

hfll
longjieli 5 months ago
parent
commit
3f0c29dd6a
31 changed files with 1328 additions and 1094 deletions
  1. +1
    -1
      App.vue
  2. +25
    -0
      api/model/index.js
  3. +29
    -30
      api/model/info.js
  4. +1
    -1
      api/model/vip.js
  5. +7
    -7
      components/couponPopup/couponPopup.vue
  6. +46
    -11
      components/product/productItem.vue
  7. +32
    -5
      components/user/productList.vue
  8. +67
    -45
      pages/index/center.vue
  9. +54
    -50
      pages/index/index.vue
  10. +90
    -93
      pages/index/order.vue
  11. +117
    -133
      pages_order/components/address/addressList.vue
  12. +3
    -2
      pages_order/components/product/submit.vue
  13. +19
    -193
      pages_order/mine/coupon.vue
  14. +54
    -52
      pages_order/mine/help.vue
  15. +36
    -36
      pages_order/mine/memberCenter.vue
  16. +6
    -23
      pages_order/mine/moreCommodity.vue
  17. +56
    -13
      pages_order/mine/partner.vue
  18. +84
    -31
      pages_order/mine/recruit.vue
  19. +190
    -65
      pages_order/mine/runningWater.vue
  20. +53
    -83
      pages_order/mine/withdraw.vue
  21. +128
    -59
      pages_order/order/createOrder.vue
  22. +170
    -96
      pages_order/order/orderDetail.vue
  23. +13
    -19
      pages_order/product/productDetail.vue
  24. BIN
      pages_order/static/coupon/bg.png
  25. BIN
      pages_order/static/coupon/examine.png
  26. BIN
      pages_order/static/coupon/register-success.png
  27. BIN
      pages_order/static/home/4.png
  28. BIN
      pages_order/static/recruit/bg.png
  29. +0
    -0
      static/image/coupon/close-btn.png
  30. BIN
      static/image/home/1.png
  31. +47
    -46
      store/store.js

+ 1
- 1
App.vue View File

@ -15,7 +15,7 @@
// css
@import url("common.scss");
body{
body {
background-color: #f7f7f7;
font-size: 30rpx;
}


+ 25
- 0
api/model/index.js View File

@ -117,6 +117,31 @@ const api = {
url: '/index_common/getRiceAdList',
method: 'GET',
},
//获取优惠券信息
getRiceCouponList: {
url: '/info_common/getRiceCouponList',
method: 'GET',
},
//增加或者修改合伙人申请信息
addOrUpdateCommonUser: {
url: '/index_common/addOrUpdateCommonUser',
method: 'POST',
},
//根据用户查询渠合伙人申请信息表单
getCommonUser: {
url: '/index_common/getCommonUser',
method: 'GET'
},
//提交反馈信息
addFeedback: {
url: '/info_common/addFeedback',
method: 'POST'
},
// 获取我的直接推荐间接推荐用户列表带分页
getHanHaiMemberUser: {
url: '/info_common/getHanHaiMemberUser',
method: 'GET'
},
}
export default api

+ 29
- 30
api/model/info.js View File

@ -1,87 +1,86 @@
// 个人相关接口
const api = {
// 充值
recharge: {
url: '/info_common/recharge',
url: '/info_common/withdraw',
method: 'GET',
auth : true,
limit : 1000,
showLoading : true,
auth: true,
limit: 1000,
showLoading: true,
},
// 提现
withdraw: {
url: '/info_common/withdraw',
method: 'GET',
auth : true,
limit : 1000,
showLoading : true,
auth: true,
limit: 1000,
showLoading: true,
},
// 获取地址列表带分页
getAddressPageList: {
url: '/info_common/getAddressPageList',
method: 'GET',
auth : true,
auth: true,
},
// 增加或修改地址信息
addOrUpdateAddress: {
url: '/info_common/addOrUpdateAddress',
method: 'POST',
limit : 500,
auth : true,
showLoading : true,
limit: 500,
auth: true,
showLoading: true,
},
// 删除地址
deleteAddress: {
url: '/info_common/deleteAddress',
method: 'GET',
limit : 500,
auth : true,
showLoading : true,
limit: 500,
auth: true,
showLoading: true,
},
// 修改默认地址
updateDefaultAddress: {
url: '/info_common/updateDefaultAddress',
method: 'GET',
auth : true,
limit : 1000,
auth: true,
limit: 1000,
},
// 获取粉丝列表带分页
getFansPageList: {
url: '/info_common/getFansPageList',
method: 'GET',
auth : true,
auth: true,
},
// 获取相关介绍
getInfoIntroduce: {
url: '/info_common/getInfoIntroduce',
method: 'GET',
auth : true,
auth: true,
},
// 获取个人邀请码
getInviteCode: {
url: '/info_common/getInviteCode',
method: 'GET',
auth : true,
auth: true,
},
// 获取订单列表带分页
getOrderPageList: {
url: '/info_common/getOrderPageList',
method: 'GET',
auth : true,
auth: true,
},
// 获取订单详情
getOrderDetail: {
url: '/info_common/getOrderDetail',
method: 'GET',
auth : true,
auth: true,
},
// 获取流水记录带分页
getWaterPageList: {
url: '/info_common/getWaterPageList',
method: 'GET',
auth : true,
auth: true,
},
// 获取相关介绍
getInfoIntroduce: {
@ -97,7 +96,7 @@ const api = {
getRiceInfo: {
url: '/info_common/getRiceInfo',
method: 'GET',
limit : 500,
limit: 500,
},
// 获取购物车信息列表带分页
getCartPageList: {
@ -108,17 +107,17 @@ const api = {
addOrUpdateCommonUser: {
url: '/info_common/addOrUpdateCommonUser',
method: 'POST',
limit : 500,
auth : true,
showLoading : true,
limit: 500,
auth: true,
showLoading: true,
},
// 查询渠道申请信息
getCommonUser: {
url: '/info_common/getCommonUser',
method: 'GET',
limit : 500,
auth : true,
showLoading : true,
limit: 500,
auth: true,
showLoading: true,
},
}

+ 1
- 1
api/model/vip.js View File

@ -4,7 +4,7 @@
const api = {
// 获取会员权益列表
getRiceVipList: {
url: '/rice_vip/getRiceVipList',
url: '/index_common/getVipInfoList',
method: 'GET',
},
// 申请成为会员


+ 7
- 7
components/couponPopup/couponPopup.vue View File

@ -5,8 +5,8 @@
<view class="couponPopup-wrapper">
<view class="main-container">
<view class="body">
<image src="@/pages_order/static/coupon/bg.png" mode="widthFix" class="coupon-bg"></image>
<image @click="closeCouponPopup" src="@/pages_order/static/coupon/close-btn.png" mode="widthFix"
<image :src="configList.wx_image" mode="widthFix" class="coupon-bg"></image>
<image @click="closeCouponPopup" src="@/static/image/coupon/close-btn.png" mode="widthFix"
class="close-btn">
</image>
<view class="coupon-money">
@ -15,11 +15,10 @@
20
</view>
</view>
<image src="@/pages_order/static/coupon/register-success.png" mode="widthFix"
class="register-success"></image>
<image :src="configList.qd_image" mode="widthFix" class="register-success"></image>
<view class="shopping">购物即可抵扣</view>
</view>
<image @click="examineCoupon" src="@/pages_order/static/coupon/examine.png" mode="widthFix" class="examine"></image>
<image @click="examineCoupon" :src="configList.down_image" mode="widthFix" class="examine"></image>
</view>
</view>
</uv-overlay>
@ -37,7 +36,7 @@
closeCouponPopup() {
this.show = false;
},
//
examineCoupon() {
this.$emit("examine")
@ -75,7 +74,8 @@
.body {
position: relative;
.coupon-bg {}
.coupon-bg {
}
.close-btn {
position: absolute;


+ 46
- 11
components/product/productItem.vue View File

@ -17,13 +17,17 @@
<!-- 价格 -->
<view class="price">
<view class="money">
<text>{{ item.vipPrice }}/元每件</text>
<!-- <text>{{ item.vipPrice }}</text> -->
<text>{{ getPriceByRole(item) }}</text>
<text class="unit">/元每件</text>
</view>
<view class="price-imgs">
<image :src="configList.vip_money_one" mode="widthFix" class="price-img"></image>
<image v-if="false" :src="configList.vip_money_onevip_money_two" mode="widthFix" class="price-img">
<image v-if="userInfo.role == 1" :src="configList.vip_money_one" mode="widthFix" class="price-img">
</image>
<image v-if="false" :src="configList.vip_money_three" mode="widthFix" class="price-img"></image>
<image v-if="userInfo.role == 2" :src="configList.vip_money_two" mode="widthFix" class="price-img">
</image>
<image v-if="userInfo.role == 3" :src="configList.vip_money_three" mode="widthFix"
class="price-img"></image>
</view>
</view>
@ -35,12 +39,12 @@
</view>
<view class="sales-volume-number">
已售出32490+
已售出{{ item.num }}+
</view>
</view>
<!-- 购买按钮 -->
<view class="buy-btn">
<view @click.stop="purchase(item.id)" class="buy-btn">
购买
</view>
</view>
@ -48,19 +52,47 @@
</template>
<script>
import {
mapState
} from 'vuex'
export default {
props: {
item: {
default: {}
}
},
computed: {
...mapState(['userInfo'])
},
data() {
return {
}
},
methods: {
// ()
purchase(id) {
this.$api('getRiceProductDetail', {
id
}, res => {
if (res.code == 200) {
res.result.num = 1
this.$store.commit('setPayOrderProduct', [
res.result
])
this.$utils.navigateTo('/pages_order/order/createOrder')
}
})
},
//
getPriceByRole(item) {
let priceFiledList = ['goldPrice','silverPrice','diamondPrice']
let price = item[priceFiledList[this.userInfo.role - 1]]
return price >= 0 ? price : item.price
}
}
}
</script>
@ -70,12 +102,12 @@
width: 100%;
padding: 10rpx 20rpx;
align-items: center;
margin-bottom: 20rpx;
display: flex;
box-sizing: border-box;
border-bottom: 1rpx solid #00000012;
background: white;
border-radius: 20rpx;
margin-bottom: 20rpx;
//
.item-image {
@ -85,7 +117,6 @@
image {
height: 100%;
width: 100%;
border-radius: 20rpx;
}
}
@ -99,12 +130,12 @@
//
.title {
width: 100%;
width: 280rpx;
font-size: 28rpx;
font-weight: bold;
overflow: hidden; //
text-overflow: ellipsis; //
// white-space: nowrap; //
white-space: nowrap; //
}
//
@ -116,6 +147,10 @@
.money {
font-size: 30rpx;
.unit {
font-size: 20rpx;
}
}
.price-imgs {


+ 32
- 5
components/user/productList.vue View File

@ -16,15 +16,15 @@
<text>{{ item.price }}</text>/
</view>
<view class="oldPrice">
<text>{{ item.oldPrice }}</text>/
<text>{{ item.oldPrice }}</text>
</view>
</view>
<view class="num">
已售卖5000+
已售卖{{ item.num }}+
</view>
</view>
<view class="btn">
<view @click.stop="purchase(item.id)" class="btn">
购买
</view>
</view>
@ -47,7 +47,20 @@
};
},
methods: {
// ()
purchase(id) {
this.$api('getRiceProductDetail', {
id
}, res => {
if (res.code == 200) {
res.result.num = 1
this.$store.commit('setPayOrderProduct', [
res.result
])
this.$utils.navigateTo('/pages_order/order/createOrder')
}
})
},
},
}
</script>
@ -65,6 +78,7 @@
background-color: #fff;
border-radius: 20rpx;
margin-left: 20rpx;
margin-bottom: 20rpx;
.image {
width: 300rpx;
@ -75,10 +89,23 @@
.product-info {
font-size: 24rpx;
.product-title {}
.product-title {
font-weight: bold;
display: -webkit-box;
/* 兼容WebKit内核浏览器 */
-webkit-line-clamp: 2;
/* 显示最大3行 */
-webkit-box-orient: vertical;
/* 设置垂直方向上的排列方式 */
overflow: hidden;
/* 隐藏溢出内容 */
text-overflow: ellipsis;
/* 当文本溢出时显示省略号 */
}
.product-main {
display: flex;
align-items: flex-end;
.sale-information {
width: 75%;


+ 67
- 45
pages/index/center.vue View File

@ -6,7 +6,7 @@
<!-- 头部 -->
<view class="head">
<view class="headImage">
<image :src="userInfo.headImage" mode="widthFix"></image>
<image :src="userInfo.headImage" mode="aspectFill"></image>
</view>
<view class="user-info">
@ -14,20 +14,22 @@
<view class="user-base-top">
<view class="user-name">{{ userInfo.nickName}}</view>
<view class="member-level">
<image src="@/static/image/center/diamond-min.png" mode="widthFix" class="level"></image>
<image v-if="false" src="@/static/image/center/gold-min.png" mode="widthFix" class="level">
<image v-if="userInfo.role == 1" :src="configList.vip_user" mode="aspectFill" class="level">
</image>
<image v-if="false" src="@/static/image/center/sliver-min.png" mode="widthFix"
<image v-if="userInfo.role == 2" src="@/static/image/center/gold-min.png" mode="aspectFill"
class="level">
</image>
<image v-if="userInfo.role == 3" src="@/static/image/center/sliver-min.png"
mode="aspectFill" class="level">
</image>
</view>
<view class="user-tag">
合伙人
{{ userRole[userInfo.isPay] }}
</view>
</view>
<view class="edit-user">
<image src="@/static/image/center/edit-icon.png" mode="widthFix" class="edit-icon"></image>
<image src="@/static/image/center/edit-icon.png" mode="aspectFill" class="edit-icon"></image>
<view class="edit-btn">
修改资料
</view>
@ -35,19 +37,19 @@
</view>
<view class="user-phone">
手机号:1820000000
手机号:{{ userInfo.phone }}
</view>
</view>
</view>
<!-- 会员卡片 -->
<view @click="$utils.navigateTo({url : '/pages_order/mine/memberCenter' })" class="earnings">
<view v-if="index==1" v-for="(item,index) in memberList" :key="item.id" class="member-item">
<image :src="item.memberBg" mode="widthFix" class="member-image"></image>
<view v-if="index + 1==userInfo.role" v-for="(item,index) in vipList" :key="item.id" class="member-item">
<image :src="item.headImage" mode="aspectFill" class="member-image"></image>
<view class="member-info">
<view class="profile-photo">
<image src="@/pages_order/static/card/profilePhoto.png" mode="widthFix" class="pro-img"></image>
<image :src="userInfo.headImage" mode="aspectFill" class="pro-img"></image>
<view class="open-status">
已开通29天
</view>
@ -60,22 +62,23 @@
</view>
<!-- 佣金数据 -->
<view class="brokerage-data">
<view @click="$utils.navigateTo('/pages_order/mine/withdraw')" class="brokerage-data"
:class="{'brokerage-data-mt' : !userInfo.role}">
<view class="brokerage">
<image :src="configList.money_image" mode="widthFix" class="brokerage-img"></image>
<image :src="configList.money_image" mode="aspectFill" class="brokerage-img"></image>
<div class="main">
<div class="title">我的佣金</div>
<div class="money">240</div>
<div class="money">{{ riceInfo.canWithdraw || 0 }}</div>
</div>
</view>
<view class="balance">
<image :src="configList.price_image" mode="widthFix" class="balance-img"></image>
<image :src="configList.price_image" mode="aspectFill" class="balance-img"></image>
<div class="main">
<div class="title">我的余额</div>
<div class="money">1200</div>
<div class="money">{{ riceInfo.balance || 0 }}</div>
</div>
</view>
</view>
@ -87,15 +90,15 @@
</view>
<view class="box">
<view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=1')">
<view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=0')">
<image src="@/static/image/center/1.png" mode="widthFix" />
<view class="title">我的订单</view>
</view>
<view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=2')">
<view class="boxs" @click="$utils.navigateTo('/pages_order/mine/partner')">
<image src="@/static/image/center/2.png" mode="widthFix" />
<view class="title">我的团队</view>
</view>
<view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=3')">
<view class="boxs" @click="$refs.customerServicePopup.open()">
<image src="@/static/image/center/3.png" mode="widthFix" />
<view class="title">联系客服</view>
</view>
@ -106,15 +109,15 @@
</view>
<view class="box">
<view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=1')">
<view class="boxs" @click="$utils.navigateTo('/pages_order/mine/recruit')">
<image src="@/static/image/center/5.png" mode="widthFix" />
<view class="title">广告招商</view>
</view>
<view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=2')">
<view class="boxs" @click="$utils.navigateTo('/pages_order/mine/memberCenter')">
<image src="@/static/image/center/6.png" mode="widthFix" />
<view class="title">会员权益</view>
</view>
<view class="boxs" @click="$utils.navigateTo('/pages/index/order?type=3')">
<view class="boxs" @click="$utils.navigateTo('/pages_order/mine/coupon')">
<image src="@/static/image/center/7.png" mode="widthFix" />
<view class="title">优惠券</view>
</view>
@ -129,14 +132,14 @@
<div v-if="showAdvertising" class="ad">
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="true" :interval="2000"
:duration="duration">
<swiper-item v-for="item in 10" :key="item">
<swiper-item v-for="(item,index) in adList" :key="index">
<view class="swiper-main">
<view @click="closeAdvertising" class="close">
<image src="@/static/image/center/close.png" mode="widthFix" class="close-img"></image>
<image src="@/static/image/center/close.png" mode="aspectFill" class="close-img"></image>
</view>
<image src="@/static/image/center/ad.png" mode="widthFix" class="swiper-main-img"></image>
<image :src="item" mode="aspectFill" class="swiper-main-img"></image>
<div class="ad-tag">
<image src="@/static/image/center/ad-tag.png" mode="widthFix" class="ad-tag-img"></image>
<image src="@/static/image/center/ad-tag.png" mode="aspectFill" class="ad-tag-img"></image>
</div>
</view>
</swiper-item>
@ -155,38 +158,35 @@
mapState
} from 'vuex'
import customerServicePopup from '@/components/config/customerServicePopup.vue'
export default {
components: {
tabber,
customerServicePopup,
},
computed: {
...mapState(['userInfo', 'riceInfo','configList']),
...mapState(['userInfo', 'riceInfo', 'configList']),
adList() {
let arr = [];
if (this.configList?.shop_get_image) {
arr = this.configList?.shop_get_image?.split(',')
}
return arr
}
},
data() {
return {
vipType: ['普通会员', '黄金会员', '渠道商'],
vipImage: ['vip_vip', 'vip_user', 'vip_shop'],
memberList: [{
id: 1,
memberBg: "/pages_order/static/card/diamond.png",
},
{
id: 2,
memberBg: "/pages_order/static/card/gold.png",
},
{
id: 3,
memberBg: "/pages_order/static/card/silver.png",
}
],
vipList: [],
showAdvertising: true,
userRole: ['会员', '用户', '渠道']
}
},
onShow() {
this.$store.commit('getUserInfo')
this.$store.commit('getRiceInfo')
this.getMemberCardData();
},
methods: {
clickNo() {
@ -198,6 +198,15 @@
//广
closeAdvertising() {
this.showAdvertising = false;
},
//
getMemberCardData() {
this.$api('getRiceVipList', res => {
if (res.code == 200) {
this.vipList = res.result
}
})
}
}
}
@ -222,7 +231,7 @@
background-size: 100%;
overflow: hidden;
border-radius: 50%;
margin-right: 40rpx;
margin-right: 20rpx;
image {
width: 100%;
@ -258,6 +267,7 @@
.level {
width: 120rpx;
height: 60rpx;
}
}
@ -282,6 +292,7 @@
.edit-icon {
width: 30rpx;
height: 30rpx;
}
.edit-btn {
@ -300,15 +311,17 @@
//
.earnings {
padding: 20rpx;
padding: 0rpx 20rpx;
box-sizing: border-box;
margin-top: -22%;
margin-top: -18%;
.member-item {
position: relative;
.member-image {
width: 100%;
height: 300rpx;
border-radius: 20rpx;
}
.member-info {
@ -329,6 +342,7 @@
.pro-img {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
}
.open-status {
@ -356,7 +370,7 @@
display: flex;
flex-wrap: wrap;
box-sizing: border-box;
margin: 0rpx 20rpx 20rpx 20rpx;
margin: 20rpx 20rpx 20rpx 20rpx;
.brokerage,
.balance {
@ -367,6 +381,7 @@
.brokerage-img,
.balance-img {
width: 50%;
height: auto;
}
.main {
@ -390,6 +405,10 @@
}
}
.brokerage-data-mt {
margin-top: 50rpx;
}
//
.myServer {
margin: 0rpx 20rpx 20rpx 20rpx;
@ -451,6 +470,8 @@
.swiper-main-img {
width: 100%;
height: 200rpx;
border-radius: 20rpx;
}
.ad-tag {
@ -459,7 +480,8 @@
bottom: 20rpx;
.ad-tag-img {
width: 100rpx;
width: 120rpx;
height: auto;
}
}
}


+ 54
- 50
pages/index/index.vue View File

@ -39,46 +39,42 @@
</view>
</view>
<view class="new-perple-top-right">
<image src="@/static/image/home/view-more.png" mode="widthFix"></image>
<image :src="configList.index_model" mode="aspectFill"></image>
</view>
</view>
<view class="new-perple-main">
<view class="red-packet">
<image src="@/static/image/home/red-packet.png" mode="widthFix"></image>
<image src="@/static/image/home/red-packet.png" mode="aspectFill"></image>
</view>
<view v-for="item in adList" :key="item.id" class="activity">
<image :src="item.icon" mode="widthFix"></image>
<image src="@/static/image/home/exclusive.png" mode="widthFix"></image>
<view class="product-price">
<view v-for="item in adList" :key="item.id" @click="toUrl(item.url)" class="activity">
<image :src="item.icon" mode="aspectFill"></image>
<view class="title">{{ item.title }}</view>
<!-- <view class="product-price">
100
</view>
</view> -->
</view>
</view>
</view>
<!-- 视频 -->
<view class="video-line">
<view v-if="configList.index_vo" class="video-line">
<view class="line"></view>
视频
</view>
<view class="video-list">
<scroll-view class="scroll-view_H" scroll-x="true" @scroll="scroll">
<view v-for="item in 10" :key="item" class="video-item">
<video src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4"
@error="videoErrorCallback" :danmu-list="danmuList" controls class="product-video"></video>
</view>
</scroll-view>
<view v-if="configList.index_vo" class="video-item">
<video :src="configList.index_vo" object-fit="cover" @error="videoErrorCallback" :danmu-list="danmuList"
controls class="product-video"></video>
</view>
<!-- 推荐 -->
<view class="recommend">
<view class="recommend-title">推荐宝贝</view>
<view class="recommend-more">更多</view>
<view @click="$utils.navigateTo('/pages_order/mine/moreCommodity')" class="recommend-more">更多</view>
</view>
<!-- 商品列表 -->
<view style="position: 20rpx;">
<productList :list="commonProductList" />
<productList :list="list" />
</view>
<!-- 全局弹框 -->
@ -125,9 +121,9 @@
commonProductList: [], //
riceProductList: [], //
newList: [], //
mixinsListApi: 'getClassShophomeList',
showCouponPopup: true,
adList : []
mixinsListApi: 'getClassShopPageList',
showCouponPopup: false,
adList: []
}
},
computed: {},
@ -141,7 +137,7 @@
this.getRiceNoticeList()
this.getRiceIconList()
this.getRiceAdList()
// this.getRiceCommonProductList()
this.getRiceInfo()
},
onPullDownRefresh() {
this.getBanner()
@ -174,16 +170,6 @@
})
},
//
// getRiceCommonProductList() {
// this.$api('getRiceCommonProductList', res => {
// uni.stopPullDownRefresh()
// if (res.code == 200) {
// this.commonProductList = res.result
// }
// })
// },
//
getRiceProductList() {
this.$api('getRiceProductList', res => {
@ -220,11 +206,23 @@
})
},
//
getRiceInfo() {
this.$api('getRiceInfo', {
token: uni.getStorageSync('token') || ''
}, res => {
if (res.code == 200) {
this.showCouponPopup = res?.result?.isGetCoupon
}
})
},
//
toUrl(url) {
if (!url) {
uni.showToast({
title: '功能暂未开放'
title: '功能暂未开放',
icon: 'none'
})
return
}
@ -257,7 +255,7 @@
uni.navigateTo({
url: "/pages_order/mine/coupon"
})
}
},
},
}
</script>
@ -339,6 +337,7 @@
image {
width: 80px;
height: 40rpx;
}
}
}
@ -353,7 +352,8 @@
width: 20%;
image {
width: 80%;
width: 120rpx;
height: 120rpx;
}
}
@ -367,12 +367,22 @@
border-radius: 10px;
image {
width: 80%;
width: 100rpx;
height: 100rpx;
}
.title {
background: $uni-color;
color: white;
border-radius: 20rpx;
font-size: 24rpx;
padding: 5rpx 20rpx;
margin: 10rpx 0rpx;
}
.product-price {
color: $uni-color;
font-size: 24rpx;
}
}
}
@ -395,21 +405,15 @@
}
}
.video-list {
.scroll-view_H {
white-space: nowrap;
width: 750rpx;
.video-item {
display: inline-block;
width: 35%;
border: 1px solid #ccc;
.video-item {
display: flex;
justify-content: center;
align-items: center;
margin: 20rpx 0rpx;
.product-video {
width: 100%;
height: 70px;
}
}
.product-video {
border-radius: 20rpx;
width: calc(710rpx);
}
}


+ 90
- 93
pages/index/order.vue View File

@ -12,61 +12,62 @@
<view class="list">
<view class="item" v-for="(item, index) in list" @click="toOrderDetail(item.id)" :key="index">
<view class="top">
<view class="service">
<!-- <text>{{item.projectId_dictText}}</text>
<text>{{item.type_dictText}}</text> -->
</view>
<view class="status">
<text> {{ tabs[Number(item.state) + 1].name }}</text>
</view>
</view>
<view class="content" :key="index" v-for="(good, index) in item.commonOrderSkuList">
<view class="left">
<image mode="aspectFill" :src="good.image && good.image.split(',')[0]"></image>
</view>
<view class="right">
<view class="text-hidden-1">
商品{{good.title}}
<view class="top">
<view class="service">
{{ good.title }}
</view>
<view class="text-hidden-1">
规格{{good.sku}}
<view class="status">
<text> {{ tabs[Number(item.state) + 1].name }}</text>
</view>
<view class="text-hidden-1">
数量{{good.num}}
</view>
<view class="main">
<view class="left">
<image mode="aspectFill" :src="good.image && good.image.split(',')[0]"></image>
</view>
<!-- <view class="text-hidden-1">
总计时间{{item.useTime}}分钟
</view> -->
<view class="right">
<view class="text-hidden-1">
客户姓名{{item.name}}
</view>
<view class="text-hidden-1">
下单时间{{item.createTime}}
</view>
<view class="text-hidden-1">
联系电话{{item.phone}}
</view>
</view>
</view>
</view>
<view class="bottom">
<view class="price">
实付款<text class="num">{{item.price}}</text>
<text class="total-title">总价格</text>
<text class="unit"></text>
<text class="num">{{item.price}}</text>
<text class="c-unit"></text>
</view>
<!-- <view class="b1">
查看物流
</view> -->
<view @click.stop="toPayOrder(item)" class="b2" v-if="item.state == 0">
<view @click.stop="toPayOrder(item)" class="btn" v-if="item.state == 0">
立即付款
</view>
<view class="b2" @click.stop="confirmOrder(item)" v-if="item.state == 2">
<view class="btn" @click.stop="confirmOrder(item)" v-if="item.state == 2">
确认收货
</view>
<view @click.stop="$refs.customerServicePopup.open()" class="btn" v-if="item.state > 0">
联系客服
</view>
</view>
</view>
</view>
<customerServicePopup ref="customerServicePopup" />
<tabber select="order" />
</view>
@ -79,10 +80,13 @@
import mixinsList from '@/mixins/list.js'
import mixinsOrder from '@/mixins/order.js'
import tabber from '@/components/base/tabbar.vue'
import customerServicePopup from '@/components/config/customerServicePopup.vue'
export default {
mixins: [mixinsList, mixinsOrder],
components: {
tabber,
customerServicePopup
},
computed: {},
data() {
@ -94,13 +98,10 @@
name: '待付款'
},
{
name: '待发货'
},
{
name: '待收货'
name: '已完成'
},
{
name: '已完成'
name: '已取消'
}
],
current: 0,
@ -113,13 +114,11 @@
index: this.current
})
},
onShow() {},
methods: {
//tab
clickTabs({
index
}) {
console.log(index);
if (index == 0) {
delete this.queryParams.state
} else {
@ -153,44 +152,51 @@
border-radius: 16rpx;
padding: 30rpx;
.top {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30rpx;
.service {}
.content {
.top {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 34rpx;
.status {
font-size: 26rpx;
font-weight: 600;
.status {
font-weight: 600;
color: #FFAC2F;
}
}
}
.content {
display: flex;
margin: 10rpx 0;
.left {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
.main {
display: flex;
margin: 20rpx 0rpx;
.left {
display: flex;
align-items: center;
justify-content: center;
width: 180rpx;
height: 180rpx;
image {
width: 95%;
height: 95%;
border-radius: 10rpx;
}
}
image {
width: 150rpx;
height: 150rpx;
.right {
display: flex;
flex-direction: column;
justify-content: space-between;
width: calc(100% - 200rpx);
color: #777;
font-size: 26rpx;
padding: 30rpx 20rpx;
box-sizing: border-box;
margin-left: 20rpx;
border-radius: 10rpx;
background-color: #F8F8F8;
}
}
.right {
width: calc(100% - 160rpx);
color: #777;
font-size: 24rpx;
padding-left: 20rpx;
line-height: 40rpx;
background-color: #F8F8F8;
}
}
.bottom {
@ -199,33 +205,24 @@
font-size: 25rpx;
.price {
font-weight: 900;
.total-title {}
text {
color: #ff780099;
font-size: 30rpx;
.num {
font-size: 36rpx;
}
}
.b1 {
border: 1px solid #777;
color: #777;
box-sizing: border-box;
}
.b2 {
background: $uni-color;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
.num,
.unit,
.c-unit {
color: $uni-color;
}
}
view {
margin: 12rpx;
border-radius: 28rpx;
padding: 16rpx 48rpx;
margin-bottom: 0;
.btn {
border: 1px solid #C7C7C7;
padding: 10rpx 20rpx;
border-radius: 40rpx;
color: #575757;
}
}
}


+ 117
- 133
pages_order/components/address/addressList.vue View File

@ -1,89 +1,73 @@
<template>
<scroll-view
scroll-y="true"
:style="{height: height}"
@scrolltolower="moreAddress">
<uv-radio-group v-model="selectAddress"
@change="editDefault"
v-if="addressList.length > 0">
<scroll-view scroll-y="true" :style="{height: height}" @scrolltolower="moreAddress">
<uv-radio-group v-model="selectAddress" @change="editDefault" v-if="addressList.length > 0">
<view v-for="item in addressList" :key="item.id" class="address-item">
<view class="address-item-top"
@click="select(item)">
<view class="address-item-top" @click="select(item)">
<view class="img-box">
<image src="../../static/address/icon1.png" mode="aspectFill"></image>
<image src="../../static/address/icon.png" mode="aspectFill"></image>
</view>
<view class="address-info">
<view class="user-info">
<text class="user-name">{{ item.name }}</text>
<text class="user-phone">{{ item.phone }}</text>
<text v-if="item.defaultFlag == 1" class="is-default">默认</text>
</view>
<view class="address-detail">
{{ item.address + " " + item.addressDetails }}
</view>
</view>
</view>
<view class="controls"
v-if="controls">
<view class="controls" v-if="controls">
<view class="default-checkbox">
<uv-radio
:name="item.id"
label-disabled
size="30rpx"
icon-size="30rpx">
<uv-radio :name="item.id" label-disabled size="30rpx" icon-size="30rpx" activeColor="#E3441A">
默认地址
</uv-radio>
</view>
<view class="edit-btn">
<uv-icon name="edit-pen"></uv-icon>
<text @click="editAddress(item)" class="control-title">编辑</text>
</view>
<view class="del-btn">
<uv-icon name="trash"></uv-icon>
<text class="control-title" @click="deleteAddress(item.id)">删除</text>
</view>
</view>
</view>
</uv-radio-group>
<view
style="padding: 100rpx 0;"
v-else>
<uv-empty
mode="history"
textSize="28rpx"
iconSize="100rpx"/>
<view style="padding: 100rpx 0;" v-else>
<uv-empty mode="history" textSize="28rpx" iconSize="100rpx" />
</view>
</scroll-view>
</template>
<script>
export default {
props : {
controls : {
default : false,
type : Boolean,
props: {
controls: {
default: false,
type: Boolean,
},
height : {
default : 'calc(90vh - 180rpx)'
height: {
default: 'calc(90vh - 180rpx)'
}
},
data() {
return {
selectAddress : 0,
selectAddress: 0,
queryParams: {
pageNo: 1,
pageSize: 10,
},
addressList: [],
total : 0,
total: 0,
}
},
methods: {
@ -105,27 +89,27 @@
})
},
//
moreAddress(){
if(this.queryParams.pageSize > this.total){
moreAddress() {
if (this.queryParams.pageSize > this.total) {
return
}
this.queryParams.pageSize += 10
this.getAddressList()
},
//
deleteAddress(e){
deleteAddress(e) {
this.$emit('deleteAddress', e)
},
//
editAddress(e){
editAddress(e) {
this.$emit('editAddress', e)
},
//
editDefault(e){
editDefault(e) {
this.$emit('editDefault', e)
},
//
select(e){
select(e) {
this.$emit('select', e)
},
}
@ -133,112 +117,112 @@
</script>
<style scoped lang="scss">
.address-item {
background: white;
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 20rpx;
padding: 15rpx 15rpx 0rpx 15rpx;
width: 680rpx;
.address-item-top {
border-bottom: 1px dashed #D3D1D1;
display: flex;
align-items: center;
padding: 0rpx 0rpx 15rpx 0rpx;
.img-box {
width: 100rpx;
height: 120rpx;
image {
width: 75%;
height: 75%;
display: block;
margin: 12.5% auto;
}
}
.address-info {
width: calc(100% - 120rpx);
height: 100%;
.address-item {
background: white;
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 20rpx;
padding: 15rpx 15rpx 0rpx 15rpx;
.address-item-top {
border-bottom: 1px dashed #D3D1D1;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding: 0rpx 0rpx 15rpx 0rpx;
.user-info {
display: flex;
align-items: center;
.img-box {
width: 100rpx;
height: 100rpx;
text {
image {
width: 100%;
height: 100%;
display: block;
line-height: 40rpx;
margin-right: 20rpx;
}
}
.user-name,
.user-phone {
font-size: 30rpx;
}
.address-info {
width: calc(100% - 100rpx);
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
box-sizing: border-box;
padding-left: 10rpx;
.is-default {
.user-info {
display: flex;
align-items: center;
justify-content: center;
background: #FEB773;
color: white;
width: 80rpx;
height: 35rpx;
border-radius: 20rpx;
font-size: 22rpx;
text {
display: block;
line-height: 40rpx;
margin-right: 20rpx;
}
.user-name,
.user-phone {
font-size: 30rpx;
}
.is-default {
display: flex;
align-items: center;
justify-content: center;
background: #FEB773;
color: white;
width: 80rpx;
height: 35rpx;
border-radius: 20rpx;
font-size: 22rpx;
}
}
}
.address-detail {
color: #4a4a4a;
font-size: 26rpx;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
.address-detail {
color: #4a4a4a;
font-size: 26rpx;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
}
}
}
}
.controls {
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
font-size: 26rpx;
padding: 15rpx 15rpx 25rpx 15rpx;
.default-checkbox {
.controls {
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
font-size: 26rpx;
padding: 15rpx 15rpx 25rpx 15rpx;
.default-checkbox {
display: flex;
text {
margin-left: 8rpx;
text {
margin-left: 8rpx;
}
}
}
.control-title {
height: 30rpx;
line-height: 30rpx;
color: #666666;
}
.control-title {
height: 30rpx;
line-height: 30rpx;
color: #666666;
}
view {
display: flex;
align-items: center;
}
view {
display: flex;
align-items: center;
}
image {
width: 23rpx;
height: 23rpx;
vertical-align: middle;
margin-right: 8rpx;
image {
width: 23rpx;
height: 23rpx;
vertical-align: middle;
margin-right: 8rpx;
}
}
}
}
</style>
</style>

+ 3
- 2
pages_order/components/product/submit.vue View File

@ -73,16 +73,17 @@
.title {
font-size: 26rpx;
color: #666666;
}
}
.submit-btn {
width: calc(100% - 100rpx);
width: calc(100% - 140rpx);
height: 80rpx;
color: #fff;
border-radius: 40rpx;
font-size: 28rpx;
margin: 20rpx auto;
margin-left: 40rpx;
display: flex;
justify-content: center;
align-items: center;


+ 19
- 193
pages_order/mine/coupon.vue View File

@ -1,5 +1,5 @@
<template>
<scroll-view scroll-y="true" :style="{height: height}" @scrolltolower="loadMoreData">
<view class="coupon">
<!-- 导航栏 -->
<navbar title="优惠券" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
@ -9,58 +9,18 @@
:activeStyle="{ color : '#E3441A' }"></uv-tabs>
</view>
<!-- 优惠券列表 -->
<view class="list">
<view class="item" v-for="(item,index) in coupons" @click="select(item)" :key="index">
<image src="@/pages_order/static/coupon/coupon-bg.png" mode="widthFix" class="coupon-bg"></image>
<view class="item-con">
<view class="price-time">
<view class="price">
<view class="num">
<view class="icon">
</view>
{{ item.money }}
</view>
</view>
<view class="date-tiao">
<view class="time">
{{ item.time || '不限' }}
</view>
<view class="tiao">
{{ item.tiaojian }}
</view>
</view>
</view>
<view class="status">
<view class="order-status">
<image src="@/pages_order/static/coupon/status.png" mode="widthFix" class="status-img">
</image>
<view class="text">
已领取
</view>
</view>
<view class="surplus">
剩余28天过期
</view>
</view>
</view>
</view>
</view>
<uv-empty v-if="coupons.length == 0" text="空空如也" textSize="30rpx" iconSize="200rpx" icon="list"></uv-empty>
</scroll-view>
<couponList ref="couponList" :list="list" :state="state"></couponList>
</view>
</template>
<script>
import mixinList from '@/mixins/list.js'
import couponList from "@/components/couponList/couponList.vue"
export default {
name: "couponList",
mixins: [mixinList],
name: "coupon",
components: {
couponList
},
props: {
height: {
default: 'auto'
@ -73,9 +33,11 @@
rentPrice: { //
},
},
onShow() {
this.getCouponList()
},
data() {
return {
mixinsListApi: 'couponPage',
filtrationMenu: [{
name: "全部优惠券"
}, {
@ -83,18 +45,15 @@
}, {
name: "已过期优惠券"
}],
activefiltration: 0,
coupons: [{
id: 1,
money: 20,
time: "12月20日-1月20日",
tiaojian: "无门槛使用",
state: 0,
ex: "28"
}]
state: 0
};
},
methods: {
//
getCouponList() {
this.$refs.couponList.getCouponList()
},
select(item) {
if (this.isSelect(item)) {
return
@ -133,7 +92,7 @@
//
hadleFiltrationMenuEvent(event) {
this.activefiltration = event.index
this.state = event.index
}
}
}
@ -152,137 +111,4 @@
}
}
}
.list {
.item {
color: #FDDFCD;
position: relative;
width: calc(100% - 40rpx);
height: 220rpx;
background-size: 100% 100%;
margin: 20rpx;
box-sizing: border-box;
padding: 30rpx;
.coupon-bg {
width: 100%;
position: absolute;
left: 0rpx;
top: 0rpx;
}
.item-con {
display: flex;
align-items: center;
flex-wrap: wrap;
position: absolute;
top: 50%;
left: 0rpx;
transform: translateY(-50%);
z-index: 99;
width: 100%;
.price-time {
display: flex;
width: 65%;
.price {
display: flex;
align-items: center;
.num {
color: #FFF8E9;
font-weight: 900;
font-size: 70rpx;
display: flex;
align-items: flex-end;
.icon {
color: #FFF8E9;
width: 30rpx;
height: 30rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 20rpx;
border-radius: 14rpx;
margin-bottom: 14rpx;
margin-right: 10rpx;
}
}
}
.date-tiao {
display: flex;
flex-direction: column;
align-items: center;
font-size: 24rpx;
box-sizing: border-box;
padding-left: 20rpx;
.time {}
.tiao {
display: flex;
justify-content: center;
background: #FDE5BA;
border-radius: 40rpx;
color: #FF2E34;
padding: 5rpx 20rpx;
margin-top: 15rpx;
}
}
}
.status {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 35%;
color: #FD4231;
padding-top: 30rpx;
.order-status {
position: relative;
width: 180rpx;
.status-img {
position: absolute;
left: 0;
width: 100%;
}
.text {
height: 90rpx;
display: flex;
justify-content: center;
align-items: center;
position: relative;
z-index: 100;
font-size: 34rpx;
font-weight: bold;
}
}
.surplus {
font-size: 22rpx;
text-align: center;
margin-top: 10rpx;
}
}
}
}
.del {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #ffffff99;
z-index: 99;
}
}
</style>

+ 54
- 52
pages_order/mine/help.vue View File

@ -5,23 +5,22 @@
<view class="help-box">
<view>
<view class="help-issue">
<text>问题和意见</text>
<text>帮助与反馈</text>
<text style="color: #BD3624;">*</text>
</view>
<uv-textarea v-model="form.question" :count="true" border="none" height="400"
placeholder="请把发现的问题提交给我们,感谢您的参与(必填)"
:text-style="{color:'#BCB7B7',fontSize:'28rpx'}" />
placeholder="请把您需要的帮助或者您发现的问题提交给我们,感谢您的参与(必填)" :text-style="{color:'#BCB7B7',fontSize:'28rpx'}" />
</view>
<view>
<view class="help-issue">
<text>问题截图</text>
<!-- <text style="color: #BD3624;">*</text> -->
<text style="color: #BD3624;">*</text>
</view>
<view class="help-screenshot">
<uv-upload :fileList="fileList" multiple :maxCount="3" width="180rpx"
height="180rpx" multiple @afterRead="afterRead" @delete="deleteImage">
<uv-upload :fileList="fileList" multiple :maxCount="3" width="180rpx" height="180rpx" multiple
@afterRead="afterRead" @delete="deleteImage">
<image src="../static/help/uploading.png" mode="aspectFill"
style="width: 180rpx;height: 180rpx;" />
</uv-upload>
@ -46,9 +45,9 @@
<input placeholder="请输入联系电话" v-model="form.phone" />
</view>
</view>
<view class="help-button">
<!-- <view>历史提交</view> -->
<view @click="submit">确认</view>
<view class="b-fiexd">
<view @click="submit" class="button-submit">确认</view>
</view>
</view>
</view>
@ -58,11 +57,11 @@
export default {
data() {
return {
form : {
question : '',
phone : '',
name : '',
image : '',
form: {
question: '',
phone: '',
name: '',
image: '',
},
fileList: []
}
@ -71,10 +70,10 @@
},
methods: {
deleteImage(e){
deleteImage(e) {
this.fileList.splice(e.index, 1)
},
afterRead(e){
afterRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
@ -84,28 +83,28 @@
})
})
},
submit(){
submit() {
let data = JSON.parse(JSON.stringify(this.form))
if(this.$utils.verificationAll(this.form, {
question : '请输入你的问题和意见',//
// image : '',//
name : '请输入姓名',//
phone : '请输入手机号码',//
})){
data.image = this.fileList.map((item) => item.url).join(",")
if (this.$utils.verificationAll(data, {
question: '请输入你的问题和意见', //
image: '请上传截图', //
name: '请输入姓名', //
phone: '请输入手机号码', //
})) {
return
}
data.image = this.fileList.map((item) => item.url).join(",")
this.$api('addAdvice', data, res => {
if(res.code == 200){
this.$api('addFeedback', data, res => {
if (res.code == 200) {
uni.showToast({
title: res.message,
icon:'none'
icon: 'none'
})
setTimeout(uni.navigateBack, 800, -1)
}
})
@ -133,38 +132,41 @@
background-color: #fff;
padding: 20rpx;
}
.form-sheet-cell{
.form-sheet-cell {
display: flex;
background-color: #fff;
padding: 20rpx 30rpx;
font-size: 24rpx;
align-items: center;
view{
view {
width: 150rpx;
}
}
.help-button {
display: flex;
justify-content: center;
font-size: 24rpx;
flex-shrink: 0;
margin-top: 60rpx;
.b-fiexd {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
view {
padding: 14rpx 120rpx;
border-radius: 38rpx;
}
.button-submit {
display: flex;
align-items: center;
justify-content: center;
width: 596rpx;
height: 90rpx;
background: #E3441A;
border-radius: 46rpx;
view:nth-child(1) {
background: $uni-color;
color: #fff;
}
margin: 20rpx auto;
view:nth-child(2) {
color: #FFFDF6;
background-color: #C83741;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
text-align: center;
color: #ffffff;
}
}
}


+ 36
- 36
pages_order/mine/memberCenter.vue View File

@ -5,7 +5,7 @@
<navbar title="会员中心" leftClick @leftClick="$utils.navigateBack" bgColor="#fff" color="#000" />
<!-- 会员卡片 -->
<swiper :slides-per-view="3" :space-between="50" @swiper="onSwiper" @slideChange="onSlideChange">
<!-- <swiper :slides-per-view="3" :space-between="50" @swiper="onSwiper" @slideChange="onSlideChange">
<swiper-slide v-for="item in memberList" :key="item.id" class="member-item">
<image :src="item.memberBg" mode="widthFix" class="member-image"></image>
<view class="member-info">
@ -21,6 +21,27 @@
</view>
</view>
</swiper-slide>
</swiper> -->
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
:duration="duration" style="height: 380rpx;">
<swiper-item v-for="item in list" :key="item.id">
<view class="member-item">
<image :src="item.headImage" mode="widthFix" class="member-image"></image>
<view class="member-info">
<view class="profile-photo">
<image :src="userInfo.headImage" mode="aspectFill" class="pro-img">
</image>
<view class="open-status">
暂未开通
</view>
</view>
<view class="open">
累计消费满{{ item.money }}元自动开通
</view>
</view>
</view>
</swiper-item>
</swiper>
<!-- 充值套餐 -->
@ -29,8 +50,8 @@
充值套餐
</view>
<view class="set-meal-list">
<view v-for="item in cardList" :key="item.id" :class="{'active-set-meal-item' : item.id == 1}"
class="set-meal-item">
<view v-for="item in cardList" :key="item.id"
:class="{'active-set-meal-item' : item.id == userInfo.role }" class="set-meal-item">
<view class="card-tag">
限时折扣
</view>
@ -71,47 +92,23 @@
</template>
<script>
import {
Swiper,
SwiperSlide
} from 'vue-awesome-swiper'
import 'swiper/css/swiper.css'
// import {
// Swiper,
// SwiperSlide
// } from 'vue-awesome-swiper'
// import 'swiper/css/swiper.css'
import mixinsList from '@/mixins/list.js'
export default {
name: "MemberCenter",
mixins: [mixinsList],
data() {
return {
memberList: [{
id: 1,
memberBg: "/pages_order/static/card/diamond.png",
},
{
id: 2,
memberBg: "/pages_order/static/card/gold.png",
},
{
id: 3,
memberBg: "/pages_order/static/card/silver.png",
}
],
list: [
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
'https://cdn.uviewui.com/uview/swiper/swiper1.png'
],
memberList: [{
id: 1,
memberBg: "/pages_order/static/card/diamond.png",
},
{
id: 2,
memberBg: "/pages_order/static/card/gold.png",
},
{
id: 3,
memberBg: "/pages_order/static/card/silver.png",
}
],
cardList: [{
id: 1,
title: "金卡",
@ -162,7 +159,8 @@
"银,金,钻不同会员等级,同一个商品分佣比例不一样,等级越高,佣金比例越高!"
]
}
]
],
mixinsListApi: "getRiceVipList"
}
},
methods: {
@ -177,11 +175,12 @@
//
.member-image {
width: 100%;
height: auto;
}
.member-info {
position: absolute;
bottom: 30rpx;
bottom: 40rpx;
left: 0rpx;
display: flex;
justify-content: space-between;
@ -197,6 +196,7 @@
.pro-img {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
}
.open-status {


+ 6
- 23
pages_order/mine/moreCommodity.vue View File

@ -23,15 +23,17 @@
<!-- 商品列表 -->
<view class="product-list">
<productList :list="commodiryList" />
<productList :list="list" />
</view>
</view>
</template>
<script>
import mixinList from '@/mixins/list.js'
import productList from '@/components/user/productList.vue'
export default {
name: "MoreCommodity",
mixins: [mixinList],
components: {
productList
},
@ -39,33 +41,15 @@
return {
filtrationList: ['综合', '销量', '价格', '上新'],
activeFiltration: 0,
commodiryList: []
mixinsListApi : "getClassShopPageList"
}
},
onShow() {
this.getRiceCommonProductList();
},
methods: {
//
changeFiltration(index) {
this.activeFiltration = index;
//
},
//
getRiceCommonProductList() {
this.$api('getRiceCommonProductList', res => {
uni.stopPullDownRefresh()
if (res.code == 200) {
this.commodiryList = res.result
}
})
},
//
getData() {
}
}
}
@ -74,7 +58,6 @@
<style lang="scss" scoped>
.more-commodity {
.more-commodity-header {
background: white;
padding: 20rpx;
@ -99,10 +82,10 @@
.filtration {
display: flex;
justify-content: space-between;
padding: 30rpx 20rpx;
padding: 20rpx;
.filtration-item {
font-size: 36rpx;
font-size: 28rpx;
}
.filtration-acitve-item {


+ 56
- 13
pages_order/mine/partner.vue View File

@ -8,13 +8,13 @@
<view class="partner-info-bg">
<view class="partner-info">
<view class="profile-photo">
<image src="@/pages_order/static/card/profilePhoto.png" mode="widthFix" class="pro-img"></image>
<image :src="userInfo.headImage" mode="aspectFill" class="pro-img"></image>
</view>
<view class="performance-information">
<view class="user-info-base">
<view class="username">18200000000</view>
<view class="user-tag">合伙人</view>
<view class="username">{{ userInfo.phone }}</view>
<view class="user-tag">{{ userRole[userInfo.isPay] }}</view>
</view>
<view class="live-performance">
@ -27,7 +27,7 @@
</view>
</view>
<view class="withdraw">
<view class="btn">
<view @click="$utils.navigateTo('/pages_order/mine/withdraw')" class="btn">
去提现
</view>
</view>
@ -37,20 +37,21 @@
</view>
<view class="tabs">
<uv-tabs :activeStyle="{ color : '#DC2828' }" lineColor="#DC2828" :list="tabList" @click="click"></uv-tabs>
<uv-tabs :activeStyle="{ color : '#DC2828' }" lineColor="#DC2828" :list="tabList"
@click="handleTabEvent"></uv-tabs>
</view>
<!-- 佣金列表 -->
<view class="brokerage-list">
<view v-for="item in 10" :key="item" class="brokerage-item">
<view v-for="item in users" :key="item.id" class="brokerage-item">
<view class="brokerage-user">
<image src="@/pages_order/static/card/profilePhoto.png" mode="widthFix" class="pro-img"></image>
<image :src="item.headImage" mode="widthFix" class="pro-img"></image>
<view class="name-time">
<view class="name">
用户138xxxxxxxx
{{ item.nickName }}
</view>
<view class="time">
已加入平台120
已加入平台{{ daysBetweenDates(item.createTime,new Date().toString())}}
</view>
</view>
</view>
@ -81,7 +82,45 @@
{
name: '间推用户'
}
]
],
state: 0,
users: [],
userRole: ['会员', '用户', '渠道']
}
},
onShow() {
this.getCommonUser()
},
methods: {
//
getCommonUser() {
this.$api('getHanHaiMemberUser', {
stete: this.state
}, res => {
if (res.code == 200) {
this.users = res?.result?.records
}
})
},
//tab
handleTabEvent(e) {
this.state = e.index;
this.getCommonUser();
},
//
daysBetweenDates(dateString1, dateString2) {
const date1 = new Date(dateString1.replace(/-/g, '/'));
const date2 = new Date(dateString2.replace(/-/g, '/'));
if (isNaN(date1) || isNaN(date2)) {
throw new Error('Invalid date string');
}
const timeDifference = Math.abs(date2 - date1);
const daysDifference = Math.floor(timeDifference / (1000 * 60 * 60 * 24));
return daysDifference;
}
}
}
@ -106,11 +145,15 @@
margin: 0rpx auto;
.profile-photo {
display: flex;
justify-content: center;
align-items: center;
width: 25%;
.pro-img {
width: 100%;
aspect-ratio: 1, 1;
width: 170rpx;
height: 170rpx;
border-radius: 50%;
}
}
@ -135,7 +178,7 @@
color: white;
margin-left: 20rpx;
border-radius: 20rpx;
padding: 3rpx 10rpx;
padding: 3rpx 20rpx;
font-size: 28rpx;
}
}


+ 84
- 31
pages_order/mine/recruit.vue View File

@ -4,10 +4,12 @@
<!-- 导航栏 -->
<navbar title="合伙人" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<view class="b-relative" style="width: 710rpx;margin: 20rpx;">
<image src="@/pages_order/static/recruit/bg.png" style="width: 710rpx;height: 310rpx;"></image>
<!-- 背景图 -->
<view class="bg">
<image :src="bg" mode="aspectFill" style="width: 100%;" class="bg-img"></image>
</view>
<!-- 表单 -->
<view class="item-card">
<view class="item-line">
<view class="before"></view>
@ -23,45 +25,117 @@
</view>
<view class="item-line">
<view class="label">所在地区</view>
<input placeholder="请输入所在地区" v-model="partnership.city" />
<input placeholder="请输入所在地区" v-model="partnership.address" />
</view>
<view class="item-line">
<view class="label">详细地址</view>
<textarea v-model="partnership.detailAddress" placeholder="请输入详细地址"></textarea>
<textarea v-model="partnership.addressdetail" placeholder="请输入详细地址"></textarea>
</view>
</view>
<view class="b-fiexd">
<view @click="addOrUpdateMsgTer" class="button-submit">提交</view>
<view @click="submit" class="button-submit">{{ partnership.id ? '修改' : '新增' }}</view>
</view>
<!-- <AreaSelector></AreaSelector> -->
</view>
</template>
<script>
// import AreaSelector from "../components/areaSelector/areaSelector.vue"
export default {
name: "Recruit",
components : { AreaSelector },
data() {
return {
partnership: {
name: "",
phone: "",
city: "",
detailAddress: ""
address: "",
addressdetail: ""
}
}
},
onShow() {
this.getCommonUser();
},
methods: {
//
submit() {
if (this.$utils.verificationAll(this.partnership, {
name: '请输入你的姓名', //
phone: '请输入联系方式', //
address: '请输入所在地区', //
addressdetail: '请输入详细地址', //
})) {
return
}
this.$api('addOrUpdateCommonUser', this.partnership, res => {
if (res.code == 200) {
uni.showToast({
title: this.partnership.id ? '修改成功' : '新增成功',
icon: "none"
})
setTimeout(uni.navigateBack, 800, -1)
}
})
},
//
getCommonUser() {
this.$api('getCommonUser', res => {
if (res.code == 200) {
const {
id,
name,
phone,
address,
addressdetail
} = res.result;
this.partnership = {
id,
name,
phone,
address,
addressdetail
}
}
})
}
},
computed: {
bg() {
let arr = [];
if (this.configList?.shop_get_image) {
arr = this.configList?.shop_get_image?.split(',')
}
return arr[0] || ''
}
}
}
</script>
<style lang="scss" scoped>
.recruit {
//
.bg {
width: 710rpx;
margin: 20rpx auto 0rpx auto;
.bg-img {
width: 100%;
height: 250rpx;
border-radius: 10rpx;
}
}
//
.item-card {
width: calc(710rpx - 40rpx);
height: auto;
background: #ffffff;
border-radius: 16rpx;
margin: 40rpx auto 20rpx;
padding: 40rpx 20rpx;
}
@ -77,7 +151,7 @@
margin-bottom: 40rpx;
&:nth-child(1) {
margin-bottom: 0rpx;
margin-bottom: 20rpx;
.label {
font-size: 36rpx;
@ -111,7 +185,6 @@
.item-line textarea {
width: 90%;
height: 60rpx;
line-height: 60rpx;
background: #f5f5f5;
border-radius: 12rpx;
@ -126,27 +199,7 @@
.item-line textarea {
height: 120rpx;
padding: 10rpx;
}
.upload {
display: flex;
align-items: center;
justify-content: center;
width: 200rpx;
height: 200rpx;
background: rgba(245, 245, 245, 0.82);
border: 2rpx dashed #99dcd0;
border-radius: 16rpx;
margin: 10rpx 12rpx;
}
.upload-img {
width: calc(100% - 4rpx);
height: calc(100% - 4rpx);
border: 2rpx dashed #ccc;
margin: 2rpx;
padding: 20rpx;
}
.b-fiexd {


+ 190
- 65
pages_order/mine/runningWater.vue View File

@ -1,88 +1,213 @@
<template>
<view class="running-water">
<navbar :title="title[status]" leftClick @leftClick="leftClick" />
<!-- 导航栏 -->
<navbar title="金额记录" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<view class="bg"></view>
<view class="money-info-wrapper">
<view class="money-info">
<view class="total-brokerage">
<view class="title">总佣金</view>
<view class="total-money">1240.00</view>
<view class="btn">
<view @click="$utils.navigateTo('/pages_order/mine/withdraw')" class="">
提现
</view>
</view>
</view>
<view class="total-withdraw">
<view class="title">累计提现</view>
<view class="total-money">15300.00</view>
<view class="btn">
<view class="">
提现记录
</view>
</view>
</view>
</view>
</view>
<view class="date-select">
<view class="select-title">
金额明细
</view>
<view class="year-info">
<view @click="openCalendars" class="time-unit">
{{ year }}
<uv-icon name="arrow-down-fill"></uv-icon>
</view>
<view @click="openCalendars" class="time-unit">
{{ month }}
<uv-icon name="arrow-down-fill"></uv-icon>
</view>
<text class="interval"></text>
<view @click="openCalendars" class="time-unit">
20
<uv-icon name="arrow-down-fill"></uv-icon>
</view>
</view>
</view>
<view class="tab-box">
<view class="tab-box1" v-if="agentFlow && agentFlow.total">
<uv-cell center border :title="item.title"
v-for="(item, index) in agentFlow.records"
:value="x[item.type] + item.money" :label="item.createTime" />
<view class="tab-box1" v-if="list && total">
<uv-cell center border :title="item.title" v-for="(item, index) in list" :key="index"
:value="x[item.type] + item.money" :label="item.createTime" />
</view>
<view
style="padding: 100rpx 0;"
v-else>
<uv-empty
mode="history"
textSize="28rpx"
iconSize="100rpx"/>
<view style="padding: 100rpx 0;" v-else>
<uv-empty mode="history" textSize="28rpx" iconSize="100rpx" />
</view>
</view>
<Calendars ref="calendars" @select="handleSelectCalendars"></Calendars>
</view>
</template>
<script>
import mixinsList from "@/mixins/list.js"
import Calendars from "@/components/calendars/index.vue"
export default {
mixins: [mixinsList],
components: {
Calendars
},
data() {
return {
title : ['余额记录','提现记录','佣金记录'],
agentFlow : {
total : 0,
records : [
{
type : 0,
money : 100,
createTime : '2024-04-02 20:00',
title : "佣金提现",
},
{
type : 0,
money : 100,
createTime : '2024-04-02 20:00',
title : "佣金提现",
},
{
type : 0,
money : 100,
createTime : '2024-04-02 20:00',
title : "佣金提现",
},
]
},
x : ['+', '-' , '-' , '+'],
status : 0,
x: ['+', '-', '-', '+'],
mixinsListApi: "getWaterPageList",
year : new Date().getFullYear(),
month : new Date().getMonth() + 1
}
},
onLoad(e) {
this.status = e.status
},
methods: {
leftClick() { //
uni.navigateBack(-1)
},
getAgentFlow(){ //
let type = this.status;
this.$api('getAgentFlow', { type }, res => {
if(res.code == 200){
this.agentFlow = res.result
}
})
//
openCalendars() {
if (this?.$refs?.calendars) {
this.$refs.calendars.open();
}
},
//
handleSelectCalendars(day) {
this.year = day.year;
this.month = day.month;
}
}
}
</script>
<style lang="scss" scoped>
.running-water{
width: 750rpx;
background: #F5F5F5;
margin: 0 auto;
min-height: 100vh;
.tab-box{
margin: 20rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
.running-water {
width: 750rpx;
background: #F5F5F5;
margin: 0 auto;
min-height: 100vh;
.bg {
background: $uni-color;
padding: 100rpx 0rpx;
box-sizing: border-box;
}
.money-info-wrapper {
padding: 0rpx 20rpx;
box-sizing: border-box;
background: white;
height: 130rpx;
.money-info {
display: flex;
flex-wrap: wrap;
background: white;
border-radius: 20rpx;
overflow: hidden;
transform: translateY(-60%);
box-shadow: 0rpx 0rpx 10rpx rgba(0, 0, 0, .1);
.total-brokerage,
.total-withdraw {
width: 50%;
text-align: center;
padding: 20rpx 0rpx;
.title {
font-size: 34rpx;
}
.total-money {
color: $uni-color;
font-size: 36rpx;
margin: 20rpx 0rpx;
}
.btn {
display: flex;
justify-content: center;
align-items: center;
view {
width: 40%;
border: 1px solid $uni-color;
padding: 10rpx;
color: $uni-color;
border-radius: 10rpx;
}
}
}
}
}
.date-select {
padding: 0rpx 20rpx;
box-sizing: border-box;
background: white;
padding-bottom: 20rpx;
display: flex;
justify-content: space-between;
.select-title {}
.year-info {
display: flex;
color: $uni-color;
font-size: 26rpx;
.time-unit {
display: flex;
align-items: center;
justify-content: space-between;
border: 1px solid $uni-color;
margin: 0rpx 10rpx;
border-radius: 10rpx;
box-sizing: border-box;
padding: 7rpx 12rpx;
&::v-deep .uv-icon {
display: flex;
align-items: center;
}
&::v-deep .uv-icon__icon {
color: $uni-color !important;
margin-left: 5rpx;
font-size: 20rpx !important;
}
}
.interval {
display: flex;
align-items: center;
}
}
}
.tab-box {
margin: 20rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
}
}
}
</style>
</style>

+ 53
- 83
pages_order/mine/withdraw.vue View File

@ -5,23 +5,23 @@
<!-- 佣金信息 -->
<view class="b-relative center font-m">
<image :src="configList.tx_image" />
<image :src="configList.tx_image" mode="aspectFill" />
<view class="user-money">
<view class="title">总佣金</view>
<view class="money">999999</view>
<view class="money">{{ riceInfo.canWithdraw}}</view>
</view>
<view class="operation">
<view class="operation-item">
<view @click="toRunningWater" class="operation-item">
余额记录
</view>
|
<view class="operation-item">
<view @click="toRunningWater" class="operation-item">
提现记录
</view>
|
<view class="operation-item">
<view @click="toRunningWater" class="operation-item">
佣金记录
</view>
</view>
@ -31,15 +31,18 @@
<view class="from-body">
<view class="title">我要提现</view>
<view class="money">
<uv-input placeholder="请输入提现金额" border="surround" v-model="form.money"></uv-input>
<view class="money-form">
<view class="unit">
</view>
<uv-input type="number" placeholder="请输入提现金额" border="surround" v-model.number="form.money"></uv-input>
</view>
</view>
<!-- 提现说明 -->
<view class="withdrawal-statement">
<view class="title">提现说明</view>
<view v-html="configList.recharge_instructions" class="withdrawal-statement"></view>
<view v-html="configList.recharge_instructions" class="withdrawal-statement" style="color: #666666;"></view>
</view>
<view class="recharge">
@ -57,50 +60,25 @@
} from 'vuex'
export default {
mixins: [mixinsList],
data() {
return {
mixinsListApi: 'getWaterPageList',
list: [],
type: ['+', '-'],
state: ['未到账', '已到账'],
form: {
money: ''
},
}
},
computed: {
...mapState(['userInfo', 'riceInfo']),
},
data() {
return {
form: {
type: 1,
price: undefined,
bank: '',
card: ''
money: ''
},
}
},
onShow() {
this.getConfig()
this.getUserInfo()
this.getTenRealName()
},
onShow() {},
methods: {
getConfig() { //
this.$api('getConfig', {}, res => {
if (res.code == 200) {
res.result.forEach(item => {
if (item.keyValue === 'withdraw') {
this.withdrawalStatement = item.content
}
})
}
})
},
withdraw() { //
if (this.form.money < 300) {
return uni.showToast({
title: '未满300元不可提现哦!',
icon: 'none'
})
}
let isOk = this.parameterVerification();
if (isOk && !isOk.auth) {
return uni.showToast({
@ -119,54 +97,26 @@
})
},
getTenRealName() { //
this.$api('getTenRealName', {}, res => {
if (res.code == 200) {
let result = res.result;
if (result && result.bank && result.card) {
this.form.bank = result.bank
this.form.card = result.card
}
}
})
},
parameterVerification() { //
let {
price,
bank,
card
money
} = this.form
if (!price) {
if (!money) {
return {
title: '请填写提现金额',
auth: false
}
} else if (price <= 0) {
return {
title: '提现金额必须大于0',
auth: false
}
} else if (price > this.userInfo.price) {
return {
title: '提现金额大于余额',
auth: false
}
} else if (bank.trim() == '') {
return {
title: '请填写开户行',
auth: false
}
} else if (card.trim() == '') {
return {
title: '请填写卡号',
auth: false
}
}
return {
title: '验证通过',
auth: true
}
},
toRunningWater() {
uni.navigateTo({
url: "/pages_order/mine/runningWater"
})
}
}
}
@ -218,7 +168,7 @@
display: flex;
justify-content: center;
color: white;
.operation-item {
margin: 0rpx 20rpx;
}
@ -231,20 +181,40 @@
text-align: left;
color: #333333;
}
.from-body .title{
.from-body .title {
font-size: 36rpx;
}
.money-form {
display: flex;
flex-wrap: wrap;
align-items: center;
background: #ebebeb;
border-radius: 10rpx;
margin-top: 20rpx;
}
.money-form .unit {
display: flex;
justify-content: flex-end;
color: $uni-color;
width: 60rpx;
}
&::v-deep .uv-border {
border: none;
}
.money {
margin: 20rpx 0rpx;
}
//
.withdrawal-statement {
padding: 0rpx 20rpx;
box-sizing: border-box;
.title {
font-size: 36rpx;
margin-bottom: 20rpx;


+ 128
- 59
pages_order/order/createOrder.vue View File

@ -7,24 +7,24 @@
<view class="box">
<!-- 商品详情 -->
<view class="product-item">
<view class="product-item" v-for="item in payOrderProduct" :key="item.id">
<view class="img-box">
<image :src="projectDetail.image" mode="aspectFill"></image>
<image :src="item.image" mode="aspectFill"></image>
</view>
<view class="server-info">
<view class="server-title">MOMEIREN双面黑钻项链</view>
<view class="server-title">{{ item.title }}</view>
<view class="texture">
材质S25银
材质暂无
</view>
<view class="stepper">
<uv-number-box button-size="60" v-model="value" @change="valChange"></uv-number-box>
<uv-number-box button-size="60" v-model="item.num"></uv-number-box>
</view>
<view class="sales-volume">
<view class="desc">已售出 666+ </view>
<view class="desc">已售出 {{ item.num }}</view>
</view>
</view>
</view>
@ -42,42 +42,45 @@
</view>
<view class="cell-list">
<!-- 账户余额 -->
<view class="cell-item">
<view class="cell-item-left">
<image src="@/pages_order/static/createOrder/account.png" mode="widthFix" class="cell-icon">
</image>
<view class="user-name">账户余额</view>
<view class="descript">(余额: {{ userInfo.money}})</view>
<radio-group @change="selectPayMethod">
<!-- 账户余额 -->
<view class="cell-item">
<view class="cell-item-left">
<image src="@/pages_order/static/createOrder/account.png" mode="widthFix" class="cell-icon">
</image>
<view class="user-name">账户余额</view>
<view class="descript">(余额: {{ userInfo.money}})</view>
</view>
<view class="cell-item-right">
<radio color="#E3441A" :value="1" :checked="index === current" />
</view>
</view>
<view class="cell-item-right">
<!-- 微信支付 -->
<view class="cell-item">
<view class="cell-item-left">
<image src="@/pages_order/static/createOrder/wx.png" mode="widthFix" class="cell-icon">
</image>
<view class="user-name">微信支付</view>
<view class="descript"></view>
</view>
<view class="cell-item-right">
<radio color="#E3441A" :value="2" :checked="index === current" />
</view>
</view>
</view>
<!-- 微信支付 -->
<view class="cell-item">
<view class="cell-item-left">
<image src="@/pages_order/static/createOrder/wx.png" mode="widthFix" class="cell-icon">
</image>
<view class="user-name">微信支付</view>
<view class="descript"></view>
</view>
<view class="cell-item-right">
</view>
</view>
</radio-group>
</view>
<!-- 优惠券 -->
<view class="cell-item">
<view @click="openCoupon" class="cell-item">
<view class="cell-item-left">
<image src="@/pages_order/static/createOrder/coupon.png" mode="widthFix" class="cell-icon"></image>
<view class="user-name">优惠券</view>
<view class="descript">$20</view>
<view class="descript">({{ coupon.money || 0}})</view>
</view>
<view class="cell-item-right">
<radio color="#E3441A" :value="2" :checked="coupon.id" />
</view>
</view>
@ -88,8 +91,8 @@
<!-- 用户协议 -->
<view class="agreement">
<radio @click="agreement = !agreement" :checked="agreement" />
本人已同意<text @click="configPopupShow = true">用户使用协议</text>
<radio color="#E3441A" @click="agreement = !agreement" :checked="agreement" />
本人已同意<text @click="$refs.popup.open('user_xy')">用户使用协议</text>
</view>
<!-- 下单 -->
@ -98,7 +101,7 @@
<view>
<text style="color: #000;">合计</text>
<text style="font-size: 18px;
font-weight: 600;">{{ count }}</text>
font-weight: 600;">{{ totalPrice }}</text>
</view>
</view>
<view class="btn" @click="submit">
@ -108,26 +111,38 @@
</view>
<!-- 地址选择 -->
<uv-popup ref="addressPopup" :round="30">
<uv-popup ref="addressPopup" :round="30" style="padding-bottom: 90rpx;">
<addressList ref="addressList" height="60vh" @select="selectAddress" />
<view class="add-btn">
<view @click="$utils.navigateTo('/pages_order/mine/address')" class="button-submit">新增地址</view>
</view>
</uv-popup>
<!-- 优惠券选择-->
<uv-popup ref="couponPopup" :round="30">
<couponList ref="couponList" height="60vh" @select="selectCoupon" />
</uv-popup>
<configPopup ref="popup"></configPopup>
</view>
</template>
<script>
import addressList from '../components/address/addressList.vue'
import couponList from '@/components/couponList/couponList.vue'
import {
mapState
} from 'vuex'
export default {
components: {
addressList,
couponList
},
data() {
return {
productList: [],
address: {
name: '请选择地址',
address: '',
@ -135,40 +150,34 @@
addressTotal: 0,
remark: '',
num: 1,
agreement: true
agreement: true,
coupon: {},
}
},
computed: {
totalPrice() {
let price = 0
this.productList.forEach(n => {
if ([2].includes(n.type) && [1].includes(this.userInfo.isPay)) {
//
price += n.vipPrice * n.num
} else {
//
price += n.price * n.num
}
this.payOrderProduct.forEach(n => {
price += n.price * n.num
})
if (this.coupon.id) {
price -= this.coupon.money
}
return Number(price).toFixed(2)
},
...mapState(['payOrderProduct', 'userInfo']),
...mapState(['userInfo', 'payOrderProduct']),
},
onLoad() {
this.getRiceProductDetail()
this.$store.commit('getUserInfo')
},
onShow() {
this.getAddressList()
this.getCouponList()
},
methods: {
//
getRiceProductDetail() {
this.productList = JSON.parse(JSON.stringify(this.payOrderProduct))
},
//
getAddressList() {
//
@ -179,6 +188,10 @@
}
})
},
//
getCouponList() {
this.$refs.couponList.getCouponList()
},
//
openAddress() {
if (this.addressTotal == 0) {
@ -193,6 +206,35 @@
this.address = e
this.$refs.addressPopup.close()
},
//
openCoupon() {
if (this.addressTotal == 0) {
return uni.navigateTo({
url: '/pages_order/mine/address?type=back'
})
}
this.$refs.couponPopup.open('bottom')
},
//
selectCoupon(e) {
//
let {
useMoney
} = e
let productTotalPrice = 0
this.payOrderProduct.forEach(item => {
productTotalPrice += item.price
})
if (productTotalPrice < useMoney) {
return uni.showToast({
title: `此优惠券需要满${useMoney}使用`,
icon: "none"
})
}
this.coupon = e
this.$refs.couponPopup.close()
},
submit() {
let addressId = this.address.id
@ -209,10 +251,10 @@
let api = ''
if (this.productList[0].shopId || this.productList[0].type == 2) { //
if (this.payOrderProduct[0].shopId || this.payOrderProduct[0].type == 2) { //
let list = []
this.productList.forEach(n => {
this.payOrderProduct.forEach(n => {
list.push({
num: n.num,
shopId: n.shopId || n.id,
@ -224,13 +266,13 @@
}
api = 'createSumOrder'
this.deleteCart(this.productList.map(n => n.id).join(','))
this.deleteCart(this.payOrderProduct.map(n => n.id).join(','))
} else { //
data = {
addressId,
num: this.productList[0].num,
shopId: this.productList[0].id,
num: this.payOrderProduct[0].num,
shopId: this.payOrderProduct[0].id,
}
api = 'createOrder'
}
@ -265,7 +307,6 @@
})
}
})
},
//
deleteCart(ids) {
@ -273,6 +314,10 @@
ids
})
},
//
selectPayMethod(e) {
console.log(e.detail.value)
}
}
}
</script>
@ -337,6 +382,7 @@
&::v-deep .uv-number-box__input {
color: $uni-color !important;
width: 100rpx !important;
}
}
@ -414,7 +460,7 @@
//
.hint {
font-size: 26rpx;
margin-top: 60rpx;
margin-top: 80rpx;
color: #BFBFBF;
}
@ -464,5 +510,28 @@
}
}
}
//
.add-btn {
width: 100%;
.button-submit {
display: flex;
align-items: center;
justify-content: center;
width: 596rpx;
height: 90rpx;
background: #E3441A;
border-radius: 46rpx;
margin: 20rpx auto;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
text-align: center;
color: #ffffff;
}
}
}
</style>

+ 170
- 96
pages_order/order/orderDetail.vue View File

@ -1,11 +1,7 @@
<template>
<view>
<navbar
title="订单详情"
leftClick
@leftClick="$utils.navigateBack"
/>
<navbar title="订单详情" leftClick @leftClick="$utils.navigateBack" />
<!-- <view class="">
<view class="controls">
<view class="title">
@ -34,60 +30,71 @@
</uv-steps>
</view>
</view> -->
<view class="info">
<view class="flex"
style="display: flex;">
<view class="flex" style="display: flex;">
<view style="width: 8rpx;height: 30rpx;
background: #A3D250;border-radius: 6rpx;"
/>
<view class="head-title">产品</view>
background: #E3441A;border-radius: 6rpx;" />
<view class="head-title">订单详情</view>
</view>
<view class="flex">
<view class="server-item"
:key="index"
v-for="(good, index) in order.commonOrderSkuList"
>
<view class="server-item" :key="index" v-for="(good, index) in order.commonOrderSkuList">
<view class="img-box">
<image :src="good.image && good.image.split(',')[0]" mode="aspectFill"></image>
</view>
<view class="server-info">
<view class="server-title">
{{good.title}}
<!-- <view class="coupon">领券立减</view> -->
</view>
<view class="current-price">
<!-- <view class="current-price">
<text class="unit"></text>{{good.price}}
</view>
<view class="sales-volume" style="margin-top: 5px;">
<view class="desc">规格{{good.sku}}</view>
</view> -->
<view class="texture">
产品材质{{ good.subText }}
</view>
<view class="num">
产品数量{{good.num}}
</view>
<view class="time-coupon">
<!-- <view class="flex">
<view class="total-price">
<div class="total-title">总价格</div>
<view class="price">
<text class="unit"></text>
{{ good.price }}
</view>
</view>
<!-- <view class="time-coupon">
<view class="flex">
<image src="@/static/home/time-icon.png"></image>
<view class="time">{{order.useTime}}分钟</view>
</view> -->
<!-- <view class="sales-volume">
</view>
<view class="sales-volume">
<image src="@/static/icons/icon1.png"></image>
<view class="desc">已售出{{msgShop.payNum}}+</view>
</view> -->
</view>
</view>
</view> -->
</view>
</view>
</view>
<!-- <view class="line min_tips">
<view class="head-div flex">
<view style="width: 118rpx;height: 118rpx;border-radius: 50%;overflow: hidden;">
@ -114,24 +121,22 @@
服务技师
</view>
</view> -->
<view class="line address">
<view class="address-top">
<view class="">
收货地址
<view class="addressDetail">
<view class="address-line">
<view class="main">{{order.name}} {{order.phone}}</view>
<view @click="copy(order.name + ' ' + order.phone)" class="copy">复制</view>
</view>
<view class="copy">
<image @click="copy(order.name + ' ' + order.phone + ' ' + order.address + order.addressDetails)" src="/static/order/copy.png"></image>
<view class="address-line">
<view class="main">{{order.address}} {{order.addressDetails}}</view>
<view @click="copy(order.address + ' ' + order.addressDetails)" class="copy">复制</view>
</view>
</view>
<view class="addressDetail">
<view class="">{{order.name}} {{order.phone}}</view>
<view class="">{{order.address}} {{order.addressDetails}}</view>
</view>
</view>
<view class="line">
<!-- <view class="line">
<view class="t min_tips">
<view class="">
实付款
@ -140,8 +145,8 @@
{{ order.price }}
</view>
</view>
</view>
</view> -->
<!-- 订单信息 -->
<view class="line">
<view class="t min_tips">
@ -166,51 +171,52 @@
</view>
</view>
</view>
<!-- 下单须知 -->
<view class="line">
<!-- <view class="t min_tips">
<view class="t min_tips">
<view class="">
下单须知
</view>
</view>
<view class="min_tips" style="line-height: 40rpx;">
{{msgShop.projectExplain}}
</view> -->
下单须知下单须知下单须知下单须知下单须知下单须知
</view>
<view class="btns">
<view @click="$refs.customerServicePopup.open()" class="btn">
联系客服
</view>
</view>
</view>
</view>
<customerServicePopup ref="customerServicePopup"/>
<customerServicePopup ref="customerServicePopup" />
</view>
</template>
<script>
import customerServicePopup from '@/components/config/customerServicePopup.vue'
import { mapState } from 'vuex'
import {
mapState
} from 'vuex'
export default {
components : {
components: {
customerServicePopup
},
computed : {
},
computed: {},
data() {
return {
stepsCurrent : 0,
steps : [
stepsCurrent: 0,
steps: [
'接单',
'检查',
'开始清洗',
'服务完成',
],
order : {},
id : 0,
order: {},
id: 0,
}
},
onLoad(args) {
@ -223,16 +229,29 @@
this.getOrderDetail()
},
methods: {
getOrderDetail(){
getOrderDetail() {
this.$api('getOrderDetail', {
id : this.id
id: this.id
}, res => {
uni.stopPullDownRefresh()
if(res.code == 200){
if (res.code == 200) {
this.order = res.result
}
})
},
//
copy(content) {
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
})
},
}
}
</script>
@ -242,8 +261,8 @@
background: linear-gradient(#4899a6, #6fc6ad, #6fc6ad);
padding-bottom: 10px;
}
.controls{
.controls {
margin: 20rpx;
background-color: #fff;
height: 400rpx;
@ -253,26 +272,31 @@
border-radius: 20rpx;
justify-content: center;
align-items: center;
.title{
.title {
display: flex;
justify-content: center;
align-items: center;
font-size: 40rpx;
image{
image {
width: 100rpx;
height: 100rpx;
margin-right: 20rpx;
}
}
.tips{
.tips {
font-size: 26rpx;
color: #FD5100;
margin-top: 10rpx;
}
.btns{
.btns {
margin-top: 50rpx;
display: flex;
view{
view {
margin: 0 20rpx;
display: flex;
justify-content: center;
@ -282,14 +306,16 @@
padding: 15rpx 40rpx;
border-radius: 40rpx;
}
.btn2{
.btn2 {
background-color: #FFFFFF;
border: 1px solid #A7A7A7;
color: #A7A7A7;
}
}
}
.steps{
.steps {
margin: 20rpx;
background-color: #fff;
display: flex;
@ -297,7 +323,8 @@
width: 710rpx;
border-radius: 20rpx;
padding: 70rpx 0;
/deep/ .uv-text__value{
/deep/ .uv-text__value {
font-size: 22rpx !important;
}
}
@ -319,8 +346,8 @@
font-size: 25rpx;
margin-right: 10rpx;
}
.btc{
.btc {
background: #ccc;
}
}
@ -352,14 +379,16 @@
width: 100%;
.img-box {
width: 150rpx;
height: 150rpx;
width: 180rpx;
height: 180rpx;
border-radius: 10rpx;
overflow: hidden;
box-sizing: border-box;
image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
@ -369,11 +398,26 @@
justify-content: space-around;
width: calc(100% - 180rpx);
box-sizing: border-box;
padding: 10rpx 15rpx;
padding: 20rpx 15rpx;
.server-title {
display: flex;
margin-bottom: 10rpx;
font-weight: bold;
}
.texture,
.num {
font-size: 24rpx;
color: #717171;
}
.total-price {
display: flex;
justify-content: space-between;
.price {
color: #F85023;
}
}
.coupon {
@ -433,22 +477,51 @@
}
.address {
.address-top{
.address-top {
display: flex;
justify-content: space-between;
align-items: center;
image{
image {
width: 30rpx;
height: 30rpx;
}
}
.addressDetail {
color: #777;
font-size: 22rpx;
padding: 5px 0;
.address-line {
display: flex;
flex-wrap: wrap;
align-items: center;
.main {
width: 88%;
box-sizing: border-box;
padding-right: 20rpx;
overflow: hidden; //
text-overflow: ellipsis; //
display: -webkit-box; //
-webkit-line-clamp: 2; // css
-webkit-box-orient: vertical; //
}
.copy {
width: 12%;
background: #FEBC3A;
color: white;
font-size: 20rpx;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
height: 40rpx;
}
}
}
text {
@ -499,13 +572,13 @@
position: relative;
display: flex;
align-items: center;
image {
height: 45rpx;
width: 90rpx;
vertical-align: middle;
}
.auth {
position: absolute;
white-space: nowrap;
@ -540,13 +613,14 @@
.btns {
display: flex;
justify-content: center;
margin-top: 100rpx;
.btn {
color: #6fc6ad;
border: 1px solid #6fc6ad;
color: #A9A7A7;
border: 1px solid #A9A7A7;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}
}
}
</style>
</style>

+ 13
- 19
pages_order/product/productDetail.vue View File

@ -16,7 +16,7 @@
</view>
<!-- 服务 -->
<view class="server">
<!-- <view class="server">
<view class="setver-main">
<view class="title">服务</view>
<view class="descript">
@ -27,14 +27,14 @@
<view class="server-arraw">
<uv-icon name="arrow-right"></uv-icon>
</view>
</view>
</view> -->
<!-- 参数 -->
<view class="params">
<view v-if="productDetail.sku" class="params">
<view class="params-main">
<view class="title">参数</view>
<view class="descript">
品牌适应人群
{{ productDetail.sku }}
</view>
</view>
@ -53,16 +53,22 @@
<!-- 分享和购买按钮 -->
<submit @service="service" @submit="submit" :detail="productDetail" />
<!-- 联系客服 -->
<customerServicePopup ref="customerServicePopup" />
</view>
</template>
<script>
import submit from '../components/product/submit.vue'
import submitUnitSelect from '../components/product/submitUnitSelect.vue'
import customerServicePopup from '@/components/config/customerServicePopup.vue'
export default {
components: {
submit,
submitUnitSelect
submitUnitSelect,
customerServicePopup
},
data() {
return {
@ -105,18 +111,7 @@
},
//
service() {
console.log("联系客服")
// this.$api('service', {
// shopId: this.id,
// num: 1,
// }, res => {
// if (res.code == 200) {
// uni.showToast({
// title: '',
// icon: 'none'
// })
// }
// })
this.$refs.customerServicePopup.open()
},
}
}
@ -171,10 +166,9 @@
.item-line {
display: flex;
background: white;
padding: 0rpx 20rpx;
box-sizing: border-box;
font-size: 34rpx;
padding: 30rpx 20rpx;
padding: 20rpx;
}
.item-line .before {


BIN
pages_order/static/coupon/bg.png View File

Before After
Width: 861  |  Height: 937  |  Size: 402 KiB

BIN
pages_order/static/coupon/examine.png View File

Before After
Width: 615  |  Height: 225  |  Size: 62 KiB

BIN
pages_order/static/coupon/register-success.png View File

Before After
Width: 744  |  Height: 123  |  Size: 102 KiB

BIN
pages_order/static/home/4.png View File

Before After
Width: 1420  |  Height: 530  |  Size: 539 KiB

BIN
pages_order/static/recruit/bg.png View File

Before After
Width: 1065  |  Height: 405  |  Size: 248 KiB

pages_order/static/coupon/close-btn.png → static/image/coupon/close-btn.png View File


BIN
static/image/home/1.png View File

Before After
Width: 200  |  Height: 200  |  Size: 25 KiB

+ 47
- 46
store/store.js View File

@ -9,25 +9,26 @@ import api from '@/api/api.js'
const store = new Vuex.Store({
state: {
configList: {}, //配置列表
userInfo : {}, //用户信息
riceInfo : {},//用户相关信息
category : [],//分类信息
payOrderProduct : [],//支付订单中的商品
},
getters: {
userInfo: {}, //用户信息
riceInfo: {}, //用户相关信息
category: [], //分类信息
payOrderProduct: [], //支付订单中的商品
},
getters: {},
mutations: {
// 初始化配置
initConfig(state){
initConfig(state) {
api('getConfig', res => {
if(res.code == 200){
const configList = {};
if (res.code == 200) {
res.result.forEach(n => {
state.configList[n.keyName] = n.keyContent
state.configList[n.keyName + '_keyValue'] = n.keyValue
})
configList[n.keyName] = n.keyContent;
configList[n.keyName + '_keyValue'] = n.keyValue;
});
}
state.configList = configList
})
// let config = ['getPrivacyPolicy', 'getUserAgreement']
// config.forEach(k => {
// api(k, res => {
@ -37,65 +38,65 @@ const store = new Vuex.Store({
// })
// })
},
login(state, phoneCode){
login(state, phoneCode) {
uni.showLoading({
title: '登录中...'
})
uni.login({
success(res) {
if(res.errMsg != "login:ok"){
if (res.errMsg != "login:ok") {
return
}
let data = {
code : res.code,
code: res.code,
phoneCode,
}
if(uni.getStorageSync('shareId')){
if (uni.getStorageSync('shareId')) {
data.shareId = uni.getStorageSync('shareId')
}
api('wxLogin', data, res => {
uni.hideLoading()
if(res.code != 200){
if (res.code != 200) {
return
}
state.userInfo = res.result.userInfo
uni.setStorageSync('token', res.result.token)
if(!state.userInfo.nickName
|| !state.userInfo.headImage
|| !state.userInfo.phone
){
if (!state.userInfo.nickName ||
!state.userInfo.headImage ||
!state.userInfo.phone
) {
uni.navigateTo({
url: '/pages_order/auth/wxUserInfo'
})
}else{
} else {
uni.navigateBack(-1)
}
})
}
})
},
getUserInfo(state){
getUserInfo(state) {
api('getInfo', res => {
if(res.code == 200){
if (res.code == 200) {
state.userInfo = res.result
if(!state.userInfo.nickName
|| !state.userInfo.headImage
|| !state.userInfo.phone
){
if (!state.userInfo.nickName ||
!state.userInfo.headImage ||
!state.userInfo.phone
) {
uni.showModal({
title: '申请获取您的信息!',
cancelText: '稍后补全',
confirmText: '现在补全',
success(e) {
if(e.confirm){
if (e.confirm) {
uni.navigateTo({
url: '/pages_order/auth/wxUserInfo'
})
@ -106,21 +107,21 @@ const store = new Vuex.Store({
}
})
},
getRiceInfo(state){
getRiceInfo(state) {
api('getRiceInfo', {
token : uni.getStorageSync('token') || ''
},res => {
if(res.code == 200){
token: uni.getStorageSync('token') || ''
}, res => {
if (res.code == 200) {
state.riceInfo = res.result
}
})
},
// 退出登录
logout(state){
logout(state) {
uni.showModal({
title: '确认退出登录吗',
success(r) {
if(r.confirm){
if (r.confirm) {
state.userInfo = {}
state.role = false
uni.removeStorageSync('token')
@ -132,15 +133,15 @@ const store = new Vuex.Store({
})
},
// 查询分类接口
getCategoryList(state){
getCategoryList(state) {
api('getCategoryList', res => {
if(res.code == 200){
if (res.code == 200) {
state.category = res.result
}
})
},
// 设置支付订单中的商品
setPayOrderProduct(state, data){
setPayOrderProduct(state, data) {
state.payOrderProduct = data
},
},


Loading…
Cancel
Save