Kaynağa Gözat

与最新版本合并

liuguofeng 6 ay önce
ebeveyn
işleme
7054a59be3
58 değiştirilmiş dosya ile 2596 ekleme ve 2725 silme
  1. 7 7
      jiaoyu_mp/pages.json
  2. 4 1
      jiaoyu_mp/pages/car/order.vue
  3. 5 2
      jiaoyu_mp/pages/course/index.vue
  4. 25 30
      jiaoyu_mp/pages/index/index.vue
  5. 94 99
      jiaoyu_mp/pages/orders/completion.vue
  6. 210 0
      jiaoyu_mp/pages/orders/confirm.vue
  7. 2 1
      jiaoyu_mp/pages/orders/index.vue
  8. 1431 1489
      jiaoyu_mp/pages/product/index.vue
  9. 47 104
      jiaoyu_mp/pages/score/index.vue
  10. 39 40
      jiaoyu_mp/pages/score/product.vue
  11. 2 5
      jiaoyu_mp/pages/user/index.vue
  12. 0 167
      jiaoyu_mp/pages/user/info.vue
  13. 28 36
      jiaoyu_mp/pagesA/coupon/couponproductlist.vue
  14. 25 74
      jiaoyu_mp/pagesA/course/reservation.vue
  15. 31 6
      jiaoyu_mp/pagesA/course/usercourse.vue
  16. 1 1
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/app.js
  17. 2 2
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/app.json
  18. 16 18
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/common/assets.js
  19. 1 0
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/common/vendor.js
  20. 2 2
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/car/index.js
  21. 4 2
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/car/order.js
  22. 4 0
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/course/index.wxss
  23. 3 17
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/index/index.js
  24. 1 3
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/index/index.json
  25. 1 1
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/index/index.wxml
  26. 9 6
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/index/index.wxss
  27. 5 15
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/completion.js
  28. 1 1
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/completion.wxml
  29. 128 0
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/confirm.js
  30. 6 0
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/confirm.json
  31. 1 0
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/confirm.wxml
  32. 70 0
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/confirm.wxss
  33. 7 5
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/index.js
  34. 1 1
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/index.wxml
  35. 146 77
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/product/index.js
  36. 0 0
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/product/index.wxml
  37. 52 115
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/product/index.wxss
  38. 3 24
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/index.js
  39. 1 3
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/index.json
  40. 1 1
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/index.wxml
  41. 37 61
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/index.wxss
  42. 32 34
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/product.js
  43. 0 0
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/product.wxml
  44. 19 7
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/product.wxss
  45. 4 4
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/index.js
  46. 1 3
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/index.wxss
  47. 0 73
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/info.js
  48. 0 4
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/info.json
  49. 0 1
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/info.wxml
  50. 0 74
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/info.wxss
  51. 6 3
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pagesA/coupon/couponproductlist.js
  52. 1 1
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pagesA/coupon/couponproductlist.wxml
  53. 15 18
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pagesA/coupon/couponproductlist.wxss
  54. 29 77
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pagesA/course/reservation.js
  55. 32 7
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pagesA/course/usercourse.js
  56. 1 1
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/pagesA/course/usercourse.wxml
  57. 2 1
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/project.config.json
  58. 1 1
      jiaoyu_mp/unpackage/dist/dev/mp-weixin/project.private.config.json

+ 7 - 7
jiaoyu_mp/pages.json

@@ -56,13 +56,6 @@
 				"navigationStyle":"custom"
 			}
 		},
-		{
-			"path" : "pages/user/info",
-			"style" : 
-			{
-				"navigationBarTitleText" : "信息设置"
-			}
-		},
 		{
 			"path" : "pages/login/index",
 			"style" : 
@@ -157,6 +150,13 @@
 			{
 				"navigationBarTitleText" : "上课"
 			}
+		},
+		{
+			"path" : "pages/orders/confirm",
+			"style" :
+			{
+				"navigationBarTitleText" : "确认支付"
+			}
 		}
 	],
 	

+ 4 - 1
jiaoyu_mp/pages/car/order.vue

@@ -274,7 +274,10 @@
 					// 判断结果
 					if( re.code == 'success' ) {
 						// 跳转到报单完成页面
-						uni.redirectTo({url:`/pages/orders/completion?params=${encodedArray}`})
+            let orderInfo = re.data;
+            orderInfo = JSON.stringify(orderInfo)
+            let params = encodeURIComponent(orderInfo);
+            uni.navigateTo({url:`/pages/orders/confirm?params=${params}`});
 						return ;
 					}else{
 						uni.showToast({title: re.msg,icon:"none"})

+ 5 - 2
jiaoyu_mp/pages/course/index.vue

@@ -9,7 +9,7 @@
 					<view class="right">
 						<view class="title">
 							{{item.course_name}}
-							<!-- 拳击课程 -->
+							<!-- 拳击进阶课程拳击进阶课程发放 -->
 						</view>
 						<view class="skill">
 							{{item.desc}}
@@ -100,7 +100,6 @@
 				if( re.code == 'success' ){
 					if(re.data.last_page <= this.requestParam.page ) this.isLast = true;
 					this.productList = re.data.data;
-					// console.log(this.productList);
 				}
 			});
 		},
@@ -141,9 +140,13 @@
 				.right{
 					font-size: 24rpx;
 					margin-left: 20rpx;
+					width: 420rpx;
 					.title{
 						font-size: 36rpx;
 						font-weight: bold;
+						text-overflow: ellipsis;
+						overflow: hidden;
+						white-space: nowrap;
 					}
 					.skill{
 						font-size: 30rpx;

+ 25 - 30
jiaoyu_mp/pages/index/index.vue

@@ -52,21 +52,15 @@
 			
 			</view>
 		</view>
-		<view class="search_fixed">
-			<navigator url="/pagesA/search/index" class="search_box">
-				<view class="search_input" >
-					<text>搜索</text>
-				</view>
-				<uni-icons type="search" size="20" class="icon"></uni-icons>
-				<view class="search_btn" @click.stop="onChange()">
-					<uni-icons type="notification" size="30" ></uni-icons>
-				</view>
-			</navigator>
+		<view class="search_fixed" >
+		  <view class="search_box">
+		    <input class="search_input" type="text" v-model="requestParam.name" @input="searchChange" placeholder="请输入产品名称搜索" />
+		    <button class="search_btn" @click.stop="searchOpen()"  data-eventsync="true"> 搜索</button>
+		  </view>
 		</view>
 		<view class="to_bottom" v-if="isLast"> -----到底啦-----</view>
 	</view>
 </template>
-
 <script>
 	export default {
 		data() {
@@ -222,7 +216,7 @@
 		position: fixed;
 		margin: 0rpx auto;
 		padding: 20rpx 0rpx;
-		background-color: #ffffff;
+		background-color: #FFFFFF;
 		.search_box{
 			width: 590rpx;
 			height: 60rpx;
@@ -235,13 +229,12 @@
 				display: block;
 				font-size: 24rpx;
 				position: relative;
-				// border-top-left-radius: 40rpx;
-				// border-bottom-left-radius: 40rpx;
-				border-radius: 40rpx;
+				border-top-left-radius: 40rpx;
+				border-bottom-left-radius: 40rpx;
 				padding-left: 20rpx;
 				margin-left: 35rpx;
 				background-color: #FFFFFF;
-				 border: 2rpx solid #ffffff;
+				 border: 2rpx solid #dddddd;
 				text{
 					width: 120rpx;
 					height: 60rpx;
@@ -257,20 +250,22 @@
 				height: 60rpx;
 				line-height: 60rpx;
 			}
-			.search_btn{
-				top: 0rpx;
-				z-index: 999;
-				left: 660rpx;
-				color: #FFFFFF;
-				position: absolute;
-				display: block;
-				width: 80rpx;
-				height: 60rpx;
-				font-size: 24rpx;
-				margin: 0rpx 0rpx;
-				padding: 0rpx 0rpx;
-				line-height: 60rpx;
-			}
+      .search_btn{
+        top: 0rpx;
+        z-index: 9;
+        left: 610rpx;
+        color: #FFFFFF;
+        position: absolute;
+        display: block;
+        width: 120rpx;
+        height: 60rpx;
+        font-size: 24rpx;
+        margin: 0rpx 0rpx;
+        padding: 0rpx 0rpx;
+        line-height: 60rpx;
+        border-radius: 40rpx;
+        background-color: #E03519;
+      }
 		}
 	}
 	.banner_box{

+ 94 - 99
jiaoyu_mp/pages/orders/completion.vue

@@ -1,108 +1,103 @@
 <template>
-	<view class="order_completion_box">
-		<view class="order_completion_title">
-			<view class="completion_icon">
-				<uni-icons class="icon" type="checkmarkempty" size="40" color="#eeeeee"></uni-icons>
-			</view>
-			<view class="product_title" v-for="(item,index) in productTitleInfo" :key="index">
-				 {{item.name}} {{item.spec}} 特惠价 ¥{{item.price}}
-			</view>
-		</view>
-		<view class="nav_button">
-			<view class="nav_order" @click="navOrder()">
-				<text>查看订单</text>
-			</view>
-			<view class="nav_home" @click="navHome()">
-				<text>返回首页</text>
-			</view>
-		</view>
-	</view>
+  <view class="order_completion_box">
+    <view class="order_completion_title">
+      <view class="completion_icon">
+        <uni-icons class="icon" type="checkmarkempty" size="40" color="#eeeeee"></uni-icons>
+      </view>
+      <view class="product_title">
+        支付成功 ¥{{this.price}}
+      </view>
+    </view>
+    <view class="nav_button">
+      <view class="nav_order" @click="navOrder()">
+        <text>查看订单</text>
+      </view>
+      <view class="nav_home" @click="navHome()">
+        <text>返回首页</text>
+      </view>
+    </view>
+  </view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				//报单成功的商品信息
-				productTitleInfo:[]
-			}
-		},
-		onLoad(option) {
-			//接受参数
-			let productInfo =  option.params;
-			
-			if( productInfo ){
-				//解密参数
-				productInfo = decodeURIComponent(productInfo);
-				//转成js数组对象
-				productInfo	=  JSON.parse(productInfo);
-				this.productTitleInfo = productInfo;
-			}
-		},
-		onShow() {
+export default {
+  data() {
+    return {
+      //报单成功的商品信息
+      productTitleInfo:[],
+      price:''
+    }
+  },
+  onLoad(option) {
+    console.log(option);
+    //接受参数
+    this.price =  option.price;
 
-		},
-		methods: {
-			navOrder(){
-				uni.redirectTo({
-					url:"/pagesA/orders/userorder"
-				})
-			},
-			navHome(){
-				uni.switchTab({
-					url:"/pages/index/index"
-				})
-			},
-		}
-	}
+  },
+  onShow() {
+
+  },
+  methods: {
+    navOrder(){
+      uni.redirectTo({
+        url:"/pagesA/orders/userorder"
+      })
+    },
+    navHome(){
+      uni.switchTab({
+        url:"/pages/index/index"
+      })
+    },
+  }
+}
 </script>
 
 <style lang="less">
-	.order_completion_box{
-		display:block;
-		padding-bottom: 60rpx;
-		.order_completion_title{
-			display: block;
-			width: 630rpx;
-			// height: 300rpx;
-			margin: 30rpx auto;
-			line-height: 2.0;
-			.completion_icon{
-				width:150rpx;
-				height: 150rpx;
-				margin: 30rpx auto;
-				border-radius: 50%;
-				display: flex;
-				justify-content: center;
-				align-items: center; 
-				background-color: #00bba5;
-			}
-			.product_title{
-				text-align: center;
-				font-size: 24rpx;
-			}
-		}
-		.nav_button{
-			width: 630rpx;
-			height: 300rpx;
-			margin: 80rpx auto;
-			display: block;
-			line-height: 100rpx;
-			.nav_order{
-				text-align: center;
-				margin: 30rpx 0rpx;
-				border-radius: 60rpx;
-				background-color: #00bba5;
-				text{
-					color: #eeeeee;
-				}
-			}
-			.nav_home{
-				text-align: center;
-				border: 2rpx solid #00bba5;
-				margin: 30rpx 0rpx;
-				border-radius: 60rpx;
-			}
-		}
-	}
+.order_completion_box{
+  display:block;
+  padding-bottom: 60rpx;
+  .order_completion_title{
+    display: block;
+    width: 630rpx;
+    // height: 300rpx;
+    margin: 30rpx auto;
+    line-height: 2.0;
+    .completion_icon{
+      width:150rpx;
+      height: 150rpx;
+      margin: 30rpx auto;
+      border-radius: 50%;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      background-color: #00bba5;
+    }
+    .product_title{
+      text-align: center;
+      font-size: 24rpx;
+    }
+  }
+  .nav_button{
+    width: 630rpx;
+    height: 300rpx;
+    margin: 80rpx auto;
+    display: block;
+    line-height: 100rpx;
+    .nav_order{
+      text-align: center;
+      margin: 30rpx 0rpx;
+      border-radius: 60rpx;
+      background-color: #00bba5;
+      text{
+        color: #eeeeee;
+      }
+    }
+    .nav_home{
+      text-align: center;
+      border: 2rpx solid #00bba5;
+      margin: 30rpx 0rpx;
+      border-radius: 60rpx;
+    }
+  }
+}
 </style>

+ 210 - 0
jiaoyu_mp/pages/orders/confirm.vue

@@ -0,0 +1,210 @@
+<template>
+  <view class="whole">
+    <view class="pay">
+      <view class="header">
+        <div>
+          <view class="pay">支付金额</view>
+          <view class="payNum">
+            <span style="font-size: 34rpx;">¥</span>{{price}}
+          </view>
+        </div>
+      </view>
+      <view class="listPay">
+        <uni-icons type="weixin" size="60rpx" color="#00aa00"></uni-icons>
+        <view class="text">
+          <view class="wx">微信支付</view>
+          <view class="subWx">推荐使用微信支付</view>
+        </view>
+        <view class="btn">
+          <label class="radio">
+            <radio value="1" :checked="boolWx"
+                   color="#FFCC33" style="transform:scale(0.7)"
+                   @click="changePayType(1)" />
+          </label>
+        </view>
+      </view>
+<!--      <view class="listPay">
+        <uni-icons type="weibo" size="60rpx" color="#ff5500"></uni-icons>
+        <view class="text">
+          <view class="wx">线下支付(到付)</view>
+        </view>
+        <view class="btn">
+          <label class="radio">
+            <radio value="2" :checked="boolWb"
+                   color="#FFCC33" style="transform:scale(0.7)"
+                   @click="changePayType(3)" />
+          </label>
+        </view>
+      </view>-->
+      <view class="bootom">
+        <button type="warn" style="color: #fff;" @click="confirm">确认支付</button>
+      </view>
+    </view>
+
+  </view>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      boolWx: true,
+      boolWb: false,
+      payType: 1, //支付类型
+      price: 0, //支付金额
+      orderNo: "", //订单号
+      parentOrderNo: "", //父订单号
+      submiting: false//控制再次确认支付的弹出框
+    }
+  },
+  onLoad(options) {
+    //接受参数
+    let orderInfo =  options.params;
+    if( orderInfo ){
+      //解密参数
+      orderInfo = decodeURIComponent(orderInfo);
+      //转成js数组对象
+      orderInfo	=  JSON.parse(orderInfo);
+    }
+    this.price = orderInfo.pay_total
+    if (orderInfo.order_id) {
+      this.orderNo = orderInfo.order_id
+    } else {
+      this.parentOrderNo = orderInfo.snowflake_id
+    }
+  },
+  methods: {
+    // 选择支付方式
+    changePayType(type) {
+      if(1==type){
+        this.boolWx=true;
+        this.boolWb=false;
+      }else{
+        this.boolWx=false;
+        this.boolWb=true;
+      }
+      this.payType = type
+      console.log(this.payType,"this.payType");
+    },
+    // 确认支付
+    confirm() {
+      const that = this;
+      //微信支付
+      if(1===that.payType){
+        that.submiting = true;
+        this.pay();
+      }
+    },
+    //调起微信支付
+    pay(){
+      uni.login({
+        provider: 'weixin',
+        success: (loginRes) => {
+          // 登录成功,获取用户code
+          const { code } = loginRes;
+          // 微信支付下单
+          this.$http.request('api/wechat_pay/pay',{code:code,order_id:this.orderNo},'post').then((e)=>{
+            const price = this.price
+            // 成功的话
+            if( e.code == 'success'){
+              //获取openid
+              // 授权成功以后,调用登录
+              //调用微信官方支付接口弹出付款界面,输入密码扣款
+              wx.requestPayment({
+                timeStamp: e.data.timeStamp,  //时间戳
+                nonceStr:  e.data.nonceStr,   //随机字符串
+                package:   e.data.package,    //prepay_id
+                signType:  e.data.signType,   //签名算法MD5
+                paySign:   e.data.paySign,    //签名
+                success:function (res) {
+                  if (res.errMsg == "requestPayment:ok"){
+                    console.log('支付成功3', price)
+                    uni.navigateTo({url:`/pages/orders/completion?price=${price}`});
+                  }else{
+                    console.log('支付失败')
+                  }
+                },
+                fail:function (res) {
+                  console.log('支付失败', res)
+                }
+              })
+
+            }else{
+              console.log('支付失败2', e)
+              uni.showToast({
+                title: '支付失败2',
+                icon: 'none'
+              });
+            }
+          });
+        },
+        fail: (err) => {
+          console.log('uni.login 接口调用失败,无法获取openid', err);
+          uni.showToast({
+            title: '支付失败',
+            icon: 'none'
+          });
+        }
+      });
+    },
+  }
+}
+</script>
+
+<style lang="scss">
+.whole {
+  display: flex;
+  justify-content: center;
+
+  .header {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    text-align: center;
+    flex-wrap: wrap;
+    height: 300rpx;
+
+    .pay {
+      width: 100%;
+      color: #717171;
+    }
+
+    .payNum {
+      width: 100%;
+      font-size: 44rpx;
+      margin: 10rpx 0px 20rpx;
+    }
+  }
+
+  .pay {
+    width: 100%;
+
+    .listPay {
+      height: 130rpx;
+      display: flex;
+      align-items: center;
+
+      .uni-icons {
+        margin-left: 20rpx;
+      }
+
+      .text {
+        width: 40%;
+        margin: 0px 20rpx 0px;
+      }
+
+      .btn {
+        width: 40%;
+        text-align: right;
+      }
+    }
+
+    .bootom {
+      width: 90%;
+      margin: auto;
+      margin-top: 20rpx;
+    }
+  }
+
+}
+</style>

+ 2 - 1
jiaoyu_mp/pages/orders/index.vue

@@ -2,7 +2,8 @@
 	<view>
 		<view class="order_status_list">
 			<view class="order_status_item" :class="requestParam.status==0?'active':''" @click="setStatus(0)"> 全部 </view>
-			<view class="order_status_item" :class="requestParam.status==1?'active':''" @click="setStatus(1)"> 待跟进 </view>
+			<view class="order_status_item" :class="requestParam.status==1?'active':''" @click="setStatus(1)"> 待支付 </view>
+			<view class="order_status_item" :class="requestParam.status==2?'active':''" @click="setStatus(2)"> 待上课 </view>
 			<view class="order_status_item" :class="requestParam.status==8?'active':''" @click="setStatus(8)"> 已完成 </view>
 		</view>
 		<view class="to_bottom" v-if="!orderList.length"> -----还没有订单-----</view>

+ 1431 - 1489
jiaoyu_mp/pages/product/index.vue

@@ -1,1498 +1,1440 @@
 <template>
-	<page-meta :page-style="'overflow:'+(show?'hidden':'visible')"></page-meta>
-	<view>
-		<view class="goback" :style="{top:StatusBarHeight+ 'px'}" @click="goBack">
-			<uni-icons type="back" color="#fff" size="20"></uni-icons>
-		</view>
-		<view class="product_image_box">
-			<image class="product_image" :src="productInfo.thumb"></image>
-		</view>
-		<view class="product_info">
-			<view class="product_title_info">
-				<view class="product_title">
-					<text>{{productInfo.name}}</text>
-				</view>
-				<view class="product_subtitle">
-					<text>{{productInfo.spec}}</text>
-				</view>
-				<view class="price_stock">
-					<view class="product_price">
-						<text>¥{{productInfo.price}}</text>
-						<text class="product_market">¥{{productInfo.market_price}}</text>
-					</view> 
-					<view class="product_stock">库存{{productInfo.stock}}个</view>
-				</view>
-				<view class="product_coupon">
-					<view class="coupon_text">
-						优惠卷
-					</view>
-					<view class="coupon_info"   @click="openCoupon()">
-						<view class="text">
-							满50减10
-						</view>
-						<view class="icon">
-							>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-<!-- 		<view class="product_comment">
-			<view class="comment_num">
-				<view class="comment_num_title">
-					评论区(6000+)
-				</view>
-				<view class="comment_num_icon">
-					>
-				</view>
-			</view>
-			<view class="comment_list">
-				<view class="comment_left">
-					<view class="user_order_info">
-						<text class="user_name">Raindfa</text>
-						<text>黑色大款/XXL</text>
-					</view>
-					<view class="user_comment">
-						这个课程真不错这个课程真不错这个课程真不错
-					</view>
-				</view> 
-				<view class="comment_right">
-					<image src="" mode=""></image>
-				</view>
-			</view>
-		</view> -->
-		<view class="order_car">
-			<navigator url="/pages/index/index" open-type="switchTab" class="to_car" >
-				<image src="../../static/tabbar/score.png" class="car_icon" ></image>
-				<view class="text">
-					首页
-				</view>
-			</navigator>
-			<navigator url=" " open-type="switchTab" class="to_car" >
-				<image src="../../static/user_icon/user_favo.png" class="car_icon" ></image>
-				<view class="text">
-					收藏
-				</view>
-			</navigator>
-<!-- 			<button class="show_order" data-eventsync="true" @click="showSpecPopup(1)" >立即预约</button> -->
-			<button class="show_car" data-eventsync="true" @click="showSpecPopup(1)" >立即购买</button>
-		</view>
-		<view class="to_bottom"> --- 到底了 --- </view>
-		<uni-popup ref="specPopup" :show="true" type="bottom" class="popup" background-color="#FFFFFF" @change="popupChange" >
-			<view class="order_info">
-				<view class="custom_addr" v-if="specBtnType==1" @click="showAddrPopup()">
-					<view class="contact_user">
-						<text class="contact_none" v-if="!checkedAddr.id">请选择收货地址</text>
-						<text class="contact_name" >{{checkedAddr.contact_name}}</text>
-						<text class="contact_phone" >{{checkedAddr.contact_phone}}</text>
-						<text class="contact_more"> &gt;</text>
-					</view>
-					<view class="contact_addr">
-						{{checkedAddr.contact_province}} {{checkedAddr.contact_city}} {{checkedAddr.contact_area}} {{checkedAddr.contact_addr}}
-					</view>
-				</view>
-				<view class="car_item" >
-					<view class="box_left">
-						<image class="car_image" :src="productInfo.thumb" mode=""></image>
-					</view>
-					<view class="box_right">
-						<view class="car_name">{{productInfo.name}}</view>
-						<view class="stock_price">
-							<view class="product_price" v-if="isShowPrice">
-								<text>¥{{productInfo.price}} </text>
-								<text class="car_market">¥{{productInfo.market_price}}</text>
-							</view>
-							<view class="product_quantity_box">
-								<button class="product_quantity_sub" @click="changeQuantity(-1)" data-eventsync="true">
-									<image class="sub_icon" src="../../static/icon/sub_icon.png" mode=""></image>
-								</button>
-								<input type="number" class="product_quantity" placeholder="数量" v-model="quantity" @blur="changeQuantity(0)" ></input>
-								<button class="product_quantity_add" @click="changeQuantity(+1)" data-eventsync="true">
-									<image class="add_icon" src="../../static/icon/add_icon.png" mode=""></image>
-								</button>
-							</view>
-						</view>
-						<view class="product_stock">剩{{productInfo.stock}}个</view>
-					</view>
-				</view>
-				<view class="select_sku" >
-					<scroll-view scroll-y="true" class="scroll_max" >
-						<view class="product_attr" v-for="(spec,spec_index) in productInfo.product_attr" :key="spec_index">
-							<scroll-view scroll-y="true" class="scroll_y" >
-								<view class="spec_name">{{ spec.spec_name }}</view>
-								<view class="arrt_list">
-									<view class="arrt_option" :class="option.active?'active':''" v-for="(option,attr_index) in spec.attr_list" :key="attr_index" @click="attrChange(spec_index,attr_index)">
-										{{option.name}}
-									</view>
-								</view>
-							</scroll-view>
-						</view>
-					</scroll-view>
-				</view>
-
-				<!-- 选择优惠券 -->
-<!-- 				<view class="to_select_coupon" v-if="specBtnType==1" @click="openCoupon()">
-					<text>优惠券</text>
-					<view class="coupon_deduction">{{couponUsed}}</view>
-				</view> -->
-				<view class="order_price" v-if="specBtnType==1" >合计: ¥{{priceTotal}}</view>
-				<view class="order_btn">
-					<button class="to_order" @click="createOrder()" v-if="specBtnType==1" data-eventsync="true" >立即购买</button>
-					<!-- <button class="to_car" @click="createCart()" v-if="specBtnType==2" data-eventsync="true" >加入购物车</button> -->
-				</view>
-			</view>
-		</uni-popup>
-		<uni-popup ref="couponPopup" type="bottom" class="popup" background-color="#FFFFFF" >
-			<view class="popup_title">优惠券</view>
-			<view class="coupon_list">
-				<view class="coupon_item" v-for="(item,index) in couponList" @click="checkedCoupon(index)" :key="index">
-					<view class="box_left">
-						<view class="rebate" v-if="item.rebate_type == 1" > ¥{{item.rebate}}</view>
-						<view class="rebate" v-if="item.rebate_type == 2" > 打 {{item.rebate}} 折</view>
-						<view class="rebate" v-if="item.rebate_type == 3" > 赠 <text v-if="item.rebate_scope.length">
-								{{item.rebate_scope[0].product_name}}
-							</text> </view>
-						<view class="std_pay"> 满{{item.std_pay}}</view>
-					</view>
-					<view class="box_right">
-						<view class="coupon_title">
-							<view class="coupon_name" v-if="item.rebate_type == 1">满减券</view>
-							<view class="coupon_name" v-if="item.rebate_type == 2">折扣券</view>
-							<view class="coupon_name" v-if="item.rebate_type == 3">赠品券</view> 
-						</view>
-						<view class="product_scope">
-							<text class="" v-if="item.type_id == 1">限定商品可用</text>
-							<text class="" v-if="item.type_id == 2">全场可用</text>
-							<view class="check_label" >
-								<view class="isstd" v-if="!item.is_std">不可用</view> 
-								<image class="checkbox" v-if="item.is_std" :src="item.checked?'../../static/icon/checked.png':'../../static/icon/checkbox.png'"></image>
-							</view>
-						</view>
-						<view class="coupon_info">
-							<view class="coupon_exp">{{item.exp_time}} 到期</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</uni-popup>
-		<uni-popup ref="addrPopup" type="bottom" class="popup" background-color="#FFFFFF" >
-			<view class="popup_title">收货地址 <navigator url="/pages/addr/index?notify=addr" class="to_addr_page">管理</navigator> </view>
-			<view class="addr_list">
-				<view class="addr_item" v-for="(item,index) in addrList" :key="index" @click="checkedAddrItem(item)">
-					<view class="radio_label">
-						<image class="radio_icon" :src="item.id == checkedAddr.id? '../../static/icon/radioed.png' : '../../static/icon/radio.png'" ></image> 
-					</view>
-					<view class="contact_user">
-						<text class="contact_name">{{item.contact_name}}</text>
-						<text class="contact_phone">{{item.contact_phone}}</text>
-						<text class="contact_default" v-if="item.is_default">默认</text>
-					</view>
-					<view class="contact_addr">
-						{{item.contact_province}} {{item.contact_city}} {{item.contact_area}} {{item.contact_addr}}
-					</view>
-				</view>
-			</view>
-			<view class="create_box">
-				<navigator url="/pages/addr/index?notify=addr&type=create" class="create_addr"  >新建收货地址</navigator>
-			</view>
-		</uni-popup>
-	</view>
+  <page-meta :page-style="'overflow:'+(show?'hidden':'visible')"></page-meta>
+  <view>
+    <view class="goback" :style="{top:StatusBarHeight+ 'px'}" @click="goBack">
+      <uni-icons type="back" color="#fff" size="20"></uni-icons>
+    </view>
+    <view class="product_image_box">
+      <image class="product_image" :src="productInfo.thumb"></image>
+    </view>
+    <view class="product_info">
+      <view class="stock_price" v-if="isShowPrice">
+        <view class="product_price" >
+          <text>¥{{productInfo.price}} </text>
+          <text class="product_market">¥{{productInfo.market_price}} </text>
+        </view>
+      </view>
+      <view class="product_name">{{productInfo.name}}</view>
+      <view class="product_spec">
+        <view class="spec_name">{{productInfo.spec}}</view>
+        <view class="product_stock">剩{{productInfo.stock}}个</view>
+      </view>
+    </view>
+    <view class="product_business" v-if="productInfo.business_info.name">
+      <image class="logopic" :src="productInfo.business_info.logopic" ></image>
+      <view class="business_info">
+        <view class="business_name">
+          {{productInfo.business_info.name}}
+        </view>
+        <view class="business_desc">
+          {{productInfo.business_info.desc}}
+        </view>
+      </view>
+    </view>
+    <view class="product_description">
+      <rich-text :nodes="productInfo.description"></rich-text>
+    </view>
+    <view class="product_poster" v-if="productInfo.poster" >
+      <image class="product_image" :src="productInfo.poster" mode="widthFix"></image>
+    </view>
+    <view class="order_car">
+      <navigator url="/pages/car/index" open-type="switchTab" class="to_car" >
+        <image src="../../static/icon/car.png" class="car_icon" ></image>
+      </navigator>
+      <button class="show_order" data-eventsync="true" @click="showSpecPopup(1)" >立即购买</button>
+      <button class="show_car" data-eventsync="true" @click="showSpecPopup(2)" >加入购物车</button>
+    </view>
+    <view class="to_bottom"> --- 到底了 --- </view>
+    <uni-popup ref="specPopup" :show="true" type="bottom" class="popup" background-color="#FFFFFF" @change="popupChange" >
+      <view class="order_info">
+        <view class="custom_addr" v-if="specBtnType==1" @click="showAddrPopup()">
+          <view class="contact_user">
+            <text class="contact_none" v-if="!checkedAddr.id">请选择收货地址</text>
+            <text class="contact_name" >{{checkedAddr.contact_name}}</text>
+            <text class="contact_phone" >{{checkedAddr.contact_phone}}</text>
+            <text class="contact_more"> &gt;</text>
+          </view>
+          <view class="contact_addr">
+            {{checkedAddr.contact_province}} {{checkedAddr.contact_city}} {{checkedAddr.contact_area}} {{checkedAddr.contact_addr}}
+          </view>
+        </view>
+        <view class="car_item" >
+          <view class="box_left">
+            <image class="car_image" :src="productInfo.thumb" mode=""></image>
+          </view>
+          <view class="box_right">
+            <view class="car_name">{{productInfo.name}}</view>
+            <view class="stock_price">
+              <view class="product_price" v-if="isShowPrice">
+                <text>¥{{productInfo.price}} </text>
+                <text class="car_market">¥{{productInfo.market_price}}</text>
+              </view>
+              <view class="product_quantity_box">
+                <button class="product_quantity_sub" @click="changeQuantity(-1)" data-eventsync="true">
+                  <image class="sub_icon" src="../../static/icon/sub_icon.png" mode=""></image>
+                </button>
+                <input type="number" class="product_quantity" placeholder="数量" v-model="quantity" @blur="changeQuantity(0)" ></input>
+                <button class="product_quantity_add" @click="changeQuantity(+1)" data-eventsync="true">
+                  <image class="add_icon" src="../../static/icon/add_icon.png" mode=""></image>
+                </button>
+              </view>
+            </view>
+            <view class="product_stock">剩{{productInfo.stock}}个</view>
+          </view>
+        </view>
+        <view class="select_sku" >
+          <view class="product_attr" v-for="(spec,spec_index) in productInfo.product_attr" :key="spec_index">
+            <view class="spec_name">{{ spec.spec_name }}</view>
+            <view class="arrt_list">
+              <view class="arrt_option" :class="option.active?'active':''" v-for="(option,attr_index) in spec.attr_list" :key="attr_index" @click="attrChange(spec_index,attr_index)">
+                {{option.name}}
+              </view>
+            </view>
+          </view>
+        </view>
+        <!-- 选择优惠券 -->
+        <view class="to_select_coupon" v-if="specBtnType==1" @click="openCoupon()">
+          <text>优惠券</text>
+          <view class="coupon_deduction">{{couponUsed}}</view>
+        </view>
+        <view class="order_price" v-if="specBtnType==1" >合计: ¥{{priceTotal}}</view>
+        <view class="order_btn">
+          <button class="to_order" @click="createOrder()" v-if="specBtnType==1" data-eventsync="true" >立即下单</button>
+          <button class="to_car" @click="createCart()" v-if="specBtnType==2" data-eventsync="true" >加入购物车</button>
+        </view>
+      </view>
+    </uni-popup>
+    <uni-popup ref="couponPopup" type="bottom" class="popup" background-color="#FFFFFF" >
+      <view class="popup_title">优惠券</view>
+      <view class="coupon_list">
+        <view class="coupon_item" v-for="(item,index) in couponList" @click="checkedCoupon(index)" :key="index">
+          <view class="box_left">
+            <view class="rebate" v-if="item.rebate_type == 1" > ¥{{item.rebate}}</view>
+            <view class="rebate" v-if="item.rebate_type == 2" > 打 {{item.rebate}} 折</view>
+            <view class="rebate" v-if="item.rebate_type == 3" > 赠 <text v-if="item.rebate_scope.length">
+              {{item.rebate_scope[0].product_name}}
+            </text> </view>
+            <view class="std_pay"> 满{{item.std_pay}}</view>
+          </view>
+          <view class="box_right">
+            <view class="coupon_title">
+              <view class="coupon_name" v-if="item.rebate_type == 1">满减券</view>
+              <view class="coupon_name" v-if="item.rebate_type == 2">折扣券</view>
+              <view class="coupon_name" v-if="item.rebate_type == 3">赠品券</view>
+            </view>
+            <view class="product_scope">
+              <text class="" v-if="item.type_id == 1">限定商品可用</text>
+              <text class="" v-if="item.type_id == 2">全场可用</text>
+              <view class="check_label" >
+                <view class="isstd" v-if="!item.is_std">不可用</view>
+                <image class="checkbox" v-if="item.is_std" :src="item.checked?'../../static/icon/checked.png':'../../static/icon/checkbox.png'"></image>
+              </view>
+            </view>
+            <view class="coupon_info">
+              <view class="coupon_exp">{{item.exp_time}} 到期</view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </uni-popup>
+    <uni-popup ref="addrPopup" type="bottom" class="popup" background-color="#FFFFFF" >
+      <view class="popup_title">收货地址 <navigator url="/pages/addr/index?notify=addr" class="to_addr_page">管理</navigator> </view>
+      <view class="addr_list">
+        <view class="addr_item" v-for="(item,index) in addrList" :key="index" @click="checkedAddrItem(item)">
+          <view class="radio_label">
+            <image class="radio_icon" :src="item.id == checkedAddr.id? '../../static/icon/radioed.png' : '../../static/icon/radio.png'" ></image>
+          </view>
+          <view class="contact_user">
+            <text class="contact_name">{{item.contact_name}}</text>
+            <text class="contact_phone">{{item.contact_phone}}</text>
+            <text class="contact_default" v-if="item.is_default">默认</text>
+          </view>
+          <view class="contact_addr">
+            {{item.contact_province}} {{item.contact_city}} {{item.contact_area}} {{item.contact_addr}}
+          </view>
+        </view>
+      </view>
+      <view class="create_box">
+        <navigator url="/pages/addr/index?notify=addr&type=create" class="create_addr"  >新建收货地址</navigator>
+      </view>
+    </uni-popup>
+    <uni-popup ref="addFollow" type="center" class="center_popup" @change="popupChange">
+      <view class="add_follow">
+        <view class="close_area"><button class="close_btn" @click="closeAddFollow()">关闭</button></view>
+        <view class="info_alter">长按识别二维码添加客服</view>
+        <view class="qr_code_area">
+          <image v-if="followQrcode" :src="followQrcode" class="qr_code" mode="" show-menu-by-longpress></image>
+        </view>
+        <button class="save_btn" @click="saveImage()">保存图片添加客服</button>
+        <view class="rule_info">
+          <view class="">报单规则:</view>
+          <view class="">1、预约报单需要添加客服人员</view>
+          <view class="">2、添加完客服人员后返回小程序填写商家资质</view>
+          <view class="">3、开始预约报单</view>
+        </view>
+      </view>
+    </uni-popup>
+  </view>
 </template>
 <script>
-	export default {
-		data() {
-			return {
-				show:false, // 使用Popup组件时,阻止禁止滚动穿透
-				productInfo:{
-					id:0,
-					name:"",
-					price:"0.00",
-					market_price:"0.00",
-					spec:"",
-					stock:0,
-					thumb:"",
-					poster:"",
-					description:"",
-					business_info:{
-						name:"",
-						logopic:"",
-						desc:"",
-					},
-					product_attr:[],
-					product_sku:[],
-				},
-				requestParam:{
-					id:0,
-				},
-				// 数量
-				quantity:1,
-				// 总价
-				priceTotal:"0.00",
-				// 优惠券列表
-				couponList:[],
-				// 总价
-				priceTotal:'0.00',
-				// 优惠券使用
-				couponUsed:"去使用 >",
-				// 扣减金额
-				rebatePrice:0.00,
-				// 已经选择的优惠券ID
-				customCoupon: 0,
-				// 规格选择按钮类型
-				specBtnType: 1, // 1预约。2购物车
-				// 地址列表
-				addrList:[],
-				// 已选地址
-				checkedAddr:{
-					id:0,
-					contact_name:"",
-					contact_phone:"",
-					contact_province:"",
-					contact_city:"",
-					contact_area:"",
-					contact_addr:"",
-					is_default:0,
-				},
-				// 是否登录状态
-				isShowPrice:false,
-				// 选择的skuid
-				sku_id:0,
-				//状态栏安全高度
-				StatusBarHeight:0,
-			}
-		},
-		onLoad(param) {
-			// 接受路由参数,产品ID
-			this.requestParam.id = param.product_id;
-			var that = this;
-			// 监听地址变动
-			uni.$on('addr_list_change',function(data){
-				// 地址列表
-				that.addrList = data.list;
-			})
-		},
-		onShow() {
-			 //获取状态栏安全区的高度
-			this.getStatusBarHeight()
-			// 没有添加客服就不显示
-			this.isShowPrice = this.$checkAccess.getFollowQrcode() ? 0 : 1;
-			// 如果存在产品ID的话
-			if( this.requestParam.id > 0) {
-				// 请求详情
-				this.$http.request('api/product/get_detail',this.requestParam).then((re)=>{
-					// 成功渲染数据
-					if( re.code == 'success' ) {
-						// 刷新数据
-						this.productInfo = re.data;
-						// //设置默认sku
-						// this.setDefaultSpec();
-					}
-				});		
-			};
+export default {
+  data() {
+    return {
+      show:false, // 使用Popup组件时,阻止禁止滚动穿透
+      productInfo:{
+        id:0,
+        name:"",
+        price:"0.00",
+        market_price:"0.00",
+        spec:"",
+        stock:0,
+        thumb:"",
+        poster:"",
+        description:"",
+        business_info:{
+          name:"",
+          logopic:"",
+          desc:"",
+        },
+        product_attr:[],
+        product_sku:[],
+      },
+      requestParam:{
+        id:0,
+      },
+      // 数量
+      quantity:1,
+      // 总价
+      priceTotal:"0.00",
+      // 优惠券列表
+      couponList:[],
+      // 总价
+      priceTotal:'0.00',
+      // 优惠券使用
+      couponUsed:"去使用 >",
+      // 扣减金额
+      rebatePrice:0.00,
+      // 已经选择的优惠券ID
+      customCoupon: 0,
+      // 规格选择按钮类型
+      specBtnType: 1, // 1预约。2购物车
+      // 地址列表
+      addrList:[],
+      // 已选地址
+      checkedAddr:{
+        id:0,
+        contact_name:"",
+        contact_phone:"",
+        contact_province:"",
+        contact_city:"",
+        contact_area:"",
+        contact_addr:"",
+        is_default:0,
+      },
+      // 客服二维码
+      followQrcode:"",
+      // 是否登录状态
+      isShowPrice:false,
+      // 选择的skuid
+      sku_id:0,
+    }
+  },
+  onLoad(param) {
+    // 接受路由参数,产品ID
+    this.requestParam.id = param.product_id;
+    var that = this;
+    // 监听地址变动
+    uni.$on('addr_list_change',function(data){
+      // 地址列表
+      that.addrList = data.list;
+    })
+  },
+  onShow() {
+    // 没有添加客服就不显示
+    this.isShowPrice = this.$checkAccess.getFollowQrcode() ? 0 : 1;
+    // 如果存在产品ID的话
+    if( this.requestParam.id > 0) {
+      // 请求详情
+      this.$http.request('api/product/get_detail',this.requestParam).then((re)=>{
+        // 成功渲染数据
+        if( re.code == 'success' ) {
+          // 刷新数据
+          this.productInfo = re.data;
+          //设置默认sku
+          this.setDefaultSpec();
+        }
+      });
+    };
+  },
+  methods: {
+    // 地址弹出层
+    showAddrPopup(){
+      // 显示下单弹出层
+      this.$refs.addrPopup.open('bottom');
+    },
+    // 规格弹出层
+    showSpecPopup(type){
+      // 登录提示
+      if( !this.$checkAccess.alterLogin()) return ;
+      // 判断是否弹出
+      if( this.$checkAccess.getFollowQrcode() ) return this.openAddFollow();
+      // 显示类型,1预约,2购物车
+      this.specBtnType  = type;
+      // 恢复优惠券使用按钮
+      this.couponUsed   = "去使用 >";
+      // 恢复扣减金额
+      this.rebatePrice  = 0.00;
+      // 选择优惠券重置
+      this.customCoupon = 0;
+      // 计算价格
+      this.priceHandler();
+      // 显示下单弹出层
+      this.$refs.specPopup.open('bottom');
+      // 结果
+      this.$http.request('api/custom_coupon/get_checked',this.requestParam).then((re)=>{
+        if( re.code == 'success' ){
+          // 赋值
+          this.couponList = re.data;
+          // 优惠券是否可用
+          this.checkCoupon();
+        }
+      });
+      // 地址列表
+      this.getAddrList();
+      //只有一组sku时是否下架
+      if(this.productInfo.product_sku.length === 1){
+        this.defaultSkuStatus();
+      }
+    },
+    // 优惠券弹出层
+    openCoupon(){
+      this.$refs.couponPopup.open('bottom')
+    },
+    // 数量调整
+    changeQuantity(number){
+      // 如果不是0.表示两侧按钮点击,0表示输入的修改
+      if( number != 0 ) {
+        // 计算个数
+        this.quantity 		= this.quantity + number;
+      }
+      // 如果大于库存设置为库存
+      if( this.quantity > this.productInfo.stock ) {
+        this.quantity = this.productInfo.stock;
+        uni.showToast({
+          title:"库存不足",
+          icon:"none"
+        })
+      }
+      // 如果小于1.设置为1
+      if( this.quantity < 1 )		{
+        this.quantity = 1;
+        uni.showToast({title:"数量不可以小于0",icon:"none"})
+      }
+      // 计算价格
+      this.priceHandler();
+      // 优惠券是否可用
+      this.checkCoupon();
+    },
+    // 创建订单
+    createOrder(){
+      // 不可预约
+      if( !this.$checkAccess.alertCity() ) return;
+      // 下单数量小于0
+      if( this.quantity < 1 ) {
+        uni.showToast({
+          title:"至少购买1个"
+        })
+        return;
+      }
+      // 如果大于库存设置为库存
+      if( this.productInfo.stock < 1 ) {
+        uni.showToast({
+          title:"库存不足",
+          icon:"none"
+        })
+        return;
+      }
+      // 地址未填
+      if( !this.checkedAddr.id ) {
+        uni.showToast({
+          title:"请选择收货地址",
+          icon:"none"
+        })
+        return;
+      }
+      //需要下单的产品信息参数传给completion页面
+      let productInfo = [{name:this.productInfo.name,spec:this.productInfo.spec,price:this.productInfo.price}]
+      //转成json字符串
+      productInfo = JSON.stringify(productInfo);
+      //加密json格式成编码数组
+      let encodedArray = encodeURIComponent(productInfo);
+
+      // 需要下单的产品列表
+      let productList = [{product_id:this.productInfo.id,buy_num:this.quantity,product_skuid:this.sku_id}];
+      // 转成json字符串传输
+      productList		= JSON.stringify(productList);
+      // 请求接口
+      this.$http.request('api/orders/create',{"product_list":productList,"custom_coupon_id":this.customCoupon,'addr_id':this.checkedAddr.id},'post').then((re)=>{
+        // 判断结果
+        if( re.code == 'success' ) {
+          // 处理结果
+          this.productInfo.stock = this.productInfo.stock - this.quantity;
+          // 关闭弹窗
+          this.$refs.specPopup.close();
+          //订单详情
+          let orderInfo = re.data;
+          orderInfo = JSON.stringify(orderInfo)
+          let params = encodeURIComponent(orderInfo);
+          // 跳转到报单完成页面
+          uni.navigateTo({url:`/pages/orders/confirm?params=${params}`});
+        }else{
+          uni.showModal({title:re.msg,showCancel:false});
+        }
+      });
+    },
+    // 加入购物车
+    createCart(){
+      // 不可预约
+      if( !this.$checkAccess.alertCity() ) return;
+      // 下单数量小于0
+      if( this.quantity < 1 ) {
+        uni.showToast({
+          title:"至少购买1个"
+        })
+        return;
+      }
+      // 如果大于库存设置为库存
+      if( this.productInfo.stock < 1 ) {
+        uni.showToast({
+          title:"库存不足",
+          icon:"none"
+        })
+        return;
+      }
+      // 商品信息
+      let data = {product_id:this.productInfo.id,buy_num:this.quantity,skuid:this.sku_id};
+      // 请求接口
+      this.$http.request('api/shop_cart/add',data,'post').then((re)=>{
+        // 判断结果
+        if( re.code == 'success' ) {
+          // 跳转到订单列表
+          uni.showToast({
+            icon:"success",
+            title:"加入购物车成功"
+          })
+          // 关闭结果
+          this.$refs.specPopup.close();
+        }else{
+          // 跳转到订单列表
+          uni.showToast({
+            icon:"error",
+            title:"加入购物车失败"
+          })
+        }
+      });
+    },
+    // 检查优惠券是否可用
+    checkCoupon(){
+      // 如果存在的话
+      if( this.couponList.length ){
+        // 循环优惠券
+        for (let i in this.couponList) {
+          /* 商品的总价格,决定是否可用 */
+          var totalPrice	 = 0.00;
+          // 如果是商品券
+          if( this.couponList[i].type_id == 1 ){
+            // 判断商品是不是在商品范围
+            var isScope = false;
+            // 循环商品范围
+            for (let k in this.couponList[i].product_scope) {
+              // 如果存在商品范围
+              if( this.couponList[i].product_scope[k].product_id == this.productInfo.id) isScope = true;
+            }
+            // 范围内的做计算
+            if( isScope )			totalPrice = this.$decimal.add(totalPrice,this.$decimal.mul(this.productInfo.price,this.quantity));
+            // 店铺券
+          }else{
+            // 店铺券
+            totalPrice				= this.$decimal.add(totalPrice,this.$decimal.mul(this.productInfo.price,this.quantity));
+          }
+          // 判断价格到不到限额
+          this.couponList[i].is_std	= totalPrice.toFixed() >= this.$decimal.mul(this.couponList[i].std_pay,1).toFixed();
+        }
+      }
+    },
+    // 选择优惠券
+    checkedCoupon(index){
+      // 单个设置选中/未选
+      this.couponList[index].checked = this.couponList[index].checked ? 0 : 1;
+      // 循环处理
+      for (let i in this.couponList) {
+        // 有未选的就不做全选
+        if( index != i ) this.couponList[i].checked = 0;
+      }
+      // 如果未选中,提示可用
+      if( !this.couponList[index].checked ) this.couponUsed = '去使用 >';
+      // 已经选择的优惠券ID
+      this.customCoupon  = this.couponList[index].checked ? this.couponList[index].id : 0;
+      // 计算扣减
+      this.couponRebate();
+      // 计算价格
+      this.priceHandler();
+      // 关闭弹窗
+      this.$refs.couponPopup.close();
+    },
+    // 计算价格
+    priceHandler(){
+      // 总价格
+      let priceTotal 	= this.$decimal.mul(this.productInfo.price,this.quantity);
+      // 扣减数据
+      priceTotal		= priceTotal.sub(this.rebatePrice);
+      // 小数点保留
+      this.priceTotal = priceTotal.toFixed(2);
+    },
+    // 计算优惠券扣减
+    couponRebate(){
+      // 默认扣减0
+      this.rebatePrice 	= 0;
+      // 循环优惠券
+      for (let i in this.couponList) {
+        // 判断是否选中
+        if( this.couponList[i].id != this.customCoupon ){
+          // 未选择的不管
+          continue;
+        }
+        /* 商品的总价格,决定是否可用 */
+        var totalPrice	 = 0.00;
+        // 如果是商品券
+        if( this.couponList[i].type_id == 1 ){
+          // 判断商品是不是在商品范围
+          var isScope = false;
+          // 循环商品范围
+          for (let k in this.couponList[i].product_scope) {
+            // 如果存在商品范围
+            if( this.couponList[i].product_scope[k].product_id == this.productInfo.id) isScope = true;
+          }
+          // 范围内的做计算
+          if( isScope )  totalPrice = this.$decimal.mul(this.productInfo.price,this.quantity);
+        }else{
+          // 折扣券以及满减券的话,计算价格
+          totalPrice				= this.$decimal.mul(this.productInfo.price,this.quantity);
+        }
+        // 如果是可以用的话
+        if( totalPrice.toFixed() >= this.$decimal.mul(this.couponList[i].std_pay,1).toFixed() ){
+          // 扣减金额
+          let rebatePrice = this.$decimal.mul(1,0);
+          // 满减
+          if( this.couponList[i].rebate_type == 1 ){
+            // 计算扣减数据
+            rebatePrice 	= this.$decimal.mul(this.couponList[i].rebate,1);
+            // 替换文字
+            this.couponUsed = "¥-" + rebatePrice.toFixed(2);
+          }
+          // 折扣
+          if( this.couponList[i].rebate_type == 2 ){
+            // 折扣
+            rebatePrice 	= this.$decimal.mul(totalPrice,this.couponList[i].rebate);
+            // 减数
+            rebatePrice	 	= this.$decimal.sub(totalPrice,rebatePrice.mul(0.1));
+            // 替换文字
+            this.couponUsed = "¥-" + rebatePrice.toFixed(2);
+          }
+          //  赠品
+          if( this.couponList[i].rebate_type == 3 ){
+            // 替换文字
+            this.couponUsed = "送" + ( this.couponList[i].rebate_scope.length ? this.couponList[i].rebate_scope[0].product_name: "");
+          }
+          // 小数点保留
+          this.rebatePrice  	= rebatePrice.toFixed(2);
+        }
+      }
+    },
+    popupChange(e){
+      // 禁止滚动穿透
+      this.show = e.show
+    },
+    // 选择地址
+    checkedAddrItem(item){
+      this.checkedAddr = item;
+      this.$refs.addrPopup.close();
+    },
+    getAddrList(){
+      // 判断数据
+      this.$http.request('api/custom_addr/get_list').then((callback)=>{
+        // 获取成功
+        if( callback.code == 'success' ){
+          this.addrList  = callback.data;
+          // 如果有的话
+          if( this.addrList.length ){
+            // 获取默认的
+            for (let i in this.addrList) {
+              // 如果是默认的
+              if( this.addrList[i].is_default ) this.checkedAddr = this.addrList[i];
+            }
+            // 如果没有默认的话
+            if( !this.checkedAddr.id ){
+              this.checkedAddr = this.addrList[this.addrList.length-1];
+            }
+          }
+        }
+      });
+    },
+    // 客服显示
+    openAddFollow(){
+      // 返回结果
+      this.followQrcode 		= this.$checkAccess.getFollowQrcode();
+      // 有图才展示
+      if( this.followQrcode )	this.$refs.addFollow.open('center');
+    },
+    closeAddFollow(){
+      this.$refs.addFollow.close();
+    },
+    // 保存图片
+    saveImage(){
+      var that = this;
+      // 下载远程图片后保存到相册
+      uni.downloadFile({
+        url: this.followQrcode,
+        success:function(res) {
+          if(res.statusCode == 200){
+            uni.saveImageToPhotosAlbum({
+              filePath: res.tempFilePath,
+              success:function(res) {
+                uni.showToast({title:"保存成功",icon:'none'});
+                that.$refs.addFollow.close();
+              },
+              fail:function(err){
 
-		},
-		methods: {
-			// 地址弹出层
-			showAddrPopup(){
-				// 显示下单弹出层
-				this.$refs.addrPopup.open('bottom');
-			},
-			// 规格弹出层
-			showSpecPopup(type){
-				// 登录提示
-				if( !this.$checkAccess.alterLogin()) return ;
-				// 显示类型,1预约,2购物车
-				this.specBtnType  = type;
-				// 恢复优惠券使用按钮
-				this.couponUsed   = "去使用 >";
-				// 恢复扣减金额
-				this.rebatePrice  = 0.00;
-				// 选择优惠券重置
-				this.customCoupon = 0;
-				// 计算价格
-				this.priceHandler();
-				// 显示下单弹出层
-				this.$refs.specPopup.open('bottom');
-				// 结果
-				this.$http.request('api/custom_coupon/get_checked',this.requestParam).then((re)=>{
-					if( re.code == 'success' ){
-						// 赋值
-						this.couponList = re.data;
-						// 优惠券是否可用
-						this.checkCoupon();
-					}
-				});
-				// 地址列表
-				this.getAddrList();
-				//只有一组sku时是否下架
-				if(this.productInfo.product_sku.length === 1){
-					this.defaultSkuStatus();
-				}
-			},
-			// 优惠券弹出层
-			openCoupon(){
-				this.$refs.couponPopup.open('bottom')
-			},
-			// 数量调整
-			changeQuantity(number){
-				// 如果不是0.表示两侧按钮点击,0表示输入的修改
-				if( number != 0 ) {
-					// 计算个数
-					this.quantity 		= this.quantity + number;
-				}
-				// 如果大于库存设置为库存
-				if( this.quantity > this.productInfo.stock ) {
-					this.quantity = this.productInfo.stock;
-					uni.showToast({
-						title:"库存不足",
-						icon:"none"
-					})
-				}
-				// 如果小于1.设置为1
-				if( this.quantity < 1 )		{
-					this.quantity = 1;
-					uni.showToast({title:"数量不可以小于0",icon:"none"})
-				}
-				// 计算价格
-				this.priceHandler();
-				// 优惠券是否可用
-				this.checkCoupon();
-			},
-			// 创建订单
-			createOrder(){
-				// 不可预约
-				if( !this.$checkAccess.alertCity() ) return;
-				
-				// 如果有SKU,但是没有选择
-				if( this.productInfo.product_sku.length && !this.sku_id ){
-					uni.showToast({
-						title:"请选择规格",
-						icon:"none"
-					})
-					return;
-				}
-				// 下单数量小于0
-				if( this.quantity < 1 ) {
-					uni.showToast({
-						title:"至少购买1个"
-					})
-					return;
-				}
-				// 如果大于库存设置为库存
-				if( this.productInfo.stock < 1 ) {
-					uni.showToast({
-						title:"库存不足",
-						icon:"none"
-					})
-					return;
-				}
-				// 地址未填
-				if( !this.checkedAddr.id ) {
-					uni.showToast({
-						title:"请选择收货地址",
-						icon:"none"
-					})
-					return;
-				}
-				//需要下单的产品信息参数传给completion页面
-				let productInfo = [{name:this.productInfo.name,spec:this.productInfo.spec,price:this.productInfo.price}]
-				//转成json字符串
-				productInfo = JSON.stringify(productInfo);
-				//加密json格式成编码数组
-				let encodedArray = encodeURIComponent(productInfo);
-				
-				// 需要下单的产品列表
-				let productList = [{product_id:this.productInfo.id,buy_num:this.quantity,product_skuid:this.sku_id}];
-				// 转成json字符串传输
-				productList		= JSON.stringify(productList);
-				// 请求接口
-				this.$http.request('api/orders/create',{"product_list":productList,"custom_coupon_id":this.customCoupon,'addr_id':this.checkedAddr.id},'post').then((re)=>{
-					// 判断结果
-					if( re.code == 'success' ) {
-						// 处理结果
-						this.productInfo.stock = this.productInfo.stock - this.quantity;
-						// 关闭弹窗
-						this.$refs.specPopup.close();
-						// 跳转到报单完成页面
-						uni.navigateTo({url:`/pages/orders/completion?params=${encodedArray}`});
-					}else{
-						uni.showModal({title:re.msg,showCancel:false});
-					}
-				});
-			},
-			// 加入购物车
-			createCart(){
-				// 不可预约
-				if( !this.$checkAccess.alertCity() ) return;
-				// 如果有SKU,但是没有选择
-				if( this.productInfo.product_sku.length && !this.sku_id ){
-					uni.showToast({
-						title:"请选择规格",
-						icon:"none"
-					})
-					return;
-				}
-				// 下单数量小于0
-				if( this.quantity < 1 ) {
-					uni.showToast({
-						title:"至少购买1个"
-					})
-					return;
-				}
-				// 如果大于库存设置为库存
-				if( this.productInfo.stock < 1 ) {
-					uni.showToast({
-						title:"库存不足",
-						icon:"none"
-					})
-					return;
-				}
-				// 商品信息
-				let data = {product_id:this.productInfo.id,buy_num:this.quantity,skuid:this.sku_id};
-				// 请求接口
-				this.$http.request('api/shop_cart/add',data,'post').then((re)=>{
-					// 判断结果
-					if( re.code == 'success' ) {
-						// 跳转到订单列表
-						uni.showToast({
-							icon:"success",
-							title:"加入购物车成功"
-						})
-						// 关闭结果
-						this.$refs.specPopup.close();
-					}else{
-						// 跳转到订单列表
-						uni.showToast({
-							icon:"error",
-							title:"加入购物车失败"
-						})
-					}
-				});
-			},
-			// 检查优惠券是否可用
-			checkCoupon(){
-				// 如果存在的话
-				if( this.couponList.length ){
-					// 循环优惠券
-					for (let i in this.couponList) {
-						/* 商品的总价格,决定是否可用 */
-						var totalPrice	 = 0.00;
-						// 如果是商品券
-						if( this.couponList[i].type_id == 1 ){
-							// 判断商品是不是在商品范围
-							var isScope = false;
-							// 循环商品范围
-							for (let k in this.couponList[i].product_scope) {
-								// 如果存在商品范围
-								if( this.couponList[i].product_scope[k].product_id == this.productInfo.id) isScope = true;
-							}
-							// 范围内的做计算
-							if( isScope )			totalPrice = this.$decimal.add(totalPrice,this.$decimal.mul(this.productInfo.price,this.quantity));
-						// 店铺券
-						}else{
-							// 店铺券
-							totalPrice				= this.$decimal.add(totalPrice,this.$decimal.mul(this.productInfo.price,this.quantity));
-						}
-						// 判断价格到不到限额
-						this.couponList[i].is_std	= totalPrice.toFixed() >= this.$decimal.mul(this.couponList[i].std_pay,1).toFixed();
-					}
-				}
-			},
-			// 选择优惠券
-			checkedCoupon(index){
-				// 单个设置选中/未选
-				this.couponList[index].checked = this.couponList[index].checked ? 0 : 1;
-				// 循环处理
-				for (let i in this.couponList) {
-					// 有未选的就不做全选
-					if( index != i ) this.couponList[i].checked = 0;
-				}
-				// 如果未选中,提示可用
-				if( !this.couponList[index].checked ) this.couponUsed = '去使用 >';
-				// 已经选择的优惠券ID
-				this.customCoupon  = this.couponList[index].checked ? this.couponList[index].id : 0;
-				// 计算扣减
-				this.couponRebate();
-				// 计算价格
-				this.priceHandler();
-				// 关闭弹窗
-				this.$refs.couponPopup.close();
-			},
-			// 计算价格
-			priceHandler(){
-				// 总价格
-				let priceTotal 	= this.$decimal.mul(this.productInfo.price,this.quantity);
-				// 扣减数据
-				priceTotal		= priceTotal.sub(this.rebatePrice);
-				// 小数点保留
-				this.priceTotal = priceTotal.toFixed(2);
-			},
-			// 计算优惠券扣减
-			couponRebate(){
-				// 默认扣减0
-				this.rebatePrice 	= 0;
-				// 循环优惠券
-				for (let i in this.couponList) {
-					// 判断是否选中
-					if( this.couponList[i].id != this.customCoupon ){
-						// 未选择的不管
-						continue;
-					}
-					/* 商品的总价格,决定是否可用 */
-					var totalPrice	 = 0.00;
-					// 如果是商品券
-					if( this.couponList[i].type_id == 1 ){
-						// 判断商品是不是在商品范围
-						var isScope = false;
-						// 循环商品范围
-						for (let k in this.couponList[i].product_scope) {
-							// 如果存在商品范围
-							if( this.couponList[i].product_scope[k].product_id == this.productInfo.id) isScope = true;
-						}
-						// 范围内的做计算
-						if( isScope )  totalPrice = this.$decimal.mul(this.productInfo.price,this.quantity);
-					}else{
-						// 折扣券以及满减券的话,计算价格
-						totalPrice				= this.$decimal.mul(this.productInfo.price,this.quantity);
-					}
-					// 如果是可以用的话
-					if( totalPrice.toFixed() >= this.$decimal.mul(this.couponList[i].std_pay,1).toFixed() ){
-						// 扣减金额
-						let rebatePrice = this.$decimal.mul(1,0);
-						// 满减
-						if( this.couponList[i].rebate_type == 1 ){
-							// 计算扣减数据
-							rebatePrice 	= this.$decimal.mul(this.couponList[i].rebate,1);
-							// 替换文字
-							this.couponUsed = "¥-" + rebatePrice.toFixed(2);
-						}
-						// 折扣
-						if( this.couponList[i].rebate_type == 2 ){
-							// 折扣
-							rebatePrice 	= this.$decimal.mul(totalPrice,this.couponList[i].rebate);
-							// 减数
-							rebatePrice	 	= this.$decimal.sub(totalPrice,rebatePrice.mul(0.1));
-							// 替换文字
-							this.couponUsed = "¥-" + rebatePrice.toFixed(2);
-						}
-						//  赠品
-						if( this.couponList[i].rebate_type == 3 ){
-							// 替换文字
-							this.couponUsed = "送" + ( this.couponList[i].rebate_scope.length ? this.couponList[i].rebate_scope[0].product_name: "");
-						}
-						// 小数点保留
-						this.rebatePrice  	= rebatePrice.toFixed(2);
-					}
-				}
-			},
-			popupChange(e){
-				// 禁止滚动穿透
-				this.show = e.show
-			},
-			// 选择地址
-			checkedAddrItem(item){
-				this.checkedAddr = item;
-				this.$refs.addrPopup.close();
-			},
-			getAddrList(){
-				// 判断数据
-				this.$http.request('api/custom_addr/get_list').then((callback)=>{
-					// 获取成功
-					if( callback.code == 'success' ){
-						this.addrList  = callback.data;
-						// 如果有的话
-						if( this.addrList.length ){
-							// 获取默认的
-							for (let i in this.addrList) {
-								// 如果是默认的
-								if( this.addrList[i].is_default ) this.checkedAddr = this.addrList[i];
-							}
-							// 如果没有默认的话
-							if( !this.checkedAddr.id ){
-								this.checkedAddr = this.addrList[this.addrList.length-1];
-							}
-						}
-					}
-				});
-			},
+              }
+            });
+          }
+        },
+      })
+    },
+    // 设置默认sku
+    setDefaultSpec(){
+      // 如果列表存在
+      if( this.productInfo.product_sku.length ){
+        //如果列表大于1
+        if(this.productInfo.product_sku.length > 1){
+          //循环sku列表
+          for(var k = 0 ; k < this.productInfo.product_sku.length;k++ ){
+            //全部规格都已经下架
+            if(k === this.productInfo.product_sku.length){
+              uni.showToast({
+                title:"当前商品已全部下架",
+                icon:"error"
+              })
+              this.productInfo.stock = 0;
+              return;
+            }
+            // 获取第一个没有下架的sku作为默认值
+            if(this.productInfo.product_sku[k].status === 0){
+              var attr_ids = this.productInfo.product_sku[k].attr_ids.split(",");
+              break;
+            }
+          }
+          // 循环规格列表
+          for ( let i in this.productInfo.product_attr ) {
+            // 再循环属性
+            for (let j in this.productInfo.product_attr[i].attr_list) {
+              // 如果不等于id
+              if( attr_ids.includes(this.productInfo.product_attr[i].attr_list[j].id + '') ){
+                // 设置选中
+                this.productInfo.product_attr[i].attr_list[j].active = 1;
+              }else{
+                this.productInfo.product_attr[i].attr_list[j].active = 0;
+              }
+            }
+          }
+          // 产品价格修改
+          this.productInfo.price = this.productInfo.product_sku[k].price;
+          // 产品规格修改
+          this.productInfo.spec = this.productInfo.product_sku[k].attr_names;
+          // 产品库存
+          this.productInfo.stock = this.productInfo.product_sku[k].stock;
+          // 产品SKU
+          this.sku_id 		= this.productInfo.product_sku[k].id;
+          // 计算价格
+          this.priceHandler();
+        }else{
+          var attr_ids = this.productInfo.product_sku[0].attr_ids.split(",");
+          // 循环规格列表
+          for ( let i in this.productInfo.product_attr ) {
+            // 再循环属性
+            for (let j in this.productInfo.product_attr[i].attr_list) {
+              // 如果不等于id
+              if( attr_ids.includes(this.productInfo.product_attr[i].attr_list[j].id + '') ){
+                // 设置选中
+                this.productInfo.product_attr[i].attr_list[j].active = 1;
+              }else{
+                this.productInfo.product_attr[i].attr_list[j].active = 0;
+              }
+            }
+          }
+          // 产品价格修改
+          this.productInfo.price = this.productInfo.product_sku[0].price;
+          // 产品规格修改
+          this.productInfo.spec = this.productInfo.product_sku[0].attr_names;
+          // 产品库存
+          this.productInfo.stock = this.productInfo.product_sku[0].stock;
+          // 产品SKU
+          this.sku_id = this.productInfo.product_sku[0].id;
+          // 计算价格
+          this.priceHandler();
+        }
+      }
+    },
+    // 属性变更
+    attrChange(spec_index,attr_index){
+      // 判断当前属性是否选择。选择的跳过
+      if (this.productInfo.product_attr[spec_index].attr_list[attr_index].active) return;
+      // 先记录当前规格下所有属性原来的active状态
+      let originalActiveStates = {};
+      for (let i in this.productInfo.product_attr[spec_index].attr_list) {
+        originalActiveStates[i] = this.productInfo.product_attr[spec_index].attr_list[i].active;
+      }
+      //循环规格下的属性
+      for ( let i in this.productInfo.product_attr[spec_index].attr_list ) {
+        // 全部改为未选中
+        this.productInfo.product_attr[spec_index].attr_list[i].active = 0;
+      }
+      //选择选项
+      this.productInfo.product_attr[spec_index].attr_list[attr_index].active = 1;
+      //选中的规格
+      var attr_ids = [];
+      // 循环规格
+      for ( let i in this.productInfo.product_attr ) {
+        // 再循环属性
+        for (let j in this.productInfo.product_attr[i].attr_list) {
+          // 如果选中的
+          if( this.productInfo.product_attr[i].attr_list[j].active ){
+            attr_ids.push(this.productInfo.product_attr[i].attr_list[j].id);
+          }
+        }
+      }
+      // 转成字符串
+      var attrids	= attr_ids.join(",");
+      // 如果当前点击的属性对应的SKU状态为未下架(初始化为0)
+      let currentSKUStatus = 0;
+      // 匹配规格
+      if( this.productInfo.product_sku.length ){
+        // 是否有对应的SKU
+        let  haveSku				= 0;
+        // 循环sku
+        for (let i in this.productInfo.product_sku) {
+          // 如果sku不匹配
+          if( this.productInfo.product_sku[i].attr_ids != attrids ) continue;
+          // 设置有SKU
+          haveSku	= 1;
+          // 获取当前匹配到的SKU的状态
+          currentSKUStatus = this.productInfo.product_sku[i].status;
+          // 如果商品已经下架(status等于1),则恢复当前规格下所有属性原来的active状态
+          if(currentSKUStatus === 1){
+            uni.showToast({title:"该规格已下架",icon:"none"});
+            for (let k in originalActiveStates) {
+              this.productInfo.product_attr[spec_index].attr_list[k].active = originalActiveStates[k];
+            }
+            continue;
+          }
+          // 产品价格修改
+          this.productInfo.price = this.productInfo.product_sku[i].price;
+          // 产品规格修改
+          this.productInfo.spec = this.productInfo.product_sku[i].attr_names;
+          // 产品库存
+          this.productInfo.stock = this.productInfo.product_sku[i].stock;
+          // 产品SKU
+          this.sku_id = this.productInfo.product_sku[i].id;
+          // 计算价格
+          this.priceHandler();
+        }
+        // 如果没有对应的SKU
+        if( !haveSku ){
+          uni.showToast({title:"该规格已下架",icon:"none"});
+          for (let k in originalActiveStates) {
+            this.productInfo.product_attr[spec_index].attr_list[k].active = originalActiveStates[k];
+          }
+        }
+      }
+    },
+    //只有一组sku默认规格是否已下架
+    defaultSkuStatus(){
+      if(this.productInfo.product_sku.length){
+        if(this.productInfo.product_sku[0].status === 1){
+          uni.showToast({
+            title:"该规格已下架",
+            icon:"none",
+          });
+          this.productInfo.stock = 0;
+          var attr_ids = this.productInfo.product_sku[0].attr_ids.split(",");
+          // 循环规格列表
+          for ( let i in this.productInfo.product_attr ) {
+            // 再循环属性
+            for (let j in this.productInfo.product_attr[i].attr_list) {
+              // 如果不等于id
+              if( attr_ids.includes(this.productInfo.product_attr[i].attr_list[j].id + '') ){
+                // 取消选中
+                this.productInfo.product_attr[i].attr_list[j].active = 0;
+              }
+            }
+          }
+          return;
+        }
+      }
+    },
+    goBack(){
+      uni.navigateBack({
+        success: () => {
 
-			closeAddFollow(){
-				this.$refs.addFollow.close();
-			},
-			// 保存图片
-			saveImage(){
-				var that = this;
-				// 下载远程图片后保存到相册
-				uni.downloadFile({
-					url: this.followQrcode,
-					success:function(res) {
-						if(res.statusCode == 200){
-							uni.saveImageToPhotosAlbum({
-								filePath: res.tempFilePath,
-								success:function(res) {
-									uni.showToast({title:"保存成功",icon:'none'});
-									that.$refs.addFollow.close();
-								},
-								fail:function(err){
-									
-								}
-							});
-						}
-					},
-				})
-			},
-			// 属性变更
-			attrChange(spec_index,attr_index){
-				// 判断当前属性是否选择。选择的跳过
-				if (this.productInfo.product_attr[spec_index].attr_list[attr_index].active) return;
-				// 先记录当前规格下所有属性原来的active状态
-				let originalActiveStates = {};
-				for (let i in this.productInfo.product_attr[spec_index].attr_list) {
-					originalActiveStates[i] = this.productInfo.product_attr[spec_index].attr_list[i].active;
-				}
-				//循环规格下的属性
-				for ( let i in this.productInfo.product_attr[spec_index].attr_list ) {
-					// 全部改为未选中
-					this.productInfo.product_attr[spec_index].attr_list[i].active = 0;
-				}
-				//选择选项
-				this.productInfo.product_attr[spec_index].attr_list[attr_index].active = 1;
-				//选中的规格
-				var attr_ids = [];
-				// 循环规格
-				for ( let i in this.productInfo.product_attr ) {
-					// 再循环属性
-					for (let j in this.productInfo.product_attr[i].attr_list) {
-						// 如果选中的
-						if( this.productInfo.product_attr[i].attr_list[j].active ){
-							attr_ids.push(this.productInfo.product_attr[i].attr_list[j].id);
-						}
-					}
-				}
-				// 转成字符串
-				var attrids	= attr_ids.join(",");
-				
-				// 如果选项不足的话
-				if( attr_ids.length != this.productInfo.product_attr.length) return ;
-				
-				// 如果当前点击的属性对应的SKU状态为未下架(初始化为0)
-				let currentSKUStatus = 0;
-				// 匹配规格
-				if( this.productInfo.product_sku.length ){
-					// 是否有对应的SKU
-					let  haveSku				= 0;
-					// 循环sku
-					for (let i in this.productInfo.product_sku) {
-						// 如果sku不匹配
-						if( this.productInfo.product_sku[i].attr_ids != attrids ) continue;
-						// 设置有SKU
-						haveSku	= 1;
-						// 获取当前匹配到的SKU的状态
-						 currentSKUStatus = this.productInfo.product_sku[i].status;
-						// 如果商品已经下架(status等于1),则恢复当前规格下所有属性原来的active状态
-						if(currentSKUStatus === 1){
-							uni.showToast({title:"该规格已下架",icon:"none"});
-							for (let k in originalActiveStates) {
-								this.productInfo.product_attr[spec_index].attr_list[k].active = originalActiveStates[k];
-							}
-							continue;
-						}
-						// 产品价格修改
-						this.productInfo.price = this.productInfo.product_sku[i].price;
-						// 产品规格修改
-						this.productInfo.spec = this.productInfo.product_sku[i].attr_names;
-						// 产品库存
-						this.productInfo.stock = this.productInfo.product_sku[i].stock;
-						// 产品SKU
-						this.sku_id = this.productInfo.product_sku[i].id;
-						// 计算价格
-						this.priceHandler();
-					}
-					// 如果没有对应的SKU
-					if( !haveSku ){
-						uni.showToast({title:"该规格已下架",icon:"none"});
-						for (let k in originalActiveStates) {
-							this.productInfo.product_attr[spec_index].attr_list[k].active = originalActiveStates[k];
-						}
-					}
-				}
-			},
-			//只有一组sku默认规格是否已下架
-			defaultSkuStatus(){
-				if(this.productInfo.product_sku.length){
-					if(this.productInfo.product_sku[0].status === 1){
-						uni.showToast({
-							title:"该规格已下架",
-							icon:"none",
-						});
-						this.productInfo.stock = 0;
-						var attr_ids = this.productInfo.product_sku[0].attr_ids.split(",");
-						// 循环规格列表
-						for ( let i in this.productInfo.product_attr ) {
-							// 再循环属性
-							for (let j in this.productInfo.product_attr[i].attr_list) {
-								// 如果不等于id
-								if( attr_ids.includes(this.productInfo.product_attr[i].attr_list[j].id + '') ){
-									// 取消选中
-									this.productInfo.product_attr[i].attr_list[j].active = 0;
-								}
-							}
-						}
-						return;
-					}
-				}
-			},
-			getStatusBarHeight(){
-				let SYSTEM_INFO = uni.getSystemInfoSync();
-				this.StatusBarHeight =  SYSTEM_INFO.statusBarHeight || 10;
-				// console.log(SYSTEM_INFO.statusBarHeight);
-			},
-			goBack(){
-				uni.navigateBack({
-					success: () => {
-						
-					},
-					fail: (err) => {
-						uni.reLaunch({
-							url:"/pages/index/index"
-						})
-					}
-				});
-			},
-			// productCouponList(){
-			// 	uni.navigateTo({
-			// 		url:"/pages/coupon/order_coupon"
-			// 	})
-			// }
-		}
-	}
+        },
+        fail: (err) => {
+          uni.reLaunch({
+            url:"/pages/index/index"
+          })
+        }
+      });
+    },
+  }
+}
 </script>
 
 <style lang="less">
-	.goback{
-		position: fixed;
-		width: 38px;
-		height: 38px;
-		background: rgba(0, 0, 0, 0.5);
-		left: 30rpx;
-		margin-left: 0;
-		border-radius: 100px;
-		top: 0;
-		backdrop-filter: blur(10rpx);
-		border:1rpx solid rgba(255,255,255,0.3);
-		display: flex;
-		align-items: center;
-		justify-content: center;	
-	}
-	.product_image_box{
-		display: block;
-		overflow: hidden;
-		background: #FFFFFF;
-		margin: 0rpx auto;
-		.product_image{
-			display: block;
-			margin: 0 auto;
-			width: 750rpx;
-			height: 750rpx;
-		}
-	}
-	.product_info{
-		display: block;
-		background: #FFFFFF;
-		margin: 10rpx 0rpx;
-		padding: 10px 10px;
-		.product_name{
-			max-height: 80rpx;
-			font-size: 30rpx;
-			line-height: 40rpx;
-			overflow: hidden;
-			padding: 10rpx 0rpx;
-		}
-		.product_title_info{
-			.product_title{
-				font-size: 30rpx;
-				line-height: 40rpx;
-				padding: 5rpx 0rpx;
-			}
-			.product_subtitle{
-				color: #999999;
-				line-height: 40rpx;
-				font-size: 24rpx;
-				padding: 5rpx 0rpx;
-			}
-		}
-		.price_stock{
-			color: #999999;
-			font-size: 24rpx;
-			line-height: 30rpx;
-			overflow: hidden;
-			.product_price{
-				float: left;
-				color: red;
-				font-size: 38rpx;
-				line-height: 60rpx;
-				padding: 5rpx 0rpx;
-				.product_market{
-					font-size: 24rpx;
-					color: #999999;
-					line-height: 30rpx;
-					margin-left: 10rpx;
-					text-decoration: line-through;
-				}
-			}
-			.product_stock{
-				float: right;
-				line-height: 60rpx;
-			}
-		}
-		.product_coupon{
-			font-size: 30rpx;
-			line-height: 30rpx;
-			overflow: hidden;
-			.coupon_text{
-				float: left;
-				line-height: 30rpx;
-			}
-			.coupon_info{
-				float: right;
-				line-height: 30rpx;
-				overflow: hidden;
-				padding: 0rpx 40rpx;
-				.text{
-					float: left;
-					margin-right: 30rpx;
-				}
-				.icon{
-					float: right;
-					font-size: 35rpx;
-					font-weight: bold;
-					color: #999999;
-				}
-			}
-		}
-	}
-	// 描述简介
-	.product_business{
-		display: block;
-		overflow: hidden;
-		padding: 20rpx 20rpx;
-		margin: 10rpx auto;
-		background: #FFFFFF;
-		.logopic{
-			float: left;
-			width: 80rpx;
-			height: 80rpx;
-			border-radius: 50%;
-			margin-right: 20rpx;
-		}
-		.business_info{
-			float: left;
-			width: 600rpx;
-			overflow: hidden;
-			.business_name{
-				font-size: 26rpx;
-				line-height: 40rpx;
-			}
-			.business_desc{
-				color: #999999;
-				font-size: 24rpx;
-				line-height: 40rpx;
-			}
-		}
-	}
-	.product_description{
-		width: 700rpx;
-		display: block;
-		overflow: hidden;
-		background: #FFFFFF;
-		min-height: 600rpx;
-		font-size: 26rpx;
-		margin: 0rpx auto;
-		line-height: 50rpx;
-		padding: 10rpx 25rpx;
-		[alt]{ //web_view图片
-			max-width: 100%;  // 避免图片超宽
-			vertical-align: bottom; // 避免图片之间间隙
-		}
-	}
-	.product_poster{
-		display: block;
-		overflow: hidden;
-		padding: 10rpx 0rpx;
-		margin: 10rpx auto;
-		background: #FFFFFF;
-		.product_image{
-			width: 750rpx;
-			display: block;
-		}
-	}
-	.product_comment{
-		display: block;
-		background: #FFFFFF;
-		margin: 10rpx 0rpx;
-		padding: 10px 10px;
-		background: #FFFFFF;
-		.comment_num{
-			overflow: hidden;
-			line-height: 30rpx;
-			.comment_num_title{
-				float: left;
-				line-height: 30rpx;
-			}
-			.comment_num_icon{
-				float: right;
-				line-height: 1.5;
-				margin-right: 40rpx;
-			}
-		}
-		.comment_list{
-			overflow: hidden;
-			.comment_left{
-				float: left;
-				width: 400rpx;
-				.user_order_info{
-					color: #999999;
-					margin-top: 20rpx;
-					.user_name{
-						color: #000000;
-						margin-right: 20rpx;
-					}
-				}
-				.user_comment{
-					margin-top: 20rpx;
-					font-size: 30rpx;
-					line-height: 50rpx;
-				}
-			}
-			.comment_right{
-				float: right;
-				width: 200rpx;
-				height: 200rpx;
-				background-color: aqua;
-				border-radius: 20rpx;
-			}
-		}
-	}
-	.order_car{
-		left: 0rpx;
-		width: 750rpx;
-		height: 160rpx;
-		display: block;
-		position: fixed;
-		padding-top: 20rpx;
-		background: #FFFFFF;
-		bottom: var(--window-bottom);
-		border-top: 2rpx solid #DDDDDD;
-		// .show_order{
-		// 	float: right;
-		// 	width: 280rpx;
-		// 	height: 80rpx;
-		// 	display: block;
-		// 	color: #FFFFFF;
-		// 	font-size: 30rpx;
-		// 	overflow: hidden;
-		// 	line-height: 80rpx;
-		// 	padding: 0rpx 0rpx;
-		// 	text-align: center;
-		// 	margin-right: 35rpx;
-		// 	background-color: #E03519;
-		// 	border-radius: 0rpx;
-		// 	border-top-right-radius: 20rpx;
-		// 	border-bottom-right-radius: 20rpx;
-		// }
-		.show_car{
-			float: left;
-			width: 480rpx;
-			height: 90rpx;
-			display: block;
-			color: #FFFFFF;
-			font-size: 30rpx;
-			overflow: hidden;
-			line-height: 90rpx;
-			padding: 0rpx 0rpx;
-			text-align: center;
-		 	background-color: #ff5900;
-			border-radius: 20rpx;
-			// border-top-left-radius: 20rpx;
-			// border-bottom-left-radius: 20rpx;
-		}
-		.to_car{
-			float: left;
-			width: 100rpx;
-			height: 90rpx;
-			display: block;
-			text-align: center;
-			margin-left: 20rpx;
-			 // padding-top: 10rpx;
-			// border: 2rpx solid;
-			.car_icon{
-				float: left;
-				width: 60rpx;
-				height: 60rpx;
-				display: block;
-			}
-			.text{
-				float: left;
-				padding-left: 6rpx;
-				font-size: 24rpx;
-			}
-		}
-	}
-	.popup{
-		overflow: hidden;
-		.popup_title{
-			display: block;
-			overflow: hidden;
-			margin: 0rpx auto;
-			font-size: 36rpx;
-			height: 120rpx;
-			line-height: 120rpx;
-			padding: 0rpx 20rpx;
-			border-bottom: 10rpx solid #F8F8F8;
-			.to_addr_page{
-				float: right;
-				color: #F59A23;
-				display: block;
-				height: 120rpx;
-				line-height: 120rpx;
-				font-size: 26rpx;
-				padding: 0rpx 10rpx;
-			}
-		}
-		.order_info{
-			overflow: hidden;
-			background: #FFFFFF;
-			.custom_addr{
-				width: 680rpx;
-				display: block;
-				font-size: 24rpx;
-				overflow: hidden;
-				margin: 0rpx auto;
-				line-height: 40rpx;
-				padding: 20rpx 35rpx;
-				background-color: #FFFFFF;
-				border-bottom: 2rpx solid #dddddd;
-				.contact_user{
-					display: block;
-					font-size: 24rpx;
-					line-height: 50rpx;
-					.contact_none{
-						font-size: 26rpx;
-						font-weight: bold;
-					}
-					.contact_name{
-						font-size: 26rpx;
-						font-weight: bold;
-						margin-right: 16rpx;
-					}
-					.contact_more{
-						float: right;
-						font-size: 40rpx;
-						font-weight: bold;
-					}
-				}
-				.contact_addr{
-					width: 620rpx;
-					display: block;
-					font-size: 24rpx;
-					line-height: 30rpx;
-					padding: 10rpx 5rpx;
-				}
-			}
-			.min600{
-				min-height: 600rpx;
-			}
-			.car_item{
-				height: 200rpx;
-				display: block;
-				background: #FFFFFF;
-				margin: 20rpx auto;
-				.box_left{
-					float: left;
-					width: 160rpx;
-					height: 200rpx;
-					margin-left: 35rpx;
-					.car_image{
-						width: 160rpx;
-						height: 160rpx;
-						margin: 20rpx 0rpx;
-						border-radius: 5rpx;
-					}
-				}
-				.box_right{
-					float: left;
-					width: 485rpx;
-					margin-left: 35rpx;
-					padding-top: 20rpx;
-					.car_name{
-						max-height: 80rpx;
-						font-size: 30rpx;
-						line-height: 40rpx;
-						overflow: hidden;
-						padding: 0rpx 0rpx;
-					}
-					.car_spec{
-						color: #999999;
-						font-size: 24rpx;
-						line-height: 30rpx;
-						padding: 0rpx 0rpx;
-					}
-					.stock_price{
-						width: 485rpx;
-						color: #dddddd;
-						font-size: 20rpx;
-						overflow: hidden;
-						margin-top: 10rpx;
-						line-height: 30rpx;
-						.product_price{
-							float: left;
-							color: red;
-							font-size: 30rpx;
-							line-height: 60rpx;
-							.car_market{
-								font-size: 24rpx;
-								color: #999999;
-								line-height: 30rpx;
-								vertical-align: middle;
-								text-decoration: line-through;
-							}
-						}
-						.product_quantity_box{
-							float: right;
-							color: #333333;
-							overflow: hidden;
-							font-size: 24rpx;
-							margin-top: 10rpx;
-							text-align: center;
-							.product_quantity_sub{
-								float: left;
-								border: none;
-								height: 36rpx;
-								background: none;
-								text-align: center;
-								line-height: 36rpx;
-								padding: 10rpx 10rpx;
-								.sub_icon{
-									width: 22rpx;
-									height: 22rpx;
-									display: block;
-								}
-							}
-							.product_quantity_sub::after{
-								border: none;
-								background: none;
-							}
-							.product_quantity{
-								float: left;
-								width: 100rpx;
-								height: 36rpx;
-								font-size: 24rpx;
-								min-height: 36rpx;
-								line-height: 36rpx;
-								padding: 0rpx 0rpx;
-								border-radius: 8rpx;
-								border: 2rpx solid #dddddd;
-							}
-							.product_quantity_add{
-								float: left;
-								border: none;
-								height: 36rpx;
-								background: none;
-								text-align: center;
-								padding: 10rpx 10rpx;
-								line-height: 36rpx;
-								.add_icon{
-									width: 22rpx;
-									height: 22rpx;
-									display: block;
-								}
-							}
-							.product_quantity_add::after{
-								border: none;
-								background: none;
-							}
-						}
-					}
-					.product_stock{
-						font-size: 20rpx;
-						line-height: 60rpx;
-					}
-				}
-			}
-			.select_sku{
-				font-size: 28rpx;
-				padding: 30rpx 35rpx;
-				margin-bottom: 20rpx;
-				.scroll_max{
-					height:440rpx ;
-					.product_attr{
-						display: block;
-						overflow: hidden;
-						margin-bottom: 20rpx;
-						.spec_name{
-							display: block;
-							font-size: 28rpx;
-							line-height: 40rpx;
-							margin-bottom: 20rpx;
-						}
-						.arrt_list{
-							display: block;
-							overflow: hidden;
-							.arrt_option{
-								float: left;
-								height: 40rpx;
-								font-size: 28rpx;
-								line-height: 40rpx;
-								text-align: center;
-								border-radius: 6rpx;
-								padding: 10rpx 30rpx;
-								margin: 20rpx;
-								background-color: #EEEEEE;
-							}
-							.arrt_option.active {
-							  color: #FFFFFF;
-							  background-color: #fE6000;
-							}
-						}
-					}
-				}
-
-			}
-			.to_select_coupon{
-				font-size: 28rpx;
-				padding: 30rpx 35rpx;
-				margin-bottom: 20rpx;
-				.coupon_deduction{
-					color: red;
-					float: right;
-				}
-			}
-			.order_price{
-				font-size: 28rpx;
-				text-align: right;
-				margin: 0rpx 35rpx;
-				padding: 20rpx 0rpx;
-				border-top: 2rpx solid #DDDDDD;
-				.coupon_deduction{
-					color: red;
-					float: right;
-				}
-			}
-			.order_btn{
-				width: 700rpx;
-				height: 100rpx;
-				display: block;
-				margin: 0 auto;
-				margin-top: 70rpx;
-				line-height: 80rpx;
-				text-align: center;
-				font-size: 30rpx;
-				.to_car{
-					color: #FFFFFF;
-					float: right;
-					width: 700rpx;
-					height: 80rpx;
-					display: block;
-					overflow: hidden;
-					font-size: 30rpx;
-					line-height: 80rpx;
-					padding: 0rpx 0rpx;
-					border-radius: 40rpx;
-					border: 0rpx solid transparent;
-					background-color: #F59A23;
-				}
-				.to_car::after{
-					border: 0rpx solid transparent;
-				}
-				.to_order{
-					color: #FFFFFF;
-					float: right;
-					width: 700rpx;
-					height: 80rpx;
-					display: block;
-					font-size: 30rpx;
-					overflow: hidden;
-					line-height: 80rpx;
-					padding: 0rpx 0rpx;
-					border-radius: 40rpx;
-					background-color: #E03519;
-					border: 0rpx solid transparent;
-				}
-				.to_order::after{
-					border: 0rpx solid transparent;
-				}
-			}
-		}
-		.coupon_list{
-			display: block;
-			overflow: hidden;
-			min-height: 600rpx;
-			margin: 10rpx auto;
-			background: #FFFFFF;
-			padding-bottom: 50rpx;
-			.coupon_item{
-				height: 200rpx;
-				display: block;
-				margin: 10rpx auto;
-				border-bottom: 2rpx solid #DDDDDD;
-				.box_left{
-					float: left;
-					width: 160rpx;
-					height: 160rpx;
-					font-size: 20rpx;
-					text-align: center;
-					margin-left: 35rpx;
-					line-height: 60rpx;
-					margin-top: 20rpx;
-					background: pink;
-					.rebate{
-						width: 120rpx;
-						height: 60rpx;
-						margin: 0rpx auto;
-						line-height: 60rpx;
-						margin-top: 20rpx;
-						overflow: hidden;
-						white-space: nowrap;
-						text-overflow: ellipsis;
-					}
-				}
-				.box_right{
-					float: left;
-					width: 485rpx;
-					margin-left: 35rpx;
-					padding-top: 20rpx;
-					.coupon_title{
-						width: 485rpx;
-						max-height: 80rpx;
-						font-size: 30rpx;
-						overflow: hidden;
-						line-height: 40rpx;
-						padding: 0rpx 0rpx;
-						.coupon_name{
-							float: left;
-							height: 40rpx;
-							width: 380rpx;
-						}
-						.coupon_status{
-							width: 85rpx;
-							float: right;
-							color: #999999;
-							font-size: 24rpx;
-						}
-					}
-					.product_scope{
-						width: 485rpx;
-						height: 80rpx;
-						color: #999999;
-						font-size: 24rpx;
-						overflow: hidden;
-						line-height: 80rpx;
-						.check_label{
-							float: right;
-							display: block;
-							overflow: hidden;
-							padding: 20rpx 20rpx;
-							.isstd{
-								line-height: 40rpx;
-							}
-							.checkbox{
-								float: right;
-								width: 40rpx;
-								height: 40rpx;
-							}
-						}
-					}
-					.coupon_info{
-						width: 485rpx;
-						max-height: 80rpx;
-						font-size: 30rpx;
-						overflow: hidden;
-						line-height: 40rpx;
-						padding: 0rpx 0rpx;
-						.coupon_exp{
-							float: left;
-							font-size: 20rpx;
-						}
-					}
-				}
-			}
-			.coupon_item:last-child{
-				border-bottom: none;
-			}
-		}
-		.addr_list{
-			width: 730rpx;
-			display: block;
-			overflow: hidden;
-			margin: 0rpx auto;
-			min-height: 500rpx;
-			.addr_item{
-				display: block;
-				font-size: 24rpx;
-				overflow: hidden;
-				line-height: 40rpx;
-				padding: 15rpx 10rpx;
-				border-radius: 15rpx;
-				border-bottom: 2rpx solid #dddddd;
-				.radio_label{
-					width: 40rpx;
-					float: left;
-					height: 50rpx;
-					padding-top: 30rpx;
-					margin-right: 20rpx;
-					.radio_icon{
-						float: left;
-						width: 40rpx;
-						height: 40rpx;
-					}
-				}
-				.contact_user{
-					float: left;
-					width: 640rpx;
-					display: block;
-					height: 50rpx;
-					font-size: 24rpx;
-					line-height: 50rpx;
-					.contact_name{
-						font-size: 26rpx;
-						font-weight: bold;
-						margin-right: 16rpx;
-					}
-					.contact_default{
-						color: #F59A23;
-						font-size: 20rpx;
-						margin-left: 16rpx;
-						border: 1rpx solid #F59A23;
-					}
-				}
-				.contact_addr{
-					float: left;
-					width: 640rpx;
-					display: block;
-					font-size: 24rpx;
-					line-height: 30rpx;
-					padding: 10rpx 5rpx;
-				}
-			}
-		}
-		.create_box{
-			height: 140rpx;
-			display: block;
-			.create_addr{
-				width: 700rpx;
-				height: 80rpx;
-				display: block;
-				color: #FFFFFF;
-				font-size: 30rpx;
-				overflow: hidden;
-				line-height: 80rpx;
-				padding: 0rpx 0rpx;
-				text-align: center;
-				margin: 0rpx auto;
-				margin-top: 20rpx;
-				border-radius: 40rpx;
-				background-color: #E03519;
-			}
-		}
-	}
+.goback{
+  position: fixed;
+  width: 38px;
+  height: 38px;
+  background: rgba(0, 0, 0, 0.5);
+  left: 30rpx;
+  margin-left: 0;
+  border-radius: 100px;
+  top: 40px;
+  backdrop-filter: blur(10rpx);
+  border:1rpx solid rgba(255,255,255,0.3);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.product_image_box{
+  display: block;
+  overflow: hidden;
+  background: #FFFFFF;
+  margin: 10rpx auto;
+  .product_image{
+    display: block;
+    margin: 0 auto;
+    width: 750rpx;
+    height: 750rpx;
+  }
+}
+.product_info{
+  display: block;
+  background: #FFFFFF;
+  margin: 10rpx 0rpx;
+  padding: 10px 10px;
+  .product_name{
+    max-height: 80rpx;
+    font-size: 30rpx;
+    line-height: 40rpx;
+    overflow: hidden;
+    padding: 10rpx 0rpx;
+  }
+  .product_spec{
+    color: #999999;
+    font-size: 24rpx;
+    line-height: 30rpx;
+    overflow: hidden;
+    .spec_name{
+      float: left;
+    }
+    .product_stock{
+      float: right;
+    }
+  }
+  .stock_price{
+    font-size: 20rpx;
+    overflow: hidden;
+    margin-top: 10rpx;
+    line-height: 30rpx;
+    .product_price{
+      float: left;
+      color: red;
+      font-size: 38rpx;
+      line-height: 60rpx;
+      .product_market{
+        font-size: 24rpx;
+        color: #999999;
+        line-height: 30rpx;
+        margin-left: 10rpx;
+        text-decoration: line-through;
+      }
+    }
+  }
+}
+// 描述简介
+.product_business{
+  display: block;
+  overflow: hidden;
+  padding: 20rpx 20rpx;
+  margin: 10rpx auto;
+  background: #FFFFFF;
+  .logopic{
+    float: left;
+    width: 80rpx;
+    height: 80rpx;
+    border-radius: 50%;
+    margin-right: 20rpx;
+  }
+  .business_info{
+    float: left;
+    width: 600rpx;
+    overflow: hidden;
+    .business_name{
+      font-size: 26rpx;
+      line-height: 40rpx;
+    }
+    .business_desc{
+      color: #999999;
+      font-size: 24rpx;
+      line-height: 40rpx;
+    }
+  }
+}
+.product_description{
+  width: 700rpx;
+  display: block;
+  overflow: hidden;
+  background: #FFFFFF;
+  min-height: 200rpx;
+  font-size: 26rpx;
+  margin: 0rpx auto;
+  line-height: 50rpx;
+  padding: 10rpx 25rpx;
+  [alt]{ //web_view图片
+    max-width: 100%;  // 避免图片超宽
+    vertical-align: bottom; // 避免图片之间间隙
+  }
+}
+.product_poster{
+  display: block;
+  overflow: hidden;
+  padding: 10rpx 0rpx;
+  margin: 10rpx auto;
+  background: #FFFFFF;
+  .product_image{
+    width: 750rpx;
+    display: block;
+  }
+}
+.order_car{
+  left: 0rpx;
+  width: 750rpx;
+  height: 140rpx;
+  display: block;
+  position: fixed;
+  padding-top: 20rpx;
+  background: #FFFFFF;
+  bottom: var(--window-bottom);
+  border-top: 2rpx solid #DDDDDD;
+  .show_order{
+    float: right;
+    width: 280rpx;
+    height: 80rpx;
+    display: block;
+    color: #FFFFFF;
+    font-size: 30rpx;
+    overflow: hidden;
+    line-height: 80rpx;
+    padding: 0rpx 0rpx;
+    text-align: center;
+    margin-right: 35rpx;
+    background-color: #E03519;
+    border-radius: 0rpx;
+    border-top-right-radius: 20rpx;
+    border-bottom-right-radius: 20rpx;
+  }
+  .show_car{
+    float: right;
+    width: 280rpx;
+    height: 80rpx;
+    display: block;
+    color: #FFFFFF;
+    font-size: 30rpx;
+    overflow: hidden;
+    line-height: 80rpx;
+    padding: 0rpx 0rpx;
+    text-align: center;
+    background-color: #F59A23;
+    border-radius: 0rpx;
+    border-top-left-radius: 20rpx;
+    border-bottom-left-radius: 20rpx;
+  }
+  .to_car{
+    float: left;
+    width: 100rpx;
+    height: 60rpx;
+    display: block;
+    text-align: center;
+    margin-left: 35rpx;
+    padding-top: 10rpx;
+    .car_icon{
+      float: left;
+      width: 60rpx;
+      height: 60rpx;
+      display: block;
+    }
+  }
+}
+.popup{
+  overflow: hidden;
+  .popup_title{
+    display: block;
+    overflow: hidden;
+    margin: 0rpx auto;
+    font-size: 36rpx;
+    height: 120rpx;
+    line-height: 120rpx;
+    padding: 0rpx 20rpx;
+    border-bottom: 10rpx solid #F8F8F8;
+    .to_addr_page{
+      float: right;
+      color: #F59A23;
+      display: block;
+      height: 120rpx;
+      line-height: 120rpx;
+      font-size: 26rpx;
+      padding: 0rpx 10rpx;
+    }
+  }
+  .order_info{
+    overflow: hidden;
+    background: #FFFFFF;
+    .custom_addr{
+      width: 680rpx;
+      display: block;
+      font-size: 24rpx;
+      overflow: hidden;
+      margin: 0rpx auto;
+      line-height: 40rpx;
+      padding: 20rpx 35rpx;
+      background-color: #FFFFFF;
+      border-bottom: 2rpx solid #dddddd;
+      .contact_user{
+        display: block;
+        font-size: 24rpx;
+        line-height: 50rpx;
+        .contact_none{
+          font-size: 26rpx;
+          font-weight: bold;
+        }
+        .contact_name{
+          font-size: 26rpx;
+          font-weight: bold;
+          margin-right: 16rpx;
+        }
+        .contact_more{
+          float: right;
+          font-size: 40rpx;
+          font-weight: bold;
+        }
+      }
+      .contact_addr{
+        width: 620rpx;
+        display: block;
+        font-size: 24rpx;
+        line-height: 30rpx;
+        padding: 10rpx 5rpx;
+      }
+    }
+    .min600{
+      min-height: 600rpx;
+    }
+    .car_item{
+      height: 200rpx;
+      display: block;
+      background: #FFFFFF;
+      margin: 20rpx auto;
+      .box_left{
+        float: left;
+        width: 160rpx;
+        height: 200rpx;
+        margin-left: 35rpx;
+        .car_image{
+          width: 160rpx;
+          height: 160rpx;
+          margin: 20rpx 0rpx;
+          border-radius: 5rpx;
+        }
+      }
+      .box_right{
+        float: left;
+        width: 485rpx;
+        margin-left: 35rpx;
+        padding-top: 20rpx;
+        .car_name{
+          max-height: 80rpx;
+          font-size: 30rpx;
+          line-height: 40rpx;
+          overflow: hidden;
+          padding: 0rpx 0rpx;
+        }
+        .car_spec{
+          color: #999999;
+          font-size: 24rpx;
+          line-height: 30rpx;
+          padding: 0rpx 0rpx;
+        }
+        .stock_price{
+          width: 485rpx;
+          color: #dddddd;
+          font-size: 20rpx;
+          overflow: hidden;
+          margin-top: 10rpx;
+          line-height: 30rpx;
+          .product_price{
+            float: left;
+            color: red;
+            font-size: 30rpx;
+            line-height: 60rpx;
+            .car_market{
+              font-size: 24rpx;
+              color: #999999;
+              line-height: 30rpx;
+              vertical-align: middle;
+              text-decoration: line-through;
+            }
+          }
+          .product_quantity_box{
+            float: right;
+            color: #333333;
+            overflow: hidden;
+            font-size: 24rpx;
+            margin-top: 10rpx;
+            text-align: center;
+            .product_quantity_sub{
+              float: left;
+              border: none;
+              height: 36rpx;
+              background: none;
+              text-align: center;
+              line-height: 36rpx;
+              padding: 10rpx 10rpx;
+              .sub_icon{
+                width: 22rpx;
+                height: 22rpx;
+                display: block;
+              }
+            }
+            .product_quantity_sub::after{
+              border: none;
+              background: none;
+            }
+            .product_quantity{
+              float: left;
+              width: 100rpx;
+              height: 36rpx;
+              font-size: 24rpx;
+              min-height: 36rpx;
+              line-height: 36rpx;
+              padding: 0rpx 0rpx;
+              border-radius: 8rpx;
+              border: 2rpx solid #dddddd;
+            }
+            .product_quantity_add{
+              float: left;
+              border: none;
+              height: 36rpx;
+              background: none;
+              text-align: center;
+              padding: 10rpx 10rpx;
+              line-height: 36rpx;
+              .add_icon{
+                width: 22rpx;
+                height: 22rpx;
+                display: block;
+              }
+            }
+            .product_quantity_add::after{
+              border: none;
+              background: none;
+            }
+          }
+        }
+        .product_stock{
+          font-size: 20rpx;
+          line-height: 60rpx;
+        }
+      }
+    }
+    .select_sku{
+      font-size: 28rpx;
+      padding: 30rpx 35rpx;
+      margin-bottom: 20rpx;
+      .product_attr{
+        display: block;
+        overflow: hidden;
+        margin-bottom: 20rpx;
+        .spec_name{
+          display: block;
+          font-size: 28rpx;
+          line-height: 40rpx;
+          margin-bottom: 20rpx;
+        }
+        .arrt_list{
+          display: block;
+          overflow: hidden;
+          .arrt_option{
+            float: left;
+            height: 40rpx;
+            font-size: 28rpx;
+            line-height: 40rpx;
+            text-align: center;
+            border-radius: 6rpx;
+            padding: 10rpx 30rpx;
+            margin: 20rpx;
+            background-color: #EEEEEE;
+          }
+          .arrt_option.active {
+            color: #FFFFFF;
+            background-color: #fE6000;
+          }
+        }
+      }
+    }
+    .to_select_coupon{
+      font-size: 28rpx;
+      padding: 30rpx 35rpx;
+      margin-bottom: 20rpx;
+      .coupon_deduction{
+        color: red;
+        float: right;
+      }
+    }
+    .order_price{
+      font-size: 28rpx;
+      text-align: right;
+      margin: 0rpx 35rpx;
+      padding: 20rpx 0rpx;
+      border-top: 2rpx solid #DDDDDD;
+      .coupon_deduction{
+        color: red;
+        float: right;
+      }
+    }
+    .order_btn{
+      width: 700rpx;
+      height: 100rpx;
+      display: block;
+      margin: 0 auto;
+      margin-top: 70rpx;
+      line-height: 80rpx;
+      text-align: center;
+      font-size: 30rpx;
+      .to_car{
+        color: #FFFFFF;
+        float: right;
+        width: 700rpx;
+        height: 80rpx;
+        display: block;
+        overflow: hidden;
+        font-size: 30rpx;
+        line-height: 80rpx;
+        padding: 0rpx 0rpx;
+        border-radius: 40rpx;
+        border: 0rpx solid transparent;
+        background-color: #F59A23;
+      }
+      .to_car::after{
+        border: 0rpx solid transparent;
+      }
+      .to_order{
+        color: #FFFFFF;
+        float: right;
+        width: 700rpx;
+        height: 80rpx;
+        display: block;
+        font-size: 30rpx;
+        overflow: hidden;
+        line-height: 80rpx;
+        padding: 0rpx 0rpx;
+        border-radius: 40rpx;
+        background-color: #E03519;
+        border: 0rpx solid transparent;
+      }
+      .to_order::after{
+        border: 0rpx solid transparent;
+      }
+    }
+  }
+  .coupon_list{
+    display: block;
+    overflow: hidden;
+    min-height: 600rpx;
+    margin: 10rpx auto;
+    background: #FFFFFF;
+    padding-bottom: 50rpx;
+    .coupon_item{
+      height: 200rpx;
+      display: block;
+      margin: 10rpx auto;
+      border-bottom: 2rpx solid #DDDDDD;
+      .box_left{
+        float: left;
+        width: 160rpx;
+        height: 160rpx;
+        font-size: 20rpx;
+        text-align: center;
+        margin-left: 35rpx;
+        line-height: 60rpx;
+        margin-top: 20rpx;
+        background: pink;
+        .rebate{
+          width: 120rpx;
+          height: 60rpx;
+          margin: 0rpx auto;
+          line-height: 60rpx;
+          margin-top: 20rpx;
+          overflow: hidden;
+          white-space: nowrap;
+          text-overflow: ellipsis;
+        }
+      }
+      .box_right{
+        float: left;
+        width: 485rpx;
+        margin-left: 35rpx;
+        padding-top: 20rpx;
+        .coupon_title{
+          width: 485rpx;
+          max-height: 80rpx;
+          font-size: 30rpx;
+          overflow: hidden;
+          line-height: 40rpx;
+          padding: 0rpx 0rpx;
+          .coupon_name{
+            float: left;
+            height: 40rpx;
+            width: 380rpx;
+          }
+          .coupon_status{
+            width: 85rpx;
+            float: right;
+            color: #999999;
+            font-size: 24rpx;
+          }
+        }
+        .product_scope{
+          width: 485rpx;
+          height: 80rpx;
+          color: #999999;
+          font-size: 24rpx;
+          overflow: hidden;
+          line-height: 80rpx;
+          .check_label{
+            float: right;
+            display: block;
+            overflow: hidden;
+            padding: 20rpx 20rpx;
+            .isstd{
+              line-height: 40rpx;
+            }
+            .checkbox{
+              float: right;
+              width: 40rpx;
+              height: 40rpx;
+            }
+          }
+        }
+        .coupon_info{
+          width: 485rpx;
+          max-height: 80rpx;
+          font-size: 30rpx;
+          overflow: hidden;
+          line-height: 40rpx;
+          padding: 0rpx 0rpx;
+          .coupon_exp{
+            float: left;
+            font-size: 20rpx;
+          }
+        }
+      }
+    }
+    .coupon_item:last-child{
+      border-bottom: none;
+    }
+  }
+  .addr_list{
+    width: 730rpx;
+    display: block;
+    overflow: hidden;
+    margin: 0rpx auto;
+    min-height: 500rpx;
+    .addr_item{
+      display: block;
+      font-size: 24rpx;
+      overflow: hidden;
+      line-height: 40rpx;
+      padding: 15rpx 10rpx;
+      border-radius: 15rpx;
+      border-bottom: 2rpx solid #dddddd;
+      .radio_label{
+        width: 40rpx;
+        float: left;
+        height: 50rpx;
+        padding-top: 30rpx;
+        margin-right: 20rpx;
+        .radio_icon{
+          float: left;
+          width: 40rpx;
+          height: 40rpx;
+        }
+      }
+      .contact_user{
+        float: left;
+        width: 640rpx;
+        display: block;
+        height: 50rpx;
+        font-size: 24rpx;
+        line-height: 50rpx;
+        .contact_name{
+          font-size: 26rpx;
+          font-weight: bold;
+          margin-right: 16rpx;
+        }
+        .contact_default{
+          color: #F59A23;
+          font-size: 20rpx;
+          margin-left: 16rpx;
+          border: 1rpx solid #F59A23;
+        }
+      }
+      .contact_addr{
+        float: left;
+        width: 640rpx;
+        display: block;
+        font-size: 24rpx;
+        line-height: 30rpx;
+        padding: 10rpx 5rpx;
+      }
+    }
+  }
+  .create_box{
+    height: 140rpx;
+    display: block;
+    .create_addr{
+      width: 700rpx;
+      height: 80rpx;
+      display: block;
+      color: #FFFFFF;
+      font-size: 30rpx;
+      overflow: hidden;
+      line-height: 80rpx;
+      padding: 0rpx 0rpx;
+      text-align: center;
+      margin: 0rpx auto;
+      margin-top: 20rpx;
+      border-radius: 40rpx;
+      background-color: #E03519;
+    }
+  }
+}
 </style>

+ 47 - 104
jiaoyu_mp/pages/score/index.vue

@@ -15,44 +15,11 @@
 				</view>
 			</view>
 		</view>
-		<view class="header_fixed" >
-			<view class="user_title">
-				<view class="user_prc">
-					<image src="../../static/logo2.jpg" ></image>
-				</view>
-				<view class="title">
-					<view class="">
-						{{username}}
-					</view>
-					<view class="">
-						{{scoreInfo.score}}积分
-					</view>
-				</view>
-			</view>
-			<view class="search">
-				<view class="search_box">
-					<view class="search_input">
-						<input  type="text"  placeholder="一年级系统班" />
-					</view>
-					<view class="search_icon">
-						<uni-icons type="search" size="20"></uni-icons>
-					</view>
-				</view>
-			</view>
-			<view class="course_option">
-				<view class="option_name" :class="{'active': selectedOption === 1  }" @click="highlightOption(1)">
-					综合
-				</view>
-				<view class="option_name" :class="{'active': selectedOption === 2  }" @click="highlightOption(2)">
-					我可兑换
-				</view>
-				<view class="option_name" :class="{'active': selectedOption === 3  }" @click="highlightOption(3)">
-					销量
-				</view>
-				<view class="option_name" :class="{'active': selectedOption === 4  }" @click="highlightOption(4)">
-					积分
-				</view>
-			</view>
+		<view class="search_fixed" >
+		  <view class="search_box">
+			<input class="search_input" type="text" v-model="requestParam.name" @input="searchChange" placeholder="请输入产品名称搜索" />
+			<button class="search_btn" @click.stop="searchOpen()"  data-eventsync="true"> 搜索</button>
+		  </view>
 		</view>
 		<view class="to_bottom" > -----到底了-----</view>
 	</view> 
@@ -201,80 +168,56 @@
 </script>
 
 <style lang="less">
-	.header_fixed{
+	.search_fixed{
+	  top: var(--window-top);
+	  left: 0rpx;
+	  width: 750rpx;
+	  display: block;
+	  position: fixed;
+	  margin: 0rpx auto;
+	  padding: 20rpx 0rpx;
+	  background-color: #FFFFFF;
+	  .search_box{
 		width: 750rpx;
-		position: fixed;
-		top: 0rpx;
-		background-color: #fff;
-		.user_title{
-			width: 690rpx;
-			margin: 30rpx auto;
-			display: flex;
-			.user_prc{
-				width: 100rpx;
-				height: 100rpx;
-				border-radius: 50%;
-				image{
-					border-radius: 50%;
-					width: 100%;
-					height: 100%;
-				}
-			}
-			.title{
-				margin-left: 30rpx;
-			}
-		}
-		.search{
-			width: 690rpx;
-			margin: 30rpx auto;
-			padding-top: 1rpx;
-			.search_box{
-				width: 690rpx;
-				height: 70rpx;
-				border: 2rpx solid #c2c2c2;
-				position: relative;
-				border-radius: 60rpx;
-				.search_input{
-					position: absolute;
-					width: 600rpx;
-					right: 0rpx;
-					top: 10rpx;
-				}
-				.search_icon{
-					position: absolute;
-					width: 90rpx;
-					left: 0rpx;
-					top: 15rpx;
-					text-align: center;
-				}
-			}
-		}
-		.course_option{
-			display: flex;
-			width: 690rpx;
-			margin: 0rpx auto;
-			justify-content: space-between;
-			.option_name{
-				text-align: center;
-				width: 150rpx;
-				height: 50rpx;
-				line-height: 50rpx;
-				font-size: 24rpx;
-				border-radius: 60rpx;
-				margin: 20rpx 0rpx;
-				background-color: #e2e2e2;
-			}
+		height: 60rpx;
+		display: block;
+		position: relative;
+		.search_input{
+		  z-index: 0;
+		  width: 590rpx;
+		  height: 56rpx;
+		  display: block;
+		  font-size: 24rpx;
+		  position: relative;
+		  border-top-left-radius: 40rpx;
+		  border-bottom-left-radius: 40rpx;
+		  padding-left: 20rpx;
+		  margin-left: 35rpx;
+		  border: 2rpx solid #dddddd;
 		}
-		.active{
-			background-color: #1FBE7E !important;
-			color: #fff;
+		.search_btn{
+		  top: 0rpx;
+		  z-index: 9;
+		  left: 610rpx;
+		  color: #FFFFFF;
+		  position: absolute;
+		  display: block;
+		  width: 120rpx;
+		  height: 60rpx;
+		  font-size: 24rpx;
+		  margin: 0rpx 0rpx;
+		  padding: 0rpx 0rpx;
+		  line-height: 60rpx;
+		  border-radius: 40rpx;
+		  background-color: #E03519;
 		}
+	  }
 	}
 	.product_box{
 		display: block;
 		overflow: hidden;
 		margin: 0rpx auto;
-		margin-top: 380rpx;
+		margin-top: 120rpx;
 		padding: 0rpx 35rpx;
 		.product_list{
 			display: block;

+ 39 - 40
jiaoyu_mp/pages/score/product.vue

@@ -57,7 +57,7 @@
 						<view class="product_stock">剩{{productInfo.stock}}个</view>
 					</view>
 				</view>
-				<!-- 购物车增加两个撑高度 
+				<!-- 购物车增加两个撑高度
 				<view class="to_select_coupon" ></view>
 				<view class="to_select_coupon" ></view>
 				<view class="order_price" >合计: {{priceTotal}} 积分</view>
@@ -71,7 +71,7 @@
 			<view class="addr_list">
 				<view class="addr_item" v-for="(item,index) in addrList" :key="index" @click="checkedAddrItem(item)">
 					<view class="radio_label">
-						<image class="radio_icon" :src="item.id == checkedAddr.id? '../../static/icon/radioed.png' : '../../static/icon/radio.png'" ></image> 
+						<image class="radio_icon" :src="item.id == checkedAddr.id? '../../static/icon/radioed.png' : '../../static/icon/radio.png'" ></image>
 					</view>
 					<view class="contact_user">
 						<text class="contact_name">{{item.contact_name}}</text>
@@ -102,14 +102,17 @@
 						<text>{{productInfo.name}}</text>
 					</view>
 					<view class="product_subtitle">
-						<text>{{productInfo.spec}}</text>
+						<text>我是副标题</text>
 					</view>
 					<view class="product_spec">
-						<view class="spec_name">{{productInfo.score}}积分</view> 
+						<view class="spec_name">{{productInfo.score}}积分</view>
 						<view class="product_stock">库存{{productInfo.stock}}个</view>
 					</view>
 				</view>
 			</view>
+      <view class="product_description">
+        <rich-text :nodes="productInfo.description"></rich-text>
+      </view>
 <!-- 			<view class="product_comment">
 				<view class="comment_num">
 					<view class="comment_num_title">
@@ -128,7 +131,7 @@
 						<view class="user_comment">
 							这个课程真不错这个课程真不错这个课程真不错
 						</view>
-					</view> 
+					</view>
 					<view class="comment_right">
 						<image src="" mode=""></image>
 					</view>
@@ -141,7 +144,7 @@
 						首页
 					</view>
 				</navigator>
-				<navigator url="/pagesA/user/favorites" open-type="switchTab" class="to_car" >
+<!--				<navigator url="/pagesA/user/favorites" open-type="switchTab" class="to_car" >
 					<image src="../../static/user_icon/user_favo.png" class="car_icon" ></image>
 					<view class="text">
 						收藏
@@ -152,7 +155,7 @@
 					<view class="shop_cat_text">
 						购物车
 					</view>
-				</navigator>
+				</navigator>-->
 				<button class="show_car" data-eventsync="true" @click="showSpecPopup(2)" >立即兑换</button>
 			</view>
 			<view class="to_bottom"> --- 到底了 --- </view>
@@ -206,7 +209,7 @@
 				<view class="addr_list">
 					<view class="addr_item" v-for="(item,index) in addrList" :key="index" @click="checkedAddrItem(item)">
 						<view class="radio_label">
-							<image class="radio_icon" :src="item.id == checkedAddr.id? '../../static/icon/radioed.png' : '../../static/icon/radio.png'" ></image> 
+							<image class="radio_icon" :src="item.id == checkedAddr.id? '../../static/icon/radioed.png' : '../../static/icon/radio.png'" ></image>
 						</view>
 						<view class="contact_user">
 							<text class="contact_name">{{item.contact_name}}</text>
@@ -356,14 +359,14 @@
 					})
 					return;
 				}
-				
+
 				//需要下单的产品信息参数传给completion页面
 				let productInfo = [{name:this.productInfo.name}]
 				//转成json字符串
 				productInfo = JSON.stringify(productInfo);
 				//加密json格式成编码数组
 				let encodedArray = encodeURIComponent(productInfo);
-				
+
 				// 请求接口
 				this.$http.request('api/score_orders/create',{"product_id":this.productInfo.id,'buy_num':this.quantity,'addr_id':this.checkedAddr.id},'post').then((re)=>{
 					// 判断结果
@@ -422,7 +425,7 @@
 			goBack(){
 				uni.navigateBack({
 					success: () => {
-						
+
 					},
 					fail: (err) => {
 						uni.reLaunch({
@@ -491,7 +494,7 @@
 	// 		}
 	// 	}
 	// }
-	
+
 	.goback{
 		position: fixed;
 		width: 38px;
@@ -505,7 +508,7 @@
 		border:1rpx solid rgba(255,255,255,0.3);
 		display: flex;
 		align-items: center;
-		justify-content: center;	
+		justify-content: center;
 	}
 	.product_image_box{
 		display: block;
@@ -535,13 +538,11 @@
 			.product_title{
 				font-size: 30rpx;
 				line-height: 40rpx;
-				padding: 5rpx 0rpx;
 			}
 			.product_subtitle{
 				color: #999999;
 				line-height: 40rpx;
 				font-size: 24rpx;
-				padding: 5rpx 0rpx;
 			}
 		}
 		.product_spec{
@@ -549,7 +550,7 @@
 			font-size: 24rpx;
 			line-height: 30rpx;
 			overflow: hidden;
-			// margin-top: 20rpx;
+			margin-top: 20rpx;
 			.spec_name{
 				float: left;
 				color: red;
@@ -586,8 +587,8 @@
 			}
 		}
 	}
-	
-	
+
+
 	// 描述简介
 	// .product_business{
 	// 	display: block;
@@ -617,21 +618,21 @@
 	// 		}
 	// 	}
 	// }
-	// .product_description{
-	// 	width: 700rpx;
-	// 	display: block;
-	// 	overflow: hidden;
-	// 	background: #FFFFFF;
-	// 	min-height: 600rpx;
-	// 	font-size: 26rpx;
-	// 	margin: 0rpx auto;
-	// 	line-height: 50rpx;
-	// 	padding: 10rpx 25rpx;
-	// 	[alt]{ //web_view图片
-	// 		max-width: 100%;  // 避免图片超宽
-	// 		vertical-align: bottom; // 避免图片之间间隙
-	// 	}
-	// }
+	 .product_description{
+	 	width: 700rpx;
+	 	display: block;
+	 	overflow: hidden;
+	 	background: #FFFFFF;
+	 	min-height: 300rpx;
+	 	font-size: 26rpx;
+	 	margin: 0rpx auto;
+	 	line-height: 50rpx;
+	 	padding: 10rpx 25rpx;
+	 	[alt]{ //web_view图片
+	 		max-width: 100%;  // 避免图片超宽
+	 		vertical-align: bottom; // 避免图片之间间隙
+	 	}
+	 }
 	.product_poster{
 		display: block;
 		overflow: hidden;
@@ -643,7 +644,7 @@
 			display: block;
 		}
 	}
-	
+
 	.product_comment{
 		display: block;
 		background: #FFFFFF;
@@ -691,7 +692,7 @@
 			}
 		}
 	}
-	
+
 	// .order_car{
 	// 	left: 0rpx;
 	// 	width: 750rpx;
@@ -728,8 +729,8 @@
 		bottom: var(--window-bottom);
 		border-top: 2rpx solid #DDDDDD;
 		.show_car{
-			float: left;
-			width: 370rpx;
+			float: right;
+			width: 550rpx;
 			height: 90rpx;
 			display: block;
 			color: #FFFFFF;
@@ -757,15 +758,13 @@
 			}
 			.text{
 				float: left;
-				padding-top: 5rpx;
-				padding-left: 6rpx;
+				padding-left: 8rpx;
 				text-align: center;
 				line-height: 30rpx;
 				font-size: 24rpx;
 			}
 			.shop_cat_text{
 				float: left;
-				padding-top: 5rpx;
 				text-align: center;
 				line-height: 30rpx;
 				font-size: 24rpx;

+ 2 - 5
jiaoyu_mp/pages/user/index.vue

@@ -142,7 +142,7 @@
 			});
 		},
 		methods: {
-			getStatusBarHeight(){
+		getStatusBarHeight(){
 				let SYSTEM_INFO = uni.getSystemInfoSync();
 				this.StatusBarHeight = SYSTEM_INFO.statusBarHeight || 10;
 			},
@@ -265,10 +265,8 @@
 	// }
 	.status_bar{
 		position: fixed;
-		width: 38px;
+		width: 100%;
 		height: 38px;
-		left: 340rpx;
-		margin-left: 0;
 		top: 0;
 		display: flex;
 		align-items: center;
@@ -301,7 +299,6 @@
 					line-height: 80rpx;
 				}
 			}
-	
 		}
 	.navigator_content{
 		width: 750rpx;

+ 0 - 167
jiaoyu_mp/pages/user/info.vue

@@ -1,167 +0,0 @@
-<template>
-	<view>
-		<view class="alter_info">请选择您药店/诊所所在城市,选择后不可更改,请谨慎选择</view>
-		<view class="form"  >
-			<!-- 地区代表表单 -->
-			<form class="info_form">
-				<view class="form_group">
-					<view class="group_title">所在城市:</view>
-					<view class="group_box">
-						<picker mode="multiSelector" class="form_ctrl" :range="cityArray"  @columnchange="cityChange" @change="cityFinish" >
-							<view class="area_text">
-								<text v-if="requestParam.province"> {{requestParam.province}} </text>
-								<text v-if="requestParam.city"> / {{requestParam.city}} </text>
-							</view>
-						</picker>
-					</view>
-				</view>
-				<button @click="toApply" class="submit_btn" >提交</button>
-			</form>
-		</view>
-	</view>
-</template>
-
-<script>
-	
-	import {getProvinces,getMyCity} from "../../utils/city";
-	
-	export default {
-		data() {
-			return {
-				requestParam:{
-					province:"",
-					city:"",
-				},
-				cityArray: [[],[]],
-				cityValue: [0,0],
-			}
-		},
-		onLoad(){
-			// 替换对应的数据
-			this.cityArray.splice(0,1,getProvinces());
-			this.cityArray.splice(1,1,getMyCity(this.cityValue[0]));
-			// 默认地址
-			this.requestParam.province 	= this.cityArray[0][this.cityValue[0]]
-			this.requestParam.city 		= this.cityArray[1][this.cityValue[1]];
-		},
-		onShow(){
-			// 登录信息
-			if( !this.$checkAccess.alterLogin() ) return ;
-		},
-		methods: {
-			toApply(){
-				// 登录信息
-				if( !this.$checkAccess.alterLogin() ) return ;
-				// 请求状态
-				uni.showLoading({mask:true});
-				// 授权成功以后,调用绑定
-				this.$http.request('api/custom/set_city',this.requestParam,'post').then((re)=>{
-					// 关闭
-					uni.hideLoading();
-					// 成功的话
-					if( re.code != 'success' ){
-						// 跳转
-						uni.showToast({title: re.msg,icon:"none"});
-						return;
-					}
-					uni.switchTab({url: '/pages/user/index'});
-				});
-			},
-			cityChange(e){
-				// 替换三个选项
-				this.cityValue.splice(e.detail.column,1,e.detail.value);
-				// 下一级设置为0
-				if( e.detail.column == 0 ){
-					this.cityValue.splice(1,1,0);
-					this.cityValue.splice(2,1,0);
-				}
-				if( e.detail.column == 1 ){
-					this.cityValue.splice(2,1,0);
-				}
-				// 替换对应的数据
-				this.cityArray.splice(0,1,getProvinces());
-				this.cityArray.splice(1,1,getMyCity(this.cityValue[0]));
-			},
-			cityFinish(e){
-				this.requestParam.city_id 		= this.cityArray[1][this.cityValue[1]];
-			},
-		}
-	}
-</script>
-
-<style lang="less">
-	.alter_info{
-		display: block;
-		color: #E03519;
-		font-size: 20rpx;
-		overflow: hidden;
-		margin: 20rpx auto;
-		background: #FFFFFF;
-		line-height: 40rpx;
-		padding: 35rpx 35rpx;
-		text-align: center;
-	}
-	.info_form{
-		display: block;
-		overflow: hidden;
-		padding: 20rpx 0rpx;
-		background: #FFFFFF;
-		.form_group{
-			display: block;
-			overflow: hidden;
-			line-height: 60rpx;
-			padding: 20rpx 35rpx;
-			.group_title{
-				float: left;
-				width: 160rpx;
-				display: block;
-				overflow: hidden;
-				font-size: 30rpx;
-				margin-right: 20rpx;
-			}
-			.group_box{
-				width: 480rpx;
-				float: left;
-				display: block;
-				.form_ctrl{
-					height: 56rpx;
-					font-size: 24rpx;
-					padding: 0rpx 20rpx;
-					line-height: 56rpx;;
-					border: 2rpx solid #DDDDDD;
-				}
-				.area_text{
-					width: 446rpx;
-					font-size: 20rpx;
-					overflow: hidden;
-					white-space: nowrap;
-					text-overflow: ellipsis;
-				}
-				.group_image{
-					width: 200rpx;
-					height: 200rpx;
-				}
-				.choose_image{
-					display: block;
-					width: 200rpx;
-					height: 200rpx;
-					font-size: 38rpx;
-					text-align: center;
-					line-height: 200rpx;
-					border: 2rpx solid #DDDDDD;
-				}
-			}
-		}
-		.submit_btn{
-			color: #FFFFFF;
-			width: 220rpx;
-			height: 80rpx;
-			display: block;
-			font-size: 30rpx;
-			padding: 0rpx 0rpx;
-			line-height: 80rpx;
-			margin: 50rpx auto;
-			background-color: forestgreen;
-		}
-	}
-</style>

+ 28 - 36
jiaoyu_mp/pagesA/coupon/couponproductlist.vue

@@ -4,17 +4,6 @@
 			<view class="to_bottom" v-if="!productList.length"> -----还没有产品啦-----</view>
 			<!-- 产品列表 -->
 			<view class="product_list" >
-<!-- 				<view @click="toDetail(item)" data-eventsync="true" class="product_item" v-for="(item,index) in productList" :key="index" >
-					<image class="product_image" :src="item.thumb" mode=""></image>
-					<view class="product_name"><text>{{item.name}}</text></view>
-					<view class="product_spec"><text>{{item.spec}}</text></view>
-					<view class="stock_price">
-						<view class="product_price" v-if="isShowPrice">
-							<text >¥{{item.price}} </text>
-						</view>
-						<view class="product_stock">剩{{item.stock}}个</view>
-					</view>
-				</view> -->
 				<!-- Vue3 项目部分小程序端事件延迟或调用失败 在执行事件的元素上添加 data-eventsync="true" 属性以解决此问题 -->
 				<view @click="toDetail(item)" data-eventsync="true" class="product_item" v-for="(item,index) in productList" :key="index">
 					<view class="product_left">
@@ -26,7 +15,7 @@
 								<text>{{item.name}}</text>
 							</view>
 							<view class="time">
-								<text>距今日结束08:02:56</text>
+								<text>{{item.spec}}</text>
 							</view>
 						</view>
 						<view class="stock_price">
@@ -34,7 +23,7 @@
 								<span style="font-size: 26rpx;">¥</span><text >{{item.price}}</text>
 							</view>
 							<view class="product_order_but">
-								<button>立即购买</button>
+								立即购买
 							</view>
 						</view>
 					</view>
@@ -49,7 +38,6 @@
 	export default {
 		data() {
 			return {
-
 				// 产品列表
 				productList:[],
 				// 请求参数
@@ -138,6 +126,8 @@
 			});
 		},
 		methods: {
+			onChange(){
+			},
 			searchChange(e){
 				// 如果没有搜索词
 				if( !this.requestParam.name ){
@@ -203,10 +193,13 @@
 				border-radius: 20rpx;
 				.product_left{
 					float: left;
+					width: 200rpx;
+					height: 180rpx;
+					overflow: hidden;
+					margin: 20rpx 20rpx;
 					.product_image{
-						margin: 20rpx 20rpx;
-						width: 224rpx;
-						height: 200rpx;
+						width: 100%;
+						height: 100%;
 						border-radius: 20rpx;
 					}
 				}
@@ -215,42 +208,41 @@
 					width: 380rpx;
 					margin: 20rpx 20rpx;
 					.product_title{
-						line-height: 1.5;
 						.product_text{
-							font-size: 30rpx;
+							font-size: 36rpx;
 							font-weight: 600;
 						}
 						.time{
 							font-size: 24rpx;
+							padding: 15rpx 0rpx;
 						}
 					}
 					.stock_price{
-						color: #dddddd;
-						height: 100rpx;
+						height: 80rpx;
 						font-size: 20rpx;
 						overflow: hidden;
-						line-height: 30rpx;
-						 padding: 0rpx 10rpx;
-						margin-top: 40rpx;
+						width: 410rpx;
+						//  border: 2rpx solid;
 						.product_price{
 							float: left;
 							color: red;
-							font-size: 50rpx;
+							font-size: 40rpx;
 							font-weight: 600;
-							line-height: 100rpx;
+							padding: 10rpx 0rpx;
+							//  border: 2rpx solid;
 						}
 						.product_order_but{	
 							float: right;
-							button{
-								width: 166rpx;
-								height: 64rpx;
-								font-size: 26rpx;
-								font-weight: 600;
-								margin: 20rpx 0rpx;
-								background-color: #1fbe7e;
-								border-radius: 40rpx;
-								color: #FFFFFF;
-							}
+							width: 166rpx;
+							height: 60rpx;
+							font-size: 26rpx;
+							font-weight: 600;
+							background-color: #1fbe7e;
+							border-radius: 40rpx;
+							text-align: center;
+							line-height: 60rpx;
+							color: #FFFFFF;
+							
 						}
 					}
 				}

+ 25 - 74
jiaoyu_mp/pagesA/course/reservation.vue

@@ -23,7 +23,6 @@
 				  </view>
 				</view>
 			</scroll-view>
-
 			    <view class="times">
 					<scroll-view scroll-y="true" >
 						<view class="time_list">
@@ -133,71 +132,7 @@
 
 		data() {
 			return {
-				data:[
-					{
-						  "teacher_id": 6,
-						  "teacher_name": "张老师",
-						  "list": [
-							{
-							  "id": 4,
-							  "course_id": 1,
-							  "teacher_id": 6,
-							  "start_time": 1732060800,
-							  "end_time": 1732063500,
-							  "duration": 45,
-							  "course_number": 0,
-							  "reservation_number": 0,
-							  "teacher_name": "张老师",
-							  "teacher_desc": "擅长舞蹈",
-							  "course_name": "拳击初级课",
-							  "course_image": "../../static/logo2.jpg",
-							  "course_desc": "拳击讲解",
-							  "address": "一方天地",
-							  "reservation_status": 0
-							},
-							{
-							  "id": 6,
-							  "course_id": 1,
-							  "teacher_id": 6,
-							  "start_time": 1732064400,
-							  "end_time": 1732068000,
-							  "duration": 60,
-							  "course_number": 30,
-							  "reservation_number": 0,
-							  "teacher_name": "张老师",
-							  "teacher_desc": "擅长舞蹈",
-							  "course_name": "拳击初级课",
-							  "course_image": "../../static/logo2.jpg",
-							  "course_desc": "拳击讲解",
-							  "address": "一方天地",
-							  "reservation_status": 1
-							}
-						  ]
-						},
-						{
-						  "teacher_id": 7,
-						  "teacher_name": "王老师",
-						  "list": [
-							{
-							  "id": 7,
-							  "course_id": 1,
-							  "teacher_id": 7,
-							  "start_time": 1732520086,
-							  "end_time": 1732520086,
-							  "duration": 60,
-							  "course_number": 30,
-							  "reservation_number": 0,
-							  "teacher_name": "王老师",
-							  "teacher_desc": "从业20年,资深老教室",
-							  "course_name": "拳击初级课",
-							  "course_image": "../../static/logo2.jpg",
-							  "course_desc": "拳击讲解",
-							  "address": "一方天地",
-							  "reservation_status": 1
-							}
-						  ]
-						}
-				],
+				data:[],
 				shcedule_list:[],//排课列表
 				teacher_desc: "",//当前老师的一个介绍
 				course_name: "",//当前老师的名字
@@ -206,13 +141,14 @@
 				course_id:0,//课程id
 				schedule_id:0,//排课id
 				teacherActive:-1,
+				teacher_id:0,
 				
 				orderDateTime: '暂无选择', // 选中时间
 				orderTimeArr: {}, //多选的时间
 				dateArr: [], //日期数据
 				timeArr: [], //时间数据
 				nowDate: "", // 当前日期
-				dateActive: -1, //选中的日期索引
+				dateActive: 0, //选中的日期索引
 				timeActive: 0, //选中的时间索引
 				timeQuanBeginIndex: 0, //时间段开始的下标
 				selectDate: "", //选择的日期
@@ -233,6 +169,7 @@
 				this.$http.request('api/course/get_schedule_list',{orders_product_id:this.orders_product_id,course_id:this.course_id},'post').then((res)=>{
 					if(res.code === "success"){
 						this.data = res.data
+						this.selectDate = this.currentTime().date
 						this.defaultTeacherDesc()
 						this.initOnload()
 					}
@@ -251,7 +188,7 @@
 				if(this.data.length >0){
 					if(this.teacherActive == index){
 						this.shcedule_list = this.data[index]["list"]
-						this.schedule_id = this.data[index].teacher_id
+						this.teacher_id = this.data[index].teacher_id
 						this.course_name = this.shcedule_list[0].course_name
 						this.teacher_desc = this.shcedule_list[0].teacher_desc
 						this.course_image = this.shcedule_list[0].course_image
@@ -266,7 +203,7 @@
 			defaultTeacherDesc(){
 				this.teacherActive = 0
 				if(this.data.length>0){
-					this.schedule_id = this.data[0].teacher_id
+					this.teacher_id = this.data[0].teacher_id
 					this.shcedule_list = this.data[0]["list"]
 					this.course_name = this.shcedule_list[0].course_name
 					this.teacher_desc = this.shcedule_list[0].teacher_desc
@@ -277,7 +214,7 @@
 			//预约课程事件
 			reservationPopup(){
 				//如果没有选择老师
-				  if(this.schedule_id === 0){
+				  if(this.teacher_id === 0){
 					  uni.showToast({
 					  	title:"请选择老师",
 						icon:"none"
@@ -306,7 +243,15 @@
 					  if(res.code === 'success'){
 						  this.handleSubmit();
 						  this.initOnload();
-						  this.$refs.outcomePopup.open("center")
+						  this.$refs.outcomePopup.open("center");
+						  this.$http.request('api/course/get_schedule_list',{orders_product_id:this.orders_product_id,course_id:this.course_id},'post').then((res)=>{
+						    if(res.code === "success"){
+						      this.data = res.data
+						      this.selectDate = this.currentTime().date
+						      this.defaultTeacherDesc()
+						      this.initOnload()
+						    }
+						  })
 					  }else{
 						  uni.showToast({
 						  	title:`${res.msg}`,
@@ -333,10 +278,11 @@
 				this.timeArr.forEach((item, index) => {
 					// 时间段
 					if (this.isQuantum) {
-						
-						if(this.shcedule_list[index].reservation_status === 1){
+						//保持前后端已预约时间段禁用
+						if(item.reservation_status === 1){
 							item.disable = true
 						}
+						
 						// 将预约的时间禁用
 						this.appointTime.forEach(t => {
 							let [date, time] = t.split(' ')
@@ -361,7 +307,7 @@
 			selectTimeEvent(index, item) {
 				if (item.disable) return
 				if(item.disableSum) return
-				
+				this.shcedule_id = item.shcedule_id
 				if (this.isQuantum) {
 					return this.handleSelectQuantum(index, item)
 			
@@ -464,18 +410,23 @@
 			 initTime( isQuantum) {
 				const time = []
 				this.shcedule_list.forEach((cruTiem)=>{
+					let selectDateStr = new Date(this.selectDate + ' 00:00:00').getTime()
 					let	starTimeStamp = cruTiem.start_time * 1000
 					let	endTimeStamp = cruTiem.end_time * 1000
 					let timeStr  = 60 * 1000 * cruTiem.duration
+					if (starTimeStamp >= selectDateStr && (selectDateStr + 24*60*60*1000) >= endTimeStamp) {
 					// timeStr = 60 * 1000 * i.duration
 					if (isQuantum) {
 						time.push({
 							begin: this.timeStamp(starTimeStamp , isQuantum).hour,
 							end: this.timeStamp(endTimeStamp , isQuantum).hour,
 							reservationSum:`${cruTiem.reservation_number}/${cruTiem.course_number}`,
+							reservation_status:cruTiem.reservation_status,
+							shcedule_id:cruTiem.id,
 							disable: false
 						})
 					}
+				}
 				})
 				return time
 			},

+ 31 - 6
jiaoyu_mp/pagesA/course/usercourse.vue

@@ -2,10 +2,9 @@
 	<page-meta :page-style="'overflow:'+(show?'hidden':'visible')"></page-meta>
 	<view >
 		<view class="course_status_list">
-			<view class="course_status_item" > 全部 </view>
-			<view class="course_status_item" > 待上课 </view>
-			<view class="course_status_item" > 已完成 </view>
-			<view class="course_status_item" > 已取消 </view>
+			<view class="course_status_item" :class="requestParam.status==0?'active':''" @click="setStatus(0)"> 全部 </view>
+			<view class="course_status_item" :class="requestParam.status==1?'active':''" @click="setStatus(1)"> 待上课 </view>
+			<view class="course_status_item" :class="requestParam.status==2?'active':''" @click="setStatus(2)"> 已取消 </view>
 		</view>
 		<view class="course_list">
 			<view class="course_item"  v-for="(item,index) in productList" :key="index">
@@ -87,8 +86,8 @@
 				productList:[],
 				// 请求参数
 				requestParam:{
-					name:"",
-					page:1,
+				  page:1,
+				  status:0,
 				},
 				// 是否最后一页
 				isLast:false,
@@ -123,6 +122,30 @@
 			});
 		},
 		methods:{
+			setStatus(status){
+			  // 登录提示
+			  if( !this.$checkAccess.alterLogin() )  return ;
+			  // 请求中,不再请求
+			  if( this.isReqing ) 		return;
+			  // 初始化页码为1
+			  this.requestParam.page		= 1;
+			  // 是否是最后一页
+			  this.isLast			 		= false;
+			  // 状态变更
+			  this.requestParam.status	= status;
+			  // 设置请求中
+			  this.isReqing				= true;
+			  // 请求列表
+			  this.$http.request('api/course/reservation_list',this.requestParam).then((re)=>{
+			    // 设置非请求中
+			    this.isReqing			= false;
+			    // 成功结果
+			    if( re.code == 'success' ){
+			      if(re.data.last_page >= this.requestParam.page ) this.isLast = true;
+			      this.productList = re.data.data;
+			    }
+			  });
+			},
 			popupChange(e){
 				// 禁止滚动穿透
 				this.show = e.show
@@ -149,6 +172,8 @@
 						})
 						//取消成功之后更新一下按钮的状态
 						this.$http.request('api/course/reservation_list',this.requestParam.page).then((re)=>{
+							// 设置非请求中
+							this.isReqing			= false;
 							// 成功结果
 							if( re.code == 'success' ){
 								if(re.data.last_page <= this.requestParam.page ) this.isLast = true;

+ 1 - 1
jiaoyu_mp/unpackage/dist/dev/mp-weixin/app.js

@@ -13,7 +13,6 @@ if (!Math) {
   "./pages/coupon/index.js";
   "./pages/orders/index.js";
   "./pages/product/index.js";
-  "./pages/user/info.js";
   "./pages/login/index.js";
   "./pages/bind/user.js";
   "./pages/addr/index.js";
@@ -27,6 +26,7 @@ if (!Math) {
   "./pages/webview/index.js";
   "./pages/coupon/order_coupon.js";
   "./pages/course/index.js";
+  "./pages/orders/confirm.js";
   "./pagesA/search/index.js";
   "./pagesA/course/reservation.js";
   "./pagesA/course/usercourse.js";

+ 2 - 2
jiaoyu_mp/unpackage/dist/dev/mp-weixin/app.json

@@ -8,7 +8,6 @@
     "pages/coupon/index",
     "pages/orders/index",
     "pages/product/index",
-    "pages/user/info",
     "pages/login/index",
     "pages/bind/user",
     "pages/addr/index",
@@ -21,7 +20,8 @@
     "pages/orders/completion",
     "pages/webview/index",
     "pages/coupon/order_coupon",
-    "pages/course/index"
+    "pages/course/index",
+    "pages/orders/confirm"
   ],
   "subPackages": [
     {

+ 16 - 18
jiaoyu_mp/unpackage/dist/dev/mp-weixin/common/assets.js

@@ -1,27 +1,25 @@
 "use strict";
-const _imports_3$1 = "/static/icon/sub_icon.png";
-const _imports_4$1 = "/static/icon/add_icon.png";
-const _imports_0$3 = "/static/user_icon/user_order_icon.png";
-const _imports_1$1 = "/static/user_icon/user_class_icon.png";
-const _imports_2$1 = "/static/user_icon/user_score_icon.png";
+const _imports_1$1 = "/static/icon/sub_icon.png";
+const _imports_2$1 = "/static/icon/add_icon.png";
+const _imports_0$4 = "/static/user_icon/user_order_icon.png";
+const _imports_1 = "/static/user_icon/user_class_icon.png";
+const _imports_2 = "/static/user_icon/user_score_icon.png";
 const _imports_3 = "/static/user_icon/user_attr_icon.png";
 const _imports_4 = "/static/user_icon/user_coupon_icon.png";
 const _imports_5 = "/static/user_icon/user_clockin_icon.png";
-const _imports_0$2 = "/static/tabbar/score.png";
-const _imports_1 = "/static/user_icon/user_favo.png";
-const _imports_0$1 = "/static/logo2.jpg";
-const _imports_0 = "/static/icon/score.png";
-const _imports_2 = "/static/icon/car.png";
-exports._imports_0 = _imports_0$3;
-exports._imports_0$1 = _imports_0$2;
-exports._imports_0$2 = _imports_0$1;
-exports._imports_0$3 = _imports_0;
+const _imports_0$3 = "/static/icon/car.png";
+const _imports_0$2 = "/static/logo2.jpg";
+const _imports_0$1 = "/static/icon/score.png";
+const _imports_0 = "/static/tabbar/score.png";
+exports._imports_0 = _imports_0$4;
+exports._imports_0$1 = _imports_0$3;
+exports._imports_0$2 = _imports_0$2;
+exports._imports_0$3 = _imports_0$1;
+exports._imports_0$4 = _imports_0;
 exports._imports_1 = _imports_1$1;
 exports._imports_1$1 = _imports_1;
 exports._imports_2 = _imports_2$1;
 exports._imports_2$1 = _imports_2;
-exports._imports_3 = _imports_3$1;
-exports._imports_3$1 = _imports_3;
-exports._imports_4 = _imports_4$1;
-exports._imports_4$1 = _imports_4;
+exports._imports_3 = _imports_3;
+exports._imports_4 = _imports_4;
 exports._imports_5 = _imports_5;

+ 1 - 0
jiaoyu_mp/unpackage/dist/dev/mp-weixin/common/vendor.js

@@ -7908,3 +7908,4 @@ exports.resolveComponent = resolveComponent;
 exports.s = s;
 exports.sr = sr;
 exports.t = t;
+exports.wx$1 = wx$1;

+ 2 - 2
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/car/index.js

@@ -172,8 +172,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         n: index
       };
     }),
-    c: common_assets._imports_3,
-    d: common_assets._imports_4,
+    c: common_assets._imports_1,
+    d: common_assets._imports_2,
     e: $data.checkedAll ? "../../static/icon/checked.png" : "../../static/icon/checkbox.png",
     f: common_vendor.o(($event) => $options.checkAll()),
     g: common_vendor.t($data.priceTotal),

+ 4 - 2
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/car/order.js

@@ -129,11 +129,13 @@ const _sfc_main = {
         }
       }
       productInfo = JSON.stringify(productInfo);
-      let encodedArray = encodeURIComponent(productInfo);
       productList = JSON.stringify(productList);
       this.$http.request("api/orders/create", { "product_list": productList, "custom_coupon_id": this.customCoupon, "is_cart": 1, "addr_id": this.checkedAddr.id }, "post").then((re) => {
         if (re.code == "success") {
-          common_vendor.index.redirectTo({ url: `/pages/orders/completion?params=${encodedArray}` });
+          let orderInfo = re.data;
+          orderInfo = JSON.stringify(orderInfo);
+          let params = encodeURIComponent(orderInfo);
+          common_vendor.index.navigateTo({ url: `/pages/orders/confirm?params=${params}` });
           return;
         } else {
           common_vendor.index.showToast({ title: re.msg, icon: "none" });

+ 4 - 0
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/course/index.wxss

@@ -32,10 +32,14 @@
 .course_layout .course_list .course_item .course_title .right {
   font-size: 24rpx;
   margin-left: 20rpx;
+  width: 420rpx;
 }
 .course_layout .course_list .course_item .course_title .right .title {
   font-size: 36rpx;
   font-weight: bold;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
 }
 .course_layout .course_list .course_item .course_title .right .skill {
   font-size: 30rpx;

+ 3 - 17
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -116,14 +116,6 @@ const _sfc_main = {
     }
   }
 };
-if (!Array) {
-  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
-  _easycom_uni_icons2();
-}
-const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
-if (!Math) {
-  _easycom_uni_icons();
-}
 function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return common_vendor.e({
     a: common_vendor.f($data.bannerList, (item, index, i0) => {
@@ -145,15 +137,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         f: index
       };
     }),
-    d: common_vendor.p({
-      type: "search",
-      size: "20"
-    }),
-    e: common_vendor.p({
-      type: "notification",
-      size: "30"
-    }),
-    f: common_vendor.o(($event) => $options.onChange()),
+    d: common_vendor.o([($event) => $data.requestParam.name = $event.detail.value, (...args) => $options.searchChange && $options.searchChange(...args)]),
+    e: $data.requestParam.name,
+    f: common_vendor.o(($event) => $options.searchOpen()),
     g: $data.isLast
   }, $data.isLast ? {} : {});
 }

+ 1 - 3
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/index/index.json

@@ -1,7 +1,5 @@
 {
   "navigationBarTitleText": "开邻智数",
   "enablePullDownRefresh": true,
-  "usingComponents": {
-    "uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
-  }
+  "usingComponents": {}
 }

+ 1 - 1
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/index/index.wxml

@@ -1 +1 @@
-<view><view class="banner_box"><view class="banner_list"><swiper class="banner_swiper" autoplay="{{true}}"><swiper-item wx:for="{{a}}" wx:for-item="item" wx:key="c"><image src="{{item.a}}" class="image" mode="widthFix" bindtap="{{item.b}}"></image></swiper-item></swiper></view></view><view class="product_box"><view wx:if="{{b}}" class="to_bottom"> -----还没有产品啦-----</view><view class="product_list"><view wx:for="{{c}}" wx:for-item="item" wx:key="f" bindtap="{{item.e}}" data-eventsync="true" class="product_item"><view class="product_left"><image class="product_image" src="{{item.a}}" mode=""></image></view><view class="product_right"><view class="product_title"><view class="product_text"><text>{{item.b}}</text></view><view class="time"><text>{{item.c}}</text></view></view><view class="stock_price"><view class="product_price"><label style="font-size:26rpx">¥</label><text>{{item.d}}</text></view><view class="product_order_but"> 立即购买 </view></view></view></view></view></view><view class="search_fixed"><navigator url="/pagesA/search/index" class="search_box"><view class="search_input"><text>搜索</text></view><uni-icons wx:if="{{d}}" class="icon" u-i="406c9705-0" bind:__l="__l" u-p="{{d}}"></uni-icons><view class="search_btn" catchtap="{{f}}"><uni-icons wx:if="{{e}}" u-i="406c9705-1" bind:__l="__l" u-p="{{e}}"></uni-icons></view></navigator></view><view wx:if="{{g}}" class="to_bottom"> -----到底啦-----</view></view>
+<view><view class="banner_box"><view class="banner_list"><swiper class="banner_swiper" autoplay="{{true}}"><swiper-item wx:for="{{a}}" wx:for-item="item" wx:key="c"><image src="{{item.a}}" class="image" mode="widthFix" bindtap="{{item.b}}"></image></swiper-item></swiper></view></view><view class="product_box"><view wx:if="{{b}}" class="to_bottom"> -----还没有产品啦-----</view><view class="product_list"><view wx:for="{{c}}" wx:for-item="item" wx:key="f" bindtap="{{item.e}}" data-eventsync="true" class="product_item"><view class="product_left"><image class="product_image" src="{{item.a}}" mode=""></image></view><view class="product_right"><view class="product_title"><view class="product_text"><text>{{item.b}}</text></view><view class="time"><text>{{item.c}}</text></view></view><view class="stock_price"><view class="product_price"><label style="font-size:26rpx">¥</label><text>{{item.d}}</text></view><view class="product_order_but"> 立即购买 </view></view></view></view></view></view><view class="search_fixed"><view class="search_box"><input class="search_input" type="text" bindinput="{{d}}" placeholder="请输入产品名称搜索" value="{{e}}"/><button class="search_btn" catchtap="{{f}}" data-eventsync="true"> 搜索</button></view></view><view wx:if="{{g}}" class="to_bottom"> -----到底啦-----</view></view>

+ 9 - 6
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/index/index.wxss

@@ -5,7 +5,7 @@
   position: fixed;
   margin: 0rpx auto;
   padding: 20rpx 0rpx;
-  background-color: #ffffff;
+  background-color: #FFFFFF;
 }
 .search_fixed .search_box {
   width: 590rpx;
@@ -20,11 +20,12 @@
   display: block;
   font-size: 24rpx;
   position: relative;
-  border-radius: 40rpx;
+  border-top-left-radius: 40rpx;
+  border-bottom-left-radius: 40rpx;
   padding-left: 20rpx;
   margin-left: 35rpx;
   background-color: #FFFFFF;
-  border: 2rpx solid #ffffff;
+  border: 2rpx solid #dddddd;
 }
 .search_fixed .search_box .search_input text {
   width: 120rpx;
@@ -42,17 +43,19 @@
 }
 .search_fixed .search_box .search_btn {
   top: 0rpx;
-  z-index: 999;
-  left: 660rpx;
+  z-index: 9;
+  left: 610rpx;
   color: #FFFFFF;
   position: absolute;
   display: block;
-  width: 80rpx;
+  width: 120rpx;
   height: 60rpx;
   font-size: 24rpx;
   margin: 0rpx 0rpx;
   padding: 0rpx 0rpx;
   line-height: 60rpx;
+  border-radius: 40rpx;
+  background-color: #E03519;
 }
 .banner_box {
   width: 680rpx;

+ 5 - 15
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/completion.js

@@ -4,16 +4,13 @@ const _sfc_main = {
   data() {
     return {
       //报单成功的商品信息
-      productTitleInfo: []
+      productTitleInfo: [],
+      price: ""
     };
   },
   onLoad(option) {
-    let productInfo = option.params;
-    if (productInfo) {
-      productInfo = decodeURIComponent(productInfo);
-      productInfo = JSON.parse(productInfo);
-      this.productTitleInfo = productInfo;
-    }
+    console.log(option);
+    this.price = option.price;
   },
   onShow() {
   },
@@ -45,14 +42,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
       size: "40",
       color: "#eeeeee"
     }),
-    b: common_vendor.f($data.productTitleInfo, (item, index, i0) => {
-      return {
-        a: common_vendor.t(item.name),
-        b: common_vendor.t(item.spec),
-        c: common_vendor.t(item.price),
-        d: index
-      };
-    }),
+    b: common_vendor.t(this.price),
     c: common_vendor.o(($event) => $options.navOrder()),
     d: common_vendor.o(($event) => $options.navHome())
   };

+ 1 - 1
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/completion.wxml

@@ -1 +1 @@
-<view class="order_completion_box"><view class="order_completion_title"><view class="completion_icon"><uni-icons wx:if="{{a}}" class="icon" u-i="4c0ef476-0" bind:__l="__l" u-p="{{a}}"></uni-icons></view><view wx:for="{{b}}" wx:for-item="item" wx:key="d" class="product_title">{{item.a}} {{item.b}} 特惠价 ¥{{item.c}}</view></view><view class="nav_button"><view class="nav_order" bindtap="{{c}}"><text>查看订单</text></view><view class="nav_home" bindtap="{{d}}"><text>返回首页</text></view></view></view>
+<view class="order_completion_box"><view class="order_completion_title"><view class="completion_icon"><uni-icons wx:if="{{a}}" class="icon" u-i="4c0ef476-0" bind:__l="__l" u-p="{{a}}"></uni-icons></view><view class="product_title"> 支付成功 ¥{{b}}</view></view><view class="nav_button"><view class="nav_order" bindtap="{{c}}"><text>查看订单</text></view><view class="nav_home" bindtap="{{d}}"><text>返回首页</text></view></view></view>

+ 128 - 0
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/confirm.js

@@ -0,0 +1,128 @@
+"use strict";
+const common_vendor = require("../../common/vendor.js");
+const _sfc_main = {
+  data() {
+    return {
+      boolWx: true,
+      boolWb: false,
+      payType: 1,
+      //支付类型
+      price: 0,
+      //支付金额
+      orderNo: "",
+      //订单号
+      parentOrderNo: "",
+      //父订单号
+      submiting: false
+      //控制再次确认支付的弹出框
+    };
+  },
+  onLoad(options) {
+    let orderInfo = options.params;
+    if (orderInfo) {
+      orderInfo = decodeURIComponent(orderInfo);
+      orderInfo = JSON.parse(orderInfo);
+    }
+    this.price = orderInfo.pay_total;
+    if (orderInfo.order_id) {
+      this.orderNo = orderInfo.order_id;
+    } else {
+      this.parentOrderNo = orderInfo.snowflake_id;
+    }
+  },
+  methods: {
+    // 选择支付方式
+    changePayType(type) {
+      if (1 == type) {
+        this.boolWx = true;
+        this.boolWb = false;
+      } else {
+        this.boolWx = false;
+        this.boolWb = true;
+      }
+      this.payType = type;
+      console.log(this.payType, "this.payType");
+    },
+    // 确认支付
+    confirm() {
+      const that = this;
+      if (1 === that.payType) {
+        that.submiting = true;
+        this.pay();
+      }
+    },
+    //调起微信支付
+    pay() {
+      common_vendor.index.login({
+        provider: "weixin",
+        success: (loginRes) => {
+          const { code } = loginRes;
+          this.$http.request("api/wechat_pay/pay", { code, order_id: this.orderNo }, "post").then((e) => {
+            const price = this.price;
+            if (e.code == "success") {
+              common_vendor.wx$1.requestPayment({
+                timeStamp: e.data.timeStamp,
+                //时间戳
+                nonceStr: e.data.nonceStr,
+                //随机字符串
+                package: e.data.package,
+                //prepay_id
+                signType: e.data.signType,
+                //签名算法MD5
+                paySign: e.data.paySign,
+                //签名
+                success: function(res) {
+                  if (res.errMsg == "requestPayment:ok") {
+                    console.log("支付成功3", price);
+                    common_vendor.index.navigateTo({ url: `/pages/orders/completion?price=${price}` });
+                  } else {
+                    console.log("支付失败");
+                  }
+                },
+                fail: function(res) {
+                  console.log("支付失败", res);
+                }
+              });
+            } else {
+              console.log("支付失败2", e);
+              common_vendor.index.showToast({
+                title: "支付失败2",
+                icon: "none"
+              });
+            }
+          });
+        },
+        fail: (err) => {
+          console.log("uni.login 接口调用失败,无法获取openid", err);
+          common_vendor.index.showToast({
+            title: "支付失败",
+            icon: "none"
+          });
+        }
+      });
+    }
+  }
+};
+if (!Array) {
+  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
+  _easycom_uni_icons2();
+}
+const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
+if (!Math) {
+  _easycom_uni_icons();
+}
+function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
+  return {
+    a: common_vendor.t($data.price),
+    b: common_vendor.p({
+      type: "weixin",
+      size: "60rpx",
+      color: "#00aa00"
+    }),
+    c: $data.boolWx,
+    d: common_vendor.o(($event) => $options.changePayType(1)),
+    e: common_vendor.o((...args) => $options.confirm && $options.confirm(...args))
+  };
+}
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
+wx.createPage(MiniProgramPage);

+ 6 - 0
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/confirm.json

@@ -0,0 +1,6 @@
+{
+  "navigationBarTitleText": "确认支付",
+  "usingComponents": {
+    "uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
+  }
+}

+ 1 - 0
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/confirm.wxml

@@ -0,0 +1 @@
+<view class="whole"><view class="pay"><view class="header"><view><view class="pay">支付金额</view><view class="payNum"><label style="font-size:34rpx">¥</label>{{a}}</view></view></view><view class="listPay"><uni-icons wx:if="{{b}}" u-i="77c3dc96-0" bind:__l="__l" u-p="{{b}}"></uni-icons><view class="text"><view class="wx">微信支付</view><view class="subWx">推荐使用微信支付</view></view><view class="btn"><label class="radio"><radio value="1" checked="{{c}}" color="#FFCC33" style="transform:scale(0.7)" bindtap="{{d}}"/></label></view></view><view class="bootom"><button type="warn" style="color:#fff" bindtap="{{e}}">确认支付</button></view></view></view>

+ 70 - 0
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/confirm.wxss

@@ -0,0 +1,70 @@
+/**
+ * 这里是uni-app内置的常用样式变量
+ *
+ * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
+ * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
+ *
+ */
+/**
+ * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
+ *
+ * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
+ */
+/* 颜色变量 */
+/* 行为相关颜色 */
+/* 文字基本颜色 */
+/* 背景颜色 */
+/* 边框颜色 */
+/* 尺寸变量 */
+/* 文字尺寸 */
+/* 图片尺寸 */
+/* Border Radius */
+/* 水平间距 */
+/* 垂直间距 */
+/* 透明度 */
+/* 文章场景相关 */
+.whole {
+  display: flex;
+  justify-content: center;
+}
+.whole .header {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  text-align: center;
+  flex-wrap: wrap;
+  height: 300rpx;
+}
+.whole .header .pay {
+  width: 100%;
+  color: #717171;
+}
+.whole .header .payNum {
+  width: 100%;
+  font-size: 44rpx;
+  margin: 10rpx 0px 20rpx;
+}
+.whole .pay {
+  width: 100%;
+}
+.whole .pay .listPay {
+  height: 130rpx;
+  display: flex;
+  align-items: center;
+}
+.whole .pay .listPay .uni-icons {
+  margin-left: 20rpx;
+}
+.whole .pay .listPay .text {
+  width: 40%;
+  margin: 0px 20rpx 0px;
+}
+.whole .pay .listPay .btn {
+  width: 40%;
+  text-align: right;
+}
+.whole .pay .bootom {
+  width: 90%;
+  margin: auto;
+  margin-top: 20rpx;
+}

+ 7 - 5
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/index.js

@@ -122,11 +122,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     b: common_vendor.o(($event) => $options.setStatus(0)),
     c: common_vendor.n($data.requestParam.status == 1 ? "active" : ""),
     d: common_vendor.o(($event) => $options.setStatus(1)),
-    e: common_vendor.n($data.requestParam.status == 8 ? "active" : ""),
-    f: common_vendor.o(($event) => $options.setStatus(8)),
-    g: !$data.orderList.length
+    e: common_vendor.n($data.requestParam.status == 2 ? "active" : ""),
+    f: common_vendor.o(($event) => $options.setStatus(2)),
+    g: common_vendor.n($data.requestParam.status == 8 ? "active" : ""),
+    h: common_vendor.o(($event) => $options.setStatus(8)),
+    i: !$data.orderList.length
   }, !$data.orderList.length ? {} : {}, {
-    h: common_vendor.f($data.orderList, (item, index, i0) => {
+    j: common_vendor.f($data.orderList, (item, index, i0) => {
       return common_vendor.e({
         a: common_vendor.t(item.business_name),
         b: common_vendor.t(item.state),
@@ -154,7 +156,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         k: index
       });
     }),
-    i: $data.isLast
+    k: $data.isLast
   }, $data.isLast ? {} : {});
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

+ 1 - 1
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/orders/index.wxml

@@ -1 +1 @@
-<view><view class="order_status_list"><view class="{{['order_status_item', a]}}" bindtap="{{b}}"> 全部 </view><view class="{{['order_status_item', c]}}" bindtap="{{d}}"> 待跟进 </view><view class="{{['order_status_item', e]}}" bindtap="{{f}}"> 已完成 </view></view><view wx:if="{{g}}" class="to_bottom"> -----还没有订单-----</view><view class="order_list"><view wx:for="{{h}}" wx:for-item="item" wx:key="k" class="order_item"><view class="order_title" bindtap="{{item.c}}"><view class="business_name">{{item.a}}</view><view class="order_starus">{{item.b}}</view></view><view class="{{['product_list', item.e]}}"><view wx:for="{{item.d}}" wx:for-item="product_info" wx:key="e" class="product_item"><image class="product_img" src="{{product_info.a}}" mode=""></image><view class="product_info"><view class="product_name">{{product_info.b}}</view><view class="product_spec">{{product_info.c}}</view></view><view class="buy_num"> x{{product_info.d}}</view></view></view><view wx:if="{{item.f}}" class="show_more" catchtap="{{item.i}}"><uni-icons wx:if="{{item.h}}" u-i="{{item.g}}" bind:__l="__l" u-p="{{item.h}}"></uni-icons></view><view class="order_price"><label>¥{{item.j}}</label></view></view></view><view wx:if="{{i}}" class="to_bottom"> -----到底啦-----</view></view>
+<view><view class="order_status_list"><view class="{{['order_status_item', a]}}" bindtap="{{b}}"> 全部 </view><view class="{{['order_status_item', c]}}" bindtap="{{d}}"> 待支付 </view><view class="{{['order_status_item', e]}}" bindtap="{{f}}"> 待上课 </view><view class="{{['order_status_item', g]}}" bindtap="{{h}}"> 已完成 </view></view><view wx:if="{{i}}" class="to_bottom"> -----还没有订单-----</view><view class="order_list"><view wx:for="{{j}}" wx:for-item="item" wx:key="k" class="order_item"><view class="order_title" bindtap="{{item.c}}"><view class="business_name">{{item.a}}</view><view class="order_starus">{{item.b}}</view></view><view class="{{['product_list', item.e]}}"><view wx:for="{{item.d}}" wx:for-item="product_info" wx:key="e" class="product_item"><image class="product_img" src="{{product_info.a}}" mode=""></image><view class="product_info"><view class="product_name">{{product_info.b}}</view><view class="product_spec">{{product_info.c}}</view></view><view class="buy_num"> x{{product_info.d}}</view></view></view><view wx:if="{{item.f}}" class="show_more" catchtap="{{item.i}}"><uni-icons wx:if="{{item.h}}" u-i="{{item.g}}" bind:__l="__l" u-p="{{item.h}}"></uni-icons></view><view class="order_price"><label>¥{{item.j}}</label></view></view></view><view wx:if="{{k}}" class="to_bottom"> -----到底啦-----</view></view>

+ 146 - 77
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/product/index.js

@@ -57,12 +57,12 @@ const _sfc_main = {
         contact_addr: "",
         is_default: 0
       },
+      // 客服二维码
+      followQrcode: "",
       // 是否登录状态
       isShowPrice: false,
       // 选择的skuid
-      sku_id: 0,
-      //状态栏安全高度
-      StatusBarHeight: 0
+      sku_id: 0
     };
   },
   onLoad(param) {
@@ -73,12 +73,12 @@ const _sfc_main = {
     });
   },
   onShow() {
-    this.getStatusBarHeight();
     this.isShowPrice = this.$checkAccess.getFollowQrcode() ? 0 : 1;
     if (this.requestParam.id > 0) {
       this.$http.request("api/product/get_detail", this.requestParam).then((re) => {
         if (re.code == "success") {
           this.productInfo = re.data;
+          this.setDefaultSpec();
         }
       });
     }
@@ -92,6 +92,8 @@ const _sfc_main = {
     showSpecPopup(type) {
       if (!this.$checkAccess.alterLogin())
         return;
+      if (this.$checkAccess.getFollowQrcode())
+        return this.openAddFollow();
       this.specBtnType = type;
       this.couponUsed = "去使用 >";
       this.rebatePrice = 0;
@@ -136,13 +138,6 @@ const _sfc_main = {
     createOrder() {
       if (!this.$checkAccess.alertCity())
         return;
-      if (this.productInfo.product_sku.length && !this.sku_id) {
-        common_vendor.index.showToast({
-          title: "请选择规格",
-          icon: "none"
-        });
-        return;
-      }
       if (this.quantity < 1) {
         common_vendor.index.showToast({
           title: "至少购买1个"
@@ -165,14 +160,16 @@ const _sfc_main = {
       }
       let productInfo = [{ name: this.productInfo.name, spec: this.productInfo.spec, price: this.productInfo.price }];
       productInfo = JSON.stringify(productInfo);
-      let encodedArray = encodeURIComponent(productInfo);
       let productList = [{ product_id: this.productInfo.id, buy_num: this.quantity, product_skuid: this.sku_id }];
       productList = JSON.stringify(productList);
       this.$http.request("api/orders/create", { "product_list": productList, "custom_coupon_id": this.customCoupon, "addr_id": this.checkedAddr.id }, "post").then((re) => {
         if (re.code == "success") {
           this.productInfo.stock = this.productInfo.stock - this.quantity;
           this.$refs.specPopup.close();
-          common_vendor.index.navigateTo({ url: `/pages/orders/completion?params=${encodedArray}` });
+          let orderInfo = re.data;
+          orderInfo = JSON.stringify(orderInfo);
+          let params = encodeURIComponent(orderInfo);
+          common_vendor.index.navigateTo({ url: `/pages/orders/confirm?params=${params}` });
         } else {
           common_vendor.index.showModal({ title: re.msg, showCancel: false });
         }
@@ -182,13 +179,6 @@ const _sfc_main = {
     createCart() {
       if (!this.$checkAccess.alertCity())
         return;
-      if (this.productInfo.product_sku.length && !this.sku_id) {
-        common_vendor.index.showToast({
-          title: "请选择规格",
-          icon: "none"
-        });
-        return;
-      }
       if (this.quantity < 1) {
         common_vendor.index.showToast({
           title: "至少购买1个"
@@ -319,6 +309,12 @@ const _sfc_main = {
         }
       });
     },
+    // 客服显示
+    openAddFollow() {
+      this.followQrcode = this.$checkAccess.getFollowQrcode();
+      if (this.followQrcode)
+        this.$refs.addFollow.open("center");
+    },
     closeAddFollow() {
       this.$refs.addFollow.close();
     },
@@ -342,6 +338,57 @@ const _sfc_main = {
         }
       });
     },
+    // 设置默认sku
+    setDefaultSpec() {
+      if (this.productInfo.product_sku.length) {
+        if (this.productInfo.product_sku.length > 1) {
+          for (var k = 0; k < this.productInfo.product_sku.length; k++) {
+            if (k === this.productInfo.product_sku.length) {
+              common_vendor.index.showToast({
+                title: "当前商品已全部下架",
+                icon: "error"
+              });
+              this.productInfo.stock = 0;
+              return;
+            }
+            if (this.productInfo.product_sku[k].status === 0) {
+              var attr_ids = this.productInfo.product_sku[k].attr_ids.split(",");
+              break;
+            }
+          }
+          for (let i in this.productInfo.product_attr) {
+            for (let j in this.productInfo.product_attr[i].attr_list) {
+              if (attr_ids.includes(this.productInfo.product_attr[i].attr_list[j].id + "")) {
+                this.productInfo.product_attr[i].attr_list[j].active = 1;
+              } else {
+                this.productInfo.product_attr[i].attr_list[j].active = 0;
+              }
+            }
+          }
+          this.productInfo.price = this.productInfo.product_sku[k].price;
+          this.productInfo.spec = this.productInfo.product_sku[k].attr_names;
+          this.productInfo.stock = this.productInfo.product_sku[k].stock;
+          this.sku_id = this.productInfo.product_sku[k].id;
+          this.priceHandler();
+        } else {
+          var attr_ids = this.productInfo.product_sku[0].attr_ids.split(",");
+          for (let i in this.productInfo.product_attr) {
+            for (let j in this.productInfo.product_attr[i].attr_list) {
+              if (attr_ids.includes(this.productInfo.product_attr[i].attr_list[j].id + "")) {
+                this.productInfo.product_attr[i].attr_list[j].active = 1;
+              } else {
+                this.productInfo.product_attr[i].attr_list[j].active = 0;
+              }
+            }
+          }
+          this.productInfo.price = this.productInfo.product_sku[0].price;
+          this.productInfo.spec = this.productInfo.product_sku[0].attr_names;
+          this.productInfo.stock = this.productInfo.product_sku[0].stock;
+          this.sku_id = this.productInfo.product_sku[0].id;
+          this.priceHandler();
+        }
+      }
+    },
     // 属性变更
     attrChange(spec_index, attr_index) {
       if (this.productInfo.product_attr[spec_index].attr_list[attr_index].active)
@@ -363,8 +410,6 @@ const _sfc_main = {
         }
       }
       var attrids = attr_ids.join(",");
-      if (attr_ids.length != this.productInfo.product_attr.length)
-        return;
       let currentSKUStatus = 0;
       if (this.productInfo.product_sku.length) {
         let haveSku = 0;
@@ -415,10 +460,6 @@ const _sfc_main = {
         }
       }
     },
-    getStatusBarHeight() {
-      let SYSTEM_INFO = common_vendor.index.getSystemInfoSync();
-      this.StatusBarHeight = SYSTEM_INFO.statusBarHeight || 10;
-    },
     goBack() {
       common_vendor.index.navigateBack({
         success: () => {
@@ -430,11 +471,6 @@ const _sfc_main = {
         }
       });
     }
-    // productCouponList(){
-    // 	uni.navigateTo({
-    // 		url:"/pages/coupon/order_coupon"
-    // 	})
-    // }
   }
 };
 if (!Array) {
@@ -455,46 +491,59 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
       color: "#fff",
       size: "20"
     }),
-    c: $data.StatusBarHeight + "px",
+    c: _ctx.StatusBarHeight + "px",
     d: common_vendor.o((...args) => $options.goBack && $options.goBack(...args)),
     e: $data.productInfo.thumb,
-    f: common_vendor.t($data.productInfo.name),
-    g: common_vendor.t($data.productInfo.spec),
-    h: common_vendor.t($data.productInfo.price),
-    i: common_vendor.t($data.productInfo.market_price),
-    j: common_vendor.t($data.productInfo.stock),
-    k: common_vendor.o(($event) => $options.openCoupon()),
-    l: common_assets._imports_0$1,
-    m: common_assets._imports_1$1,
-    n: common_vendor.o(($event) => $options.showSpecPopup(1)),
-    o: $data.specBtnType == 1
+    f: $data.isShowPrice
+  }, $data.isShowPrice ? {
+    g: common_vendor.t($data.productInfo.price),
+    h: common_vendor.t($data.productInfo.market_price)
+  } : {}, {
+    i: common_vendor.t($data.productInfo.name),
+    j: common_vendor.t($data.productInfo.spec),
+    k: common_vendor.t($data.productInfo.stock),
+    l: $data.productInfo.business_info.name
+  }, $data.productInfo.business_info.name ? {
+    m: $data.productInfo.business_info.logopic,
+    n: common_vendor.t($data.productInfo.business_info.name),
+    o: common_vendor.t($data.productInfo.business_info.desc)
+  } : {}, {
+    p: $data.productInfo.description,
+    q: $data.productInfo.poster
+  }, $data.productInfo.poster ? {
+    r: $data.productInfo.poster
+  } : {}, {
+    s: common_assets._imports_0$1,
+    t: common_vendor.o(($event) => $options.showSpecPopup(1)),
+    v: common_vendor.o(($event) => $options.showSpecPopup(2)),
+    w: $data.specBtnType == 1
   }, $data.specBtnType == 1 ? common_vendor.e({
-    p: !$data.checkedAddr.id
+    x: !$data.checkedAddr.id
   }, !$data.checkedAddr.id ? {} : {}, {
-    q: common_vendor.t($data.checkedAddr.contact_name),
-    r: common_vendor.t($data.checkedAddr.contact_phone),
-    s: common_vendor.t($data.checkedAddr.contact_province),
-    t: common_vendor.t($data.checkedAddr.contact_city),
-    v: common_vendor.t($data.checkedAddr.contact_area),
-    w: common_vendor.t($data.checkedAddr.contact_addr),
-    x: common_vendor.o(($event) => $options.showAddrPopup())
+    y: common_vendor.t($data.checkedAddr.contact_name),
+    z: common_vendor.t($data.checkedAddr.contact_phone),
+    A: common_vendor.t($data.checkedAddr.contact_province),
+    B: common_vendor.t($data.checkedAddr.contact_city),
+    C: common_vendor.t($data.checkedAddr.contact_area),
+    D: common_vendor.t($data.checkedAddr.contact_addr),
+    E: common_vendor.o(($event) => $options.showAddrPopup())
   }) : {}, {
-    y: $data.productInfo.thumb,
-    z: common_vendor.t($data.productInfo.name),
-    A: $data.isShowPrice
+    F: $data.productInfo.thumb,
+    G: common_vendor.t($data.productInfo.name),
+    H: $data.isShowPrice
   }, $data.isShowPrice ? {
-    B: common_vendor.t($data.productInfo.price),
-    C: common_vendor.t($data.productInfo.market_price)
+    I: common_vendor.t($data.productInfo.price),
+    J: common_vendor.t($data.productInfo.market_price)
   } : {}, {
-    D: common_assets._imports_3,
-    E: common_vendor.o(($event) => $options.changeQuantity(-1)),
-    F: common_vendor.o(($event) => $options.changeQuantity(0)),
-    G: $data.quantity,
-    H: common_vendor.o(($event) => $data.quantity = $event.detail.value),
-    I: common_assets._imports_4,
-    J: common_vendor.o(($event) => $options.changeQuantity(1)),
-    K: common_vendor.t($data.productInfo.stock),
-    L: common_vendor.f($data.productInfo.product_attr, (spec, spec_index, i0) => {
+    K: common_assets._imports_1,
+    L: common_vendor.o(($event) => $options.changeQuantity(-1)),
+    M: common_vendor.o(($event) => $options.changeQuantity(0)),
+    N: $data.quantity,
+    O: common_vendor.o(($event) => $data.quantity = $event.detail.value),
+    P: common_assets._imports_2,
+    Q: common_vendor.o(($event) => $options.changeQuantity(1)),
+    R: common_vendor.t($data.productInfo.stock),
+    S: common_vendor.f($data.productInfo.product_attr, (spec, spec_index, i0) => {
       return {
         a: common_vendor.t(spec.spec_name),
         b: common_vendor.f(spec.attr_list, (option, attr_index, i1) => {
@@ -508,22 +557,31 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         c: spec_index
       };
     }),
-    M: $data.specBtnType == 1
+    T: $data.specBtnType == 1
   }, $data.specBtnType == 1 ? {
-    N: common_vendor.t($data.priceTotal)
+    U: common_vendor.t($data.couponUsed),
+    V: common_vendor.o(($event) => $options.openCoupon())
   } : {}, {
-    O: $data.specBtnType == 1
+    W: $data.specBtnType == 1
   }, $data.specBtnType == 1 ? {
-    P: common_vendor.o(($event) => $options.createOrder())
+    X: common_vendor.t($data.priceTotal)
   } : {}, {
-    Q: common_vendor.sr("specPopup", "618774e2-1"),
-    R: common_vendor.o($options.popupChange),
-    S: common_vendor.p({
+    Y: $data.specBtnType == 1
+  }, $data.specBtnType == 1 ? {
+    Z: common_vendor.o(($event) => $options.createOrder())
+  } : {}, {
+    aa: $data.specBtnType == 2
+  }, $data.specBtnType == 2 ? {
+    ab: common_vendor.o(($event) => $options.createCart())
+  } : {}, {
+    ac: common_vendor.sr("specPopup", "618774e2-1"),
+    ad: common_vendor.o($options.popupChange),
+    ae: common_vendor.p({
       show: true,
       type: "bottom",
       ["background-color"]: "#FFFFFF"
     }),
-    T: common_vendor.f($data.couponList, (item, index, i0) => {
+    af: common_vendor.f($data.couponList, (item, index, i0) => {
       return common_vendor.e({
         a: item.rebate_type == 1
       }, item.rebate_type == 1 ? {
@@ -561,12 +619,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         s: index
       });
     }),
-    U: common_vendor.sr("couponPopup", "618774e2-2"),
-    V: common_vendor.p({
+    ag: common_vendor.sr("couponPopup", "618774e2-2"),
+    ah: common_vendor.p({
       type: "bottom",
       ["background-color"]: "#FFFFFF"
     }),
-    W: common_vendor.f($data.addrList, (item, index, i0) => {
+    ai: common_vendor.f($data.addrList, (item, index, i0) => {
       return common_vendor.e({
         a: item.id == $data.checkedAddr.id ? "../../static/icon/radioed.png" : "../../static/icon/radio.png",
         b: common_vendor.t(item.contact_name),
@@ -581,10 +639,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         j: common_vendor.o(($event) => $options.checkedAddrItem(item), index)
       });
     }),
-    X: common_vendor.sr("addrPopup", "618774e2-3"),
-    Y: common_vendor.p({
+    aj: common_vendor.sr("addrPopup", "618774e2-3"),
+    ak: common_vendor.p({
       type: "bottom",
       ["background-color"]: "#FFFFFF"
+    }),
+    al: common_vendor.o(($event) => $options.closeAddFollow()),
+    am: $data.followQrcode
+  }, $data.followQrcode ? {
+    an: $data.followQrcode
+  } : {}, {
+    ao: common_vendor.o(($event) => $options.saveImage()),
+    ap: common_vendor.sr("addFollow", "618774e2-4"),
+    aq: common_vendor.o($options.popupChange),
+    ar: common_vendor.p({
+      type: "center"
     })
   });
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/product/index.wxml


+ 52 - 115
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/product/index.wxss

@@ -6,7 +6,7 @@
   left: 30rpx;
   margin-left: 0;
   border-radius: 100px;
-  top: 0;
+  top: 40px;
   -webkit-backdrop-filter: blur(10rpx);
           backdrop-filter: blur(10rpx);
   border: 1rpx solid rgba(255, 255, 255, 0.3);
@@ -18,7 +18,7 @@
   display: block;
   overflow: hidden;
   background: #FFFFFF;
-  margin: 0rpx auto;
+  margin: 10rpx auto;
 }
 .product_image_box .product_image {
   display: block;
@@ -39,65 +39,36 @@
   overflow: hidden;
   padding: 10rpx 0rpx;
 }
-.product_info .product_title_info .product_title {
-  font-size: 30rpx;
-  line-height: 40rpx;
-  padding: 5rpx 0rpx;
-}
-.product_info .product_title_info .product_subtitle {
-  color: #999999;
-  line-height: 40rpx;
-  font-size: 24rpx;
-  padding: 5rpx 0rpx;
-}
-.product_info .price_stock {
+.product_info .product_spec {
   color: #999999;
   font-size: 24rpx;
   line-height: 30rpx;
   overflow: hidden;
 }
-.product_info .price_stock .product_price {
+.product_info .product_spec .spec_name {
   float: left;
-  color: red;
-  font-size: 38rpx;
-  line-height: 60rpx;
-  padding: 5rpx 0rpx;
 }
-.product_info .price_stock .product_price .product_market {
-  font-size: 24rpx;
-  color: #999999;
-  line-height: 30rpx;
-  margin-left: 10rpx;
-  text-decoration: line-through;
-}
-.product_info .price_stock .product_stock {
+.product_info .product_spec .product_stock {
   float: right;
-  line-height: 60rpx;
 }
-.product_info .product_coupon {
-  font-size: 30rpx;
-  line-height: 30rpx;
+.product_info .stock_price {
+  font-size: 20rpx;
   overflow: hidden;
-}
-.product_info .product_coupon .coupon_text {
-  float: left;
-  line-height: 30rpx;
-}
-.product_info .product_coupon .coupon_info {
-  float: right;
+  margin-top: 10rpx;
   line-height: 30rpx;
-  overflow: hidden;
-  padding: 0rpx 40rpx;
 }
-.product_info .product_coupon .coupon_info .text {
+.product_info .stock_price .product_price {
   float: left;
-  margin-right: 30rpx;
+  color: red;
+  font-size: 38rpx;
+  line-height: 60rpx;
 }
-.product_info .product_coupon .coupon_info .icon {
-  float: right;
-  font-size: 35rpx;
-  font-weight: bold;
+.product_info .stock_price .product_price .product_market {
+  font-size: 24rpx;
   color: #999999;
+  line-height: 30rpx;
+  margin-left: 10rpx;
+  text-decoration: line-through;
 }
 .product_business {
   display: block;
@@ -132,7 +103,7 @@
   display: block;
   overflow: hidden;
   background: #FFFFFF;
-  min-height: 600rpx;
+  min-height: 200rpx;
   font-size: 26rpx;
   margin: 0rpx auto;
   line-height: 50rpx;
@@ -153,56 +124,10 @@
   width: 750rpx;
   display: block;
 }
-.product_comment {
-  display: block;
-  margin: 10rpx 0rpx;
-  padding: 10px 10px;
-  background: #FFFFFF;
-}
-.product_comment .comment_num {
-  overflow: hidden;
-  line-height: 30rpx;
-}
-.product_comment .comment_num .comment_num_title {
-  float: left;
-  line-height: 30rpx;
-}
-.product_comment .comment_num .comment_num_icon {
-  float: right;
-  line-height: 1.5;
-  margin-right: 40rpx;
-}
-.product_comment .comment_list {
-  overflow: hidden;
-}
-.product_comment .comment_list .comment_left {
-  float: left;
-  width: 400rpx;
-}
-.product_comment .comment_list .comment_left .user_order_info {
-  color: #999999;
-  margin-top: 20rpx;
-}
-.product_comment .comment_list .comment_left .user_order_info .user_name {
-  color: #000000;
-  margin-right: 20rpx;
-}
-.product_comment .comment_list .comment_left .user_comment {
-  margin-top: 20rpx;
-  font-size: 30rpx;
-  line-height: 50rpx;
-}
-.product_comment .comment_list .comment_right {
-  float: right;
-  width: 200rpx;
-  height: 200rpx;
-  background-color: aqua;
-  border-radius: 20rpx;
-}
 .order_car {
   left: 0rpx;
   width: 750rpx;
-  height: 160rpx;
+  height: 140rpx;
   display: block;
   position: fixed;
   padding-top: 20rpx;
@@ -210,27 +135,47 @@
   bottom: var(--window-bottom);
   border-top: 2rpx solid #DDDDDD;
 }
+.order_car .show_order {
+  float: right;
+  width: 280rpx;
+  height: 80rpx;
+  display: block;
+  color: #FFFFFF;
+  font-size: 30rpx;
+  overflow: hidden;
+  line-height: 80rpx;
+  padding: 0rpx 0rpx;
+  text-align: center;
+  margin-right: 35rpx;
+  background-color: #E03519;
+  border-radius: 0rpx;
+  border-top-right-radius: 20rpx;
+  border-bottom-right-radius: 20rpx;
+}
 .order_car .show_car {
-  float: left;
-  width: 480rpx;
-  height: 90rpx;
+  float: right;
+  width: 280rpx;
+  height: 80rpx;
   display: block;
   color: #FFFFFF;
   font-size: 30rpx;
   overflow: hidden;
-  line-height: 90rpx;
+  line-height: 80rpx;
   padding: 0rpx 0rpx;
   text-align: center;
-  background-color: #ff5900;
-  border-radius: 20rpx;
+  background-color: #F59A23;
+  border-radius: 0rpx;
+  border-top-left-radius: 20rpx;
+  border-bottom-left-radius: 20rpx;
 }
 .order_car .to_car {
   float: left;
   width: 100rpx;
-  height: 90rpx;
+  height: 60rpx;
   display: block;
   text-align: center;
-  margin-left: 20rpx;
+  margin-left: 35rpx;
+  padding-top: 10rpx;
 }
 .order_car .to_car .car_icon {
   float: left;
@@ -238,11 +183,6 @@
   height: 60rpx;
   display: block;
 }
-.order_car .to_car .text {
-  float: left;
-  padding-left: 6rpx;
-  font-size: 24rpx;
-}
 .popup {
   overflow: hidden;
 }
@@ -431,25 +371,22 @@
   padding: 30rpx 35rpx;
   margin-bottom: 20rpx;
 }
-.popup .order_info .select_sku .scroll_max {
-  height: 440rpx ;
-}
-.popup .order_info .select_sku .scroll_max .product_attr {
+.popup .order_info .select_sku .product_attr {
   display: block;
   overflow: hidden;
   margin-bottom: 20rpx;
 }
-.popup .order_info .select_sku .scroll_max .product_attr .spec_name {
+.popup .order_info .select_sku .product_attr .spec_name {
   display: block;
   font-size: 28rpx;
   line-height: 40rpx;
   margin-bottom: 20rpx;
 }
-.popup .order_info .select_sku .scroll_max .product_attr .arrt_list {
+.popup .order_info .select_sku .product_attr .arrt_list {
   display: block;
   overflow: hidden;
 }
-.popup .order_info .select_sku .scroll_max .product_attr .arrt_list .arrt_option {
+.popup .order_info .select_sku .product_attr .arrt_list .arrt_option {
   float: left;
   height: 40rpx;
   font-size: 28rpx;
@@ -460,7 +397,7 @@
   margin: 20rpx;
   background-color: #EEEEEE;
 }
-.popup .order_info .select_sku .scroll_max .product_attr .arrt_list .arrt_option.active {
+.popup .order_info .select_sku .product_attr .arrt_list .arrt_option.active {
   color: #FFFFFF;
   background-color: #fE6000;
 }

+ 3 - 24
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/index.js

@@ -1,6 +1,5 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
-const common_assets = require("../../common/assets.js");
 const _sfc_main = {
   data() {
     return {
@@ -116,14 +115,6 @@ const _sfc_main = {
     }
   }
 };
-if (!Array) {
-  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
-  _easycom_uni_icons2();
-}
-const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
-if (!Math) {
-  _easycom_uni_icons();
-}
 function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return common_vendor.e({
     a: !$data.productList.length
@@ -137,21 +128,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         e: index
       };
     }),
-    c: common_assets._imports_0$2,
-    d: common_vendor.t($data.username),
-    e: common_vendor.t($data.scoreInfo.score),
-    f: common_vendor.p({
-      type: "search",
-      size: "20"
-    }),
-    g: $data.selectedOption === 1 ? 1 : "",
-    h: common_vendor.o(($event) => $options.highlightOption(1)),
-    i: $data.selectedOption === 2 ? 1 : "",
-    j: common_vendor.o(($event) => $options.highlightOption(2)),
-    k: $data.selectedOption === 3 ? 1 : "",
-    l: common_vendor.o(($event) => $options.highlightOption(3)),
-    m: $data.selectedOption === 4 ? 1 : "",
-    n: common_vendor.o(($event) => $options.highlightOption(4))
+    c: common_vendor.o([($event) => $data.requestParam.name = $event.detail.value, (...args) => $options.searchChange && $options.searchChange(...args)]),
+    d: $data.requestParam.name,
+    e: common_vendor.o(($event) => $options.searchOpen())
   });
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

+ 1 - 3
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/index.json

@@ -1,7 +1,5 @@
 {
   "navigationBarTitleText": "积分产品",
   "enablePullDownRefresh": true,
-  "usingComponents": {
-    "uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
-  }
+  "usingComponents": {}
 }

+ 1 - 1
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/index.wxml

@@ -1 +1 @@
-<view><view class="product_box"><view wx:if="{{a}}" class="to_bottom"> -----还没有积分产品-----</view><view class="product_list"><view wx:for="{{b}}" wx:for-item="item" wx:key="e" bindtap="{{item.d}}" data-eventsync="true" class="product_item"><image class="product_image" src="{{item.a}}" mode=""></image><view class="product_name"><text>{{item.b}}</text></view><view class="stock_price"><view class="product_price"><text>{{item.c}} 积分</text></view></view></view></view></view><view class="header_fixed"><view class="user_title"><view class="user_prc"><image src="{{c}}"></image></view><view class="title"><view class="">{{d}}</view><view class="">{{e}}积分 </view></view></view><view class="search"><view class="search_box"><view class="search_input"><input type="text" placeholder="一年级系统班"/></view><view class="search_icon"><uni-icons wx:if="{{f}}" u-i="b5b70676-0" bind:__l="__l" u-p="{{f}}"></uni-icons></view></view></view><view class="course_option"><view class="{{['option_name', g && 'active']}}" bindtap="{{h}}"> 综合 </view><view class="{{['option_name', i && 'active']}}" bindtap="{{j}}"> 我可兑换 </view><view class="{{['option_name', k && 'active']}}" bindtap="{{l}}"> 销量 </view><view class="{{['option_name', m && 'active']}}" bindtap="{{n}}"> 积分 </view></view></view><view class="to_bottom"> -----到底了-----</view></view>
+<view><view class="product_box"><view wx:if="{{a}}" class="to_bottom"> -----还没有积分产品-----</view><view class="product_list"><view wx:for="{{b}}" wx:for-item="item" wx:key="e" bindtap="{{item.d}}" data-eventsync="true" class="product_item"><image class="product_image" src="{{item.a}}" mode=""></image><view class="product_name"><text>{{item.b}}</text></view><view class="stock_price"><view class="product_price"><text>{{item.c}} 积分</text></view></view></view></view></view><view class="search_fixed"><view class="search_box"><input class="search_input" type="text" bindinput="{{c}}" placeholder="请输入产品名称搜索" value="{{d}}"/><button class="search_btn" catchtap="{{e}}" data-eventsync="true"> 搜索</button></view></view><view class="to_bottom"> -----到底了-----</view></view>

+ 37 - 61
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/index.wxss

@@ -1,77 +1,53 @@
-.header_fixed {
+.search_fixed {
+  top: var(--window-top);
+  left: 0rpx;
   width: 750rpx;
+  display: block;
   position: fixed;
-  top: 0rpx;
-  background-color: #fff;
-}
-.header_fixed .user_title {
-  width: 690rpx;
-  margin: 30rpx auto;
-  display: flex;
-}
-.header_fixed .user_title .user_prc {
-  width: 100rpx;
-  height: 100rpx;
-  border-radius: 50%;
-}
-.header_fixed .user_title .user_prc image {
-  border-radius: 50%;
-  width: 100%;
-  height: 100%;
-}
-.header_fixed .user_title .title {
-  margin-left: 30rpx;
-}
-.header_fixed .search {
-  width: 690rpx;
-  margin: 30rpx auto;
-  padding-top: 1rpx;
+  margin: 0rpx auto;
+  padding: 20rpx 0rpx;
+  background-color: #FFFFFF;
 }
-.header_fixed .search .search_box {
-  width: 690rpx;
-  height: 70rpx;
-  border: 2rpx solid #c2c2c2;
+.search_fixed .search_box {
+  width: 750rpx;
+  height: 60rpx;
+  display: block;
   position: relative;
-  border-radius: 60rpx;
 }
-.header_fixed .search .search_box .search_input {
-  position: absolute;
-  width: 600rpx;
-  right: 0rpx;
-  top: 10rpx;
+.search_fixed .search_box .search_input {
+  z-index: 0;
+  width: 590rpx;
+  height: 56rpx;
+  display: block;
+  font-size: 24rpx;
+  position: relative;
+  border-top-left-radius: 40rpx;
+  border-bottom-left-radius: 40rpx;
+  padding-left: 20rpx;
+  margin-left: 35rpx;
+  border: 2rpx solid #dddddd;
 }
-.header_fixed .search .search_box .search_icon {
+.search_fixed .search_box .search_btn {
+  top: 0rpx;
+  z-index: 9;
+  left: 610rpx;
+  color: #FFFFFF;
   position: absolute;
-  width: 90rpx;
-  left: 0rpx;
-  top: 15rpx;
-  text-align: center;
-}
-.header_fixed .course_option {
-  display: flex;
-  width: 690rpx;
-  margin: 0rpx auto;
-  justify-content: space-between;
-}
-.header_fixed .course_option .option_name {
-  text-align: center;
-  width: 150rpx;
-  height: 50rpx;
-  line-height: 50rpx;
+  display: block;
+  width: 120rpx;
+  height: 60rpx;
   font-size: 24rpx;
-  border-radius: 60rpx;
-  margin: 20rpx 0rpx;
-  background-color: #e2e2e2;
-}
-.header_fixed .active {
-  background-color: #1FBE7E !important;
-  color: #fff;
+  margin: 0rpx 0rpx;
+  padding: 0rpx 0rpx;
+  line-height: 60rpx;
+  border-radius: 40rpx;
+  background-color: #E03519;
 }
 .product_box {
   display: block;
   overflow: hidden;
   margin: 0rpx auto;
-  margin-top: 380rpx;
+  margin-top: 120rpx;
   padding: 0rpx 35rpx;
 }
 .product_box .product_list {

+ 32 - 34
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/product.js

@@ -193,43 +193,41 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     d: common_vendor.o((...args) => $options.goBack && $options.goBack(...args)),
     e: $data.productInfo.thumb,
     f: common_vendor.t($data.productInfo.name),
-    g: common_vendor.t($data.productInfo.spec),
-    h: common_vendor.t($data.productInfo.score),
-    i: common_vendor.t($data.productInfo.stock),
-    j: common_assets._imports_0$1,
-    k: common_assets._imports_1$1,
-    l: common_assets._imports_2$1,
-    m: common_vendor.o(($event) => $options.showSpecPopup(2)),
-    n: !$data.checkedAddr.id
+    g: common_vendor.t($data.productInfo.score),
+    h: common_vendor.t($data.productInfo.stock),
+    i: $data.productInfo.description,
+    j: common_assets._imports_0$4,
+    k: common_vendor.o(($event) => $options.showSpecPopup(2)),
+    l: !$data.checkedAddr.id
   }, !$data.checkedAddr.id ? {} : {}, {
-    o: common_vendor.t($data.checkedAddr.contact_name),
-    p: common_vendor.t($data.checkedAddr.contact_phone),
-    q: common_vendor.t($data.checkedAddr.contact_province),
-    r: common_vendor.t($data.checkedAddr.contact_city),
-    s: common_vendor.t($data.checkedAddr.contact_area),
-    t: common_vendor.t($data.checkedAddr.contact_addr),
-    v: common_vendor.o(($event) => $options.showAddrPopup()),
-    w: $data.productInfo.thumb,
-    x: common_vendor.t($data.productInfo.name),
-    y: common_vendor.t($data.productInfo.score),
-    z: common_assets._imports_3,
-    A: common_vendor.o(($event) => $options.changeQuantity(-1)),
-    B: common_vendor.o(($event) => $options.changeQuantity(0)),
-    C: $data.quantity,
-    D: common_vendor.o(($event) => $data.quantity = $event.detail.value),
-    E: common_assets._imports_4,
-    F: common_vendor.o(($event) => $options.changeQuantity(1)),
-    G: common_vendor.t($data.productInfo.stock),
-    H: common_vendor.t($data.priceTotal),
-    I: common_vendor.o(($event) => $options.createOrder()),
-    J: common_vendor.sr("specPopup", "f81ec0bc-1"),
-    K: common_vendor.o($options.popupChange),
-    L: common_vendor.p({
+    m: common_vendor.t($data.checkedAddr.contact_name),
+    n: common_vendor.t($data.checkedAddr.contact_phone),
+    o: common_vendor.t($data.checkedAddr.contact_province),
+    p: common_vendor.t($data.checkedAddr.contact_city),
+    q: common_vendor.t($data.checkedAddr.contact_area),
+    r: common_vendor.t($data.checkedAddr.contact_addr),
+    s: common_vendor.o(($event) => $options.showAddrPopup()),
+    t: $data.productInfo.thumb,
+    v: common_vendor.t($data.productInfo.name),
+    w: common_vendor.t($data.productInfo.score),
+    x: common_assets._imports_1,
+    y: common_vendor.o(($event) => $options.changeQuantity(-1)),
+    z: common_vendor.o(($event) => $options.changeQuantity(0)),
+    A: $data.quantity,
+    B: common_vendor.o(($event) => $data.quantity = $event.detail.value),
+    C: common_assets._imports_2,
+    D: common_vendor.o(($event) => $options.changeQuantity(1)),
+    E: common_vendor.t($data.productInfo.stock),
+    F: common_vendor.t($data.priceTotal),
+    G: common_vendor.o(($event) => $options.createOrder()),
+    H: common_vendor.sr("specPopup", "f81ec0bc-1"),
+    I: common_vendor.o($options.popupChange),
+    J: common_vendor.p({
       show: true,
       type: "bottom",
       ["background-color"]: "#FFFFFF"
     }),
-    M: common_vendor.f($data.addrList, (item, index, i0) => {
+    K: common_vendor.f($data.addrList, (item, index, i0) => {
       return common_vendor.e({
         a: item.id == $data.checkedAddr.id ? "../../static/icon/radioed.png" : "../../static/icon/radio.png",
         b: common_vendor.t(item.contact_name),
@@ -244,8 +242,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         j: common_vendor.o(($event) => $options.checkedAddrItem(item), index)
       });
     }),
-    N: common_vendor.sr("addrPopup", "f81ec0bc-2"),
-    O: common_vendor.p({
+    L: common_vendor.sr("addrPopup", "f81ec0bc-2"),
+    M: common_vendor.p({
       type: "bottom",
       ["background-color"]: "#FFFFFF"
     })

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/product.wxml


+ 19 - 7
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/product.wxss

@@ -42,19 +42,18 @@
 .product_info .product_title_info .product_title {
   font-size: 30rpx;
   line-height: 40rpx;
-  padding: 5rpx 0rpx;
 }
 .product_info .product_title_info .product_subtitle {
   color: #999999;
   line-height: 40rpx;
   font-size: 24rpx;
-  padding: 5rpx 0rpx;
 }
 .product_info .product_spec {
   color: #999999;
   font-size: 24rpx;
   line-height: 30rpx;
   overflow: hidden;
+  margin-top: 20rpx;
 }
 .product_info .product_spec .spec_name {
   float: left;
@@ -90,6 +89,21 @@
   font-size: 30rpx;
   color: #999999;
 }
+.product_description {
+  width: 700rpx;
+  display: block;
+  overflow: hidden;
+  background: #FFFFFF;
+  min-height: 300rpx;
+  font-size: 26rpx;
+  margin: 0rpx auto;
+  line-height: 50rpx;
+  padding: 10rpx 25rpx;
+}
+.product_description [alt] {
+  max-width: 100%;
+  vertical-align: bottom;
+}
 .product_poster {
   display: block;
   overflow: hidden;
@@ -159,8 +173,8 @@
   border-top: 2rpx solid #DDDDDD;
 }
 .order_car .show_car {
-  float: left;
-  width: 370rpx;
+  float: right;
+  width: 550rpx;
   height: 90rpx;
   display: block;
   color: #FFFFFF;
@@ -189,15 +203,13 @@
 }
 .order_car .to_car .text {
   float: left;
-  padding-top: 5rpx;
-  padding-left: 6rpx;
+  padding-left: 8rpx;
   text-align: center;
   line-height: 30rpx;
   font-size: 24rpx;
 }
 .order_car .to_car .shop_cat_text {
   float: left;
-  padding-top: 5rpx;
   text-align: center;
   line-height: 30rpx;
   font-size: 24rpx;

+ 4 - 4
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/index.js

@@ -59,10 +59,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     d: common_vendor.t($data.userInfo.username),
     e: common_vendor.t($data.userInfo.phone),
     f: common_assets._imports_0,
-    g: common_assets._imports_1,
-    h: common_assets._imports_2,
-    i: common_assets._imports_3$1,
-    j: common_assets._imports_4$1,
+    g: common_assets._imports_1$1,
+    h: common_assets._imports_2$1,
+    i: common_assets._imports_3,
+    j: common_assets._imports_4,
     k: common_assets._imports_5
   };
 }

+ 1 - 3
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/index.wxss

@@ -1,9 +1,7 @@
 .status_bar {
   position: fixed;
-  width: 38px;
+  width: 100%;
   height: 38px;
-  left: 340rpx;
-  margin-left: 0;
   top: 0;
   display: flex;
   align-items: center;

+ 0 - 73
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/info.js

@@ -1,73 +0,0 @@
-"use strict";
-const common_vendor = require("../../common/vendor.js");
-const utils_city = require("../../utils/city.js");
-const _sfc_main = {
-  data() {
-    return {
-      requestParam: {
-        province: "",
-        city: ""
-      },
-      cityArray: [[], []],
-      cityValue: [0, 0]
-    };
-  },
-  onLoad() {
-    this.cityArray.splice(0, 1, utils_city.getProvinces());
-    this.cityArray.splice(1, 1, utils_city.getMyCity(this.cityValue[0]));
-    this.requestParam.province = this.cityArray[0][this.cityValue[0]];
-    this.requestParam.city = this.cityArray[1][this.cityValue[1]];
-  },
-  onShow() {
-    if (!this.$checkAccess.alterLogin())
-      return;
-  },
-  methods: {
-    toApply() {
-      if (!this.$checkAccess.alterLogin())
-        return;
-      common_vendor.index.showLoading({ mask: true });
-      this.$http.request("api/custom/set_city", this.requestParam, "post").then((re) => {
-        common_vendor.index.hideLoading();
-        if (re.code != "success") {
-          common_vendor.index.showToast({ title: re.msg, icon: "none" });
-          return;
-        }
-        common_vendor.index.switchTab({ url: "/pages/user/index" });
-      });
-    },
-    cityChange(e) {
-      this.cityValue.splice(e.detail.column, 1, e.detail.value);
-      if (e.detail.column == 0) {
-        this.cityValue.splice(1, 1, 0);
-        this.cityValue.splice(2, 1, 0);
-      }
-      if (e.detail.column == 1) {
-        this.cityValue.splice(2, 1, 0);
-      }
-      this.cityArray.splice(0, 1, utils_city.getProvinces());
-      this.cityArray.splice(1, 1, utils_city.getMyCity(this.cityValue[0]));
-    },
-    cityFinish(e) {
-      this.requestParam.city_id = this.cityArray[1][this.cityValue[1]];
-    }
-  }
-};
-function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
-  return common_vendor.e({
-    a: $data.requestParam.province
-  }, $data.requestParam.province ? {
-    b: common_vendor.t($data.requestParam.province)
-  } : {}, {
-    c: $data.requestParam.city
-  }, $data.requestParam.city ? {
-    d: common_vendor.t($data.requestParam.city)
-  } : {}, {
-    e: $data.cityArray,
-    f: common_vendor.o((...args) => $options.cityChange && $options.cityChange(...args)),
-    g: common_vendor.o((...args) => $options.cityFinish && $options.cityFinish(...args)),
-    h: common_vendor.o((...args) => $options.toApply && $options.toApply(...args))
-  });
-}
-const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
-wx.createPage(MiniProgramPage);

+ 0 - 4
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/info.json

@@ -1,4 +0,0 @@
-{
-  "navigationBarTitleText": "信息设置",
-  "usingComponents": {}
-}

+ 0 - 1
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/info.wxml

@@ -1 +0,0 @@
-<view><view class="alter_info">请选择您药店/诊所所在城市,选择后不可更改,请谨慎选择</view><view class="form"><form class="info_form"><view class="form_group"><view class="group_title">所在城市:</view><view class="group_box"><picker mode="multiSelector" class="form_ctrl" range="{{e}}" bindcolumnchange="{{f}}" bindchange="{{g}}"><view class="area_text"><text wx:if="{{a}}">{{b}}</text><text wx:if="{{c}}"> / {{d}}</text></view></picker></view></view><button bindtap="{{h}}" class="submit_btn">提交</button></form></view></view>

+ 0 - 74
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/info.wxss

@@ -1,74 +0,0 @@
-.alter_info {
-  display: block;
-  color: #E03519;
-  font-size: 20rpx;
-  overflow: hidden;
-  margin: 20rpx auto;
-  background: #FFFFFF;
-  line-height: 40rpx;
-  padding: 35rpx 35rpx;
-  text-align: center;
-}
-.info_form {
-  display: block;
-  overflow: hidden;
-  padding: 20rpx 0rpx;
-  background: #FFFFFF;
-}
-.info_form .form_group {
-  display: block;
-  overflow: hidden;
-  line-height: 60rpx;
-  padding: 20rpx 35rpx;
-}
-.info_form .form_group .group_title {
-  float: left;
-  width: 160rpx;
-  display: block;
-  overflow: hidden;
-  font-size: 30rpx;
-  margin-right: 20rpx;
-}
-.info_form .form_group .group_box {
-  width: 480rpx;
-  float: left;
-  display: block;
-}
-.info_form .form_group .group_box .form_ctrl {
-  height: 56rpx;
-  font-size: 24rpx;
-  padding: 0rpx 20rpx;
-  line-height: 56rpx;
-  border: 2rpx solid #DDDDDD;
-}
-.info_form .form_group .group_box .area_text {
-  width: 446rpx;
-  font-size: 20rpx;
-  overflow: hidden;
-  white-space: nowrap;
-  text-overflow: ellipsis;
-}
-.info_form .form_group .group_box .group_image {
-  width: 200rpx;
-  height: 200rpx;
-}
-.info_form .form_group .group_box .choose_image {
-  display: block;
-  width: 200rpx;
-  height: 200rpx;
-  font-size: 38rpx;
-  text-align: center;
-  line-height: 200rpx;
-  border: 2rpx solid #DDDDDD;
-}
-.info_form .submit_btn {
-  color: #FFFFFF;
-  width: 220rpx;
-  height: 80rpx;
-  display: block;
-  font-size: 30rpx;
-  padding: 0rpx 0rpx;
-  line-height: 80rpx;
-  margin: 50rpx auto;
-  background-color: forestgreen;
-}

+ 6 - 3
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pagesA/coupon/couponproductlist.js

@@ -72,6 +72,8 @@ const _sfc_main = {
     });
   },
   methods: {
+    onChange() {
+    },
     searchChange(e) {
       if (!this.requestParam.name) {
         this.searchOpen();
@@ -115,9 +117,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
       return {
         a: item.thumb,
         b: common_vendor.t(item.name),
-        c: common_vendor.t(item.price),
-        d: common_vendor.o(($event) => $options.toDetail(item), index),
-        e: index
+        c: common_vendor.t(item.spec),
+        d: common_vendor.t(item.price),
+        e: common_vendor.o(($event) => $options.toDetail(item), index),
+        f: index
       };
     }),
     c: $data.isLast

+ 1 - 1
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pagesA/coupon/couponproductlist.wxml

@@ -1 +1 @@
-<view><view class="product_box"><view wx:if="{{a}}" class="to_bottom"> -----还没有产品啦-----</view><view class="product_list"><view wx:for="{{b}}" wx:for-item="item" wx:key="e" bindtap="{{item.d}}" data-eventsync="true" class="product_item"><view class="product_left"><image class="product_image" src="{{item.a}}" mode=""></image></view><view class="product_right"><view class="product_title"><view class="product_text"><text>{{item.b}}</text></view><view class="time"><text>距今日结束08:02:56</text></view></view><view class="stock_price"><view class="product_price"><label style="font-size:26rpx">¥</label><text>{{item.c}}</text></view><view class="product_order_but"><button>立即购买</button></view></view></view></view></view></view><view wx:if="{{c}}" class="to_bottom"> -----到底啦-----</view></view>
+<view><view class="product_box"><view wx:if="{{a}}" class="to_bottom"> -----还没有产品啦-----</view><view class="product_list"><view wx:for="{{b}}" wx:for-item="item" wx:key="f" bindtap="{{item.e}}" data-eventsync="true" class="product_item"><view class="product_left"><image class="product_image" src="{{item.a}}" mode=""></image></view><view class="product_right"><view class="product_title"><view class="product_text"><text>{{item.b}}</text></view><view class="time"><text>{{item.c}}</text></view></view><view class="stock_price"><view class="product_price"><label style="font-size:26rpx">¥</label><text>{{item.d}}</text></view><view class="product_order_but"> 立即购买 </view></view></view></view></view></view><view wx:if="{{c}}" class="to_bottom"> -----到底啦-----</view></view>

+ 15 - 18
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pagesA/coupon/couponproductlist.wxss

@@ -20,11 +20,14 @@
 }
 .product_box .product_list .product_item .product_left {
   float: left;
+  width: 200rpx;
+  height: 180rpx;
+  overflow: hidden;
+  margin: 20rpx 20rpx;
 }
 .product_box .product_list .product_item .product_left .product_image {
-  margin: 20rpx 20rpx;
-  width: 224rpx;
-  height: 200rpx;
+  width: 100%;
+  height: 100%;
   border-radius: 20rpx;
 }
 .product_box .product_list .product_item .product_right {
@@ -32,43 +35,37 @@
   width: 380rpx;
   margin: 20rpx 20rpx;
 }
-.product_box .product_list .product_item .product_right .product_title {
-  line-height: 1.5;
-}
 .product_box .product_list .product_item .product_right .product_title .product_text {
-  font-size: 30rpx;
+  font-size: 36rpx;
   font-weight: 600;
 }
 .product_box .product_list .product_item .product_right .product_title .time {
   font-size: 24rpx;
+  padding: 15rpx 0rpx;
 }
 .product_box .product_list .product_item .product_right .stock_price {
-  color: #dddddd;
-  height: 100rpx;
+  height: 80rpx;
   font-size: 20rpx;
   overflow: hidden;
-  line-height: 30rpx;
-  padding: 0rpx 10rpx;
-  margin-top: 40rpx;
+  width: 410rpx;
 }
 .product_box .product_list .product_item .product_right .stock_price .product_price {
   float: left;
   color: red;
-  font-size: 50rpx;
+  font-size: 40rpx;
   font-weight: 600;
-  line-height: 100rpx;
+  padding: 10rpx 0rpx;
 }
 .product_box .product_list .product_item .product_right .stock_price .product_order_but {
   float: right;
-}
-.product_box .product_list .product_item .product_right .stock_price .product_order_but button {
   width: 166rpx;
-  height: 64rpx;
+  height: 60rpx;
   font-size: 26rpx;
   font-weight: 600;
-  margin: 20rpx 0rpx;
   background-color: #1fbe7e;
   border-radius: 40rpx;
+  text-align: center;
+  line-height: 60rpx;
   color: #FFFFFF;
 }
 .product_box .product_list .product_item:nth-child(even) {

+ 29 - 77
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pagesA/course/reservation.js

@@ -79,71 +79,7 @@ const _sfc_main = {
   },
   data() {
     return {
-      data: [
-        {
-          "teacher_id": 6,
-          "teacher_name": "张老师",
-          "list": [
-            {
-              "id": 4,
-              "course_id": 1,
-              "teacher_id": 6,
-              "start_time": 1732060800,
-              "end_time": 1732063500,
-              "duration": 45,
-              "course_number": 0,
-              "reservation_number": 0,
-              "teacher_name": "张老师",
-              "teacher_desc": "擅长舞蹈",
-              "course_name": "拳击初级课",
-              "course_image": "../../static/logo2.jpg",
-              "course_desc": "拳击讲解",
-              "address": "一方天地",
-              "reservation_status": 0
-            },
-            {
-              "id": 6,
-              "course_id": 1,
-              "teacher_id": 6,
-              "start_time": 1732064400,
-              "end_time": 1732068e3,
-              "duration": 60,
-              "course_number": 30,
-              "reservation_number": 0,
-              "teacher_name": "张老师",
-              "teacher_desc": "擅长舞蹈",
-              "course_name": "拳击初级课",
-              "course_image": "../../static/logo2.jpg",
-              "course_desc": "拳击讲解",
-              "address": "一方天地",
-              "reservation_status": 1
-            }
-          ]
-        },
-        {
-          "teacher_id": 7,
-          "teacher_name": "王老师",
-          "list": [
-            {
-              "id": 7,
-              "course_id": 1,
-              "teacher_id": 7,
-              "start_time": 1732520086,
-              "end_time": 1732520086,
-              "duration": 60,
-              "course_number": 30,
-              "reservation_number": 0,
-              "teacher_name": "王老师",
-              "teacher_desc": "从业20年,资深老教室",
-              "course_name": "拳击初级课",
-              "course_image": "../../static/logo2.jpg",
-              "course_desc": "拳击讲解",
-              "address": "一方天地",
-              "reservation_status": 1
-            }
-          ]
-        }
-      ],
+      data: [],
       shcedule_list: [],
       //排课列表
       teacher_desc: "",
@@ -159,6 +95,7 @@ const _sfc_main = {
       schedule_id: 0,
       //排课id
       teacherActive: -1,
+      teacher_id: 0,
       orderDateTime: "暂无选择",
       // 选中时间
       orderTimeArr: {},
@@ -169,7 +106,7 @@ const _sfc_main = {
       //时间数据
       nowDate: "",
       // 当前日期
-      dateActive: -1,
+      dateActive: 0,
       //选中的日期索引
       timeActive: 0,
       //选中的时间索引
@@ -193,6 +130,7 @@ const _sfc_main = {
       this.$http.request("api/course/get_schedule_list", { orders_product_id: this.orders_product_id, course_id: this.course_id }, "post").then((res) => {
         if (res.code === "success") {
           this.data = res.data;
+          this.selectDate = this.currentTime().date;
           this.defaultTeacherDesc();
           this.initOnload();
         }
@@ -208,7 +146,7 @@ const _sfc_main = {
       if (this.data.length > 0) {
         if (this.teacherActive == index) {
           this.shcedule_list = this.data[index]["list"];
-          this.schedule_id = this.data[index].teacher_id;
+          this.teacher_id = this.data[index].teacher_id;
           this.course_name = this.shcedule_list[0].course_name;
           this.teacher_desc = this.shcedule_list[0].teacher_desc;
           this.course_image = this.shcedule_list[0].course_image;
@@ -220,7 +158,7 @@ const _sfc_main = {
     defaultTeacherDesc() {
       this.teacherActive = 0;
       if (this.data.length > 0) {
-        this.schedule_id = this.data[0].teacher_id;
+        this.teacher_id = this.data[0].teacher_id;
         this.shcedule_list = this.data[0]["list"];
         this.course_name = this.shcedule_list[0].course_name;
         this.teacher_desc = this.shcedule_list[0].teacher_desc;
@@ -229,7 +167,7 @@ const _sfc_main = {
     },
     //预约课程事件
     reservationPopup() {
-      if (this.schedule_id === 0) {
+      if (this.teacher_id === 0) {
         common_vendor.index.showToast({
           title: "请选择老师",
           icon: "none"
@@ -255,6 +193,14 @@ const _sfc_main = {
           this.handleSubmit();
           this.initOnload();
           this.$refs.outcomePopup.open("center");
+          this.$http.request("api/course/get_schedule_list", { orders_product_id: this.orders_product_id, course_id: this.course_id }, "post").then((res2) => {
+            if (res2.code === "success") {
+              this.data = res2.data;
+              this.selectDate = this.currentTime().date;
+              this.defaultTeacherDesc();
+              this.initOnload();
+            }
+          });
         } else {
           common_vendor.index.showToast({
             title: `${res.msg}`,
@@ -274,7 +220,7 @@ const _sfc_main = {
       this.timeQuanBegin = this.timeQuanEnd = "";
       this.timeArr.forEach((item, index) => {
         if (this.isQuantum) {
-          if (this.shcedule_list[index].reservation_status === 1) {
+          if (item.reservation_status === 1) {
             item.disable = true;
           }
           this.appointTime.forEach((t) => {
@@ -301,6 +247,7 @@ const _sfc_main = {
         return;
       if (item.disableSum)
         return;
+      this.shcedule_id = item.shcedule_id;
       if (this.isQuantum) {
         return this.handleSelectQuantum(index, item);
       }
@@ -383,16 +330,21 @@ const _sfc_main = {
     initTime(isQuantum) {
       const time = [];
       this.shcedule_list.forEach((cruTiem) => {
+        let selectDateStr = (/* @__PURE__ */ new Date(this.selectDate + " 00:00:00")).getTime();
         let starTimeStamp = cruTiem.start_time * 1e3;
         let endTimeStamp = cruTiem.end_time * 1e3;
         60 * 1e3 * cruTiem.duration;
-        if (isQuantum) {
-          time.push({
-            begin: this.timeStamp(starTimeStamp, isQuantum).hour,
-            end: this.timeStamp(endTimeStamp, isQuantum).hour,
-            reservationSum: `${cruTiem.reservation_number}/${cruTiem.course_number}`,
-            disable: false
-          });
+        if (starTimeStamp >= selectDateStr && selectDateStr + 24 * 60 * 60 * 1e3 >= endTimeStamp) {
+          if (isQuantum) {
+            time.push({
+              begin: this.timeStamp(starTimeStamp, isQuantum).hour,
+              end: this.timeStamp(endTimeStamp, isQuantum).hour,
+              reservationSum: `${cruTiem.reservation_number}/${cruTiem.course_number}`,
+              reservation_status: cruTiem.reservation_status,
+              shcedule_id: cruTiem.id,
+              disable: false
+            });
+          }
         }
       });
       return time;

+ 32 - 7
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pagesA/course/usercourse.js

@@ -9,8 +9,8 @@ const _sfc_main = {
       productList: [],
       // 请求参数
       requestParam: {
-        name: "",
-        page: 1
+        page: 1,
+        status: 0
       },
       // 是否最后一页
       isLast: false,
@@ -39,6 +39,24 @@ const _sfc_main = {
     });
   },
   methods: {
+    setStatus(status) {
+      if (!this.$checkAccess.alterLogin())
+        return;
+      if (this.isReqing)
+        return;
+      this.requestParam.page = 1;
+      this.isLast = false;
+      this.requestParam.status = status;
+      this.isReqing = true;
+      this.$http.request("api/course/reservation_list", this.requestParam).then((re) => {
+        this.isReqing = false;
+        if (re.code == "success") {
+          if (re.data.last_page >= this.requestParam.page)
+            this.isLast = true;
+          this.productList = re.data.data;
+        }
+      });
+    },
     popupChange(e) {
       this.show = e.show;
     },
@@ -62,6 +80,7 @@ const _sfc_main = {
             icon: "none"
           });
           this.$http.request("api/course/reservation_list", this.requestParam.page).then((re) => {
+            this.isReqing = false;
             if (re.code == "success") {
               if (re.data.last_page <= this.requestParam.page)
                 this.isLast = true;
@@ -113,7 +132,13 @@ if (!Math) {
 function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return {
     a: "overflow:" + ($data.show ? "hidden" : "visible"),
-    b: common_vendor.f($data.productList, (item, index, i0) => {
+    b: common_vendor.n($data.requestParam.status == 0 ? "active" : ""),
+    c: common_vendor.o(($event) => $options.setStatus(0)),
+    d: common_vendor.n($data.requestParam.status == 1 ? "active" : ""),
+    e: common_vendor.o(($event) => $options.setStatus(1)),
+    f: common_vendor.n($data.requestParam.status == 2 ? "active" : ""),
+    g: common_vendor.o(($event) => $options.setStatus(2)),
+    h: common_vendor.f($data.productList, (item, index, i0) => {
       return common_vendor.e({
         a: item.teacher_pic,
         b: common_vendor.t(item.teacher_name),
@@ -131,10 +156,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         j: index
       });
     }),
-    c: common_vendor.o(($event) => $options.closeCancel()),
-    d: common_vendor.o(($event) => $options.cancelCourse()),
-    e: common_vendor.sr("cancelPopup", "110bae46-0"),
-    f: common_vendor.o($options.popupChange)
+    i: common_vendor.o(($event) => $options.closeCancel()),
+    j: common_vendor.o(($event) => $options.cancelCourse()),
+    k: common_vendor.sr("cancelPopup", "110bae46-0"),
+    l: common_vendor.o($options.popupChange)
   };
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

+ 1 - 1
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pagesA/course/usercourse.wxml

@@ -1 +1 @@
-<page-meta page-style="{{a}}"></page-meta><view><view class="course_status_list"><view class="course_status_item"> 全部 </view><view class="course_status_item"> 待上课 </view><view class="course_status_item"> 已完成 </view><view class="course_status_item"> 已取消 </view></view><view class="course_list"><view wx:for="{{b}}" wx:for-item="item" wx:key="j" class="course_item"><view class="course_title"><view class="course_prc"><image src="{{item.a}}" mode=""></image></view><view class="title"><view class="title_text"><view class="tea_name">{{item.b}} </view><view wx:if="{{item.c}}" class="btn_1" bindtap="{{item.d}}"> 取消预约 </view><view wx:if="{{item.e}}" class="btn_2"> 已取消 </view><view wx:if="{{item.f}}" class="btn_3"> 已完成 </view></view><view class="subtilte">{{item.g}}</view><view class="course_arrt"><view class="text"> 上课地址: </view><view class="attr">{{item.h}} </view></view></view></view><view class="classTime"><view class="text"> 上课时间 </view><view class="time">{{item.i}} </view></view></view></view><uni-popup class="r" u-s="{{['d']}}" u-r="cancelPopup" bindchange="{{f}}" u-i="110bae46-0" bind:__l="__l"><view class="cancel_layout"><view class="cancel_title"> 取消预约 </view><view class="cancel_text"> 是否确认取消课程?取消后可重新更新预约 </view><view class="cancel_btn"><view class="btn_1" bindtap="{{c}}"> 在想想 </view><view class="btn_2" bindtap="{{d}}"> 确认 </view></view></view></uni-popup><view class="to_bottom"> -----到底啦-----</view></view>
+<page-meta page-style="{{a}}"></page-meta><view><view class="course_status_list"><view class="{{['course_status_item', b]}}" bindtap="{{c}}"> 全部 </view><view class="{{['course_status_item', d]}}" bindtap="{{e}}"> 待上课 </view><view class="{{['course_status_item', f]}}" bindtap="{{g}}"> 已取消 </view></view><view class="course_list"><view wx:for="{{h}}" wx:for-item="item" wx:key="j" class="course_item"><view class="course_title"><view class="course_prc"><image src="{{item.a}}" mode=""></image></view><view class="title"><view class="title_text"><view class="tea_name">{{item.b}} </view><view wx:if="{{item.c}}" class="btn_1" bindtap="{{item.d}}"> 取消预约 </view><view wx:if="{{item.e}}" class="btn_2"> 已取消 </view><view wx:if="{{item.f}}" class="btn_3"> 已完成 </view></view><view class="subtilte">{{item.g}}</view><view class="course_arrt"><view class="text"> 上课地址: </view><view class="attr">{{item.h}} </view></view></view></view><view class="classTime"><view class="text"> 上课时间 </view><view class="time">{{item.i}} </view></view></view></view><uni-popup class="r" u-s="{{['d']}}" u-r="cancelPopup" bindchange="{{l}}" u-i="110bae46-0" bind:__l="__l"><view class="cancel_layout"><view class="cancel_title"> 取消预约 </view><view class="cancel_text"> 是否确认取消课程?取消后可重新更新预约 </view><view class="cancel_btn"><view class="btn_1" bindtap="{{i}}"> 在想想 </view><view class="btn_2" bindtap="{{j}}"> 确认 </view></view></view></uni-popup><view class="to_bottom"> -----到底啦-----</view></view>

+ 2 - 1
jiaoyu_mp/unpackage/dist/dev/mp-weixin/project.config.json

@@ -11,6 +11,7 @@
     "minified": true,
     "newFeature": true,
     "bigPackageSizeSupport": true,
+    "ignoreUploadUnusedFiles": true,
     "babelSetting": {
       "ignore": [],
       "disablePlugins": [],
@@ -18,7 +19,7 @@
     }
   },
   "compileType": "miniprogram",
-  "libVersion": "3.6.5",
+  "libVersion": "3.6.6",
   "appid": "wxe270937ea4d7f7d5",
   "projectname": "开邻智数",
   "condition": {

+ 1 - 1
jiaoyu_mp/unpackage/dist/dev/mp-weixin/project.private.config.json

@@ -17,7 +17,7 @@
         },
         {
           "name": "pagesA/course/index",
-          "pathName": "pagesA/course/reservation",
+          "pathName": "pages/user/info",
           "query": "",
           "launchMode": "default",
           "scene": null

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor