Browse Source

对接首页部分内容;优化支付成功页面;对接我的订单查看物流、确认收货;对接忘记密码功能;红包列表的领取、消息中心列表

master
ltlzx 3 years ago
parent
commit
3f6c75472d
  1. 105
      components/pay.vue
  2. 22
      pages/account/message.vue
  3. 18
      pages/account/myCoupons.vue
  4. 114
      pages/account/myOrders.vue
  5. 2
      pages/account/pointsDetails.vue
  6. 39
      pages/index/flashSale.vue
  7. 316
      pages/index/index.vue
  8. 33
      pages/index/pickUpCentre.vue
  9. 8
      pages/login/changePwd.vue
  10. 18
      pages/login/index.vue
  11. 14
      pages/order/confirmation.vue
  12. 149
      pages/order/details.vue
  13. 25
      pages/order/paySuccess.vue
  14. 34
      pages/productDetails/index.vue
  15. 7
      pages/shippingCart/index.vue
  16. BIN
      static/img/fail.png

105
components/pay.vue

@ -1,105 +0,0 @@
<template>
<view >
<view class="mask" v-show="isPay" @click="isShow=false"></view>
<view class="order_popup" v-show="isPay">
<view class="order_popup_title">
<text>
Payment Method
</text>
<image src="../static/img/close1.png" mode="" @click="isPay=false"></image>
</view>
<view class="order_popup_pay" >
<view class="pay_item" @click="selectPay(0)">
<image src="../static/img/select1.png" mode="" class="pay_item_select" v-if="pay_index==0"></image>
<image src="../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right">
<image src="../static/img/pay_pal.png" mode=""></image>
<text>Pay Pal</text>
</view>
</view>
<view class="pay_item" @click="selectPay(1)">
<image src="../static/img/select1.png" mode="" class="pay_item_select" v-if="pay_index==1"></image>
<image src="../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right">
<image src="../static/img/card.png" mode=""></image>
<text>Credit/Debit Card</text>
</view>
</view>
<view class="pay_item" @click="selectPay(2)">
<image src="../static/img/select1.png" mode="" class="pay_item_select" v-if="pay_index==2"></image>
<image src="../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right">
<image src="../static/img/GPay.png" mode=""></image>
<text>Google Pay</text>
</view>
</view>
<view class="pay_item" @click="selectPay(3)">
<image src="../static/img/select1.png" mode="" class="pay_item_select" v-if="pay_index==3"></image>
<image src="../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right">
<image src="../static/img/APay.png" mode=""></image>
<text>Apple pay</text>
</view>
</view>
<!-- <navigator url="/pages/order/paySuccess"> -->
<button @click="getPayDate">PAY NOW</button>
<!-- </navigator> -->
</view>
</view>
</view>
</template>
<script>
import {defaultRequest2} from '../api/index.js'
export default {
props:{
payShow:false,
orderId:''
},
data() {
return {
pay_index:0
}
},
methods:{
//
selectPay(index){
this.pay_index=index
},
//
getPayDate(id){
let data={_action:'payorder',order_id:id,order_type:'GOODSBUY',payment_method:'alipay.native'}
defaultRequest2(data).then(res=>{
console.info(res)
if(res.error==0){
//
if(res.data.need_pay_amount==0) return
uni.requestPayment({
provider: 'alipay',
orderInfo: res.data.prepay_data.order_info, //
success: function (res) {
console.log('success:' + JSON.stringify(res));
uni.redirectTo({
url: 'paySuccess?order_id='+id
});
},
fail: function (err) {
console.log('fail:' + JSON.stringify(err));
uni.showToast({
title:'Payment failed',
icon:'none'
})
uni.navigateBack()
}
});
}
})
},
}
}
</script>
<style>
</style>

22
pages/account/message.vue

@ -1,18 +1,16 @@
<template>
<view>
<view class="status_bar"></view>
<uni-nav-bar left-icon="left" title="Message" color="#000000" rightIcon="info" @clickLeft="back" @clickRight="isDelete=!isDelete" :border="false"/>
<uni-nav-bar left-icon="left" :statusBar="true" title="Message"
color="#000000" rightIcon="info" @clickLeft="back" @clickRight="isDelete=!isDelete" :border="false"/>
<view class="body">
<view class="msg_item">
<view class="msg_time">21/04/2022 14:42:31</view>
<view class="msg_title">Message heading</view>
<view class="msg_content">
estimated to be deliverd on estimated to be deliverd on estim
ated to be deliverd on estimated to be deliverd on
</view>
<view class="msg_img"></view>
<view class="msg_item" v-for="(item,index) in list" :key="index">
<view class="msg_time">{{item.start_time}}~{{item.end_time}}</view>
<view class="msg_title">{{item.act_name}}</view>
<view class="msg_content">{{item.act_range}}</view>
<!-- <view class="msg_img"></view> -->
</view>
<view class="msg_item">
<!-- <view class="msg_item">
<view class="msg_time">21/04/2022 14:42:31</view>
<view class="msg_title">Message heading</view>
<view class="msg_content">
@ -28,7 +26,7 @@
ated to be deliverd on estimated to be deliverd on
</view>
<view class="msg_img"></view>
</view>
</view> -->
</view>
</view>
</template>

18
pages/account/myCoupons.vue

@ -1,8 +1,6 @@
<template>
<view>
<view class="status_bar"></view>
<uni-nav-bar left-icon="left" title="My Coupons" color="#000000" rightIcon="info" @clickLeft="back" @clickRight="goPage" :border="false"/>
<uni-nav-bar left-icon="left" :statusBar="true" title="My Coupons" color="#000000" rightIcon="info" @clickLeft="back" @clickRight="goPage" :border="false"/>
<view class="body">
<view class="coupons_item" v-for="(item,index) in 3 " :key="index">
<view class="coupons_item_left">
@ -24,6 +22,7 @@
</template>
<script>
import {defaultRequest2} from '../../api/index.js'
export default {
data() {
return {
@ -31,15 +30,26 @@
}
},
methods:{
getList(){
let data={_action:'getbonusinfo',bonus_id:0}
defaultRequest2(data).then(res=>{
console.info(res)
if(res.error==0){
this.list=res.data
}
})
},
back(){
uni.navigateBack()
},
goPage(){
console.info(111)
uni.navigateTo({
url:"/pages/index/pickUpCentre"
})
}
},
onShow() {
this.getList()
}
}
</script>

114
pages/account/myOrders.vue

@ -29,7 +29,7 @@
<image src="../../static/img/right.png" mode=""></image>
</view>
</view>
<view class="good_price">total:US${{item.order_amount}}</view>
<view class="good_price">total:US${{item.total_fee_o}}</view>
<view class="good_points">
<image src="/static/img/gantan1.png" mode=""></image>
<text>Reward 10 points</text>
@ -62,7 +62,7 @@
<image src="../../static/img/right.png" mode=""></image>
</view>
</view>
<view class="good_price">total:US${{item.order_amount}}</view>
<view class="good_price">total:US${{item.total_fee_o}}</view>
<view class="order_button">
<button class="cancel" @click.stop="openTips(item.order_id,1)">DELETE ORDER</button>
</view>
@ -90,7 +90,7 @@
<image src="../../static/img/right.png" mode=""></image>
</view>
</view>
<view class="good_price">total:US${{item.order_amount}}</view>
<view class="good_price">total:US${{item.total_fee_o}}</view>
</view>
</view>
@ -121,74 +121,73 @@
</view>
</view>
</view>
<view class="good_price">total:US${{item.order_amount}}</view>
<view class="good_price">total:US${{item.total_fee_o}}</view>
<view class="order_button">
<navigator :url="'/pages/order/logisticsDetails?id='+item.order_id" style="margin-right:20rpx ;">
<button class="cancel">LOGISTICS</button>
</navigator>
<button class="pay">CONFIRM RECEIPT</button>
<button class="cancel" @click.stop="goLogistics(item.order_id)">LOGISTICS</button>
<button class="pay" @click.stop="openTips(item.order_id,2)">CONFIRM RECEIPT</button>
</view>
</view>
</view>
</view>
<navigator url="/pages/order/details?details_index=2">
<view class="order">
<view class="order_title">
<text>Completed</text>
<view class="order_title_right">
<text>order#20245512141212</text>
<image src="../../static/img/right.png" mode=""></image>
</view>
<!-- 已完成订单 -->
<view class="order " v-if="item.pay_status_code==2 && item.shipping_status_code==2" @click="goDetails(2,item.order_id)">
<view class="order_title">
<text>Completed</text>
<view class="order_title_right">
<text>order#{{item.order_sn}}</text>
<image src="../../static/img/right.png" mode=""></image>
</view>
<view class="order_content">
<view class="good_info">
<view class="good_info_left">
<view class="good_info_image" v-for="(item,index) in 4" :key="index"></view>
</view>
<view class="good_info_right">
<text>4 ltems</text>
<image src="../../static/img/right.png" mode=""></image>
</view>
<view class="order_content">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1">
<view class="good_info_left">
<view class="good_info_image" >
<image :src="item1.goods_img" mode=""></image>
</view>
</view>
<view class="good_price">total:US$12.5</view>
<view class="order_button">
<button class="cancel">DELETE ORDER</button>
<button class="pay">COMMENT</button>
<view class="good_info_right">
<text>{{item.order_goods.length}} ltems</text>
<image src="../../static/img/right.png" mode=""></image>
</view>
</view>
<view class="good_price">total:US${{item.total_fee_o}}</view>
<view class="order_button">
<button class="cancel" @click.stop="openTips(item.order_id,1)">DELETE ORDER</button>
<button class="pay">COMMENT</button>
</view>
</view>
</navigator>
<view class="order">
</view>
<!-- 退换货订单 -->
<view class="order" v-if="item.order_status_code==4" @click="goDetails(2,item.order_id)">
<view class="order_title">
<text>Return and exchange</text>
<view class="order_title_right">
<text>order#20245512141212</text>
<text>order#{{item.order_sn}}</text>
<image src="../../static/img/right.png" mode=""></image>
</view>
</view>
<view class="order_content">
<view class="good_info">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1">
<view class="good_info_left">
<view class="good_info_image" v-for="(item,index) in 4" :key="index"></view>
<view class="good_info_image" >
<image :src="item1.goods_img" mode=""></image>
</view>
</view>
<view class="good_info_right">
<text>4 ltems</text>
<text>{{item.order_goods.length}} ltems</text>
<image src="../../static/img/right.png" mode=""></image>
</view>
</view>
<view class="good_price">total:US$12.5</view>
<view class="good_price">total:US${{item.total_fee_o}}</view>
<view class="order_button">
<button class="pay">CANCEL RETURN</button>
</view>
</view>
</view>
</view>
</template>
<template v-if="isList==true && scroll_active==2">
<navigator url="/pages/order/details?details_index=0">
@ -308,7 +307,9 @@
</view>
</template>
</view>
<view class="mask" v-show="isPay" @click="isShow=false"></view>
<!-- 支付 -->
<view class="mask" v-show="isPay" @click="isPay=false"></view>
<view class="order_popup" v-show="isPay">
<view class="order_popup_title">
<text>
@ -349,14 +350,15 @@
<text>Apple pay</text>
</view>
</view>
<!-- <navigator url="/pages/order/paySuccess"> -->
<button @click="getPayDate">PAY NOW</button>
<!-- </navigator> -->
</view>
</view>
<!-- 删除取消弹框 -->
<uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog type="error" cancelText="Close" :confirmText="tipsBut" title="Tips" :content="tipsInfo" @confirm="dialogConfirm" ></uni-popup-dialog>
</uni-popup>
</view>
</template>
@ -381,14 +383,19 @@
_action:'cancelorder',
order_id:''
},
// 0 1
// 0 1 2
tipsType:0,
tipsInfo:'',
tipsBut:''
}
},
methods:{
//
goLogistics(id){
uni.navigateTo({
url:'../order/logisticsDetails?order_id='+id
})
},
//
goDetails(index,id){
uni.navigateTo({
@ -436,9 +443,15 @@
if(type==0){
this.tipsInfo='Are you sure you want to cancel this order? This order will be regarded as invalid after cancellation'
this.tipsBut='CancelOrder'
}else{
this.cancelQuery._action='cancelorder'
}else if(type==1){
this.tipsInfo='Are you sure you want to delete this order?'
this.tipsBut='DeleteOrder'
this.cancelQuery._action='deleteorder'
}else if(type==2){
this.tipsInfo='Are you sure you have received the products?'
this.tipsBut='Confirm'
this.cancelQuery._action='affirmorder'
}
this.cancelQuery.order_id=id
this.$refs.alertDialog.open()
@ -446,11 +459,6 @@
},
//
dialogConfirm(){
if(this.tipsType==0){
this.cancelQuery._action='cancelorder'
}else{
this.cancelQuery._action='deleteorder'
}
defaultRequest2(this.cancelQuery).then(res=>{
console.info(res)
if(res.error==0){

2
pages/account/pointsDetails.vue

@ -1,6 +1,6 @@
<template>
<view>
<uni-nav-bar left-icon="left" title="Points Details" color="#000000" rightIcon="info" @clickLeft="back" :border="false" :statusBar="true" :fixed="true" />
<uni-nav-bar left-icon="left" title="Points Details" color="#000000" rightIcon="info" @clickLeft="back" :border="false" :statusBar="true" />
<view class="points">
<view class="points_item" v-for="(item,index) in 10" :key="index">
<view class="points_item_title">

39
pages/index/flashSale.vue

@ -1,6 +1,8 @@
<template>
<view>
<uni-nav-bar left-icon="left" title="Flash Sale" color="#000000" rightIcon="info" @clickLeft="back" @clickRight="isDelete=!isDelete" :border="false"/>
<uni-nav-bar left-icon="left" :statusBar="true" title="Flash Sale"
color="#000000" rightIcon="info" @clickLeft="back" @clickRight="isDelete=!isDelete" :border="false"/>
<view class="body">
<view class="countDown">
<text>Ends in</text>
@ -13,13 +15,15 @@
<view class="tips1">The quantity of special price commodities is limited and will be sold out</view>
<view class="recommend">
<view class="recommend_content">
<view class="recommend_content_item" v-for="(item,index) in 2 " :key="index">
<view class="recommend_content_item_image"></view>
<text>Adidas Yeezy Boost 350 DazzlingBlue Black</text>
<view class="recommend_content_item" v-for="(item,index) in list " :key="index">
<view class="recommend_content_item_image">
<image :src="item.goods_img" mode=""></image>
</view>
<view class="recommend_content_item_name">{{item.name}}</view>
<view class="recommend_item_operation">
<view>
<view class="recommend_content_item_pric">US$314.00</view>
<view class="recommend_content_item_pric1">US$314.00</view>
<view class="recommend_content_item_pric">US${{item.promote_price?item.promote_price:item.shop_price}}</view>
<view class="recommend_content_item_pric1">US${{item.shop_price}}</view>
</view>
<image src="../../static/img/add.png" mode=""></image>
</view>
@ -32,16 +36,29 @@
</template>
<script>
import {defaultRequest} from '../../api/index.js'
export default {
data() {
return {
list:[]
}
},
methods:{
getList(){
let data ={_action:'getseckillgoods',gid:'213'}
defaultRequest(data).then(res=>{
console.info(res)
if(res.error==0){
this.list=res.data
}
})
},
back(){
uni.navigateBack()
}
},
onLoad() {
this.getList()
}
}
</script>
@ -81,6 +98,14 @@
}
}
}
.recommend_content_item_name{
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2; /* 限制在一个块元素显示的文本的行数 */
-webkit-box-orient: vertical; /* 垂直排列 */
word-break: break-all; /* 内容自动换行 */
}
.countDown{
display: flex;
align-items: center;

316
pages/index/index.vue

@ -1,10 +1,9 @@
<template>
<view class="body">
<view class="body" >
<!-- 头部导航栏 -->
<view class="navigation page_padding">
<view class="navigation page_padding" >
<view class="status_bar"></view>
<view class="navigation_title" :class="isScrollShow?'isScrollShow':'' ">
<template v-if="!isScrollShow ">
@ -36,175 +35,172 @@
</view>
</view>
<!-- 轮播图 -->
<view class="uni-margin-wrap page_padding">
<swiper class="swiper" circular :indicator-dots="true" :autoplay="true" >
<swiper-item>
<view class="swiper-item uni-bg-red">A</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-green">B</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-blue">C</view>
</swiper-item>
</swiper>
<view v-for="(item,index) in indexDate.zones" :key="item.zone_id">
<!-- 轮播图 -->
<view class="uni-margin-wrap page_padding" v-if="item.zone_code=='BANNER2' && item.zone_status=='NORMAL'">
<swiper class="swiper" circular :indicator-dots="true" :autoplay="true" >
<swiper-item v-for="(item1,index1) in item.blocks" :key="item1.block_id">
<view class="swiper-item " v-if="item1.block_status=='NORMAL'">
<image :src="item1.block_pic" mode=""></image>
</view>
</swiper-item>
</swiper>
</view>
</view>
<!-- 宫格 -->
<uni-swiper-dot :info="2" :current="current" field="content" mode="default" class="page_padding">
<uni-swiper-dot :info="info" :current="current" field="content" mode="default" class="page_padding">
<swiper class="grid_swiper" @change="gridSwiper">
<swiper-item>
<view class="grid_content">
<view class="grid_item" v-for="(item, index) in 8" :key="index">
<view class="grid_item_img"></view>
<text>Dresses</text>
</view>
</view>
</swiper-item>
<swiper-item>
<swiper-item v-for="(item,index) in info" :key="item.zone_id">
<view class="grid_content">
<view class="grid_item" v-for="(item, index) in 8" :key="index">
<view class="grid_item_img"></view>
<text>Dresses</text>
<view class="grid_item" v-for="(item1, index1) in item.blocks" :key="item1.zone_id">
<template v-if="item1.block_status=='NORMAL'">
<view class="grid_item_img">
<image :src="item1.block_pic" mode=""></image>
</view>
<text>{{item.block_title}}</text>
</template>
</view>
</view>
</swiper-item>
</swiper>
</uni-swiper-dot>
<!-- 打折 -->
<image src="../../static/img/index_discount.png" mode="" class="discount page_padding"></image>
<!-- 标题 -->
<navigator url="/pages/index/flashSale">
<!-- 打折 -->
<image src="../../static/img/index_discount.png" mode="" class="discount page_padding"></image>
<!-- 标题 -->
<navigator url="/pages/index/flashSale">
<view class="index_title page_padding">
<text>Flash Sale</text>
<view class="title_right">
<uni-countdown :showDay="false" :hour="23" :minute="0" :second="0" color="#FFFFFF" background-color="#1B1B1B" />
<image src="../../static/img/right.png" mode=""></image>
</view>
</view>
</navigator>
<!-- SPIKE 1 -->
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false">
<view class="spike1_item" v-for="(item,index) in 8" :key="index" @click="goPage">
<view class="spike1_item_img"></view>
<view class="spike1_item_bottom">
<text>US$314.00</text>
<view class="spike1_item_text">US$12.5</view>
</view>
</view>
</scroll-view>
<!-- 标题 -->
<view class="index_title page_padding">
<text>Flash Sale</text>
<text>Hot Selle</text>
<view class="title_right">
<uni-countdown :showDay="false" :hour="23" :minute="0" :second="0" color="#FFFFFF" background-color="#1B1B1B" />
<image src="../../static/img/right.png" mode=""></image>
</view>
</view>
</navigator>
<!-- SPIKE 1 -->
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false">
<view class="spike1_item" v-for="(item,index) in 8" :key="index" @click="goPage">
<view class="spike1_item_img"></view>
<view class="spike1_item_bottom">
<text>US$314.00</text>
<view class="spike1_item_text">US$12.5</view>
<!-- HOT SELLS 1 -->
<view class="hotSells1 page_padding">
<view class="hotSells1_item" v-for="(item,index) in 2" :key="index">
<view class="hotSells1_item_img"></view>
<text>DazzlingBlue Black</text>
</view>
<view class="hotSells2_item" v-for="(item,index) in 3" :key="index">
<view class="hotSells2_item_img"></view>
<text>DazzlingBlue</text>
</view>
</view>
</scroll-view>
<!-- 标题 -->
<view class="index_title page_padding">
<text>Hot Selle</text>
<view class="title_right">
<image src="../../static/img/right.png" mode=""></image>
</view>
</view>
<!-- HOT SELLS 1 -->
<view class="hotSells1 page_padding">
<view class="hotSells1_item" v-for="(item,index) in 2" :key="index">
<view class="hotSells1_item_img"></view>
<text>DazzlingBlue Black</text>
</view>
<view class="hotSells2_item" v-for="(item,index) in 3" :key="index">
<view class="hotSells2_item_img"></view>
<text>DazzlingBlue</text>
</view>
</view>
<!-- 标题 -->
<view class="index_title page_padding">
<text>Hot Selle</text>
<view class="title_right">
<image src="../../static/img/right.png" mode=""></image>
</view>
</view>
<!-- HOT SELLS 2 -->
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false">
<view class="spike1_item" v-for="(item,index) in 8" :key="index">
<view class="spike1_item_img"></view>
<!-- 标题 -->
<view class="index_title page_padding">
<text>Hot Selle</text>
<view class="title_right">
<image src="../../static/img/right.png" mode=""></image>
</view>
</view>
</scroll-view>
<!-- 标题 -->
<view class="index_title page_padding">
<text>Hot Selle</text>
<view class="title_right">
<image src="../../static/img/right.png" mode=""></image>
<!-- HOT SELLS 2 -->
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false">
<view class="spike1_item" v-for="(item,index) in 8" :key="index">
<view class="spike1_item_img"></view>
</view>
</scroll-view>
<!-- 标题 -->
<view class="index_title page_padding">
<text>Hot Selle</text>
<view class="title_right">
<image src="../../static/img/right.png" mode=""></image>
</view>
</view>
</view>
<!-- HOT SELLS 3 -->
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false">
<view class="spike1_item" v-for="(item,index) in 8" :key="index">
<view class="spike1_item_img"></view>
<view class="spike1_item_bottom">
<text>US$314.00</text>
<view class="spike1_item_text1">Creative styling</view>
<!-- HOT SELLS 3 -->
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false">
<view class="spike1_item" v-for="(item,index) in 8" :key="index">
<view class="spike1_item_img"></view>
<view class="spike1_item_bottom">
<text>US$314.00</text>
<view class="spike1_item_text1">Creative styling</view>
</view>
</view>
</scroll-view>
<!-- GOODSTHREE 2 -->
<view class="goodsthree2">
<view class="goodsthree2_item" v-for="(item,index) in 3" :key="index"></view>
</view>
</scroll-view>
<!-- GOODSTHREE 2 -->
<view class="goodsthree2">
<view class="goodsthree2_item" v-for="(item,index) in 3" :key="index"></view>
</view>
<!-- 轮播图 -->
<view class="uni-margin-wrap">
<swiper class="swiper" circular :indicator-dots="true" :autoplay="true" >
<swiper-item>
<view class="swiper-item uni-bg-red">A</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-green">B</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-blue">C</view>
</swiper-item>
</swiper>
</view>
<!-- SPIKE 1 -->
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false">
<view class="spike1_item" v-for="(item,index) in 8" :key="index">
<view class="spike1_item_img"></view>
<view class="spike1_item_bottom1">
<view class="spike1_item_text">Adidas Yeezy Boost 350 DazzlingBlue Black</view>
<text>US$314.00</text>
<!-- 轮播图 -->
<view class="uni-margin-wrap">
<swiper class="swiper" circular :indicator-dots="true" :autoplay="true" >
<swiper-item>
<view class="swiper-item uni-bg-red">A</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-green">B</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-blue">C</view>
</swiper-item>
</swiper>
</view>
<!-- SPIKE 1 -->
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false">
<view class="spike1_item" v-for="(item,index) in 8" :key="index">
<view class="spike1_item_img"></view>
<view class="spike1_item_bottom1">
<view class="spike1_item_text">Adidas Yeezy Boost 350 DazzlingBlue Black</view>
<text>US$314.00</text>
</view>
</view>
</scroll-view>
<!-- 瀑布流标题 -->
<view class="index_title1">PRODUCTS FRO YOU</view>
<view class="waterfall">
<custom-waterfalls-flow :value="list">
<template v-slot:default="item">
<view class="item">
<view class="title">{{item.title}}</view>
<view class="desc">{{item.desc}}</view>
</view>
</template>
</custom-waterfalls-flow>
</view>
</scroll-view>
<!-- 瀑布流标题 -->
<view class="index_title1">PRODUCTS FRO YOU</view>
<view class="waterfall">
<custom-waterfalls-flow :value="list">
<template v-slot:default="item">
<view class="item">
<view class="title">{{item.title}}</view>
<view class="desc">{{item.desc}}</view>
</view>
</template>
</custom-waterfalls-flow>
</view>
</view>
</template>
<script>
import {defaultRequest} from '../../api/index.js'
export default {
data() {
return {
@ -217,13 +213,32 @@
list: [
{ image: 'https://via.placeholder.com/200x500.png/ff0000', title: 'Adidas Yeezy Boost 350 DazzlingBlue Black', desc: 'US$314.00' },
{ image: 'https://via.placeholder.com/200x200.png/2878ff', title: 'Adidas Yeezy Boost 350 DazzlingBlue Black', desc: 'US$314.00' }
]
],
indexDate:{},
info:[]
}
},
onLoad() {
this.getIndex()
},
methods: {
//
getIndex(){
let data={_action:'getpagedata',pagecode:'HOME'}
defaultRequest(data).then(res=>{
console.info(res)
if(res.error==0){
this.indexDate=res.data
res.data.zones.map(item=>{
if(item.zone_code=='ICON'){
item.content=''
this.info.push(item)
}
})
console.info(this.info)
}
})
},
goPage(){
uni.navigateTo({
url: '/pages/productDetails/index',
@ -371,6 +386,10 @@
line-height: 373.33rpx;
text-align: center;
color: white;
image{
width: 100%;
height: 100%;
}
}
.uni-bg-red{
background-color: red;
@ -409,6 +428,11 @@
height: 97.33rpx;
margin-bottom: 6.67rpx;
background-color: #8F9094;
image{
width: 100%;
height: 100%;
}
}
}
.grid_item:nth-child(n+4){

33
pages/index/pickUpCentre.vue

@ -1,7 +1,6 @@
<template>
<view>
<view class="status_bar"></view>
<uni-nav-bar left-icon="left" title="Pick up centre" color="#000000" @clickLeft="back" :border="false">
<uni-nav-bar left-icon="left" :statusBar="true" title="Pick up centre" color="#000000" @clickLeft="back" :border="false">
<block slot="right">
<view class="head_coupons">
<image src="../../static/img/coupons.png" mode=""></image>
@ -10,20 +9,21 @@
</block>
</uni-nav-bar>
<view class="body">
<view class="coupons_item" v-for="(item,index) in 3 " :key="index">
<view class="coupons_item" v-for="(item,index) in list " :key="index">
<view class="coupons_item_left">
<view class="item_left_prcie">$20.00</view>
<view class="item_left_prcie">${{item.type_money}}</view>
<text class="item_left_span">Min.spend</text>
<view>$200.00</view>
<view>${{item.min_goods_amount}}</view>
</view>
<view class="coupons_item_right">
<view class="coupons_right_info">
<view class="coupons_right_info_title">All-purpose</view>
<view class="coupons_right_info_title">{{item.type_name}}</view>
<text>The tide zone is available</text>
<view class="coupons_right_info_time">2022.09.23 10:37 - 2022.12.23 10:37</view>
<view class="coupons_right_info_time">{{item.send_start_date}} - {{item.send_end_date}}</view>
</view>
<button>Receive</button>
<image src="../../static/img/coupons_bg.png" mode="" class="coupons_item_right_bg"></image>
<button v-if="item.is_obtained==0" @click="obtainbonus(item.type_id)">Receive</button>
<image src="../../static/img/coupons_bg.png" mode="" class="coupons_item_right_bg" v-if="item.is_obtained==1"></image>
</view>
</view>
</view>
@ -31,7 +31,7 @@
</template>
<script>
import {defaultRequest} from '../../api/index.js'
import {defaultRequest,defaultRequest2} from '../../api/index.js'
export default {
data() {
return {
@ -39,6 +39,19 @@
}
},
methods:{
obtainbonus(id){
let data={_action:'obtainbonus',type_id:id}
defaultRequest2(data).then(res=>{
console.info(res)
if(res.error==0){
uni.showToast({
icon:'none',
title:res.message
})
}
this.getList()
})
},
getList(){
let data={_action:'getbonuslist'}
defaultRequest(data).then(res=>{

8
pages/login/changePwd.vue

@ -21,6 +21,7 @@
resetcode:''
},
isLogin:true,
user_info:{}
}
},
methods:{
@ -32,6 +33,12 @@
title:res.message,
icon:'none'
})
setTimeout(function() {
uni.navigateBack({
delta:2
})
},2000)
}
})
},
@ -48,6 +55,7 @@
console.info(e)
this.query.username=e.username
this.query.resetcode=e.resetcode
this.user_info=uni.getStorageSync('user_info')
}
}
</script>

18
pages/login/index.vue

@ -7,9 +7,7 @@
<input type="text" class="login_input" placeholder="eamil address" v-model="loginDate.username" @input="verificationLogin">
<input type="text" class="login_input" placeholder="password" v-model="loginDate.password" @input="verificationLogin">
<view class="tips" v-show="loginErr">{{errMsg}}</view>
<navigator url="/pages/login/verifyEmail" >
<view class="forgot">Forgot your Password?</view>
</navigator>
<view class="forgot" @click="forgotPwd">Forgot your Password?</view>
<button class="login_submit" :disabled="isLogin" @click="login()">SIGN IN</button>
<view class="agreement">
<image src="../../static/img/select2.png" mode="" class="agreement_image" @click="loginSelect=!loginSelect,loginErr=false" v-show="!loginSelect"></image>
@ -83,11 +81,22 @@
query:{
_action:'sendmessagesforvalidation',
username:'',
password:''
}
}
},
methods:{
forgotPwd(){
if(this.loginDate.username==''){
uni.showToast({
title:'Please fill in the user email first',
icon:'none',
})
return
}
uni.navigateTo({
url:'./verifyEmail?email='+this.loginDate.username
})
},
onClickItem(e) {
if (this.current != e.currentIndex) {
this.current = e.currentIndex;
@ -120,7 +129,6 @@
if(res.data){
this.$refs.alertDialog.open()
this.query.username=this.loginDate.username
this.query.password=this.loginDate.password
}else{
this.loginErr=true
this.errMsg=res.message

14
pages/order/confirmation.vue

@ -198,11 +198,7 @@
<script>
import {defaultRequest2,defaultRequest3} from '../../api/index.js'
import pay from '@/components/pay.vue'
export default {
components:{
pay
},
data() {
return {
isShow:false,
@ -242,16 +238,14 @@
success: function (res) {
console.log('success:' + JSON.stringify(res));
uni.redirectTo({
url: 'paySuccess?order_id='+id+'&will_get_integral='+will_get_integral
url: 'paySuccess?type=0&order_id='+id+'&will_get_integral='+will_get_integral
});
},
fail: function (err) {
console.log('fail:' + JSON.stringify(err));
uni.showToast({
title:'Payment failed',
icon:'none'
})
uni.navigateBack()
uni.redirectTo({
url: 'paySuccess?type=1&order_id='+id+'&will_get_integral='+will_get_integral
});
}
});
}

149
pages/order/details.vue

@ -47,8 +47,9 @@
<view>T-minus payment</view>
</view>
</view>
<navigator url="/pages/order/logisticsDetails" class="cancelled transit" v-if="details_index==4">
<view class="cancelled_left">
<view class="cancelled transit" @click="goLogistics" v-if="details_index==4">
<view class="cancelled_left" >
<image src="../../static/img/transit.png" mode=""></image>
<view class="cancelled_left_info">
<view class="shipped_right_text">New YorkHas arrived statesHas arrived states</view>
@ -58,7 +59,8 @@
<view class="cancelled_right">
<image src="../../static/img/right2.png" mode=""></image>
</view>
</navigator>
</view>
</view>
<view class="address">
@ -125,7 +127,7 @@
</view>
<view class="summary_tips" v-if="details_index==3">
<image src="../../static/img/gantan1.png" mode=""></image>
<text>Reward {{goodsDate.integral}} points</text>
<text>Reward 10 points</text>
</view>
</view>
@ -148,35 +150,82 @@
</view>
<view class="summary_item" v-if="details_index!=3 && goodsDate.formated_pay_time">
<view>Payment time</view>
<view class="summary_item_right">{{goodsDate.pay_time}}</view>
<view class="summary_item_right">{{goodsDate.formated_pay_time}}</view>
</view>
<template v-if="details_index==2">
<view class="summary_item">
<view>Delivery time</view>
<view class="summary_item_right">{{goodsDate.shipping_time}}</view>
</view>
<view class="summary_item">
<view>Completion time</view>
<view class="summary_item_right">{{goodsDate.confirm_time}}</view>
</view>
</template>
<view class="summary_item" v-if="details_index==4">
<view>Delivery time</view>
<view class="summary_item_right">{{goodsDate.formated_shipping_time}}</view>
</view>
<!-- 完成时间 -->
<view class="summary_item" v-if="details_index==2">
<view>Completion time</view>
<view class="summary_item_right"></view>
</view>
<!-- 取消时间 -->
<view class="summary_item" v-if="details_index==1">
<view>Cancel time</view>
<view class="summary_item_right">{{goodsDate.pay_time}}</view>
<view class="summary_item_right"></view>
</view>
</view>
<view class="details_footer" v-if="details_index!=0">
<button class="white" v-if="details_index==2 || details_index==4">LOGISTICS</button>
<button class="white" v-if="details_index==2 || details_index==4" @click="goLogistics">LOGISTICS</button>
<button class="white" v-if="details_index==1 || details_index==2">DELETE ORDER</button>
<button class="black" v-if="details_index==2">COMMENT</button>
<button class="white" v-if="details_index==3 ">CANCEL ORDER</button>
<button class="black" v-if="details_index==3">PAY NOW</button>
<button class="black" v-if="details_index==3" @click="isPay=true">PAY NOW</button>
<button class="black" v-if="details_index==4">CONFIRM RECEIPT</button>
</view>
<!-- 支付 -->
<view class="mask" v-show="isPay" @click="isPay=false"></view>
<view class="order_popup" v-show="isPay">
<view class="order_popup_title">
<text>
Payment Method
</text>
<image src="../../static/img/close1.png" mode="" @click="isPay=false"></image>
</view>
<view class="order_popup_pay" >
<view class="pay_item" @click="selectPay(0)">
<image src="../../static/img/select1.png" mode="" class="pay_item_select" v-if="pay_index==0"></image>
<image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right">
<image src="../../static/img/pay_pal.png" mode=""></image>
<text>Pay Pal</text>
</view>
</view>
<view class="pay_item" @click="selectPay(1)">
<image src="../../static/img/select1.png" mode="" class="pay_item_select" v-if="pay_index==1"></image>
<image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right">
<image src="../../static/img/card.png" mode=""></image>
<text>Credit/Debit Card</text>
</view>
</view>
<view class="pay_item" @click="selectPay(2)">
<image src="../../static/img/select1.png" mode="" class="pay_item_select" v-if="pay_index==2"></image>
<image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right">
<image src="../../static/img/GPay.png" mode=""></image>
<text>Google Pay</text>
</view>
</view>
<view class="pay_item" @click="selectPay(3)">
<image src="../../static/img/select1.png" mode="" class="pay_item_select" v-if="pay_index==3"></image>
<image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right">
<image src="../../static/img/APay.png" mode=""></image>
<text>Apple pay</text>
</view>
</view>
<button @click="getPayDate">PAY NOW</button>
</view>
</view>
</view>
</template>
@ -193,16 +242,77 @@
order_sn:''
},
goodsDate:{},
goods_list:[]
goods_list:[],
isPay:false,
payQuery:{
_action:'payorder',
order_id:'',
order_type:'GOODSBUY',
payment_method:'alipay.native'
},
pay_index:0,
logisticsinfo:{}
}
},
methods:{
goLogistics(){
uni.navigateTo({
url:'./logisticsDetails?order_id='+this.goodsDate.order_id
})
},
//
selectPay(index){
this.pay_index=index
},
//
getPayDate(){
defaultRequest2(this.payQuery).then(res=>{
console.info(res)
if(res.error==0){
//
if(res.data.need_pay_amount==0) return
uni.requestPayment({
provider: 'alipay',
orderInfo: res.data.prepay_data.order_info, //
success: function (res) {
console.log('success:' + JSON.stringify(res));
uni.redirectTo({
url: 'paySuccess?order_id='+this.payQuery.order_id
});
},
fail: function (err) {
console.log('fail:' + JSON.stringify(err));
uni.showToast({
title:'Payment failed',
icon:'none'
})
}
});
}
})
},
payNow(id){
this.payQuery.order_id=id
this.isPay=true
},
getDate(){
defaultRequest2(this.query).then(res=>{
console.info(res)
if(res.error==0){
this.goodsDate=res.data
this.goods_list=res.goods_list
if(this.details_index==4){
this.getLogistics()
}
}
})
},
getLogistics(){
let data ={_action:'getlogisticsinfo',order_id:this.goodsDate.order_id,order_sn:''}
defaultRequest2(data).then(res=>{
console.info(res)
if(res.error==0){
this.logisticsinfo=res.data[0]
}
})
}
@ -211,6 +321,7 @@
console.info(e)
this.details_index=e.details_index
this.query.order_id=e.id
this.getDate()
},
filters:{

25
pages/order/paySuccess.vue

@ -1,11 +1,12 @@
<template>
<view>
<view class="success">
<image src="../../static/img/success.png" mode=""></image>
<text class="success_title">Payment is successful</text>
<view>
<image src="../../static/img/success.png" mode="" v-if="type==0"></image>
<image src="../../static/img/fail.png" mode="" v-else></image>
<text class="success_title">{{type==0?'Payment is successful':'Payment failed'}}</text>
<view >
This order will be rewarded with
<text class="success_span">{{will_get_integral}} points</text>
<text class="success_span">{{will_get_integral || 0}} points</text>
after receipt.
</view>
<view class="success_button">
@ -29,9 +30,12 @@
</template>
<script>
import {defaultRequest4} from '../../api/index.js'
export default {
data() {
return {
// 0 1
type:0,
id:'',
will_get_integral:0,
//
@ -69,8 +73,14 @@
})
},
goPage(){
let details_index
if(this.type==0){
details_index=0
}else{
details_index=3
}
uni.redirectTo({
url: './details?details_index=0&'+'id='+this.id
url: './details?details_index='+details_index+'&'+'id='+this.id
});
},
goCategory(){
@ -80,8 +90,9 @@
}
},
onLoad(e) {
this.id=e.id
this.will_get_integral=e.will_get_integral
this.id=e.order_id
this.will_get_integral=e.will_get_integral || 0
this.type=e.type
this.getCatList(0)
},
//

34
pages/productDetails/index.vue

@ -393,8 +393,18 @@
}else{
let goods_attr_id=''
this.goods_attr_list.map(item=>{
goods_attr_id+=item.goods_attr_id+','
if(item.goods_attr_id!=''){
goods_attr_id+=item.goods_attr_id+','
}
})
if(goods_attr_id==''){
uni.showToast({
title:'Please select the product specification',
icon:'none'
})
return
}
this.cartQuery.goods_attr_id=goods_attr_id.substring(0,goods_attr_id.lastIndexOf(','));
}
defaultRequest2(this.cartQuery).then(res=>{
@ -463,21 +473,20 @@
}else{
//
let isNew=false
// for(i in this.goods_attr_list){
// let item=this.goods_attr_list[i]
// if(item.attr_id==attr_id){
// this.goods_attr_list[i].goods_attr_id=goods_attr_id
// }
// }
this.goods_attr_list.map(item=>{
for(let i in this.goods_attr_list){
let item=this.goods_attr_list[i]
if(item.attr_id==attr_id){
item.goods_attr_id=goods_attr_id
if(item.goods_attr_id==goods_attr_id){
this.goods_attr_list[i].goods_attr_id=''
}else{
this.goods_attr_list[i].goods_attr_id=goods_attr_id
}
isNew=false
return
break
}else{
isNew=true
}
})
}
if(isNew){
this.goods_attr_list.splice(index,0,data)
}
@ -539,11 +548,12 @@
this.info.push(item.img_url)
})
if(this.goodsDate.attr_list){
let data={goods_attr_id:''}
this.goodsDate.attr_list.map(item=>{
if(item.attr_name=="Color"){
this.colorNum=item.goods_attrs.length
}
let data={goods_attr_id:'',attr_id:item.attr_id}
this.goods_attr_list.push(data)
})
}else{

7
pages/shippingCart/index.vue

@ -81,7 +81,7 @@
<view class="recommend">
<view class="recommend_title">RECOMMEND</view>
<view class="recommend_content">
<view class="recommend_content_item" v-for="(item,index) in catList " :key="index">
<view class="recommend_content_item" v-for="(item,index) in catList " :key="index" @click="goDetails(item.id)">
<view class="recommend_content_item_image">
<image :src="item.thumb" mode=""></image>
</view>
@ -135,6 +135,11 @@
}
},
methods:{
goDetails(id){
uni.navigateTo({
url:'/pages/productDetails/index?goods_id='+id
})
},
//
getCatList(type){
defaultRequest4(this.catQuery).then(res=>{

BIN
static/img/fail.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Loading…
Cancel
Save