Browse Source

2022-8-17

cmy 2 years ago
parent
commit
d9a4acbe63
10 changed files with 1215 additions and 684 deletions
  1. 24 0
      api/order.js
  2. 2 2
      manifest.json
  3. 14 0
      pages.json
  4. 64 65
      pages/index/bazaar.vue
  5. 433 346
      pages/money/pay.vue
  6. 2 2
      pages/order/order.vue
  7. 650 0
      pages/order/orderSC.vue
  8. 0 217
      pages/shoping/userinfo.vue
  9. 26 52
      pages/user/user.vue
  10. BIN
      static/user/user13.png

+ 24 - 0
api/order.js

@@ -185,3 +185,27 @@ export function computedOrderkey(data) {
 		data
 	});
 }
+// 市场订单
+export function nftOrder(data) {
+	return request({
+		url: '/api/nft/order/my',
+		method: 'get',
+		data
+	});
+}
+//取消订单
+export function nftCancel(data,id) {
+	return request({
+		url: '/api/nft/cancel/' + id,
+		method: 'post',
+		data
+	});
+}
+//支付订单
+export function nftPay(data,id) {
+	return request({
+		url: '/api/nft/pay/' + id,
+		method: 'post',
+		data
+	});
+}

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "艺绘",
     "appid" : "__UNI__E01ACD1",
     "description" : "",
-    "versionName" : "1.0.7",
-    "versionCode" : 107,
+    "versionName" : "1.0.8",
+    "versionCode" : 108,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */

+ 14 - 0
pages.json

@@ -501,6 +501,17 @@
 				}
 			}
 		},
+		{
+			"path": "pages/order/orderSC",
+			"style": {
+				"navigationBarTitleText": "市场未付",
+				"navigationBarBackgroundColor": "#111111",
+				"navigationBarTextStyle": "white", 
+				"app-plus": {
+					"bounce": "none"
+				}
+			}
+		},
 		{
 			"path": "pages/order/expressInfo",
 			"style": {
@@ -722,6 +733,9 @@
 				"navigationBarTitleText": "市场",
 				"navigationBarBackgroundColor": "#111111",
 				"navigationBarTextStyle": "white", 
+				// #ifndef MP-WEIXIN
+				"navigationStyle": "custom",
+				// #endif
 				"enablePullDownRefresh": false
 			}
 

+ 64 - 65
pages/index/bazaar.vue

@@ -1,19 +1,14 @@
 <template>
 	<view class="container">
 		<view class="top">
-			<!-- <image class="top-bg" src="../../static/img/top-bg.png" mode=""></image> -->
-			<view class="top-main flex">
-				<view class="search-box flex" @click="clickSearch()">
-					<image class="search" src="../../static/icon/search-h.png" mode=""></image>
-					<view class="search-font">输入关键词搜索</view>
+			<view class="vheight"></view>
+			<view class="input-box flex">
+				<view class="input-content flex">
+					<view class="iconfont iconsearch"></view>
+					<view class="input"><input type="text" v-model="keyword" placeholder="请输入搜索内容" /></view>
 				</view>
+				<view class="input-button flex" @click="searchNew"><text>搜索</text></view>
 			</view>
-			<!-- <swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange">
-				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"
-					@click="bannerNavToUrl(item)">
-					<image :src="item.pic" />
-				</swiper-item>
-			</swiper> -->
 		</view>
 		<view class="box">
 			<view class="box-title">
@@ -40,44 +35,8 @@
 					</view>
 				</view>
 			</view>
-			<!-- <view class="box-content">
-				<view class="img">
-					<image src="../../static/index/nvwang.png" mode=""></image>
-				</view>
-				<view class="content-title">
-					<view class="">
-						黑道女王
-					</view>
-					<view class="text">
-						黑道研究会 发行
-					</view>
-					<view class="text">
-						发行数量: 14521份
-					</view>
-				</view>
-			</view> -->
 		</view>
 		<view class="btm" style="height: 44px;"></view>
-
-
-		<!-- 客服 -->
-		<!-- <uni-popup ref="popupkf" type="center">
-			<view class="popup-box">
-				<view class="img"><image src="../../static/img/img009.png" mode=""></image></view>
-				<view class="mian">
-					<view class="delivery">
-						<view class="title">已经为您定制专属客服</view>
-						<image src="../../static/img/img010.png" mode=""></image>
-					</view>
-					<view class="nocancel">客服VX:{{ text }}</view>
-					<view class="comfirm-box">
-						<view class="cancel" @click="kfClose()">取消</view>
-						<view class="comfirm" @click="comfirm(text)">复制微信</view>
-					</view>
-				</view>
-			</view>
-		</uni-popup> -->
-
 	</view>
 </template>
 
@@ -106,17 +65,6 @@
 	export default {
 		data() {
 			return {
-				isSc:1,//是否是市场
-				text: '',
-				checkid: 0,
-				titleNViewBackground: '',
-				longitude: 0, //经度
-				latitude: 0, //纬度
-				swiperCurrent: 0,
-				swiperLength: 0,
-				carouselList: [], //轮播列表
-				bastList: [], //会员礼包
-				integralList: [], //兑换专区
 				list: [], //卡片信息
 				page: 1,
 				limit: 10,
@@ -124,7 +72,8 @@
 				text: [],
 				article: [],
 				page:1,
-				limit:10
+				limit:10,
+				keyword:'',//搜索内容
 			};
 		},
 		computed: {
@@ -154,7 +103,8 @@
 				let obj = this
 				nftmall({
 					page:obj.page,
-					limit:obj.limit
+					limit:obj.limit,
+					key_word:obj.keyword
 				}).then(res => {
 					// console.log(res, 'res');
 					obj.list = res.data.list
@@ -164,6 +114,11 @@
 
 				})
 			},
+			// 搜索
+			searchNew(){
+				this.page=1;
+				this.loadIndex()
+			},
 			getProduct() {
 				let obj = this
 				getProducts().then(res => {
@@ -177,7 +132,7 @@
 			buy(item) {
 				console.log(item, 'res');
 				uni.navigateTo({
-					url: '/pages/product/product?id=' + item.id+'&isSc='+this.isSc
+					url: '/pages/product/product?id=' + item.id+'&isSc=1'
 				})
 			},
 			navTo(url) {
@@ -206,12 +161,20 @@
 		height: 100%;
 		background: #111111;
 	}
-
+.container{
+	/* #ifdef H5 */
+	padding-top: 100rpx;
+	/* #endif */
+	/* #ifdef APP */
+	padding-top: calc(100rpx + var(--status-bar-height)) ;
+	/* #endif */
+}
 	.top {
-		position: relative;
+		position: fixed;
+		z-index: 9999;
+		top: 0;
+		left: 0;
 		width: 100%;
-		// height: 360rpx;
-
 		.top-bg {
 			position: absolute;
 			top: 0;
@@ -459,4 +422,40 @@
 			}
 		}
 	}
+	.vheight{
+		height: var(--status-bar-height);
+		background-color: #111111;
+	}
+	.input-box {
+		padding: 25rpx;
+		background-color: #111111;
+		height: 44px;
+		.iconsearch {
+			font-size: 50rpx;
+		}
+		.leftIcon{
+			padding-right: 10px;
+			.icon{
+				width: 20px;
+			}
+		}
+		.input-content {
+			border-radius: 99rpx;
+			flex-grow: 1;
+			padding: 10rpx 30rpx;
+			background-color: rgba(231, 231, 231, 0.7);
+			.input {
+				flex-grow: 1;
+				input {
+					font-size: $font-lg;
+				}
+			}
+		}
+		.input-button {
+			padding-left: 20rpx;
+			font-size: $font-lg;
+			height: 100%;
+			color: #FFFFFF;
+		}
+	}
 </style>

+ 433 - 346
pages/money/pay.vue

@@ -5,7 +5,6 @@
 			<text class="price">{{ money }}</text>
 		</view>
 		<view class="pay-type-list">
-			<!-- v-if="ispg == 'android'" -->
 			<!-- #ifdef APP-PLUS -->
 			<!-- <view class="type-item b-b" @click="changePayType(1)">
 				<text class="icon iconfont iconweixin"></text>
@@ -18,7 +17,9 @@
 			<view class="type-item b-b" @click="changePayType(2)">
 				<text class="icon iconfont iconzhifubao"></text>
 				<view class="con"><text class="tit">支付宝支付</text></view>
-				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 2"></radio></label>
+				<label class="radio">
+					<radio value="" color="#5dbc7c" :checked="payType == 2"></radio>
+				</label>
 			</view>
 			<!-- #endif -->
 			<view class="type-item" @click="changePayType(3)">
@@ -27,7 +28,9 @@
 					<text class="tit">余额支付</text>
 					<text>可用余额 ¥{{ now_money }}</text>
 				</view>
-				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 3"></radio></label>
+				<label class="radio">
+					<radio value="" color="#5dbc7c" :checked="payType == 3"></radio>
+				</label>
 			</view>
 		</view>
 		<text class="mix-btn" :class="{ clickbg: payLoding }" @click="!payLoding ? confirm() : ''">确认支付</text>
@@ -35,394 +38,478 @@
 </template>
 
 <script>
-import { balance } from '@/api/wallet.js';
-import { createOrderkey, computedOrderkey, orderPay } from '@/api/order.js';
-import { mapState } from 'vuex';
-import { isIOS } from '@/utils/platform.js';
-export default {
-	data() {
-		return {
-			payType: 3, //支付类型
-			payName: 'yue',
-			orderInfo: {},
-			money: 0.0, //订单金额
-			now_money: 0.0, //余额
-			orderKey: '',
-			orderId: '', //保存订单id
-			payLoding: false, //判断是否支付中
-			type: '', //判断是否从订单中进入
+	import {
+		balance
+	} from '@/api/wallet.js';
+	import {
+		createOrderkey,
+		computedOrderkey,
+		orderPay,
+		nftPay
+	} from '@/api/order.js';
+	import {
+		mapState
+	} from 'vuex';
+	import {
+		isIOS
+	} from '@/utils/platform.js';
+	export default {
+		data() {
+			return {
+				payType: 3, //支付类型
+				payName: 'yue',
+				orderInfo: {},
+				money: 0.0, //订单金额
+				now_money: 0.0, //余额
+				orderKey: '',
+				orderId: '', //保存订单id
+				payLoding: false, //判断是否支付中
+				type: '', //1为已创建过订单2为未创建过订单
+				// #ifdef H5
+				froms: '', //保存h5中数据来源对象
+				// #endif
+				pinkid: '', //保存拼团商品id
+				orderType: 1 //1为普通订单2为市场订单
+			};
+		},
+		computed: {
 			// #ifdef H5
-			froms: '', //保存h5中数据来源对象
+			...mapState(['weichatObj'])
 			// #endif
-			pinkid: '', //保存拼团商品id
-			ispg: '' //是否是苹果
-		};
-	},
-	computed: {
-		// #ifdef H5
-		...mapState(['weichatObj'])
-		// #endif
-	},
-	onLoad(options) {
-		console.log(options, 'options');
-		this.ispg = uni.getSystemInfoSync().platform;
-		console.log(this.ispg);
-		if (options.type == 1) {
-			this.type = 1;
-			this.orderId = options.ordid;
-			this.money = options.money;
-		} else {
-			this.orderKey = options.key;
-			let prepage = this.$api.prePage();
-			computedOrderkey({
-				orderkey: this.orderKey,
-				couponId: prepage.couponChecked.id, //优惠券编号
-				addressId: prepage.addressData.id, //地址编号
-				useIntegral: prepage.checkedPoints ? 1 : 0
-			}).then(({ data }) => {
-				// 获取支付金额
-				this.money = data.result.pay_price;
-			});
-		}
-		// 保存pinkid
-		if (options.pinkid) {
-			this.pinkid = options.pinkid;
-		}
-		// 载入余额
-		balance({}).then(({ data }) => {
-			// 获取余额
-			this.now_money = data.now_money;
-		});
-	},
-	methods: {
-		//选择支付方式
-		changePayType(type) {
-			this.payType = type;
-			if (this.payType == 1) {
-				this.payName = 'weixin';
+		},
+		onLoad(options) {
+			console.log(options, 'options');
+			this.type = options.type;
+			this.orderType = options.orderType;
+			// 是否已经创建过订单
+			if (options.type == 1) {
+				this.orderId = options.ordid;
+				this.money = options.money;
 			}
-			if (this.payType == 2) {
-				this.payName = 'ali';
+			// 判断是否市场订单
+			if(this.orderType=2){
+				this.orderId = options.ordid;
 			}
-			if (this.payType == 3) {
-				this.payName = 'yue';
+			// 判断是否未创建过订单
+			if (options.type == 2) {
+				this.orderKey = options.key;
+				let prepage = this.$api.prePage();
+				computedOrderkey({
+					orderkey: this.orderKey,
+					couponId: prepage.couponChecked.id, //优惠券编号
+					addressId: prepage.addressData.id, //地址编号
+					useIntegral: prepage.checkedPoints ? 1 : 0
+				}).then(({
+					data
+				}) => {
+					// 获取支付金额
+					this.money = data.result.pay_price;
+				});
+			}
+			// 保存pinkid
+			if (options.pinkid) {
+				this.pinkid = options.pinkid;
 			}
+			// 载入余额
+			balance({}).then(({
+				data
+			}) => {
+				// 获取余额
+				this.now_money = data.now_money;
+			});
 		},
-		// 支付金额
-		orderMoneyPay() {
-			let obj = this;
-			orderPay({
-				uni: obj.orderId,
-				// #ifdef H5
-				from: obj.froms ? 'weixin' : 'H5', //来源
-				// #endif
-				// #ifdef MP-WEIXIN
-				from: 'routine', //来源
-				// #endif
-				// #ifdef APP-PLUS
-				from: 'app', //来源
-				// #endif
-				paytype: obj.payName //支付类型  weixin-微信 yue-余额
-			})
-				.then(e => {
-					// 判断是否为余额支付
-					if (obj.payName == 'yue' && e.data.status == 'SUCCESS') {
-						if (e.status == 200) {
-							obj.paySuccessTo();
-						} else {
-							obj.$api.msg(msg);
+		methods: {
+			//选择支付方式
+			changePayType(type) {
+				this.payType = type;
+				if (this.payType == 1) {
+					this.payName = 'weixin';
+				}
+				if (this.payType == 2) {
+					this.payName = 'ali';
+				}
+				if (this.payType == 3) {
+					this.payName = 'yue';
+				}
+			},
+			// 支付金额
+			orderMoneyPay() {
+				let obj = this;
+				orderPay({
+						uni: obj.orderId,
+						// #ifdef H5
+						from: obj.froms ? 'weixin' : 'H5', //来源
+						// #endif
+						// #ifdef MP-WEIXIN
+						from: 'routine', //来源
+						// #endif
+						// #ifdef APP-PLUS
+						from: 'app', //来源
+						// #endif
+						paytype: obj.payName //支付类型  weixin-微信 yue-余额
+					})
+					.then(e => {
+						// 判断是否为余额支付
+						if (obj.payName == 'yue' && e.data.status == 'SUCCESS') {
+							if (e.status == 200) {
+								obj.paySuccessTo();
+							} else {
+								obj.$api.msg(msg);
+							}
 						}
-					}
-					//#ifndef APP-PLUS
-					if (obj.payName == 'weixin' || obj.payName == 'routine') {
-						let da = e.data.result.jsConfig;
-						console.log(da, '支付打印');
-						let data = {
+						//#ifndef APP-PLUS
+						if (obj.payName == 'weixin' || obj.payName == 'routine') {
+							let da = e.data.result.jsConfig;
+							console.log(da, '支付打印');
+							let data = {
+								// #ifdef H5
+								timestamp: da.timestamp,
+								// #endif
+								// #ifdef MP
+								timeStamp: da.timestamp,
+								// #endif
+								nonceStr: da.nonceStr,
+								package: da.package,
+								signType: da.signType,
+								paySign: da.paySign,
+								success: function(res) {
+									obj.paySuccessTo();
+								},
+								fail: () => {
+									uni.navigateTo({
+										url: '/pages/order/order?state=0'
+									});
+								}
+							};
 							// #ifdef H5
-							timestamp: da.timestamp,
-							// #endif
-							// #ifdef MP
-							timeStamp: da.timestamp,
+							if (obj.payName == 'weixin') {
+								obj.weichatObj.chooseWXPay(data);
+							}
 							// #endif
-							nonceStr: da.nonceStr,
-							package: da.package,
-							signType: da.signType,
-							paySign: da.paySign,
-							success: function(res) {
-								obj.paySuccessTo();
-							},
-							fail: () => {
-								uni.navigateTo({
-									url: '/pages/order/order?state=0'
-								});
+							// #ifdef MP-WEIXIN
+							if (obj.payName == 'routine') {
+								wx.requestPayment(data);
 							}
-						};
-						// #ifdef H5
-						if (obj.payName == 'weixin') {
-							obj.weichatObj.chooseWXPay(data);
+							// #endif
 						}
 						// #endif
-						// #ifdef MP-WEIXIN
-						if (obj.payName == 'routine') {
-							wx.requestPayment(data);
+						//#ifdef APP-PLUS
+						if (obj.payName == 'weixin' || obj.payName == 'routine') {
+							let da = e.data.result.jsConfig;
+							console.log('--da--', da);
+							let data = {
+								appid: da.appid,
+								noncestr: da.noncestr,
+								package: da.package,
+								partnerid: da.partnerid,
+								prepayid: da.prepayid,
+								timestamp: da.timestamp,
+								sign: da.sign
+							};
+							console.log('--data--', data);
+							uni.requestPayment({
+								provider: 'wxpay',
+								orderInfo: data,
+								success(res) {
+									console.log(res);
+									uni.showToast({
+										title: '支付成功',
+										duration: 2000
+									});
+									obj.paySuccessTo();
+								},
+								fail(res) {
+									console.log(res, '失败');
+								}
+							});
 						}
-						// #endif
-					}
-					// #endif
-					//#ifdef APP-PLUS
-					if (obj.payName == 'weixin' || obj.payName == 'routine') {
-						let da = e.data.result.jsConfig;
-						console.log('--da--', da);
-						let data = {
-							appid: da.appid,
-							noncestr: da.noncestr,
-							package: da.package,
-							partnerid: da.partnerid,
-							prepayid: da.prepayid,
-							timestamp: da.timestamp,
-							sign: da.sign
-						};
-						console.log('--data--', data);
-						uni.requestPayment({
-							provider: 'wxpay',
-							orderInfo: data,
-							success(res) {
-								console.log(res);
-								uni.showToast({
-									title: '支付成功',
-									duration: 2000
-								});
-								obj.paySuccessTo();
-							},
-							fail(res) {
-								console.log(res, '失败');
-							}
-						});
+						if (obj.payName == 'ali') {
+							const url = e.data.result.jsConfig;
+							console.log(url, 'url');
+							uni.requestPayment({
+								provider: 'alipay',
+								orderInfo: url,
+								success: res => {
+									console.log(res);
+									uni.showToast({
+										title: '支付成功',
+										duration: 2000
+									});
+									obj.paySuccessTo();
+								},
+								fail: e => {
+									console.log(e);
+								},
+								complete: () => {}
+							});
+							obj.payLoding = false;
+						}
+						//#endif
+						uni.hideLoading();
+						obj.payLoding = false;
+					})
+					.catch(e => {
+						// 支付完成
+						uni.hideLoading();
+						obj.payLoding = false;
+						console.log(e);
+					});
+			},
+			// 支付成功跳转
+			paySuccessTo() {
+				uni.hideLoading();
+				uni.redirectTo({
+					url: '/pages/money/paySuccess?orderid=' + this.orderId
+				});
+			},
+			//确认支付
+			confirm: async function() {
+				let obj = this;
+				// 判断是否余额不足
+				if (obj.payName == 'yue' && +obj.now_money < obj.money) {
+					uni.showModal({
+						title: '提示',
+						content: '账户余额不足!',
+						showCancel: false,
+						success: res => {},
+						fail: () => {},
+						complete: () => {}
+					});
+					return;
+				}
+				uni.showLoading({
+					title: '支付中',
+					mask: true
+				});
+				// 支付中
+				obj.payLoding = true;
+				// 判断是否普通订单
+				if (obj.orderType == 1) {
+					obj.orderPayBase();
+					return
+				}
+				// 判断是否市场订单
+				if (obj.orderType == 2) {
+					obj.orderPayNew();
+					return
+				}
+
+			},
+			// 市场订单
+			orderPayNew() {
+				const obj = this;
+				nftPay({
+					pay_type: obj.payName
+				}, obj.orderId).then(res => {
+					obj.payLoding = false;
+					uni.hideLoading()
+					if (obj.payName == 'yue') {
+						obj.paySuccessTo();
 					}
+					// #ifdef APP-PLUS
 					if (obj.payName == 'ali') {
-						const url = e.data.result.jsConfig;
+						const url = res.data.payConfig;
 						console.log(url, 'url');
 						uni.requestPayment({
 							provider: 'alipay',
 							orderInfo: url,
 							success: res => {
-								console.log(res);
-								uni.showToast({
-									title: '支付成功',
-									duration: 2000
-								});
 								obj.paySuccessTo();
 							},
 							fail: e => {
+								uni.showModal({
+									title: '错误',
+									content: '未成功支付',
+									showCancel: false,
+								});
 								console.log(e);
 							},
-							complete: () => {}
 						});
-						obj.payLoding = false;
 					}
-					//#endif
-					uni.hideLoading();
+					// #endif
+				}).catch(() => {
 					obj.payLoding = false;
 				})
-				.catch(e => {
-					// 支付完成
-					uni.hideLoading();
-					obj.payLoding = false;
-					console.log(e);
-				});
-		},
-		// 支付成功跳转
-		paySuccessTo() {
-			uni.hideLoading();
-			uni.redirectTo({
-				url: '/pages/money/paySuccess?orderid=' + this.orderId
-			});
-		},
-		//确认支付
-		confirm: async function() {
-			let obj = this;
-
-			// 判断是否余额不足
-			if (obj.payName == 'yue' && +obj.now_money < obj.money) {
-				uni.showModal({
-					title: '提示',
-					content: '账户余额不足!',
-					showCancel: false,
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
-				});
-				return;
-			}
-			uni.showLoading({
-				title: '支付中',
-				mask: true
-			});
-			// 支付中
-			obj.payLoding = true;
-			// #ifdef H5
-			// 获取当前是否为微信浏览器
-			obj.froms = uni.getStorageSync('weichatBrowser') || '';
-			// #endif
-			// 判断是否为未支付订单中跳转进入
-			if (obj.type != 1) {
-				// 初次生成订单
-				obj.firstCreateOrder();
-			} else {
-				// 已经生成订单未支付
-				obj.orderMoneyPay();
-			}
-		},
-		// 初次订单创建
-		firstCreateOrder() {
-			let obj = this;
-			// 获取下单页面数据
-			let prepage = obj.$api.prePage();
-
-			let data = {
-				real_name: prepage.addressData.real_name, //联系人名称
-				phone: prepage.addressData.phone, //联系人号码
-				couponId: prepage.couponChecked.id, //优惠券编号
-				addressId: prepage.addressData.id, //支付地址id
-				useIntegral: prepage.checkedPoints ? 1 : 0, //是否积分抵扣1为是0为否
-				payType: obj.payName, //支付类型  weixin-微信 yue-余额
-				mark: prepage.desc, //备注
+				return
+			},
+			// 普通订单
+			orderPayBase() {
+				const obj = this;
 				// #ifdef H5
-				from: obj.froms ? 'weixin' : 'H5', //来源
-				// #endif
-				// #ifdef MP-WEIXIN
-				from: 'routine', //来源
-				// #endif
-				// #ifdef APP-PLUS
-				from: 'app', //来源
+				// 获取当前是否为微信浏览器
+				obj.froms = uni.getStorageSync('weichatBrowser') || '';
 				// #endif
-				shipping_type: 1 //提货方式 1 快递 2自提
-			};
-			// 判断是否拼团商品
-			if (obj.pinkid) {
-				data.pinkId = obj.pinkid;
-			}
-			// 生成订单
-			createOrderkey(data, obj.orderKey)
-				.then(({ data, status, msg }) => {
-					console.log(status);
-					// 判断是否支付失败
-					if (data.status == 'ORDER_EXIST') {
-						uni.showModal({
-							title: '提示',
-							content: msg,
-							showCancel: false
-						});
-						uni.hideLoading();
-						obj.payLoding = false;
-						return;
-					}
-					// 保存订单号
-					obj.orderId = data.result.orderId;
-					// 判断是否为余额支付
-					if (obj.payName == 'yue') {
-						if (status == 200) {
-							obj.paySuccessTo();
+				// 判断是否为未支付订单中跳转进入
+				if (obj.type != 1) {
+					// 初次生成订单
+					obj.firstCreateOrder();
+				} else {
+					// 已经生成订单未支付
+					obj.orderMoneyPay();
+				}
+			},
+			// 初次订单创建
+			firstCreateOrder() {
+				let obj = this;
+				// 获取下单页面数据
+				let prepage = obj.$api.prePage();
+
+				let data = {
+					real_name: prepage.addressData.real_name, //联系人名称
+					phone: prepage.addressData.phone, //联系人号码
+					couponId: prepage.couponChecked.id, //优惠券编号
+					addressId: prepage.addressData.id, //支付地址id
+					useIntegral: prepage.checkedPoints ? 1 : 0, //是否积分抵扣1为是0为否
+					payType: obj.payName, //支付类型  weixin-微信 yue-余额
+					mark: prepage.desc, //备注
+					// #ifdef H5
+					from: obj.froms ? 'weixin' : 'H5', //来源
+					// #endif
+					// #ifdef MP-WEIXIN
+					from: 'routine', //来源
+					// #endif
+					// #ifdef APP-PLUS
+					from: 'app', //来源
+					// #endif
+					shipping_type: 1 //提货方式 1 快递 2自提
+				};
+				// 判断是否拼团商品
+				if (obj.pinkid) {
+					data.pinkId = obj.pinkid;
+				}
+				// 生成订单
+				createOrderkey(data, obj.orderKey)
+					.then(({
+						data,
+						status,
+						msg
+					}) => {
+						console.log(status);
+						// 判断是否支付失败
+						if (data.status == 'ORDER_EXIST') {
+							uni.showModal({
+								title: '提示',
+								content: msg,
+								showCancel: false
+							});
+							uni.hideLoading();
+							obj.payLoding = false;
+							return;
+						}
+						// 保存订单号
+						obj.orderId = data.result.orderId;
+						// 判断是否为余额支付
+						if (obj.payName == 'yue') {
+							if (status == 200) {
+								obj.paySuccessTo();
+							} else {
+								obj.$api.msg(msg);
+							}
 						} else {
-							obj.$api.msg(msg);
+							// 立即支付
+							obj.orderMoneyPay();
 						}
-					} else {
-						// 立即支付
-						obj.orderMoneyPay();
-					}
-				})
-				.catch(e => {
-					uni.hideLoading();
-					obj.payLoding = false;
-					console.log(e, '123456789');
-				});
+					})
+					.catch(e => {
+						uni.hideLoading();
+						obj.payLoding = false;
+						console.log(e, '123456789');
+					});
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-.app {
-	width: 100%;
-}
-
-.price-box {
-	background-color: #fff;
-	height: 265upx;
-	display: flex;
-	flex-direction: column;
-	justify-content: center;
-	align-items: center;
-	font-size: 28upx;
-	color: #909399;
-
-	.price {
-		font-size: 50upx;
-		color: #303133;
-		margin-top: 12upx;
-		&:before {
-			content: '¥';
-			font-size: 40upx;
-		}
+	.app {
+		width: 100%;
 	}
-}
 
-.pay-type-list {
-	margin-top: 20upx;
-	background-color: #fff;
-	padding-left: 60upx;
-	.type-item {
-		height: 120upx;
-		padding: 20upx 0;
+	.price-box {
+		background-color: #fff;
+		height: 265upx;
 		display: flex;
-		justify-content: space-between;
+		flex-direction: column;
+		justify-content: center;
 		align-items: center;
-		padding-right: 60upx;
-		font-size: 30upx;
-		position: relative;
-	}
+		font-size: 28upx;
+		color: #909399;
 
-	.icon {
-		width: 100upx;
-		font-size: 52upx;
-	}
-	.iconyue {
-		color: #fe8e2e;
-	}
-	.iconweixin {
-		color: #36cb59;
-	}
-	.iconzhifubao {
-		color: #01aaef;
+		.price {
+			font-size: 50upx;
+			color: #303133;
+			margin-top: 12upx;
+
+			&:before {
+				content: '¥';
+				font-size: 40upx;
+			}
+		}
 	}
-	.tit {
-		font-size: $font-lg;
-		color: $font-color-dark;
-		margin-bottom: 4upx;
+
+	.pay-type-list {
+		margin-top: 20upx;
+		background-color: #fff;
+		padding-left: 60upx;
+
+		.type-item {
+			height: 120upx;
+			padding: 20upx 0;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding-right: 60upx;
+			font-size: 30upx;
+			position: relative;
+		}
+
+		.icon {
+			width: 100upx;
+			font-size: 52upx;
+		}
+
+		.iconyue {
+			color: #fe8e2e;
+		}
+
+		.iconweixin {
+			color: #36cb59;
+		}
+
+		.iconzhifubao {
+			color: #01aaef;
+		}
+
+		.tit {
+			font-size: $font-lg;
+			color: $font-color-dark;
+			margin-bottom: 4upx;
+		}
+
+		.con {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			font-size: $font-sm;
+			color: $font-color-light;
+		}
 	}
-	.con {
-		flex: 1;
+
+	.mix-btn {
 		display: flex;
-		flex-direction: column;
-		font-size: $font-sm;
-		color: $font-color-light;
+		align-items: center;
+		justify-content: center;
+		width: 630upx;
+		height: 80upx;
+		margin: 80upx auto 30upx;
+		font-size: $font-lg;
+		color: #fff;
+		background-color: $base-color;
+		border-radius: 10upx;
+		/* box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4); */
 	}
-}
-.mix-btn {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 630upx;
-	height: 80upx;
-	margin: 80upx auto 30upx;
-	font-size: $font-lg;
-	color: #fff;
-	background-color: $base-color;
-	border-radius: 10upx;
-	/* box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4); */
-}
 
-.clickbg {
-	background-color: $color-gray !important;
-}
+	.clickbg {
+		background-color: $color-gray !important;
+	}
 </style>

+ 2 - 2
pages/order/order.vue

@@ -58,7 +58,7 @@
 						<view class="action-box b-t" v-if="item.status != 5">
 							<button v-if="item._status._title == '未支付'" class="action-btn" @click.stop="cancelOrder(item)">取消订单</button>
 							<button v-if="item._status._title == '未支付'" @click.stop="orderPay(item)" class="action-btn recom">立即支付</button>
-							<button v-if="item._status._title == '待评价'" class="action-btn">评价</button>
+							<!-- <button v-if="item._status._title == '待评价'" class="action-btn">评价</button> -->
 							<button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)" class="action-btn">确认收货</button>
 							<!-- <button v-if="item._status._title == '未发货' && item.is_gift != 1" class="action-btn" @click.stop="orderRefund(item)">申请退款</button> -->
 						</view>
@@ -200,7 +200,7 @@ export default {
 		orderPay(e) {
 			console.log(e)
 			uni.navigateTo({
-				url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price + '&isP=' + (e.combination_id != 0 ? '1': '0')
+				url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price +'&orderType=1'
 			});
 		},
 		//获取订单列表

+ 650 - 0
pages/order/orderSC.vue

@@ -0,0 +1,650 @@
+<template>
+	<view class="content">
+		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<u-empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></u-empty>
+
+					<!-- 订单列表 -->
+					<view v-for="(item, index) in tabItem.orderList" :key="index"
+						class="order-item">
+						<view class="i-top b-b">
+							<!-- <text class="time">{{ item._add_time }}</text> -->
+							<!-- <text class="state">{{ item._status._title }}</text> -->
+							<text v-if="item.status === 4" class="del-btn iconfont icondelete"
+								@click="deleteOrder(index)"></text>
+						</view>
+						<view class="goods-box-single" >
+							<image class="goods-img" :src="item.class_info.uri" mode="scaleToFill"></image>
+							<view class="right">
+								<view class="flex-start">
+									<text class="title clamp">{{ item.class_info.name }}</text>
+								</view>
+
+								<view class="row flex">
+									<view class="price-box">
+										付款
+										<text class="price">{{ moneyNum(item.hang_info.price)}}</text>
+									</view>
+								</view>
+							</view>
+						</view>
+						<view class="action-box b-t" >
+							<button  class="action-btn" @click.stop="cancelOrder(item)">取消订单</button>
+							<button  @click.stop="orderPay(item)" class="action-btn recom">立即支付</button>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import empty from '@/components/empty';
+	import uEmpty from '@/uview-ui/components/u-empty/u-empty.vue'
+	import {
+		nftOrder,
+		nftCancel
+	} from '@/api/order.js';
+	export default {
+		components: {
+			uniLoadMore,
+			empty,
+			uEmpty
+		},
+		filters: {
+			moneyNum(value) {
+				return +value;
+			},
+		},
+		data() {
+			return {
+				tabCurrentIndex: 0,
+				navList: [{
+					state: 0,
+					text: '待付款',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}]
+			};
+		},
+
+		onLoad(options) {
+			this.loadData();
+		},
+		// #ifdef APP-PLUS || H5
+		onBackPress(e) {
+			uni.switchTab({
+				url: '/pages/user/user',
+			});
+			return true;
+		},
+		// #endif
+		methods: {
+			// 转换金额为数字
+			moneyNum(value) {
+				return +value;
+			},
+			// 确认收货
+			orderTake(item, index) {
+				let obj = this;
+				uni.showModal({
+					title: '是否确认收货?',
+					success: () => {
+						orderTake({
+								uni: item.order_id
+							})
+							.then(e => {
+								obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
+								uni.showToast({
+									title: '收货成功'
+								});
+							})
+							.catch(e => {
+								console.log(e);
+							});
+					}
+				});
+			},
+			// 申请退款
+			orderRefund(e) {
+				uni.navigateTo({
+					url: '/pages/order/orderRefund?id=' + e.order_id
+				});
+			},
+			// 订单支付
+			orderPay(e) {
+				console.log(e)
+				uni.navigateTo({
+					url: '/pages/money/pay?type=1&ordid=' + e.id + '&money=' + e.hang_info.price+'&orderType=2'
+				});
+			},
+			//获取订单列表
+			loadData(source) {
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				if (navItem.loadingType === 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				nftOrder({
+						status: state,
+						page: navItem.page,
+						limit: navItem.limit
+					})
+					.then(({
+						data
+					}) => {
+						let arr = data.list.map(e => {
+							let b = this.orderStateExp(e.status);
+							e.stateTip = b.stateTip;
+							e.stateTipColor = b.stateTipColor;
+							return e;
+						});
+						navItem.orderList = navItem.orderList.concat(arr);
+						// console.log(navItem.orderList);
+						navItem.page++;
+						if (navItem.limit == data.length) {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'more';
+							return;
+						} else {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'noMore';
+						}
+						uni.hideLoading();
+						this.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			},
+			//删除订单
+			deleteOrder(index) {
+				uni.showLoading({
+					title: '请稍后'
+				});
+				setTimeout(() => {
+					this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
+					uni.hideLoading();
+				}, 600);
+			},
+			//取消订单
+			cancelOrder(item) {
+				uni.showModal({
+					title: '订单取消',
+					content: '是否取消订单?',
+					success: e => {
+						if (e.confirm) {
+							uni.showLoading({
+								title: '请稍后'
+							});
+							nftCancel({
+								},item.id)
+								.then(e => {
+									uni.showToast({
+										title: '取消成功',
+										duration: 2000,
+										position: 'top'
+									});
+								})
+								.catch(e => {
+									console.log(e);
+								});
+							//取消订单后删除待付款中该项
+							let list = this.navList[this.tabCurrentIndex].orderList;
+							let index = list.findIndex(val => val.id === item.id);
+							index !== -1 && list.splice(index, 1);
+							uni.hideLoading();
+						}
+					}
+				});
+			},
+
+			//订单状态文字和颜色
+			orderStateExp(state) {
+				let stateTip = '',
+					stateTipColor = '#fa436a';
+				switch (+state) {
+					case 0:
+						stateTip = '待付款';
+						break;
+					case 1:
+						stateTip = '待发货';
+						break;
+					case 2:
+						stateTip = '待收货';
+						break;
+					case 3:
+						stateTip = '待评价';
+						break;
+					case 4:
+						stateTip = '已完成';
+						stateTipColor = '#5dbc7c';
+						break;
+					case 9:
+						stateTip = '订单已关闭';
+						stateTipColor = '#909399';
+						break;
+
+						//更多自定义
+				}
+				return {
+					stateTip,
+					stateTipColor
+				};
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page,
+	.content {
+		background: #111111;
+		height: 100%;
+	}
+
+	.swiper-box {
+		height: 100%;
+		background-color: #111111;
+	}
+
+	.list-scroll-content {
+		height: 100%;
+	}
+
+	.navbar {
+		display: flex;
+		height: 40px;
+		padding: 0 5px;
+		background: #111111;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #fff;
+			position: relative;
+
+			&.current {
+				color: #5C5EE5;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #5C5EE5;
+				}
+			}
+		}
+	}
+
+	.uni-swiper-item {
+		height: auto;
+	}
+
+	.order-item {
+		display: flex;
+		flex-direction: column;
+		padding-left: 30rpx;
+		background: #111111;
+		margin-top: 16rpx;
+
+		.i-top {
+			display: flex;
+			align-items: center;
+			height: 80rpx;
+			padding-right: 30rpx;
+			font-size: $font-base;
+			color: $font-color-dark;
+			position: relative;
+
+			.time {
+				flex: 1;
+				font-size: 24rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+			}
+
+			.state {
+				color: #5C5EE5;
+			}
+
+			.del-btn {
+				padding: 10rpx 0 10rpx 36rpx;
+				font-size: $font-lg;
+				color: $font-color-light;
+				position: relative;
+
+				&:after {
+					content: '';
+					width: 0;
+					height: 30rpx;
+					border-left: 1px solid $border-color-dark;
+					position: absolute;
+					left: 20rpx;
+					top: 50%;
+					transform: translateY(-50%);
+				}
+			}
+		}
+
+		/* 多条商品 */
+		.goods-box {
+			height: 160rpx;
+			padding: 20rpx 0;
+			white-space: nowrap;
+
+			.goods-item {
+				width: 120rpx;
+				height: 120rpx;
+				display: inline-block;
+				margin-right: 24rpx;
+			}
+
+			.goods-img {
+				display: block;
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		/* 单条商品 */
+		.goods-box-single {
+			background: #0E0E0E;
+			display: flex;
+			padding: 20rpx 0;
+
+			.goods-img {
+				display: block;
+				width: 120rpx;
+				height: 120rpx;
+			}
+
+			.right {
+				flex: 1;
+				display: flex;
+				flex-direction: column;
+				padding: 0 30rpx 0 24rpx;
+				overflow: hidden;
+
+				.row {
+					margin-top: 10rpx;
+				}
+
+				.row_title {
+					padding: 5rpx 10rpx;
+					background-color: #dddddd;
+					border-radius: 10rpx;
+					font-size: 22rpx;
+					color: #ffffff;
+				}
+
+				.title {
+					font-size: $font-base + 2rpx;
+					color: #fff;
+					line-height: 1;
+					width: 80%;
+				}
+
+				.attr-box {
+					display: flex;
+					justify-content: flex-end;
+					font-size: $font-sm + 2rpx;
+					color: $font-color-light;
+				}
+
+				.price {
+					display: inline;
+					font-size: $font-base + 2rpx;
+					color: #5C5EE5;
+
+					&:before {
+						content: '¥';
+						font-size: $font-sm;
+
+					}
+				}
+			}
+		}
+
+		.price-box {
+			display: flex;
+			align-items: baseline;
+			padding: 20rpx 0;
+			font-size: $font-sm + 2rpx;
+			color: #fff;
+
+			.num {
+				margin: 0 8rpx;
+				color: #5C5EE5;
+			}
+
+			.price {
+				font-size: $font-lg;
+				color: #5C5EE5;
+
+				&:before {
+					content: '¥';
+					font-size: $font-sm;
+					margin: 0 2rpx 0 8rpx;
+				}
+			}
+		}
+
+		.action-box {
+			display: flex;
+			justify-content: flex-end;
+			align-items: center;
+			height: 100rpx;
+			position: relative;
+			padding-right: 30rpx;
+		}
+
+		.action-btn {
+			width: 160rpx;
+			height: 60rpx;
+			margin: 0;
+			margin-left: 24rpx;
+			padding: 0;
+			text-align: center;
+			line-height: 60rpx;
+			font-size: $font-sm + 2rpx;
+			color: #fff;
+			background: linear-gradient(270deg, #6E8DF7, #9977F6);
+			border-radius: 100px;
+
+			&:after {
+				border-radius: 100px;
+			}
+
+			&.recom {
+				color: #fff;
+
+				&:after {
+					border-color: $base-color;
+				}
+			}
+
+			&.evaluate {
+				color: $color-yellow;
+
+				&:after {
+					border-color: $color-yellow;
+				}
+			}
+		}
+	}
+
+	/* load-more */
+	.uni-load-more {
+		display: flex;
+		flex-direction: row;
+		height: 80rpx;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.uni-load-more__text {
+		font-size: 28rpx;
+		color: #999;
+	}
+
+	.uni-load-more__img {
+		height: 24px;
+		width: 24px;
+		margin-right: 10px;
+	}
+
+	.uni-load-more__img>view {
+		position: absolute;
+	}
+
+	.uni-load-more__img>view view {
+		width: 6px;
+		height: 2px;
+		border-top-left-radius: 1px;
+		border-bottom-left-radius: 1px;
+		background: #999;
+		position: absolute;
+		opacity: 0.2;
+		transform-origin: 50%;
+		animation: load 1.56s ease infinite;
+	}
+
+	.uni-load-more__img>view view:nth-child(1) {
+		transform: rotate(90deg);
+		top: 2px;
+		left: 9px;
+	}
+
+	.uni-load-more__img>view view:nth-child(2) {
+		transform: rotate(180deg);
+		top: 11px;
+		right: 0;
+	}
+
+	.uni-load-more__img>view view:nth-child(3) {
+		transform: rotate(270deg);
+		bottom: 2px;
+		left: 9px;
+	}
+
+	.uni-load-more__img>view view:nth-child(4) {
+		top: 11px;
+		left: 0;
+	}
+
+	.load1,
+	.load2,
+	.load3 {
+		height: 24px;
+		width: 24px;
+	}
+
+	.load2 {
+		transform: rotate(30deg);
+	}
+
+	.load3 {
+		transform: rotate(60deg);
+	}
+
+	.load1 view:nth-child(1) {
+		animation-delay: 0s;
+	}
+
+	.load2 view:nth-child(1) {
+		animation-delay: 0.13s;
+	}
+
+	.load3 view:nth-child(1) {
+		animation-delay: 0.26s;
+	}
+
+	.load1 view:nth-child(2) {
+		animation-delay: 0.39s;
+	}
+
+	.load2 view:nth-child(2) {
+		animation-delay: 0.52s;
+	}
+
+	.load3 view:nth-child(2) {
+		animation-delay: 0.65s;
+	}
+
+	.load1 view:nth-child(3) {
+		animation-delay: 0.78s;
+	}
+
+	.load2 view:nth-child(3) {
+		animation-delay: 0.91s;
+	}
+
+	.load3 view:nth-child(3) {
+		animation-delay: 1.04s;
+	}
+
+	.load1 view:nth-child(4) {
+		animation-delay: 1.17s;
+	}
+
+	.load2 view:nth-child(4) {
+		animation-delay: 1.3s;
+	}
+
+	.load3 view:nth-child(4) {
+		animation-delay: 1.43s;
+	}
+
+	@-webkit-keyframes load {
+		0% {
+			opacity: 1;
+		}
+
+		100% {
+			opacity: 0.2;
+		}
+	}
+</style>

+ 0 - 217
pages/shoping/userinfo.vue

@@ -1,217 +0,0 @@
-<template>
-	<view class="content">
-		<view class="row1">
-			<text class="tit">头像</text>
-			<view class="background-img" @click.stop="imgsub"><image class="background-img" v-model="userInfo.avatar" :src="userInfo.avatar" mode="aspectFill"></image></view>
-		</view>
-		<view class="row">
-			<text class="tit">昵称</text>
-			<input class="input" type="text" v-model="userInfo.nickname" placeholder-class="placeholder" />
-		</view>
-		<view class="row">
-			<text class="tit">ID</text>
-			<input class="input" type="text"  disabled="true" v-model="userInfo.uid" placeholder-class="placeholder" />
-		</view>
-		<view class="row">
-			<text class="tit">账户</text>
-			<input class="input" type="text"  disabled="true" v-model="userInfo.phone" placeholder-class="placeholder" />
-		</view>
-		<view class="out ooo" @click="cancel">注销账户</view>
-		<view class="out" @click="toLogout">退出登录</view>
-		<view class="add-btn" @click="confirm">提交</view>
-		<uni-popup ref="popup" type="center">
-			<view class="psw-wrapper">
-				<view class="psw-title">请输入自己的账户</view>
-				<input type="text" v-model="password" class="psw-ipt" />
-				<view class="psw-btn">
-					<text @click.stop="qx">取消</text>
-					<text class="psw-qd" @click.stop="pswQd">确定</text>
-				</view>
-			</view>
-		</uni-popup>
-	</view>
-</template>
-
-<script>
-import { mapState,mapMutations } from 'vuex';
-import { upload } from '@/api/order.js';
-import {userEdit,logout} from '@/api/set.js';
-export default {
-	data(){
-		return{
-			show:false,
-			password: '',
-		}
-	},
-	onLoad() {
-		console.log(this.userInfo)
-	},
-	computed: {
-		...mapState('user',['userInfo'])
-	},
-	methods: {
-		...mapMutations('user',['logout']),
-		imgsub() {
-			console.log('上传头像')
-			upload({
-				filename: ''
-			}).then(data => {
-				console.log("data",data);
-				this.userInfo.avatar = data[0].url;
-			})
-		},
-		confirm() {
-			userEdit({ avatar: this.userInfo.avatar ,nickname: this.userInfo.nickname})
-				.then(e => {
-					this.$api.msg('修改成功');
-					setTimeout(()=> {
-						uni.switchTab({
-							url:'/pages/user/user'
-						});
-					}, 1000);
-					console.log(e);
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		toLogout(){
-			let obj = this;
-			uni.showModal({
-			    content: '确定要退出登录么',
-			    success: (e)=>{
-			    	if(e.confirm){
-						logout({}).then((e) => {
-							uni.navigateBack();
-						}).catch((e) => {
-							console.log(e);
-						})
-			    		obj.logout();
-			    	}
-			    }
-			});
-		},
-		cancel(){
-			this.$refs.popup.open();
-		},
-		qx() {
-			this.password = '';
-			this.$refs.popup.close();
-		},
-		pswQd() {
-			if(this.password != this.userInfo.phone){
-				this.$refs.popup.close();
-				this.password = '';
-				this.$api.msg("请输入自己的账户")
-				return
-			}
-			this.$refs.popup.close();
-			this.password = '';
-			this.$api.msg("申请注销成功,请耐心等待审核")
-		}
-	}
-}
-</script>
-
-<style lang="scss">
-	.row1 {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		position: relative;
-		padding: 0 30upx;
-		height: 110upx;
-		background: #fff;
-		margin-bottom: 20upx;
-		.tit {
-			flex-shrink: 0;
-			width: 120upx;
-			font-size: $font-lg;
-			color: $font-color-dark;
-		}
-		
-		.background-img {
-			width: 80rpx;
-			height: 80rpx;
-			border-radius: 50%;
-			background: #f2f2f2;
-		}
-	}
-	.row {
-		display: flex;
-		align-items: center;
-		padding: 0 30upx;
-		height: 110upx;
-		background: #fff;
-	
-		.tit {
-			flex-shrink: 0;
-			width: 120upx;
-			font-size: $font-lg;
-			color: $font-color-dark;
-		}
-		.input {
-			flex: 1;
-			text-align: right;
-			font-size: $font-base;
-			color: $color-gray;
-		}
-	}
-	.add-btn {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		margin: 58rpx auto 30rpx;
-		width: 560rpx;
-		height: 80rpx;
-		background: linear-gradient(0deg, #2E58FF, #32C6FF);
-		border-radius: 40px;
-		color: #FFFFFF;
-	}
-	.out {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		margin: 0 auto 30rpx;
-		width: 560rpx;
-		height: 80rpx;
-		border: 1px solid #32C6FF;
-		background: #FFFFFF;
-		border-radius: 40px;
-		color: #32C6FF;
-	}
-	.ooo{
-		margin-top: 100rpx;
-	}
-	.psw-wrapper {
-		width: 548rpx;
-		height: 344rpx;
-		background-color: #ffffff;
-		.psw-title {
-			width: 100%;
-			font-size: 35rpx;
-			padding: 43rpx 0 49rpx;
-			text-align: center;
-			font-weight: 800;
-		}
-		.psw-ipt {
-			display: block;
-			background-color: #dce3ed;
-			height: 90rpx;
-			width: 464rpx;
-			padding-left: 30rpx;
-			margin: 0 auto;
-			font-size: 80rpx;
-		}
-		.psw-btn text {
-			display: inline-block;
-			text-align: center;
-			width: 50%;
-			padding-top: 29rpx;
-			font-size: 35rpx;
-		}
-		.psw-qd {
-			color: #32C6FF;
-		}
-	}
-</style>

+ 26 - 52
pages/user/user.vue

@@ -13,15 +13,6 @@
 				</view>
 			</view>
 		</view>
-		<!-- <view class="address-box">
-			<view class="address-text">
-				区块链地址:{{name}}
-			</view>
-			<view class="fuzhi" @click="cope(name)">
-				复制
-			</view>
-		</view> -->
-		<!-- <view class="btm" style="height: 44px;"></view> -->
 		<view class="main-box">
 			<view class="title flex" @click="navTo('/pages/order/order?state=0')">
 				<view class="title-left">
@@ -50,6 +41,14 @@
 			</view>
 		</view>
 		<view class="manage-box">
+			<view class="manage" @click="navTo('/pages/order/orderSC')">
+				<view class="flex-center">
+					<image src="../../static/user/user13.png" mode="widthFix"></image>
+				</view>
+				<view class="manage-title">
+					市场未付
+				</view>
+			</view>
 			<view class="manage" @click="navTo('/pages/money/wallet')">
 				<view class="flex-center">
 					<image src="../../static/user/user06.png" mode="widthFix"></image>
@@ -161,46 +160,6 @@
 					v-if="!(navitem.orderList.length == 0 && navitem.loaded)"></uni-load-more>
 			</scroll-view>
 		</view>
-		<!-- <swiper :current="tabCurrentIndex" duration="300" class="swiper-box" :style="{ height: height }"
-			@change="changeTab">
-			<swiper-item v-for="navitem in navList">
-				<scroll-view scroll-y="true" class="uni-scroll-view-content ">
-					<u-empty v-if="navitem.orderList && navitem.orderList.length == 0 && navitem.loaded"></u-empty>
-					<view class="flex dy-list">
-						<view class="box-content" v-for="item in navitem.orderList">
-							<view class="img">
-								<image :src="item.class_info.uri" mode=""></image>
-							</view>
-							<view class="content-title">
-								<view class="title">
-									<view class="text clamp">
-										{{item.class_info.name}}
-									</view>
-									<view class="zm" v-if="item.hang!=null">
-										转卖中
-									</view>
-								</view>
-								<view class="content-price">
-									<view class="price">
-										¥{{item.price}}
-									</view>
-									<view class="" v-show="tabCurrentIndex!=1">
-										<view class="button" @click="navPop(item)" v-if="item.hang==null ">
-											卖出
-										</view>
-										<view class="button" @click="qxMai(item.hang.id)" v-else>
-											取消卖出
-										</view>
-									</view>
-								</view>
-							</view>
-						</view>
-					</view>
-					<uni-load-more :status="navitem.loadingType"
-						v-if="!(navitem.orderList.length == 0 && navitem.loaded)"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper> -->
 		<!-- 客服 -->
 		<uni-popup ref="popupkf" type="center">
 			<view class="popup-box">
@@ -212,10 +171,10 @@
 						<view class="title">已经为您定制专属客服</view>
 						<image src="../../static/img/img010.png" mode=""></image>
 					</view>
-					<view class="nocancel">客服VX:{{ text }}</view>
+					<view class="nocancel">客服VX:{{ kfWX }}</view>
 					<view class="comfirm-box">
 						<view class="cancel" @click="kfClose()">取消</view>
-						<view class="comfirm" @click="comfirm(text)">复制微信</view>
+						<view class="comfirm" @click="uniCopy(kfWX)">复制微信</view>
 					</view>
 				</view>
 			</view>
@@ -261,6 +220,7 @@
 		sell,
 		qxgd
 	} from '@/api/order.js'
+	import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
 	import uEmpty from '@/uview-ui/components/u-empty/u-empty.vue'
 	import {
 		mapState,
@@ -269,7 +229,6 @@
 	import uniList from '@/components/uni-list/uni-list.vue';
 	import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
 	import {
-		userinfo,
 		orderData,
 		getUserInfo,
 		getMyNft,
@@ -290,6 +249,7 @@
 				id: 0,
 				item: '', //当前选中要操作卖出商品的数据
 				money: '', //卖出价格
+				kfWX:'liuniu',//客服微信
 				// 头部图高度
 				tabCurrentIndex: 0,
 				navList: [{
@@ -459,12 +419,26 @@
 					});
 				}
 			},
+			// 客服打开
 			kfOpen() {
 				this.$refs.popupkf.open();
 			},
+			// 客服关闭
 			kfClose() {
 				this.$refs.popupkf.close();
 			},
+			// 赋值客服
+			uniCopy(text){
+				this.$refs.popupkf.close();
+				const a = uniCopy(text)
+				if(a){
+					uni.showModal({
+						title: '提示',
+						content: '复制成功',
+						showCancel: false,
+					});
+				}
+			},
 			maiClose() {
 				this.$refs.maipop.close();
 				this.$refs.qumaipop.close();

BIN
static/user/user13.png