Browse Source

上传

master
前端-胡立永 4 months ago
parent
commit
bf64d6be54
18 changed files with 1073 additions and 130 deletions
  1. +55
    -53
      components/product/productItem.vue
  2. +15
    -0
      pages.json
  3. +16
    -5
      pages/index/center.vue
  4. +5
    -1
      pages/index/index.vue
  5. +1
    -1
      pages_order/components/address/addressList.vue
  6. +6
    -4
      pages_order/components/product/submit.vue
  7. +0
    -44
      pages_order/home/Worknotice.vue
  8. +5
    -7
      pages_order/home/journalism.vue
  9. +132
    -0
      pages_order/mine/balance.vue
  10. +134
    -0
      pages_order/mine/commission.vue
  11. +168
    -0
      pages_order/mine/recharge.vue
  12. +10
    -3
      pages_order/mine/recommend.vue
  13. +168
    -0
      pages_order/mine/withdraw.vue
  14. +288
    -0
      pages_order/order/createOrder.vue
  15. +34
    -12
      pages_order/product/productDetail.vue
  16. BIN
      pages_order/static/address/icon1.png
  17. +16
    -0
      store/store.js
  18. +20
    -0
      uni.scss

+ 55
- 53
components/product/productItem.vue View File

@ -1,22 +1,19 @@
<template>
<view class="item"
@click="$emit('click')">
<view class="item" @click="$emit('click')">
<view class="item-image">
<image
:src="item.image || 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg'"
mode="aspectFill"></image>
<image :src="item.image || 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg'" mode="aspectFill">
</image>
</view>
<view class="info">
<view class="title">
小青蛙大米
{{ item.title }}
</view>
<view class="desc">
500g每罐*2
{{ item.sku }}
</view>
<view class="price">
19.9
{{ item.price }}
</view>
</view>
</view>
@ -24,60 +21,65 @@
<script>
export default {
props : {
item : {
default : {}
props: {
item: {
default: {}
}
},
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
.item {
padding: 10rpx 20rpx;
align-items: center;
margin-bottom: 20rpx;
display: flex;
.item {
padding: 10rpx 20rpx;
align-items: center;
margin-bottom: 20rpx;
display: flex;
width: 100%;
box-sizing: border-box;
.item-image {
width: 140rpx;
height: 140rpx;
flex-shrink: 0;
image {
height: 100%;
width: 100%;
box-sizing: border-box;
.item-image {
width: 140rpx;
height: 140rpx;
flex-shrink: 0;
image{
height: 100%;
width: 100%;
border-radius: 20rpx;
}
}
.info {
padding: 20rpx;
color: #555;
flex: 1;
.title{
font-size: 28rpx;
font-weight: 900;
}
.desc{
font-size: 22rpx;
color: #777;
margin-top: 10rpx;
}
.price{
text-align: right;
color: #f40;
font-size: 30rpx;
font-weight: 900;
}
}
border-radius: 20rpx;
}
</style>
}
.info {
padding: 20rpx;
color: #555;
flex: 1;
.title {
font-size: 28rpx;
font-weight: 900;
}
.desc {
font-size: 22rpx;
color: #777;
margin-top: 10rpx;
}
.price {
text-align: right;
color: #f40;
font-size: 30rpx;
font-weight: 900;
}
}
}
</style>

+ 15
- 0
pages.json View File

@ -86,6 +86,21 @@
},
{
"path" : "home/newsDetail"
},
{
"path" : "order/createOrder"
},
{
"path" : "mine/balance"
},
{
"path": "mine/commission"
},
{
"path": "mine/withdraw"
},
{
"path": "mine/recharge"
}
]
}],


+ 16
- 5
pages/index/center.vue View File

@ -30,7 +30,8 @@
<view>查看权益></view>
</view>
<view class="deposit">
<view class="box">
<view class="box"
@click="$utils.navigateTo('/pages_order/mine/purse')">
<view>
<view class="num">1.00</view>
<view class="text">收益明细()</view>
@ -38,19 +39,23 @@
<view class="boxs">收益明细</view>
</view>
<view class="box">
<view>
<view
@click="$utils.navigateTo('/pages_order/mine/balance')">
<view class="num">1.00</view>
<view class="text">余额()</view>
</view>
<view class="boxs">去充值</view>
<view class="boxs"
@click="$utils.navigateTo('/pages_order/mine/recharge')">去充值</view>
</view>
<view class="box">
<view>
<view
@click="$utils.navigateTo('/pages_order/mine/commission')">
<view class="num" style="border: none;">1.00</view>
<view class="text">可提现()</view>
</view>
<view class="boxs" @click="$utils.navigateTo('/pages_order/mine/purse')">去提现</view>
<view class="boxs"
@click="$utils.navigateTo('/pages_order/mine/withdraw')">去提现</view>
</view>
</view>
</view>
@ -100,11 +105,17 @@
<view class="cell-bottom">
<uv-cell-group>
<uv-cell icon="share" title="我的邀请码" :isLink="true" arrow-direction="right" />
<uv-cell icon="share" title="我的推荐" :isLink="true" arrow-direction="right"
@click="$utils.navigateTo('/pages_order/mine/recommend')" />
<uv-cell icon="share" title="联系客服" :isLink="true" arrow-direction="right" />
<uv-cell icon="share" title="我的地址" :isLink="true" arrow-direction="right"
@click="$utils.navigateTo('/pages_order/mine/address')"/>
<uv-cell icon="share" title="退出登录" :isLink="true" arrow-direction="right"
@click="$store.commit('logout')"/>
</uv-cell-group>
</view>


+ 5
- 1
pages/index/index.vue View File

@ -50,6 +50,7 @@
<view class="centre">
<view class="boxs"
:key="index"
@click.stop="$utils.navigateTo('/pages_order/product/productDetail?id=' + item.id)"
v-for="(item, index) in riceProductList">
<view class="box-text">
<view>{{ item.title }}</view>
@ -77,6 +78,7 @@
<view class="centre">
<view class="boxs"
:key="index"
@click.stop="$utils.navigateTo('/pages_order/product/productDetail?id=' + item.id)"
v-for="(item, index) in commonProductList">
<view class="box-text">
<view>{{ item.title }}</view>
@ -99,7 +101,9 @@
<view>News trends</view>
<view>新闻动态 ___ _</view>
</view>
<view class="top1" @click="$utils.navigateTo('/pages_order/home/journalism')">
<view class="top1"
@click="$utils.navigateTo('/pages_order/home/journalism')"
>
更多
</view>
</view>


+ 1
- 1
pages_order/components/address/addressList.vue View File

@ -11,7 +11,7 @@
<view class="address-item-top"
@click="select(item)">
<view class="img-box">
<image src="../../static/address/icon.png" mode="aspectFill"></image>
<image src="../../static/address/icon1.png" mode="aspectFill"></image>
</view>
<view class="address-info">


+ 6
- 4
pages_order/components/product/submit.vue View File

@ -24,11 +24,13 @@
</view> -->
<view class="submit-btn"
@click="$emit('submit')">
<view class="l">
>
<view class="l"
@click="$emit('addCart')">
加入购物车
</view>
<view class="r">
<view class="r"
@click="$emit('submit')">
{{ submiitTitle }}
</view>
</view>
@ -40,7 +42,7 @@
name:"submit",
props : {
submiitTitle : {
default : '立即租赁',
default : '立即购买',
type : String,
}
},


+ 0
- 44
pages_order/home/Worknotice.vue View File

@ -1,44 +0,0 @@
<template>
<!-- 公告 -->
<view class="page">
<navbar title="公告" leftClick @leftClick="$utils.navigateBack" />
<view style="padding: 20rpx;">
<uv-parse :content="NewsById.content"></uv-parse>
</view>
</view>
</template>
<script>
export default {
data() {
return {
NewsById : {},
id : 0,
}
},
onLoad(args) {
this.id = args.id
this.queryNewsById()
},
methods: {
//-id
queryNewsById(){
this.$api('queryNewsById', {
newsId : this.id
}, res =>{
if(res.code == 200){
this.NewsById = res.result
}
})
},
}
}
</script>
<style scoped lang="scss">
.page {
}
</style>

+ 5
- 7
pages_order/home/journalism.vue View File

@ -1,10 +1,8 @@
<template>
<view class="page">
<navbar title="新闻中心" leftClick @leftClick="$utils.navigateBack" />
<view class="card"
@click="$utils.navigateTo('/pages_order/home/newsDetail?id=' + item.id)"
v-for="(item, index) in list"
:key="item.id">
<navbar title="新闻中心" leftClick @leftClick="$utils.navigateBack" />
<view class="card" @click="$utils.navigateTo('/pages_order/home/newsDetail?id=' + item.id)"
v-for="(item, index) in list" :key="item.id">
<view class="card-img">
<image :src="item.image" mode="aspectFill"></image>
</view>
@ -21,10 +19,10 @@
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins : [mixinsList],
mixins: [mixinsList],
data() {
return {
mixinsListApi : 'getRiceNewsList',
mixinsListApi: 'getRiceNewsList',
}
},


+ 132
- 0
pages_order/mine/balance.vue View File

@ -0,0 +1,132 @@
<template>
<view class="page">
<navbar title="余额"
bgColor="#A3D250"
color="#fff"
leftClick
@leftClick="$utils.navigateBack" />
<view class="bg"/>
<view class="price">
<view class="title">
我的余额
</view>
<view class="num">
16666
</view>
</view>
<view class="cell">
<view class="cell-top">收支明细</view>
<view class="cell-box"
:key="index"
v-for="(item,index) in list">
<uv-cell-group>
<uv-cell
:title="item.title"
:label="item.createTime"
:center="true">
<template #value>
<view class="cell-text">
<view class="price-text">-19.9</view>
<view class="tips">已到账</view>
</view>
</template>
</uv-cell>
</uv-cell-group>
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins : [mixinsList],
data() {
return {
// mixinsListApi : 'getWaterPageList',
list : [
{
title : '直播收入',
type : 0,
createTime : '2021-12-12',
}
],
type : ['-', '+'],
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
.page{
.bg{
background-color: $uni-color;
height: 300rpx;
position: absolute;
left: 0;
width: 100%;
z-index: -1;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
}
.price{
color: #FFFFFF;
padding: 40rpx;
.title{
color: #eee;
font-size: 28rpx;
}
.num{
font-size: 50rpx;
font-weight: 900;
margin-top: 10rpx;
}
}
.cell {
margin: 20rpx;
background-color: #FFFFFF;
border-radius: 16rpx;
.cell-top {
padding: 40rpx 34rpx;
color: #474747;
font-size: 34rpx;
font-weight: 600;
position: relative;
&::after{
content: '';
display: block;
position: absolute;
left: 55rpx;
bottom: 38rpx;
height: 10rpx;
width: 120rpx;
background: linear-gradient(to right, #fff, $uni-color);
}
}
.cell-text{
text-align: right;
.price-text{
color: #f40;
font-size: 32rpx;
font-weight: 900;
}
.tips{
font-size: 22rpx;
color: #aaa;
margin-top: 10rpx;
}
}
}
}
</style>

+ 134
- 0
pages_order/mine/commission.vue View File

@ -0,0 +1,134 @@
<template>
<view class="page">
<navbar title="佣金"
bgColor="#A3D250"
color="#fff"
leftClick
@leftClick="$utils.navigateBack" />
<view class="bg"/>
<view class="price">
<view class="title">
我的佣金
</view>
<view class="num">
16666
</view>
</view>
<view class="cell">
<view class="cell-top">收支明细</view>
<view class="cell-box"
:key="index"
v-for="(item,index) in list">
<uv-cell-group>
<uv-cell
:title="item.title"
:label="item.createTime"
:center="true">
<template #value>
<view class="cell-text">
<view class="price-text">-19.9</view>
<view class="tips">已到账</view>
</view>
</template>
</uv-cell>
</uv-cell-group>
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins : [mixinsList],
data() {
return {
// mixinsListApi : 'getWaterPageList',
list : [
{
title : '直播收入',
type : 0,
createTime : '2021-12-12',
}
],
type : ['-', '+'],
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
.page{
.bg{
background-color: $uni-color;
height: 160rpx;
position: absolute;
left: 0;
width: 100%;
z-index: -1;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
}
.price{
background-color: #fff;
padding: 40rpx;
margin: 20rpx;
border-radius: 20rpx;
.title{
color: #777;
font-size: 28rpx;
}
.num{
font-size: 50rpx;
font-weight: 900;
margin-top: 10rpx;
}
}
.cell {
margin: 20rpx;
background-color: #FFFFFF;
border-radius: 16rpx;
.cell-top {
padding: 40rpx 34rpx;
color: #474747;
font-size: 34rpx;
font-weight: 600;
position: relative;
&::after{
content: '';
display: block;
position: absolute;
left: 55rpx;
bottom: 38rpx;
height: 10rpx;
width: 120rpx;
background: linear-gradient(to right, #fff, $uni-color);
}
}
.cell-text{
text-align: right;
.price-text{
color: #f40;
font-size: 32rpx;
font-weight: 900;
}
.tips{
font-size: 22rpx;
color: #aaa;
margin-top: 10rpx;
}
}
}
}
</style>

+ 168
- 0
pages_order/mine/recharge.vue View File

@ -0,0 +1,168 @@
<template>
<view class="page">
<navbar title="提现"
bgColor="#A3D250"
color="#fff"
leftClick
@leftClick="$utils.navigateBack" />
<view class="bg"/>
<view class="price">
<view class="title">
请输入提现金额
</view>
<view class="input-box">
<view class="input">
<input type="text" />
</view>
<view class="">
全部提现
</view>
</view>
<view class="num">
可提现金额16666
</view>
</view>
<view class="cell">
<view class="cell-top">提现说明</view>
<view style="padding: 0 20rpx;">
<uv-parse :content="configList.withdrawal_instructions"></uv-parse>
</view>
</view>
<view class="cell">
<view class="cell-top">提现记录</view>
<view class="cell-box"
:key="index"
v-for="(item,index) in list">
<uv-cell-group>
<uv-cell
:title="item.title"
:label="item.createTime"
:center="true">
<template #value>
<view class="cell-text">
<view class="price-text">-19.9</view>
<view class="tips">已到账</view>
</view>
</template>
</uv-cell>
</uv-cell-group>
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins : [mixinsList],
data() {
return {
// mixinsListApi : 'getWaterPageList',
list : [
{
title : '直播收入',
type : 0,
createTime : '2021-12-12',
}
],
type : ['-', '+'],
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
.page{
.bg{
background-color: $uni-color;
height: 380rpx;
position: absolute;
left: 0;
width: 100%;
z-index: -1;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
}
.price{
color: #FFFFFF;
padding: 40rpx;
.title{
color: #eee;
font-size: 28rpx;
}
.input-box{
background-color: #FFFFFF;
color: $uni-color;
display: flex;
justify-content: center;
border-radius: 30rpx;
align-items: center;
padding: 10rpx;
margin: 20rpx 0;
.input{
color: #000;
font-size: 40rpx;
font-weight: 900;
display: flex;
flex: 1;
input{
flex: 1;
padding: 14rpx 20rpx;
}
}
}
.num{
font-size: 30rpx;
font-weight: 900;
margin-top: 10rpx;
}
}
.cell {
margin: 20rpx;
background-color: #FFFFFF;
border-radius: 16rpx;
.cell-top {
padding: 40rpx 34rpx;
color: #474747;
font-size: 34rpx;
font-weight: 600;
position: relative;
&::after{
content: '';
display: block;
position: absolute;
left: 55rpx;
bottom: 38rpx;
height: 10rpx;
width: 120rpx;
background: linear-gradient(to right, #fff, $uni-color);
}
}
.cell-text{
text-align: right;
.price-text{
color: #f40;
font-size: 32rpx;
font-weight: 900;
}
.tips{
font-size: 22rpx;
color: #aaa;
margin-top: 10rpx;
}
}
}
}
</style>

+ 10
- 3
pages_order/mine/recommend.vue View File

@ -9,9 +9,14 @@
</view>
<view class="cell">
<view class="cell-top">推广明细</view>
<view class="cell-box" v-for="(item,index) in 10">
<view class="cell-box"
:key="index"
v-for="(item,index) in list">
<uv-cell-group>
<uv-cell title="直推:张三" label="2024-11-12 12:56:48" :center="true">
<uv-cell
:title="item.nickName"
:label="item.createTime"
:center="true">
<template #value>
<text style="font-weight: 600; font-size: 28rpx;">黄金会员</text>
</template>
@ -23,10 +28,12 @@
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins : [mixinsList],
data() {
return {
mixinsListApi : 'getFansPageList',
}
},
onLoad(e) {},


+ 168
- 0
pages_order/mine/withdraw.vue View File

@ -0,0 +1,168 @@
<template>
<view class="page">
<navbar title="提现"
bgColor="#A3D250"
color="#fff"
leftClick
@leftClick="$utils.navigateBack" />
<view class="bg"/>
<view class="price">
<view class="title">
请输入提现金额
</view>
<view class="input-box">
<view class="input">
<input type="text" />
</view>
<view class="">
全部提现
</view>
</view>
<view class="num">
可提现金额16666
</view>
</view>
<view class="cell">
<view class="cell-top">提现说明</view>
<view style="padding: 0 20rpx;">
<uv-parse :content="configList.withdrawal_instructions"></uv-parse>
</view>
</view>
<view class="cell">
<view class="cell-top">提现记录</view>
<view class="cell-box"
:key="index"
v-for="(item,index) in list">
<uv-cell-group>
<uv-cell
:title="item.title"
:label="item.createTime"
:center="true">
<template #value>
<view class="cell-text">
<view class="price-text">-19.9</view>
<view class="tips">已到账</view>
</view>
</template>
</uv-cell>
</uv-cell-group>
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins : [mixinsList],
data() {
return {
// mixinsListApi : 'getWaterPageList',
list : [
{
title : '直播收入',
type : 0,
createTime : '2021-12-12',
}
],
type : ['-', '+'],
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
.page{
.bg{
background-color: $uni-color;
height: 380rpx;
position: absolute;
left: 0;
width: 100%;
z-index: -1;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
}
.price{
color: #FFFFFF;
padding: 40rpx;
.title{
color: #eee;
font-size: 28rpx;
}
.input-box{
background-color: #FFFFFF;
color: $uni-color;
display: flex;
justify-content: center;
border-radius: 30rpx;
align-items: center;
padding: 10rpx;
margin: 20rpx 0;
.input{
color: #000;
font-size: 40rpx;
font-weight: 900;
display: flex;
flex: 1;
input{
flex: 1;
padding: 14rpx 20rpx;
}
}
}
.num{
font-size: 30rpx;
font-weight: 900;
margin-top: 10rpx;
}
}
.cell {
margin: 20rpx;
background-color: #FFFFFF;
border-radius: 16rpx;
.cell-top {
padding: 40rpx 34rpx;
color: #474747;
font-size: 34rpx;
font-weight: 600;
position: relative;
&::after{
content: '';
display: block;
position: absolute;
left: 55rpx;
bottom: 38rpx;
height: 10rpx;
width: 120rpx;
background: linear-gradient(to right, #fff, $uni-color);
}
}
.cell-text{
text-align: right;
.price-text{
color: #f40;
font-size: 32rpx;
font-weight: 900;
}
.tips{
font-size: 22rpx;
color: #aaa;
margin-top: 10rpx;
}
}
}
}
</style>

+ 288
- 0
pages_order/order/createOrder.vue View File

@ -0,0 +1,288 @@
<template>
<view class="page">
<navbar title="下单支付" leftClick @leftClick="$utils.navigateBack" />
<view class="box">
<!-- 地址 -->
<view class="address" @click="openAddress">
<image src="../static/address/icon1.png" mode=""></image>
<view class="">
{{ address.name }}
</view>
<view class="">
{{ address.addressDetail }}
</view>
<view class="icon">
<uv-icon size="30rpx" name="arrow-right"></uv-icon>
</view>
</view>
<view class="productList">
<view class="item"
:key="index"
v-for="(item, index) in productList">
<view class="item-image">
<image :src="item.image || 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg'"
mode="aspectFill"></image>
</view>
<view class="info">
<view class="title">
{{ item.title }}
</view>
<view class="desc">
{{ item.sku }}
</view>
<view class="price">
<view class="">
<uv-number-box
v-model="num"
></uv-number-box>
</view>
<view class="">
{{ item.price }}
</view>
</view>
</view>
</view>
</view>
<view class="submit-box">
<view class="peis">
<view class="">
配送方式
</view>
<view class="">
商家自行配送
</view>
</view>
<view class="priceInfo">
<view class="">
付款金额
</view>
<view class="totalPrice">
{{ totalPrice }}
</view>
</view>
<view class="remark">
<input type="text"
placeholder="请输入备注"
v-model="remark"/>
</view>
</view>
<view class="uni-color-btn">
确认下单
</view>
</view>
<!-- 地址选择 -->
<uv-popup ref="addressPopup" :round="30">
<addressList ref="addressList" height="60vh" @select="selectAddress" />
</uv-popup>
</view>
</template>
<script>
import addressList from '../components/address/addressList.vue'
export default {
components: {
addressList,
},
data() {
return {
pids: [],
productList: [],
address: {
name: '请选择地址',
addressDetail: '',
},
addressTotal: 0,
remark : '',
num : 1,
}
},
computed : {
totalPrice(){
let price = 0
this.productList.forEach(n => {
price += n.price * this.num
})
return Number(price).toFixed(2)
},
},
onLoad({
pid
}) {
this.pids = pid ? pid.split(',') : [],
this.getRiceProductDetail()
},
onShow() {
this.getAddressList()
},
methods: {
//
getRiceProductDetail() {
this.pids.forEach(id => {
this.$api('getRiceProductDetail', {
id
}, res => {
if (res.code == 200) {
this.productList.push(res.result)
}
})
})
},
//
getAddressList() {
//
this.$refs.addressList.getAddressList().then(res => {
this.addressTotal = res.total
if (this.addressTotal != 0) {
this.address = res.records[0]
}
})
},
//
openAddress() {
if (this.addressTotal == 0) {
return uni.navigateTo({
url: '/pages_order/mine/address?type=back'
})
}
this.$refs.addressPopup.open('bottom')
},
//
selectAddress(e) {
this.address = e
this.$refs.addressPopup.close()
},
}
}
</script>
<style scoped lang="scss">
.page {
.box {
padding: 20rpx;
.address {
display: flex;
padding: 20rpx;
background-color: #fff;
align-items: center;
border-radius: 20rpx;
image {
width: 40rpx;
height: 40rpx;
margin: 20rpx;
}
view {
margin: 20rpx;
overflow: hidden; //
text-overflow: ellipsis; //
white-space: nowrap; //
}
.icon {
margin-left: auto;
}
}
.productList {
margin-top: 20rpx;
background-color: #fff;
border-radius: 20rpx;
.item {
padding: 10rpx 20rpx;
align-items: center;
margin-bottom: 20rpx;
display: flex;
width: 100%;
box-sizing: border-box;
.item-image {
width: 140rpx;
height: 140rpx;
flex-shrink: 0;
image {
height: 100%;
width: 100%;
border-radius: 20rpx;
}
}
.info {
padding: 20rpx;
color: #555;
flex: 1;
.title {
font-size: 28rpx;
font-weight: 900;
}
.desc {
font-size: 22rpx;
color: #777;
margin-top: 10rpx;
}
.price {
display: flex;
justify-content: space-between;
color: #f40;
font-size: 30rpx;
font-weight: 900;
}
}
}
}
.submit-box{
background-color: #fff;
padding: 20rpx;
border-radius: 20rpx;
&>view:nth-child(2){
margin-top: 20rpx;
}
&>view{
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
&>view:nth-child(1){
font-weight: 900;
}
&>view:nth-child(2){
color: #999;
font-size: 24rpx;
}
.totalPrice{
color: #f40 !important;
font-size: 34rpx !important;
font-weight: 900;
}
}
.remark{
margin-top: 30rpx;
input{
background-color: #f3f3f3;
padding: 14rpx 20rpx;
border-radius: 20rpx;
flex: 1;
}
}
}
}
}
</style>

+ 34
- 12
pages_order/product/productDetail.vue View File

@ -15,31 +15,37 @@
<view class="info">
<view class="">
<view class="title">
三只青蛙低GI大米
{{ productDetail.title }}
</view>
<view class="desc">
三只青蛙低GI大米500g每罐
{{ productDetail.sku }}
</view>
</view>
<view class="">
<view class="price">
<text>9.9</text>
会员价<text>{{ productDetail.price }}</text>
</view>
<view class="oldPrice">
<text>45.9</text>
零售价<text>{{ productDetail.oldPrice }}</text>
</view>
</view>
</view>
<uv-parse :content="productDetail.content"></uv-parse>
<uv-parse :content="productDetail.details"></uv-parse>
<!-- 分享和租赁按钮 -->
<!-- 分享和购买按钮 -->
<submit
@submit="$utils.navigateTo('/pages_order/order/createOrder?pid=' + id)"
/>
<!-- <submit
@submit="$refs.submitUnitSelect.open()"
@share="share"/>
@share="share"/> -->
<!-- 选择规格 -->
<submitUnitSelect ref="submitUnitSelect"/>
<!-- <submitUnitSelect
:detail="productDetail"
ref="submitUnitSelect"/> -->
</view>
</template>
@ -55,12 +61,16 @@
return {
productDetail : {
image : 'https://cdn.uviewui.com/uview/swiper/swiper3.png,https://cdn.uviewui.com/uview/swiper/swiper2.png',
content : '',
}
details : '',
},
id : 0,
}
},
onLoad(args) {
console.log(args);
this.id = args.id
},
onShow() {
this.getRiceProductDetail()
},
methods: {
//
@ -70,7 +80,17 @@
//
submit(){
}
},
//
getRiceProductDetail(){
this.$api('getRiceProductDetail', {
id : this.id
}, res => {
if(res.code == 200){
this.productDetail = res.result
}
})
},
}
}
</script>
@ -100,10 +120,12 @@
color: #999;
text-align: right;
text-decoration: line-through;
margin-top: 14rpx;
}
.desc{
font-size: 26rpx;
color: #777;
margin-top: 20rpx;
}
}
.info-unit{


BIN
pages_order/static/address/icon1.png View File

Before After
Width: 101  |  Height: 111  |  Size: 7.1 KiB

+ 16
- 0
store/store.js View File

@ -74,6 +74,22 @@ const store = new Vuex.Store({
}
})
},
// 退出登录
logout(state){
uni.showModal({
title: '确认退出登录吗',
success(r) {
if(r.confirm){
state.userInfo = {}
state.role = false
uni.removeStorageSync('token')
uni.reLaunch({
url: '/pages/index/index'
})
}
}
})
},
},
actions: {},
})


+ 20
- 0
uni.scss View File

@ -74,3 +74,23 @@ $uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px;
.uni-color-btn{
border-radius: 40rpx;
padding: 20rpx;
margin: 40rpx;
background: $uni-color;
color: #fff;
text-align: center;
font-size: 28rpx;
}
.uni-uncolor-btn{
border-radius: 40rpx;
padding: 20rpx;
margin: 40rpx;
border: 1px solid $uni-color;
color: $uni-color;
text-align: center;
font-size: 28rpx;
}

Loading…
Cancel
Save