Przeglądaj źródła

feat:: 寄售列表 寄售详情 商品列表信息优化

DaMowang 3 lat temu
rodzic
commit
919b6b5ba4

+ 18 - 15
src/pages/account/consignment.vue

@@ -10,16 +10,16 @@
 		<view class="con">
 			<view class="goods flex_c" v-for="(item,index) in goods" :key="index" @tap="navToSpeedUp(item,index)">
 				<view class="flex_r">
-					<image class="goods_img" :src="item.ojsImg" mode=""></image>
+					<image class="goods_img" :src="item.original_img" mode=""></image>
 					<view class="goods_info flex_c flex_jc">
-						<view class="goods_name ellipsis">{{item.ojsName}}</view>
-						<view class="period">寄售数量:{{item.ojsCount}}套</view>
+						<view class="goods_name ellipsis">{{item.goods_name}}</view>
+						<view class="period">寄售数量:{{item.surplus_num}}套</view>
 					</view>
-					<view class="goods_status flex_grow flex_r flex_je" :class="item.ojsType == 1 ? 'g_color' : item.ojsType == 2 ? 'y_color' : 'r_color'">
-						{{item.ojsType == 1 ? '寄售中' : item.ojsType == 2 ? '寄售成功' : '寄售失败'}}
+					<view class="goods_status flex_grow flex_r flex_je" :class="item.status === 0 ? 'g_color' : item.status == 1 ? 'g_color' : item.status == 2 ? 'y_color' : 'r_color'">
+						{{item.status === 0 ? '寄售中' : item.status == 1 ? '寄售成功' : item.status == 2 ? '寄售失败' : '寄售转邮递'}}
 					</view>
 				</view>
-				<view class="goods_time">{{item.ojsTime}}</view>
+				<view class="goods_time">{{$day(item.start_sell_time*1000).format("YYYY-MM-DD HH:mm:ss")}}</view>
 			</view>
 		</view>
 		<!-- 寄售列表-end -->
@@ -163,15 +163,18 @@ import uniPopup from '@/components/uni-popup/uni-popup.vue'
 				this.pay_way = i;
 			},
 			// 跳转加速
-			navToSpeedUp:function(item,index){
-				if(item.ojsType != 3){
-					uni.navigateTo({
-						url:'/pages/speed-up/index?id=' + item.ojsId
-					})
-				}else if(item.ojsType == 3){
-					this.selectIndex = index
-					this.$refs.conversion.open()
-				}
+			navToSpeedUp(item,index){
+				this.goto("/pages/speed-up/index",{id:item.id})
+
+				// if(item.ojsType != 3){
+				// 	uni.navigateTo({
+				// 		url:'/pages/speed-up/index?id=' + item.id
+				// 	})
+				// }
+				// else if(item.ojsType == 3){
+				// 	this.selectIndex = index
+				// 	this.$refs.conversion.open()
+				// }
 			},
 			// 关闭立即兑换弹窗
 			closePopup:function(){

+ 5 - 1
src/pages/index/index.vue

@@ -59,7 +59,7 @@
                         <!-- <text class="product-price-favour">¥{{i.originalPrice}}</text> -->
                         <!-- <text class="product-tip">{{i.tip}}</text> -->
                     </view>
-                    <view class="product-txt">{{ i.give_integral + "积分" }}</view>
+                    <view class="product-txt">赠送{{ i.give_integral ? i.give_integral + '批发积分' : i.give_cha_bao + '茶宝'}}</view>
                 </view>
                 <view class='fz_w_text mar_t20 mar_b20'>让数字经济赋能美好生活!</view>
             </view>
@@ -333,6 +333,8 @@ export default {
     width: 100%;
     overflow: hidden;
     line-height: 1.5;
+    font-size: 28rpx;
+    color: #121212;
   }
 
   .product-price {
@@ -343,6 +345,7 @@ export default {
 
   .product-price-original {
     color: #18bb88;
+    font-size: 32rpx;
   }
 
   .product-price-favour {
@@ -362,6 +365,7 @@ export default {
 
   .product-unit {
     font-size: 24rpx;
+    color: #18bb88;
   }
 
   .product-txt {

+ 3 - 12
src/pages/my/login.vue

@@ -97,18 +97,6 @@ export default {
             });
         },
 
-        changVerifyimage() {
-            let MathRandom = Math.random();
-            this.verifyimage = this.$hosts.Hhost + "login/login/verifyimage.do?random=" + MathRandom;
-        },
-        getKey() {
-            get("login/login/getKey.do").then(res => {
-                if (res.resultCode == 1) {
-                    this.signKey = res.data.key
-                }
-            })
-        },
-
         getVerifyCode() {
             console.log(appEv);
             if (!this.isPhone(this.formD2.mobile)) {
@@ -119,6 +107,9 @@ export default {
                 mobile: this.formD2.mobile
             }).then((res) => {
                 if (res.code === 0) {
+
+                    this.formD2.captcha = res.data.code
+
                     let number = 59;
                     let as = setInterval(() => {
                         this.msgNum = number + "s后重发"

+ 1 - 1
src/pages/product/productRetail.vue

@@ -11,7 +11,7 @@
                         <view class="info_price"><text>¥</text>{{item.price}}</view>
                         <!-- <image class="info_cart" src="/static/cart.png" mode="" @tap.stop="OpenShopping(index)"></image> -->
                     </view>
-                    <view class="info_hint">赠送 {{item.give_integral ? item.give_integral + ' 积分' : item.give_cha_bao + ' 茶宝'}}</view>
+                    <view class="info_hint">赠送{{item.give_integral ? item.give_integral + '批发积分' : item.give_cha_bao + '茶宝'}}</view>
                 </view>
             </view>
         </view>

+ 1 - 1
src/pages/product/productWholesale.vue

@@ -5,7 +5,7 @@
             <image class="list_img" :src="item.original_img"></image>
             <view class="list_info flex_c flex_jb">
                 <view class="info_name">{{item.goods_name}}</view>
-                <view class="info_msg">{{item.price}}</view>
+                <view class="info_msg">{{item.price}}元+{{item.trade_num}}批发积分+{{item.cha_bao}}茶宝</view>
                 <view class="info_btn_con flex_r flex_je">
                     <view class="info_btn flex_r flex_ac flex_jc">购买</view>
                 </view>

+ 21 - 29
src/pages/speed-up/index.vue

@@ -2,14 +2,12 @@
 	<view class="container">
 		<!-- 匹配周期 -->
 		<view class="matching mar_t20 flex_r flex_ac flex_jb">
-			<view class="match_name">{{detail.type == 1 ? '匹配中' : '匹配成功'}}</view>
+			<view class="match_name">{{detail.status === 0 ? '寄售中' : detail.status == 1 ? '寄售成功' : detail.status == 2 ? '寄售失败' : '寄售转邮递'}}</view>
 			<view class="match_day flex_r flex_ae">
-				<block v-if="detail.type == 1">
+				<block v-if="detail.status === 0">
 					<text>{{dayNum}}</text>天 <view style="margin-left: 20rpx;">{{timeNum}}</view>
 				</block>
-				<block v-else>
-					{{detail.typeTime}}
-				</block>
+				<block v-else>{{detail.typeTime}}</block>
 			</view>
 		</view>
 		<!-- 匹配周期-end -->
@@ -19,7 +17,7 @@
 			<view class="up_con flex_c">
 				<view class="up_name">已加速</view>
 			</view>
-			<view class="match_day flex_r flex_ae"><text>{{speedUpDayNum}}</text>天</view>
+			<view class="match_day flex_r flex_ae"><text>{{detail.speed_days }}</text>天</view>
 		</view>
 		<!-- 加速-end -->
 		
@@ -80,23 +78,16 @@ import cmdProgress from "@/components/cmd-progress/cmd-progress.vue"
 		data() {
 			return {
 				pro_num:0,
-				detail:'',
+				detail: {},
 				ojsId:'',
 				time:'',
 
 				dayNum: '', //剩余天数
 				timeNum: '', //剩余时间(减去整天数过后的)
-				speedUpDayNum: "",//加速天数
+				// speedUpDayNum: "",//加速天数
 			};
 		},
 		onLoad:function(e){
-			// let timer = setInterval(()=>{
-			// 	if(this.pro_num<50){
-			// 		this.pro_num = this.pro_num + 10
-			// 	}else{
-			// 		clearInterval(timer)
-			// 	}
-			// },100)
 			this.ojsId = e.id;
 			this.loadData()
 		},
@@ -104,20 +95,21 @@ import cmdProgress from "@/components/cmd-progress/cmd-progress.vue"
 			clearInterval(tim)
 		},
 		methods:{
-			loadData:function(){
-				let that = this;
+			loadData(){
 				let data = {
-					orderId:this.ojsId
+					consignment_id:this.ojsId
 				}
-				u_post("ShuZiTeaYW/ojs/ojsDay",data).then(res => {
-					if(res.status == 200){
-						let da = res.ojsDetail;
-						let num1 = da.oCountqd2 > da.oCountqd1 ? da.oCountqd1 : da.oCountqd2; //签到加速天数
-						let num2 = da.oCounttg2 > da.oCounttg1 ? da.oCounttg1 : da.oCounttg2; //推广签到天数
-						that.speedUpDayNum =  (num1 + num2) > da.oCountSX ? da.oCountSX : num1 + num2;
+				post("goods/consignmenDetail",data).then(res => {
+					if(res.code === 0){
+						let da = res.data.data;
+						this.detail = da;
+						if(da.status === 0) this.timeCalculate(da);
+
+
+						// let num1 = da.oCountqd2 > da.oCountqd1 ? da.oCountqd1 : da.oCountqd2; //签到加速天数
+						// let num2 = da.oCounttg2 > da.oCounttg1 ? da.oCounttg1 : da.oCounttg2; //推广签到天数
+						// that.speedUpDayNum =  (num1 + num2) > da.oCountSX ? da.oCountSX : num1 + num2;
 
-						that.detail = da;
-						if(da.type == 1) that.timeCalculate(da);
 					}
 				})
 			},
@@ -125,11 +117,12 @@ import cmdProgress from "@/components/cmd-progress/cmd-progress.vue"
 				// console.log(this.$day(data.createTime).add(data.ojsDay - this.speedUpDayNum, 'day').format("YYYY-MM-DD HH:mm:ss"));
 				// console.log(this.$day().subtract(data.ojsDay - this.speedUpDayNum, 'day').format("YYYY-MM-DD HH:mm:ss"));
 
-				let endTime = this.$day(data.createTime).add(19 - this.speedUpDayNum, 'day').unix();
+				let endTime = data.end_sell_time;
 				let dayNum = parseInt((endTime - this.$day().unix()) / 86400); //剩余整天数
 				let timeNum = (endTime - this.$day().unix()) % 86400; //剩余时间(减去整天数过后的)
 				timeNum  = timeNum > 0 ? timeNum : 0;
 				this.dayNum = dayNum;
+
 				let that = this;
 				let time = setInterval(()=>{
 					if(timeNum > 1){
@@ -157,8 +150,7 @@ import cmdProgress from "@/components/cmd-progress/cmd-progress.vue"
 					let min = parseInt(timeNum / 60 % 60) > 9 ? parseInt(timeNum / 60 % 60) : '0' + parseInt(timeNum / 60 % 60)
 					let sec = parseInt(timeNum % 60) > 9 ? parseInt(timeNum % 60) : '0' + parseInt(timeNum % 60)
 					that.timeNum = hour + ':' + min + ':' + sec;
-				},1000)
-
+				},1000);
 			},
 			getTimer:function(timer){
 				var date;

+ 2 - 5
src/request/request.js

@@ -48,11 +48,8 @@ uni.addInterceptor('request', {
 				icon: "none",
 			});
 			setTimeout(() => {
-				// #ifdef  H5
-				goto("/pages/my/login")
-				// #endif
-				// #ifdef  APP
-				goto("/pages/my/login")
+				// #ifdef  H5 || APP-PLUS
+				goto("/pages/my/login");
 				// #endif
 				// #ifdef  MP-WEIXIN
 				uni.switchTab({