|
@@ -1,12 +1,18 @@
|
|
import car from '@/utils/controls/car';
|
|
import car from '@/utils/controls/car';
|
|
import user from '@/user';
|
|
import user from '@/user';
|
|
|
|
+import config from '@/config/config';
|
|
export default {
|
|
export default {
|
|
|
|
|
|
|
|
+ onLoad(){
|
|
|
|
+ this.name = (this.__route__ || '').split('/').pop();
|
|
|
|
+ },
|
|
|
|
+
|
|
onShow(){
|
|
onShow(){
|
|
// 更新针对 购物车的数量角标
|
|
// 更新针对 购物车的数量角标
|
|
if (!car.__load && !car.status && user.user && user.isLogin()) {
|
|
if (!car.__load && !car.status && user.user && user.isLogin()) {
|
|
car.getCartNumber(true).then(()=> car.__load = true);
|
|
car.getCartNumber(true).then(()=> car.__load = true);
|
|
}
|
|
}
|
|
|
|
+ config.page = this;
|
|
car.checkSet();
|
|
car.checkSet();
|
|
},
|
|
},
|
|
|
|
|
|
@@ -26,4 +32,4 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-}
|
|
|
|
|
|
+}
|