Browse Source

上传

hfll
前端-胡立永 3 months ago
parent
commit
75396ec763
25 changed files with 705 additions and 317 deletions
  1. +5
    -0
      api/model/index.js
  2. +0
    -16
      api/model/info.js
  3. +5
    -4
      components/config/configPopup.vue
  4. +27
    -29
      components/couponPopup/couponPopup.vue
  5. +1
    -1
      components/product/productItem.vue
  6. +3
    -1
      components/user/productList.vue
  7. +2
    -2
      mixins/list.js
  8. +4
    -4
      mixins/order.js
  9. +3
    -6
      pages.json
  10. +21
    -4
      pages/index/category.vue
  11. +13
    -8
      pages/index/center.vue
  12. +27
    -40
      pages/index/index.vue
  13. +10
    -9
      pages_order/home/introduce.vue
  14. +2
    -2
      pages_order/home/notice.vue
  15. +90
    -52
      pages_order/mine/memberCenter.vue
  16. +25
    -21
      pages_order/mine/partner.vue
  17. +1
    -1
      pages_order/mine/recruit.vue
  18. +43
    -46
      pages_order/mine/runningWater.vue
  19. +319
    -0
      pages_order/mine/updateUser.vue
  20. +12
    -10
      pages_order/mine/withdraw.vue
  21. +82
    -51
      pages_order/order/createOrder.vue
  22. +1
    -1
      pages_order/order/orderDetail.vue
  23. +2
    -2
      pages_order/product/productDetail.vue
  24. +4
    -4
      uni_modules/uv-empty/components/uv-empty/props.js
  25. +3
    -3
      uni_modules/uv-radio/components/uv-radio/props.js

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

@ -117,6 +117,11 @@ const api = {
url: '/index_common/getRiceAdList', url: '/index_common/getRiceAdList',
method: 'GET', method: 'GET',
}, },
// 获取首页广告列表
getRiceAdDetail: {
url: '/index_common/getRiceAdDetail',
method: 'GET',
},
//获取优惠券信息 //获取优惠券信息
getRiceCouponList: { getRiceCouponList: {
url: '/info_common/getRiceCouponList', url: '/info_common/getRiceCouponList',


+ 0
- 16
api/model/info.js View File

@ -103,22 +103,6 @@ const api = {
url: '/info_common/getCartPageList', url: '/info_common/getCartPageList',
method: 'GET', method: 'GET',
}, },
// 增加或者修改渠道申请信息
addOrUpdateCommonUser: {
url: '/info_common/addOrUpdateCommonUser',
method: 'POST',
limit: 500,
auth: true,
showLoading: true,
},
// 查询渠道申请信息
getCommonUser: {
url: '/info_common/getCommonUser',
method: 'GET',
limit: 500,
auth: true,
showLoading: true,
},
} }
export default api export default api

+ 5
- 4
components/config/configPopup.vue View File

@ -20,14 +20,15 @@
onShow(){ onShow(){
}, },
methods: { methods: {
// //
open(key){ open(key){
this.content = this.configList[key] this.content = this.configList[key]
this.$refs.popup.open('bottom'); this.$refs.popup.open('bottom');
}
},
openText(content){
this.content = content
this.$refs.popup.open('bottom');
},
}, },
computed : { computed : {


+ 27
- 29
components/couponPopup/couponPopup.vue View File

@ -1,63 +1,61 @@
<!-- 优惠券弹窗 --> <!-- 优惠券弹窗 -->
<template> <template>
<view class="couponPopup"> <view class="couponPopup">
<uv-overlay :show="show" :z-index="999999">
<uv-popup ref="couponPopup"
customStyle="background-color: transparent;"
:z-index="999999">
<view class="couponPopup-wrapper"> <view class="couponPopup-wrapper">
<view class="main-container"> <view class="main-container">
<view class="body"> <view class="body">
<image :src="configList.wx_image" mode="widthFix" class="coupon-bg"></image> <image :src="configList.wx_image" mode="widthFix" class="coupon-bg"></image>
<image @click="closeCouponPopup" src="@/static/image/coupon/close-btn.png" mode="widthFix"
<image @click="close" src="@/static/image/coupon/close-btn.png" mode="widthFix"
class="close-btn"> class="close-btn">
</image> </image>
<view class="coupon-money"> <view class="coupon-money">
<text class="unit"></text> <text class="unit"></text>
<view class="money"> <view class="money">
20
{{ riceInfo.getCouponMoney }}
</view> </view>
</view> </view>
<image :src="configList.qd_image" mode="widthFix" class="register-success"></image> <image :src="configList.qd_image" mode="widthFix" class="register-success"></image>
<view class="shopping">购物即可抵扣</view> <view class="shopping">购物即可抵扣</view>
</view> </view>
<image @click="examineCoupon" :src="configList.down_image" mode="widthFix" class="examine"></image>
<image @click="close"
:src="configList.down_image" mode="widthFix"
class="examine"></image>
</view> </view>
</view> </view>
</uv-overlay>
</uv-popup>
</view> </view>
</template> </template>
<script> <script>
import {
mapState
} from 'vuex'
export default { export default {
name: "CouponPopup", name: "CouponPopup",
data() { data() {
return {} return {}
}, },
methods: {
//
closeCouponPopup() {
this.show = false;
},
//
examineCoupon() {
this.$emit("examine")
}
mounted() {
this.$refs.couponPopup.open()
}, },
computed: { computed: {
show: {
get() {
return this.value;
},
set(newValue) {
this.$emit('input', newValue);
}
}
...mapState(['riceInfo'])
},
methods: {
//
toCoupon() {
this.$refs.couponPopup.close()
uni.navigateTo({
url: "/pages_order/mine/coupon"
})
},
close(){
this.$refs.couponPopup.close()
},
}, },
props: {
value: {
type: Boolean,
default: false
}
}
} }
</script> </script>


+ 1
- 1
components/product/productItem.vue View File

@ -39,7 +39,7 @@
</view> </view>
<view class="sales-volume-number"> <view class="sales-volume-number">
已售出{{ item.num }}+
已售出{{ item.payNum }}+
</view> </view>
</view> </view>


+ 3
- 1
components/user/productList.vue View File

@ -20,7 +20,7 @@
</view> </view>
</view> </view>
<view class="num"> <view class="num">
已售卖{{ item.num }}+
已售卖{{ item.payNum }}+
</view> </view>
</view> </view>
@ -30,6 +30,8 @@
</view> </view>
</view> </view>
</view> </view>
<uv-empty mode="list" v-if="list.length == 0"></uv-empty>
</view> </view>
</template> </template>


+ 2
- 2
mixins/list.js View File

@ -48,13 +48,13 @@ export default {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
if(res.code == 200){ if(res.code == 200){
this.getDataThen && this.getDataThen(res.result.records, res.result.total, res.result)
success(res.result) success(res.result)
this[this.mixinsListKey || 'list'] = res.result.records || res.result this[this.mixinsListKey || 'list'] = res.result.records || res.result
this.total = res.result.total || res.result.length this.total = res.result.total || res.result.length
this.getDataThen && this.getDataThen(res.result.records, res.result.total, res.result)
} }
}) })
}) })


+ 4
- 4
mixins/order.js View File

@ -12,11 +12,11 @@ export default {
toPayOrder(item){ toPayOrder(item){
let api = '' let api = ''
if([0, 1].includes(item.shopState)){
// if([0, 1].includes(item.shopState)){
api = 'createOrderTwo' api = 'createOrderTwo'
}else{
api = 'createSumOrderAgain'
}
// }else{
// api = 'createSumOrderAgain'
// }
this.$api(api, { this.$api(api, {
orderId : item.id, orderId : item.id,


+ 3
- 6
pages.json View File

@ -84,15 +84,9 @@
{ {
"path": "mine/help" "path": "mine/help"
}, },
{
"path": "home/journalism"
},
{ {
"path": "home/introduce" "path": "home/introduce"
}, },
{
"path": "home/newsDetail"
},
{ {
"path": "order/createOrder" "path": "order/createOrder"
}, },
@ -131,6 +125,9 @@
}, },
{ {
"path": "mine/coupon" "path": "mine/coupon"
},
{
"path": "mine/updateUser"
} }
] ]
}], }],


+ 21
- 4
pages/index/category.vue View File

@ -1,7 +1,11 @@
<template> <template>
<view class="page"> <view class="page">
<!-- 导航栏 --> <!-- 导航栏 -->
<navbar title="商品列表" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<navbar title="商品列表"
leftClick
@leftClick="$utils.navigateBack"
bgColor="#E3441A"
color="#fff" />
<!-- 搜索栏 --> <!-- 搜索栏 -->
<view class="search"> <view class="search">
@ -11,11 +15,15 @@
<!-- 分类商品列表 --> <!-- 分类商品列表 -->
<view class="category"> <view class="category">
<uv-vtabs :list="category" keyName="title" @change="change">
<uv-vtabs :list="category"
:current="current"
keyName="title" @change="change">
<view class="list"> <view class="list">
<uv-vtabs-item> <uv-vtabs-item>
<productItem v-for="(item, index) in list" :key="index" :item="item" <productItem v-for="(item, index) in list" :key="index" :item="item"
@click="$utils.navigateTo(`/pages_order/product/productDetail?id=${item.id}`)" /> @click="$utils.navigateTo(`/pages_order/product/productDetail?id=${item.id}`)" />
<uv-empty mode="list" v-if="list.length == 0"></uv-empty>
</uv-vtabs-item> </uv-vtabs-item>
</view> </view>
</uv-vtabs> </uv-vtabs>
@ -42,19 +50,28 @@
data() { data() {
return { return {
mixinsListApi: 'getClassShopPageList', mixinsListApi: 'getClassShopPageList',
current : 0,
} }
}, },
computed: { computed: {
...mapState(['category']) ...mapState(['category'])
}, },
onLoad({ onLoad({
search
search,
cid
}) { }) {
if (search) { if (search) {
this.queryParams.title = search this.queryParams.title = search
} }
this.$store.commit('getCategoryList') this.$store.commit('getCategoryList')
if (this.category.length > 0) {
if(this.category.length > 0 && cid){
this.category.forEach((n, i) => {
if(n.id == cid){
this.current = i
}
})
this.queryParams.classId = cid
}else if (this.category.length > 0) {
this.queryParams.classId = this.category[0].id this.queryParams.classId = this.category[0].id
} }
}, },


+ 13
- 8
pages/index/center.vue View File

@ -1,7 +1,10 @@
<template> <template>
<view class="page"> <view class="page">
<!-- 导航栏 --> <!-- 导航栏 -->
<navbar title="个人中心" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<navbar title="个人中心"
leftClick
@leftClick="$utils.navigateBack"
bgColor="#E3441A" color="#fff" />
<!-- 头部 --> <!-- 头部 -->
<view class="head"> <view class="head">
@ -28,7 +31,8 @@
</view> </view>
</view> </view>
<view class="edit-user">
<view class="edit-user"
@click="$utils.navigateTo('/pages_order/mine/updateUser?back=true')">
<image src="@/static/image/center/edit-icon.png" mode="aspectFill" class="edit-icon"></image> <image src="@/static/image/center/edit-icon.png" mode="aspectFill" class="edit-icon"></image>
<view class="edit-btn"> <view class="edit-btn">
修改资料 修改资料
@ -43,19 +47,20 @@
</view> </view>
<!-- 会员卡片 --> <!-- 会员卡片 -->
<view @click="$utils.navigateTo({url : '/pages_order/mine/memberCenter' })" class="earnings">
<view v-if="index + 1==userInfo.role" v-for="(item,index) in vipList" :key="item.id" class="member-item">
<view @click="$utils.navigateTo({url : '/pages_order/mine/memberCenter' })"
v-if="userInfo.role"
class="earnings">
<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> <image :src="item.headImage" mode="aspectFill" class="member-image"></image>
<view class="member-info"> <view class="member-info">
<view class="profile-photo"> <view class="profile-photo">
<image :src="userInfo.headImage" mode="aspectFill" class="pro-img"></image> <image :src="userInfo.headImage" mode="aspectFill" class="pro-img"></image>
<view class="open-status"> <view class="open-status">
已开通29天
开通时间{{ riceInfo.openTime }}
</view> </view>
</view> </view>
<view class="open"> <view class="open">
剩余一天到期
</view> </view>
</view> </view>
</view> </view>
@ -132,7 +137,7 @@
<div v-if="showAdvertising" class="ad"> <div v-if="showAdvertising" class="ad">
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="true" :interval="2000" <swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="true" :interval="2000"
:duration="duration"> :duration="duration">
<swiper-item v-for="(item,index) in adList" :key="index">
<swiper-item v-for="(item, index) in adList" :key="index">
<view class="swiper-main"> <view class="swiper-main">
<view @click="closeAdvertising" class="close"> <view @click="closeAdvertising" class="close">
<image src="@/static/image/center/close.png" mode="aspectFill" class="close-img"></image> <image src="@/static/image/center/close.png" mode="aspectFill" class="close-img"></image>
@ -165,7 +170,7 @@
customerServicePopup, customerServicePopup,
}, },
computed: { computed: {
...mapState(['userInfo', 'riceInfo', 'configList']),
...mapState(['riceInfo']),
adList() { adList() {
let arr = []; let arr = [];
if (this.configList?.shop_get_image) { if (this.configList?.shop_get_image) {


+ 27
- 40
pages/index/index.vue View File

@ -19,7 +19,9 @@
<!-- 首页-分类菜单 --> <!-- 首页-分类菜单 -->
<view class="home-menu"> <view class="home-menu">
<uv-grid :border="false" :col="5"> <uv-grid :border="false" :col="5">
<uv-grid-item v-for="(item,index) in baseList" :key="index" @click="toUrl(item.url)">
<uv-grid-item v-for="(item,index) in category"
:key="index"
@click="$utils.navigateTo(`/pages/index/category?cid=${item.id}`)">
<image :src="item.image" mode="aspectFill"></image> <image :src="item.image" mode="aspectFill"></image>
<text class="menu-text">{{item.title}}</text> <text class="menu-text">{{item.title}}</text>
</uv-grid-item> </uv-grid-item>
@ -32,21 +34,27 @@
<view class="new-perple-top"> <view class="new-perple-top">
<view class="new-perple-top-left"> <view class="new-perple-top-left">
<view class="title"> <view class="title">
新人专享
最新活动
</view> </view>
<view class="descript">
<!-- <view class="descript">
领199元大礼包 领199元大礼包
</view>
</view> -->
</view> </view>
<view class="new-perple-top-right">
<view class="new-perple-top-right"
@click="$utils.navigateTo(`/pages_order/home/introduce`)">
<image :src="configList.index_model" mode="aspectFill"></image> <image :src="configList.index_model" mode="aspectFill"></image>
</view> </view>
</view> </view>
<view class="new-perple-main"> <view class="new-perple-main">
<view class="red-packet"> <view class="red-packet">
<image src="@/static/image/home/red-packet.png" mode="aspectFill"></image> <image src="@/static/image/home/red-packet.png" mode="aspectFill"></image>
</view> </view>
<view v-for="item in adList" :key="item.id" @click="toUrl(item.url)" class="activity">
<view v-for="(item, index) in adList" :key="item.id"
v-if="index < 4"
@click="$utils.navigateTo(`/pages_order/home/notice?id=${item.id}`)"
class="activity">
<image :src="item.icon" mode="aspectFill"></image> <image :src="item.icon" mode="aspectFill"></image>
<view class="title">{{ item.title }}</view> <view class="title">{{ item.title }}</view>
<!-- <view class="product-price"> <!-- <view class="product-price">
@ -69,7 +77,8 @@
<!-- 推荐 --> <!-- 推荐 -->
<view class="recommend"> <view class="recommend">
<view class="recommend-title">推荐宝贝</view> <view class="recommend-title">推荐宝贝</view>
<view @click="$utils.navigateTo('/pages_order/mine/moreCommodity')" class="recommend-more">更多</view>
<view @click="$utils.navigateTo('/pages/index/category')"
class="recommend-more">更多</view>
</view> </view>
<!-- 商品列表 --> <!-- 商品列表 -->
@ -80,14 +89,15 @@
<!-- 全局弹框 --> <!-- 全局弹框 -->
<PrivacyAgreementPoup /> <PrivacyAgreementPoup />
<!-- 隐私政策用户协议弹框 -->
<!-- 联系客服 -->
<customerServicePopup ref="customerServicePopup" /> <customerServicePopup ref="customerServicePopup" />
<!-- tabbar --> <!-- tabbar -->
<tabber select="home" /> <tabber select="home" />
<!-- 优惠券弹窗 --> <!-- 优惠券弹窗 -->
<couponPopup v-model="showCouponPopup" @examine="toCoupon"></couponPopup>
<couponPopup v-if="riceInfo.isGetCoupon"></couponPopup>
</view> </view>
</template> </template>
@ -122,11 +132,12 @@
riceProductList: [], // riceProductList: [], //
newList: [], // newList: [], //
mixinsListApi: 'getClassShopPageList', mixinsListApi: 'getClassShopPageList',
showCouponPopup: false,
adList: [] adList: []
} }
}, },
computed: {},
computed: {
...mapState(['riceInfo', 'category'])
},
onLoad(query) { onLoad(query) {
if (query.shareId) { if (query.shareId) {
uni.setStorageSync('shareId', query.shareId) uni.setStorageSync('shareId', query.shareId)
@ -137,7 +148,10 @@
this.getRiceNoticeList() this.getRiceNoticeList()
this.getRiceIconList() this.getRiceIconList()
this.getRiceAdList() this.getRiceAdList()
this.getRiceInfo()
if(uni.getStorageSync('token')){
this.$store.commit('getRiceInfo')
this.$store.commit('getUserInfo')
}
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getBanner() this.getBanner()
@ -147,7 +161,7 @@
// //
search() { search() {
uni.navigateTo({ uni.navigateTo({
url: '/homes/index/category?search=' + this.keyword
url: '/pages/index/category?search=' + this.keyword
}) })
this.keyword = '' this.keyword = ''
}, },
@ -170,15 +184,6 @@
}) })
}, },
//
getRiceProductList() {
this.$api('getRiceProductList', res => {
if (res.code == 200) {
this.riceProductList = res.result
}
})
},
// //
getRiceNewsList() { getRiceNewsList() {
this.$api('getRiceNewsList', res => { this.$api('getRiceNewsList', res => {
@ -206,17 +211,6 @@
}) })
}, },
//
getRiceInfo() {
this.$api('getRiceInfo', {
token: uni.getStorageSync('token') || ''
}, res => {
if (res.code == 200) {
this.showCouponPopup = res?.result?.isGetCoupon
}
})
},
// //
toUrl(url) { toUrl(url) {
if (!url) { if (!url) {
@ -249,13 +243,6 @@
scroll: function(e) { scroll: function(e) {
}, },
//
toCoupon() {
uni.navigateTo({
url: "/pages_order/mine/coupon"
})
},
}, },
} }
</script> </script>


+ 10
- 9
pages_order/home/introduce.vue View File

@ -1,6 +1,6 @@
<template> <template>
<view class="page"> <view class="page">
<navbar :title="title[type]" leftClick @leftClick="$utils.navigateBack" />
<navbar title="活动列表" leftClick @leftClick="$utils.navigateBack" />
<view class="box"> <view class="box">
<view class="box-imgs"> <view class="box-imgs">
<view <view
@ -8,7 +8,7 @@
@click="$utils.navigateTo(`/pages_order/home/notice?id=${item.id}&type=${type}`)" @click="$utils.navigateTo(`/pages_order/home/notice?id=${item.id}&type=${type}`)"
class="box-img" class="box-img"
v-for="(item, index) in list"> v-for="(item, index) in list">
<image :src="item.image" mode="aspectFill"></image>
<image :src="item.icon" mode="aspectFill"></image>
<view>{{ item.title }}</view> <view>{{ item.title }}</view>
</view> </view>
</view> </view>
@ -22,7 +22,7 @@
mixins: [mixinsList], mixins: [mixinsList],
data() { data() {
return { return {
mixinsListApi: 'getInfoIntroduce',//
mixinsListApi: 'getRiceProductList',//
title : ['公司介绍', '产品介绍', '关于我们', '其他'], title : ['公司介绍', '产品介绍', '关于我们', '其他'],
type : 0, type : 0,
} }
@ -45,7 +45,7 @@
margin: 20rpx; margin: 20rpx;
image{ image{
width: 220rpx; width: 220rpx;
height: 400rpx;
height: 220rpx;
} }
.box-imgs { .box-imgs {
display: flex; display: flex;
@ -56,12 +56,13 @@
overflow: hidden; overflow: hidden;
position: relative; position: relative;
view{ view{
position: absolute;
left: 50%;
transform: translate(-50%);
bottom: 80rpx;
// position: absolute;
// left: 50%;
// transform: translate(-50%);
// bottom: 80rpx;
margin: 0 auto;
color: #fff; color: #fff;
background-color: #A3D250;
background-color: $uni-color;
border-radius: 30rpx; border-radius: 30rpx;
width: 80%; width: 80%;
height: 60rpx; height: 60rpx;


+ 2
- 2
pages_order/home/notice.vue View File

@ -1,7 +1,7 @@
<template> <template>
<!-- 公告 --> <!-- 公告 -->
<view class="page"> <view class="page">
<navbar :title="title" leftClick @leftClick="$utils.navigateBack" />
<navbar title="活动" leftClick @leftClick="$utils.navigateBack" />
<view style="padding: 20rpx;"> <view style="padding: 20rpx;">
<uv-parse :content="notice"></uv-parse> <uv-parse :content="notice"></uv-parse>
</view> </view>
@ -40,7 +40,7 @@
}, },
// //
getInfoIntroduce(){ getInfoIntroduce(){
this.$api('getInfoIntroduceDetail', {
this.$api('getRiceAdDetail', {
id : this.id id : this.id
}, res => { }, res => {
if(res.code == 200){ if(res.code == 200){


+ 90
- 52
pages_order/mine/memberCenter.vue View File

@ -2,11 +2,16 @@
<template> <template>
<view class="member-center"> <view class="member-center">
<!-- 导航栏 --> <!-- 导航栏 -->
<navbar title="会员中心" leftClick @leftClick="$utils.navigateBack" bgColor="#fff" color="#000" />
<navbar title="会员中心" leftClick @leftClick="$utils.navigateBack"
bgColor="#000" color="#fff" />
<!-- 会员卡片 --> <!-- 会员卡片 -->
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
:duration="duration" :current="current" style="height: 380rpx;">
<!-- <swiper class="swiper"
circular
:indicator-dots="indicatorDots"
:autoplay="autoplay"
:interval="interval"
:duration="duration" :current="current" style="height: 380rpx;">
<swiper-item v-for="(item,index) in list" :key="item.id"> <swiper-item v-for="(item,index) in list" :key="item.id">
<view class="member-item"> <view class="member-item">
<image :src="item.headImage" mode="widthFix" class="member-image"></image> <image :src="item.headImage" mode="widthFix" class="member-image"></image>
@ -24,7 +29,24 @@
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
</swiper>
</swiper> -->
<view class=""
style="width: 100%;height: 150rpx;position: absolute;z-index: -1;background-color: #000;">
</view>
<uv-swiper
:list="list"
previousMargin="60rpx"
nextMargin="60rpx"
circular
:autoplay="false"
radius="20rpx"
indicator
height="290rpx"
bgColor="transparent"
keyName="headImage"></uv-swiper>
<!-- <esc-swiper ref="swiper" :autoplay="true" :circular="true" :current.sync="current" :size="list.length" <!-- <esc-swiper ref="swiper" :autoplay="true" :circular="true" :current.sync="current" :size="list.length"
:plus="2" :width="750" :height="290" :itemWidth="600" :space="30"> :plus="2" :width="750" :height="290" :itemWidth="600" :space="30">
@ -48,13 +70,14 @@
</esc-swiper> --> </esc-swiper> -->
<!-- 充值套餐 --> <!-- 充值套餐 -->
<view class="top-up-package">
<!-- <view class="top-up-package">
<view class="title"> <view class="title">
充值套餐 充值套餐
</view> </view>
<view class="set-meal-list"> <view class="set-meal-list">
<view v-for="item in cardList" :key="item.id" <view v-for="item in cardList" :key="item.id"
:class="{'active-set-meal-item' : item.id == userInfo.role }" class="set-meal-item">
:class="{'active-set-meal-item' : item.id == userInfo.role }"
class="set-meal-item">
<view class="card-tag"> <view class="card-tag">
限时折扣 限时折扣
</view> </view>
@ -67,13 +90,28 @@
<view class="member-descript"> <view class="member-descript">
不同会员等级商品价格不一样可以设置给与推荐人佣金 不同会员等级商品价格不一样可以设置给与推荐人佣金
</view> </view>
</view>
</view> -->
<!-- 会员权益 --> <!-- 会员权益 -->
<view class="member-equity-title"> <view class="member-equity-title">
<image :src="configList.vip_qy_image" mode="widthFix" class="eqyity-img"></image> <image :src="configList.vip_qy_image" mode="widthFix" class="eqyity-img"></image>
</view> </view>
<view class="equity-card-list"> <view class="equity-card-list">
<view v-for="(item, index) in list" :key="item.id" class="equity-card">
<view class="equity-title">累计消费满{{ item.money }}将获得{{ item.title }}</view>
<view class="equity-descript-list">
<!-- <view class="equity-descript-icon">
<image :src="item.icon" mode="widthFix" class="equity-descript-img"></image>
</view> -->
<view class="equity-descript-item">
<uv-parse :content="item.details"></uv-parse>
</view>
</view>
</view>
</view>
<!-- <view class="equity-card-list">
<view v-for="(item,index) in equityList" :key="item.id" class="equity-card"> <view v-for="(item,index) in equityList" :key="item.id" class="equity-card">
<view class="equity-title">{{ item.title }}</view> <view class="equity-title">{{ item.title }}</view>
<view class="equity-descript-list"> <view class="equity-descript-list">
@ -90,7 +128,7 @@
</view> </view>
</view> </view>
</view> </view>
</view>
</view> -->
</view> </view>
</template> </template>
@ -359,50 +397,50 @@
} }
} }
&:nth-child(1) {
.equity-descript-list {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.equity-descript-icon {
position: absolute;
bottom: 100%;
right: 0rpx;
z-index: 200;
}
.equity-descript-item {
width: 49%;
}
}
}
&:nth-child(2) {
.equity-descript-icon {
position: absolute;
bottom: -10%;
right: 0rpx;
z-index: 200;
}
.equity-descript-item {
&:nth-child(3) {
width: calc(100% - 160rpx);
margin-right: 10rpx;
}
}
}
&:nth-child(3),
&:nth-child(4) {
.equity-descript-icon {
position: absolute;
bottom: 100%;
right: 0rpx;
z-index: 200;
}
}
// &:nth-child(1) {
// .equity-descript-list {
// display: flex;
// justify-content: space-between;
// flex-wrap: wrap;
// .equity-descript-icon {
// position: absolute;
// bottom: 100%;
// right: 0rpx;
// z-index: 200;
// }
// .equity-descript-item {
// width: 49%;
// }
// }
// }
// &:nth-child(2) {
// .equity-descript-icon {
// position: absolute;
// bottom: -10%;
// right: 0rpx;
// z-index: 200;
// }
// .equity-descript-item {
// &:nth-child(3) {
// width: calc(100% - 160rpx);
// margin-right: 10rpx;
// }
// }
// }
// &:nth-child(3),
// &:nth-child(4) {
// .equity-descript-icon {
// position: absolute;
// bottom: 100%;
// right: 0rpx;
// z-index: 200;
// }
// }
} }
} }
} }

+ 25
- 21
pages_order/mine/partner.vue View File

@ -23,7 +23,7 @@
直推及间推业绩 直推及间推业绩
</view> </view>
<view class="money"> <view class="money">
<text class="unit"></text>666
<text class="unit"></text>{{ riceInfo.canWithdraw }}
</view> </view>
</view> </view>
<view class="withdraw"> <view class="withdraw">
@ -41,39 +41,47 @@
@click="handleTabEvent"></uv-tabs> @click="handleTabEvent"></uv-tabs>
</view> </view>
<!-- 佣金列表 -->
<!-- 列表 -->
<view class="brokerage-list"> <view class="brokerage-list">
<view v-for="item in users" :key="item.id" class="brokerage-item">
<view v-for="item in list" :key="item.id" class="brokerage-item">
<view class="brokerage-user"> <view class="brokerage-user">
<image :src="item.headImage" mode="widthFix" class="pro-img"></image> <image :src="item.headImage" mode="widthFix" class="pro-img"></image>
<view class="name-time"> <view class="name-time">
<view class="name"> <view class="name">
{{ item.nickName }} {{ item.nickName }}
</view> </view>
<view class="time">
<!-- <view class="time">
已加入平台{{ daysBetweenDates(item.createTime,new Date().toString())}} 已加入平台{{ daysBetweenDates(item.createTime,new Date().toString())}}
</view> -->
<view class="time">
加入时间{{ item.createTime }}
</view> </view>
</view> </view>
</view> </view>
<view class="brokerage-money"> <view class="brokerage-money">
<view class="order-money"> <view class="order-money">
下单量: <text>666</text>
下单量: <text>{{ item.orderNum }}</text>
</view> </view>
<text>|</text> <text>|</text>
<view class="money"> <view class="money">
佣金:<text>666</text>
佣金:<text>{{ item.commission }}</text>
</view> </view>
</view> </view>
</view> </view>
<uv-empty mode="list" v-if="list.length == 0"></uv-empty>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import mixinsList from '@/mixins/list.js'
import { mapState } from 'vuex'
export default { export default {
name: "Partner", name: "Partner",
mixins: [mixinsList],
data() { data() {
return { return {
tabList: [{ tabList: [{
@ -84,29 +92,25 @@
} }
], ],
state: 0, state: 0,
users: [],
userRole: ['会员', '用户', '渠道']
userRole: ['会员', '用户', '渠道'],
mixinsListApi: 'getHanHaiMemberUser',
} }
}, },
computed : {
...mapState(['riceInfo']),
},
onLoad() {
this.queryParams.state = this.state
},
onShow() { onShow() {
this.getCommonUser()
this.$store.commit('getRiceInfo')
}, },
methods: { methods: {
//
getCommonUser() {
this.$api('getHanHaiMemberUser', {
stete: this.state
}, res => {
if (res.code == 200) {
this.users = res?.result?.records
}
})
},
//tab //tab
handleTabEvent(e) { handleTabEvent(e) {
this.state = e.index; this.state = e.index;
this.getCommonUser();
this.queryParams.state = this.state
this.getData();
}, },
// //


+ 1
- 1
pages_order/mine/recruit.vue View File

@ -93,7 +93,7 @@
// //
getCommonUser() { getCommonUser() {
this.$api('getCommonUser', res => { this.$api('getCommonUser', res => {
if (res.code == 200) {
if (res.code == 200 && res.result) {
const { const {
id, id,
name, name,


+ 43
- 46
pages_order/mine/runningWater.vue View File

@ -1,7 +1,7 @@
<template> <template>
<view class="running-water"> <view class="running-water">
<!-- 导航栏 --> <!-- 导航栏 -->
<navbar title="金额记录" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<navbar title="流水记录" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" />
<view class="bg"></view> <view class="bg"></view>
@ -9,58 +9,60 @@
<view class="money-info"> <view class="money-info">
<view class="total-brokerage"> <view class="total-brokerage">
<view class="title">总佣金</view> <view class="title">总佣金</view>
<view class="total-money">1240.00</view>
<view class="btn">
<view class="total-money">{{ totalMoney }}</view>
<!-- <view class="btn">
<view @click="$utils.navigateTo('/pages_order/mine/withdraw')" class=""> <view @click="$utils.navigateTo('/pages_order/mine/withdraw')" class="">
提现 提现
</view> </view>
</view>
</view> -->
</view> </view>
<view class="total-withdraw"> <view class="total-withdraw">
<view class="title">累计提现</view> <view class="title">累计提现</view>
<view class="total-money">15300.00</view>
<view class="btn">
<view class="total-money">{{ totalWithdraw }}</view>
<!-- <view class="btn">
<view class=""> <view class="">
提现记录 提现记录
</view> </view>
</view>
</view> -->
</view> </view>
</view> </view>
</view> </view>
<view class="date-select"> <view class="date-select">
<view class="select-title">
<!-- <view class="select-title">
金额明细 金额明细
</view>
<view class="year-info">
<view @click="openCalendars" class="time-unit">
{{ beforeYear }}
</view> -->
<view class="year-info"
@click="openCalendars">
<view class="time-unit">
<!-- format('YYYY-MM-DD HH:mm:ss') -->
{{ $dayjs(beforeDate).format('YYYY') }}
<uv-icon name="arrow-down-fill"></uv-icon> <uv-icon name="arrow-down-fill"></uv-icon>
</view> </view>
<view @click="openCalendars" class="time-unit">
{{ beforeMonth }}
<view class="time-unit">
{{ $dayjs(beforeDate).format('MM') }}
<uv-icon name="arrow-down-fill"></uv-icon> <uv-icon name="arrow-down-fill"></uv-icon>
</view> </view>
<text class="interval"></text> <text class="interval"></text>
<view @click="openCalendars" class="time-unit">
{{ afterYear }}
<view class="time-unit">
{{ $dayjs(afterDate).format('YYYY') }}
<uv-icon name="arrow-down-fill"></uv-icon> <uv-icon name="arrow-down-fill"></uv-icon>
</view> </view>
<view @click="openCalendars" class="time-unit">
{{ afterMonth }}
<view class="time-unit">
{{ $dayjs(afterDate).format('MM') }}
<uv-icon name="arrow-down-fill"></uv-icon> <uv-icon name="arrow-down-fill"></uv-icon>
</view> </view>
</view> </view>
</view> </view>
<view class="tab-box"> <view class="tab-box">
<view class="tab-box1" v-if="list && total">
<view class="tab-box1">
<uv-cell center border :title="item.title" v-for="(item, index) in list" :key="index" <uv-cell center border :title="item.title" v-for="(item, index) in list" :key="index"
:value="x[item.type] + item.money" :label="item.createTime" /> :value="x[item.type] + item.money" :label="item.createTime" />
</view> </view>
<view style="padding: 100rpx 0;" v-else>
<view style="padding: 100rpx 0;" v-if="list.length == 0">
<uv-empty mode="history" textSize="28rpx" iconSize="100rpx" /> <uv-empty mode="history" textSize="28rpx" iconSize="100rpx" />
</view> </view>
</view> </view>
@ -81,12 +83,11 @@
return { return {
x: ['+', '-', '-', '+'], x: ['+', '-', '-', '+'],
mixinsListApi: "getWaterPageList", mixinsListApi: "getWaterPageList",
beforeYear: new Date().getFullYear(), //
afterYear: new Date().getFullYear(), //
beforeMonth: new Date().getMonth() + 1 < 9 ? '' + new Date().getMonth() + 1 : new Date().getMonth() +
1, //
afterMonth: new Date().getMonth() + 1 < 9 ? '' + new Date().getMonth() + 1 : new Date().getMonth() +
1, //, //
beforeDate: new Date(), //
afterDate: new Date(), //
totalMoney : 0,
totalWithdraw : 0,
} }
}, },
methods: { methods: {
@ -99,26 +100,22 @@
// //
handleSelectCalendars(day) { handleSelectCalendars(day) {
let beforeDate = this.getYearMonth(day?.range?.before)
let afterDate = this.getYearMonth(day?.range?.after)
this.beforeYear = beforeDate.year;
this.beforeMonth = beforeDate.month;
this.afterYear = afterDate.year;
this.afterMonth = afterDate.month;
console.log(day);
// let beforeDate = this.getYearMonth(day?.range?.before)
// let afterDate = this.getYearMonth(day?.range?.after)
// this.beforeYear = beforeDate.year;
// this.beforeMonth = beforeDate.month;
// this.afterYear = afterDate.year;
// this.afterMonth = afterDate.month;
}, },
//
getYearMonth(time) {
if (!time) {
time = new Date().toString()
}
let data = new Date(time.replace(/-/g, '/'));
let year = data.getFullYear();
let month = data.getMonth() + 1;
return {
year: data.getFullYear(),
month: month < 9 ? '0' + month : month
}
getDataThen(list, total, result){
this.totalMoney = result.totalMoney
this.totalWithdraw = result.totalWithdraw
this.list = result.page.records
this.total = result.page.total
}, },
} }
} }
@ -191,7 +188,7 @@
background: white; background: white;
padding-bottom: 20rpx; padding-bottom: 20rpx;
display: flex; display: flex;
justify-content: space-between;
justify-content: center;
.select-title {} .select-title {}


+ 319
- 0
pages_order/mine/updateUser.vue View File

@ -0,0 +1,319 @@
<template>
<view class="login">
<view class="bg1"></view>
<view class="title">
定制自己的形象
</view>
<view
v-if="back"
@click="$utils.navigateBack"
style="position: absolute;top: 120rpx;left: 20rpx;">
<uv-icon
size="30rpx"
color="#000"
name="arrow-left"></uv-icon>
</view>
<button class="chooseAvatar"
open-type="chooseAvatar"
@chooseavatar="onChooseAvatar">
<image :src="form.headImage"
mode="aspectFill"></image>
</button>
<input type="nickname"
placeholder="给自己起一个响亮的名字"
class="nickname" id="nickName"
v-model="form.nickName" />
<!-- <view class="sexSelect">
<view
@click="sexClick(item)"
v-for="(item, index) in sexList"
:key="index"
:style="{color : form.sex == item.value ? item.actColor : '#333'}">
<uv-icon
size="30rpx"
:color="form.sex == item.value ? item.actColor : '#333'"
:name="item.icon"></uv-icon>
{{ item.value }}
</view>
</view> -->
<!-- <view class="address"
@click="$refs.datetimePicker.open()">
您出生于{{ $dayjs(form.yearDate).format("YYYY") }}
</view>
<view class="address"
@click="$refs.picker.open()">
{{ form.address || '请选择居住地址'}}
</view> -->
<uv-datetime-picker
ref="datetimePicker"
v-model="form.yearDate"
mode="year"
:minDate="minDate"
:maxDate="maxDate">
</uv-datetime-picker>
<uv-picker ref="picker"
:columns="columns"
keyName="name"
@confirm="confirmAddress"></uv-picker>
<view class="btn" @click="submit">
确认
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
form: {
headImage: '',
nickName: '',
sex : '男',
yearDate : this.$dayjs().add(-18, 'y').valueOf(),//18
address : '',
},
maxDate : this.$dayjs().valueOf(),
minDate : this.$dayjs().add(-100, 'y').valueOf(),
sex : {
: {
name : 'man',
color : '#5baaff',
},
: {
name : 'woman',
color : '#ff50b3',
},
},
sexList : [
{
value : '男',
icon : 'man',
actColor : '#5baaff',
},
{
value : '女',
icon : 'woman',
actColor : '#ff50b3',
},
],
columns : [],
back : '',
};
},
computed: {
...mapState(['cityList', 'userInfo']),
},
onLoad({back}) {
this.back = back
// this.$nextTick(() => {
// this.form.headImage = this.userInfo.headImage || this.form.headImage
// this.form.nickName = this.userInfo.nickName || this.form.nickName
// this.form.sex = this.userInfo.sex || this.form.sex
// this.form.yearDate = this.userInfo.yearDate || this.form.yearDate
// this.form.address = this.userInfo.address || this.form.address
// })
},
onShow() {
this.getCityList()
this.getUserInfo()
},
computed: {},
methods: {
onChooseAvatar(res) {
let self = this
self.$Oss.ossUpload(res.target.avatarUrl)
.then(url => {
self.form.headImage = url
})
},
sexClick(item){
this.form.sex = item.value
},
confirmAddress(e){
this.form.address = e.value[0].name
},
//
getCityList(){
this.$api('getCityList', res => {
if(res.code == 200){
this.columns = [
res.result
]
}
})
},
getUserInfo(){
this.$api('getInfo', res => {
if(res.code == 200){
this.form.headImage = res.result.headImage || this.form.headImage
this.form.nickName = res.result.nickName || this.form.nickName
this.form.sex = res.result.sex || this.form.sex
this.form.yearDate = res.result.yearDate &&
this.$dayjs(res.result.yearDate + '-01-01').valueOf() || this.form.yearDate
this.form.address = res.result.address || this.form.address
}
})
},
submit() {
let self = this
uni.createSelectorQuery().in(this)
.select("#nickName")
.fields({
properties: ["value"],
})
.exec((res) => {
const nickName = res?.[0]?.value
self.form.nickName = nickName
if (self.$utils.verificationAll(self.form, {
headImage: '请选择头像',
nickName: '请填写昵称',
// address: '',
})) {
return
}
let data = {
...self.form,
// yearDate : this.$dayjs(self.form.yearDate).format("YYYY")
}
self.$api('updateInfo', data, res => {
if (res.code == 200) {
uni.reLaunch({
url:'/pages/index/index'
})
}
})
})
},
}
}
</script>
<style lang="scss" scoped>
.login {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #fff;
overflow: hidden;
.bg1{
width: 700rpx;
height: 700rpx;
border-radius: 50%;
background-color: #ffc0b333;
position: absolute;
right: -300rpx;
top: -300rpx;
}
.title {
line-height: 45rpx;
font-weight: 900;
padding-bottom: 100rpx;
font-size: 40rpx;
}
.chooseAvatar {
width: 100%;
padding: 0 !important;
margin: 0 !important;
border: none;
background-color: #fff !important;
width: 220rpx;
height: 220rpx;
border-radius: 50%;
image{
width: 200rpx;
height: 200rpx;
border-radius: 50%;
box-shadow: 0 0 10rpx 10rpx #00000012;
margin: 10rpx;
}
}
.chooseAvatar::after{
border: none;
padding: 0 !important;
margin: 0 !important;
}
.nickname{
background-color: #f7f7f7;
width: 600rpx;
height: 80rpx;
text-align: center;
border-radius: 40rpx;
margin-top: 30rpx;
}
.sexSelect{
background-color: #f7f7f7;
width: 600rpx;
height: 80rpx;
text-align: center;
border-radius: 40rpx;
margin-top: 30rpx;
display: flex;
align-items: center;
font-size: 26rpx;
line-height: 80rpx;
overflow: hidden;
&>view{
flex: 1;
display: flex;
justify-content: center;
align-content: center;
height: 100%;
}
&>view:nth-child(1){
border-right: 1px solid #000;
}
}
.address{
background-color: #f7f7f7;
width: 600rpx;
height: 80rpx;
text-align: center;
border-radius: 40rpx;
margin-top: 30rpx;
line-height: 80rpx;
color: #555;
}
.btn {
// background: $uni-linear-gradient-btn-color;
background: $uni-color;
color: #fff;
width: 80%;
padding: 20rpx 0;
text-align: center;
border-radius: 15rpx;
margin-top: 10vh;
}
}
</style>

+ 12
- 10
pages_order/mine/withdraw.vue View File

@ -13,16 +13,16 @@
</view> </view>
<view class="operation"> <view class="operation">
<view @click="toRunningWater" class="operation-item">
<!-- <view @click="toRunningWater" class="operation-item">
余额记录 余额记录
</view> </view>
| |
<view @click="toRunningWater" class="operation-item"> <view @click="toRunningWater" class="operation-item">
提现记录 提现记录
</view> </view>
|
| -->
<view @click="toRunningWater" class="operation-item"> <view @click="toRunningWater" class="operation-item">
佣金记录
流水记录
</view> </view>
</view> </view>
</view> </view>
@ -45,10 +45,8 @@
<view v-html="configList.recharge_instructions" class="withdrawal-statement" style="color: #666666;"></view> <view v-html="configList.recharge_instructions" class="withdrawal-statement" style="color: #666666;"></view>
</view> </view>
<view class="recharge">
<view @click="withdraw" class="btn">
立即提现
</view>
<view @click="withdraw" class="uni-color-btn">
立即提现
</view> </view>
</view> </view>
</template> </template>
@ -70,7 +68,10 @@
}, },
} }
}, },
onShow() {},
onShow() {
this.$store.commit('getUserInfo')
this.$store.commit('getRiceInfo')
},
methods: { methods: {
withdraw() { // withdraw() { //
if (this.form.money < 300) { if (this.form.money < 300) {
@ -92,7 +93,8 @@
title: '提现成功', title: '提现成功',
icon: 'none' icon: 'none'
}) })
this.getUserInfo()
this.$store.commit('getUserInfo')
this.$store.commit('getRiceInfo')
} }
}) })
}, },
@ -166,7 +168,7 @@
left: 0rpx; left: 0rpx;
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: center;
justify-content: flex-end;
color: white; color: white;
.operation-item { .operation-item {


+ 82
- 51
pages_order/order/createOrder.vue View File

@ -16,7 +16,7 @@
<view class="server-title">{{ item.title }}</view> <view class="server-title">{{ item.title }}</view>
<view class="texture"> <view class="texture">
材质暂无
材质{{ item.subText }}
</view> </view>
<view class="stepper"> <view class="stepper">
@ -24,7 +24,7 @@
</view> </view>
<view class="sales-volume"> <view class="sales-volume">
<view class="desc">已售出 {{ item.num }}</view>
<view class="desc">已售出 {{ item.payNum }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -34,7 +34,7 @@
<view class="cell-item-left"> <view class="cell-item-left">
<image src="@/pages_order/static/createOrder/address.png" mode="widthFix" class="cell-icon"></image> <image src="@/pages_order/static/createOrder/address.png" mode="widthFix" class="cell-icon"></image>
<view class="user-name">{{ address.name }}</view> <view class="user-name">{{ address.name }}</view>
<view class="user-address">{{ address.address}}</view>
<view class="user-address">{{ address.address }}</view>
</view> </view>
<view class="cell-item-right"> <view class="cell-item-right">
<uv-icon name="arrow-right"></uv-icon> <uv-icon name="arrow-right"></uv-icon>
@ -42,34 +42,42 @@
</view> </view>
<view class="cell-list"> <view class="cell-list">
<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>
<uv-radio-group v-model="payMethod">
<view style="width: 710rpx;">
<!-- 账户余额 -->
<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">
<uv-radio activeColor="#E3441A"
size="40rpx"
icon-size="30rpx"
:name="1"/>
</view>
</view> </view>
<view class="cell-item-right">
<radio color="#E3441A" :value="1" :checked="index === current" />
<!-- 微信支付 -->
<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">
<uv-radio
activeColor="#E3441A"
size="40rpx"
icon-size="30rpx"
:name="0"/>
</view>
</view> </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">
<radio color="#E3441A" :value="2" :checked="index === current" />
</view>
</view>
</radio-group>
</uv-radio-group>
</view> </view>
<!-- 优惠券 --> <!-- 优惠券 -->
@ -80,13 +88,14 @@
<view class="descript">({{ coupon.money || 0}})</view> <view class="descript">({{ coupon.money || 0}})</view>
</view> </view>
<view class="cell-item-right"> <view class="cell-item-right">
<radio color="#E3441A" :value="2" :checked="coupon.id" />
<!-- <radio color="#E3441A" :value="2" :checked="coupon.id" /> -->
</view> </view>
</view> </view>
<!-- 提示 --> <!-- 提示 -->
<view class="hint">
温馨提示下单前请仔细查看下单需知
<view class="hint"
v-if="payOrderProduct[0] && payOrderProduct[0].orderDetails">
{{ payOrderProduct[0].orderDetails }}
</view> </view>
<!-- 用户协议 --> <!-- 用户协议 -->
@ -150,8 +159,9 @@
addressTotal: 0, addressTotal: 0,
remark: '', remark: '',
num: 1, num: 1,
agreement: true,
agreement: false,
coupon: {}, coupon: {},
payMethod : 0,
} }
}, },
computed: { computed: {
@ -246,39 +256,64 @@
}) })
return return
} }
if (!this.agreement) {
uni.showToast({
title: '请先同意使用协议',
icon: 'none'
})
return
}
let data = {} let data = {}
let api = '' let api = ''
if (this.payOrderProduct[0].shopId || this.payOrderProduct[0].type == 2) { //
// if (this.payOrderProduct[0].shopId || this.payOrderProduct[0].type == 2) { //
let list = []
this.payOrderProduct.forEach(n => {
list.push({
num: n.num,
shopId: n.shopId || n.id,
})
})
data = {
addressId,
list: JSON.stringify(list),
}
api = 'createSumOrder'
// let list = []
// this.payOrderProduct.forEach(n => {
// list.push({
// num: n.num,
// shopId: n.shopId || n.id,
// })
// })
// data = {
// addressId,
// list: JSON.stringify(list),
// }
// api = 'createSumOrder'
this.deleteCart(this.payOrderProduct.map(n => n.id).join(','))
// this.deleteCart(this.payOrderProduct.map(n => n.id).join(','))
} else { //
// } else { //
data = { data = {
addressId, addressId,
num: this.payOrderProduct[0].num, num: this.payOrderProduct[0].num,
shopId: this.payOrderProduct[0].id, shopId: this.payOrderProduct[0].id,
payType : this.payMethod,
} }
api = 'createOrder' api = 'createOrder'
// }
if(this.coupon.id){
data.couponId = this.coupon.id
} }
this.$api(api, data, res => { this.$api(api, data, res => {
if (res.code == 200) { if (res.code == 200) {
if(this.payMethod == 1){
uni.showToast({
title: '下单成功',
icon: 'none'
})
setTimeout(uni.redirectTo, 700, {
url: '/pages/index/order'
})
return
}
uni.requestPaymentWxPay(res) uni.requestPaymentWxPay(res)
.then(res => { .then(res => {
uni.showToast({ uni.showToast({
@ -314,10 +349,6 @@
ids ids
}) })
}, },
//
selectPayMethod(e) {
console.log(e.detail.value)
}
} }
} }
</script> </script>


+ 1
- 1
pages_order/order/orderDetail.vue View File

@ -181,7 +181,7 @@
</view> </view>
</view> </view>
<view class="min_tips" style="line-height: 40rpx;"> <view class="min_tips" style="line-height: 40rpx;">
下单须知下单须知下单须知下单须知下单须知下单须知
{{ order.orderDetails }}
</view> </view>
<view class="btns"> <view class="btns">
<view @click="$refs.customerServicePopup.open()" class="btn"> <view @click="$refs.customerServicePopup.open()" class="btn">


+ 2
- 2
pages_order/product/productDetail.vue View File

@ -16,7 +16,7 @@
</view> </view>
<!-- 服务 --> <!-- 服务 -->
<!-- <view class="server">
<view class="server">
<view class="setver-main"> <view class="setver-main">
<view class="title">服务</view> <view class="title">服务</view>
<view class="descript"> <view class="descript">
@ -27,7 +27,7 @@
<view class="server-arraw"> <view class="server-arraw">
<uv-icon name="arrow-right"></uv-icon> <uv-icon name="arrow-right"></uv-icon>
</view> </view>
</view> -->
</view>
<!-- 参数 --> <!-- 参数 -->
<view v-if="productDetail.sku" class="params"> <view v-if="productDetail.sku" class="params">


+ 4
- 4
uni_modules/uv-empty/components/uv-empty/props.js View File

@ -18,7 +18,7 @@ export default {
// 文字大小 // 文字大小
textSize: { textSize: {
type: [String, Number], type: [String, Number],
default: 14
default: 30
}, },
// 图标的颜色 // 图标的颜色
iconColor: { iconColor: {
@ -28,7 +28,7 @@ export default {
// 图标的大小 // 图标的大小
iconSize: { iconSize: {
type: [String, Number], type: [String, Number],
default: 90
default: 180
}, },
// 选择预置的图标类型 // 选择预置的图标类型
mode: { mode: {
@ -38,12 +38,12 @@ export default {
// 图标宽度,单位px // 图标宽度,单位px
width: { width: {
type: [String, Number], type: [String, Number],
default: 160
default: 320
}, },
// 图标高度,单位px // 图标高度,单位px
height: { height: {
type: [String, Number], type: [String, Number],
default: 160
default: 320
}, },
// 是否显示组件 // 是否显示组件
show: { show: {


+ 3
- 3
uni_modules/uv-radio/components/uv-radio/props.js View File

@ -33,12 +33,12 @@ export default {
// 图标的大小,单位px // 图标的大小,单位px
iconSize: { iconSize: {
type: [String, Number], type: [String, Number],
default: ''
default: '26rpx'
}, },
// label的字体大小,px单位 // label的字体大小,px单位
labelSize: { labelSize: {
type: [String, Number], type: [String, Number],
default: ''
default: '30rpx'
}, },
// label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式 // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
label: { label: {
@ -48,7 +48,7 @@ export default {
// 整体的大小 // 整体的大小
size: { size: {
type: [String, Number], type: [String, Number],
default: ''
default: '30rpx'
}, },
// 图标颜色 // 图标颜色
iconColor: { iconColor: {


Loading…
Cancel
Save