liujiaxin 1 tydzień temu
rodzic
commit
5e22f99918

+ 19 - 1
api/integral.js

@@ -52,4 +52,22 @@ export function payment(data) {
  }
  export function getCartByIds(data) {
   	return request('/app/integral/getCartByIds',data,'POST','application/json;charset=UTF-8');
- }
+ }
+ 
+ 
+ // 领取完课积分
+ export function completionReceive(data) {
+  	return request(`/app/live/completion/receive?recordId=${data}`,data,'POST','application/json;charset=UTF-8');
+ }
+ // 获取用户未领取的积分列表
+ export function completionUnreceived(data) {
+  	return request('/app/live/completion/unreceived',data,'GET','application/json;charset=UTF-8');
+ }
+ // 查询用户积分领取记录
+ export function completionRecords(data) {
+  	return request('/app/live/completion/records',data,'GET','application/json;charset=UTF-8');
+ }
+ // 查询用户积分余额和看直播信息统计
+ export function completionInfo(data) {
+  	return request('/app/live/completion/info',data,'GET','application/json;charset=UTF-8');
+ }

+ 3 - 3
common/request.js

@@ -13,8 +13,8 @@ export default class Request {
 		let path = 'https://userapp.klbycp.com/store'; //百域承品
 		let path2 = 'https://userapp.klbycp.com'; //百域承品
 
-		// let path = 'http://sf39aceb.natappfree.cc/store'; //百域承品 夏伟
-		// let path2 = 'http://sf39aceb.natappfree.cc'; //百域承品 夏伟
+		// let path = 'http://ac6af934.natappfree.cc/store'; //百域承品 夏伟
+		// let path2 = 'http://ac6af934.natappfree.cc'; //百域承品 夏伟
 
 		// let path = 'http://qeeaf625.natappfree.cc/store'; //本地
 		// let path2 = 'http://qeeaf625.natappfree.cc'; //本地
@@ -28,7 +28,7 @@ export default class Request {
 		if (router.indexOf("/live/liveData/like") != -1) {
 			path = 'https://im.fhhx.runtzh.com';
 		}
-if (router.indexOf("/app/order/getMyMergedOrderList") != -1) {
+		if (router.indexOf("/app/order/getMyMergedOrderList") != -1) {
 			path = 'https://userapp.klbycp.com';
 		}
 		if (router.indexOf("/live") !== -1 || router.indexOf("/liveAPP") !== -1) {

+ 2 - 2
pages/user/index.vue

@@ -103,12 +103,12 @@
 									mode=""></image>
 								<text class="text">收货地址</text>
 							</view>
-							<view class="item no-marin-bottom" @click="navgetTo('/pages_user/user/integral')">
+							<!-- <view class="item no-marin-bottom" @click="navgetTo('/pages_user/user/integral')">
 								<image
 									src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/integral.png"
 									mode=""></image>
 								<text class="text">积分管理</text>
-							</view>
+							</view> -->
 							<view class="item no-marin-bottom" @click="navgetTo('/pages_user/user/integralGoodsList')">
 								<image
 									src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/integral.png"

Plik diff jest za duży
+ 592 - 146
pages_course/living.vue


+ 8 - 4
pages_course/livingList.vue

@@ -4,7 +4,7 @@
 			:down="downOption" :up="upOption">
 			<view class="list">
 				<view class="list-item" @click="goLive(item)" v-for="(item,index) in list" :key="index">
-					<image class="img"  v-if="item.liveImgUrl" :src="item.liveImgUrl"></image>
+					<image class="img" v-if="item.liveImgUrl" :src="item.liveImgUrl"></image>
 					<view class="info">
 						<text>{{item.liveName}}</text>
 					</view>
@@ -23,7 +23,8 @@
 		mixins: [MescrollMixin],
 		data() {
 			return {
-
+				liveId: 712,
+				recordId: 1,
 				list: [],
 				downOption: {
 					offset: 80,
@@ -42,6 +43,7 @@
 			}
 		},
 		onLoad() {
+			
 			// if (!uni.getStorageSync("AppToken")) {
 			// 	uni.navigateTo({
 			// 		url: '/pages/auth/login'
@@ -52,6 +54,7 @@
 
 		},
 		methods: {
+
 			mescrollInit(mescroll) {
 				this.mescroll = mescroll;
 			},
@@ -142,13 +145,14 @@
 					display: flex;
 					background-color: rgba(0, 0, 0, 0.6);
 					align-items: center;
-					text{
+
+					text {
 						white-space: nowrap;
 						overflow: hidden;
 						text-overflow: ellipsis;
 					}
 				}
-				
+
 			}
 
 			.list-item:nth-child(2n) {

+ 180 - 84
pages_shopping/live/integral.vue

@@ -24,6 +24,43 @@
 					<text class="num">{{integral}}</text>
 				</view>
 
+				<!-- 签到 -->
+				<!-- <view class="singn-content">
+					<view class="sign-in-box">
+						<view class="inner">
+							<view class="title-box">已连续签到<text class="num">{{totalDays}}</text>天</view>
+							<view class="sign-list">
+								<view v-for="(item,index) in records" :key="index"
+									:class="totalDays >= index+ 1?'item active':'item'">
+									<view class="line"></view>
+									<view class="right">
+										<image v-if="totalDays >= index+ 1"
+											src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/f3bdd5d388854e9a8f365904840c3b32.png"
+											mode=""></image>
+										<image v-else
+											src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/c593e551e4b246b981aaa58deb1fe725.png"
+											mode=""></image>
+										<text class="text">第{{ item.continuousDays}}天</text>
+									</view>
+								</view>
+							</view>
+						</view>
+						<view class="sign-btn-box">
+							<view class="btn" v-if="isDaySign==false" @click="doSign()">
+								<image
+									src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/295aa046433d4feb95b467c83f8b4096.png"
+									mode=""></image>
+								<text class="text">签到</text>
+							</view>
+							<view class="btn" v-else>
+								<image
+									src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/295aa046433d4feb95b467c83f8b4096.png"
+									mode=""></image>
+								<text class="text">签到</text>
+							</view>
+						</view>
+					</view>
+				</view> -->
 				<view class="content">
 					<!-- 积分列表 -->
 					<view class="points-cont">
@@ -48,13 +85,14 @@
 							<view v-for="(item,index) in list" :key="index" class="item">
 								<view class="left">
 									<text class="title">
-										{{item.logTypeName}}
+										<!-- {{item.logTypeName}} -->
+										直播间完播积分
 									</text>
 									<view class="time">{{item.createTime}}</view>
 								</view>
 								<view class="right">
 									<text v-if="item.integral<0" class="less">{{item.integral}}</text>
-									<text v-else class="add">+{{item.integral}}</text>
+									<text v-else class="add">+{{item.pointsAwarded}}</text>
 								</view>
 							</view>
 						</view>
@@ -71,16 +109,27 @@
 	import {
 		getUserIntegralInfo
 	} from '@/api/living.js' // 积分
+	import {
+		completionRecords,
+		completionInfo,doSign
+	} from '@/api/integral.js'
 
 
 	// import {getDictByKey} from '@/api/common.js'
 	// import {getUserSign,getUserIntegralLogsList,doSign} from '@/api/integral';
+	// import {
+	// 	doSign
+	// } from '@/api/integral';
 	export default {
 		comments() {
 			Loading
 		},
 		data() {
 			return {
+				totalDays: null,
+				records: null,
+				liveId: 712,
+				signNum: 0,
 				typeOptions: [],
 				top: 0,
 				integral: 0,
@@ -104,7 +153,13 @@
 			};
 		},
 		onLoad(option) {
-			this.getUserIntegralInfo()
+			if (option.liveId) {
+				this.liveId = option.liveId
+			}
+			console.log("进入积分页面了")
+			// this.getUserIntegralInfo()
+			this.completionRecords()
+			this.completionInfo()
 		},
 		computed: {
 			// 计算属性的 getter
@@ -113,6 +168,93 @@
 			},
 		},
 		methods: {
+			// 查询用户积分领取记录
+			completionRecords() {
+				if (!this.liveId) return;
+				const data = {
+					liveId: this.liveId
+				}
+				completionRecords(data).then((res) => {
+					if (res.code == 200) {
+						this.list = res.data
+						console.log("查询用户积分领取记录", res)
+					}
+				}).catch((error) => {
+
+				});
+			},
+
+			//查询用户积分余额和看直播信息统计
+			completionInfo() {
+				if (!this.liveId) return;
+				const data = {
+					liveId: this.liveId
+				}
+				completionInfo(data).then((res) => {
+					if (res.code == 200) {
+						this.integral = res.data.integral
+						this.records = res.data.records
+						this.totalDays = res.data.totalDays
+						console.log("查询用户积分余额和看直播信息统计", res)
+					}
+				}).catch((error) => {
+
+				});
+			},
+
+
+			doSign() {
+				var data = {};
+				// uni.showLoading({
+				// 	title:"正在加载中..."
+				// })
+				doSign(data).then(
+					res => {
+						// uni.hideLoading()
+						if (res.code == 200) {
+							uni.showToast({
+								icon: 'success',
+								title: res.msg,
+							});
+							this.list = [];
+							this.page.page = 1;
+							this.list = [];
+							this.loaded = false;
+							this.loading = false;
+							this.getUserIntegralLogsList();
+							this.getUserSign();
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.msg,
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+			getUserSign() {
+				getUserSign().then(
+					res => {
+						if (res.code == 200) {
+							this.data = res.member;
+							this.signNum = res.signNum;
+							this.isDaySign = res.isDaySign;
+							this.integral = res.integral;
+							this.sign = JSON.parse(res.sign);
+
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
+
+
 			// 积分
 			getUserIntegralInfo() {
 				uni.showLoading({
@@ -122,13 +264,14 @@
 					uni.hideLoading()
 					if (res.code == 200) {
 						console.log("积分>>", res)
-						 // 处理列表数据,将"积分"替换为"积分"
-						      this.list = res.data.logs.map(item => {
-						        return {
-						          ...item,
-						          logTypeName: item.logTypeName ? item.logTypeName.replace(/积分/g, '积分') : item.logTypeName
-						        }
-						      })
+						// 处理列表数据,将"积分"替换为"积分"
+						this.list = res.data.logs.map(item => {
+							return {
+								...item,
+								logTypeName: item.logTypeName ? item.logTypeName.replace(/积分/g, '积分') :
+									item.logTypeName
+							}
+						})
 						this.integral = res.data.integral
 					}
 				}).catch(error => {
@@ -153,80 +296,33 @@
 				);
 
 			},
-			// doSign(){
-			// 	var data={};
-			// 	uni.showLoading({
-			// 		title:"正在加载中..."
-			// 	})
-			// 	doSign(data).then(
-			// 		res => {
-			// 			uni.hideLoading()
-			// 			if(res.code==200){
-			// 				uni.showToast({
-			// 					icon:'success',
-			// 					title: res.msg,
-			// 				});
-			// 				this.list=[];
-			// 				this.page.page=1;
-			// 				this.list=[];
-			// 				this.loaded=false;
-			// 				this.loading=false;
-			// 				this.getUserIntegralLogsList();
-			// 				this.getUserSign();
-			// 			}else{
-			// 				uni.showToast({
-			// 					icon:'none',
-			// 					title: res.msg,
-			// 				});
-			// 			}
-			// 		},
-			// 		rej => {}
-			// 	);
-			// },
-			// getUserSign(){
-			// 	getUserSign().then(
-			// 		res => {
-			// 			if(res.code==200){
-			// 				this.data=res.member;
-			// 				this.integral=res.integral;
-			// 				this.sign=JSON.parse(res.sign);
-
-			// 			}else{
-			// 				uni.showToast({
-			// 					icon:'none',
-			// 					title: "请求失败",
-			// 				});
-			// 			}
-			// 		},
-			// 		rej => {}
-			// 	);
-			// },
-
-			// getUserIntegralLogsList() {
-			//   let that = this;
-			//   if (that.loaded == true || that.loading == true) return;
-			//   that.loading = true;
-			//   uni.showLoading({
-			//   	title:"加载中..."
-			//   })
-			//   getUserIntegralLogsList(that.page).then(
-			//     res => {
-			//       that.loading = false;
-			//       that.loaded = res.data.list.length < that.page.pageSize;
-			//       that.page.page = that.page.page + 1;
-			//       that.list.push.apply(that.list, res.data.list);
-			// 	  uni.hideLoading()
-			//     },
-			//     err => {
-			// 		uni.hideLoading()
-			// 		uni.showToast({
-			// 				title: err.msg ,
-			// 				icon: 'none',
-			// 				duration: 2000
-			// 			});
-			//     }
-			//   );
-			// },
+
+
+			getUserIntegralLogsList() {
+				let that = this;
+				if (that.loaded == true || that.loading == true) return;
+				that.loading = true;
+				uni.showLoading({
+					title: "加载中..."
+				})
+				getUserIntegralLogsList(that.page).then(
+					res => {
+						that.loading = false;
+						that.loaded = res.data.list.length < that.page.pageSize;
+						that.page.page = that.page.page + 1;
+						that.list.push.apply(that.list, res.data.list);
+						uni.hideLoading()
+					},
+					err => {
+						uni.hideLoading()
+						uni.showToast({
+							title: err.msg,
+							icon: 'none',
+							duration: 2000
+						});
+					}
+				);
+			},
 			// 返回上一页
 			back() {
 				uni.navigateBack()

+ 63 - 27
pages_user/user/cart.vue

@@ -7,8 +7,8 @@
 					<image src="https://hdtobs.obs.cn-north-4.myhuaweicloud.com/fs/20250729/1753758788583.png" v-show="item.checked"></image>
 					<image src="https://hdtobs.obs.cn-north-4.myhuaweicloud.com/fs/20250729/1753758821601.png" v-show="!item.checked"></image>
 				</view>
-				<image class="goods-img" :src="item.imgUrl" mode="aspectFit" @click="showProduct"></image>
-				<view class="info-box" @click="showProduct">
+				<image class="goods-img" :src="item.imgUrl" mode="aspectFit" @click="showProduct(item)"></image>
+				<view class="info-box" @click="showProduct(item)">
 					<view>
 						<view class="title-box">
 							<view class="title ellipsis">{{ item.goodsName }}</view>
@@ -89,8 +89,10 @@
 			}	
 		},
 		onLoad() {
-			this.getCarts();
- 
+ // this.getCarts();
+		},
+		onShow() {
+		this.getCarts();	
 		},
 		onReachBottom() {
 			// this.$refs.product.getGoodsProducts();
@@ -189,22 +191,55 @@
 					rej => {}
 				);
 			},
-			changeCartNum(e,item){
-				let data = {cartNum:e.value,goodsId:item.goodsId,isCart: 1};
-				addOrUpdateCart(data).then(
-					res => {
-						if(res.code==200){
-							this.computedMoney();	
-						}else{
-							
-							uni.showToast({
-								icon:'none',
-								title: res.msg,
-							});
-						}
-					},
-					rej => {}
-				);
+			changeCartNum(e, item) {
+			  // 保存原始数量和索引
+			  const originalNum = item.cartNum;
+			  const itemIndex = this.carts.findIndex(cart => cart.id === item.id);
+			  
+			  // 先更新本地UI(立即响应)
+			  item.cartNum = e.value;
+			  
+			  let data = { cartNum: e.value, goodsId: item.goodsId, isCart: 1 };
+			  addOrUpdateCart(data).then(
+			    res => {
+			      if (res.code == 200) {
+			        this.computedMoney();
+			      } else {
+			        // 库存不足等错误情况
+			        // 恢复原始数量
+			        this.carts[itemIndex].cartNum = originalNum;
+			        
+			        // 如果需要,可以更新库存信息
+			        if (res.data && res.data.stock) {
+			          this.carts[itemIndex].stock = res.data.stock;
+			        }
+			        
+			        // 强制刷新
+			        this.$forceUpdate();
+			        
+			        // 计算总额
+			        this.computedMoney();
+			        
+			        uni.showToast({
+			          icon: 'none',
+			          title: res.msg,
+			          duration: 2000
+			        });
+			      }
+			    },
+			    rej => {
+			      // 网络错误
+			      this.carts[itemIndex].cartNum = originalNum;
+			      this.$forceUpdate();
+			      this.computedMoney();
+			      
+			      uni.showToast({
+			        icon: 'none',
+			        title: '网络错误,请重试',
+			        duration: 2000
+			      });
+			    }
+			  );
 			},
 			// 结算
 			submit() {
@@ -223,6 +258,7 @@
 				})
 			},
 			showProduct(item){
+				console.log("这个item")
 				uni.navigateTo({
 					url: '/pages_user/user/integralGoodsDetails?goodsId='+item.goodsId
 				})
@@ -290,7 +326,7 @@
 								font-size: 24upx;
 								font-family: PingFang SC;
 								font-weight: 500;
-								color: #DA251C;
+								color: #2BC7B9;
 								line-height: 1.2;
 								margin-right: 4upx;
 							}
@@ -298,7 +334,7 @@
 								font-size: 32upx;
 								font-family: PingFang SC;
 								font-weight: bold;
-								color: #DA251C;
+								color: #2BC7B9;
 								line-height: 1;
 							}
 						}
@@ -387,7 +423,7 @@
 							font-size: 24upx;
 							font-family: PingFang SC;
 							font-weight: bold;
-							color: #DA251C;
+							color: #2BC7B9;
 							line-height: 1.2;
 							margin-right: 10upx;
 						}
@@ -395,7 +431,7 @@
 							font-size: 32rpx;
 							font-family: PingFang SC;
 							font-weight: bold;
-							color: #DA251C;
+							color: #2BC7B9;
 							line-height: 1;
 						}
 					}
@@ -409,7 +445,7 @@
 					font-family: PingFang SC;
 					font-weight: bold;
 					color: #FFFFFF;
-					background: #DA251C;
+					background: #2BC7B9;
 					border-radius: 44upx;
 				}
 			}
@@ -424,8 +460,8 @@
 		}
 	}
 	.empty-cart-btn {
-		border: 1rpx solid #DA251C;
-		color: #DA251C;
+		border: 1rpx solid #2BC7B9;
+		color: #2BC7B9;
 		padding: 10rpx 30rpx;
 		border-radius: 40rpx;
 		margin-bottom: 20vh;

+ 35 - 4
pages_user/user/confirmIntegralOrder.vue

@@ -19,7 +19,7 @@
 						<text class="text" v-if="address.phone!=null">{{address.phone}}</text>
 					</view>
 					<view class="address">
-						{{address.address}} 
+						{{address.province}}{{address.city}}{{address.district}}{{address.detail}}
 					</view>
 				</view>
 				<view class="arrow-box">
@@ -86,7 +86,7 @@
 							<text class="text">全款支付</text>
 						</view>
 						<label>
-							<radio :value="1" :checked="payType=='1'" color="#DA251C" />
+							<radio :value="1" :checked="payType=='1'" color="#2BC7B9" />
 						</label>
 					</view>
 				</radio-group>
@@ -105,6 +105,7 @@
 </template>
 
 <script>
+	import {getAddressList} from '@/api/address'
 	import {getCartByIds,createCartOrder} from '@/api/integral.js'
 	import {getUserInfo} from '@/api/user'
 	export default {
@@ -126,6 +127,7 @@
 			}
 		},
 		onLoad(option) {
+			this.getAddressList()
 			this.cartIds=option.cartIds || '';
 			var that=this;
 			uni.$on('updateAddress', (e) => {
@@ -137,6 +139,35 @@
 			this.getUserInfo();
 		},
 		methods: {
+			getAddressList(){
+				uni.showLoading({
+					title:"正在加载中"
+				})
+				getAddressList().then(
+					res => {
+						uni.hideLoading()
+						if(res.code==200){
+							const defaultAddress = res.data.find(item => item.isDefault == 1);
+							        
+							        if(defaultAddress){
+							          this.address = defaultAddress;
+									  this.addressId=defaultAddress.addressId
+							          console.log('找到默认地址:', defaultAddress);
+							        } else {
+							          // 如果没有找到默认地址,可以选择第一个地址或者设为null
+							          this.address = res.data.length > 0 ? res.data[0] : null;
+							          console.log('未找到默认地址,使用第一个地址或设为null');
+							        }
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
 			getUserInfo(){
 				getUserInfo().then(
 					res => {
@@ -513,7 +544,7 @@
 	 		font-family: PingFang SC;
 	 		font-weight: 400;
 	 		color: #FFFFFF;
-	 		background: #DA251C;
+	 		background: #2BC7B9;
 	 		border-radius: 10upx;
 	 	}
 	}
@@ -650,7 +681,7 @@
 						color: #fff;
 						text-align: center;
 						line-height: 0.44 * 100rpx;
-						background-color: #DA251C;
+						background-color: #2BC7B9;
 						.gray{
 							 background-color: #ccc;
 						}

+ 22 - 14
pages_user/user/integralGoodsDetails.vue

@@ -4,9 +4,9 @@
 			<view class="goods-banner" @click="showImg()">
 				<view class="cartbox" @click.stop="goCart()">
 					<view class="box">
-						<u-badge type="error" max="99" :value="cartNum" bgColor="#DA251C"></u-badge>
+						<u-badge type="error" max="99" :value="cartNum" bgColor="#2BC7B9"></u-badge>
 					</view>
-					<u-icon name="shopping-cart" color="#DA251C" size="68rpx"></u-icon>
+					<u-icon name="shopping-cart" color="#2BC7B9" size="68rpx"></u-icon>
 				</view>
 				<swiper class="swiper" :indicator-dots="false" :circular="true" :autoplay="true" :interval="3000"
 					:duration="1000" indicator-color="rgba(255, 255, 255, 0.6)" indicator-active-color="#ffffff"
@@ -136,6 +136,14 @@
 				this.show = true
 			},
 			addCart() {
+				if(this.cartNum>=this.items.stock){
+					uni.showToast({
+						title: '库存不足',
+						icon: 'none'
+					})
+					this.show = false
+					return;
+				}
 				uni.showLoading({
 					title: '处理中'
 				})
@@ -278,7 +286,7 @@
 						padding: 5rpx 15rpx;
 						font-size: 26rpx;
 						font-family: PingFang SC;
-						color: #DA251C;
+						color: #2BC7B9;
 					}
 
 					.duration {
@@ -288,7 +296,7 @@
 						padding: 5rpx 15rpx;
 						font-size: 26rpx;
 						font-family: PingFang SC;
-						color: #DA251C;
+						color: #2BC7B9;
 					}
 
 				}
@@ -303,7 +311,7 @@
 
 					.price {
 						padding: 5rpx 10rpx;
-						background-color: #DA251C;
+						background-color: #2BC7B9;
 						border-radius: 30rpx;
 						font-size: 20rpx;
 						font-family: PingFang SC;
@@ -314,7 +322,7 @@
 						font-weight: bold;
 						font-size: 28rpx;
 						font-family: PingFang SC;
-						color: #DA251C;
+						color: #2BC7B9;
 					}
 
 					.count {
@@ -350,7 +358,7 @@
 						margin-right: 15rpx;
 						height: 30rpx;
 						width: 6rpx;
-						background-color: #DA251C;
+						background-color: #2BC7B9;
 
 					}
 
@@ -420,12 +428,12 @@
 				}
 
 				&.buy {
-					background: #DA251C;
+					background: #2BC7B9;
 				}
 
 				&.add {
-					color: #DA251C !important;
-					border: 1rpx solid #DA251C;
+					color: #2BC7B9 !important;
+					border: 1rpx solid #2BC7B9;
 				}
 			}
 
@@ -498,7 +506,7 @@
 					font-size: 32rpx;
 					font-family: PingFang SC;
 					font-weight: bold;
-					color: #DA251C;
+					color: #2BC7B9;
 					line-height: 1.2;
 					margin-right: 10rpx;
 				}
@@ -507,7 +515,7 @@
 					font-size: 50rpx;
 					font-family: PingFang SC;
 					font-weight: bold;
-					color: #DA251C;
+					color: #2BC7B9;
 					line-height: 1;
 				}
 			}
@@ -516,7 +524,7 @@
 				font-size: 28rpx;
 				font-family: PingFang SC;
 				font-weight: 400;
-				color: #DA251C;
+				color: #2BC7B9;
 			}
 
 			.desc-box {
@@ -542,7 +550,7 @@
 
 	.es-max-btn {
 		width: 100%;
-		background-color: #DA251C;
+		background-color: #2BC7B9;
 		border-radius: 60rpx;
 		margin-top: 50rpx;
 		color: #fff;

+ 11 - 11
pages_user/user/integralGoodsList.vue

@@ -15,25 +15,25 @@
 				<view class="navbox">
 					<view class="navbox-item" @click="goCart()">
 						<view class="box">
-							<u-badge type="error" max="99" :value="cartNum" bgColor="#DA251C"></u-badge>
+							<u-badge type="error" max="99" :value="cartNum" bgColor="#2BC7B9"></u-badge>
 						</view>
-						<image src="https://hdtobs.obs.cn-north-4.myhuaweicloud.com/fs/20250729/1753759034519.png" mode="aspectFill"></image>
+						<image src="/static/tabbar/cart_sel.png" mode="aspectFill"></image>
 						<text>购物车</text>
 					</view>
 					<view class="navbox-item" @click="handleOrder(0)">
-						<image src="https://hdtobs.obs.cn-north-4.myhuaweicloud.com/hdt/order_icon.png" mode="aspectFill"></image>
+						<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/payment.png" mode="aspectFill"></image>
 						<text>全部订单</text>
 					</view>
 					<view class="navbox-item" @click="handleOrder(1)">
-						<image src="https://hdtobs.obs.cn-north-4.myhuaweicloud.com/hdt/obligation_icon.png" mode="aspectFill"></image>
+						<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/sou_goods.png" mode="aspectFill"></image>
 						<text>待付款</text>
 					</view>
 					<view class="navbox-item" @click="handleOrder(2)">
-						<image src="https://hdtobs.obs.cn-north-4.myhuaweicloud.com/hdt/dfh_icon.svg" mode="aspectFill"></image>
+						<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/send_goods.png" mode="aspectFill"></image>
 						<text>待发货</text>
 					</view>
 					<view class="navbox-item" @click="handleOrder(5)">
-						<image src="https://hdtobs.obs.cn-north-4.myhuaweicloud.com/hdt/yqx_icon.svg" mode="aspectFill"></image>
+						<image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/after_sales.png" mode="aspectFill"></image>
 						<text>已取消</text>
 					</view>
 				</view>
@@ -42,7 +42,7 @@
 					 :current="tabIndex"
 					 :scrollable="true"
 					 :list="tabs"  
-					 lineColor="#DA251C"
+					 lineColor="#2BC7B9"
 					@change="tabChange">
 					</u-tabs>
 				</view>
@@ -363,7 +363,7 @@
 			background-color: #f5f5f5;
 			.my-integral{
 				box-shadow: 0px 0px 5px 2px rgba(0,0,0,0.05);
-				background: linear-gradient(#DA251C, #E2C99E);
+				background: linear-gradient(#2BC7B9, #a0f6ff);
 				border-radius: 30rpx;
 				display: flex;
 				align-items: flex-start;
@@ -399,7 +399,7 @@
 						padding: 10rpx 15rpx;
 						font-size: 20upx;
 						font-family: PingFang SC;
-						color: #DA251C;
+						color: #2BC7B9;
 					}
 				}
 			}
@@ -452,7 +452,7 @@
 						width: 100%;
 						.price{
 							padding: 5rpx 10rpx;
-							background-color: #DA251C;
+							background-color: #2BC7B9;
 							border-radius: 30rpx;
 							font-size: 20upx;
 							font-family: PingFang SC;
@@ -462,7 +462,7 @@
 							font-size: 28rpx;
 							font-weight: bold;
 							font-family: PingFang SC;
-							color: #DA251C;
+							color: #2BC7B9;
 						}
 						.count{
 							font-size: 24upx;

+ 36 - 5
pages_user/user/integralOrderDetails.vue

@@ -108,7 +108,7 @@
 						</view>
 						<view class="item">
 							<text class="label">下单时间</text>
-							<text class="text">{{order.createTime}}</text>
+							<text class="text">{{formattedCreateTime}}</text>
 						</view>
 					 
 						<view   class="item">
@@ -158,7 +158,38 @@
 		onShow() {
 			this.getIntegralOrderById()
 		},
+		computed:{
+		formattedCreateTime() {
+			if (!this.order || !this.order.createTime) return '';
+			
+			// 如果是时间戳格式
+			if (typeof this.order.createTime === 'number') {
+				const date = new Date(this.order.createTime);
+				return this.formatDate(date);
+			}
+			
+			// 如果是字符串格式,尝试解析
+			const date = new Date(this.order.createTime);
+			if (!isNaN(date.getTime())) {
+				return this.formatDate(date);
+			}
+			
+			// 如果无法解析,返回原值
+			return this.order.createTime;
+		},	
+		},
 		methods: {
+			// 日期格式化方法
+			formatDate(date) {
+				const year = date.getFullYear();
+				const month = String(date.getMonth() + 1).padStart(2, '0');
+				const day = String(date.getDate()).padStart(2, '0');
+				const hours = String(date.getHours()).padStart(2, '0');
+				const minutes = String(date.getMinutes()).padStart(2, '0');
+				const seconds = String(date.getSeconds()).padStart(2, '0');
+				
+				return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+			},
 			getIntegralOrderById(){
 				var data={orderId:this.orderId};
 				getIntegralOrderById(data).then(res => {
@@ -224,8 +255,8 @@
 			top: 0;
 			left: 0;
 			z-index: 1;
-			background-color: #DA251C;
-			background: linear-gradient(#DA251C, #E2C99E);
+			background-color: #2BC7B9;
+			background: linear-gradient(#2BC7B9, #E2C99E);
 			border-radius: 0rpx 0rpx 100rpx 100rpx;
 		}
 		.inner{
@@ -358,7 +389,7 @@
 							display: inline-block;
 							padding: 0 6upx;
 							height: 30upx;
-							background: linear-gradient(90deg, #DA251C 0%, #E2C99E 100%);
+							background: linear-gradient(90deg, #2BC7B9 0%, #E2C99E 100%);
 							border-radius: 4upx;
 							margin-right: 10upx;
 							font-size: 22upx;
@@ -555,7 +586,7 @@
 				color: #666666;
 			}
 			&.pay{
-				background: #DA251C;
+				background: #2BC7B9;
 				color: #FFFFFF;
 			}
 			.contact-btn {

+ 5 - 6
pages_user/user/integralOrderList.vue

@@ -5,7 +5,7 @@
 			:current="current"
 			  :scrollable="true"
 			  :list="tabs"  
-			  lineColor="#DA251C"
+			  lineColor="#2BC7B9"
 			 @change="tabChange">
 			 </u-tabs>
 		</view>
@@ -79,8 +79,7 @@
 <script>
  import {getDictByKey} from '@/api/common.js'
  import {getIntegralOrderList,cannelOrder} from '@/api/integral.js'
- import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
- // import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  
  export default {
 	mixins: [MescrollMixin],
@@ -268,7 +267,7 @@
 						font-weight: 500;
 						line-height: 1;
 						&.success{
-							color: #DA251C;
+							color: #2BC7B9;
 						}
 						&.black{
 							color: #111111;
@@ -311,7 +310,7 @@
 								display: inline-block;
 								padding: 0 6upx;
 								height: 30upx;
-								background: linear-gradient(90deg, #DA251C 0%, #E2C99E 100%);
+								background: linear-gradient(90deg, #2BC7B9 0%, #E2C99E 100%);
 								border-radius: 4upx;
 								margin-right: 10upx;
 								font-size: 22upx;
@@ -422,7 +421,7 @@
 								color: #666666;
 							}
 							&.pay{
-								background: #DA251C;
+								background: #2BC7B9;
 								color: #FFFFFF;
 							}
 							.contact-btn {

+ 35 - 4
pages_user/user/integralOrderPay.vue

@@ -90,7 +90,7 @@
 							<text class="text">全款支付</text>
 						</view>
 						<label>
-							<radio :value="1" :checked="payType=='1'" color="#DA251C" />
+							<radio :value="1" :checked="payType=='1'" color="#2BC7B9" />
 						</label>
 					</view>
 				</radio-group>
@@ -109,6 +109,7 @@
 </template>
 
 <script>
+	import {getAddressList} from '@/api/address'
 	import {
 		getIntegralGoodsById,
 		createOrder
@@ -132,6 +133,7 @@
 			}
 		},
 		onLoad(option) {
+			this.getAddressList()
 			this.goodsId = option.goodsId;
 			var that = this;
 			uni.$on('updateAddress', (e) => {
@@ -144,6 +146,35 @@
 			this.getUserInfo();
 		},
 		methods: {
+			getAddressList(){
+				uni.showLoading({
+					title:"正在加载中"
+				})
+				getAddressList().then(
+					res => {
+						uni.hideLoading()
+						if(res.code==200){
+							const defaultAddress = res.data.find(item => item.isDefault == 1);
+							        
+							        if(defaultAddress){
+							          this.address = defaultAddress;
+									  this.addressId=defaultAddress.addressId
+							          console.log('找到默认地址:', defaultAddress);
+							        } else {
+							          // 如果没有找到默认地址,可以选择第一个地址或者设为null
+							          this.address = res.data.length > 0 ? res.data[0] : null;
+							          console.log('未找到默认地址,使用第一个地址或设为null');
+							        }
+						}else{
+							uni.showToast({
+								icon:'none',
+								title: "请求失败",
+							});
+						}
+					},
+					rej => {}
+				);
+			},
 			getUserInfo() {
 				getUserInfo().then(
 					res => {
@@ -349,7 +380,7 @@
 							display: inline-block;
 							padding: 0 6upx;
 							height: 30upx;
-							background: linear-gradient(90deg, #DA251C 0%, #E2C99E 100%);
+							background: linear-gradient(90deg, #2BC7B9 0%, #E2C99E 100%);
 							border-radius: 4upx;
 							margin-right: 10upx;
 							font-size: 22upx;
@@ -578,7 +609,7 @@
 			font-family: PingFang SC;
 			font-weight: 400;
 			color: #FFFFFF;
-			background: #DA251C;
+			background: #2BC7B9;
 			border-radius: 10upx;
 		}
 	}
@@ -735,7 +766,7 @@
 						color: #fff;
 						text-align: center;
 						line-height: 0.44 * 100rpx;
-						background-color: #DA251C;
+						background-color: #2BC7B9;
 
 						.gray {
 							background-color: #ccc;

+ 33 - 1
pages_user/user/integralOrderPaySuccess.vue

@@ -24,7 +24,7 @@
 				</view>
 				<view class="item">
 					<text class="label">兑换时间</text>
-					<text class="text">{{order.createTime}}</text>
+					<text class="text">{{formattedCreateTime}}</text>
 				</view>
 				 
 			</view>
@@ -50,7 +50,39 @@
 			this.orderId=option.orderId; 
 			this.getIntegralOrderById();
 		},
+		computed:{
+		formattedCreateTime() {
+			if (!this.order || !this.order.createTime) return '';
+			
+			// 如果是时间戳格式
+			if (typeof this.order.createTime === 'number') {
+				const date = new Date(this.order.createTime);
+				return this.formatDate(date);
+			}
+			
+			// 如果是字符串格式,尝试解析
+			const date = new Date(this.order.createTime);
+			if (!isNaN(date.getTime())) {
+				return this.formatDate(date);
+			}
+			
+			// 如果无法解析,返回原值
+			return this.order.createTime;
+		},	
+		},
 		methods: {
+			// 日期格式化方法
+			formatDate(date) {
+				const year = date.getFullYear();
+				const month = String(date.getMonth() + 1).padStart(2, '0');
+				const day = String(date.getDate()).padStart(2, '0');
+				const hours = String(date.getHours()).padStart(2, '0');
+				const minutes = String(date.getMinutes()).padStart(2, '0');
+				const seconds = String(date.getSeconds()).padStart(2, '0');
+				
+				return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+			},
+			
 			getIntegralOrderById(){
 				var data = {orderId:this.orderId};
 				var that=this;

+ 3 - 3
pages_user/user/integralPayment.vue

@@ -358,7 +358,7 @@
 	 		font-family: PingFang SC;
 	 		font-weight: 400;
 	 		color: #FFFFFF;
-	 		background: #DA251C;
+	 		background: #2BC7B9;
 	 		border-radius: 10upx;
 			position: relative;
 	 	}
@@ -371,8 +371,8 @@
 			font-size: 34upx;
 			font-family: PingFang SC;
 			font-weight: 400;
-			color: #DA251C;
-			border: 1rpx solid #DA251C;
+			color: #2BC7B9;
+			border: 1rpx solid #2BC7B9;
 			border-radius: 10upx;
 			position: relative;
 			.share-btn {

BIN
static/images/points_title.png


BIN
unpackage.zip


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików