DaMowang 3 tahun lalu
induk
melakukan
da958bbc5b

+ 4 - 4
src/components/goodsList.vue

@@ -2,15 +2,15 @@
     <view class="product-list">
         <view class="product" v-for="(i, s) in productList" :key="s" @click="NavToGoodsDetail(i.id,i.type)">
             <view class="image-view">
-                <image class="product-image" :src="i.goodsThumbnailUrl"></image>
+                <image class="product-image" :src="i.original_img"></image>
             </view>
-            <view :class="['product-title', 'ellipsis' + long]">{{ i.goods.goods_name }}</view>
+            <view :class="['product-title', 'ellipsis' + long]">{{ i.goods_name }}</view>
             <view class="product-price">
-                <text class="product-price-original"><text class="product-unit">¥</text>{{ type == 2 ? i.trade_price : i.cost_price }}</text>
+                <text class="product-price-original"><text class="product-unit">¥</text>{{ i.price }}</text>
                 <!-- <text class="product-price-favour">¥{{i.originalPrice}}</text> -->
                 <!-- <text class="product-tip">{{i.tip}}</text> -->
             </view>
-            <view class="product-txt">{{ i.trade_give_num }}</view>
+            <view class="product-txt">{{ type == 3 ? i.give_cha_bao + "茶宝" : i.give_integral + "积分" }}</view>
         </view>
         <view class='fz_w_text mar_t20 mar_b20'>茶,让生活更美好!</view>
     </view>

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

@@ -48,7 +48,7 @@
         </view>
         <view class="list_bar">
             <div class="tit">猜你喜欢</div>
-            <goodslist :long="1" type="1" />
+            <goodslist :long="1" type="3" />
         </view>
     </div>
 </template>

+ 2 - 2
src/pages/my/login.vue

@@ -7,7 +7,7 @@
         <view class="phoneL" v-if="LoginType == 1">
             <view class="clearfix"><input v-model="formD2.mobile" placeholder="请输入手机号" type="number" maxlength="11" /></view>
             <view class="clearfix">
-                <input v-model="formD2.captcha" placeholder="请输入验证码" confirm-type="go" type="number" maxlength="6" class="w70" />
+                <input v-model="formD2.captcha" placeholder="请输入验证码" confirm-type="go" type="number" maxlength="5" class="w70" />
                 <view @click="getVerifyCode" :class="{w30:true,corb:msgNum!=='获取验证码'}">{{msgNum}}</view>
             </view>
             <view v-if="signIn" class="clearfix">
@@ -138,7 +138,7 @@ export default {
             if (this.LoginType == 1) {
                 let m = this.formD2.mobile
                 let v = this.formD2.captcha
-                if (m && v && v.length == 6 && this.isPhone(m)) this.ISFill = true
+                if (m && v && v.length == 5 && this.isPhone(m)) this.ISFill = true
                 else this.ISFill = false
             } else {
                 let u = this.formD.username

+ 17 - 48
src/pages/product/p_details.vue

@@ -15,30 +15,31 @@
 		<!-- 轮播图-end -->
 		
 		<!-- 价格信息栏 -->
-		<!-- <view class="price_info flex_r flex_ac flex_jb">
-			<view class="price" :class="type == 2 ? 'samll' : ''"><text v-if="type != 2"></text>{{type != 2 ? detail.price : detail.pfCombination}}</view>
+		<view class="price_info flex_r flex_ac flex_jb">
+			<view class="price" :class="type == 2 ? 'samll' : ''">¥{{detail.cost_price}}</view>
 			<view class="price_span flex_r flex_ac flex_je">
 				<view class="triangle"></view>
-				<view class="span_conten flex_r flex_ac flex_jc">{{type == 1 ? '零售专区' : type == 2 ? '批发专区' : type == 3 ? '合伙人套餐' : type == 4 ? 'CHA专区' : '今日值得买'}}</view>
+				<view class="span_conten flex_r flex_ac flex_jc">{{goodsDa.type == 1 ? "零售专区" : goodsDa.type == 2 ? "批发专区" : goodsDa.type == 3 ? "精品专区" : "今日值买"}}</view>
 			</view>
-		</view> -->
+		</view>
 		<!-- 价格信息栏-end -->
 		
 		<!-- 标题信息栏 -->
-		<!-- <view class="title_info">
-			<view class="goods_name">{{ type != 3 ? detail.goodsName : detail.title}}</view>
+		<view class="title_info">
+			<view class="goods_name">{{ detail.goods.goods_name}}</view>
 			<view class="goods_subName">{{detail.goodsMsg}}</view>
-		</view> -->
+		</view>
 		<!-- 标题信息栏-end -->
 		
 		<!-- 产品简介 -->
-		<!-- <view class="brief mar_t20">
+		<view class="brief mar_t20">
 			<view class="brief_title flex_r flex_ac">产品简介</view>
 			<view class="brief_con">
-				<jyfParser :html="detail.goodsDesc" ref="jyf"></jyfParser>
-				<image :lazy-load="true" style="width: 100%;display: block;" v-for="(item,index) in detail.goodsDetailesImage" :key="index" :src="item" mode="widthFix"></image>
+				<view v-html="detail.goods.goods_content"></view>
+				<!-- <jyfParser :html="detail.goods.goods_content" ref="jyf"></jyfParser> -->
+				<!-- <image :lazy-load="true" style="width: 100%;display: block;" v-for="(item,index) in detail.goodsDetailesImage" :key="index" :src="item" mode="widthFix"></image> -->
 			</view>
-		</view> -->
+		</view>
 		<!-- 产品简介-end -->
 		
 		<!-- 底部导航组件 -->
@@ -138,10 +139,12 @@ import authorizeModule from '@/components/authorize-module/index'
 					}
 				],
 				btnIndex : 0 ,// 用户点击按钮事件判断 0:加入购物车;1:立即购买
-				type: null ,// 商品类型,1:零售,2:批发;3:套餐;
+				type: null ,// 商品类型,1零售 2批发 3精品 4今日值买
 				goodsId:'' ,// 商品ID
 				id:'' ,//合伙人套餐ID
-				detail:'' ,// 商品详情
+				detail: {
+					goods:{}
+				} ,// 商品详情
 				checked:false, //是否选中协议
 				buyNum: 1 ,//购买数量
 				pfway: "0" ,// 批发
@@ -154,43 +157,9 @@ import authorizeModule from '@/components/authorize-module/index'
 		onLoad:function(e){
 			this.goodsDa = e;
 			this.userinfo = uni.getStorageSync('userinfo');
-			// this.type=e.type
-			// if(e.type == 3){
-			// 	this.id = e.id
-			// }else{
-			// 	this.goodsId = e.id
-			// }
-			// if(e.type == 3 || e.type == 2 || e.type == 4 || e.type == 7){
-			// 	this.buttonGroup.shift()
-			// }
-			// //推荐人ID
-			// if (e.agentId) {
-			//     app.globalData.agentId = e.agentId;
-			// }
-			// if (e && e.scene){
-			//     var scene = decodeURIComponent(e.scene).split("&");
-			//     if (scene.length > 0) {
-			//         var agentId = scene[0].split(":");
-			//         app.globalData.agentId = agentId[1] && agentId[1] != '' ? agentId[1] : app.globalData.agentId;
-			//         var goodsId = scene[1].split(":");
-			//         this.goodsId = goodsId[1] && goodsId[1] != '' ? goodsId[1] : ''
-			//     }
-			// }
 			this.loadData(e)
 		},
-		onShow:function(){
-			// let that = this;
-			// let userId = app.globalData.systemUserInfo && app.globalData.systemUserInfo.userId ? app.globalData.systemUserInfo.userId : '';
-			// if (!userId || userId == '' || userId==undefined) {
-			// 	that.showAuth=true
-			// 	appEv.authorizeUserInfo(res=>{
-			// 		if(res){
-			// 			that.shopInfo=app.globalData.shopInfo
-			// 			that.showAuth=false
-			// 		}
-			// 	})
-			// }
-		},
+		onShow:function(){},
 		methods:{
 			// 商品详情信息
 			loadData(da){

+ 6 - 4
src/pages/to-pay-list/index.vue

@@ -27,11 +27,11 @@
 		
 		<!-- 商品信息 -->
 		<view class="goods_info mar_t20">
-			<view class="info_type">专区</view>
+			<view class="info_type">{{modularName}}</view>
 			<view class="goods flex_r">
 				<image class="goods_img" :src="goodsInfo.goods.original_img" mode=""></image>
 				<view class="goods_con flex_c flex_jc flex_jb">
-					<view class="goods_name">{{goodsInfo.goods.goods_name}}</view>
+					<view class="goods_name ellipsis2">{{goodsInfo.goods.goods_name}}</view>
 					<view class="flex_r flex_ac flex_jb">
 						<view class="goods_msg">{{Data.type == 2 ? goodsInfo.trade_num + '消费积分' + '¥' + goodsInfo.trade_price : '¥' + goodsInfo.cost_price}}</view>
 						<view class="goods_num">x {{Data.num}}</view>
@@ -70,7 +70,7 @@
 			</view>
 			<view class="order_list flex_r flex_ac flex_jb" v-if="Data.type != 5">
 				<view class="list_name flex_r flex_jb"><text>商</text><text>品</text><text>金</text><text>额</text></view>
-				<view class="list_con">¥{{basicsInfo.goodsTotalPrice}}</view>
+				<view class="list_con">¥{{Data.type == 2 ? goodsInfo.trade_price : goodsInfo.cost_price}}</view>
 			</view>
 			<view class="order_list flex_r flex_ac flex_jb" v-if="Data.type == 5">
 				<view class="list_name flex_r flex_jb"><text>消</text><text>费</text><text>积</text><text>分</text></view>
@@ -121,8 +121,10 @@ import { get, post, u_post } from "@/request/api.js";
 		onLoad(e){
 			this.Data = e
 			this.loadData(e)
-			// this.loadAddress()
 			this.userinfo = uni.getStorageSync('userinfo');
+
+			// 1零售 2批发 3精品 4今日值买
+			this.modularName = e.type == 1 ? "零售专区" : e.type == 2 ? "批发专区" : e.type == 3 ? "精品专区" : "今日值买"
 		},
 		methods:{
 			loadData(da){