Browse Source

修IOS首页白屏问题,修改productList.vue文件报错

master
zhengshuiqi 3 years ago
parent
commit
32e697734c
  1. 54
      App.vue
  2. 12
      api/index.js
  3. 15
      api/request.js
  4. 1
      common/common.scss
  5. 23
      ios/index.js
  6. 5
      main.js
  7. 7
      manifest.json
  8. 11
      pages.json
  9. 10
      pages/account/deleteCount.vue
  10. 114
      pages/account/message.vue
  11. 182
      pages/account/myOrders.vue
  12. 164
      pages/category/productList.vue
  13. 10
      pages/index/address.vue
  14. 54
      pages/index/index.vue
  15. 182
      pages/index/index2.vue
  16. 165
      pages/order/confirmation.vue
  17. 65
      pages/order/details.vue
  18. 28
      project.config.json
  19. 7
      project.private.config.json

54
App.vue

@ -1,13 +1,59 @@
<script> <script>
import {defaultRequest,defaultRequest4} from 'api/index.js' import {
defaultRequest,
defaultRequest4
} from 'api/index.js'
var jpushModule = uni.requireNativePlugin("JG-JPush"); var jpushModule = uni.requireNativePlugin("JG-JPush");
export default { export default {
data() { data() {
return { return {
globalData:{
},
backButtonPress: 0, backButtonPress: 0,
} }
}, },
onLaunch: function() { onLaunch: function() {
// (IOS)
// uni.getNetworkType({
// success: function (res) {
// console.log(res.networkType);// wifi2g3g4gethernetunknownnone
// if(res.networkType === "none"){
// console.log("");
// this.globalData.typee = 1;
// console.log('=====', this.globalData.typee)
// }else{
// this.globalData.typee = 0
// console.log('==',this.globalData.typee)
// }
// }
// });
// alert(this.globalData.type)
// ios
// uni.getSystemInfo({
// success: (res) => {
// if (res.platform == 'ios') {
// const query = uni.createSelectorQuery().in(this);
// var isRecovery = true;
// query
// .select('#containerId')
// .boundingClientRect(data => {
// isRecovery = false;
// })
// .exec();
// var timer = setTimeout(() => {
// if (isRecovery) {
// uni.reLaunch({
// url: '/pages/tabbar/user/user'
// })
// clearTimeout(timer);
// timer = null;
// }
// }, 500)
// }
// },
// })
// ios
// console.log('App Launch') // console.log('App Launch')
uni.hideTabBar() uni.hideTabBar()
// uni.onTabBarMidButtonTap(()=>{ // uni.onTabBarMidButtonTap(()=>{
@ -19,9 +65,9 @@
// animationType:'slide-in-bottom' // animationType:'slide-in-bottom'
// }) // })
// }) // })
plus.screen.lockOrientation("portrait-primary"); // plus.screen.lockOrientation("portrait-primary");
setTimeout(() => { setTimeout(() => {
plus.navigator.closeSplashscreen(); // plus.navigator.closeSplashscreen();
}, 2400); }, 2400);
//#ifdef APP-PLUS //#ifdef APP-PLUS
@ -89,9 +135,9 @@
</script> </script>
<style lang="scss"> <style lang="scss">
/*每个页面公共css */ /*每个页面公共css */
@import "@/common/common.scss"; @import "@/common/common.scss";
page { page {
overflow-x: hidden; overflow-x: hidden;
} }

12
api/index.js

@ -1,6 +1,7 @@
import httpRequest from './request'; import httpRequest from './request';
//默认请求地址 //默认请求地址
export const defaultRequest =query=>{ export const defaultRequest =query=>{
return httpRequest({ return httpRequest({
url:'mapi/api_v2011.php?appcode=DOPE+', url:'mapi/api_v2011.php?appcode=DOPE+',
@ -75,3 +76,14 @@ export const defaultRequest5 =(query,comments)=>{
}) })
} }
// 银行支付 // 银行支付
// export const defaultRequest6 =query=>{
// return httpRequest({
// url:'mapi/api_v2011.php?appcode=DOPE+',
// method:'post',
// data:query,
// errMsg:true,
// isCookies:true,
// isEncryption:false,
// isLoad:true
// })
// }

15
api/request.js

@ -1,5 +1,9 @@
import config from '../config.js' import config from '../config.js'
import { encryptDes, decryptDes ,encrypt_by_des } from '@/utils/des.js' import {
encryptDes,
decryptDes,
encrypt_by_des
} from '@/utils/des.js'
import Base64 from 'base-64'; import Base64 from 'base-64';
import cryptoJS from "crypto-js" import cryptoJS from "crypto-js"
@ -47,7 +51,9 @@ const httpRequest = (params) => {
let data2 = JSON.parse(decryptDes(data, "6780f04cf2e211ec86a8005056c00008")) let data2 = JSON.parse(decryptDes(data, "6780f04cf2e211ec86a8005056c00008"))
// console.info(data2) // console.info(data2)
let data1={data:data} let data1 = {
data: data
}
let httpOptions = { let httpOptions = {
url: config.apiUri + params.url, url: config.apiUri + params.url,
@ -59,6 +65,8 @@ const httpRequest = (params) => {
} }
}; };
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.request({ uni.request({
...httpOptions, ...httpOptions,
success: res => { success: res => {
@ -92,6 +100,9 @@ const httpRequest = (params) => {
reject(err); reject(err);
} }
}) })
}) })
} }

1
common/common.scss

@ -24,7 +24,6 @@
.tarbar_img image { .tarbar_img image {
height: 50rpx; height: 50rpx;
width: 50rpx; width: 50rpx;
// background-color: #fff; // background-color: #fff;
} }
.img_m image{ .img_m image{

23
ios/index.js

@ -0,0 +1,23 @@
// #import <CoreTelephony/CTCellularData.h>
// // 尝试解决IOS白屏问题
// //获取网络权限
// - (void)checkNetworkPermissions{
// CTCellularData *cellularData = [[CTCellularData alloc] init];
// // 状态发生变化时调用
// cellularData.cellularDataRestrictionDidUpdateNotifier = ^(CTCellularDataRestrictedState restrictedState) {
// switch (restrictedState) {
// case kCTCellularDataRestrictedStateUnknown:
// NSLog(@"蜂窝移动网络状态:未知");
// break;
// case kCTCellularDataRestricted:
// NSLog(@"蜂窝移动网络状态:关闭");
// break;
// case kCTCellularDataNotRestricted:
// NSLog(@"蜂窝移动网络状态:开启");
// break;
// default:
// break;
// }
// };
// }

5
main.js

@ -1,13 +1,14 @@
import App from './App' import App from './App'
import store from '@/store/store.js' import store from '@/store/store.js'
import ios from '@/ios/index.js'
// #ifndef VUE3 // #ifndef VUE3
import Vue from 'vue' import Vue from 'vue'
Vue.config.productionTip = false Vue.config.productionTip = false
App.mpType = 'app' App.mpType = 'app'
const app = new Vue({ const app = new Vue({
...App, ...App,
store store,
ios
}) })

7
manifest.json

@ -1,6 +1,6 @@
{ {
"name" : "DopePlus", "name" : "DopePlus",
"appid" : "__UNI__A6CF3EA", "appid" : "__UNI__9088064",
// "appid" : "__UNI__7D4CA0F", // "appid" : "__UNI__7D4CA0F",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
@ -310,7 +310,10 @@
"mp-weixin" : { "mp-weixin" : {
"appid" : "", "appid" : "",
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false,
"es6" : false,
"postcss" : false,
"enhance": true
}, },
"usingComponents" : true "usingComponents" : true
}, },

11
pages.json

@ -381,6 +381,7 @@
// //
"bounce": "none", "bounce": "none",
"usingComponents" : false, "usingComponents" : false,
// "subPackages": true,
"optimization": { "optimization": {
"subPackages": true "subPackages": true
}, },
@ -435,6 +436,16 @@
} }
] ]
},
"condition" : { //
"current": 0, //(list )
"list": [
{
"name": "", //
"path": "", //
"query": "" //onLoad
}
]
} }
} }

10
pages/account/deleteCount.vue

@ -2,9 +2,9 @@
<view> <view>
<view class="font"> <view class="font">
<!-- <uni-icons type="arrow-left" size="30" @click="back" color="#fff"></uni-icons> --> <!-- <uni-icons type="arrow-left" size="30" @click="back" color="#fff"></uni-icons> -->
<uni-icons type="back" size="30" @click="back" style="font-weight: 100;" color="#fff"></uni-icons> <uni-icons type="back" size="22" @click="back" style="font-weight: 100;padding-left: 20rpx;" color="#fff"></uni-icons>
<text style="margin-left: 30rpx;color: white;">Delete account</text> <text style="color: white;display: flex;justify-content: center;font-weight: 500; align-items: center; text-align: center; margin: 0 auto;color: white;">Delete account</text>
</view> </view>
<view class="text_item"> <view class="text_item">
Once you deactivate account, your account information will no longer be accessible. Once you deactivate account, your account information will no longer be accessible.
@ -129,11 +129,11 @@
display: flex; display: flex;
background-color:#000000; background-color:#000000;
color:white; color:white;
height: 100rpx; height: 42px;
line-height: 100rpx; line-height: 100rpx;
text-align: center; text-align: center;
padding-top:50rpx; padding-top: 20px;
padding-left:20rpx; // padding-left:20rpx;
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
} }

114
pages/account/message.vue

@ -2,7 +2,9 @@
<view class="body"> <view class="body">
<view class="font"> <view class="font">
<uni-icons style="z-index: 1111;position: relative; padding-left: 11px;color: white;font-weight: 100;cursor: pointer;" type="back" size="23" @click="backs"></uni-icons> <uni-icons
style="z-index: 1111;position: relative; padding-left: 11px;color: white;font-weight: 100;cursor: pointer;"
type="back" size="23" @click="backs"></uni-icons>
<text style="margin-left: 30%;color: white;">Message</text> <text style="margin-left: 30%;color: white;">Message</text>
</view> </view>
@ -15,7 +17,47 @@
</view> </view>
<view class="mask" v-show="isShwo" @click="isShwo=false"></view> <view class="mask" v-show="isShwo" @click="isShwo=false"></view>
<button class="body-btn">Continue shopping</button> <button class="body-btn">Continue shopping</button>
<view>
<!-- <uni-nav-bar left-icon="left" :statusBar="true" title="Message"
color="#fff" backgroundColor="#000000" @clickLeft="back" :border="false"/> -->
<!-- <view class="one">
<image src="../../static/img/left_white.png" mode="" @click="back()"></image>
<view class="one_text">Message</view>
</view> -->
<view class="body">
<view class="msg_item" v-for="(item,index) in list.blocks" :key="item.block_title" @click="gotopage(item)">
<view class="msg_time">{{item.block_avaiable_from | Mes}}</view>
<!-- <text class="y_red" v-show="item.block_id"></text> -->
<!-- <view class="msg_content">{{item.}}</view> -->
<view class="msg_img" v-if="item.block_pic">
<image :src="item.block_pic" class="imagesize"></image>
</view>
<view class="msg_title">{{item.block_title}}</view>
</view>
<view class="msg_item" v-for="(item,index) in app_Mes" :key="item.id" @click="gotopage(item)">
<view class="msg_time">{{ item.add_time | Mes}}</view>
<text class="y_red" v-show="item.unread == 1"></text>
<view class="msg_title">{{ item.mtitle }}</view>
<view class="msg_content">
</view> </view>
</view>
<!-- <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> -->
</view>
</view>
</view>
</template> </template>
<script> <script>
@ -251,4 +293,74 @@
background-color: white; background-color: white;
opacity: 0; opacity: 0;
} }
.uni-navbar {
font-size: 32rpx;
font-weight: bold;
}
.y_red {
font-size: 19rpx;
color: #940000;
;
}
.body {
// border-top: 13.33rpx #F7F7F7 solid;
padding: 50.67rpx 26.67rpx;
}
.msg_item {
padding-top: 17rpx;
padding-bottom: 28rpx;
padding-left: 10rpx;
padding-right: 10rpx;
background-color: #fff;
// border-bottom: 1px solid #E2E2E2;
margin-bottom: 30rpx;
&:first-child {
margin-top: 122.67rpx;
}
.msg_time {
font-size: 25.33rpx;
font-weight: 400;
text-align: center;
// margin-top: 51.33rpx;
}
.msg_title {
font-size: 28rpx;
margin-top: 20rpx;
margin-left: 10rpx;
}
.msg_content {
color: #555555;
font-size: 25.33rpx;
font-weight: 400;
}
.msg_img {
margin-top: 27.33rpx;
border-radius: 10rpx;
width: 100%;
height: 281.33rpx;
background-color: #ffdcd3;
}
}
.msg_item:last-child {
border-bottom: none;
}
.imagesize {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
</style> </style>

182
pages/account/myOrders.vue

@ -2,7 +2,8 @@
<view> <view>
<view class="order_nav"> <view class="order_nav">
<scroll-view class="scroll-view_H" scroll-x="true" :show-scrollbar="false"> <scroll-view class="scroll-view_H" scroll-x="true" :show-scrollbar="false">
<view :class="scroll_active==index?'scroll_active':''" v-for="(item,index) in scrollList" @click="scrollChange(index)" :key="index">{{item.text}}</view> <view :class="scroll_active==index?'scroll_active':''" v-for="(item,index) in scrollList"
@click="scrollChange(index)" :key="index">{{item.text}}</view>
</scroll-view> </scroll-view>
</view> </view>
@ -18,9 +19,11 @@
<!-- 已取消订单 --> <!-- 已取消订单 -->
<text v-else-if="item.order_status_code==2">cancelled</text> <text v-else-if="item.order_status_code==2">cancelled</text>
<!-- 待发货订单 --> <!-- 待发货订单 -->
<text v-else-if="item.pay_status_code==2 && item.shipping_status_code==0">To be shipped</text> <text v-else-if="item.pay_status_code==2 && item.shipping_status_code==0">To be
shipped</text>
<!-- 运输中订单 --> <!-- 运输中订单 -->
<text v-else-if="item.pay_status_code==2 && item.shipping_status_code==1 || item.shipping_status_code==4">Shipped</text> <text
v-else-if="item.pay_status_code==2 && item.shipping_status_code==1 || item.shipping_status_code==4">Shipped</text>
<!-- 已完成订单 --> <!-- 已完成订单 -->
<text v-else-if="item.pay_status_code==2 && item.shipping_status_code==2">Completed</text> <text v-else-if="item.pay_status_code==2 && item.shipping_status_code==2">Completed</text>
@ -31,7 +34,8 @@
</view> </view>
<view class="order_content"> <view class="order_content">
<template v-if="item.order_goods.length==1"> <template v-if="item.order_goods.length==1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1" @click.stop="goGoodsDetails(item1.goods_id)"> <view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1"
@click.stop="goGoodsDetails(item1.goods_id)">
<view class="good_info_left "> <view class="good_info_left ">
<view class="good_info_image"> <view class="good_info_image">
<image :src="item1.goods_img" mode=""></image> <image :src="item1.goods_img" mode=""></image>
@ -52,7 +56,8 @@
<template v-else> <template v-else>
<view class="good_info" @click.stop="showGoods(item.order_goods,1)"> <view class="good_info" @click.stop="showGoods(item.order_goods,1)">
<view class="good_info_left"> <view class="good_info_left">
<view class="good_info_image" v-for="(item1,index1) in item.order_goods" :key="index1"> <view class="good_info_image" v-for="(item1,index1) in item.order_goods"
:key="index1">
<image :src="item1.goods_img" mode=""></image> <image :src="item1.goods_img" mode=""></image>
</view> </view>
</view> </view>
@ -76,9 +81,11 @@
<button class="pay" @click.stop="payNow(item.order_id,0)">PAY NOW</button> <button class="pay" @click.stop="payNow(item.order_id,0)">PAY NOW</button>
</template> </template>
<!-- 已取消订单 --> <!-- 已取消订单 -->
<button v-if="item.order_status_code==2" class="cancel" @click.stop="openTips(item.order_id,1)">DELETE ORDER</button> <button v-if="item.order_status_code==2" class="cancel"
@click.stop="openTips(item.order_id,1)">DELETE ORDER</button>
<!-- 待发货订单 --> <!-- 待发货订单 -->
<template v-if="item.pay_status_code==2 && item.shipping_status_code==1 || item.shipping_status_code==4"> <template
v-if="item.pay_status_code==2 && item.shipping_status_code==1 || item.shipping_status_code==4">
<button class="cancel" @click.stop="goLogistics(item.order_id)">LOGISTICS</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> <button class="pay" @click.stop="openTips(item.order_id,2)">CONFIRM RECEIPT</button>
</template> </template>
@ -86,7 +93,8 @@
<template v-if="item.pay_status_code==2 && item.shipping_status_code==2"> <template v-if="item.pay_status_code==2 && item.shipping_status_code==2">
<button class="cancel" @click.stop="goLogistics(item.order_id)">LOGISTICS</button> <button class="cancel" @click.stop="goLogistics(item.order_id)">LOGISTICS</button>
<button class="cancel" @click.stop="openTips(item.order_id,1)">DELETE ORDER</button> <button class="cancel" @click.stop="openTips(item.order_id,1)">DELETE ORDER</button>
<button class="pay" @click.stop="goComment(item)" v-if="item.comment_status_code==0">COMMENT</button> <button class="pay" @click.stop="goComment(item)"
v-if="item.comment_status_code==0">COMMENT</button>
</template> </template>
</view> </view>
</view> </view>
@ -98,7 +106,8 @@
<!-- 待支付订单 --> <!-- 待支付订单 -->
<template v-if="isList==true && scroll_active==1"> <template v-if="isList==true && scroll_active==1">
<view class="" v-for="(item,idnex) in orderList" :key="item.order_id"> <view class="" v-for="(item,idnex) in orderList" :key="item.order_id">
<view class="order" @click="goDetails(item,item.order_id)" v-if="item.pay_status_code==0 && item.order_status_code==0"> <view class="order" @click="goDetails(item,item.order_id)"
v-if="item.pay_status_code==0 && item.order_status_code==0">
<view class="order_title"> <view class="order_title">
<text>Waiting for payment</text> <text>Waiting for payment</text>
<view class="order_title_right"> <view class="order_title_right">
@ -108,7 +117,8 @@
</view> </view>
<view class="order_content"> <view class="order_content">
<template v-if="item.order_goods.length==1"> <template v-if="item.order_goods.length==1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1" @click.stop="goGoodsDetails(item1.goods_id)"> <view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1"
@click.stop="goGoodsDetails(item1.goods_id)">
<view class="good_info_left "> <view class="good_info_left ">
<view class="good_info_image"> <view class="good_info_image">
<image :src="item1.goods_img" mode=""></image> <image :src="item1.goods_img" mode=""></image>
@ -129,7 +139,8 @@
<template v-else> <template v-else>
<view class="good_info" @click.stop="showGoods(item.order_goods,1)"> <view class="good_info" @click.stop="showGoods(item.order_goods,1)">
<view class="good_info_left"> <view class="good_info_left">
<view class="good_info_image" v-for="(item1,index1) in item.order_goods" :key="index1"> <view class="good_info_image" v-for="(item1,index1) in item.order_goods"
:key="index1">
<image :src="item1.goods_img" mode=""></image> <image :src="item1.goods_img" mode=""></image>
</view> </view>
</view> </view>
@ -159,7 +170,8 @@
<!-- 待发货订单 --> <!-- 待发货订单 -->
<template v-if="isList==true && scroll_active==2"> <template v-if="isList==true && scroll_active==2">
<view v-for="(item,idnex) in orderList" :key="item.order_id"> <view v-for="(item,idnex) in orderList" :key="item.order_id">
<view class="order" v-if="item.pay_status_code==2 && item.shipping_status_code==0" @click="goDetails(item,item.order_id)"> <view class="order" v-if="item.pay_status_code==2 && item.shipping_status_code==0"
@click="goDetails(item,item.order_id)">
<view class="order_title"> <view class="order_title">
<text>To be shipped</text> <text>To be shipped</text>
<view class="order_title_right"> <view class="order_title_right">
@ -169,7 +181,8 @@
</view> </view>
<view class="order_content"> <view class="order_content">
<template v-if="item.order_goods.length==1"> <template v-if="item.order_goods.length==1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1" @click.stop="goGoodsDetails(item1.goods_id)"> <view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1"
@click.stop="goGoodsDetails(item1.goods_id)">
<view class="good_info_left "> <view class="good_info_left ">
<view class="good_info_image"> <view class="good_info_image">
<image :src="item1.goods_img" mode=""></image> <image :src="item1.goods_img" mode=""></image>
@ -190,7 +203,8 @@
<template v-else> <template v-else>
<view class="good_info" @click.stop="showGoods(item.order_goods,1)"> <view class="good_info" @click.stop="showGoods(item.order_goods,1)">
<view class="good_info_left"> <view class="good_info_left">
<view class="good_info_image" v-for="(item1,index1) in item.order_goods" :key="index1"> <view class="good_info_image" v-for="(item1,index1) in item.order_goods"
:key="index1">
<image :src="item1.goods_img" mode=""></image> <image :src="item1.goods_img" mode=""></image>
</view> </view>
</view> </view>
@ -210,7 +224,9 @@
<!-- 运输中订单 --> <!-- 运输中订单 -->
<template v-if="isList==true && scroll_active==3"> <template v-if="isList==true && scroll_active==3">
<view v-for="(item,idnex) in orderList" :key="item.order_id"> <view v-for="(item,idnex) in orderList" :key="item.order_id">
<view class="order" v-if="item.pay_status_code==2 && item.shipping_status_code==1 || item.shipping_status_code==4" @click="goDetails(item,item.order_id)"> <view class="order"
v-if="item.pay_status_code==2 && item.shipping_status_code==1 || item.shipping_status_code==4"
@click="goDetails(item,item.order_id)">
<view class="order_title"> <view class="order_title">
<text>Shipped</text> <text>Shipped</text>
<view class="order_title_right"> <view class="order_title_right">
@ -220,7 +236,8 @@
</view> </view>
<view class="order_content"> <view class="order_content">
<template v-if="item.order_goods.length==1"> <template v-if="item.order_goods.length==1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1" @click.stop="goGoodsDetails(item1.goods_id)"> <view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1"
@click.stop="goGoodsDetails(item1.goods_id)">
<view class="good_info_left "> <view class="good_info_left ">
<view class="good_info_image"> <view class="good_info_image">
<image :src="item1.goods_img" mode=""></image> <image :src="item1.goods_img" mode=""></image>
@ -241,7 +258,8 @@
<template v-else> <template v-else>
<view class="good_info" @click.stop="showGoods(item.order_goods,1)"> <view class="good_info" @click.stop="showGoods(item.order_goods,1)">
<view class="good_info_left"> <view class="good_info_left">
<view class="good_info_image" v-for="(item1,index1) in item.order_goods" :key="index1"> <view class="good_info_image" v-for="(item1,index1) in item.order_goods"
:key="index1">
<image :src="item1.goods_img" mode=""></image> <image :src="item1.goods_img" mode=""></image>
</view> </view>
</view> </view>
@ -265,7 +283,8 @@
<!-- 已完成订单 --> <!-- 已完成订单 -->
<template v-if="isList==true && scroll_active==5"> <template v-if="isList==true && scroll_active==5">
<view class="" v-for="(item,idnex) in orderList" :key="item.order_id"> <view class="" v-for="(item,idnex) in orderList" :key="item.order_id">
<view class="order " v-if="item.pay_status_code==2 && item.shipping_status_code==2" @click="goDetails(item,item.order_id)"> <view class="order " v-if="item.pay_status_code==2 && item.shipping_status_code==2"
@click="goDetails(item,item.order_id)">
<view class="order_title"> <view class="order_title">
<text>Completed</text> <text>Completed</text>
<view class="order_title_right"> <view class="order_title_right">
@ -275,7 +294,8 @@
</view> </view>
<view class="order_content"> <view class="order_content">
<template v-if="item.order_goods.length==1"> <template v-if="item.order_goods.length==1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1" @click.stop="goGoodsDetails(item1.goods_id)"> <view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1"
@click.stop="goGoodsDetails(item1.goods_id)">
<view class="good_info_left "> <view class="good_info_left ">
<view class="good_info_image"> <view class="good_info_image">
<image :src="item1.goods_img" mode=""></image> <image :src="item1.goods_img" mode=""></image>
@ -296,7 +316,8 @@
<template v-else> <template v-else>
<view class="good_info" @click.stop="showGoods(item.order_goods,1)"> <view class="good_info" @click.stop="showGoods(item.order_goods,1)">
<view class="good_info_left"> <view class="good_info_left">
<view class="good_info_image" v-for="(item1,index1) in item.order_goods" :key="index1"> <view class="good_info_image" v-for="(item1,index1) in item.order_goods"
:key="index1">
<image :src="item1.goods_img" mode=""></image> <image :src="item1.goods_img" mode=""></image>
</view> </view>
</view> </view>
@ -310,7 +331,8 @@
<view class="order_button"> <view class="order_button">
<button class="cancel" @click.stop="goLogistics(item.order_id)">LOGISTICS</button> <button class="cancel" @click.stop="goLogistics(item.order_id)">LOGISTICS</button>
<button class="cancel" @click.stop="openTips(item.order_id,1)">DELETE ORDER</button> <button class="cancel" @click.stop="openTips(item.order_id,1)">DELETE ORDER</button>
<button class="pay" @click.stop="goComment(item)" v-if="item.comment_status_code==0">COMMENT</button> <button class="pay" @click.stop="goComment(item)"
v-if="item.comment_status_code==0">COMMENT</button>
</view> </view>
</view> </view>
</view> </view>
@ -331,7 +353,8 @@
</view> </view>
<view class="order_content"> <view class="order_content">
<template v-if="item.order_goods.length==1"> <template v-if="item.order_goods.length==1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1" @click.stop="goGoodsDetails(item1.goods_id)"> <view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1"
@click.stop="goGoodsDetails(item1.goods_id)">
<view class="good_info_left "> <view class="good_info_left ">
<view class="good_info_image"> <view class="good_info_image">
<image :src="item1.goods_img" mode=""></image> <image :src="item1.goods_img" mode=""></image>
@ -352,7 +375,8 @@
<template v-else> <template v-else>
<view class="good_info" @click.stop="showGoods(item.order_goods,1)"> <view class="good_info" @click.stop="showGoods(item.order_goods,1)">
<view class="good_info_left"> <view class="good_info_left">
<view class="good_info_image" v-for="(item1,index1) in item.order_goods" :key="index1"> <view class="good_info_image" v-for="(item1,index1) in item.order_goods"
:key="index1">
<image :src="item1.goods_img" mode=""></image> <image :src="item1.goods_img" mode=""></image>
</view> </view>
</view> </view>
@ -385,7 +409,8 @@
</view> </view>
<view class="order_content"> <view class="order_content">
<template v-if="item.order_goods.length==1"> <template v-if="item.order_goods.length==1">
<view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1" @click.stop="goGoodsDetails(item1.goods_id)"> <view class="good_info" v-for="(item1,index1) in item.order_goods" :key="index1"
@click.stop="goGoodsDetails(item1.goods_id)">
<view class="good_info_left "> <view class="good_info_left ">
<view class="good_info_image"> <view class="good_info_image">
<image :src="item1.goods_img" mode=""></image> <image :src="item1.goods_img" mode=""></image>
@ -406,7 +431,8 @@
<template v-else> <template v-else>
<view class="good_info" @click.stop="showGoods(item.order_goods,1)"> <view class="good_info" @click.stop="showGoods(item.order_goods,1)">
<view class="good_info_left"> <view class="good_info_left">
<view class="good_info_image" v-for="(item1,index1) in item.order_goods" :key="index1"> <view class="good_info_image" v-for="(item1,index1) in item.order_goods"
:key="index1">
<image :src="item1.goods_img" mode=""></image> <image :src="item1.goods_img" mode=""></image>
</view> </view>
</view> </view>
@ -449,22 +475,24 @@
</view> </view>
<view class="order_popup_pay"> <view class="order_popup_pay">
<view class="pay_item" @click="selectPay(0)"> <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/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> <image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right"> <view class="pay_item_right">
<image src="../../static/img/pay_pal.png" mode=""></image> <image src="../../static/img/pay_pal.png" mode=""></image>
<text>Pay Pal</text> <text>Pay Pal</text>
</view> </view>
</view> </view>
<!-- <view class="pay_item" @click="selectPay(1)"> <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/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> <image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right"> <view class="pay_item_right">
<image src="../../static/img/card.png" mode=""></image> <image src="../../static/img/card.png" mode=""></image>
<text>Credit/Debit Card</text> <text>Credit/Debit Card</text>
</view> </view>
</view> </view>
<view class="pay_item" @click="selectPay(2)"> <!-- <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/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> <image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right"> <view class="pay_item_right">
@ -491,7 +519,8 @@
<image src="../../static/img/close1.png" mode="" @click="isShow=false"></image> <image src="../../static/img/close1.png" mode="" @click="isShow=false"></image>
</view> </view>
<view class="order_popup_commodity"> <view class="order_popup_commodity">
<view class="good_info padding_left " v-for="(item,index) in goods_list " :key="index" @click.stop="goGoodsDetails(item.goods_id)"> <view class="good_info padding_left " v-for="(item,index) in goods_list " :key="index"
@click.stop="goGoodsDetails(item.goods_id)">
<view class="good_info_left "> <view class="good_info_left ">
<view class="good_info_image img_border"> <view class="good_info_image img_border">
<image :src="item.goods_img" mode="" class="img_border"></image> <image :src="item.goods_img" mode="" class="img_border"></image>
@ -514,18 +543,33 @@
</view> </view>
<!-- 删除取消弹框 --> <!-- 删除取消弹框 -->
<uni-popup ref="alertDialog" type="dialog"> <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-dialog type="error" cancelText="Close" :confirmText="tipsBut" title="Tips" :content="tipsInfo"
@confirm="dialogConfirm"></uni-popup-dialog>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
<script> <script>
import {defaultRequest2} from '../../api/index.js' import {
defaultRequest2
} from '../../api/index.js'
export default { export default {
data() { data() {
return { return {
scrollList:[{text:'All'},{text:'Unpaid'},{text:'Processing'},{text:'Shipped'},{text:'Completed'},{text:'Closed'}], scrollList: [{
text: 'All'
}, {
text: 'Unpaid'
}, {
text: 'Processing'
}, {
text: 'Shipped'
}, {
text: 'Completed'
}, {
text: 'Closed'
}],
scroll_active: 0, scroll_active: 0,
isList: true, isList: true,
orderList: [], orderList: [],
@ -548,7 +592,14 @@
tipsInfo: '', tipsInfo: '',
tipsBut: '', tipsBut: '',
goods_list: [], goods_list: [],
query:{_action:'getuserorders',page_index:1,page_size:10,payingstatus:'',status:'',shippingstatus:''} query: {
_action: 'getuserorders',
page_index: 1,
page_size: 10,
payingstatus: '',
status: '',
shippingstatus: ''
}
} }
}, },
methods: { methods: {
@ -610,7 +661,30 @@
// //
getPayDate() { getPayDate() {
if (this.pay_index == 0) { if (this.pay_index == 0) {
let data={_action:'payorder',order_id:this.payQuery.order_id,order_type:'GOODSBUY',payment_method:'paypal'} let data = {
_action: 'payorder',
order_id: this.payQuery.order_id,
order_type: 'GOODSBUY',
payment_method: 'paypal'
}
defaultRequest2(data).then(res => {
console.info(res, '支付')
if (res.error == 0) {
let url = res.data.prepay_data.checkoutnow_url
console.log(url)
// plus.runtime.openURL(res.data.prepay_data.checkoutnow_url)
uni.navigateTo({
url: '../order/paypalWebview?src=' + url
})
}
})
} else if (this.pay_index == 1) {
let data = {
_action: 'payorder',
order_id: this.payQuery.order_id,
order_type: 'GOODSBUY',
payment_method: 'oceanpay'
}
defaultRequest2(data).then(res => { defaultRequest2(data).then(res => {
console.info(res, '支付') console.info(res, '支付')
if (res.error == 0) { if (res.error == 0) {
@ -635,7 +709,8 @@
console.log('success:' + JSON.stringify(res)); console.log('success:' + JSON.stringify(res));
this.isShow = false this.isShow = false
uni.navigateTo({ uni.navigateTo({
url: '../order/paySuccess?order_id='+this.payQuery.order_id url: '../order/paySuccess?order_id=' + this.payQuery
.order_id
}); });
}, },
fail: function(err) { fail: function(err) {
@ -659,7 +734,8 @@
openTips(id, type) { openTips(id, type) {
this.tipsType = type this.tipsType = type
if (type == 0) { if (type == 0) {
this.tipsInfo='Are you sure you want to cancel this order? This order will be regarded as invalid after cancellation' this.tipsInfo =
'Are you sure you want to cancel this order? This order will be regarded as invalid after cancellation'
this.tipsBut = 'CancelOrder' this.tipsBut = 'CancelOrder'
this.cancelQuery._action = 'cancelorder' this.cancelQuery._action = 'cancelorder'
} else if (type == 1) { } else if (type == 1) {
@ -733,9 +809,11 @@
.body { .body {
padding-top: 100rpx; padding-top: 100rpx;
} }
.padding_left { .padding_left {
padding-left: 20rpx; padding-left: 20rpx;
} }
.order_nav { .order_nav {
padding: 0 38.67rpx; padding: 0 38.67rpx;
border-bottom: 13.33rpx #F7F7F7 solid; border-bottom: 13.33rpx #F7F7F7 solid;
@ -744,6 +822,7 @@
box-sizing: border-box; box-sizing: border-box;
z-index: 99; z-index: 99;
background-color: white; background-color: white;
.scroll-view_H { .scroll-view_H {
white-space: nowrap; white-space: nowrap;
font-size: 28rpx; font-size: 28rpx;
@ -755,14 +834,17 @@
height: 0; height: 0;
background-color: transparent; background-color: transparent;
} }
view { view {
margin-left: 37.33rpx; margin-left: 37.33rpx;
display: inline-block; display: inline-block;
padding: 25.33rpx 0; padding: 25.33rpx 0;
} }
view:first-child { view:first-child {
margin-left: 0; margin-left: 0;
} }
.scroll_active { .scroll_active {
color: #000000; color: #000000;
font-size: 28rpx; font-size: 28rpx;
@ -771,9 +853,11 @@
} }
} }
} }
.order { .order {
border-bottom: 13.33rpx #F7F7F7 solid; border-bottom: 13.33rpx #F7F7F7 solid;
padding-bottom: 26.67rpx; padding-bottom: 26.67rpx;
.order_title { .order_title {
display: flex; display: flex;
align-items: center; align-items: center;
@ -797,11 +881,13 @@
} }
} }
} }
.order_content { .order_content {
padding-left: 32rpx; padding-left: 32rpx;
padding-right: 26.67rpx; padding-right: 26.67rpx;
// background-color: #B22234; // background-color: #B22234;
margin-top: -30rpx; margin-top: -30rpx;
.good_info { .good_info {
padding-top: 60rpx; padding-top: 60rpx;
display: flex; display: flex;
@ -811,6 +897,7 @@
color: #666666; color: #666666;
font-weight: bold; font-weight: bold;
border-bottom: 1px solid #F1F1F1; border-bottom: 1px solid #F1F1F1;
.good_info_left { .good_info_left {
display: flex; display: flex;
align-items: center; align-items: center;
@ -822,12 +909,14 @@
margin-right: 8rpx; margin-right: 8rpx;
border-radius: 10rpx !important; border-radius: 10rpx !important;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 10rpx; border-radius: 10rpx;
} }
} }
.left_info { .left_info {
margin-left: 24rpx; margin-left: 24rpx;
@ -836,6 +925,7 @@
font-weight: 400; font-weight: 400;
width: 477.33rpx; width: 477.33rpx;
} }
.left_info_bottom { .left_info_bottom {
width: 533.33rpx !important; width: 533.33rpx !important;
display: flex; display: flex;
@ -845,9 +935,11 @@
color: #909090; color: #909090;
width: 100%; width: 100%;
margin-top: 24rpx; margin-top: 24rpx;
.info_lable { .info_lable {
padding: 5.33rpx 20rpx; padding: 5.33rpx 20rpx;
font-size: 22.67rpx; font-size: 22.67rpx;
// border-radius: 33.33rpx; // border-radius: 33.33rpx;
// border: 1px solid #D3D3D3; // border: 1px solid #D3D3D3;
image { image {
@ -859,9 +951,11 @@
} }
} }
} }
.good_info_right { .good_info_right {
display: flex; display: flex;
align-items: center; align-items: center;
image { image {
width: 16rpx; width: 16rpx;
height: 16rpx; height: 16rpx;
@ -869,11 +963,13 @@
} }
} }
} }
.good_price { .good_price {
font-size: 28rpx; font-size: 28rpx;
text-align: right; text-align: right;
margin: 24rpx 0; margin: 24rpx 0;
} }
.good_points { .good_points {
display: flex; display: flex;
align-items: center; align-items: center;
@ -887,12 +983,14 @@
margin-right: 13.33rpx; margin-right: 13.33rpx;
} }
} }
.order_button { .order_button {
margin-top: 33.33rpx; margin-top: 33.33rpx;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
background-color: #FFF; background-color: #FFF;
button { button {
height: 57.33rpx; height: 57.33rpx;
line-height: 57.33rpx; line-height: 57.33rpx;
@ -902,13 +1000,17 @@
background-color: #fff; background-color: #fff;
margin: 0; margin: 0;
border-radius: 0rpx; border-radius: 0rpx;
// border:green solid 4rpx; // border:green solid 4rpx;
&:last-child { &:last-child {
margin-right: 0 !important; margin-right: 0 !important;
} }
} }
button:after { button:after {
border:none;} border: none;
}
.cancel { .cancel {
color: #666666; color: #666666;
border: black solid 1rpx; border: black solid 1rpx;
@ -918,6 +1020,7 @@
background-color: #fff; background-color: #fff;
} }
.pay { .pay {
color: white; color: white;
border-radius: 0; border-radius: 0;
@ -927,6 +1030,7 @@
} }
} }
} }
.order1 { .order1 {
padding-top: 90.67rpx; padding-top: 90.67rpx;
font-size: 24rpx; font-size: 24rpx;
@ -935,11 +1039,13 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
image { image {
width: 146.67rpx; width: 146.67rpx;
height: 146.67rpx; height: 146.67rpx;
margin-bottom: 36rpx; margin-bottom: 36rpx;
} }
button { button {
background-color: #000000; background-color: #000000;
font-size: 24rpx; font-size: 24rpx;

164
pages/category/productList.vue

@ -25,8 +25,10 @@
<view class="pets_nav_item" @click="selectNav(1)"> <view class="pets_nav_item" @click="selectNav(1)">
<text :class="query.order_type==3 ?'active_text' :query.order_type==4 ?'active_text':''">Sales</text> <text :class="query.order_type==3 ?'active_text' :query.order_type==4 ?'active_text':''">Sales</text>
<view class="pets_nav_item_right"> <view class="pets_nav_item_right">
<image src="../../static/img/top_white.png" mode="" class="pets_nav_arrow" @click="getList(3,4)"></image> <image src="../../static/img/top_white.png" mode="" class="pets_nav_arrow" @click="getList(3,4)">
<image src="/static/img/bottom1_white.png" mode="" class="pets_nav_arrow"@click="getList(3,3)"></image> </image>
<image src="/static/img/bottom1_white.png" mode="" class="pets_nav_arrow" @click="getList(3,3)">
</image>
</view> </view>
</view> </view>
<view class="pets_nav_item" @click="selectNav(2)"> <view class="pets_nav_item" @click="selectNav(2)">
@ -38,8 +40,10 @@
</view> </view>
<view class="pets_nav_image"> <view class="pets_nav_image">
<image src="/static/img/pets_nav_white.png" mode="" v-show="pets_index==1" @click="pets_index=0,$refs.waterfallsFlowRef.refresh()"></image> <image src="/static/img/pets_nav_white.png" mode="" v-show="pets_index==1"
<image src="/static/img/ptes_nav1_white.png" mode="" v-show="pets_index==0" @click="pets_index=1"></image> @click="pets_index=0,$refs.waterfallsFlowRef.refresh()"></image>
<image src="/static/img/ptes_nav1_white.png" mode="" v-show="pets_index==0" @click="pets_index=1">
</image>
</view> </view>
</view> </view>
<view class="body"> <view class="body">
@ -54,39 +58,47 @@
<view class="item_right_price"> <view class="item_right_price">
<text>US${{item.shop_price}}</text> <text>US${{item.shop_price}}</text>
<view class="right_price_operation"> <view class="right_price_operation">
<image src="../../static/img/like_white.png" mode="" v-show="item.is_attention==0" @click.stop="addLike(item.id)"></image> <image src="../../static/img/like_white.png" mode="" v-show="item.is_attention==0"
<image src="../../static/icon/like_red.png" mode="" v-show="item.is_attention==1" @click.stop="removeLike(item.id)"></image> @click.stop="addLike(item.id)"></image>
<image src="../../static/icon/cat_white.png" mode=""@click.stop="gotoCart(item)"></image> <image src="../../static/icon/like_red.png" mode="" v-show="item.is_attention==1"
@click.stop="removeLike(item.id)"></image>
<image src="../../static/icon/cat_white.png" mode="" @click.stop="gotoCart(item)">
</image>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!--
<view class="product1" v-show="pets_index==0"> <view class="product1" v-show="pets_index==0">
<custom-waterfalls-flow ref="waterfallsFlowRef" :value="list" imageKey="goods_img" @wapperClick="goDetails" @imageClick="goDetails"> <custom-waterfalls-flow ref="waterfallsFlowRef" :value="list" imageKey="goods_img"
@wapperClick="goDetails" @imageClick="goDetails">
<template v-slot:default="item"> <template v-slot:default="item">
<view class="product1_item"> <view class="product1_item">
<view class="item_text">{{item.short_name}}</view> <view class="item_text">{{item.short_name}}</view>
<view class="desc"> <view class="desc">
<text style="font-family: cursive;">US${{item.shop_price}}</text> <text style="font-family: cursive;">US${{item.shop_price}}</text>
<image src="../../static/icon/cat_white.png" mode="" @click.stop="gotoCart(item)"></image> <image src="../../static/icon/cat_white.png" mode="" @click.stop="gotoCart(item)">
</image>
</view> </view>
<view class="lable" v-if="item.tags!=''">{{item.tags}}</view> <view class="lable" v-if="item.tags!=''">{{item.tags}}</view>
</view> </view>
</template> </template>
</custom-waterfalls-flow> </custom-waterfalls-flow>
</view> </view> -->
<view class="bootom_last" v-if="bootom == 1">-THE END-</view> <view class="bootom_last" v-if="bootom == 1">-THE END-</view>
<view class="mask" @click="isCart=false" v-show="isCart"></view> <view class="mask" @click="isCart=false" v-show="isCart"></view>
<view class="addCard" v-show="isCart"> <view class="addCard" v-show="isCart">
<image src="/static/img/close1.png" mode="" class="addCard_close" @click="isCart=false,goods_attr_list =[]"></image> <image src="/static/img/close1.png" mode="" class="addCard_close"
@click="isCart=false,goods_attr_list =[]"></image>
<scroll-view class="spike1 " scroll-x="true" :show-scrollbar="false"> <scroll-view class="spike1 " scroll-x="true" :show-scrollbar="false">
<image :src="item.img_url" mode="" class="addCard_scroll" v-for="(item,index) in gallery_list" @click="clickImg(index,gallery_list)"></image> <image :src="item.img_url" mode="" class="addCard_scroll" v-for="(item,index) in gallery_list"
@click="clickImg(index,gallery_list)"></image>
</scroll-view> </scroll-view>
<scroll-view class="addCard_body" scroll-y="true"> <scroll-view class="addCard_body" scroll-y="true">
<view>{{ goodsDate.goods_name}}</view> <view>{{ goodsDate.goods_name}}</view>
<view class="addCard_price">US${{goodsDate.is_promote==0? shop_price :goodsDate.promote_price}}</view> <view class="addCard_price">US${{goodsDate.is_promote==0? shop_price :goodsDate.promote_price}}
</view>
<view v-for="(item,index) in goods_attr_list" :key="item.attr_id"> <view v-for="(item,index) in goods_attr_list" :key="item.attr_id">
<view>{{item.name}}</view> <view>{{item.name}}</view>
<view class="color_select variations_select_size"> <view class="color_select variations_select_size">
@ -94,11 +106,14 @@
:class="goods_attr_list[index].goods_attr_id==item1.goods_attr_id?'active_color':''" :class="goods_attr_list[index].goods_attr_id==item1.goods_attr_id?'active_color':''"
@click="selectAttr(item.attr_id,item1.goods_attr_id,index1,item1.attr_price)"> @click="selectAttr(item.attr_id,item1.goods_attr_id,index1,item1.attr_price)">
<view class="color_select_item_zoom" v-if="item1.attr_img!=''"> <view class="color_select_item_zoom" v-if="item1.attr_img!=''">
<image src="/static/icon/big2.png" mode="" @click="clickImg(index1,item.list)"></image> <image src="/static/icon/big2.png" mode="" @click="clickImg(index1,item.list)">
</image>
</view> </view>
<image :src="item1.attr_img" mode="" v-if="item1.attr_img!=''"></image> <image :src="item1.attr_img" mode="" v-if="item1.attr_img!=''"></image>
<view class="color_select_item_bottom" v-if="item1.attr_img!=''">{{ item1.attr_value}}</view> <view class="color_select_item_bottom" v-if="item1.attr_img!=''">{{ item1.attr_value}}
<view class="color_select_item_bottom" v-if="!item1.attr_img">{{ item1.attr_value}}</view> </view>
<view class="color_select_item_bottom" v-if="!item1.attr_img">{{ item1.attr_value}}
</view>
</view> </view>
</view> </view>
@ -126,7 +141,10 @@
</template> </template>
<script> <script>
import {defaultRequest,defaultRequest2} from '../../api/index.js' import {
defaultRequest,
defaultRequest2
} from '../../api/index.js'
export default { export default {
data() { data() {
return { return {
@ -146,12 +164,13 @@
isReachBottom: true, isReachBottom: true,
isCart: false, isCart: false,
goodsDate: { goodsDate: {
comment_summary:[ comment_summary: [{
{comment_summary:'',commentlabel: ""} comment_summary: '',
], commentlabel: ""
gallery_list:[ }],
{content:''} gallery_list: [{
], content: ''
}],
}, },
gallery_list: [], gallery_list: [],
@ -178,7 +197,9 @@
methods: { methods: {
getCartNum() { getCartNum() {
let data={_action:'getcartgoods'} let data = {
_action: 'getcartgoods'
}
defaultRequest(data).then(res => { defaultRequest(data).then(res => {
console.info(res) console.info(res)
if (res.error == 0) { if (res.error == 0) {
@ -191,7 +212,10 @@
// //
addLike(id) { addLike(id) {
if (this.isLogin == 1) { if (this.isLogin == 1) {
let data={_action:'setfaviouritegoods',goods_id:id} let data = {
_action: 'setfaviouritegoods',
goods_id: id
}
defaultRequest2(data).then(res => { defaultRequest2(data).then(res => {
console.info(res) console.info(res)
if (res.error == 0) { if (res.error == 0) {
@ -211,7 +235,10 @@
// //
removeLike(id) { removeLike(id) {
let data={_action:'unsetfaviouritegoods',goods_id:id} let data = {
_action: 'unsetfaviouritegoods',
goods_id: id
}
defaultRequest2(data).then(res => { defaultRequest2(data).then(res => {
console.info(res) console.info(res)
if (res.error == 0) { if (res.error == 0) {
@ -277,8 +304,7 @@
}, 500) }, 500)
this.isCart = false this.isCart = false
} } else {
else{
uni.showToast({ uni.showToast({
title: res.data.message, title: res.data.message,
icon: 'none' icon: 'none'
@ -316,7 +342,12 @@
if (item.attr_name == "Color") { if (item.attr_name == "Color") {
this.colorNum = item.goods_attrs.length this.colorNum = item.goods_attrs.length
} }
let data={name:item.attr_name,goods_attr_id:'',attr_id:item.attr_id,list:item.goods_attrs} let data = {
name: item.attr_name,
goods_attr_id: '',
attr_id: item.attr_id,
list: item.goods_attrs
}
this.goods_attr_list.push(data) this.goods_attr_list.push(data)
}) })
@ -339,7 +370,10 @@
} }
this.shop_price = sum this.shop_price = sum
this.current = index this.current = index
let data={attr_id:attr_id,goods_attr_id:goods_attr_id} let data = {
attr_id: attr_id,
goods_attr_id: goods_attr_id
}
if (this.goods_attr_list.length == 0) { if (this.goods_attr_list.length == 0) {
this.goods_attr_list.push(data) this.goods_attr_list.push(data)
} else { } else {
@ -385,8 +419,7 @@
uni.switchTab({ uni.switchTab({
url: '../index/index' url: '../index/index'
}) })
} } else {
else{
uni.navigateBack() uni.navigateBack()
} }
}, },
@ -541,29 +574,35 @@
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
} }
.black_bg { .black_bg {
height: 100vh; height: 100vh;
width: 100%; width: 100%;
background-color: #000000; background-color: #000000;
} }
.nav_left { .nav_left {
image { image {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
&:last-child { &:last-child {
margin-left: 36.67rpx; margin-left: 36.67rpx;
} }
} }
} }
.nav_right { .nav_right {
padding-right: 30rpx; padding-right: 30rpx;
padding-top: 10rpx; padding-top: 10rpx;
image { image {
width: 44rpx; width: 44rpx;
height: 44rpx; height: 44rpx;
} }
} }
.pets_nav { .pets_nav {
padding: 28.67rpx 32.67rpx; padding: 28.67rpx 32.67rpx;
display: flex; display: flex;
@ -590,9 +629,11 @@
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
z-index: 90; z-index: 90;
.active_text { .active_text {
color: #fff; color: #fff;
} }
.pets_nav_item { .pets_nav_item {
display: flex; display: flex;
align-items: center; align-items: center;
@ -602,6 +643,7 @@
height: 16rpx; height: 16rpx;
margin-left: 9.33rpx; margin-left: 9.33rpx;
} }
.pets_nav_item_right { .pets_nav_item_right {
display: flex; display: flex;
align-items: center; align-items: center;
@ -610,10 +652,12 @@
} }
} }
.pets_nav_image { .pets_nav_image {
width: 30.67rpx; width: 30.67rpx;
height: 30.67rpx; height: 30.67rpx;
position: relative; position: relative;
&:before { &:before {
content: ""; content: "";
height: 25.33rpx; height: 25.33rpx;
@ -625,12 +669,14 @@
top: 50%; top: 50%;
margin-top: -13rpx; margin-top: -13rpx;
} }
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
} }
.body { .body {
padding: 0 26.67rpx; padding: 0 26.67rpx;
padding-top: 60rpx; padding-top: 60rpx;
@ -643,16 +689,19 @@
// margin-bottom: 10px !important; // margin-bottom: 10px !important;
} }
.product1 { .product1 {
margin-top: 10rpx; margin-top: 10rpx;
padding-top: 30.67rpx; padding-top: 30.67rpx;
background-color: #000 !important; background-color: #000 !important;
/deep/.column-value { /deep/.column-value {
border-radius: 10rpx !important; border-radius: 10rpx !important;
margin-bottom: 20rpx !important; margin-bottom: 20rpx !important;
background-color: #000 !important; background-color: #000 !important;
} }
// /deep/ .uni-image{ // /deep/ .uni-image{
// .img{ // .img{
// border-radius: 20% !important; // border-radius: 20% !important;
@ -694,6 +743,7 @@
} }
} }
.lable { .lable {
padding: 11.33rpx 18rpx; padding: 11.33rpx 18rpx;
// background-color: #FCF6F7; // background-color: #FCF6F7;
@ -706,14 +756,17 @@
} }
} }
} }
.product { .product {
padding-top: 34rpx; padding-top: 34rpx;
.product_item { .product_item {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 26.67rpx; font-size: 26.67rpx;
font-weight: 400; font-weight: 400;
margin-bottom: 24.67rpx; margin-bottom: 24.67rpx;
.product_item_image { .product_item_image {
width: 373.33rpx; width: 373.33rpx;
height: 313.33rpx; height: 313.33rpx;
@ -721,6 +774,7 @@
border-radius: 15rpx; border-radius: 15rpx;
} }
.product_item_right { .product_item_right {
width: 440rpx; width: 440rpx;
height: 283.33rpx; height: 283.33rpx;
@ -738,6 +792,7 @@
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 20.33rpx; margin-top: 20.33rpx;
margin-bottom: 30.67rpx; margin-bottom: 30.67rpx;
.right_lable_item { .right_lable_item {
padding: 11.33rpx 18rpx; padding: 11.33rpx 18rpx;
background-color: #FCF6F7; background-color: #FCF6F7;
@ -748,6 +803,7 @@
} }
} }
.item_right_price { .item_right_price {
display: flex; display: flex;
color: #fff; color: #fff;
@ -755,9 +811,11 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-weight: 600; font-weight: 600;
.right_price_operation { .right_price_operation {
display: flex; display: flex;
align-items: center; align-items: center;
image { image {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
@ -794,40 +852,48 @@
right: 24.67rpx; right: 24.67rpx;
top: 18.67rpx; top: 18.67rpx;
} }
.spike1 { .spike1 {
margin-top: 0; margin-top: 0;
margin-bottom: 20rpx; margin-bottom: 20rpx;
padding-bottom: 0; padding-bottom: 0;
border-bottom: none; border-bottom: none;
.addCard_scroll { .addCard_scroll {
width: 286.67rpx; width: 286.67rpx;
height: 286.67rpx; height: 286.67rpx;
border-radius: 10rpx; border-radius: 10rpx;
margin-left: 10.67rpx; margin-left: 10.67rpx;
&:first-child { &:first-child {
margin-left: 0; margin-left: 0;
} }
&:last-child { &:last-child {
margin-right: 15rpx; margin-right: 15rpx;
} }
} }
} }
.addCard_body { .addCard_body {
padding-right: 31.33rpx; padding-right: 31.33rpx;
max-height: 60vh; max-height: 60vh;
min-height: 400rpx; min-height: 400rpx;
.addCard_price { .addCard_price {
font-size: 44rpx; font-size: 44rpx;
font-weight: bold; font-weight: bold;
margin-top: 27.33rpx; margin-top: 27.33rpx;
margin-bottom: 51.33rpx; margin-bottom: 51.33rpx;
} }
.color_select { .color_select {
display: flex; display: flex;
font-size: 16.67rpx; font-size: 16.67rpx;
color: #666666; color: #666666;
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 59.33rpx; margin-bottom: 59.33rpx;
.color_select_item { .color_select_item {
margin-top: 22rpx; margin-top: 22rpx;
position: relative; position: relative;
@ -835,11 +901,13 @@
border-radius: 6.67rpx; border-radius: 6.67rpx;
margin-right: 12.67rpx; margin-right: 12.67rpx;
width: 134.67rpx; width: 134.67rpx;
image { image {
width: 134.67rpx; width: 134.67rpx;
height: 133.33rpx; height: 133.33rpx;
border-radius: 6.67rpx 6.67rpx 0 0; border-radius: 6.67rpx 6.67rpx 0 0;
} }
.color_select_item_zoom { .color_select_item_zoom {
width: 20.33rpx; width: 20.33rpx;
height: 20.33rpx; height: 20.33rpx;
@ -851,11 +919,13 @@
right: 12.67rpx; right: 12.67rpx;
top: 9.33rpx; top: 9.33rpx;
z-index: 99; z-index: 99;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.color_select_item_bottom { .color_select_item_bottom {
padding: 10rpx 0rpx; padding: 10rpx 0rpx;
font-size: 24rpx; font-size: 24rpx;
@ -863,18 +933,22 @@
} }
} }
.active_color { .active_color {
color: #fff; color: #fff;
background-color: #000; background-color: #000;
border: 1px solid #000000; border: 1px solid #000000;
} }
} }
.variations_select_size { .variations_select_size {
margin-left: 0; margin-left: 0;
margin-top: 26.67rpx; margin-top: 26.67rpx;
margin-bottom: 40.67rpx; margin-bottom: 40.67rpx;
.select_size_item { .select_size_item {
margin-bottom: 16.67rpx !important; margin-bottom: 16.67rpx !important;
&:nth-child(4n+4) { &:nth-child(4n+4) {
margin-right: 0; margin-right: 0;
} }
@ -885,6 +959,7 @@
} }
.quantity { .quantity {
display: flex; display: flex;
align-items: center; align-items: center;
@ -901,9 +976,11 @@
/deep/ .uni-numbox__minus { /deep/ .uni-numbox__minus {
border-radius: 14rpx; border-radius: 14rpx;
} }
/deep/.uni-numbox__plus { /deep/.uni-numbox__plus {
border-radius: 14rpx; border-radius: 14rpx;
} }
/deep/.uni-numbox__value { /deep/.uni-numbox__value {
border-left: 1px solid #999999; border-left: 1px solid #999999;
border-right: 1px solid #999999; border-right: 1px solid #999999;
@ -913,6 +990,7 @@
} }
} }
} }
button { button {
width: 100%; width: 100%;
height: 73.33rpx; height: 73.33rpx;
@ -922,17 +1000,20 @@
font-weight: bold; font-weight: bold;
font-size: 26.67rpx; font-size: 26.67rpx;
} }
.spike1 { .spike1 {
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
margin-top: 20rpx; margin-top: 20rpx;
padding-bottom: 34rpx; padding-bottom: 34rpx;
border-bottom: 1px solid #E2E2E2; border-bottom: 1px solid #E2E2E2;
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 0; width: 0;
height: 0; height: 0;
background-color: transparent; background-color: transparent;
} }
.spike1_item { .spike1_item {
width: 410rpx; width: 410rpx;
background-color: #F6F6F6; background-color: #F6F6F6;
@ -941,12 +1022,15 @@
font-size: 20rpx; font-size: 20rpx;
display: inline-block; display: inline-block;
color: #737373; color: #737373;
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
view { view {
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.spike1_item_title { .spike1_item_title {
font-weight: bold; font-weight: bold;
@ -955,6 +1039,7 @@
display: inline-block; display: inline-block;
margin-left: 10rpx; margin-left: 10rpx;
} }
.text_red { .text_red {
color: #B22234; color: #B22234;
display: inline-block; display: inline-block;
@ -962,6 +1047,7 @@
} }
} }
} }
.spike1_item1 { .spike1_item1 {
color: #191919; color: #191919;
font-size: 29.33rpx; font-size: 29.33rpx;
@ -969,12 +1055,14 @@
width: 200rpx; width: 200rpx;
display: inline-block; display: inline-block;
font-weight: bold; font-weight: bold;
.spike1_item_img { .spike1_item_img {
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
background-color: #999999; background-color: #999999;
} }
.spike1_item_bottom { .spike1_item_bottom {
padding-left: 9.33rpx; padding-left: 9.33rpx;
margin-top: 22.67rpx; margin-top: 22.67rpx;
@ -984,11 +1072,13 @@
font-size: 21.33rpx; font-size: 21.33rpx;
text-decoration: line-through; text-decoration: line-through;
} }
.spike1_item_text1 { .spike1_item_text1 {
color: #9D9D9D; color: #9D9D9D;
font-size: 21.33rpx; font-size: 21.33rpx;
} }
} }
.spike1_item_bottom1 { .spike1_item_bottom1 {
padding-left: 9.33rpx; padding-left: 9.33rpx;
margin-top: 19.33rpx; margin-top: 19.33rpx;
@ -1005,14 +1095,17 @@
} }
} }
.spike1_item:last-child { .spike1_item:last-child {
margin-right: 0; margin-right: 0;
} }
} }
.variations_select_size { .variations_select_size {
margin-left: 20.67rpx; margin-left: 20.67rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.select_size_item { .select_size_item {
background-color: red; background-color: red;
width: 97.67rpx; width: 97.67rpx;
@ -1021,10 +1114,12 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
image { image {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
// border-radius: 12.67rpx; // border-radius: 12.67rpx;
// color: #666666; // color: #666666;
color:white; color:white;
@ -1039,6 +1134,7 @@
// } // }
} }
} }
.item_text { .item_text {
height: 66rpx; height: 66rpx;
font-size: 26rpx; font-size: 26rpx;
@ -1050,6 +1146,7 @@
} }
.mask { .mask {
position: fixed; position: fixed;
width: 100%; width: 100%;
@ -1060,6 +1157,7 @@
top: 0; top: 0;
left: 0; left: 0;
} }
.bootom_last { .bootom_last {
height: 200rpx; height: 200rpx;
width: 100%; width: 100%;

10
pages/index/address.vue

@ -3,7 +3,7 @@
<view class="body"> <view class="body">
<view class="font"> <view class="font">
<!-- <uni-icons style="padding-left: 11px;color: white;" type="arrow-left" size="30" @click="back"></uni-icons> --> <!-- <uni-icons style="padding-left: 11px;color: white;" type="arrow-left" size="30" @click="back"></uni-icons> -->
<uni-icons style="padding-left: 11px;color: white;font-weight: 100;" type="back" size="30" @click="back"></uni-icons> <uni-icons style="padding-left: 11px;color: white;font-weight: 100;" type="back" size="22" @click="back"></uni-icons>
<text style="margin-left: 30%;color: white;">Ship to</text> <text style="margin-left: 30%;color: white;">Ship to</text>
</view> </view>
<!-- <view class="text_pop">Popular Countries/Regions</view> <!-- <view class="text_pop">Popular Countries/Regions</view>
@ -12,7 +12,7 @@
<radio class="Radio"v-model="item2.name" :checked="current==item2.name"@click="Active(item2,index2)"></radio> <radio class="Radio"v-model="item2.name" :checked="current==item2.name"@click="Active(item2,index2)"></radio>
</view> --> </view> -->
<view class="address1"></view> <view class="address1"></view>
<view style="padding-top: 40rpx;"> <view style="padding-top: 5px;">
<view v-for ="(item,index) in list " :key="index" > <view v-for ="(item,index) in list " :key="index" >
<text class="color_red">{{ item.title}}</text> <text class="color_red">{{ item.title}}</text>
<view class="address" v-for="(item1,index1) in item.sur_name" :key="item1.name" > <view class="address" v-for="(item1,index1) in item.sur_name" :key="item1.name" >
@ -150,15 +150,15 @@ async onLoad() {
display: flex; display: flex;
position: fixed; position: fixed;
background-color: #000; background-color: #000;
height: 100rpx;
width: 100%; width: 100%;
z-index: 999; z-index: 999;
padding-top: 50rpx; height: 42px;
padding-top: 20px;
text-align: center; text-align: center;
top:0; top:0;
left: 0; left: 0;
font-size: 20px; font-size: 20px;
font-weight: bold; /* font-weight: bold; */
} }
.address1{ .address1{
height: 50rpx; height: 50rpx;

54
pages/index/index.vue

@ -7,10 +7,12 @@
import { import {
tarbar tarbar
} from '../../tarbar/index.vue' } from '../../tarbar/index.vue'
export default { const app = getApp();
export default {
data() { data() {
return { return {
typee: '',
mycurrent: 0, mycurrent: 0,
isScrollShow: false, isScrollShow: false,
scroll_active: 0, scroll_active: 0,
@ -154,9 +156,24 @@
}, 2000) }, 2000)
}, },
onReady() {
onLoad() { //(IOS)
uni.getNetworkType({
success: function (res) {
console.log(res.networkType);// wifi2g3g4gethernetunknownnone
if(res.networkType === "none"){
this.typee = 1;
console.log("当前无网络",this.typee);
}else{
this.typee = 2
console.log("有网络",this.typee);
}
}
});
},
onLoad() {
let home = 'HOME' let home = 'HOME'
this.getIndex(home) this.getIndex(home)
this.isLogin = uni.getStorageSync('isLogin') this.isLogin = uni.getStorageSync('isLogin')
@ -201,7 +218,7 @@
}, },
onShow() { onShow() {
this.isLogin = uni.getStorageSync('isLogin') this.isLogin = uni.getStorageSync('isLogin')
console.log(this.isLogin) // console.log(this.isLogin)
uni.hideTabBar() uni.hideTabBar()
this.getList() this.getList()
this.getMes() this.getMes()
@ -291,7 +308,7 @@
}, },
openClose() { openClose() {
console.log(11) // console.log(11)
this.countdownTime2 = 0 this.countdownTime2 = 0
//uni.showTabBar() //uni.showTabBar()
uni.setTabBarStyle({ uni.setTabBarStyle({
@ -306,7 +323,7 @@
//uni.showTabBar() //uni.showTabBar()
}, },
onReachBottom(e) { onReachBottom(e) {
console.log(111) // console.log(111)
this.bootom = 1 this.bootom = 1
}, },
getimgheight1(item) { getimgheight1(item) {
@ -339,10 +356,9 @@
let img let img
let url let url
if (res.error == 0) { if (res.error == 0) {
console.log(res.data.zones) // console.log(res.data.zones)
if (res.data.zones) { if (res.data.zones) {
res.data.zones.map(item => { res.data.zones.map(item => {
if (item.zone_code == "KAIPIN") { if (item.zone_code == "KAIPIN") {
if (item.blocks) { if (item.blocks) {
@ -1328,24 +1344,26 @@
<!-- HOT SELLS 2 --> <!-- HOT SELLS 2 -->
<scroll-view class="spike1 page_padding" scroll-x="true" :show-scrollbar="false" <scroll-view class="spike1 page_padding" scroll-x="true" @change="handlechange" :show-scrollbar="false"
v-if="item.zone_code=='HONLIST2' && item.zone_status=='NORMAL'"> :indicator-dots="true" :circular="true" :interval="3000" :duration="1000"
v-if="item.zone_code=='HONLIST2' && item.zone_status=='NORMAL'" :current="mycurrent">
<view class="spike1_item padding_honlist2" v-for="(item1,index1) in item.blocks" <view class="spike1_item padding_honlist2" v-for="(item1,index1) in item.blocks"
:key="item1.block_id"> :key="item1.block_id">
<view :class="['swiper-item',index==mycurrent ? 'active' : ''], item_img" > <view :class="['swiper-item',index1==mycurrent ? 'active' : '']" >
<!-- class="item_img"> --> <!-- class="item_img"> -->
<image :src="item1.block_pic" mode="" <image :src="item1.block_pic" mode=""
:style="{width:(item.zone_code=='HONLIST2')?420+'rpx':'',height:item.zone_column+'rpx'}" :style="{width:(item.zone_code=='HONLIST2')?420+'rpx':'',height:item.zone_column+'rpx'}"
@click="imgTo(item1)"></image> @click="imgTo(itesm1)"></image>
</view> </view>
</view> </view>
<!-- 轮播图 --> <!-- 轮播图 -->
<!-- <view> <!-- <view v-if="item.zone_code=='HONLIST2' && item.zone_status=='NORMAL'" :current="mycurrent">
<swiper style="height: 600rpx;" previous-margin="140rpx" next-margin="140rpx" @change="handlechange" :current="mycurrent" :indicator-dots="true" :circular="true" :interval="3000" :duration="1000"> <swiper v-for="(item1,index1) in item.blocks" :key="item1.block_id" style="height: 600rpx;" previous-margin="140rpx" next-margin="140rpx" @change="handlechange" :current="mycurrent" :indicator-dots="true" :circular="true" :interval="3000" :duration="1000">
<swiper-item v-for="i,index in 10" :key="i"> <swiper-item v-for="i,index in 10" :key="i">
<view :class="['swiper-item',index==mycurrent ? 'active' : '']"> <view :class="['swiper-items',index==mycurrent ? 'active' : '']">
<img src="https://s2.loli.net/2022/05/11/rHeUj2V7pWg6MyQ.jpg" style="width: 100%;height: 100%;" alt="" srcset=""> <image :src="item1.block_pic" mode=""
:style="{width:(item.zone_code=='HONLIST2')?420+'rpx':'',height:item.zone_column+'rpx'}"
@click="imgTo(itesm1)"></image>
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>
@ -1809,7 +1827,7 @@
background-color: #000000; background-color: #000000;
position: fixed; position: fixed;
top: 0; top: 0;
z-index: 99999999; z-index: 99;
// opacity: 0.8; // opacity: 0.8;
// height: 260rpx; // height: 260rpx;
width: 100%; width: 100%;
@ -2491,7 +2509,7 @@
width: 100%; width: 100%;
top: 0; top: 0;
color: white; color: white;
z-index: 999; z-index: 9999999;
position: fixed; position: fixed;
// padding-top: 50rpx; // padding-top: 50rpx;

182
pages/index/index2.vue

@ -1,9 +1,8 @@
<template> <template>
<view class="body"> <view class="body">
<!-- 头部导航栏 --> <!-- 头部导航栏 -->
<uni-nav-bar :statusBar="true" :title="Pet" color="#fff" backgroundColor="#000000" :border="false" :fixed="true"> <uni-nav-bar :statusBar="true" :title="Pet" color="#fff" backgroundColor="#000000" :border="false"
:fixed="true">
<block slot="left"> <block slot="left">
<view class="nav_left"> <view class="nav_left">
<image src="../../static/img/left_white.png" mode="" @click="back()"></image> <image src="../../static/img/left_white.png" mode="" @click="back()"></image>
@ -26,7 +25,8 @@
<view class="uni-margin-wrap page_padding" v-if="item.zone_code=='BANNER' && item.zone_status=='NORMAL'"> <view class="uni-margin-wrap page_padding" v-if="item.zone_code=='BANNER' && item.zone_status=='NORMAL'">
<swiper class="swiper" circular :indicator-dots="true" :autoplay="true"> <swiper class="swiper" circular :indicator-dots="true" :autoplay="true">
<swiper-item v-for="(item1,index1) in item.blocks" :key="item1.block_id"> <swiper-item v-for="(item1,index1) in item.blocks" :key="item1.block_id">
<view class="swiper-item " v-if="item1.block_status=='NORMAL'" :style="{width:(item.zone_code=='BANNER')?item.zone_column+'rpx':'700rpx'}"> <view class="swiper-item " v-if="item1.block_status=='NORMAL'"
:style="{width:(item.zone_code=='BANNER')?item.zone_column+'rpx':'700rpx'}">
<image :src="item1.block_pic" mode="" @click="imgTo(item1)"></image> <image :src="item1.block_pic" mode="" @click="imgTo(item1)"></image>
</view> </view>
</swiper-item> </swiper-item>
@ -42,11 +42,11 @@
<view class="grid_item" v-for="(item2, index2) in item1.blocks" :key="item2.block_id"> <view class="grid_item" v-for="(item2, index2) in item1.blocks" :key="item2.block_id">
<template v-if="item2.block_status=='NORMAL'"> <template v-if="item2.block_status=='NORMAL'">
<view class="grid_item_img"> <view class="grid_item_img">
<image :src="item2.block_pic" mode="" @click="gotoProductlist(item2,item2.block_link)"></image> <image :src="item2.block_pic" mode=""
@click="gotoProductlist(item2,item2.block_link)"></image>
</view> </view>
<text>{{item2.block_title}}</text> <text>{{item2.block_title}}</text>
</template> </template>
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
@ -56,27 +56,34 @@
<!-- ONEPIC --> <!-- ONEPIC -->
<view class="ONEPIC" v-if="item.zone_code=='ONEPIC' && item.zone_status=='NORMAL'"> <view class="ONEPIC" v-if="item.zone_code=='ONEPIC' && item.zone_status=='NORMAL'">
<!-- class="discount page_padding" --> <!-- class="discount page_padding" -->
<image :src="item.blocks[0].block_pic" :style="{height:(item.zone_code=='ONEPIC')?item.zone_column+'rpx':''}" mode="" @click="imgTo(item.blocks[0])" ></image> <image :src="item.blocks[0].block_pic"
:style="{height:(item.zone_code=='ONEPIC')?item.zone_column+'rpx':''}" mode=""
@click="imgTo(item.blocks[0])"></image>
</view> </view>
<!-- TWOPIC --> <!-- TWOPIC -->
<view class="TWOPIC" v-if="item.zone_code=='TWOPIC' && item.zone_status=='NORMAL'"> <view class="TWOPIC" v-if="item.zone_code=='TWOPIC' && item.zone_status=='NORMAL'">
<image :src="item1.block_pic" :style="{height:(item.zone_code=='TWOPIC')?item.zone_column+'rpx':''}" @click="imgTo(item1)"mode="" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image> <image :src="item1.block_pic" :style="{height:(item.zone_code=='TWOPIC')?item.zone_column+'rpx':''}"
@click="imgTo(item1)" mode="" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
</view> </view>
<!-- THREEPIC --> <!-- THREEPIC -->
<view class="THREEPIC" v-if="item.zone_code=='THREEPIC' && item.zone_status=='NORMAL'"> <view class="THREEPIC" v-if="item.zone_code=='THREEPIC' && item.zone_status=='NORMAL'">
<image :src="item1.block_pic" :style="{height:(item.zone_code=='THREEPIC')?item.zone_column+'rpx':''}" @click="imgTo(item1)" mode="" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image> <image :src="item1.block_pic" :style="{height:(item.zone_code=='THREEPIC')?item.zone_column+'rpx':''}"
@click="imgTo(item1)" mode="" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
</view> </view>
<!-- FOURPIC --> <!-- FOURPIC -->
<view class="FOURPIC" v-if="item.zone_code=='FOURPIC' && item.zone_status=='NORMAL'"> <view class="FOURPIC" v-if="item.zone_code=='FOURPIC' && item.zone_status=='NORMAL'">
<image :src="item1.block_pic" :style="{height:(item.zone_code=='FOURPIC')?item.zone_column+'rpx':''}" mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image> <image :src="item1.block_pic" :style="{height:(item.zone_code=='FOURPIC')?item.zone_column+'rpx':''}"
mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
</view> </view>
<!-- FIVEPIC --> <!-- FIVEPIC -->
<view class="FIVEPIC" v-if="item.zone_code=='FIVEPIC' && item.zone_status=='NORMAL'"> <view class="FIVEPIC" v-if="item.zone_code=='FIVEPIC' && item.zone_status=='NORMAL'">
<image :src="item1.block_pic" :style="{height:(item.zone_code=='FIVEPIC')?item.zone_column+'rpx':''}" mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image> <image :src="item1.block_pic" :style="{height:(item.zone_code=='FIVEPIC')?item.zone_column+'rpx':''}"
mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
</view> </view>
<!-- SIXPIC --> <!-- SIXPIC -->
<view class="SIXPIC" v-if="item.zone_code=='SIXPIC' && item.zone_status=='NORMAL'"> <view class="SIXPIC" v-if="item.zone_code=='SIXPIC' && item.zone_status=='NORMAL'">
<image :src="item1.block_pic" :style="{height:(item.zone_code=='SIXPIC')?item.zone_column+'rpx':''}"mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image> <image :src="item1.block_pic" :style="{height:(item.zone_code=='SIXPIC')?item.zone_column+'rpx':''}"
mode="" @click="imgTo(item1)" v-for="(item1,index1) in item.blocks" :key="item1.block_id"></image>
</view> </view>
@ -86,7 +93,8 @@
<view class="index_title page_padding"> <view class="index_title page_padding">
<text>Flash Sale</text> <text>Flash Sale</text>
<view class="title_right"> <view class="title_right">
<uni-countdown :showDay="false" :hour="curEndTime |hours" :minute="curEndTime|minutes" :second="curEndTime|seconds" color="#FFFFFF" background-color="#1B1B1B" /> <uni-countdown :showDay="false" :hour="curEndTime |hours" :minute="curEndTime|minutes"
:second="curEndTime|seconds" color="#FFFFFF" background-color="#1B1B1B" />
<image src="../../static/img/right.png" mode=""></image> <image src="../../static/img/right.png" mode=""></image>
</view> </view>
</view> </view>
@ -94,10 +102,13 @@
<!-- SPIKE 1 --> <!-- SPIKE 1 -->
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false" v-if="item.zone_code=='SPIKE1' && item.zone_status=='NORMAL'"> <scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false"
v-if="item.zone_code=='SPIKE1' && item.zone_status=='NORMAL'">
<view class="spike1_item" v-for="(item1,index1) in skillList" :key="item1.goods_id"> <view class="spike1_item" v-for="(item1,index1) in skillList" :key="item1.goods_id">
<view class="item_img" @click="gotoSkillpage(item1)"> <view class="item_img" @click="gotoSkillpage(item1)">
<image :src="item1.goods_img" mode="" :style="{height:(item.zone_code=='SPIKE1')?item.zone_column+'rpx':'',width:200+'rpx'}" ></image> <image :src="item1.goods_img" mode=""
:style="{height:(item.zone_code=='SPIKE1')?item.zone_column+'rpx':'',width:200+'rpx'}">
</image>
</view> </view>
<view class="spike1_item_bottom padding_left"> <view class="spike1_item_bottom padding_left">
<text>US${{item1.promote_price}}</text> <text>US${{item1.promote_price}}</text>
@ -121,7 +132,9 @@
<template v-if="item.zone_code=='GOODSTWO1' && item.zone_status=='NORMAL'"> <template v-if="item.zone_code=='GOODSTWO1' && item.zone_status=='NORMAL'">
<view class="hotSells1_item" v-for="(item1,index1) in item.blocks" :key="item1.block_id"> <view class="hotSells1_item" v-for="(item1,index1) in item.blocks" :key="item1.block_id">
<view class="hotSells1_item_img"> <view class="hotSells1_item_img">
<image :src="item1.block_pic" :style="{height:(item.zone_code=='GOODSTWO1')?item.zone_column+'rpx':''}" mode="" @click="imgTo(item1)"></image> <image :src="item1.block_pic"
:style="{height:(item.zone_code=='GOODSTWO1')?item.zone_column+'rpx':''}" mode=""
@click="imgTo(item1)"></image>
</view> </view>
<text>{{item1.block_title}}</text> <text>{{item1.block_title}}</text>
</view> </view>
@ -129,7 +142,9 @@
<template v-if="item.zone_code=='GOODSTHREE1' && item.zone_status=='NORMAL'"> <template v-if="item.zone_code=='GOODSTHREE1' && item.zone_status=='NORMAL'">
<view class="hotSells2_item" v-for="(item1,index1) in item.blocks" :key="item1.block_id"> <view class="hotSells2_item" v-for="(item1,index1) in item.blocks" :key="item1.block_id">
<view class="hotSells2_item_img"> <view class="hotSells2_item_img">
<image :src="item1.block_pic":style="{height:(item.zone_code=='GOODSTHREE1')?item.zone_column+'rpx':''}" mode="" @click="imgTo(item1)"></image> <image :src="item1.block_pic"
:style="{height:(item.zone_code=='GOODSTHREE1')?item.zone_column+'rpx':''}" mode=""
@click="imgTo(item1)"></image>
</view> </view>
<text>{{item1.block_title}}</text> <text>{{item1.block_title}}</text>
</view> </view>
@ -145,10 +160,13 @@
</view> --> </view> -->
<!-- HOT SELLS 2 --> <!-- HOT SELLS 2 -->
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false" v-if="item.zone_code=='HONLIST2' && item.zone_status=='NORMAL'"> <scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false"
v-if="item.zone_code=='HONLIST2' && item.zone_status=='NORMAL'">
<view class="spike1_item padding_honlist2" v-for="(item1,index1) in item.blocks" :key="item1.block_id"> <view class="spike1_item padding_honlist2" v-for="(item1,index1) in item.blocks" :key="item1.block_id">
<view class="item_img" :style="{width:(item.zone_code=='HONLIST2')?400+'rpx':''}"> <view class="item_img" :style="{width:(item.zone_code=='HONLIST2')?400+'rpx':''}">
<image :src="item1.block_pic" mode="" :style="{height:(item.zone_code=='HONLIST2')?item.zone_column+'rpx':''}"@click="imgTo(item1)"></image> <image :src="item1.block_pic" mode=""
:style="{height:(item.zone_code=='HONLIST2')?item.zone_column+'rpx':''}"
@click="imgTo(item1)"></image>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -162,10 +180,13 @@
</view> --> </view> -->
<!-- HOT SELLS 3 --> <!-- HOT SELLS 3 -->
<scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false" v-if="item.zone_code=='HONLIST3' && item.zone_status=='NORMAL'"> <scroll-view class="spike1 page_padding_left" scroll-x="true" :show-scrollbar="false"
v-if="item.zone_code=='HONLIST3' && item.zone_status=='NORMAL'">
<view class="spike1_item" v-for="(item1,index1) in item.blocks" :key="item1.block_id"> <view class="spike1_item" v-for="(item1,index1) in item.blocks" :key="item1.block_id">
<view class="item_img"> <view class="item_img">
<image :src="item1.block_pic" :style="{height:(item.zone_code=='HONLIST3')?item.zone_column+'rpx':'',width:400+'rpx'}" mode="" @click="imgTo(item1)"></image> <image :src="item1.block_pic"
:style="{height:(item.zone_code=='HONLIST3')?item.zone_column+'rpx':'',width:400+'rpx'}"
mode="" @click="imgTo(item1)"></image>
</view> </view>
<view class="spike1_item_bottom"> <view class="spike1_item_bottom">
<text>{{item1.block_title}}</text> <text>{{item1.block_title}}</text>
@ -207,7 +228,8 @@
</scroll-view> --> </scroll-view> -->
<!-- 瀑布流标题 --> <!-- 瀑布流标题 -->
<view class="index_title1" v-if="item.zone_code=='LIST1' && item.zone_status=='NORMAL'">PRODUCTS FRO YOU</view> <view class="index_title1" v-if="item.zone_code=='LIST1' && item.zone_status=='NORMAL'">PRODUCTS FRO YOU
</view>
<view class="waterfall" v-if="item.zone_code=='LIST1' && item.zone_status=='NORMAL'"> <view class="waterfall" v-if="item.zone_code=='LIST1' && item.zone_status=='NORMAL'">
<custom-waterfalls-flow :value="item.blocks" imageKey="block_pic" @click="imgTo(item1)"> <custom-waterfalls-flow :value="item.blocks" imageKey="block_pic" @click="imgTo(item1)">
@ -235,12 +257,15 @@
</view> </view>
</view> </view>
</view> --> </view> -->
</view> </view>
</template> </template>
<script> <script>
import {defaultRequest,defaultRequest4} from '../../api/index.js' import {
defaultRequest,
defaultRequest4
} from '../../api/index.js'
export default { export default {
data() { data() {
@ -251,9 +276,16 @@
// {text:'DOPE'},{text:'VIDEO'},{text:'MEN'},{text:'KIDS'},{text:'PETS'},{text:'MEN'},{text:'PETS'},{text:'MEN'}, // {text:'DOPE'},{text:'VIDEO'},{text:'MEN'},{text:'KIDS'},{text:'PETS'},{text:'MEN'},{text:'PETS'},{text:'MEN'},
], ],
current: 0, current: 0,
list: [ 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/200x500.png/ff0000',
{ image: 'https://via.placeholder.com/200x200.png/2878ff', title: 'Adidas Yeezy Boost 350 DazzlingBlue Black', desc: 'US$314.00' } 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: {}, indexDate: {},
info: [], info: [],
@ -340,7 +372,10 @@
methods: { methods: {
// //
getIndex() { getIndex() {
let data={_action:'getpagedata',pagecode:'HOME-SALE'} let data = {
_action: 'getpagedata',
pagecode: 'HOME-SALE'
}
defaultRequest(data).then(res => { defaultRequest(data).then(res => {
this.Pet = res.data.page_name this.Pet = res.data.page_name
if (res.error == 0) { if (res.error == 0) {
@ -357,7 +392,8 @@
} }
}) })
defaultRequest({ defaultRequest({
_action:'getpagedata',pagecode:'HOME-SALE' _action: 'getpagedata',
pagecode: 'HOME-SALE'
}).then(res => { }).then(res => {
// console.log(res) // console.log(res)
if (res.error == 0) { if (res.error == 0) {
@ -376,7 +412,9 @@
}) })
}, },
getMes() { getMes() {
let data ={ _action:'getpagedata',pagecode:'006-PERSONALCENTERPAGE' let data = {
_action: 'getpagedata',
pagecode: '006-PERSONALCENTERPAGE'
} }
// let data2 ={ _action:'getpagedata',pagecode:'HOME-SALE'} // let data2 ={ _action:'getpagedata',pagecode:'HOME-SALE'}
@ -400,7 +438,9 @@
getList() { getList() {
// this.sum = uni.getStorageSync('cartSum') // this.sum = uni.getStorageSync('cartSum')
let data={_action:'getcartgoods'} let data = {
_action: 'getcartgoods'
}
defaultRequest4(data).then(res => { defaultRequest4(data).then(res => {
console.info(res) console.info(res)
if (res.error == 0) { if (res.error == 0) {
@ -410,7 +450,11 @@
}) })
let query = { let query = {
_action:'getgoods',type:'promote',order_type:0,page_size:50,page_index:0 _action: 'getgoods',
type: 'promote',
order_type: 0,
page_size: 50,
page_index: 0
} }
defaultRequest(query).then(res => { defaultRequest(query).then(res => {
@ -557,9 +601,6 @@
this.isScrollShow = false this.isScrollShow = false
} }
}, },
} }
</script> </script>
@ -568,86 +609,106 @@
background-color: white; background-color: white;
// position: relative; // position: relative;
} }
.ONEPIC { .ONEPIC {
width: 100%; width: 100%;
height: 100%; height: 100%;
margin: -12rpx 0; margin: -12rpx 0;
image { image {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
} }
.TWOPIC { .TWOPIC {
width: 100%; width: 100%;
display: flex; display: flex;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.THREEPIC { .THREEPIC {
width: 100%; width: 100%;
display: flex; display: flex;
margin: 0; margin: 0;
justify-content: space-between; justify-content: space-between;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.FOURPIC { .FOURPIC {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.FIVEPIC { .FIVEPIC {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.SIXPIC { .SIXPIC {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.body { .body {
// padding-top: 30.33rpx; // padding-top: 30.33rpx;
} }
.uni-navbar { .uni-navbar {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
} }
.nav_left { .nav_left {
image { image {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
&:last-child { &:last-child {
margin-left: 36.67rpx; margin-left: 36.67rpx;
} }
} }
} }
.nav_right { .nav_right {
padding-right: 30rpx; padding-right: 30rpx;
image { image {
width: 44rpx; width: 44rpx;
height: 44rpx; height: 44rpx;
} }
} }
.flex { .flex {
display: flex; display: flex;
} }
.index_logo { .index_logo {
width: 270.33rpx !important; width: 270.33rpx !important;
height: 50rpx !important; height: 50rpx !important;
@ -657,14 +718,17 @@
.isScrollShow { .isScrollShow {
float: right; float: right;
} }
.isScrollShow1 { .isScrollShow1 {
float: left; float: left;
margin-top: 20rpx; margin-top: 20rpx;
width: 60% !important; width: 60% !important;
} }
.isScrollShow2 { .isScrollShow2 {
float: left; float: left;
} }
.isScrollShow3 { .isScrollShow3 {
float: left; float: left;
width: 70rpx; width: 70rpx;
@ -672,18 +736,22 @@
margin-top: 21rpx; margin-top: 21rpx;
margin-left: 20rpx; margin-left: 20rpx;
margin-right: 25rpx; margin-right: 25rpx;
image { image {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
} }
.page_padding { .page_padding {
padding: 0 26.67rpx; padding: 0 26.67rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.page_padding_left { .page_padding_left {
padding-left: 24.67rpx; padding-left: 24.67rpx;
} }
// .navigation1{ // .navigation1{
// position: fixed; // position: fixed;
@ -736,6 +804,7 @@
// background: white; // background: white;
// height: 210rpx; // height: 210rpx;
width: 100%; width: 100%;
.navigation_title { .navigation_title {
display: flex; display: flex;
background-color: #000000; background-color: #000000;
@ -748,12 +817,14 @@
width: 44rpx; width: 44rpx;
height: 44rpx; height: 44rpx;
} }
text { text {
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 800; font-weight: 800;
font-style: italic; font-style: italic;
font-size: 42.67rpx; font-size: 42.67rpx;
} }
.navigation_title_right { .navigation_title_right {
display: flex; display: flex;
align-items: center; align-items: center;
@ -764,6 +835,7 @@
} }
} }
.navigation_seach { .navigation_seach {
width: 100%; width: 100%;
background-color: #F5F6FA; background-color: #F5F6FA;
@ -782,12 +854,14 @@
margin-right: 22rpx; margin-right: 22rpx;
} }
} }
.navigation_scroll { .navigation_scroll {
margin-top: 20rpx; margin-top: 20rpx;
padding-top: 6rpx; padding-top: 6rpx;
padding-bottom: 14rpx; padding-bottom: 14rpx;
background-color: white; background-color: white;
padding-left: 20rpx; padding-left: 20rpx;
.scroll-view_H { .scroll-view_H {
white-space: nowrap; white-space: nowrap;
font-size: 26.67rpx; font-size: 26.67rpx;
@ -807,9 +881,11 @@
font-weight: 600; font-weight: 600;
padding: 28.67rpx 0; padding: 28.67rpx 0;
} }
view:first-child { view:first-child {
margin-left: 0; margin-left: 0;
} }
.scroll_active { .scroll_active {
font-size: 32rpx; font-size: 32rpx;
border-bottom: 2.67rpx solid #000000; border-bottom: 2.67rpx solid #000000;
@ -817,11 +893,13 @@
} }
} }
} }
.uni-margin-wrap { .uni-margin-wrap {
width: 100%; width: 100%;
margin-bottom: 35.33rpx; margin-bottom: 35.33rpx;
.swiper { .swiper {
// height: 320.33rpx; // height: 320.33rpx;
// width: 720rpx; // width: 720rpx;
.swiper-item { .swiper-item {
@ -831,25 +909,31 @@
line-height: 373.33rpx; line-height: 373.33rpx;
text-align: center; text-align: center;
color: white; color: white;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.uni-bg-red { .uni-bg-red {
background-color: red; background-color: red;
} }
.uni-bg-green { .uni-bg-green {
background-color: green; background-color: green;
} }
.uni-bg-blue { .uni-bg-blue {
background-color: blue; background-color: blue;
} }
.uni-bg-black { .uni-bg-black {
background-color: #000000; background-color: #000000;
} }
} }
} }
.grid_swiper { .grid_swiper {
height: 380rpx; height: 380rpx;
@ -888,12 +972,14 @@
} }
} }
} }
.grid_item:nth-child(n+4) { .grid_item:nth-child(n+4) {
margin-right: 0; margin-right: 0;
} }
} }
} }
.discount { .discount {
width: 100%; width: 100%;
height: 239.33rpx; height: 239.33rpx;
@ -920,19 +1006,23 @@
} }
} }
} }
.item_img { .item_img {
width: 100%; width: 100%;
margin-left: 4rpx; margin-left: 4rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.spike1 { .spike1 {
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
margin-bottom: 47.67rpx; margin-bottom: 47.67rpx;
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 0; width: 0;
height: 0; height: 0;
@ -951,14 +1041,17 @@
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
background-color: #999999; background-color: #999999;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.padding_honlist2 { .padding_honlist2 {
margin-right: 280rpx !important; margin-right: 280rpx !important;
} }
.spike1_item_bottom { .spike1_item_bottom {
padding-left: 9.33rpx; padding-left: 9.33rpx;
margin-top: 22.67rpx; margin-top: 22.67rpx;
@ -968,11 +1061,13 @@
font-size: 21.33rpx; font-size: 21.33rpx;
text-decoration: line-through; text-decoration: line-through;
} }
.spike1_item_text1 { .spike1_item_text1 {
color: #9D9D9D; color: #9D9D9D;
font-size: 21.33rpx; font-size: 21.33rpx;
} }
} }
.spike1_item_bottom1 { .spike1_item_bottom1 {
padding-left: 9.33rpx; padding-left: 9.33rpx;
margin-top: 19.33rpx; margin-top: 19.33rpx;
@ -989,10 +1084,12 @@
} }
} }
.spike1_item:last-child { .spike1_item:last-child {
margin-right: 0; margin-right: 0;
} }
} }
.hotSells1 { .hotSells1 {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -1012,17 +1109,20 @@
// // height: 266.67rpx; // // height: 266.67rpx;
// background-color: #999999; // background-color: #999999;
margin-bottom: 23.33rpx; margin-bottom: 23.33rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
} }
.hotSells2_item { .hotSells2_item {
width: 224rpx; width: 224rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-top: 49.33rpx; margin-top: 49.33rpx;
.hotSells2_item_img { .hotSells2_item_img {
// width: 100%; // width: 100%;
// height: 224rpx; // height: 224rpx;
@ -1036,6 +1136,7 @@
} }
} }
} }
.goodsthree2 { .goodsthree2 {
width: 100%; width: 100%;
display: flex; display: flex;
@ -1049,6 +1150,7 @@
background-color: #999999; background-color: #999999;
} }
} }
.index_title1 { .index_title1 {
text-align: center; text-align: center;
position: relative; position: relative;
@ -1056,6 +1158,7 @@
font-weight: bold; font-weight: bold;
margin-top: 116rpx; margin-top: 116rpx;
padding-bottom: 52rpx; padding-bottom: 52rpx;
&:before { &:before {
content: ''; content: '';
background-color: #000000; background-color: #000000;
@ -1067,6 +1170,7 @@
margin-left: -26.67rpx; margin-left: -26.67rpx;
} }
} }
.waterfall { .waterfall {
background-color: #F8F7FB; background-color: #F8F7FB;
padding: 0 25.33rpx; padding: 0 25.33rpx;
@ -1076,6 +1180,7 @@
.item { .item {
padding: 0 16.67rpx; padding: 0 16.67rpx;
padding-bottom: 36.67rpx; padding-bottom: 36.67rpx;
.title { .title {
font-size: 29.33rpx; font-size: 29.33rpx;
font-weight: 400; font-weight: 400;
@ -1083,6 +1188,7 @@
margin-bottom: 32.67rpx; margin-bottom: 32.67rpx;
} }
.desc { .desc {
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
@ -1090,9 +1196,11 @@
} }
} }
.padding_left { .padding_left {
margin-left: 17rpx; margin-left: 17rpx;
} }
.best_item { .best_item {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@ -1109,6 +1217,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background-color: #fff; background-color: #fff;
.best_img { .best_img {
height: 360rpx; height: 360rpx;
width: 360rpx; width: 360rpx;
@ -1118,12 +1227,11 @@
height: 100%; height: 100%;
} }
} }
.best_text { .best_text {
line-height: 40rpx; line-height: 40rpx;
text-align: center; text-align: center;
} }
} }
} }
</style> </style>

165
pages/order/confirmation.vue

@ -28,16 +28,19 @@
</view> </view>
</view> </view>
<view class="info_image img_border"> <view class="info_image img_border">
<image class="info_image_item img_border" :src="item.goods_thumb" v-for="(item,index) in goods_list" :key="index"/> <image class="info_image_item img_border" :src="item.goods_thumb" v-for="(item,index) in goods_list"
:key="index" />
</view> </view>
</view> </view>
<view class="method"> <view class="method">
<view class="method_title">Shipping Method</view> <view class="method_title">Shipping Method</view>
<view class="method_item" v-for="(item,index) in shipping_list " :key="index" @click="cartselectshipping(item.shipping_id)"> <view class="method_item" v-for="(item,index) in shipping_list " :key="index"
@click="cartselectshipping(item.shipping_id)">
<view class="method_item_image" @click="cartselectshipping(item.shipping_id)"> <view class="method_item_image" @click="cartselectshipping(item.shipping_id)">
<image src="../../static/img/select1.png" style="width: 30rpx;height: 30rpx;" v-if="orderId==item.shipping_id"></image> <image src="../../static/img/select1.png" style="width: 30rpx;height: 30rpx;"
v-if="orderId==item.shipping_id"></image>
<image src="../../static/img/select2.png" style="width: 30rpx;height: 30rpx;" v-else></image> <image src="../../static/img/select2.png" style="width: 30rpx;height: 30rpx;" v-else></image>
</view> </view>
@ -131,22 +134,24 @@
<view class="order_popup_pay"> <view class="order_popup_pay">
<view class="pay_item" @click="selectPay(0)"> <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/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> <image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right"> <view class="pay_item_right">
<image src="../../static/img/pay_pal.png" mode=""></image> <image src="../../static/img/pay_pal.png" mode=""></image>
<text>Pay Pal</text> <text>Pay Pal</text>
</view> </view>
</view> </view>
<!-- <view class="pay_item" @click="selectPay(1)"> <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/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> <image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right"> <view class="pay_item_right">
<image src="../../static/img/card.png" mode=""></image> <image src="../../static/img/card.png" mode=""></image>
<text>Credit/Debit Card</text> <text>Credit/Debit Card</text>
</view> </view>
</view> </view>
<view class="pay_item" @click="selectPay(2)"> <!-- <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/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> <image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right"> <view class="pay_item_right">
@ -179,7 +184,8 @@
</view> --> </view> -->
</view> </view>
<view class="mask" @click="isCoupons=false,isPoints= false,popup_index=-1" v-show="(isCoupons && list)||isPoints ||popup_index==0"></view> <view class="mask" @click="isCoupons=false,isPoints= false,popup_index=-1"
v-show="(isCoupons && list)||isPoints ||popup_index==0"></view>
<view class="coupons" v-show="isCoupons"> <view class="coupons" v-show="isCoupons">
<view class="order_popup_title"> <view class="order_popup_title">
@ -203,11 +209,14 @@
</view> </view>
<view> <view>
<view class="select_cop" v-show="current!=index &&item.use==true&& (parseFloat(item.min_goods_amount) < totalnum ||parseFloat(item.min_goods_amount) ==totalnum) && bonus != item.type_money "> <view class="select_cop"
<image src="../../static/icon/flase.png" @click="current=index,useCoupons(index,item)"></image> v-show="current!=index &&item.use==true&& (parseFloat(item.min_goods_amount) < totalnum ||parseFloat(item.min_goods_amount) ==totalnum) && bonus != item.type_money ">
<image src="../../static/icon/flase.png" @click="current=index,useCoupons(index,item)">
</image>
</view> </view>
<view class="select_cop" v-show="current==index|| bonus == item.type_money"> <view class="select_cop" v-show="current==index|| bonus == item.type_money">
<image src="../../static/icon/true.png" @click="current=-1,bonus=0,total.bonus = 0,useCoupons(index,item)"></image> <image src="../../static/icon/true.png"
@click="current=-1,bonus=0,total.bonus = 0,useCoupons(index,item)"></image>
</view> </view>
<button @click="gotoindex()" v-if="item.use==true">Use Now</button> <button @click="gotoindex()" v-if="item.use==true">Use Now</button>
</view> </view>
@ -224,13 +233,17 @@
</view> </view>
<view class="order_popup_points"> <view class="order_popup_points">
<view class="points_item"> <view class="points_item">
<image src="../../static/img/select2.png" mode="" v-if="!use" @click="use=true,nouse=false,Thepoint()"></image> <image src="../../static/img/select2.png" mode="" v-if="!use"
<image src="../../static/img/select1.png" mode="" v-if="use" @click="use=false,nouse=true,Thepoint()"></image> @click="use=true,nouse=false,Thepoint()"></image>
<image src="../../static/img/select1.png" mode="" v-if="use"
@click="use=false,nouse=true,Thepoint()"></image>
<text>Use points</text> <text>Use points</text>
</view> </view>
<view class="points_item"> <view class="points_item">
<image src="../../static/img/select2.png" mode="" v-if="!nouse " @click="nouse=true,use=false,Thepoint()"></image> <image src="../../static/img/select2.png" mode="" v-if="!nouse "
<image src="../../static/img/select1.png" mode="" v-if="nouse" @click="nouse=false,use=true,Thepoint()"></image> @click="nouse=true,use=false,Thepoint()"></image>
<image src="../../static/img/select1.png" mode="" v-if="nouse"
@click="nouse=false,use=true,Thepoint()"></image>
<text>Do not use points</text> <text>Do not use points</text>
</view> </view>
</view> </view>
@ -241,7 +254,8 @@
<text>Items</text> <text>Items</text>
<image src="../../static/img/close1.png" mode="" @click="popup_index=-1"></image> <image src="../../static/img/close1.png" mode="" @click="popup_index=-1"></image>
</view> </view>
<view class="good_info " v-for="(item,index) in goods_list " :key="index" :class="index ==0?'padding-top':''"> <view class="good_info " v-for="(item,index) in goods_list " :key="index"
:class="index ==0?'padding-top':''">
<view class="good_info_left"> <view class="good_info_left">
<view class="good_info_image img_border"> <view class="good_info_image img_border">
<image :src="item.goods_thumb" mode="" class="img_border"></image> <image :src="item.goods_thumb" mode="" class="img_border"></image>
@ -265,7 +279,10 @@
</template> </template>
<script> <script>
import {defaultRequest2,defaultRequest3} from '../../api/index.js' import {
defaultRequest2,
defaultRequest3
} from '../../api/index.js'
export default { export default {
data() { data() {
return { return {
@ -309,8 +326,7 @@
filters: { filters: {
fnum(a, b) { fnum(a, b) {
let tag = false let tag = false
if(parseFloat(a) < parseFloat(b)|| parseFloat(a) == parseFloat(b)) if (parseFloat(a) < parseFloat(b) || parseFloat(a) == parseFloat(b)) {
{
tag = true tag = true
} }
@ -326,8 +342,7 @@
title: 'please add address' title: 'please add address'
}) })
this.isShow = false this.isShow = false
} } else if (this.total.amount != 0 && this.address) {
else if(this.total.amount!=0 && this.address){
this.isShow = true this.isShow = true
} else { } else {
this.isShow = false this.isShow = false
@ -359,7 +374,11 @@
this.total.bonus = item.type_money this.total.bonus = item.type_money
let id = item.bonus_id let id = item.bonus_id
this.bouns_id = item.bonus_id this.bouns_id = item.bonus_id
let data={_action:'cartselectbonus',bonus:id,consignee:this.address} let data = {
_action: 'cartselectbonus',
bonus: id,
consignee: this.address
}
////console.log(data) ////console.log(data)
// defaultRequest3(data,'consignee').then(res=>{ // defaultRequest3(data,'consignee').then(res=>{
// if(res.error==0){ // if(res.error==0){
@ -376,11 +395,11 @@
// } // }
// }) // })
this.total.amount = (parseFloat(total.amount) - parseFloat(this.bonus)).toFixed(2)-(parseFloat(this.Points).toFixed(2)) this.total.amount = (parseFloat(total.amount) - parseFloat(this.bonus)).toFixed(2) - (parseFloat(this
.Points).toFixed(2))
console.log(this.total.amount) console.log(this.total.amount)
} } else {
else{
this.bonus = 0 this.bonus = 0
this.total = uni.getStorageSync('total') this.total = uni.getStorageSync('total')
// this.Thepoint() // this.Thepoint()
@ -397,7 +416,30 @@
let data let data
//////console.log(222) //////console.log(222)
if (this.pay_index == 0) { if (this.pay_index == 0) {
data={_action:'payorder',order_id:id,order_type:'GOODSBUY',payment_method:'paypal'} data = {
_action: 'payorder',
order_id: id,
order_type: 'GOODSBUY',
payment_method: 'paypal'
}
defaultRequest2(data).then(res => {
////////console.info(data,'')
//////console.log(res)
if (res.error == 0) {
// plus.runtime.openURL(res.data.prepay_data.checkoutnow_url)
// this.src = res.data.prepay_data.checkoutnow_url
uni.navigateTo({
url: './paypalWebview?src=' + res.data.prepay_data.checkoutnow_url
})
}
})
} else if (this.pay_index == 1) {
data = {
_action: 'payorder',
order_id: id,
order_type: 'GOODSBUY',
payment_method: 'oceanpay'
}
defaultRequest2(data).then(res => { defaultRequest2(data).then(res => {
////////console.info(data,'') ////////console.info(data,'')
//////console.log(res) //////console.log(res)
@ -407,12 +449,15 @@
uni.navigateTo({ uni.navigateTo({
url: './paypalWebview?src=' + res.data.prepay_data.checkoutnow_url url: './paypalWebview?src=' + res.data.prepay_data.checkoutnow_url
}) })
} }
}) })
} else { } else {
data={_action:'payorder',order_id:id,order_type:'GOODSBUY',payment_method:'alipay.native'} data = {
_action: 'payorder',
order_id: id,
order_type: 'GOODSBUY',
payment_method: 'alipay.native'
}
defaultRequest2(data).then(res => { defaultRequest2(data).then(res => {
//////console.info(res,'') //////console.info(res,'')
if (res.error == 0) { if (res.error == 0) {
@ -423,13 +468,15 @@
success: function(res) { success: function(res) {
////////console.log('success:' + JSON.stringify(res)); ////////console.log('success:' + JSON.stringify(res));
uni.redirectTo({ uni.redirectTo({
url: 'paySuccess?type=0&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) { fail: function(err) {
////////console.log('fail:' + JSON.stringify(err)); ////////console.log('fail:' + JSON.stringify(err));
uni.redirectTo({ uni.redirectTo({
url: 'paySuccess?type=1&order_id='+id+'&will_get_integral='+will_get_integral url: 'paySuccess?type=1&order_id=' + id +
'&will_get_integral=' + will_get_integral
}); });
} }
}); });
@ -452,8 +499,7 @@
this.Points = this.total.amount - this.bonus this.Points = this.total.amount - this.bonus
this.total.amount = 0 this.total.amount = 0
} } else if (parseFloat(this.count) < this.total.amount) {
else if(parseFloat(this.count) < this.total.amount){
let i = (this.total.amount - parseFloat(this.count)).toFixed(2) let i = (this.total.amount - parseFloat(this.count)).toFixed(2)
this.Points = this.count this.Points = this.count
@ -480,8 +526,7 @@
//////console.log(this.Points) //////console.log(this.Points)
this.total.amount = 0 this.total.amount = 0
} } else if (parseFloat(this.count) < this.total.amount) {
else if(parseFloat(this.count) < this.total.amount){
let i = (this.total.amount - parseFloat(this.count)).toFixed(2) let i = (this.total.amount - parseFloat(this.count)).toFixed(2)
// this.total.amount = i // this.total.amount = i
this.Points = this.count this.Points = this.count
@ -525,7 +570,13 @@
// //
cartselectshipping(id) { cartselectshipping(id) {
// let data={_action:'cartselectshipping',shipping_id:id,consignee:this.address} // let data={_action:'cartselectshipping',shipping_id:id,consignee:this.address}
let data={_action:'cartselectshipping',shipping_id:id,consignee:{country:'4191'}} let data = {
_action: 'cartselectshipping',
shipping_id: id,
consignee: {
country: '4191'
}
}
defaultRequest3(data, 'consignee').then(res => { defaultRequest3(data, 'consignee').then(res => {
console.log(data) console.log(data)
console.info(res) console.info(res)
@ -572,7 +623,9 @@
} }
}) })
// //
let data={_action:'getuserbonus'} let data = {
_action: 'getuserbonus'
}
var time = new Date(); var time = new Date();
var today = time.toLocaleString() var today = time.toLocaleString()
@ -608,9 +661,7 @@
} }
this.bonus = max this.bonus = max
this.isusebonus = 1 this.isusebonus = 1
} } else if (list2.length == 0) {
else if(list2.length == 0){
this.isusebonus = 0 this.isusebonus = 0
} }
@ -665,8 +716,7 @@
if (i == 3) { if (i == 3) {
if (this.count > 0) { if (this.count > 0) {
this.isPoints = true this.isPoints = true
} } else {
else{
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: 'Points cannot be used for this product' title: 'Points cannot be used for this product'
@ -685,8 +735,7 @@
icon: 'none', icon: 'none',
title: 'please add address' title: 'please add address'
}) })
} } else if (!this.orderId || this.tag == 0) {
else if(!this.orderId||this.tag ==0){
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: 'please select shipping method' title: 'please select shipping method'
@ -770,6 +819,7 @@
padding-top: 50.67rpx; padding-top: 50.67rpx;
padding-bottom: 42.67rpx; padding-bottom: 42.67rpx;
border-bottom: 14.67rpx #F6F5FA solid; border-bottom: 14.67rpx #F6F5FA solid;
.info_title { .info_title {
display: flex; display: flex;
align-items: center; align-items: center;
@ -788,9 +838,11 @@
} }
} }
} }
.info_image { .info_image {
display: flex; display: flex;
margin-top: 26.67rpx; margin-top: 26.67rpx;
.info_image_item { .info_image_item {
width: 133.33rpx; width: 133.33rpx;
height: 133.33rpx; height: 133.33rpx;
@ -799,6 +851,7 @@
} }
} }
} }
.method { .method {
border-bottom: 14.67rpx #F6F5FA solid; border-bottom: 14.67rpx #F6F5FA solid;
padding-top: 50rpx; padding-top: 50rpx;
@ -808,6 +861,7 @@
font-weight: bold; font-weight: bold;
padding-left: 25.33rpx; padding-left: 25.33rpx;
} }
.method_item { .method_item {
padding: 41.33rpx 0; padding: 41.33rpx 0;
border-bottom: 1px #E2E2E2 solid; border-bottom: 1px #E2E2E2 solid;
@ -819,9 +873,11 @@
&:last-child { &:last-child {
border-bottom: none; border-bottom: none;
} }
.method_item_image { .method_item_image {
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -830,6 +886,7 @@
.method_item_right { .method_item_right {
margin-left: 30.67rpx; margin-left: 30.67rpx;
.item_price { .item_price {
font-size: 28rpx; font-size: 28rpx;
margin-bottom: 14rpx; margin-bottom: 14rpx;
@ -838,9 +895,11 @@
color: #B22234; color: #B22234;
} }
} }
.item_time { .item_time {
font-size: 25.33rpx; font-size: 25.33rpx;
font-weight: 400; font-weight: 400;
.item_time_span { .item_time_span {
color: #555555; color: #555555;
} }
@ -848,6 +907,7 @@
} }
} }
} }
.discount { .discount {
border-bottom: 14.67rpx #F6F5FA solid; border-bottom: 14.67rpx #F6F5FA solid;
padding-left: 26rpx; padding-left: 26rpx;
@ -861,6 +921,7 @@
justify-content: space-between; justify-content: space-between;
font-size: 28rpx; font-size: 28rpx;
margin-bottom: 42rpx; margin-bottom: 42rpx;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
@ -870,6 +931,7 @@
color: #666666; color: #666666;
} }
} }
.discount_item_right { .discount_item_right {
display: flex; display: flex;
align-items: center; align-items: center;
@ -882,6 +944,7 @@
} }
} }
} }
.settlement { .settlement {
border-bottom: 14.67rpx #F6F5FA solid; border-bottom: 14.67rpx #F6F5FA solid;
padding: 44rpx 26rpx; padding: 44rpx 26rpx;
@ -892,19 +955,23 @@
justify-content: space-between; justify-content: space-between;
font-size: 28rpx; font-size: 28rpx;
margin-bottom: 44rpx; margin-bottom: 44rpx;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
.settlement_item_right { .settlement_item_right {
color: #3C3B6E; color: #3C3B6E;
font-weight: bold; font-weight: bold;
} }
.settlement_item_right1 { .settlement_item_right1 {
color: #B22234; color: #B22234;
font-weight: bold; font-weight: bold;
} }
} }
} }
.total { .total {
padding: 30.67rpx 0; padding: 30.67rpx 0;
padding-left: 26rpx; padding-left: 26rpx;
@ -933,6 +1000,7 @@
margin: 0; margin: 0;
} }
} }
// //
.coupons { .coupons {
z-index: 999; z-index: 999;
@ -950,9 +1018,11 @@
font-size: 30.67rpx; font-size: 30.67rpx;
font-weight: 400; font-weight: 400;
padding-bottom: 17.67rpx; padding-bottom: 17.67rpx;
.margin_top { .margin_top {
margin-top: 80rpx; margin-top: 80rpx;
} }
.order_popup_title { .order_popup_title {
position: fixed; position: fixed;
width: 100%; width: 100%;
@ -972,6 +1042,7 @@
// padding-top: 44.67rpx; // padding-top: 44.67rpx;
padding-bottom: 20.67rpx; padding-bottom: 20.67rpx;
text-align: center; text-align: center;
image { image {
width: 21.33rpx; width: 21.33rpx;
height: 21.33rpx; height: 21.33rpx;
@ -981,15 +1052,18 @@
} }
} }
.select_cop { .select_cop {
height: 50rpx; height: 50rpx;
width: 50rpx; width: 50rpx;
margin: 0rpx 0rpx 15rpx 80rpx; margin: 0rpx 0rpx 15rpx 80rpx;
image { image {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
} }
.order_popup_points { .order_popup_points {
padding-bottom: 40rpx; padding-bottom: 40rpx;
@ -997,13 +1071,16 @@
padding-top: 47rpx; padding-top: 47rpx;
font-size: 28rpx; font-size: 28rpx;
text-align: center; text-align: center;
.points_item { .points_item {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 40rpx; margin-bottom: 40rpx;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
&:first-child { &:first-child {
margin-top: 60rpx; margin-top: 60rpx;
} }

65
pages/order/details.vue

@ -175,8 +175,10 @@
<view class="details_footer" v-if="details_index!=1"> <view class="details_footer" v-if="details_index!=1">
<button class="white" v-if=" details_index==2||details_index==3" @click="goLogistics">LOGISTICS</button> <button class="white" v-if=" details_index==2||details_index==3" @click="goLogistics">LOGISTICS</button>
<button class="white" v-if="details_index==4 || details_index==3" @click.stop="openTips(1)">DELETE ORDER</button> <button class="white" v-if="details_index==4 || details_index==3" @click.stop="openTips(1)">DELETE
<button class="black" v-if="details_index==3 && goodsDate.comment_status_code==0" @click="goComment()">COMMENT</button> ORDER</button>
<button class="black" v-if="details_index==3 && goodsDate.comment_status_code==0"
@click="goComment()">COMMENT</button>
<button class="white" v-if="details_index==0 " @click.stop="openTips(0)">CANCEL ORDER</button> <button class="white" v-if="details_index==0 " @click.stop="openTips(0)">CANCEL ORDER</button>
<button class="black" v-if="details_index==0" @click="isPay=true">PAY NOW</button> <button class="black" v-if="details_index==0" @click="isPay=true">PAY NOW</button>
@ -195,22 +197,24 @@
</view> </view>
<view class="order_popup_pay"> <view class="order_popup_pay">
<view class="pay_item" @click="selectPay(0)"> <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/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> <image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right"> <view class="pay_item_right">
<image src="../../static/img/pay_pal.png" mode=""></image> <image src="../../static/img/pay_pal.png" mode=""></image>
<text>Pay Pal</text> <text>Pay Pal</text>
</view> </view>
</view> </view>
<!-- <view class="pay_item" @click="selectPay(1)"> <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/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> <image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right"> <view class="pay_item_right">
<image src="../../static/img/card.png" mode=""></image> <image src="../../static/img/card.png" mode=""></image>
<text>Credit/Debit Card</text> <text>Credit/Debit Card</text>
</view> </view>
</view> </view>
<view class="pay_item" @click="selectPay(2)"> <!-- <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/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> <image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right"> <view class="pay_item_right">
@ -231,14 +235,17 @@
</view> </view>
<!-- 删除取消弹框 --> <!-- 删除取消弹框 -->
<uni-popup ref="alertDialog" type="dialog"> <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-dialog type="error" cancelText="Close" :confirmText="tipsBut" title="Tips" :content="tipsInfo"
@confirm="dialogConfirm"></uni-popup-dialog>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
<script> <script>
import {defaultRequest2} from '../../api/index.js' import {
defaultRequest2
} from '../../api/index.js'
export default { export default {
data() { data() {
return { return {
@ -290,7 +297,8 @@
openTips(type) { openTips(type) {
this.tipsType = type this.tipsType = type
if (type == 0) { if (type == 0) {
this.tipsInfo='Are you sure you want to cancel this order? This order will be regarded as invalid after cancellation' this.tipsInfo =
'Are you sure you want to cancel this order? This order will be regarded as invalid after cancellation'
this.tipsBut = 'CancelOrder' this.tipsBut = 'CancelOrder'
this.cancelQuery._action = 'cancelorder' this.cancelQuery._action = 'cancelorder'
} else if (type == 1) { } else if (type == 1) {
@ -334,7 +342,12 @@
getPayDate() { getPayDate() {
console.log(this.pay_index) console.log(this.pay_index)
if (this.pay_index == 0) { if (this.pay_index == 0) {
let data ={_action:'payorder',order_id:this.payQuery.order_id,order_type:'GOODSBUY',payment_method:'paypal'} let data = {
_action: 'payorder',
order_id: this.payQuery.order_id,
order_type: 'GOODSBUY',
payment_method: 'paypal'
}
defaultRequest2(data).then(res => { defaultRequest2(data).then(res => {
console.info(data) console.info(data)
console.log(res) console.log(res)
@ -345,11 +358,28 @@
uni.navigateTo({ uni.navigateTo({
url: './paypalWebview?src=' + res.data.prepay_data.checkoutnow_url url: './paypalWebview?src=' + res.data.prepay_data.checkoutnow_url
}) })
} }
}) })
} else if(this.pay_index == 1) {
let data = {
_action: 'payorder',
order_id: this.payQuery.order_id,
order_type: 'GOODSBUY',
payment_method: 'oceanpay'
}
defaultRequest2(data).then(res => {
console.info(data)
console.log(res)
if (res.error == 0) {
if (res.data.need_pay_amount == 0) return
// plus.runtime.openURL(res.data.prepay_data.checkoutnow_url)
// this.src = res.data.prepay_data.checkoutnow_url
uni.navigateTo({
url: './paypalWebview?src=' + res.data.prepay_data.checkoutnow_url
})
} }
else{ })
} else {
console.info(this.payQuery, '支付宝') console.info(this.payQuery, '支付宝')
defaultRequest2(this.payQuery).then(res => { defaultRequest2(this.payQuery).then(res => {
console.info(res, '支付宝') console.info(res, '支付宝')
@ -394,7 +424,11 @@
}) })
}, },
getLogistics() { getLogistics() {
let data ={_action:'getlogisticsinfo',order_id:this.goodsDate.order_id,order_sn:''} let data = {
_action: 'getlogisticsinfo',
order_id: this.goodsDate.order_id,
order_sn: ''
}
defaultRequest2(data).then(res => { defaultRequest2(data).then(res => {
console.info(res) console.info(res)
if (res.error == 0) { if (res.error == 0) {
@ -435,11 +469,10 @@
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/common/scss/order.scss"; @import "@/common/scss/order.scss";
page{
} page {}
.body { .body {
padding-bottom: 130rpx; padding-bottom: 130rpx;
} }
</style> </style>

28
project.config.json

@ -0,0 +1,28 @@
{
"appid": "wxd0df8d643cab9cca",
"compileType": "miniprogram",
"libVersion": "2.27.3",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"coverView": true,
"es6": true,
"postcss": true,
"minified": true,
"enhance": true,
"showShadowRootInWxmlPanel": true,
"packNpmRelationList": [],
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 4
}
}

7
project.private.config.json

@ -0,0 +1,7 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "s",
"setting": {
"compileHotReLoad": true
}
}
Loading…
Cancel
Save