完善功能
This commit is contained in:
@ -101,16 +101,16 @@ var components
|
||||
try {
|
||||
components = {
|
||||
uIcon: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-icon/u-icon */ "components/uview-ui/components/u-icon/u-icon").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-icon/u-icon.vue */ 318))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-icon/u-icon */ "components/uview-ui/components/u-icon/u-icon").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-icon/u-icon.vue */ 327))
|
||||
},
|
||||
uButton: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-button/u-button */ "components/uview-ui/components/u-button/u-button").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-button/u-button.vue */ 325))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-button/u-button */ "components/uview-ui/components/u-button/u-button").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-button/u-button.vue */ 334))
|
||||
},
|
||||
uSwiper: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-swiper/u-swiper */ "components/uview-ui/components/u-swiper/u-swiper").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-swiper/u-swiper.vue */ 332))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-swiper/u-swiper */ "components/uview-ui/components/u-swiper/u-swiper").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-swiper/u-swiper.vue */ 341))
|
||||
},
|
||||
uImage: function () {
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-image/u-image */ "components/uview-ui/components/u-image/u-image").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-image/u-image.vue */ 339))
|
||||
return __webpack_require__.e(/*! import() | components/uview-ui/components/u-image/u-image */ "components/uview-ui/components/u-image/u-image").then(__webpack_require__.bind(null, /*! @/components/uview-ui/components/u-image/u-image.vue */ 348))
|
||||
},
|
||||
}
|
||||
} catch (e) {
|
||||
@ -174,6 +174,8 @@ Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 30));
|
||||
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32));
|
||||
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
|
||||
var _vuex = __webpack_require__(/*! vuex */ 33);
|
||||
var _app = __webpack_require__(/*! @/api/app */ 50);
|
||||
@ -185,10 +187,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
||||
var _default = {
|
||||
data: function data() {
|
||||
return {
|
||||
list: [{
|
||||
image: "http://jianbing-media.stnav.com/frontend/img/banner.png",
|
||||
title: "昨夜星辰昨夜风,画楼西畔桂堂东"
|
||||
}],
|
||||
adList: [],
|
||||
userAddress: '',
|
||||
addressId: 0
|
||||
};
|
||||
@ -203,6 +202,7 @@ var _default = {
|
||||
_this.addressId = params.id;
|
||||
_this.updateUserAddress();
|
||||
});
|
||||
this.getAdListFun();
|
||||
},
|
||||
onShow: function onShow() {
|
||||
this.getUser();
|
||||
@ -213,9 +213,38 @@ var _default = {
|
||||
uni.$off(['selectaddress']);
|
||||
},
|
||||
methods: _objectSpread(_objectSpread({}, (0, _vuex.mapActions)(['getCartNum', 'getUser'])), {}, {
|
||||
// 获取广告轮播图
|
||||
getAdListFun: function getAdListFun() {
|
||||
var _this2 = this;
|
||||
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
||||
var _yield$getAdList, code, data;
|
||||
return _regenerator.default.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_context.next = 2;
|
||||
return (0, _store.getAdList)({
|
||||
pid: 1,
|
||||
client: 1
|
||||
});
|
||||
case 2:
|
||||
_yield$getAdList = _context.sent;
|
||||
code = _yield$getAdList.code;
|
||||
data = _yield$getAdList.data;
|
||||
if (code) {
|
||||
_this2.adList = data;
|
||||
}
|
||||
case 6:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}
|
||||
}, _callee);
|
||||
}))();
|
||||
},
|
||||
// 获取默认物流地址
|
||||
getUserAddress: function getUserAddress() {
|
||||
var _this2 = this;
|
||||
var _this3 = this;
|
||||
(0, _user.getDefaultAddress)().then(function (res) {
|
||||
if (res.code == 1) {
|
||||
var _res$data = res.data,
|
||||
@ -224,14 +253,14 @@ var _default = {
|
||||
city = _res$data.city,
|
||||
district = _res$data.district,
|
||||
address = _res$data.address;
|
||||
_this2.userAddress = "".concat(province, " ").concat(city, " ").concat(district, " ").concat(address);
|
||||
_this2.addressId = id;
|
||||
_this3.userAddress = "".concat(province, " ").concat(city, " ").concat(district, " ").concat(address);
|
||||
_this3.addressId = id;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 用户切换物流地址
|
||||
updateUserAddress: function updateUserAddress() {
|
||||
var _this3 = this;
|
||||
var _this4 = this;
|
||||
(0, _user.getOneAddress)(this.addressId).then(function (res) {
|
||||
if (res.code == 1) {
|
||||
var _res$data2 = res.data,
|
||||
@ -240,19 +269,11 @@ var _default = {
|
||||
city = _res$data2.city,
|
||||
district = _res$data2.district,
|
||||
address = _res$data2.address;
|
||||
_this3.userAddress = "".concat(province, " ").concat(city, " ").concat(district, " ").concat(address);
|
||||
_this3.addressId = id;
|
||||
_this4.userAddress = "".concat(province, " ").concat(city, " ").concat(district, " ").concat(address);
|
||||
_this4.addressId = id;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 立即下单
|
||||
buy: function buy() {
|
||||
console.log(this.$buyType);
|
||||
this.$buyType = 1;
|
||||
uni.navigateTo({
|
||||
url: '/pages/store/store'
|
||||
});
|
||||
},
|
||||
// 签到
|
||||
signin: function signin() {
|
||||
uni.navigateTo({
|
||||
|
||||
Reference in New Issue
Block a user