panhui 6 年之前
父節點
當前提交
fca4a68265

+ 7 - 1
project.config.json

@@ -33,7 +33,7 @@
 			"list": []
 			"list": []
 		},
 		},
 		"miniprogram": {
 		"miniprogram": {
-			"current": 4,
+			"current": 5,
 			"list": [
 			"list": [
 				{
 				{
 					"id": 0,
 					"id": 0,
@@ -69,6 +69,12 @@
 					"pathName": "pages/examinePhotos/examinePhotos",
 					"pathName": "pages/examinePhotos/examinePhotos",
 					"query": "",
 					"query": "",
 					"scene": null
 					"scene": null
+				},
+				{
+					"id": -1,
+					"name": "私人定制",
+					"pathName": "pages/customize/customize",
+					"scene": null
 				}
 				}
 			]
 			]
 		}
 		}

+ 6 - 1
src/components/CustomizeItem.vue

@@ -35,6 +35,10 @@ export default {
             type: String,
             type: String,
             default: '',
             default: '',
         },
         },
+        index:{
+            type:Number,
+            default:0
+        }
     },
     },
     data() {
     data() {
         return {};
         return {};
@@ -46,7 +50,8 @@ export default {
         chooseSelect(id) {
         chooseSelect(id) {
             this.$emit('chooseSelect', {
             this.$emit('chooseSelect', {
                 id: id,
                 id: id,
-                type: this.type,
+                index: this.index,
+                isChoose:this.isChoose
             });
             });
         },
         },
         goDetail() {
         goDetail() {

+ 298 - 374
src/pages/customize/customize.vue

@@ -1,471 +1,364 @@
 <template>
 <template>
-    <div class='container'>
-        <div class="containerTitle">
-            <div class="titleTop" @click="chooseLevel('photographer')">
-                <div class="name">选择摄影师</div>
-                <div class="sub">{{choosePhotographerLevelInfo.levelName}}</div>
-                <img src="/static/images/gouwuche_icon_zhankai.png" alt="">
+    <div class="container">
+        <div v-for="(item,index) in allIShowList" :key="index">
+            <div class="containerTitle">
+                <div class="titleTop" @click="chooseLevel(item.levelList,item.index)">
+                    <div class="name">选择{{item.name}}</div>
+                    <div class="sub">{{item.levelName}}</div>
+                    <img src="/static/images/gouwuche_icon_zhankai.png" alt />
+                </div>
+                <div class="tips">点击图片可以查看详情</div>
             </div>
             </div>
-            <div class="tips">点击图片可以查看详情</div>
-        </div>
-
-        <div class="list">
-            <customizeItem v-for="(item,index) in filifterPhotographer" type='photographer' @chooseSelect='chooseSelect' :id='item.id' :isChoose="checkChoose('photographer',item.id)" :name='item.serviceName' :image='item.listImage' :key='index'></customizeItem>
-        </div>
 
 
-        <div class="containerTitle">
-            <div class="titleTop" @click="chooseLevel('makeup_artist')">
-                <div class="name">选择化妆师</div>
-                <div class="sub">{{chooseMakeUpLevelInfo.levelName}}</div>
-                <img src="/static/images/gouwuche_icon_zhankai.png" alt="">
+            <div class="list">
+                <customizeItem
+                    v-for="(k,kIndex) in item.children"
+                    :index="item.index"
+                    @chooseSelect="chooseSelect"
+                    :id="k.id"
+                    :isChoose="k.isChoose"
+                    :name="k.serviceName"
+                    :image="k.listImage"
+                    :key="kIndex"
+                ></customizeItem>
             </div>
             </div>
-            <div class="tips">点击图片可以查看详情</div>
         </div>
         </div>
 
 
-        <div class="list">
-            <customizeItem v-for="(item,index) in filifterMakeUp" type='makeup_artist' @chooseSelect='chooseSelect' :id='item.id' :isChoose="checkChoose('makeup_artist',item.id)" :name='item.serviceName' :image='item.listImage' :key='index'></customizeItem>
-        </div>
-
-        <div class="containerTitle">
-            <div class="titleTop" @click="chooseLevel('clothing')">
-                <div class="name">选择服装道具</div>
-                <div class="sub">{{chooseClothingLevelInfo.levelName}}</div>
-                <img src="/static/images/gouwuche_icon_zhankai.png" alt="">
+        <div class="numberList">
+            <div class="num-item">
+                <div class="title">照片精修数量</div>
+                <div class="val">{{photoAmount}}</div>
             </div>
             </div>
-            <div class="tips">点击图片可以查看详情,可多选</div>
-        </div>
-
-        <div class="list">
-            <customizeItem v-for="(item,index) in filifterClothing" type='clothing' @chooseSelect='chooseSelect' :id='item.id' :isChoose="checkChoose('clothing',item.id)" :name='item.serviceName' :image='item.listImage' :key='index'></customizeItem>
-        </div>
-
-        <div class="containerTitle">
-            <div class="titleTop" @click="chooseLevel('album')">
-                <div class="name">选择相框</div>
-                <div class="sub">{{chooseAlbumLevelInfo.levelName}}</div>
-                <img src="/static/images/gouwuche_icon_zhankai.png" alt="">
+            <div class="num-item">
+                <div class="title">相册/放大数量</div>
+                <div class="val">{{fandaAmount+albumAmount}}</div>
             </div>
             </div>
-            <div class="tips">点击图片可以查看详情,可多选</div>
-        </div>
-
-        <div class="list">
-            <customizeItem v-for="(item,index) in filifterAlbum" @chooseSelect='chooseSelect' :id='item.id' type='album' :isChoose="checkChoose('album',item.id)" :name='item.serviceName' :image='item.listImage' :key='index'></customizeItem>
         </div>
         </div>
 
 
         <div class="tipsContnt">
         <div class="tipsContnt">
             <div class="title">不需要选择的服务</div>
             <div class="title">不需要选择的服务</div>
             <div class="content">
             <div class="content">
-                <div v-for="(item,index) in mandatory" :key="index">{{item.serviceName}}</div>
+                <div v-for="(item,index) in baseService" :key="index">{{item.serviceName}}</div>
             </div>
             </div>
             <div class="line"></div>
             <div class="line"></div>
             <div class="title">购买须知</div>
             <div class="title">购买须知</div>
-            <div class="content">1、购买后需联系客服预约档期(需提前15-40天) <br />2、用户若选择定金支付,剩余资金可在拍摄前线上支付,也可以线下门店支付 <br />3、最终用户选择的照片数量超过了套餐中标示的数量,则需要补齐相关差价</div>
+            <div class="content">
+                1、购买后需联系客服预约档期(需提前15-40天)
+                <br />2、用户若选择定金支付,剩余资金可在拍摄前线上支付,也可以线下门店支付
+                <br />3、最终用户选择的照片数量超过了套餐中标示的数量,则需要补齐相关差价
+            </div>
         </div>
         </div>
 
 
         <div class="subContent">
         <div class="subContent">
             <span>总价:</span>
             <span>总价:</span>
             <span class="price">{{total}}</span>
             <span class="price">{{total}}</span>
             <span class="detail" @click="showDetail=true">详情</span>
             <span class="detail" @click="showDetail=true">详情</span>
-            <img src="/static/images/more.png" @click="showDetail=true" alt="">
+            <img src="/static/images/more.png" @click="showDetail=true" alt />
             <div style="flex-grow:1"></div>
             <div style="flex-grow:1"></div>
             <button @click="submit">立即下单</button>
             <button @click="submit">立即下单</button>
         </div>
         </div>
 
 
-        <actionSheet :list='chooseList' label='levelName' :visible='showAction' @close='close'></actionSheet>
-        <customizeDetail :list='allChooseInfo' :mandatory='mandatory' :visible='showDetail' @close="showDetail=false"></customizeDetail>
-        <specificationsContent :visible='showSpecifications' type='customize' :productInfo='productInfo' @close='showSpecifications=false' :totalMoney='total' :chooseType='chooseSpecificationType' :chooseNum='1' @changeType='changeType' @changeChoose='changeChoose'></specificationsContent>
-
+        <actionSheet :list="chooseList" label="levelName" :visible="showAction" @close="close"></actionSheet>
+        <customizeDetail
+            :list="allChooseServiceInfo"
+            :mandatory="baseService"
+            :visible="showDetail"
+            @close="showDetail=false"
+        ></customizeDetail>
+        <specificationsContent
+            :visible="showSpecifications"
+            type="customize"
+            :productInfo="productInfo"
+            @close="showSpecifications=false"
+            :totalMoney="total"
+            :chooseType="chooseSpecificationType"
+            :chooseNum="1"
+            @changeType="changeType"
+            @changeChoose="changeChoose"
+        ></specificationsContent>
     </div>
     </div>
 </template>
 </template>
 <script>
 <script>
-import { mapState } from 'vuex';
-import customizeItem from '../../components/CustomizeItem';
-import actionSheet from '../../components/ActionSheet';
-import customizeDetail from '../../components/CustomizeDetail';
-import specificationsContent from '../../components/SpecificationsContent';
-import { all } from 'q';
-import calc from '../../calc';
+import { mapState } from "vuex";
+import customizeItem from "../../components/CustomizeItem";
+import actionSheet from "../../components/ActionSheet";
+import customizeDetail from "../../components/CustomizeDetail";
+import specificationsContent from "../../components/SpecificationsContent";
+import { all } from "q";
+import calc from "../../calc";
 export default {
 export default {
-    name: '',
+    name: "",
     data() {
     data() {
         return {
         return {
-            storeServiceList: '',
-            allPhotographer: [],
-            allPhotographerLevel: [],
-            choosePhotographerLevel: 0,
-            allMakeupList: [],
-            allMakeupLevel: [],
-            chooseMakeupLevel: 0,
             showAction: false,
             showAction: false,
             chooseList: [],
             chooseList: [],
-            chooseType: '',
-            allClothingList: [],
-            allClothingLevel: [],
-            chooseClothingLevel: '0',
-            allAlbumList: [],
-            allAlbumLevel: [],
-            chooseAlbumLevel: 0,
-            choosePhotographer: 0,
-            chooseMakeup: 0,
-            chooseClothing: [],
-            chooseAlbum: [],
-            mandatory: [],
+            allnameList: [],
+            allServiceList: [],
+            allLevelList: [],
+            allChooseLevel: [],
+            allChooseServiceList: [],
+            chooseIndex: 0,
             showDetail: false,
             showDetail: false,
-            showSpecifications: false,
-            chooseSpecificationType: 'all',
+            chooseSpecificationType: "all",
+            showSpecifications: false
         };
         };
     },
     },
     computed: {
     computed: {
-        ...mapState(['userInfo', 'storeId']),
-        choosePhotographerLevelInfo() {
-            var info = {};
-            var list = [...this.allPhotographerLevel];
-            list.forEach(item => {
-                if (item.id == this.choosePhotographerLevel) {
-                    info = item;
-                }
-            });
-            return info;
-        },
-        filifterPhotographer() {
+        ...mapState(["userInfo", "storeId"]),
+        allInfoList() {
             var list = [];
             var list = [];
-            var allList = [...this.allPhotographer];
-            allList.forEach(item => {
-                if (
-                    item.typeLevel == this.choosePhotographerLevel ||
-                    this.choosePhotographerLevel == 0
-                ) {
-                    list.push(item);
-                }
+            var nameList = [...this.allnameList];
+            var serviceList = [...this.allServiceList];
+            var levelList = [...this.allLevelList];
+
+            list = nameList.map(item => {
+                return {
+                    ...item,
+                    children: [],
+                    levelList: [
+                        {
+                            levelName: "全部" + item.name,
+                            id: ""
+                        }
+                    ]
+                };
             });
             });
-            return list;
-        },
-        chooseMakeUpLevelInfo() {
-            var info = {};
-            var list = [...this.allMakeupLevel];
-            list.forEach(item => {
-                if (item.id == this.chooseMakeupLevel) {
-                    info = item;
-                }
+
+            serviceList.forEach(item => {
+                list.forEach(k => {
+                    if (item.typeFlag == k.id) {
+                        k.children.push(item);
+                    }
+                });
             });
             });
-            return info;
-        },
-        filifterMakeUp() {
-            var list = [];
-            var allList = [...this.allMakeupList];
-            allList.forEach(item => {
-                if (
-                    item.typeLevel == this.chooseMakeupLevel ||
-                    this.chooseMakeupLevel == 0
-                ) {
-                    list.push(item);
-                }
+
+            levelList.forEach(item => {
+                list.forEach(k => {
+                    if (item.typeFlag == k.id) {
+                        k.levelList.push(item);
+                    }
+                });
             });
             });
-            return list;
-        },
-        chooseClothingLevelInfo() {
-            var info = {};
-            var list = [...this.allClothingLevel];
+            var _list = [];
+
             list.forEach(item => {
             list.forEach(item => {
-                if (item.id == this.chooseClothingLevel) {
-                    info = item;
+                if (item.children.length > 0) {
+                    _list.push(item);
                 }
                 }
             });
             });
-            return info;
+
+            return _list;
         },
         },
-        filifterClothing() {
+        baseService() {
             var list = [];
             var list = [];
-            var allList = [...this.allClothingList];
-            allList.forEach(item => {
-                if (
-                    item.typeLevel == this.chooseClothingLevel ||
-                    this.chooseClothingLevel == 0
-                ) {
-                    list.push(item);
+            var allList = [...this.allInfoList];
+            allList.forEach((item, index) => {
+                var info = { ...item };
+                if (item.basetype == "Y") {
+                    item.children.forEach(k => {
+                        list.push(k);
+                    });
                 }
                 }
             });
             });
             return list;
             return list;
         },
         },
-        chooseAlbumLevelInfo() {
-            var info = {};
-            var list = [...this.allAlbumLevel];
-            list.forEach(item => {
-                if (item.id == this.chooseAlbumLevel) {
-                    info = item;
-                }
-            });
-            return info;
-        },
-        filifterAlbum() {
+        allIShowList() {
             var list = [];
             var list = [];
-            var allList = [...this.allAlbumList];
-            allList.forEach(item => {
-                if (
-                    item.typeLevel == this.chooseAlbumLevel ||
-                    this.chooseAlbumLevel == 0
-                ) {
-                    list.push(item);
-                }
-            });
-            return list;
-        },
-        choosePhotographerInfo() {
-            var info = {};
-            var allList = [...this.allPhotographer];
-            allList.forEach(item => {
-                if (item.id == this.choosePhotographer) {
-                    info = item;
-                }
-            });
+            var allList = [...this.allInfoList];
+            var allChooseLevel = [...this.allChooseLevel];
+            var allChooseServiceList = [...this.allChooseServiceList];
+            allList.forEach((item, index) => {
+                var info = { ...item };
+                if (item.basetype == "N") {
+                    var levelName = "";
+                    item.levelList.forEach(k => {
+                        if (k.id == allChooseLevel[index]) {
+                            levelName = k.levelName;
+                        }
+                    });
+                    var children = [];
+                    if (allChooseLevel[index]) {
+                        item.children.forEach(k => {
+                            if (Number(k.typeLevel) == allChooseLevel[index]) {
+                                children.push(k);
+                            }
+                        });
+                    } else {
+                        children = item.children;
+                    }
+                    children.forEach(k => {
+                        if (allChooseServiceList[index].indexOf(k.id) != -1) {
+                            k.isChoose = true;
+                        } else {
+                            k.isChoose = false;
+                        }
+                    });
+                    info.children = children;
+                    info.levelName = levelName;
+                    info.index = index;
 
 
-            return info;
-        },
-        chooseMakeupInfo() {
-            var info = {};
-            var allList = [...this.allMakeupList];
-            allList.forEach(item => {
-                if (item.id == this.chooseMakeup) {
-                    info = item;
+                    list.push(info);
                 }
                 }
             });
             });
 
 
-            return info;
+            return list;
         },
         },
-        chooseClothingInfo() {
+        allChooseServceId() {
             var list = [];
             var list = [];
-            var allList = [...this.allClothingList];
-            allList.forEach(item => {
-                if (this.chooseClothing.indexOf(item.id) != -1) {
-                    list.push(item);
-                }
+            var allChooseServiceList = [...this.allChooseServiceList];
+            allChooseServiceList.forEach(item => {
+                item.forEach(k => {
+                    list.push(k);
+                });
             });
             });
-
             return list;
             return list;
         },
         },
-        chooseAlbumInfo() {
+        allChooseServiceInfo() {
             var list = [];
             var list = [];
-            var allList = [...this.allAlbumList];
-            allList.forEach(item => {
-                if (this.chooseAlbum.indexOf(item.id) != -1) {
+
+            var allServiceList = [...this.allServiceList];
+            var allChooseServceId = [...this.allChooseServceId];
+            allServiceList.forEach(item => {
+                if (allChooseServceId.indexOf(item.id) != -1) {
                     list.push(item);
                     list.push(item);
                 }
                 }
             });
             });
-            return list;
-        },
-        allChooseInfo() {
-            var list = [];
-            if (this.choosePhotographerInfo.id) {
-                list.push(this.choosePhotographerInfo);
-            }
-            if (this.chooseMakeupInfo.id) {
-                list.push(this.chooseMakeupInfo);
-            }
-
-            list = list.concat(this.chooseClothingInfo);
-            list = list.concat(this.chooseAlbumInfo);
 
 
             return list;
             return list;
         },
         },
         total() {
         total() {
             var money = 0;
             var money = 0;
-            var mandatory = [...this.mandatory];
+            var mandatory = [...this.baseService];
             mandatory.forEach(item => {
             mandatory.forEach(item => {
                 money = calc.Add(money, item.price || 0);
                 money = calc.Add(money, item.price || 0);
             });
             });
-
-            money = calc.Add(
-                money,
-                Number(this.choosePhotographerInfo.price || 0),
-            );
-            money = calc.Add(money, this.chooseMakeupInfo.price || 0);
-
-            var chooseClothingList = [...this.chooseClothingInfo];
-            chooseClothingList.forEach(item => {
-                money = calc.Add(money, item.price || 0);
-            });
-
-            var chooseAlbumInfo = [...this.chooseAlbumInfo];
-            chooseAlbumInfo.forEach(item => {
+            var service = [...this.allChooseServiceInfo];
+            service.forEach(item => {
                 money = calc.Add(money, item.price || 0);
                 money = calc.Add(money, item.price || 0);
             });
             });
             return money;
             return money;
         },
         },
         productInfo() {
         productInfo() {
             return {
             return {
-                title: '私人定制套餐',
+                title: "私人定制套餐",
                 typeFlag: 0,
                 typeFlag: 0,
                 price: this.total,
                 price: this.total,
-                downPayment: this.total ? calc.Mul(this.total, 0.3) : 0,
+                downPayment: this.total ? calc.Mul(this.total, 0.3) : 0
             };
             };
         },
         },
-    },
-    onLoad() {
-        this.refreash();
-        this.getStoreService('photographer').then(res => {
-            this.allPhotographer = res;
-        });
-        this.getStoreServiceLevel('photographer').then(res => {
-            res.push({
-                levelName: '全部摄影师',
-                id: 0,
+        photoAmount() {
+            var amount = 0;
+            var allChooseServiceInfo = [...this.allChooseServiceInfo];
+            allChooseServiceInfo.forEach(item => {
+                if (
+                    (item.typeFlag == "1" || item.typeFlag == "2") &&
+                    amount < item.photoAmount
+                ) {
+                    amount = item.photoAmount;
+                }
             });
             });
-            this.allPhotographerLevel = res;
-        });
 
 
-        this.getStoreService('makeup_artist').then(res => {
-            this.allMakeupList = res;
-        });
-        this.getStoreServiceLevel('makeup_artist').then(res => {
-            res.push({
-                levelName: '全部化妆师',
-                id: 0,
+            return amount;
+        },
+        fandaAmount() {
+            var amount = 0;
+            var allChooseServiceInfo = [...this.allChooseServiceInfo];
+            allChooseServiceInfo.forEach(item => {
+                if (item.typeFlag == "4") {
+                    amount += item.photoAmount;
+                }
             });
             });
-            this.allMakeupLevel = res;
-        });
 
 
-        this.getStoreService('clothing').then(res => {
-            this.allClothingList = res;
-        });
-        this.getStoreServiceLevel('clothing').then(res => {
-            res.push({
-                levelName: '全部服装道具',
-                id: 0,
+            return amount;
+        },
+        albumAmount() {
+            var amount = 0;
+            var allChooseServiceInfo = [...this.allChooseServiceInfo];
+            allChooseServiceInfo.forEach(item => {
+                if (item.typeFlag == "8") {
+                    amount += item.photoAmount;
+                }
             });
             });
-            this.allClothingLevel = res;
-        });
 
 
-        this.getStoreService('album').then(res => {
-            this.allAlbumList = res;
+            return amount;
+        }
+    },
+    onLoad() {
+        this.refreash();
+        this.$http.get("/storeServiceType/all", {}, {}, false).then(res => {
+            if (res.success) {
+                this.allnameList = res.data;
+                res.data.forEach(item => {
+                    this.allChooseLevel.push("");
+                    this.allChooseServiceList.push([]);
+                });
+            }
         });
         });
-        this.getStoreServiceLevel('album').then(res => {
-            res.push({
-                levelName: '全部相框',
-                id: 0,
-            });
-            this.allAlbumLevel = res;
+        this.$http.get("/storeService/all").then(res => {
+            if (res.success) {
+                this.allServiceList = res.data;
+            }
         });
         });
 
 
-        this.getStoreService('song').then(res => {
-            this.mandatory = res;
+        this.$http.get("/storeServiceLevel/all", {}, {}, false).then(res => {
+            if (res.success) {
+                this.allLevelList = res.data;
+            }
         });
         });
     },
     },
     methods: {
     methods: {
         refreash() {
         refreash() {
-            this.storeServiceList = '';
-            this.choosePhotographerLevel = 0;
-            this.chooseMakeupLevel = 0;
-            this.showAction = false;
-            this.chooseList = [];
-            this.chooseType = '';
-            this.chooseClothingLevel = '0';
-            this.chooseAlbumLevel = 0;
-            this.choosePhotographer = 0;
-            this.chooseMakeup = 0;
-            this.chooseClothing = [];
-            this.chooseAlbum = [];
-            this.mandatory = [];
-            this.showDetail = false;
+            this.allChooseLevel = [];
+            this.allChooseServiceList = [];
             this.showSpecifications = false;
             this.showSpecifications = false;
-            this.chooseSpecificationType = 'all';
         },
         },
         chooseSelect(info) {
         chooseSelect(info) {
-            var type = info.type;
+            var index = info.index;
             var id = info.id;
             var id = info.id;
-            switch (type) {
-                case 'photographer':
-                    if (this.choosePhotographer == id) {
-                        this.choosePhotographer = 0;
-                    } else {
-                        this.choosePhotographer = id;
-                    }
-                    break;
-                case 'makeup_artist':
-                    if (this.chooseMakeup == id) {
-                        this.chooseMakeup = 0;
-                    } else {
-                        this.chooseMakeup = id;
-                    }
-                    break;
-                case 'clothing':
-                    if (this.chooseClothing.indexOf(id) == -1) {
-                        this.chooseClothing.push(id);
-                    } else {
-                        this.chooseClothing.splice(
-                            this.chooseClothing.indexOf(id),
-                            1,
-                        );
-                    }
-                    break;
-                case 'album':
-                    if (this.chooseAlbum.indexOf(id) == -1) {
-                        this.chooseAlbum.push(id);
-                    } else {
-                        this.chooseAlbum.splice(
-                            this.chooseAlbum.indexOf(id),
-                            1,
-                        );
-                    }
-                    break;
+            var list = [...this.allChooseServiceList[index]];
+            if (info.isChoose) {
+                list.splice(list.indexOf(id), 1);
+            } else {
+                if (this.allnameList[index].multiple == "Y") {
+                    list.push(id);
+                } else {
+                    list = [id];
+                }
             }
             }
+            this.$set(this.allChooseServiceList, index, list);
         },
         },
         close(value) {
         close(value) {
-            if (value != 'close') {
-                switch (this.chooseType) {
-                    case 'photographer':
-                        this.choosePhotographerLevel = value;
-                        break;
-                    case 'makeup_artist':
-                        this.chooseMakeupLevel = value;
-                        break;
-                    case 'clothing':
-                        this.chooseClothingLevel = value;
-                        break;
-                    case 'album':
-                        this.chooseAlbumLevel = value;
-                        break;
-                }
+            if (value != "close") {
+                console.log(value);
+                this.$set(this.allChooseLevel, this.chooseIndex, value);
             }
             }
             this.showAction = false;
             this.showAction = false;
         },
         },
-        chooseLevel(type) {
-            var list = [];
-            this.chooseType = type;
-            switch (type) {
-                case 'photographer':
-                    list = [...this.allPhotographerLevel];
-                    break;
-                case 'makeup_artist':
-                    list = [...this.allMakeupLevel];
-                    break;
-                case 'clothing':
-                    list = [...this.allClothingLevel];
-                    break;
-                case 'album':
-                    list = [...this.allAlbumLevel];
-                    break;
-            }
+        chooseLevel(list, index) {
+            console.log(list);
             this.chooseList = list;
             this.chooseList = list;
             this.showAction = true;
             this.showAction = true;
+            this.chooseIndex = index;
         },
         },
         checkChoose(type, id) {
         checkChoose(type, id) {
             var result = false;
             var result = false;
             switch (type) {
             switch (type) {
-                case 'photographer':
+                case "photographer":
                     if (this.choosePhotographer == id) {
                     if (this.choosePhotographer == id) {
                         result = true;
                         result = true;
                     }
                     }
                     break;
                     break;
-                case 'makeup_artist':
+                case "makeup_artist":
                     if (this.chooseMakeup == id) {
                     if (this.chooseMakeup == id) {
                         result = true;
                         result = true;
                     }
                     }
                     break;
                     break;
-                case 'clothing':
+                case "clothing":
                     if (this.chooseClothing.indexOf(id) != -1) {
                     if (this.chooseClothing.indexOf(id) != -1) {
                         result = true;
                         result = true;
                     }
                     }
                     break;
                     break;
-                case 'album':
+                case "album":
                     if (this.chooseAlbum.indexOf(id) != -1) {
                     if (this.chooseAlbum.indexOf(id) != -1) {
                         result = true;
                         result = true;
                     }
                     }
@@ -476,8 +369,8 @@ export default {
         getStoreService(typeFlag) {
         getStoreService(typeFlag) {
             return new Promise((resolve, reject) => {
             return new Promise((resolve, reject) => {
                 this.$http
                 this.$http
-                    .get('/storeService/all', {
-                        typeFlag: typeFlag,
+                    .get("/storeService/all", {
+                        typeFlag: typeFlag
                     })
                     })
                     .then(res => {
                     .then(res => {
                         if (res.success) {
                         if (res.success) {
@@ -491,12 +384,12 @@ export default {
             return new Promise((resolve, reject) => {
             return new Promise((resolve, reject) => {
                 this.$http
                 this.$http
                     .get(
                     .get(
-                        '/storeServiceLevel/all',
+                        "/storeServiceLevel/all",
                         {
                         {
-                            typeFlag: typeFlag,
+                            typeFlag: typeFlag
                         },
                         },
                         {},
                         {},
-                        false,
+                        false
                     )
                     )
                     .then(res => {
                     .then(res => {
                         if (res.success) {
                         if (res.success) {
@@ -509,21 +402,26 @@ export default {
             });
             });
         },
         },
         submit() {
         submit() {
-            if (!this.choosePhotographer) {
-                wx.showToast({
-                    title: '请选择摄影师',
-                    icon: 'none',
-                    duration: 1500,
-                });
-                return;
+            var wrong = false;
+            var nameList = [...this.allnameList];
+            for (var i = 0; i < nameList.length; i++) {
+                var item = nameList[i];
+                if (
+                    item.mustFlag == "Y" &&
+                    item.basetype == "N" &&
+                    this.allChooseServiceList[i].length == 0
+                ) {
+                    wx.showToast({
+                        title: "请选择" + item.name,
+                        icon: "none",
+                        duration: 1500
+                    });
+                    wrong = true;
+                    break;
+                }
             }
             }
 
 
-            if (!this.chooseMakeup) {
-                wx.showToast({
-                    title: '请选化妆师',
-                    icon: 'none',
-                    duration: 1500,
-                });
+            if (wrong) {
                 return;
                 return;
             }
             }
 
 
@@ -533,30 +431,28 @@ export default {
             this.chooseSpecificationType = type;
             this.chooseSpecificationType = type;
         },
         },
         changeChoose() {
         changeChoose() {
-            var idList = this.allChooseInfo.map(item => {
-                return item.id;
-            });
+            var idList = [...this.allChooseServceId]
             idList = idList.concat(
             idList = idList.concat(
-                this.mandatory.map(item => {
+                this.baseService.map(item => {
                     return item.id;
                     return item.id;
-                }),
+                })
             );
             );
 
 
             wx.navigateTo({
             wx.navigateTo({
                 url:
                 url:
-                    '/pages/submit/submit?submitPage=customize&serviceList=' +
-                    idList.join(',') +
-                    '&typeFlag=' +
-                    (this.chooseSpecificationType == 'all' ? 0 : 1),
+                    "/pages/submit/submit?submitPage=customize&serviceList=" +
+                    idList.join(",") +
+                    "&typeFlag=" +
+                    (this.chooseSpecificationType == "all" ? 0 : 1)
             });
             });
-        },
+        }
     },
     },
     components: {
     components: {
         customizeItem,
         customizeItem,
         actionSheet,
         actionSheet,
         customizeDetail,
         customizeDetail,
-        specificationsContent,
-    },
+        specificationsContent
+    }
 };
 };
 </script>
 </script>
 <style lang='less' scoped>
 <style lang='less' scoped>
@@ -687,6 +583,34 @@ export default {
         margin-left: 10px;
         margin-left: 10px;
     }
     }
 }
 }
+
+.numberList {
+    margin: 15px;
+    background: rgba(255, 255, 255, 1);
+    border-radius: 8px;
+    padding: 0 15px;
+    .num-item {
+        display: flex;
+        align-items: center;
+        height: 60px;
+        justify-content: space-between;
+        .title {
+            font-size: 14px;
+            font-weight: bold;
+            color: rgba(0, 0, 0, 1);
+        }
+
+        .val {
+            font-size: 16px;
+            color: rgba(0, 0, 0, 1);
+            line-height: 22px;
+        }
+
+        &:not(:last-child) {
+            border-bottom: 1px solid #f2f4f5;
+        }
+    }
+}
 </style>
 </style>
 
 
 
 

+ 102 - 25
src/pages/examinePhotos/examinePhotos.vue

@@ -13,10 +13,13 @@
                     <img src="/static/images/icon_chengpian.png" class="icon" alt="">
                     <img src="/static/images/icon_chengpian.png" class="icon" alt="">
                 </div>
                 </div>
 
 
-                  <div class="imgContent">
+                <div class="imgContent">
                     <img :src="item" class="img" background-size="contain" background-position="center center" @click="showImg(index)">
                     <img :src="item" class="img" background-size="contain" background-position="center center" @click="showImg(index)">
                     <img src="/static/images/icon_yuanpian.png" class="icon" alt="">
                     <img src="/static/images/icon_yuanpian.png" class="icon" alt="">
                 </div>
                 </div>
+                <div class="imgTitle">
+                    IMG_1101.jpg
+                </div>
             </swiper-item>
             </swiper-item>
         </swiper>
         </swiper>
         <img class="left" v-if="current>0" @click="goPre" src="/static/images/icon_shangyiye_dis.png" alt="">
         <img class="left" v-if="current>0" @click="goPre" src="/static/images/icon_shangyiye_dis.png" alt="">
@@ -27,7 +30,14 @@
             </div>
             </div>
 
 
             <div class="btnList">
             <div class="btnList">
-                
+                <div class="btn noPass" :class="{active:noPass}"  @click="noPass=!noPass">
+                    <img :src="noPassImg" alt="">
+                    <span>不通过</span>
+                </div>
+                <div class="btn pass" :class="{active:pass}" @click="pass=!pass">
+                    <img :src="passImg" alt="">
+                    <span>通过</span>
+                </div>
             </div>
             </div>
         </div>
         </div>
 
 
@@ -52,10 +62,28 @@ export default {
             message: '',
             message: '',
             isChoose: false,
             isChoose: false,
             showMessage: false,
             showMessage: false,
+            noPass: false,
+            pass: false,
         };
         };
     },
     },
     computed: {
     computed: {
         ...mapState(['userInfo']),
         ...mapState(['userInfo']),
+        noPassImg() {
+            var img = require('../../../static/images/dingdan_icon_butongguo4.png');
+            if (this.noPass) {
+                img = require('../../../static/images/dingdan_icon_butongguo2.png');
+            }
+
+            return img;
+        },
+        passImg() {
+            var img = require('../../../static/images/dingdan_icon_butongguo3.png');
+            if (this.pass) {
+                img = require('../../../static/images/dingdan_icon_butongguo1.png');
+            }
+
+            return img;
+        },
     },
     },
     methods: {
     methods: {
         goPre() {
         goPre() {
@@ -92,8 +120,8 @@ export default {
     height: 80px;
     height: 80px;
 }
 }
 .bottom {
 .bottom {
-    min-height: 148px;
-    height: 148px;
+    min-height: 133px;
+    height: 133px;
 }
 }
 
 
 .container {
 .container {
@@ -112,23 +140,37 @@ export default {
         flex-direction: column;
         flex-direction: column;
         align-items: center;
         align-items: center;
         justify-content: center;
         justify-content: center;
+        overflow-y: auto;
+        overflow-x: hidden;
         .imgContent {
         .imgContent {
             width: 160px;
             width: 160px;
             height: 160px;
             height: 160px;
             background: #f2f4f5;
             background: #f2f4f5;
             border-radius: 4px;
             border-radius: 4px;
             position: relative;
             position: relative;
-            .img{
+            .img {
                 width: 160px;
                 width: 160px;
                 height: 160px;
                 height: 160px;
             }
             }
-            .icon{
+            .icon {
                 width: 38px;
                 width: 38px;
                 height: 38px;
                 height: 38px;
                 position: absolute;
                 position: absolute;
                 left: 0;
                 left: 0;
                 top: 0;
                 top: 0;
             }
             }
+
+            &:nth-child(2) {
+                margin-top: 20px;
+            }
+        }
+
+        .imgTitle {
+            font-size: 12px;
+            color: rgba(51, 51, 51, 1);
+            line-height: 17px;
+            margin: 32px auto 0;
+            text-align: center;
         }
         }
     }
     }
 }
 }
@@ -181,7 +223,7 @@ export default {
     height: 50px;
     height: 50px;
     background: rgba(242, 244, 245, 1);
     background: rgba(242, 244, 245, 1);
     border-radius: 8px;
     border-radius: 8px;
-    margin: 15px;
+    margin: 10px 15px;
     padding: 0 20px;
     padding: 0 20px;
     line-height: 50px;
     line-height: 50px;
     font-size: 14px;
     font-size: 14px;
@@ -195,25 +237,60 @@ export default {
     }
     }
 }
 }
 
 
-.btn {
-    height: 40px;
-    border-radius: 22px;
-    border: 1px solid rgba(0, 197, 242, 1);
-    display: block;
-    margin: 35px 15px 0;
-    font-size: 15px;
-    font-weight: bold;
-    color: rgba(0, 197, 242, 1);
-    line-height: 40px;
-    background-color: #fff;
-
-    &:active {
-        background-color: darken(#fff, 10);
-    }
+.btnList {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding:8px 15px;
 
 
-    &.primary {
-        background-color: #00c5f2;
-        color: #fff;
+    .btn {
+        width: 165px;
+        height: 40px;
+        border-radius: 22px;
+        border: 1px solid;
+
+        display: flex;
+        align-items: center;
+        justify-content: center;
+
+        img {
+            width: 24px;
+            height: 24px;
+        }
+
+        span {
+            font-size: 15px;
+            line-height: 21px;
+            font-weight: bold;
+            margin-left: 2px;
+        }
+
+        &.noPass {
+            border-color: #fb6e08;
+            span{
+                color: #fb6e08
+            }
+
+            &.active{
+              background-color: #fb6e08;
+              span{
+                  color: #fff;
+              }  
+            }
+        }
+        &.pass {
+            border-color: #00c5f2;
+            span{
+                color: #00c5f2
+            }
+
+             &.active{
+              background-color: #00c5f2;
+              span{
+                  color: #fff;
+              }  
+            }
+        }
     }
     }
 }
 }
 </style>
 </style>

+ 29 - 2
src/pages/serviceDetail/serviceDetail.vue

@@ -13,6 +13,10 @@
             <span>{{levelName}}</span>
             <span>{{levelName}}</span>
         </div>
         </div>
 
 
+        <div class="zensong" v-if='zensong'>
+            {{zensong}}
+        </div>
+
         <div v-html="detail.introduction">
         <div v-html="detail.introduction">
         </div>
         </div>
     </div>
     </div>
@@ -44,12 +48,25 @@ export default {
             });
             });
             return name;
             return name;
         },
         },
+        zensong(){
+            var str=''
+            if(this.detail.typeFlag=='1'||this.detail.typeFlag=='2'){
+                str='赠送'+this.detail.photoAmount+'张修图'
+            }
+            else if(this.detail.typeFlag=='4'){
+                str='赠送'+this.detail.photoAmount+'张放大'
+            }else if(this.detail.typeFlag=='8'){
+                str='赠送一本最多含'+this.detail.photoAmount+'张的相册'
+            }
+
+            return str
+        }
     },
     },
     onLoad(options) {
     onLoad(options) {
         console.log(options);
         console.log(options);
 
 
         this.$http
         this.$http
-            .get('/storeServiceLevel/all')
+            .get('/storeServiceLevel/all',{},{},false)
             .then(res => {
             .then(res => {
                 if (res.success) {
                 if (res.success) {
                     this.storeServiceLevel = res.data;
                     this.storeServiceLevel = res.data;
@@ -65,7 +82,8 @@ export default {
             })
             })
             .then(res => {
             .then(res => {
                 if (res.success) {
                 if (res.success) {
-                    res.data.introduction = res.data.introduction.replace(
+                    if(res.data.introduction ){
+                            res.data.introduction = res.data.introduction.replace(
                         /\<img/g,
                         /\<img/g,
                         '<img style="width:100%;height:auto;display:block;margin-bottom:15px;border-radius:4px;"',
                         '<img style="width:100%;height:auto;display:block;margin-bottom:15px;border-radius:4px;"',
                     );
                     );
@@ -73,6 +91,8 @@ export default {
                         /\<p/g,
                         /\<p/g,
                         '<p style=" font-size: 14px; color: rgba(0, 0, 0, 1);line-height: 22px;;margin-bottom:20px"',
                         '<p style=" font-size: 14px; color: rgba(0, 0, 0, 1);line-height: 22px;;margin-bottom:20px"',
                     );
                     );
+                    }
+                
                     console.log(res.data.introduction);
                     console.log(res.data.introduction);
                     this.detail = res.data;
                     this.detail = res.data;
                 }
                 }
@@ -119,4 +139,11 @@ export default {
         }
         }
     }
     }
 }
 }
+
+.zensong{
+    font-size:13px;
+color:rgba(255,143,0,1);
+line-height:20px;
+padding: 15px 0;
+}
 </style>
 </style>

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

@@ -46,7 +46,7 @@ export default {
             }
             }
             this.$http
             this.$http
                 .get('/storeService/page', {
                 .get('/storeService/page', {
-                    typeFlag: 'photographer',
+                    typeFlag: '1',
                     currentPage: this.currentPage,
                     currentPage: this.currentPage,
                 })
                 })
                 .then(res => {
                 .then(res => {

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

@@ -102,7 +102,7 @@ export default {
         this.$http
         this.$http
             .get('/storeService/all', {
             .get('/storeService/all', {
                 storeFlag: 'Y',
                 storeFlag: 'Y',
-                typeFlag: 'photographer',
+                typeFlag: '1',
             })
             })
             .then(res => {
             .then(res => {
                 if (res.success) {
                 if (res.success) {

+ 176 - 178
src/utils/http.js

@@ -1,188 +1,186 @@
-// const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.50.15:8080' : '';
-const baseUrl = 'https://xcx.izouma.com';
-import store from '../store';
-
+const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.50.15:8080' : '';
+// const baseUrl = 'https://xcx.izouma.com';
 function parseUrl(url) {
 function parseUrl(url) {
-    let _baseUrl = baseUrl;
-    if (url.startsWith('http')) {
-        return url;
-    }
-    if (!_baseUrl.endsWith('/')) {
-        _baseUrl += '/';
-    }
-    if (url.startsWith('/')) {
-        url = url.slice(1);
-    }
-    return _baseUrl + url;
+  let _baseUrl = baseUrl;
+  if (url.startsWith('http')) {
+    return url;
+  }
+  if (!_baseUrl.endsWith('/')) {
+    _baseUrl += '/';
+  }
+  if (url.startsWith('/')) {
+    url = url.slice(1);
+  }
+  return _baseUrl + url;
 }
 }
 export default {
 export default {
-    install(_Vue) {
-        _Vue.prototype.$http = {
-            storeId: 13,
-            setToken(token) {
-                console.log(token);
-                this.token = token;
-            },
-            get(url, params, options, needStore) {
-                options = options || {};
-                let self = this;
-                return new Promise((resolve, reject) => {
-                    wx.request({
-                        method: 'GET',
-                        url: parseUrl(url),
-                        data: {
-                            ...params,
-                            storeId: needStore == false ? '' : self.storeId
-                        },
-                        dataType: 'json',
-                        header: {
-                            token: self.token || '',
-                            ...(options.header || {}),
-                        },
-                        success(res) {
-                            if (res && res.statusCode === 200) {
-                                if (res.data.error == '未登录') {
-                                    wx.reLaunch({
-                                        url: '/pages/login/login',
-                                    });
+  install(_Vue) {
+    _Vue.prototype.$http = {
+      storeId: 13,
+      setToken(token) {
+        console.log(token);
+        this.token = token;
+      },
+      get(url, params, options, needStore) {
+        options = options || {};
+        let self = this;
+        return new Promise((resolve, reject) => {
+          wx.request({
+            method: 'GET',
+            url: parseUrl(url),
+            data: {
+              ...params,
+              storeId: needStore == false ? '' : self.storeId,
+            },
+            dataType: 'json',
+            header: {
+              token: self.token || '',
+              ...(options.header || {}),
+            },
+            success(res) {
+              if (res && res.statusCode === 200) {
+                if (res.data.error == '未登录') {
+                  wx.reLaunch({
+                    url: '/pages/login/login',
+                  });
 
 
-                                    reject(res);
-                                } else {
-                                    resolve(res.data);
-                                }
-                            } else {
-                                reject(res);
-                            }
-                        },
-                        fail(err) {
-                            reject(err);
-                        },
-                    });
-                });
-            },
-            post(url, data, options) {
-                options = options || {};
-                let self = this;
-                return new Promise((resolve, reject) => {
-                    wx.request({
-                        method: 'post',
-                        url: parseUrl(url),
-                        data: {
-                            ...data,
-                            storeId: self.storeId
-                        },
-                        dataType: 'json',
-                        header: {
-                            'content-type': 'application/x-www-form-urlencoded',
-                            token: self.token || '',
-                            ...(options.header || {}),
-                        },
-                        success(res) {
-                            if (res && res.statusCode === 200) {
-                                if (res.data.error == '未登录') {
-                                    wx.reLaunch({
-                                        url: '/pages/login/login',
-                                    });
+                  reject(res);
+                } else {
+                  resolve(res.data);
+                }
+              } else {
+                reject(res);
+              }
+            },
+            fail(err) {
+              reject(err);
+            },
+          });
+        });
+      },
+      post(url, data, options) {
+        options = options || {};
+        let self = this;
+        return new Promise((resolve, reject) => {
+          wx.request({
+            method: 'post',
+            url: parseUrl(url),
+            data: {
+              ...data,
+              storeId: self.storeId,
+            },
+            dataType: 'json',
+            header: {
+              'content-type': 'application/x-www-form-urlencoded',
+              token: self.token || '',
+              ...(options.header || {}),
+            },
+            success(res) {
+              if (res && res.statusCode === 200) {
+                if (res.data.error == '未登录') {
+                  wx.reLaunch({
+                    url: '/pages/login/login',
+                  });
 
 
-                                    reject(res);
-                                } else {
-                                    resolve(res.data);
-                                }
-                            } else {
-                                reject(res);
-                            }
-                        },
-                        fail(err) {
-                            reject(err);
-                        },
-                    });
-                });
-            },
-            postJ(url, data, options) {
-                options = options || {};
-                let self = this;
-                return new Promise((resolve, reject) => {
-                    wx.request({
-                        method: 'post',
-                        url: parseUrl(url),
-                        data: {
-                            ...data,
-                            storeId: self.storeId
-                        },
-                        dataType: 'json',
-                        header: {
-                            token: self.token || '',
-                            ...(options.header || {}),
-                        },
-                        success(res) {
-                            if (res && res.statusCode === 200) {
-                                if (res.data.error == '未登录') {
-                                    wx.reLaunch({
-                                        url: '/pages/login/login',
-                                    });
+                  reject(res);
+                } else {
+                  resolve(res.data);
+                }
+              } else {
+                reject(res);
+              }
+            },
+            fail(err) {
+              reject(err);
+            },
+          });
+        });
+      },
+      postJ(url, data, options) {
+        options = options || {};
+        let self = this;
+        return new Promise((resolve, reject) => {
+          wx.request({
+            method: 'post',
+            url: parseUrl(url),
+            data: {
+              ...data,
+              storeId: self.storeId,
+            },
+            dataType: 'json',
+            header: {
+              token: self.token || '',
+              ...(options.header || {}),
+            },
+            success(res) {
+              if (res && res.statusCode === 200) {
+                if (res.data.error == '未登录') {
+                  wx.reLaunch({
+                    url: '/pages/login/login',
+                  });
 
 
-                                    reject(res);
-                                } else {
-                                    resolve(res.data);
-                                }
-                            } else {
-                                reject(res);
-                            }
-                        },
-                        fail(err) {
-                            reject(err);
-                        },
-                    });
-                });
-            },
-            uploadFile(url, filePath, options) {
-                options = options || {};
-                let self = this;
-                return new Promise((resolve, reject) => {
-                    wx.uploadFile({
-                        url: parseUrl(url),
-                        filePath: filePath,
-                        name: 'file',
-                        formData: {
-                            user: 'test',
-                        },
-                        header: {
-                            token: self.token || '',
-                            ...(options.header || {}),
-                        },
-                        success(res) {
-                            if (res && res.statusCode === 200) {
-                                if (res.data.error == '未登录') {
-                                    wx.reLaunch({
-                                        url: '/pages/login/login',
-                                    });
+                  reject(res);
+                } else {
+                  resolve(res.data);
+                }
+              } else {
+                reject(res);
+              }
+            },
+            fail(err) {
+              reject(err);
+            },
+          });
+        });
+      },
+      uploadFile(url, filePath, options) {
+        options = options || {};
+        let self = this;
+        return new Promise((resolve, reject) => {
+          wx.uploadFile({
+            url: parseUrl(url),
+            filePath: filePath,
+            name: 'file',
+            formData: {
+              user: 'test',
+            },
+            header: {
+              token: self.token || '',
+              ...(options.header || {}),
+            },
+            success(res) {
+              if (res && res.statusCode === 200) {
+                if (res.data.error == '未登录') {
+                  wx.reLaunch({
+                    url: '/pages/login/login',
+                  });
 
 
-                                    reject(res);
-                                } else {
-                                    resolve(res.data);
-                                }
-                            } else {
-                                reject(res);
-                            }
-                        },
-                        fail(err) {
-                            reject(err);
-                        },
-                    });
-                });
+                  reject(res);
+                } else {
+                  resolve(res.data);
+                }
+              } else {
+                reject(res);
+              }
+            },
+            fail(err) {
+              reject(err);
             },
             },
+          });
+        });
+      },
+    };
+    _Vue.prototype.$request = options => {
+      options = options || {};
+      options.url = parseUrl(options.url);
+      return new Promise((resolve, reject) => {
+        options.success = res => {
+          resolve(res);
         };
         };
-        _Vue.prototype.$request = options => {
-            options = options || {};
-            options.url = parseUrl(options.url);
-            return new Promise((resolve, reject) => {
-                options.success = res => {
-                    resolve(res);
-                };
-                options.success = err => {
-                    reject(err);
-                };
-            });
+        options.success = err => {
+          reject(err);
         };
         };
-    },
-};
+      });
+    };
+  },
+};

二進制
static/images/dingdan_icon_butongguo1.png


二進制
static/images/dingdan_icon_butongguo2.png


二進制
static/images/dingdan_icon_butongguo3.png


二進制
static/images/dingdan_icon_butongguo4.png