确认订单

version/0412
syt 9 months ago
parent 14a7395928
commit f3f212b229
  1. 5
      api/newFun.js
  2. 10
      pages/cart/index.vue
  3. 110
      pages/goods/detail.vue
  4. 84
      pages/invite/index.vue
  5. 4
      pages/news/coupon/list.vue
  6. 2
      pages/news/user/withdrawal.vue
  7. 3
      pages/news1/wallet.vue
  8. 8
      pages/news3/shopOrder.vue
  9. 1
      pages/shop/extract.vue
  10. 350
      pages/sureOrder/index.vue

@ -1,5 +1,10 @@
import request from '@/utils/request'
// 邀请有礼 邀请好友海报
export const InviteUserPoster = (param) => {
return request.post('user/InviteUserPoster', param)
}
// 邀请有礼 记录
export const inviteGetList = (param) => {
return request.post('invite/getList', param)

@ -322,9 +322,13 @@
const app = this
if (app.checkedIds.length) {
const cartIds = app.checkedIds.join()
app.$navTo('pages/checkout/index', {
mode: 'cart',
cartIds
// app.$navTo('pages/checkout/index', {
// mode: 'cart',
// cartIds
// })
app.$navTo('pages/sureOrder/index', {
mode: 'cart',
cartIds
})
}
},

@ -219,7 +219,7 @@
<view class="buyNow" v-if="!isPre" @click="choseSku(3)">
立即购买
</view>
<view class="buyNow" @click="onReservation" v-if="isPre">
<view class="buyNow" @click="onReservation()" v-if="isPre">
立即预约
</view>
</template>
@ -281,10 +281,11 @@
确定
</view>
</view>
</view>
</view>
<!-- -->
<view class="shareWechat" v-if="shareType=='share'">
<view class="shareGoods">
<image src="/static/detail/tv.png" mode="" class="shareImg"></image>
<image :src="goods.goods_image" mode="" class="shareImg"></image>
</view>
<view class="shareInfo">
<view class="shareGoodsInfo">
@ -295,7 +296,7 @@
</view>
</view>
<view class="shareOpera">
<view class="operaItem" @click="copyText(goods.goods_name)">
<view class="operaItem" @click="toHaibao(2)">
<view class="imgIcon">
<u-icon name="order" class="iconIm"></u-icon>
</view>
@ -303,15 +304,15 @@
复制文案
</view>
</view>
<view class="operaItem" @click="goShare">
<view class="operaItem">
<view class="imgIcon weChatIcon">
<u-icon name="order" class="iconIm"></u-icon>
</view>
<view class="shareText">
<button open-type="share" @click="shareWechat">微信好友</button>
<view class="shareText">微信好友
<button open-type="share" @click="shareWechat"></button>
</view>
</view>
<view class="operaItem">
<view class="operaItem" @click="toHaibao(1)">
<view class="imgIcon hb">
<u-icon name="order" class="iconIm"></u-icon>
</view>
@ -320,7 +321,7 @@
</view>
</view>
</view>
<view class="shareCancel" @click="shareCancel">
<view class="shareCancel" @click="shareCancel()">
取消
</view>
</view>
@ -329,13 +330,13 @@
<image :src="$picUrl+'/static/toTop.png'"></image>
</view>
<SkuPopup v-model="showSkuPopup" :skuMode="skuMode" :goods="goods" @updateSku="updateSku" @addCart="onAddCart" />
<!-- 分享菜单 -->
<share-sheet v-model="showShareSheet" :shareTitle="goods.goods_name" :shareImageUrl="goods.goods_image" :posterApiCall="posterApiCall"
:posterApiParam="{ goodsId }" />
<!-- 海报图弹层 -->
<goods-poster-popup v-model="showGoodsPosterPopup" :apiCall="posterApiCall" :apiParam="{goodsId}" />
</view>
</template>
<script>
import ShareSheet from '@/components/share-sheet'
import GoodsPosterPopup from '@/components/goods-poster-popup'
import * as GoodsApi from '@/api/goods'
import * as goodsCar from '@/api/cart.js'
import SkuPopup from './components/SkuPopup'
@ -343,11 +344,11 @@
export default {
components: {
SkuPopup,
ShareSheet
GoodsPosterPopup
},
data() {
return {
showShareSheet: false,
showGoodsPosterPopup: false,
cityInfo: {},
currenIndex: 0,
isTop: false,
@ -373,7 +374,10 @@
addressList: [],
addressInfo: {},
serveList:[],
isLogin: false,
isLogin: false,
// api
posterApiCall: GoodsApi.poster,
}
},
onLoad(options) {
@ -684,7 +688,46 @@
})
},
shareCancel() {
//
this.shareType = "";
this.openDialog = false;
},
toHaibao(index){
this.shareCancel();
if(index == 2){
uni.setClipboardData({
data: this.goods.goods_name,
success() {
uni.getClipboardData({
success() {
uni.showToast({
icon: "none",
title: "复制成功"
})
}
})
}
})
}else {
this.openDialog = false
this.showGoodsPosterPopup = true;
}
//
// //
// getGoodsDetail() {
// const app = this
// return new Promise((resolve, reject) => {
// GoodsApi.poster({
// goodsId: app.goodsId,
// channel: ""
// })
// .then(result => {
// app.imageUrl = result.data.imageUrl
// resolve(result)
// })
// .catch(reject)
// })
// },
// },
},
},
/**
@ -698,6 +741,7 @@
})
return {
title: app.goods.goods_name,
imageUrl: app.goods.goods_image,
path: `/pages/goods/detail?${params}`
}
},
@ -711,6 +755,7 @@
const app = this
return {
title: app.goods.goods_name,
imageUrl: app.goods.goods_image,
path: `/pages/goods/detail?goodsId=${app.goodsId}`
}
}
@ -1357,7 +1402,7 @@
justify-content: center;
align-items: center;
text-align: center;
z-index: 22;
.preSuc {
width: 560rpx;
height: 400rpx;
@ -1373,7 +1418,6 @@
height: 100rpx;
position: relative;
top: -50rpx;
.ldImg {
width: 100%;
height: 100%;
@ -1577,23 +1621,26 @@
display: flex;
align-items: center;
margin-top: 12rpx;
padding: 0 30rpx;
justify-content: space-between;
.shareGoodsInfo {
width: 410rpx;
width: 400rpx;
height: 120rpx;
font-size: 28rpx;
font-weight: 400;
color: #000000;
line-height: 33rpx;
line-height: 40rpx;
text-align: left;
overflow: hidden;
}
.sharePrice {
height: 64rpx;
font-size: 46rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FF645A;
line-height: 54rpx;
line-height: 54rpx;
text-align: right;
}
}
@ -1604,7 +1651,8 @@
margin-top: 36rpx;
margin-bottom: 46rpx;
.operaItem {
.operaItem {
position: relative;
.imgIcon {
width: 88rpx;
height: 88rpx;
@ -1632,10 +1680,18 @@
width: 96rpx;
height: 34rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #000000;
line-height: 28rpx;
line-height: 60rpx;
button{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
opacity: 0;
}
}
}
}

@ -62,12 +62,11 @@
</view>
<!-- -->
<view class="invite-popup" v-if="isPopup">
<view class="popup" @longpress="download()">
<image class="bg" :src="$picUrl+'/static/bg-6.png'"></image>
<image class="qrcode" :src="qrcode"></image>
<view class="tips">长按保存图片</view>
<view class="popup" @click="download()">
<image class="bg" :src="qrcode"></image>
<view class="tips">保存海报图</view>
<view class="close">
<u-icon color="#fff" size="60" name="close-circle"></u-icon>
</view>
</view>
</view>
@ -99,16 +98,73 @@
onShow() {
if(uni.getStorageSync("AccessToken")){
this.userInfo = uni.getStorageSync("userInfo");
this.qrcode = createQrCodeImg(this.userInfo.user_id, { 'size': 500 });
// this.qrcode = createQrCodeImg(this.userInfo.user_id, { 'size': 500 });
}else{
this.userInfo = {}
this.qrcode = ""
// this.qrcode = ""
}
},
methods: {
download() {
methods: {
//
async InviteUserPoster() {
const {status, data} = await newFunApi.InviteUserPoster({});
if(status == 200){
console.log(data)
this.qrcode = data.imageUrl
}
},
download() {
const app = this
app.isPopup = false;
uni.showLoading({ title: '加载中' })
//
uni.downloadFile({
url: app.qrcode,
success(res) {
console.log(res)
uni.hideLoading()
//
app.onSaveImage(res.tempFilePath)
},
fail(res) {
console.log('fail', res)
uni.hideLoading()
app.$toast('很抱歉,自动保存失败 请点击图片后长按手动保存', 3000)
}
})
},
//
onSaveImage(tempFilePath) {
const app = this
// #ifndef H5
uni.saveImageToPhotosAlbum({
filePath: tempFilePath,
success(data) {
app.$success('保存成功')
},
fail(err) {
if (err.errMsg === 'saveImageToPhotosAlbum:fail auth deny') {
app.$toast('请允许访问相册后重试 (右上角菜单 - 设置 - 相册)', 3000)
}
}
})
// #endif
// #ifdef H5
const names = tempFilePath.split('/')
const fileName = names[names.length - 1]
app.fileDownLoadForH5({ name: fileName, blob: tempFilePath })
// #endif
},
// H5
// #ifdef H5
fileDownLoadForH5({ name, blob }) {
const linkElement = document.createElement('a')
linkElement.setAttribute('href', blob)
linkElement.setAttribute('downLoad', name)
linkElement.click()
},
// #endif
async getList() {
uni.showLoading({
title:"加载中"
@ -133,10 +189,11 @@
})
}else if(index == 2){
uni.navigateTo({
url: "/pages/news/user/withdrawal"
url: "/pages/news/user/withdrawal?balance="+ this.userInfo.pay_money
})
}else if(index == 3){
this.isPopup = true;
this.isPopup = true;
this.InviteUserPoster();
}
},
}
@ -166,7 +223,8 @@
z-index: 2;
.bg{
width: 672rpx;
height: 100%;
height: 100%;
border-radius: 26rpx;
}
.qrcode{
width: 200rpx;

@ -90,8 +90,8 @@
// 使
if(item.coupon_case==10){
//
uni.navigateTo({
url:''
uni.switchTab({
url: "/pages/index/index"
})
}
},

@ -422,7 +422,7 @@
&-on {
background: #FDF4F4;
background: url(/static/invoice/select-active.png) center top no-repeat;
background: url(https://www.royaum.com.cn/static/invoice/select-active.png) center top no-repeat;
background-size: contain;
}
}

@ -130,13 +130,12 @@
</template>
<script>
import img from "@/static/wallet/wallet.png"
import * as wallet from '@/api/wallet'
export default {
data() {
return {
background: {
background: 'url(' + img + ') center top no-repeat',
background: 'url(https://www.royaum.com.cn/static/wallet/wallet.png) center top no-repeat',
backgroundSize: '100% auto',
},
isEye: true,

@ -83,13 +83,9 @@
下单时间
</view>
<view class="timeContainer">
<view class="selectTime" v-model="startTime" type="select" @click="onTime()">
{{startTime?startTime:'起始时间'}}
</view>
<view class="selectTime" @click="onTime()">{{startTime?startTime:'起始时间'}}</view>
<text>-</text>
<view class="selectTime" v-model="endTime" type="select" @click="onTime()">
{{endTime?endTime:'终止时间'}}
</view>
<view class="selectTime" @click="onTime()">{{endTime?endTime:'终止时间'}}</view>
</view>
</view>
<view class="filterItemContent">

@ -133,6 +133,7 @@
app.selectedId = selectedId
// :
uni.$emit('syncSelectedId', selectedId)
uni.$emit('syncSelectedDistance_unit', distance_unit)
//
uni.navigateBack({
delta: 1

@ -88,12 +88,12 @@
</view>
</view>
<view class="switch">
<switch />
<u-switch v-model="is_street_take"></u-switch>
</view>
</view>
<view class="time" v-if="buyType=='zq'">
<view class="timer" v-if="buyType=='zq'">
<view class="youTime">
预计到时间
预计到时间
</view>
<view class="leftImg" @click="openPicker(1)">
<text v-if="timer" class="leftText">{{timer}}</text>
@ -101,7 +101,7 @@
<image :src="$picUrl+'/static/order/left.png'" mode=""></image>
</view>
</view>
<view class="time" v-if="buyType=='sm'">
<view class="timer" v-if="buyType=='sm'">
<view class="youTime">
您期待的收货时间
</view>
@ -112,9 +112,9 @@
</view>
</view>
<view class="goodsDetail">
<view class="goodsType">
<view class="goodsType" @click="toStore()">
<image :src="$picUrl+'/static/order/bag.png'" mode="" class="bag"></image>
<text>大白兔家电</text>
<text>{{cityInfo.shop_name}}</text>
<image :src="$picUrl+'/static/order/left.png'" mode="" class="leftIcon"></image>
</view>
<view class="goods" v-for="(item, index) in order.goodsList" :key="index">
@ -124,6 +124,13 @@
<view class="goodsInfo">
<view class="goodsName">
{{ item.goods_name }}
</view>
<!-- 商品规格 -->
<view class="goods-props">
<view class="goods-props-item" v-for="(props, idx) in item.skuInfo.goods_props" :key="idx">
<text class="group-name">{{ props.group.name }}: </text>
<text>{{ props.value.name }}</text>
</view>
</view>
<view class="goodsPrice">
<text>{{item.goods_price_min}}</text>
@ -134,7 +141,7 @@
</view>
</view>
</view>
<view class="time">
<view class="timer">
<view class="youTime" style="width: 60rpx;">
留言
</view>
@ -154,7 +161,7 @@
运费
</view>
<view class="price" v-if="order.isIntraRegion">
+{{ order.expressPrice }}
{{ order.expressPrice }}
</view>
<view class="price" v-else>
不在配送范围
@ -165,7 +172,7 @@
商品数量
</view>
<view class="price">
<text class="couponNum">1</text>
<text class="couponNum">{{order.orderTotalNum}}</text>
</view>
</view>
<view class="orderTitle">
@ -177,7 +184,7 @@
<text class="couponNum" v-else>{{order.couponList.length}}张可用</text>
<image :src="$picUrl+'/static/order/left.png'"></image>
</view>
<view class="price" v-else>
<view class="price" v-else @click="handleNotUseCoupon">
<text class="couponNum">无优惠券可用</text>
<image :src="$picUrl+'/static/order/left.png'"></image>
</view>
@ -190,12 +197,12 @@
</view>
<view class="right">
<text class="totalNum">1合计</text>
<text class="totalNum">{{order.orderTotalNum}}合计</text>
<text class="allPrice">{{ order.orderPayPrice }}</text>
</view>
</view>
</view>
<view class="payType">
<!-- <view class="payType">
<view class="itemType">
<view class="payName">
<image src="/static/order/wChat.png" mode="" class="payIcon"></image>
@ -217,7 +224,7 @@
</view>
<view class="line">
</view>
</view> -->
<!-- <view class="itemType">
<view class="payName">
<image src="/static/order/shop.png" mode="" class="payIcon"></image>
@ -225,14 +232,14 @@
</view>
</view> -->
</view>
<!-- </view> -->
<view class="footer">
<view class="meetPrice">
应付款
<text class="type"></text>
<text class="price">{{order.orderPayPrice}}</text>
</view>
<view class="btn">
<view class="btn" @click="onSubmitOrder()">
提交订单
</view>
</view>
@ -276,7 +283,8 @@
</view>
</view>
</view>
</u-popup>
</u-popup>
<u-toast ref="uToast" />
<u-picker mode="time" v-model="show1" :params="params" @confirm="confirm"></u-picker>
</view>
</template>
@ -343,6 +351,10 @@
export default {
data() {
return {
is_street_take: false,
expect_receive_time: "",
to_store_time: "",
cityInfo: {},
params: {
year: true,
month: true,
@ -418,11 +430,16 @@
*/
onLoad(options) {
this.options = options;
this.cityInfo = uni.getStorageSync("cityInfo")
console.log(options)
// :
uni.$on('syncSelectedId', selectedId => {
this.selectedShopId = selectedId
})
// :
uni.$on('syncSelectedDistance_unit', distance_unit => {
this.distance_unit = distance_unit
})
},
/**
@ -442,6 +459,20 @@
},
methods: {
toStore() {
uni.navigateTo({
url: "/pages/news/consult/about"
})
},
openMap(info) {
uni.openLocation({
latitude: Number(info.latitude),
longitude: Number(info.longitude),
complete: function (res) {
console.log('success',res);
}
});
},
openPicker() {
this.show1 = true;
},
@ -503,7 +534,9 @@
//
handleSwichDelivery(key,val) {
this.curDelivery = key
this.getOrderData()
this.getOrderData();
this.timer = ""
this.is_street_take = false
this.buyType = val;
},
@ -607,6 +640,9 @@
phone: app.phone,
isUsePoints: app.isUsePoints ? 1 : 0,
remark: app.remark || '',
expect_receive_time: app.buyType == 'sm'?app.timer : '',
is_street_take: app.buyType == 'zq'?(app.is_street_take?1:0) : '',
to_store_time: app.buyType == 'zq'?app.timer : '',
}
//
const modeParam = getModeParam(options.mode, options)
@ -657,9 +693,181 @@
.sureOrder {
width: 750rpx;
min-height: 750rpx;
padding-bottom: 120rpx;
padding-bottom: 140rpx;
background: url('https://www.royaum.com.cn/static/news/login-bg.png') center top no-repeat;
background-size: 100% auto;
background-size: 100% auto;
/* 优惠券选择 */
.popup__coupon {
background: #fff;
box-sizing: border-box;
padding: 30rpx;
// ios线
padding-bottom: calc(constant(safe-area-inset-bottom) + 30rpx);
padding-bottom: calc(env(safe-area-inset-bottom) + 30rpx);
.coupon__do_not {
.control {
width: 90%;
height: 72rpx;
color: #888;
border: 1rpx solid #e3e3e3;
border-radius: 10rpx;
}
}
.coupon__title {
text-align: center;
margin-bottom: 30rpx;
}
.coupon-list {
/* #ifdef H5 */
max-width: 1120rpx;
margin: 0 auto;
/* #endif */
margin-bottom: 24rpx;
}
.coupon-item {
position: relative;
overflow: hidden;
margin-bottom: 22rpx;
}
.item-wrapper {
width: 100%;
display: flex;
background: #fff;
border-radius: 8rpx;
color: #fff;
height: 180rpx;
.coupon-type {
position: absolute;
top: 0;
right: 0;
z-index: 10;
width: 128rpx;
padding: 6rpx 0;
background: #a771ff;
font-size: 20rpx;
text-align: center;
color: #ffffff;
transform: rotate(45deg);
transform-origin: 64rpx 64rpx;
}
&.color-blue {
background: linear-gradient(-125deg, #57bdbf, #2f9de2);
}
&.color-red {
background: linear-gradient(-128deg, #ff6d6d, #ff3636);
}
&.color-violet {
background: linear-gradient(-113deg, #ef86ff, #b66ff5);
.coupon-type {
background: #55b5ff;
}
}
&.color-yellow {
background: linear-gradient(-141deg, #f7d059, #fdb054);
}
&.color-gray {
background: linear-gradient(-113deg, #bdbdbd, #a2a1a2);
.coupon-type {
background: #9e9e9e;
}
}
.content {
flex: 1;
padding: 30rpx 20rpx;
border-radius: 16rpx 0 0 16rpx;
.title {
font-size: 32rpx;
}
.bottom {
.time {
font-size: 24rpx;
}
.receive {
height: 46rpx;
width: 122rpx;
border: 1rpx solid #fff;
border-radius: 30rpx;
color: #fff;
font-size: 24rpx;
display: flex;
justify-content: center;
align-items: center;
&.state {
border: none;
}
}
}
}
.tip {
position: relative;
flex: 0 0 32%;
text-align: center;
border-radius: 0 16rpx 16rpx 0;
.money {
font-weight: bold;
font-size: 52rpx;
}
.pay-line {
font-size: 22rpx;
}
}
.split-line {
position: relative;
flex: 0 0 0;
border-left: 4rpx solid #fff;
margin: 0 10rpx 0 6rpx;
background: #fff;
&:before,
{
border-radius: 0 0 16rpx 16rpx;
top: 0;
}
&:after {
border-radius: 16rpx 16rpx 0 0;
bottom: 0;
}
&:before,
&:after {
content: '';
position: absolute;
width: 24rpx;
height: 12rpx;
background: #f7f7f7;
left: -14rpx;
z-index: 1;
}
}
}
}
}
.buyType {
@ -710,7 +918,41 @@
box-sizing: border-box;
}
.timer {
display: flex;
width: 700rpx;
height: 90rpx;
background: #FFFFFF;
border-radius: 10rpx;
opacity: 1;
margin: 12rpx 0 0 26rpx;
align-items: center;
justify-content: space-between;
padding: 0 32rpx 0 28rpx;
.youTime {
font-size: 25rpx;
font-weight: 400;
color: #000000;
}
input{
flex: 1;
padding: 0 20rpx;
font-size: 25rpx;
font-weight: 400;
color: #000000;
text-align: right;
}
.leftImg {
font-size: 24rpx;
font-weight: 400;
color: #9E9E9E;
image {
width: 12rpx;
height: 18rpx;
margin-left: 16rpx;
}
}
}
.leftText {
font-size: 24rpx;
font-weight: 400;
@ -910,38 +1152,10 @@
}
}
.time {
display: flex;
width: 694rpx;
height: 90rpx;
background: #FFFFFF;
border-radius: 10rpx;
opacity: 1;
margin: 12rpx 0 0 26rpx;
align-items: center;
justify-content: space-between;
padding: 0 32rpx 0 28rpx;
.youTime {
font-size: 24rpx;
font-weight: 400;
color: #000000;
}
.leftImg {
font-size: 24rpx;
font-weight: 400;
color: #9E9E9E;
image {
width: 12rpx;
height: 18rpx;
margin-left: 16rpx;
}
}
}
.goodsDetail {
width: 694rpx;
width: 700rpx;
min-height: 266rpx;
background: #FFFFFF;
border-radius: 10rpx 10rpx 10rpx 10rpx;
@ -953,7 +1167,6 @@
display: flex;
align-items: center;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #333333;
@ -964,7 +1177,7 @@
}
.leftIcon {
width: 18rpx;
width: 12rpx;
height: 18rpx;
margin-left: 20rpx;
}
@ -974,13 +1187,10 @@
display: flex;
align-items: center;
margin-top: 28rpx;
justify-content: space-between;
.goodsImg {
width: 162rpx;
height: 148rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
opacity: 1;
image {
width: 100%;
height: 100%;
@ -989,7 +1199,7 @@
.goodsInfo {
margin-left: 20rpx;
max-width: 400rpx;
.goodsName {
min-height: 40rpx;
font-size: 28rpx;
@ -1003,23 +1213,26 @@
.goodsPrice {
height: 50rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 600;
color: #F21A1C;
line-height: 50rpx;
text {
font-size: 36rpx;
}
}
}
.goods-props{
font-size: 24rpx;
color: #999;
display: flex;
align-items: center;
}
.goodsNum {
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #1E1E1E;
margin-left: 150rpx;
color: #1E1E1E;
flex: 1;
text-align: right;
}
}
}
@ -1052,11 +1265,8 @@
font-size: 28rpx;
color: #F42B17;
}
font-size: 28rpx;
image {
width: 18rpx;
width: 12rpx;
height: 18rpx;
margin-left: 18rpx;
}
@ -1158,7 +1368,7 @@
display: flex;
justify-content: space-between;
align-items: center;
z-index: 22;
.meetPrice {
margin-left: 26rpx;
font-size: 24rpx;
@ -1195,6 +1405,8 @@
color: #FFFFFF;
line-height: 74rpx;
margin-right: 20rpx;
}
}
}
</style>
Loading…
Cancel
Save