suixueyan 7 mēneši atpakaļ
vecāks
revīzija
bcbc35a60f

+ 6 - 0
common/styles/common.scss

@@ -48,6 +48,9 @@ ol, ul {
 .mr8 {
 	margin-right: 8px;
 }
+.mr9 {
+	margin-right: 9px;
+}
 .mr10 {
   margin-right: 10px;
 }
@@ -72,6 +75,9 @@ ol, ul {
 .mt15 {
   margin-top: 15px;
 }
+.mt12 {
+	margin-top: 12px;
+}
 .mt9 {
 	margin-top: 18rpx;
 }

+ 4 - 4
components/AddressItem.vue

@@ -118,11 +118,11 @@
 				}).then(res => {
 					uni.hideLoading()
 					this.show = false
-					if (res.code === 1) {
-						uni.showToast({
-							title: '删除成功'
-						})
+					if (res.code === 200) {
 						this.$emit('refresh')
+            uni.showToast({
+              title: '删除成功'
+            })
 					} else {
 						uni.showToast({
 							title: '删除失败'

+ 8 - 8
pages/home/index.vue

@@ -304,11 +304,11 @@ export default {
     },
   },
   onLoad() {
-    this.getBanner();
-    this.getActivityList();
-    this.getNewsList();
   },
   onShow() {
+    this.getBanner();
+    this.getNewsList();
+    this.getActivityList();
     this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight-1; // 状态栏高度
     // uni
     //     .createSelectorQuery()
@@ -398,19 +398,19 @@ export default {
     },
 
     jumpPage(type) {
-      if (type == "haowu") {
+      if (type === "haowu") {
         uni.navigateTo({
           url: '/pages/productCenter/productCenter',
         })
-      } else if( type == "xueyuan"){
+      } else if( type === "xueyuan"){
         uni.navigateTo({url: `/subPages/course/course`,})
-      } else if( type == "huodong"){
+      } else if( type === "huodong"){
         uni.switchTab({
               url: '/pages/activity/activity',
          })
-      }else if (type == "peiban"){
+      }else if (type === "peiban"){
         uni.navigateTo({url: `/subPages/accompanyingCamp/accompanyingCamp`,})
-      }else if (type == "shenghuo"){
+      }else if (type === "shenghuo"){
         uni.navigateTo({url: `/subPages/fragrantLife/fragrantLife`,})
       }
 

+ 1 - 1
pages/mine/index.vue

@@ -74,7 +74,7 @@
           <view class="title">
             开通服务专享产品权益
           </view>
-          <view class="title">
+          <view class="title" v-if="!userInfo||!(userInfo.vip_code&&userInfo.vip_code>0)">
             开通会员
           </view>
         </view>

+ 28 - 28
pages/productCenter/filterBar.vue

@@ -20,23 +20,23 @@
 		          selectType === 'price' && priceType === 'desc' ? '#C79C53' : '#767676'
 		        "></u-icon>
 				</view>
-        <view v-if="item.type === 'sales_num'" class="price-icon">
-          <u-icon name="arrow-up-fill" :size="7" :color="
-		          selectType === 'sales_num' && salesType === 'asc' ? '#C79C53' : '#767676'
-		        "></u-icon>
-          <u-icon name="arrow-down-fill" :size="7" :color="
-		          selectType === 'sales_num' && salesType === 'desc' ? '#C79C53' : '#767676'
-		        "></u-icon>
-        </view>
-        <view v-if="item.type === 'sales_num2'" class="price-icon">
-          <u-icon name="arrow-up-fill" :size="7" :color="
-		          selectType === 'sales_num2' && salesType2 === 'asc' ? '#C79C53' : '#767676'
-		        "></u-icon>
-          <u-icon name="arrow-down-fill" :size="7" :color="
-		          selectType === 'sales_num2' && salesType2 === 'desc' ? '#C79C53' : '#767676'
-		        "></u-icon>
-        </view>
-        <view class="div-a" v-if="item.type != 'sales_num2'"> </view>
+<!--        <view v-if="item.type === 'sales_num'" class="price-icon">-->
+<!--          <u-icon name="arrow-up-fill" :size="7" :color="-->
+<!--		          selectType === 'sales_num' && salesType === 'asc' ? '#C79C53' : '#767676'-->
+<!--		        "></u-icon>-->
+<!--          <u-icon name="arrow-down-fill" :size="7" :color="-->
+<!--		          selectType === 'sales_num' && salesType === 'desc' ? '#C79C53' : '#767676'-->
+<!--		        "></u-icon>-->
+<!--        </view>-->
+<!--        <view v-if="item.type === 'read_num'" class="price-icon">-->
+<!--          <u-icon name="arrow-up-fill" :size="7" :color="-->
+<!--		          selectType === 'read_num' && salesType2 === 'asc' ? '#C79C53' : '#767676'-->
+<!--		        "></u-icon>-->
+<!--          <u-icon name="arrow-down-fill" :size="7" :color="-->
+<!--		          selectType === 'read_num' && salesType2 === 'desc' ? '#C79C53' : '#767676'-->
+<!--		        "></u-icon>-->
+<!--        </view>-->
+        <view class="div-a" v-if="item.type != 'read_num'"> </view>
 			</view>
 			<view class="mark-pop" v-show="showCatePop" @click="onClose"> </view>
 		</view>
@@ -93,7 +93,7 @@
           },
           {
             name: "人气",
-            type: "sales_num2",
+            type: "read_num",
           },
 				],
 			};
@@ -132,16 +132,16 @@
 				} else {
 					this.priceType = "asc";
 				}
-        if (item.type === "sales_num") {
-          this.salesType = this.salesType === "asc" ? "desc" : "asc";
-        } else {
-          this.salesType = "asc";
-        }
-        if (item.type === "sales_num2") {
-          this.salesType2 = this.salesType2 === "asc" ? "desc" : "asc";
-        } else {
-          this.salesType2 = "asc";
-        }
+        // if (item.type === "sales_num") {
+        //   this.salesType = this.salesType === "asc" ? "desc" : "asc";
+        // } else {
+        //   this.salesType = "asc";
+        // }
+        // if (item.type === "read_num") {
+        //   this.salesType2 = this.salesType2 === "asc" ? "desc" : "asc";
+        // } else {
+        //   this.salesType2 = "asc";
+        // }
 				this.$emit("change", {
 					sort: this.selectType === "synthesis" ? "" : this.selectType,
 					sortType: this.selectType === "price" ? this.priceType : "",

+ 36 - 2
pages/shoppingCart/shoppingCart.vue

@@ -57,7 +57,8 @@
 				<u-checkbox-group @change="allCheckedChange" v-model="allChecked" size="20" >
 					<u-checkbox activeColor="#C29556" name="all" shape="circle" label=" "></u-checkbox>
 				</u-checkbox-group>
-				<view class="color-333" @click="delData">删除</view>
+        <view class="color-333 mr5" @click="allCheckedClick">全选</view>
+				<view class="color-333" @click="showDel=true">删除</view>
 			</view>
 			<view class="display-flex-content-center mb5 ">
 				<view class="color-333 fs14 fw400 ">总计:<text class="color-556 fs12 fw400">¥</text><text class="fw700 fs20 color-556">{{totalPrice}}</text></view>
@@ -66,7 +67,11 @@
 			</view>
 		</view>
 		<tabbarCom :zIndex="100" current="3"></tabbarCom>
+    <!-- 删除确认 -->
+    <u-modal :show="showDel" showCancelButton @cancel="showDel= false" @close="showDel=false" @confirm="delData"
+             :asyncClose="true" title="确认删除吗!" ></u-modal>
 	</view>
+
 </template>
 
 <script>
@@ -78,11 +83,13 @@
 		data() {
 			return {
 				list: [],
+        checkedFlag:false,
 				allChecked: [],
 				checkValue: [],
 				radiovalue1: [],
 				isGift: '0',
         num:0,
+        showDel:false,
 				options: [{
 					text: '取消',
 					style: {
@@ -187,12 +194,29 @@
 					this.list.forEach(item => {
 						item.checkedData = [item.id]
 					})
+          this.checkedFlag=true
 				} else {
 					this.list.forEach(item => {
 						item.checkedData = []
 					})
+          this.checkedFlag=false
 				}
 			},
+      allCheckedClick() {
+        if (!this.checkedFlag) {
+          this.list.forEach(item => {
+            item.checkedData = [item.id]
+          })
+          this.checkedFlag=true
+          this.allChecked=['all']
+        } else {
+          this.list.forEach(item => {
+            item.checkedData = []
+          })
+          this.allChecked=[]
+          this.checkedFlag=false
+        }
+      },
 			delData() {
 				// 删除
 				let checkedIds = this.list.filter(item => item.checkedData.length)
@@ -201,9 +225,19 @@
 					this.$api.deleteShoppingCart({
 						id: checkedIds
 					}).then(res => {
+            this.showDel = false
 						this.getData()
+            uni.showToast({
+              title: '删除成功'
+            })
 					})
-				}
+				}else{
+          this.showDel = false
+          uni.showToast({
+            icon: 'none',
+            title: '请选择删除的商品!'
+          })
+        }
 			},
 			numChange(item) {
 				const {

+ 0 - 1
subPages/accompanyingCamp/accompanyingCampDetail.vue

@@ -69,7 +69,6 @@ export default {
   onLoad(options) {
     console.log(options)
     this.itemId = options.id
-    this.getData(options.id)
   },
   onShow() {
     this.getData(this.itemId)

+ 19 - 3
subPages/activityDetail/activitySave.vue

@@ -56,13 +56,14 @@
         应付款: <span>¥<span style="font-size: 40rpx;">{{ (activityInfo.fee && formData.num ? (activityInfo.fee * formData.num).toFixed(2) : '0.00') }}</span></span>
       </view>
       <view class="bottom-navigation-div" v-else-if="is_entry&&(MyActivityInfo.status==1||MyActivityInfo.status==1)">
-        应付款: <span>¥<span style="font-size: 40rpx;">{{ MyActivityInfo.amount_real.toFixed(2)}}</span></span>
+        应付款: <span>¥<span style="font-size: 40rpx;">{{parseFloat(MyActivityInfo.amount_real) .toFixed(2)}}</span></span>
       </view>
       <view class="bottom-navigation-div" v-else-if="is_entry&&MyActivityInfo.status==3">
-        已付款: <span>¥<span style="font-size: 40rpx;">{{ MyActivityInfo.amount_real.toFixed(2)}}</span></span>
+        已付款: <span>¥<span style="font-size: 40rpx;">{{ parseFloat(MyActivityInfo.amount_real).toFixed(2)}}</span></span>
       </view>
       <button  class="activity-button" v-if="!is_entry" @click="handleRegister">立即报名</button>
-      <button  class="activity-button" v-else-if="is_entry" @click="handleEntryUpdate">修改报名信息</button>
+      <button  class="activity-button" v-if="is_entry&&3!==MyActivityInfo.status" style="margin-right: 12rpx;min-width: 260rpx!important;" @click="handleEntryUpdate">修改报名信息</button>
+      <button  class="activity-button" v-if="is_entry&&[1, 2].includes(MyActivityInfo.status)" @click="toPay">立即付款</button>
     </view>
   </view>
 </template>
@@ -163,6 +164,10 @@ export default {
   },
   watch: {},
   methods: {
+    toPay() {
+      // 立即付款
+      toWechatPayActivitySave(this.MyActivityInfo.order_no)
+    },
     getActivityDetail() {
 
       if (this.orderFlag){
@@ -234,6 +239,12 @@ export default {
         Toast('手机号格式不正确');
         return;
       }
+      // 正则判断纯数字
+      if (this.formData.mobile.length!==11) {
+        Toast('请输入11位的手机号');
+        return;
+      }
+
       this.formData.id=this.activityId
 
       this.addActivityEntry();
@@ -250,6 +261,11 @@ export default {
         Toast('手机号格式不正确');
         return;
       }
+      // 正则判断纯数字
+      if (this.formData.mobile.length!==11) {
+        Toast('请输入11位的手机号');
+        return;
+      }
       this.formData.id=this.entryId
       entryUpdate(this.formData).then(({data}) => {
         Toast('修改成功');

+ 1 - 1
subPages/afterSales/afterSales.vue

@@ -131,7 +131,7 @@
 					 return
 				}
 				if(!this.fileList1.length) {
-					uni.$u.toast("请上传凭证");
+					uni.$u.toast("请上传照片凭证");
 					return
 				}
 				let sendData = {

+ 4 - 0
subPages/coupon/coupon.vue

@@ -111,6 +111,10 @@ export default {
           uni.$u.toast("领取成功");
           this._getCouponList();
         });
+      }else if(this.activeTabItem.type === "myUses") {
+        uni.navigateTo({
+          url: '/pages/productCenter/productCenter',
+        })
       }
     },
   },

+ 2 - 0
subPages/coupon/couponItem.vue

@@ -62,6 +62,8 @@
 				return dayjs(time).format("YYYY-MM-DD");
 			},
 			onClick() {
+        console.log("onClickonClickonClickonClickonClickonClick")
+        console.log("this.config.disabled",this.config.disabled)
 				if (this.config.disabled) {
 					return;
 				}

+ 1 - 1
subPages/myOrder/courseOrderItem.vue

@@ -18,7 +18,7 @@
         <view class="mt9 display-flex    color-333 fw400">
           <view class="mr12 lh18"><text class="fs12 mr5"> 总价</text> <text class="fs10 lh15">¥</text><text class="fs14 lh18">{{item.price_selling}}</text></view>
           <view >
-            <text class="  fs12 lh18 color-3E3D44 fw400">实付:</text><text class="fs18 lh15 fw600 color-556"><text class="fs10">¥</text>{{data.payment_amount}}</text>
+            <text class="  fs12 lh18 color-3E3D44 fw400">实付:</text><text class="fs18 lh15 fw600 color-556"><text class="fs10">¥</text>{{data.amount_total}}</text>
           </view>
         </view>
 			</view>

+ 1 - 1
subPages/myOrder/orderItem.vue

@@ -21,7 +21,7 @@
 		</view>
 		<view class="goods-total display-flex-between">
 			<view >
-				<text class="fs12 lh18 color-3E3D44 fw400">实付:</text><text class="fs18 lh15 fw600 color-556"><text class="fs10">¥</text>{{data.payment_amount}}</text>
+				<text class="fs12 lh18 color-3E3D44 fw400">实付:</text><text class="fs18 lh15 fw600 color-556"><text class="fs10">¥</text>{{data.amount_total}}</text>
 			</view>
 			<view class="display-flex-center">
 				<text class="btn-gray-border" @click.stop="cancelOrder"

+ 1 - 1
subPages/myOrder/serverOrderItem.vue

@@ -21,7 +21,7 @@
 		</view>
 		<view class="goods-total display-flex-between">
 			<view >
-				<text class="fs12 lh18 color-3E3D44 fw400">实付:</text><text class="fs18 lh15 fw600 color-556"><text class="fs10">¥</text>{{data.payment_amount}}</text>
+				<text class="fs12 lh18 color-3E3D44 fw400">实付:</text><text class="fs18 lh15 fw600 color-556"><text class="fs10">¥</text>{{data.amount_total}}</text>
 			</view>
 			<view class="display-flex-center">
 				<text class="btn-gray-border" @click.stop="cancelOrder"

+ 5 - 0
subPages/personalDataManagement/index.vue

@@ -216,6 +216,11 @@
 					uni.$u.toast('请输入手机号')
 					return
 				}
+        if (this.form.phone.length!==11) {
+          uni.$u.toast('请输入11位手机号')
+          return
+        }
+
 				this.userRegister();
 			},
 			reUserInfo() {

+ 5 - 2
subPages/service/serviceSave.vue

@@ -45,8 +45,8 @@
         <u-divider ></u-divider>
         <view class="display-flex" style="width: 100%;">
           <view v-for="(date, index) in yvyueData" :key="index" :style="[ date.date+' '+date.time==dateTimeSelect? { border: '1rpx solid #ca9359',width: '193rpx',height: '70rpx' }:{} ]"  @click="SetDateTimeSelect(date)"   :class="[getDateTimeSelectClass(date),'list-item-date-text'
-        ,index<3?'':'mt15'
-        ,(index+1)%3==0?'':'mr10','flex-center-column']"  >
+        ,index<3?'':'mt12'
+        ,(index+1)%3==0?'':'mr9','flex-center-column']"  >
             <view class="fs12 lh16 " style="display: block">
               {{ date.time+"~"+date.period_end }}
             </view>
@@ -333,6 +333,9 @@ export default {
       if (!this.form.user_phone){
         return {msg:"请输入联系方式",status:true}
       }
+      if (this.form.user_phone.length!==11){
+        return {msg:"请输入11位的手机号",status:true}
+      }
       if (!this.form.order_num){
 
         return {msg:"请输入预约人数",status:true}