123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <template>
- <view class="content">
- <view class="flex gs-item">
- <view class="item-name">
- 参考价格
- </view>
- <input type="text" class="item-val val-red" disabled v-model="pUser.points_transaction"/>
- </view>
- <!-- //挂售价格(元) -->
- <view class="flex gs-item">
- <view class="item-name">
- 挂售价格(元)
- </view>
- <input type="text" class="item-val" placeholder="请输入您的挂售价(单价)" v-model="total_price"/>
- </view>
- <view class="flex gs-item">
- <view class="item-name">
- 挂售数量
- </view>
- <input type="text" class="item-val" placeholder="请输入挂售数量" v-model="amount"/>
- </view>
- <view class="flex gs-item">
- <view class="item-name">
- 联系方式
- </view>
- <input type="text" class="item-val" placeholder="请输入联系方式" v-model="phone"/>
- </view>
- <view class="fwf">
- 服务费:<text>{{(total_price * amount * pUser.fee_ratio / 100).toFixed(2) || 0}} 阅读积分</text>
- </view>
- <view class="btn" @click="createGs">
- 确认
- </view>
- </view>
- </template>
- <script>
- import { createGs,passUser } from '@/api/zero.js'
- export default {
- data() {
- return {
- total_price: '',
- amount: '',
- phone: '',
- pUser: {}
- }
- },
- onLoad() {
-
- },
- onShow() {
- this.passUser()
- },
- onReachBottom() {
-
- },
- onReady() {
-
- },
- methods: {
- passUser() {
- passUser().then(res => {
- this.pUser = res.data
- })
- },
- createGs() {
- let that = this
- createGs({
- total_price: that.total_price * that.amount,
- amount: that.amount,
- phone: that.phone,
- type: 0
- }).then(res => {
- uni.showToast({
- title:'挂售成功',
- duration:2000
- });
- setTimeout(()=> {
- uni.navigateBack()
- },1500)
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .gs-item {
- height: 135rpx;
- background-color: #fff;
- padding: 0 65rpx;
-
- .item-val {
- width: 405rpx;
- height: 87rpx;
- background: #F4F4F4;
- border-radius: 10rpx;
- text-align: center;
- font-size: 36rpx;
- font-weight: bold;
-
- }
- .val-red {
- color: #FD3B39;
- }
- }
- .fwf {
- font-size: 30rpx;
- font-weight: bold;
- color: #333333;
- text-align: right;
- padding-right: 65rpx;
- background-color: #fff;
- padding-bottom: 62rpx;
- text {
- color: #FD3B39;
- }
- }
- .btn {
- width: 616rpx;
- height: 88rpx;
- background: #ff4c4c;
- border-radius: 10rpx;
- font-size: 36rpx;
- font-weight: bold;
- color: #FFFFFF;
- line-height: 88rpx;
- text-align: center;
- margin: 60rpx auto ;
- }
- </style>
|