xiongzhu vor 6 Jahren
Ursprung
Commit
af12254c48

+ 1 - 0
src/app.wpy

@@ -269,6 +269,7 @@ export default class extends wepy.app {
             datRes = err;
         }
         this.observable.emit('location', datRes);
+        console.log(this.globalData);
     }
 
     constructor() {

+ 9 - 9
src/pages/cinemas/cinemas.wpy

@@ -153,7 +153,7 @@ export default class Cinemas extends wepy.page {
         scrollLeft: 0,
 
         top: 100,
-        batch_id: null,
+        couponId: null,
         usable_num: 0,
         DataMovies: null,
         Data: null,
@@ -239,7 +239,7 @@ export default class Cinemas extends wepy.page {
             this.start = 0;
             console.log('region::', this.region);
             let queryData = {
-                batch_id: this.batch_id,
+                couponId: this.couponId,
                 subject_id: this.subject_id,
                 region: id == 0 ? '' : this.regions[id],
                 start: 0,
@@ -268,14 +268,14 @@ export default class Cinemas extends wepy.page {
             // this.cinemas__nav__item = 'cinemas__nav__item'
         },
         goToSelectCity() {
-            let batch_id = this.batch_id;
-            let url = `/pages/locoation/locoation?batch_id=${batch_id}&loc=choose`;
+            let couponId = this.couponId;
+            let url = `/pages/locoation/locoation?couponId=${couponId}&loc=choose`;
             wx.navigateTo({
                 url
             });
         },
         goToitem(e) {
-            let batch_id = this.batch_id;
+            let couponId = this.couponId;
             let cinema_id = !!e.target.dataset.cinema_id ? e.target.dataset.cinema_id : '';
             let subject_id = !!e.target.dataset.subject_id ? `&subject_id=${e.target.dataset.subject_id}` : '';
 
@@ -284,8 +284,8 @@ export default class Cinemas extends wepy.page {
 
             let usable_num = this.usable_num;
             let subjectOnly = !!this.subject_id ? `&subjectOnly=0` : 's';
-            let urlMovie = `/pages/moviedetails/moviedetails?batch_id=${batch_id}${coupon_type}${subject_id}&subject_info=1&usable_num=${usable_num}`;
-            let urlCinema = `/pages/session/session?batch_id=${batch_id}${coupon_type}&cinema_id=${cinema_id}${subject_id_}&usable_num=${usable_num}${subjectOnly}`;
+            let urlMovie = `/pages/moviedetails/moviedetails?couponId=${couponId}${coupon_type}${subject_id}&subject_info=1&usable_num=${usable_num}`;
+            let urlCinema = `/pages/session/session?couponId=${couponId}${coupon_type}&cinema_id=${cinema_id}${subject_id_}&usable_num=${usable_num}${subjectOnly}`;
 
             wx.navigateTo({
                 url: this.activeIndex == 1 ? urlCinema : urlMovie
@@ -337,7 +337,7 @@ export default class Cinemas extends wepy.page {
             return;
         }
         let data = {
-            batch_id: this.batch_id,
+            couponId: this.couponId,
             subject_id: this.subject_id,
             region: this.region,
             start: start,
@@ -368,7 +368,7 @@ export default class Cinemas extends wepy.page {
     }
     async onLoad(options) {
         this.coupon_type = options.coupon_type;
-        this.batch_id = options.batch_id;
+        this.couponId = options.couponId;
         this.subject_id = options.subject_id;
         this.cinema_id = options.cinema_id;
         this.usable_num = options.usable_num;

+ 9 - 26
src/pages/locoation/locoation.wpy

@@ -317,9 +317,8 @@ export default class eventTicket extends wepy.page {
             let pattern = /^[\u4E00-\u9FA5]{1,5}$/;
             if (pattern.test(data)) {
                 this.inputVal = e.detail.value;
-                fetchSearchCities(data).then(res => {
-                    if (res.code == 'success') {
-                        let cities = res.cities;
+                fetchSearchCities(data)
+                    .then(cities => {
                         if (cities.length <= 0) {
                             this.isShowCities = false;
                             this.search_cities = cities;
@@ -338,14 +337,14 @@ export default class eventTicket extends wepy.page {
                         this.isShowCities = true;
                         this.search_cities = cities;
                         this.$apply();
-                    } else {
+                        console.log('searchCities:', this.search_cities);
+                    })
+                    .catch(e => {
                         wx.showToast({
-                            title: res.error,
+                            title: e ? e.error || 'error' : 'error',
                             icon: 'none'
                         });
-                    }
-                    console.log('searchCities:', this.search_cities);
-                });
+                    });
             } else {
                 this.isShowCities = false;
                 wx.showToast({
@@ -441,25 +440,9 @@ export default class eventTicket extends wepy.page {
         }
 
         await fetchCities(data).then(res => {
-            let all_cities = res.all_cities;
             this.hot_cities = res.hot_cities;
-
-            let cities = {};
-            for (let item in all_cities) {
-                cities[item] = [];
-                all_cities[item].map(city => {
-                    // if (!!curCity && (city.id != curCity.id)) {
-                    //     cities[item].push(city)
-                    //     return
-                    // }else{
-                    cities[item].push(city);
-                    // }
-                });
-            }
-            let letters = Object.keys(cities);
-            this.cities = all_cities;
-            this.letters = letters;
-
+            this.cities = res.all_cities;
+            this.letters = Object.keys(res.all_cities);
             this.$apply();
         });
 

+ 173 - 185
src/pages/moviedetails/moviedetails.wpy

@@ -8,7 +8,7 @@
         <block wx:if="{{!!Data.subject_info}}">
             <black class="movieInfoBlock">
                 <view class="movieInfo">
-                    <image class="movieInfo__poster" src="{{Data.subject_info.pic}}" mode="widthFix" lazy-load="false"/>
+                    <image class="movieInfo__poster" src="{{Data.subject_info.pic}}" mode="widthFix" lazy-load="false" />
                     <view class="movieInfo__detail">
                         <view class="movieInfo__name">{{Data.subject_info.title}}</view>
                         <view wx:if="{{!!Data.subject_info.title_en}}" class="movieInfo__title_en">{{Data.subject_info.title_en}}</view>
@@ -20,7 +20,7 @@
                         <view wx:if="{{!!Data.subject_info.director}}" class="movieInfo__p">导演:{{Data.subject_info.director}}</view>
                         <view wx:if="{{!!Data.subject_info.actors.length}}" class="movieInfo__p">主演:<text wx:for="{{Data.subject_info.actors}}" wx:key="index">{{item}}</text></view>
                     </view>
-                    <view class="bg" style="background-image:linear-gradient(15deg, #fff 70%, rgba(225,225,225,0) 120%),url({{Data.subject_info.pic}})"/>
+                    <view class="bg" style="background-image:linear-gradient(15deg, #fff 70%, rgba(225,225,225,0) 120%),url({{Data.subject_info.pic}})" />
                 </view>
 
                 <!-- 影片简介 -->
@@ -41,14 +41,14 @@
             <!-- regions bar -->
             <view wx:if="{{!!regions[1]}}" class="thisShell {{onMore?'onMore':''}}">
                 <view class="{{hasTop ? 'hasTop' : ''}}">
-                    <view wx:if="{{regions.length>4}}" class="more-cities"><b @tap.stop="bindMore">更多</b><i class="ico_arr"/></view>
+                    <view wx:if="{{regions.length>4}}" class="more-cities"><b @tap.stop="bindMore">更多</b><i class="ico_arr" /></view>
                     <scroll-view
                         scroll-x
                         scroll-y
                         scroll-left="{{scrollLeft}}"
                         scroll-with-animation="{{scrollAnim}}"
                         class="weui-navbar">
-                        <view class="scrollHack"/>
+                        <view class="scrollHack" />
                         <view
                             wx:for="{{regions}}"
                             wx:key="{{key}}"
@@ -58,7 +58,7 @@
                             @tap="tabClick">
                             <view class="weui-navbar__title">{{item}}</view>
                         </view>
-                        <view class="scrollHack"/>
+                        <view class="scrollHack" />
                     </scroll-view>
                 </view>
             </view>
@@ -66,14 +66,14 @@
             <!--  -->
             <view class="cinemas__list__wrapper">
                 <view wx:if="{{!!locateFail}}" class="blackMargin">
-                    <icon type="ico-Empty2" class=""/>
+                    <icon type="ico-Empty2" class="" />
                     <button
                         @tap="goToSelectCity"
                         type="default" plain size="mini"
                         class="select_city">定位失败,请手动选择城市</button>
                 </view>
                 <view wx:if="{{!!Data && (Data.cinemas.length == 0)}}" class="blackMargin">
-                    <icon type="ico-Empty2" class=""/>
+                    <icon type="ico-Empty2" class="" />
                     <view>没有符合条件的影院</view>
                 </view>
 
@@ -98,18 +98,17 @@
     </view>
 </template>
 <script>
-import wepy from 'wepy'
-import { fetchCinemas } from '../../utils/api.js'
+import wepy from 'wepy';
+import { fetchCinemas } from '../../utils/api.js';
 
 export default class Cinemas extends wepy.page {
     config = {
         navigationBarTitleText: '影片详情'
     };
-    components = {
-    };
+    components = {};
     data = {
         top: 100,
-        batch_id: null,
+        couponId: null,
         usable_num: 0,
         Data: null,
 
@@ -130,7 +129,7 @@ export default class Cinemas extends wepy.page {
         loc: null,
         regions: [], // 区们
         region: '', // 当前区
-        nav: ['定位中...','区域选择'],
+        nav: ['定位中...', '区域选择'],
         curStatus: 0,
         areaIndex: 0,
         cinemas__nav__item: 'cinemas__nav__item',
@@ -146,281 +145,270 @@ export default class Cinemas extends wepy.page {
     // 点击其它区域隐藏
     handleClickScroller() {
         if (this.curStatus == 0) return;
-        this.curStatus = 0
-        this.cinemas__nav__item = 'cinemas__nav__item'
+        this.curStatus = 0;
+        this.cinemas__nav__item = 'cinemas__nav__item';
     }
     // 点击弹层空白处消失
     handleAreaContainerClick() {
         // let target = e.target;
         // if (e.tagName == 'Li') return;
-        this.curStatus = 0
-        this.cinemas__nav__item = 'cinemas__nav__item'
-
+        this.curStatus = 0;
+        this.cinemas__nav__item = 'cinemas__nav__item';
     }
 
     methods = {
-        goToSelectCity(){
-
+        goToSelectCity() {
             // if(!this.$parent.globalData.locateFail){
 
             // }
 
-            let subject_id = this.subject_id
+            let subject_id = this.subject_id;
             // bind_cinemas==true 绑定影院
-            let bind_cinema = !!this.Data ? this.Data.bind_cinema : false
-            let batch_id = this.batch_id
+            let bind_cinema = !!this.Data ? this.Data.bind_cinema : false;
+            let couponId = this.couponId;
 
-            let url = `/pages/locoation/locoation?subject_id=${subject_id}&bind_cinema=${bind_cinema}&batch_id=${batch_id}&loc=choose`
+            let url = `/pages/locoation/locoation?subject_id=${subject_id}&bind_cinema=${bind_cinema}&couponId=${couponId}&loc=choose`;
             wx.navigateTo({
                 url
             });
         },
         goToitem(e) {
-            let batch_id = this.batch_id
-            let subject_id = this.subject_id
-            let cinema_id = e.target.dataset.cinema_id
-            let usable_num = this.usable_num
-            let subjectOnly = this.subjectOnly==0 ? `&subjectOnly=${this.subjectOnly}`: ''
-            let url = `/pages/session/session?batch_id=${batch_id}&subject_id=${subject_id}&cinema_id=${cinema_id}&usable_num=${usable_num}${subjectOnly}`
+            let couponId = this.couponId;
+            let subject_id = this.subject_id;
+            let cinema_id = e.target.dataset.cinema_id;
+            let usable_num = this.usable_num;
+            let subjectOnly = this.subjectOnly == 0 ? `&subjectOnly=${this.subjectOnly}` : '';
+            let url = `/pages/session/session?couponId=${couponId}&subject_id=${subject_id}&cinema_id=${cinema_id}&usable_num=${usable_num}${subjectOnly}`;
             wx.navigateTo({
                 url
-            })
+            });
         },
         // 简介
         onOff(e) {
-            if(e.target.dataset.suffix=='•••'){
+            if (e.target.dataset.suffix == '•••') {
                 // let i = parseInt(e.target.dataset.id.replace(/[^0-9]/ig,''))
-                this.Data.subject_info.synopsisOnOff = !this.Data.subject_info.synopsisOnOff
+                this.Data.subject_info.synopsisOnOff = !this.Data.subject_info.synopsisOnOff;
             }
         },
-        bindMore(){
-            this.onMore = !this.onMore
+        bindMore() {
+            this.onMore = !this.onMore;
             // this.forbiddenScroll = !this.forbiddenScroll
-            if(!!this.onMore){
-                this.scrollAnim = false
-                this.scrollLeft = this.scrollLeft - 0.1
-            } else{
-                this.scrollAnim = true
-                this.scrollLeft = this.scrollLeft + 0.1
+            if (!!this.onMore) {
+                this.scrollAnim = false;
+                this.scrollLeft = this.scrollLeft - 0.1;
+            } else {
+                this.scrollAnim = true;
+                this.scrollLeft = this.scrollLeft + 0.1;
             }
-            this.$apply()
+            this.$apply();
         },
         async tabClick(e) {
             // 点击更多入口
-            if(this.onMore){
-                this.onMore=!this.onMore
+            if (this.onMore) {
+                this.onMore = !this.onMore;
                 setTimeout(() => {
                     wx.createSelectorQuery()
                         .select('.weui-bar__item_on')
-                        .boundingClientRect((rect)=>{
-                            let left = rect.left - this.sliderLeft
-                            this.sliderOffset = left<-2 ? -2 : left
-                            let scrollLeft = this.sliderOffset - (this.windowWidth/2-75 || 116.5)
-                            this.scrollLeft = scrollLeft<-2 ? 0 : scrollLeft
-                            this.$apply()
-                    }).exec()
-                }, 200)
-
-            } else{
-                let left = e.currentTarget.offsetLeft - this.sliderLeft
-                this.sliderOffset = left<-2 ? -2 : left
-                let scrollLeft = this.sliderOffset - (this.windowWidth/2-75 || 116.5)
-                this.scrollLeft = scrollLeft<-2 ? 0 : scrollLeft
+                        .boundingClientRect(rect => {
+                            let left = rect.left - this.sliderLeft;
+                            this.sliderOffset = left < -2 ? -2 : left;
+                            let scrollLeft = this.sliderOffset - (this.windowWidth / 2 - 75 || 116.5);
+                            this.scrollLeft = scrollLeft < -2 ? 0 : scrollLeft;
+                            this.$apply();
+                        })
+                        .exec();
+                }, 200);
+            } else {
+                let left = e.currentTarget.offsetLeft - this.sliderLeft;
+                this.sliderOffset = left < -2 ? -2 : left;
+                let scrollLeft = this.sliderOffset - (this.windowWidth / 2 - 75 || 116.5);
+                this.scrollLeft = scrollLeft < -2 ? 0 : scrollLeft;
             }
-            this.activeIndex = e.currentTarget.id
-            
-            let id = e.currentTarget.id
-            this.region = id==0 ? '' : this.regions[id]
-            this.start = 0
-            console.log('region::',this.region)
+            this.activeIndex = e.currentTarget.id;
+
+            let id = e.currentTarget.id;
+            this.region = id == 0 ? '' : this.regions[id];
+            this.start = 0;
+            console.log('region::', this.region);
 
             let queryData = {
-                batch_id: this.batch_id,
+                couponId: this.couponId,
                 subject_id: this.subject_id,
-                region: id==0 ? '' : this.regions[id],
+                region: id == 0 ? '' : this.regions[id],
                 start: 0,
                 limit: 20,
+                city_id: this.loc.id,
                 ...this.loc
+            };
+            let fetchData = await fetchCinemas(queryData);
+            this.total = fetchData.data.total;
+
+            console.log(queryData.limit, queryData.start, this.total, queryData.limit + queryData.start <= this.total);
+            if (queryData.limit + queryData.start <= this.total) {
+                this.isMax = false;
+            } else {
+                this.isMax = true;
             }
-            let fetchData = await fetchCinemas(queryData)
-                this.total = fetchData.data.total
-
-                console.log(
-                    queryData.limit,queryData.start,this.total,
-                    queryData.limit + queryData.start <= this.total
-                )
-            if(queryData.limit + queryData.start <= this.total){
-                this.isMax = false
-            } else{
-                this.isMax = true
-            }
-            this.Data.cinemas = fetchData.data.cinemas
+            this.Data.cinemas = fetchData.data.cinemas;
             // this.fetchData(0, 20)
-            this.$apply()
-        },
-    }
+            this.$apply();
+        }
+    };
     // 获取影院列表数据
-    async fetchData(start, limit, show){
-
+    async fetchData(start, limit, show) {
         let current_city = this.$parent.globalData.location.current_city,
             choose_city = this.$parent.globalData.location.choose_city,
-            choose_city1 = !!current_city ? {lat:current_city.lat, lng:current_city.lng, ...choose_city} : choose_city
-        
-        let locateFail = this.locateFail
+            choose_city1 = !!current_city ? { lat: current_city.lat, lng: current_city.lng, ...choose_city } : choose_city;
+
+        let locateFail = this.locateFail;
         // console.log('choose_city::',choose_city)
 
-        this.loc = choose_city ? choose_city1 : current_city
-        this.nav[0] = !!this.loc ? this.loc.city : '城市选择'
+        this.loc = choose_city ? choose_city1 : current_city;
+        this.nav[0] = !!this.loc ? this.loc.city : '城市选择';
         // console.log('locateFail::',locateFail !=null && !!locateFail, !!this.loc)
-        if(locateFail !=null && !!locateFail){
-            return
+        if (locateFail != null && !!locateFail) {
+            return;
         }
 
         let data = {
-            batch_id: this.batch_id,
+            couponId: this.couponId,
             subject_id: this.subject_id,
             subject_info: this.subject_info,
             region: this.region,
             start: start,
             limit: limit,
+            city_id: this.loc.id,
             ...this.loc
-        }
-        
-        let fetchData = await fetchCinemas(data)
+        };
 
-        if(!!this.Data && !show){
-            this.Data.cinemas = [
-                ...this.Data.cinemas,
-                ...fetchData.data.cinemas,
-            ]
-        } else{
-            this.Data = fetchData.data
+        let fetchData = await fetchCinemas(data);
+
+        if (!!this.Data && !show) {
+            this.Data.cinemas = [...this.Data.cinemas, ...fetchData.data.cinemas];
+        } else {
+            this.Data = fetchData.data;
         }
 
         // 简介内容长度判断
-        !!this.Data.subject_info.synopsis && (
+        !!this.Data.subject_info.synopsis &&
             setTimeout(() => {
                 wx.createSelectorQuery()
                     .select('.movie__introduce')
-                    .boundingClientRect((rect)=>{
-                        this.Data.subject_info.synopsisLong = rect.height>=70 ? 1 : 0
-                        this.$apply()
-                }).exec()
-            }, 200)
-        )
+                    .boundingClientRect(rect => {
+                        this.Data.subject_info.synopsisLong = rect.height >= 70 ? 1 : 0;
+                        this.$apply();
+                    })
+                    .exec();
+            }, 200);
         // 滚动吸顶高度
-        !!this.Data.subject_info && (setTimeout(() => {
-            wx.createSelectorQuery()
-                .select('.movieInfoBlock')
-                .boundingClientRect((rect)=>{
-                    this.mobileDistance = rect.height + 20
-                    this.$apply()
-            }).exec()
-        }, 200))
-
-        this.start = fetchData.data.start
-        this.limit = fetchData.data.limit
-        this.total = fetchData.data.total
-
-        if(this.limit + this.start < this.total){
-            this.isMax = false
-        } else{
-            this.isMax = true
+        !!this.Data.subject_info &&
+            setTimeout(() => {
+                wx.createSelectorQuery()
+                    .select('.movieInfoBlock')
+                    .boundingClientRect(rect => {
+                        this.mobileDistance = rect.height + 20;
+                        this.$apply();
+                    })
+                    .exec();
+            }, 200);
+
+        this.start = fetchData.data.start;
+        this.limit = fetchData.data.limit;
+        this.total = fetchData.data.total;
+
+        if (this.limit + this.start < this.total) {
+            this.isMax = false;
+        } else {
+            this.isMax = true;
         }
-        console.log(fetchData.data.regions)
-        this.regions = fetchData.data.regions ? ['不限区域', ...fetchData.data.regions] : ['不限区域']
+        console.log(fetchData.data.regions);
+        this.regions = fetchData.data.regions ? ['不限区域', ...fetchData.data.regions] : ['不限区域'];
 
-        let timestamp = Date.parse(new Date())
+        let timestamp = Date.parse(new Date());
         // let expiration = timestamp + 6*1000
-        let expiration = timestamp + 7200000
-        wx.setStorageSync('data_location', this.curCity)
-        wx.setStorageSync('data_location_expiration', expiration)
+        let expiration = timestamp + 7200000;
+        wx.setStorageSync('data_location', this.curCity);
+        wx.setStorageSync('data_location_expiration', expiration);
 
-        this.$apply()
+        this.$apply();
     }
     async onLoad(options) {
-        let timestamp = Date.parse(new Date())
-        let expiration = wx.getStorageSync('data_location_expiration')
-        let app_data = wx.getStorageSync('data_location')
+        let timestamp = Date.parse(new Date());
+        let expiration = wx.getStorageSync('data_location_expiration');
+        let app_data = wx.getStorageSync('data_location');
 
-        this.batch_id = options.batch_id
-        this.subject_id = options.subject_id
-        this.subject_info = options.subject_info
-        this.usable_num = options.usable_num
-        this.subjectOnly = options.subjectOnly
-
-        this.$apply()
+        this.couponId = options.couponId;
+        this.subject_id = options.subject_id;
+        this.subject_info = options.subject_info;
+        this.usable_num = options.usable_num;
+        this.subjectOnly = options.subjectOnly;
 
+        this.$apply();
     }
-    async onShow(){
-        this.onMore = false
-        this.scrollAnim = true
-        if(this.$parent.globalData.loc == 'choose' && this.$parent.globalData.From == 'lockoation'){
-            this.region = ''
-            this.start = 0
-            this.areaIndex = 0
-            this.$apply()
+    async onShow() {
+        this.onMore = false;
+        this.scrollAnim = true;
+        if (this.$parent.globalData.loc == 'choose' && this.$parent.globalData.From == 'lockoation') {
+            this.region = '';
+            this.start = 0;
+            this.areaIndex = 0;
+            this.$apply();
         }
-        let choose_city = this.$parent.globalData.location.choose_city
+        let choose_city = this.$parent.globalData.location.choose_city;
         let start = 0,
             limit = this.limit,
-            total = this.total
-
-        let locateFail = this.locateFail = this.$parent.globalData.locateFail
+            total = this.total;
 
+        let locateFail = (this.locateFail = this.$parent.globalData.locateFail);
 
         // 由排期页返回时不加载数据
-        if(this.$parent.globalData.From != 'session'){
-            
+        if (this.$parent.globalData.From != 'session') {
             // 首页入口时-定位失败时
-            if(locateFail !=null){
-                this.fetchData(start, limit, 'show')
-                return
+            if (locateFail != null) {
+                this.fetchData(start, limit, 'show');
+                return;
             }
             // 首页入口时-定位成功时
             // !!this.$parent.globalData.location.current_city && this.fetchData(start, limit, 'show')
-    
+
             // 非首页入口时
-            this.$parent.observable.on("location",
-                async ()=>{
-                    this.fetchData(start, limit, 'show')
-                })
+            this.$parent.observable.on('location', async () => {
+                this.fetchData(start, limit, 'show');
+            });
         }
-
     }
     onPageScroll(e) {
         if (e.scrollTop >= this.mobileDistance) {
-            this.hasTop = true
-            this.$apply()
-            return
+            this.hasTop = true;
+            this.$apply();
+            return;
         }
-        this.hasTop = false
-        this.$apply()
+        this.hasTop = false;
+        this.$apply();
     }
     // 上拉加载
     async onReachBottom(e) {
-        await this.lower(e)
+        await this.lower(e);
     }
     async lower(e) {
-        if( !!this.lowerLoader || !!this.isMax || !this.Data.cinemas.length){
-            return
+        if (!!this.lowerLoader || !!this.isMax || !this.Data.cinemas.length) {
+            return;
         }
 
         if (this.limit + this.start <= this.total) {
-            await this.fetchData(this.limit + this.start, this.limit)
+            await this.fetchData(this.limit + this.start, this.limit);
             // this.isMax = false
-            this.lowerLoader = true
-        }else{
-            this.isMax = true
-            this.lowerLoader = false
-            return
+            this.lowerLoader = true;
+        } else {
+            this.isMax = true;
+            this.lowerLoader = false;
+            return;
         }
         // console.log('到底::',this.limit + this.start <= this.total, 'isMax::',this.isMax)
-        setTimeout( () => {
-            this.lowerLoader = false
-        }, 100 )
-        this.$apply()
-
+        setTimeout(() => {
+            this.lowerLoader = false;
+        }, 100);
+        this.$apply();
     }
 }
 </script>

+ 2 - 2
src/utils/api.js

@@ -127,7 +127,7 @@ function fetchCities(data) {
 // https://movieplusplus.com/api/v2/search/tpp/cities?city=%E5%8C%97
 // ------------------
 function fetchSearchCities(data) {
-    return API.GET(`${BASE_URL}/search/tpp/cities?city=${data}`, data, {
+    return API.GET(`${BASE_URL}/location/search?city=${data}`, data, {
         toast: { duration: 1000 }
     });
 }
@@ -192,7 +192,7 @@ function fetchCinemas(data) {
         region = !!data.region ? `&region=${data.region}` : '';
     return API.GET(
         `${BASE_URL}/city/${data.city_id}/cinemas?` +
-            `batch_id=${data.batch_id}${region}` +
+            `couponId=${data.couponId}${region}` +
             `${subject_id}` +
             `${subject_info}` +
             `&start=${data.start}&limit=${data.limit}&lng=${data.lng}&lat=${data.lat}`,

+ 1 - 1
src/utils/config.js

@@ -1,5 +1,5 @@
 const HOST = 'https://movieplusplus.com'
-const BASE_URL = 'http://192.168.50.132:8080'
+const BASE_URL = 'http://192.168.50.92:8080'
 const API = HOST + '/api/v3'
 const APIv2 = HOST + '/api/v2'