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>
import {defaultRequest,defaultRequest4} from 'api/index.js'
import {
defaultRequest,
defaultRequest4
} from 'api/index.js'
var jpushModule = uni.requireNativePlugin("JG-JPush");
export default {
data() {
return {
globalData:{
},
backButtonPress: 0,
}
},
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')
uni.hideTabBar()
// uni.onTabBarMidButtonTap(()=>{
@ -19,9 +65,9 @@
// animationType:'slide-in-bottom'
// })
// })
plus.screen.lockOrientation("portrait-primary");
// plus.screen.lockOrientation("portrait-primary");
setTimeout(() => {
plus.navigator.closeSplashscreen();
// plus.navigator.closeSplashscreen();
}, 2400);
//#ifdef APP-PLUS
@ -89,9 +135,9 @@
</script>
<style lang="scss">
/*每个页面公共css */
@import "@/common/common.scss";
page {
overflow-x: hidden;
}

12
api/index.js

@ -1,6 +1,7 @@
import httpRequest from './request';
//默认请求地址
export const defaultRequest =query=>{
return httpRequest({
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 { 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 cryptoJS from "crypto-js"
@ -47,7 +51,9 @@ const httpRequest = (params) => {
let data2 = JSON.parse(decryptDes(data, "6780f04cf2e211ec86a8005056c00008"))
// console.info(data2)
let data1={data:data}
let data1 = {
data: data
}
let httpOptions = {
url: config.apiUri + params.url,
@ -59,6 +65,8 @@ const httpRequest = (params) => {
}
};
return new Promise((resolve, reject) => {
uni.request({
...httpOptions,
success: res => {
@ -92,6 +100,9 @@ const httpRequest = (params) => {
reject(err);
}
})
})
}

1
common/common.scss

@ -24,7 +24,6 @@
.tarbar_img image {
height: 50rpx;
width: 50rpx;
// background-color: #fff;
}
.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 store from '@/store/store.js'
import ios from '@/ios/index.js'
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App,
store
store,
ios
})

7
manifest.json

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

11
pages.json

@ -381,6 +381,7 @@
//
"bounce": "none",
"usingComponents" : false,
// "subPackages": true,
"optimization": {
"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 class="font">
<!-- <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 class="text_item">
Once you deactivate account, your account information will no longer be accessible.
@ -129,11 +129,11 @@
display: flex;
background-color:#000000;
color:white;
height: 100rpx;
height: 42px;
line-height: 100rpx;
text-align: center;
padding-top:50rpx;
padding-left:20rpx;
padding-top: 20px;
// padding-left:20rpx;
font-size: 20px;
font-weight: bold;
}

114
pages/account/message.vue

@ -2,7 +2,9 @@
<view class="body">
<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>
</view>
@ -15,7 +17,47 @@
</view>
<view class="mask" v-show="isShwo" @click="isShwo=false"></view>
<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 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>
<script>
@ -251,4 +293,74 @@
background-color: white;
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>

182
pages/account/myOrders.vue

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

164
pages/category/productList.vue

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

10
pages/index/address.vue

@ -3,7 +3,7 @@
<view class="body">
<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;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>
</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>
</view> -->
<view class="address1"></view>
<view style="padding-top: 40rpx;">
<view style="padding-top: 5px;">
<view v-for ="(item,index) in list " :key="index" >
<text class="color_red">{{ item.title}}</text>
<view class="address" v-for="(item1,index1) in item.sur_name" :key="item1.name" >
@ -150,15 +150,15 @@ async onLoad() {
display: flex;
position: fixed;
background-color: #000;
height: 100rpx;
width: 100%;
z-index: 999;
padding-top: 50rpx;
height: 42px;
padding-top: 20px;
text-align: center;
top:0;
left: 0;
font-size: 20px;
font-weight: bold;
/* font-weight: bold; */
}
.address1{
height: 50rpx;

54
pages/index/index.vue

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

182
pages/index/index2.vue

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

165
pages/order/confirmation.vue

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

65
pages/order/details.vue

@ -175,8 +175,10 @@
<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==4 || details_index==3" @click.stop="openTips(1)">DELETE 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==4 || details_index==3" @click.stop="openTips(1)">DELETE
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="black" v-if="details_index==0" @click="isPay=true">PAY NOW</button>
@ -195,22 +197,24 @@
</view>
<view class="order_popup_pay">
<view class="pay_item" @click="selectPay(0)">
<image src="../../static/img/select1.png" mode="" class="pay_item_select" v-if="pay_index==0"></image>
<image src="../../static/img/select1.png" mode="" class="pay_item_select" v-if="pay_index==0">
</image>
<image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right">
<image src="../../static/img/pay_pal.png" mode=""></image>
<text>Pay Pal</text>
</view>
</view>
<!-- <view class="pay_item" @click="selectPay(1)">
<image src="../../static/img/select1.png" mode="" class="pay_item_select" v-if="pay_index==1"></image>
<view class="pay_item" @click="selectPay(1)">
<image src="../../static/img/select1.png" mode="" class="pay_item_select" v-if="pay_index==1">
</image>
<image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right">
<image src="../../static/img/card.png" mode=""></image>
<text>Credit/Debit Card</text>
</view>
</view>
<view class="pay_item" @click="selectPay(2)">
<!-- <view class="pay_item" @click="selectPay(2)">
<image src="../../static/img/select1.png" mode="" class="pay_item_select" v-if="pay_index==2"></image>
<image src="../../static/img/select2.png" mode="" class="pay_item_select" v-else></image>
<view class="pay_item_right">
@ -231,14 +235,17 @@
</view>
<!-- 删除取消弹框 -->
<uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog type="error" cancelText="Close" :confirmText="tipsBut" title="Tips" :content="tipsInfo" @confirm="dialogConfirm" ></uni-popup-dialog>
<uni-popup-dialog type="error" cancelText="Close" :confirmText="tipsBut" title="Tips" :content="tipsInfo"
@confirm="dialogConfirm"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
import {defaultRequest2} from '../../api/index.js'
import {
defaultRequest2
} from '../../api/index.js'
export default {
data() {
return {
@ -290,7 +297,8 @@
openTips(type) {
this.tipsType = type
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.cancelQuery._action = 'cancelorder'
} else if (type == 1) {
@ -334,7 +342,12 @@
getPayDate() {
console.log(this.pay_index)
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(data)
console.log(res)
@ -345,11 +358,28 @@
uni.navigateTo({
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, '支付宝')
defaultRequest2(this.payQuery).then(res => {
console.info(res, '支付宝')
@ -394,7 +424,11 @@
})
},
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 => {
console.info(res)
if (res.error == 0) {
@ -435,11 +469,10 @@
<style lang="scss" scoped>
@import "@/common/scss/order.scss";
page{
}
page {}
.body {
padding-bottom: 130rpx;
}
</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