init
This commit is contained in:
33
unpackage/dist/dev/mp-weixin/api/config.js
vendored
Normal file
33
unpackage/dist/dev/mp-weixin/api/config.js
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
const api_request = require("./request.js");
|
||||
function fetchGetConfig() {
|
||||
return api_request.request({
|
||||
url: "/config/get"
|
||||
// id : number
|
||||
});
|
||||
}
|
||||
function fetchSetConfig(data) {
|
||||
return api_request.request({
|
||||
url: "/config/set",
|
||||
data,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
function fetchSetPriceRules(data) {
|
||||
return api_request.request({
|
||||
url: "/config/setPriceRules",
|
||||
data,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
function fetchGetPriceRules() {
|
||||
return api_request.request({
|
||||
url: "/config/getPriceRules"
|
||||
// id : number
|
||||
});
|
||||
}
|
||||
exports.fetchGetConfig = fetchGetConfig;
|
||||
exports.fetchGetPriceRules = fetchGetPriceRules;
|
||||
exports.fetchSetConfig = fetchSetConfig;
|
||||
exports.fetchSetPriceRules = fetchSetPriceRules;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/config.js.map
|
||||
51
unpackage/dist/dev/mp-weixin/api/goods.js
vendored
Normal file
51
unpackage/dist/dev/mp-weixin/api/goods.js
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
"use strict";
|
||||
const api_request = require("./request.js");
|
||||
function fetchGoodsEdit(form) {
|
||||
return api_request.request({
|
||||
url: "/goods/edit",
|
||||
data: form,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
function fetchGoodsDetail(id) {
|
||||
return api_request.request({
|
||||
url: "/goods/detail",
|
||||
data: { goods_id: id }
|
||||
});
|
||||
}
|
||||
function fetchGoodsAdd(form) {
|
||||
return api_request.request({
|
||||
url: "/goods/add",
|
||||
data: form,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
function fetchFilterParmas(is_origin = 0) {
|
||||
return api_request.request({
|
||||
url: "/goods/filterParams",
|
||||
data: {
|
||||
is_origin
|
||||
}
|
||||
});
|
||||
}
|
||||
function fetchSysGoodsList(data) {
|
||||
return api_request.request({
|
||||
url: "/goods/list",
|
||||
data,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
function fetchGoodsList(data) {
|
||||
return api_request.request({
|
||||
url: "/goods/lists",
|
||||
data,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
exports.fetchFilterParmas = fetchFilterParmas;
|
||||
exports.fetchGoodsAdd = fetchGoodsAdd;
|
||||
exports.fetchGoodsDetail = fetchGoodsDetail;
|
||||
exports.fetchGoodsEdit = fetchGoodsEdit;
|
||||
exports.fetchGoodsList = fetchGoodsList;
|
||||
exports.fetchSysGoodsList = fetchSysGoodsList;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/goods.js.map
|
||||
34
unpackage/dist/dev/mp-weixin/api/house_goods.js
vendored
Normal file
34
unpackage/dist/dev/mp-weixin/api/house_goods.js
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
require("../common/vendor.js");
|
||||
const api_house_request = require("./house_request.js");
|
||||
function houseFetchFilterParmas(is_origin = 0) {
|
||||
return api_house_request.houseRequest({
|
||||
url: "/store.goods/filterParams",
|
||||
data: {
|
||||
is_origin
|
||||
}
|
||||
});
|
||||
}
|
||||
function houseFetchGoodsList(filter) {
|
||||
return api_house_request.houseRequest({
|
||||
url: "/store.goods/lists",
|
||||
data: filter,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
function houseFetchGoodsDetail(id) {
|
||||
return api_house_request.houseRequest({
|
||||
url: "/store.goods/detail",
|
||||
data: { id }
|
||||
});
|
||||
}
|
||||
function houseFetchCartGoodsIds() {
|
||||
return api_house_request.houseRequest({
|
||||
url: "/store.goods/cartGoodsIds"
|
||||
});
|
||||
}
|
||||
exports.houseFetchCartGoodsIds = houseFetchCartGoodsIds;
|
||||
exports.houseFetchFilterParmas = houseFetchFilterParmas;
|
||||
exports.houseFetchGoodsDetail = houseFetchGoodsDetail;
|
||||
exports.houseFetchGoodsList = houseFetchGoodsList;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/house_goods.js.map
|
||||
67
unpackage/dist/dev/mp-weixin/api/house_order.js
vendored
Normal file
67
unpackage/dist/dev/mp-weixin/api/house_order.js
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
const config = require("../config.js");
|
||||
const api_house_request = require("./house_request.js");
|
||||
function houseFetchUpdateAddress(form) {
|
||||
const defaultParams = {
|
||||
agent_id: config.config.wxapp_id,
|
||||
address: {}
|
||||
};
|
||||
common_vendor.index.__f__("log", "at api/house_order.ts:12", defaultParams);
|
||||
common_vendor.index.__f__("log", "at api/house_order.ts:13", form);
|
||||
const requestParams = {
|
||||
...defaultParams,
|
||||
...form
|
||||
};
|
||||
return api_house_request.houseRequest({
|
||||
url: "/store.api/updateAddress",
|
||||
data: requestParams,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
function houseFetchCheckGoods(form) {
|
||||
const defaultParams = {
|
||||
agent_id: config.config.wxapp_id,
|
||||
goods_id: 0
|
||||
};
|
||||
common_vendor.index.__f__("log", "at api/house_order.ts:33", defaultParams);
|
||||
common_vendor.index.__f__("log", "at api/house_order.ts:34", form);
|
||||
const requestParams = {
|
||||
...defaultParams,
|
||||
...form
|
||||
};
|
||||
return api_house_request.houseRequest({
|
||||
url: "/store.api/checkGoods",
|
||||
data: requestParams,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
function houseFetchGoodsPreview(form) {
|
||||
const defaultParams = {
|
||||
agent_id: config.config.wxapp_id,
|
||||
goods_id: 0
|
||||
};
|
||||
common_vendor.index.__f__("log", "at api/house_order.ts:54", defaultParams);
|
||||
common_vendor.index.__f__("log", "at api/house_order.ts:55", form);
|
||||
const requestParams = {
|
||||
...defaultParams,
|
||||
...form
|
||||
};
|
||||
return api_house_request.houseRequest({
|
||||
url: "/store.api/preview",
|
||||
data: requestParams,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
function fetchOrderbuyNow(data) {
|
||||
return api_house_request.houseRequest({
|
||||
url: "/order/buyNow",
|
||||
data,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
exports.fetchOrderbuyNow = fetchOrderbuyNow;
|
||||
exports.houseFetchCheckGoods = houseFetchCheckGoods;
|
||||
exports.houseFetchGoodsPreview = houseFetchGoodsPreview;
|
||||
exports.houseFetchUpdateAddress = houseFetchUpdateAddress;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/house_order.js.map
|
||||
51
unpackage/dist/dev/mp-weixin/api/house_request.js
vendored
Normal file
51
unpackage/dist/dev/mp-weixin/api/house_request.js
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
const config = require("../config.js");
|
||||
const utils_helper = require("../utils/helper.js");
|
||||
const houseRequest = (options) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
common_vendor.index.request({
|
||||
// 拼接完整请求URL(基础URL + 路径 + 固定参数)
|
||||
url: config.config.house_api_base_url + options.url + "&wxapp_id=10001&token=" + common_vendor.index.getStorageSync("token"),
|
||||
method: options.method || "GET",
|
||||
// 默认GET方法
|
||||
data: options.data || options.params || {},
|
||||
// 兼容data/params传参
|
||||
dataType: options.dataType || "json",
|
||||
// 默认json格式
|
||||
responseType: options.responseType || "text",
|
||||
// 默认text类型
|
||||
// 请求成功回调
|
||||
success(res) {
|
||||
const ret = res.data;
|
||||
switch (ret.code) {
|
||||
case -1:
|
||||
utils_helper.goToLoginPage();
|
||||
break;
|
||||
case 1:
|
||||
resolve(ret.data);
|
||||
break;
|
||||
case 0:
|
||||
common_vendor.index.showToast({
|
||||
title: ret.msg || "操作失败",
|
||||
// 显示错误信息
|
||||
icon: "none"
|
||||
// 不显示图标
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 请求失败回调
|
||||
fail(err) {
|
||||
common_vendor.index.$emit("z-paging-error-emit");
|
||||
reject(err);
|
||||
common_vendor.index.showToast({
|
||||
title: "网络请求失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
exports.houseRequest = houseRequest;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/house_request.js.map
|
||||
3
unpackage/dist/dev/mp-weixin/api/index.js
vendored
Normal file
3
unpackage/dist/dev/mp-weixin/api/index.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("../common/vendor.js");
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/index.js.map
|
||||
80
unpackage/dist/dev/mp-weixin/api/order.js
vendored
Normal file
80
unpackage/dist/dev/mp-weixin/api/order.js
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
const api_request = require("./request.js");
|
||||
function fetchOrderPreview(form) {
|
||||
return api_request.request({
|
||||
url: "/order/preview",
|
||||
data: form,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
function fetchOrderbuyNow(data) {
|
||||
return api_request.request({
|
||||
url: "/order/buyNow",
|
||||
data,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
function fetchOrderDetail(id) {
|
||||
return api_request.request({
|
||||
url: "/order/detail",
|
||||
data: { id }
|
||||
});
|
||||
}
|
||||
function fetchOrderTotalCount() {
|
||||
return api_request.request({
|
||||
url: "/order/totalCount"
|
||||
});
|
||||
}
|
||||
function fetchOrderList(params = {}) {
|
||||
const defaultParams = {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
status: "all",
|
||||
goods_no: ""
|
||||
};
|
||||
const requestParams = {
|
||||
...defaultParams,
|
||||
...params
|
||||
};
|
||||
return api_request.request({
|
||||
url: "/order/getList",
|
||||
method: "GET",
|
||||
// 或 'POST' 根据实际需求
|
||||
data: requestParams
|
||||
});
|
||||
}
|
||||
function fetchCancelOrder(id) {
|
||||
return api_request.request({
|
||||
url: "/order/cancel",
|
||||
data: { id }
|
||||
});
|
||||
}
|
||||
function fetchPayOrder(id) {
|
||||
return api_request.request({
|
||||
url: "/order/paid",
|
||||
data: { id }
|
||||
});
|
||||
}
|
||||
function fetchDeliveryOrder(form) {
|
||||
return api_request.request({
|
||||
url: "/order/delivery",
|
||||
data: form,
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
function fetchReceiptOrder(id) {
|
||||
return api_request.request({
|
||||
url: "/order/receipt",
|
||||
data: { id }
|
||||
});
|
||||
}
|
||||
exports.fetchCancelOrder = fetchCancelOrder;
|
||||
exports.fetchDeliveryOrder = fetchDeliveryOrder;
|
||||
exports.fetchOrderDetail = fetchOrderDetail;
|
||||
exports.fetchOrderList = fetchOrderList;
|
||||
exports.fetchOrderPreview = fetchOrderPreview;
|
||||
exports.fetchOrderTotalCount = fetchOrderTotalCount;
|
||||
exports.fetchOrderbuyNow = fetchOrderbuyNow;
|
||||
exports.fetchPayOrder = fetchPayOrder;
|
||||
exports.fetchReceiptOrder = fetchReceiptOrder;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/order.js.map
|
||||
55
unpackage/dist/dev/mp-weixin/api/request.js
vendored
Normal file
55
unpackage/dist/dev/mp-weixin/api/request.js
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../common/vendor.js");
|
||||
const config = require("../config.js");
|
||||
const utils_helper = require("../utils/helper.js");
|
||||
const getUploadImageUrl = () => {
|
||||
return config.config.api_base_url + "/upload/image&wxapp_id=" + config.config.wxapp_id + "&token=" + common_vendor.index.getStorageSync("token");
|
||||
};
|
||||
const request = (options) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
common_vendor.index.request({
|
||||
// 拼接完整请求URL(基础URL + 路径 + 固定参数)
|
||||
url: config.config.api_base_url + options.url + "&wxapp_id=" + config.config.wxapp_id + "&token=" + common_vendor.index.getStorageSync("token"),
|
||||
method: options.method || "GET",
|
||||
// 默认GET方法
|
||||
data: options.data || options.params || {},
|
||||
// 兼容data/params传参
|
||||
dataType: options.dataType || "json",
|
||||
// 默认json格式
|
||||
responseType: options.responseType || "text",
|
||||
// 默认text类型
|
||||
// 请求成功回调
|
||||
success(res) {
|
||||
const ret = res.data;
|
||||
switch (ret.code) {
|
||||
case -1:
|
||||
utils_helper.goToLoginPage();
|
||||
break;
|
||||
case 1:
|
||||
resolve(ret.data);
|
||||
break;
|
||||
case 0:
|
||||
common_vendor.index.showToast({
|
||||
title: ret.msg || "操作失败",
|
||||
// 显示错误信息
|
||||
icon: "none"
|
||||
// 不显示图标
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 请求失败回调
|
||||
fail(err) {
|
||||
common_vendor.index.$emit("z-paging-error-emit");
|
||||
reject(err);
|
||||
common_vendor.index.showToast({
|
||||
title: "网络请求失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
exports.getUploadImageUrl = getUploadImageUrl;
|
||||
exports.request = request;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/request.js.map
|
||||
29
unpackage/dist/dev/mp-weixin/api/user.js
vendored
Normal file
29
unpackage/dist/dev/mp-weixin/api/user.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
const api_request = require("./request.js");
|
||||
function login(code, user_info) {
|
||||
return api_request.request({
|
||||
url: "/user/login",
|
||||
data: {
|
||||
code,
|
||||
user_info
|
||||
},
|
||||
method: "POST"
|
||||
});
|
||||
}
|
||||
function fetchUserInfo() {
|
||||
return api_request.request({
|
||||
url: "/user/info"
|
||||
});
|
||||
}
|
||||
function fetchUserPhone(code) {
|
||||
return api_request.request({
|
||||
url: "/store.user/bindPhone",
|
||||
data: {
|
||||
code
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.fetchUserInfo = fetchUserInfo;
|
||||
exports.fetchUserPhone = fetchUserPhone;
|
||||
exports.login = login;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/user.js.map
|
||||
43
unpackage/dist/dev/mp-weixin/app.js
vendored
Normal file
43
unpackage/dist/dev/mp-weixin/app.js
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
||||
const common_vendor = require("./common/vendor.js");
|
||||
if (!Math) {
|
||||
"./pages/index/index.js";
|
||||
"./pages/mine/index.js";
|
||||
"./pages/mall/detail.js";
|
||||
"./pages/mall/houseDetail.js";
|
||||
"./pages/order/preview.js";
|
||||
"./pages/order/housePreview.js";
|
||||
"./pages/order/index.js";
|
||||
"./pages/order/detail.js";
|
||||
"./pages/login/index.js";
|
||||
"./pages/login/phoneAuthorization.js";
|
||||
"./pages/config/store.js";
|
||||
"./pages/config/price.js";
|
||||
"./pages/config/goodsList.js";
|
||||
"./pages/config/goodsAdd.js";
|
||||
"./pages/config/goodsEdit.js";
|
||||
"./pages/config/goodsDetail.js";
|
||||
"./pages/config/shopOrder/index.js";
|
||||
"./pages/config/shopOrder/detail.js";
|
||||
}
|
||||
const _sfc_main = {
|
||||
onLaunch: function() {
|
||||
common_vendor.index.__f__("log", "at App.vue:11", "App Launch");
|
||||
},
|
||||
onShow: function() {
|
||||
common_vendor.index.__f__("log", "at App.vue:15", "App Show");
|
||||
},
|
||||
onHide: function() {
|
||||
common_vendor.index.__f__("log", "at App.vue:18", "App Hide");
|
||||
}
|
||||
};
|
||||
function createApp() {
|
||||
const app = common_vendor.createSSRApp(_sfc_main);
|
||||
return {
|
||||
app
|
||||
};
|
||||
}
|
||||
createApp().app.mount("#app");
|
||||
exports.createApp = createApp;
|
||||
//# sourceMappingURL=../.sourcemap/mp-weixin/app.js.map
|
||||
57
unpackage/dist/dev/mp-weixin/app.json
vendored
Normal file
57
unpackage/dist/dev/mp-weixin/app.json
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/mine/index",
|
||||
"pages/mall/detail",
|
||||
"pages/mall/houseDetail",
|
||||
"pages/order/preview",
|
||||
"pages/order/housePreview",
|
||||
"pages/order/index",
|
||||
"pages/order/detail",
|
||||
"pages/login/index",
|
||||
"pages/login/phoneAuthorization",
|
||||
"pages/config/store",
|
||||
"pages/config/price",
|
||||
"pages/config/goodsList",
|
||||
"pages/config/goodsAdd",
|
||||
"pages/config/goodsEdit",
|
||||
"pages/config/goodsDetail",
|
||||
"pages/config/shopOrder/index",
|
||||
"pages/config/shopOrder/detail"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "远阳数码",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"backgroundTextStyle": "dark",
|
||||
"backgroundColor": "#F2F3F5",
|
||||
"backgroundColorBottom": "#F2F3F5",
|
||||
"backgroundColorTop": "#F2F3F5",
|
||||
"onReachBottomDistance": 50
|
||||
},
|
||||
"tabBar": {
|
||||
"custom": false,
|
||||
"color": "#000000",
|
||||
"selectedColor": "#8d7bfb",
|
||||
"borderStyle": "black",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/tabbar/home.png",
|
||||
"selectedIconPath": "static/tabbar/home-active.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/mine/index",
|
||||
"iconPath": "static/tabbar/user.png",
|
||||
"selectedIconPath": "/static/tabbar/user-active.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
},
|
||||
"requiredPrivateInfos": [
|
||||
"chooseAddress"
|
||||
],
|
||||
"permission": {},
|
||||
"usingComponents": {}
|
||||
}
|
||||
1086
unpackage/dist/dev/mp-weixin/app.wxss
vendored
Normal file
1086
unpackage/dist/dev/mp-weixin/app.wxss
vendored
Normal file
File diff suppressed because one or more lines are too long
8421
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
Normal file
8421
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
43
unpackage/dist/dev/mp-weixin/components/index-custom-navigationbar/index.js
vendored
Normal file
43
unpackage/dist/dev/mp-weixin/components/index-custom-navigationbar/index.js
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_animate2 = common_vendor.resolveComponent("nut-animate");
|
||||
_easycom_nut_animate2();
|
||||
}
|
||||
const _easycom_nut_animate = () => "../../uni_modules/nutui-uni/components/animate/animate.js";
|
||||
if (!Math) {
|
||||
_easycom_nut_animate();
|
||||
}
|
||||
const navbarSearchBoxHeight = 0;
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
props: {
|
||||
statusBarHeight: Number,
|
||||
windowWidth: Number,
|
||||
navbarHeight: Number,
|
||||
title: String,
|
||||
desc: String
|
||||
// onIndexPageSearch:Function,
|
||||
// onIndexPageClear:Function
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: props.statusBarHeight + "px",
|
||||
b: common_vendor.t(__props.title),
|
||||
c: common_vendor.t(__props.desc),
|
||||
d: common_vendor.p({
|
||||
type: "flicker",
|
||||
loop: true
|
||||
}),
|
||||
e: props.navbarHeight + "px",
|
||||
f: props.windowWidth + "px",
|
||||
g: __props.statusBarHeight + __props.navbarHeight + navbarSearchBoxHeight + "px"
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f853d1cb"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/components/index-custom-navigationbar/index.js.map
|
||||
6
unpackage/dist/dev/mp-weixin/components/index-custom-navigationbar/index.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/components/index-custom-navigationbar/index.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"nut-animate": "../../uni_modules/nutui-uni/components/animate/animate"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/components/index-custom-navigationbar/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/components/index-custom-navigationbar/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="navbar data-v-f853d1cb"><view class="navbar-fixed data-v-f853d1cb"><view class="data-v-f853d1cb" style="{{'height:' + a}}"></view><view class="navbar-content data-v-f853d1cb" style="{{'height:' + e + ';' + ('width:' + f)}}"><view class="header data-v-f853d1cb"><view class="company-name data-v-f853d1cb">{{b}}</view><nut-animate wx:if="{{d}}" class="data-v-f853d1cb" u-s="{{['d']}}" u-i="f853d1cb-0" bind:__l="__l" u-p="{{d}}"><view class="description data-v-f853d1cb">{{c}}</view></nut-animate></view></view></view><view class="data-v-f853d1cb" style="{{'height:' + g}}"></view></view>
|
||||
88
unpackage/dist/dev/mp-weixin/components/index-custom-navigationbar/index.wxss
vendored
Normal file
88
unpackage/dist/dev/mp-weixin/components/index-custom-navigationbar/index.wxss
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.navbar-fixed.data-v-f853d1cb {
|
||||
/* // 固定定位 */
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
width: 100%;
|
||||
/* background: linear-gradient(90deg, #b79dff, #f2a4ff); */
|
||||
/* 渐变背景 */
|
||||
background-image: linear-gradient(30deg, #e96443, #c64dff);
|
||||
background-position: 0 0;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% auto;
|
||||
opacity: 1;
|
||||
/* 确保背景不透明 */
|
||||
}
|
||||
.navbar-content.data-v-f853d1cb {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
/* // 水平居中 */
|
||||
justify-content: center;
|
||||
/* // 垂直居中 */
|
||||
/* // align-items: center; */
|
||||
padding: 0 30rpx;
|
||||
/* // 盒内显示 (父元素和子元素宽度都是100%,但是父元素加了左右内填充,会导致子元素不在父元素内) */
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.company-name.data-v-f853d1cb {
|
||||
font-family: Akrobat ExtraBold !important;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.description.data-v-f853d1cb {
|
||||
font-family: Akrobat ExtraBold !important;
|
||||
color: #fff;
|
||||
font-size: 16rpx;
|
||||
}
|
||||
30
unpackage/dist/dev/mp-weixin/config.js
vendored
Normal file
30
unpackage/dist/dev/mp-weixin/config.js
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
const config = {
|
||||
// 系统名称
|
||||
name: "云淘机",
|
||||
/**
|
||||
* 后端api地址 (必填; 斜杠/结尾; 请确保能访问)
|
||||
* 例如: https://www.你的域名.com/index.php?s=/api/
|
||||
*/
|
||||
api_base_url: "https://phone.19year.cn/index.php?s=/api",
|
||||
/**
|
||||
* 仓库地址
|
||||
* 例如: https://www.你的域名.com/index.php?s=/api/
|
||||
*/
|
||||
house_api_base_url: "https://newtel.19year.cn/index.php?s=/api",
|
||||
/**
|
||||
* 是否启用商城设置缓存
|
||||
* 将减少用户端重复请求; 正式运营时请设为true, 开启后商城设置同步前端需10分钟缓存
|
||||
*/
|
||||
enabledSettingCache: true,
|
||||
/**
|
||||
* 分销编号
|
||||
*/
|
||||
wxapp_id: 10001,
|
||||
/**
|
||||
* 代理商ID
|
||||
*/
|
||||
agent_no: 10000001
|
||||
};
|
||||
exports.config = config;
|
||||
//# sourceMappingURL=../.sourcemap/mp-weixin/config.js.map
|
||||
47
unpackage/dist/dev/mp-weixin/form.js
vendored
Normal file
47
unpackage/dist/dev/mp-weixin/form.js
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
const common_vendor = require("./common/vendor.js");
|
||||
const uni_modules_nutuiUni_components__hooks_useInject = require("./uni_modules/nutui-uni/components/_hooks/useInject.js");
|
||||
require("./uni_modules/nutui-uni/components/_utils/env.js");
|
||||
const uni_modules_nutuiUni_components__utils_props = require("./uni_modules/nutui-uni/components/_utils/props.js");
|
||||
const FORM_KEY = Symbol("Form");
|
||||
const formProps = {
|
||||
...uni_modules_nutuiUni_components__utils_props.commonProps,
|
||||
/**
|
||||
* @description 表单数据对象(使用表单校验时,_必填_)
|
||||
*/
|
||||
modelValue: uni_modules_nutuiUni_components__utils_props.makeObjectProp({}),
|
||||
/**
|
||||
* @description 统一配置每个 `FormItem` 的 `rules`
|
||||
*/
|
||||
rules: uni_modules_nutuiUni_components__utils_props.makeObjectProp({}),
|
||||
/**
|
||||
* @description 禁用表单下的所有数据录入组件
|
||||
*/
|
||||
disabled: Boolean,
|
||||
/**
|
||||
* @description 表单项 label 的位置
|
||||
*/
|
||||
labelPosition: uni_modules_nutuiUni_components__utils_props.makeStringProp("left"),
|
||||
/**
|
||||
* @description 必填表单项 label 的红色星标位置
|
||||
*/
|
||||
starPosition: uni_modules_nutuiUni_components__utils_props.makeStringProp("left")
|
||||
};
|
||||
const formEmits = {
|
||||
validate: (msg) => msg instanceof Object
|
||||
};
|
||||
function useFormDisabled(disabled) {
|
||||
const { parent } = uni_modules_nutuiUni_components__hooks_useInject.useInject(FORM_KEY);
|
||||
return common_vendor.computed(() => {
|
||||
if (disabled.value != null)
|
||||
return disabled.value;
|
||||
if ((parent == null ? void 0 : parent.props.disabled) != null)
|
||||
return parent.props.disabled;
|
||||
return false;
|
||||
});
|
||||
}
|
||||
exports.FORM_KEY = FORM_KEY;
|
||||
exports.formEmits = formEmits;
|
||||
exports.formProps = formProps;
|
||||
exports.useFormDisabled = useFormDisabled;
|
||||
//# sourceMappingURL=../.sourcemap/mp-weixin/form.js.map
|
||||
66
unpackage/dist/dev/mp-weixin/menu.js
vendored
Normal file
66
unpackage/dist/dev/mp-weixin/menu.js
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
"use strict";
|
||||
require("./common/vendor.js");
|
||||
require("./uni_modules/nutui-uni/components/_utils/env.js");
|
||||
const uni_modules_nutuiUni_components__utils_props = require("./uni_modules/nutui-uni/components/_utils/props.js");
|
||||
const MENU_KEY = Symbol("nut-menu");
|
||||
const menuProps = {
|
||||
...uni_modules_nutuiUni_components__utils_props.commonProps,
|
||||
/**
|
||||
* @description 选项的选中态图标颜色
|
||||
*/
|
||||
activeColor: uni_modules_nutuiUni_components__utils_props.makeStringProp(""),
|
||||
/**
|
||||
* @description 是否显示遮罩
|
||||
*/
|
||||
overlay: uni_modules_nutuiUni_components__utils_props.truthProp,
|
||||
/**
|
||||
* @description 是否锁定滚动
|
||||
*/
|
||||
lockScroll: uni_modules_nutuiUni_components__utils_props.truthProp,
|
||||
/**
|
||||
* @description 动画时长
|
||||
*/
|
||||
duration: {
|
||||
type: [Number, String],
|
||||
default: 300
|
||||
},
|
||||
/**
|
||||
* @description 标题图标
|
||||
*/
|
||||
titleIcon: String,
|
||||
/**
|
||||
* @description 是否在点击遮罩层后关闭菜单
|
||||
*/
|
||||
closeOnClickOverlay: uni_modules_nutuiUni_components__utils_props.truthProp,
|
||||
/**
|
||||
* @description 展开方向
|
||||
*/
|
||||
direction: uni_modules_nutuiUni_components__utils_props.makeStringProp("down"),
|
||||
/**
|
||||
* @description 滚动后是否固定,可设置固定位置(需要配合 `scrollTop` 使用)
|
||||
*/
|
||||
scrollFixed: {
|
||||
type: [Boolean, String, Number],
|
||||
default: false
|
||||
},
|
||||
/**
|
||||
* @description 页面的滚动距离,通过 `onPageScroll` 获取
|
||||
*/
|
||||
scrollTop: uni_modules_nutuiUni_components__utils_props.makeNumberProp(0),
|
||||
/**
|
||||
* @description 标题样式类名
|
||||
*/
|
||||
titleClass: [String],
|
||||
/**
|
||||
* @description 收起的图标
|
||||
*/
|
||||
upIcon: uni_modules_nutuiUni_components__utils_props.makeStringProp("rect-up"),
|
||||
/**
|
||||
* @description 展开时的图标
|
||||
*/
|
||||
downIcon: uni_modules_nutuiUni_components__utils_props.makeStringProp("rect-down"),
|
||||
offset: Number
|
||||
};
|
||||
exports.MENU_KEY = MENU_KEY;
|
||||
exports.menuProps = menuProps;
|
||||
//# sourceMappingURL=../.sourcemap/mp-weixin/menu.js.map
|
||||
291
unpackage/dist/dev/mp-weixin/pages/config/goodsAdd.js
vendored
Normal file
291
unpackage/dist/dev/mp-weixin/pages/config/goodsAdd.js
vendored
Normal file
@@ -0,0 +1,291 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_goods = require("../../api/goods.js");
|
||||
const api_request = require("../../api/request.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_input2 = common_vendor.resolveComponent("nut-input");
|
||||
const _easycom_nut_form_item2 = common_vendor.resolveComponent("nut-form-item");
|
||||
const _easycom_nut_icon2 = common_vendor.resolveComponent("nut-icon");
|
||||
const _easycom_nut_textarea2 = common_vendor.resolveComponent("nut-textarea");
|
||||
const _easycom_nut_radio2 = common_vendor.resolveComponent("nut-radio");
|
||||
const _easycom_nut_radio_group2 = common_vendor.resolveComponent("nut-radio-group");
|
||||
const _easycom_shmily_drag_image2 = common_vendor.resolveComponent("shmily-drag-image");
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
const _easycom_nut_form2 = common_vendor.resolveComponent("nut-form");
|
||||
const _easycom_nut_picker2 = common_vendor.resolveComponent("nut-picker");
|
||||
const _easycom_nut_popup2 = common_vendor.resolveComponent("nut-popup");
|
||||
const _easycom_nut_cascader2 = common_vendor.resolveComponent("nut-cascader");
|
||||
(_easycom_nut_input2 + _easycom_nut_form_item2 + _easycom_nut_icon2 + _easycom_nut_textarea2 + _easycom_nut_radio2 + _easycom_nut_radio_group2 + _easycom_shmily_drag_image2 + _easycom_nut_button2 + _easycom_nut_form2 + _easycom_nut_picker2 + _easycom_nut_popup2 + _easycom_nut_cascader2)();
|
||||
}
|
||||
const _easycom_nut_input = () => "../../uni_modules/nutui-uni/components/input/input.js";
|
||||
const _easycom_nut_form_item = () => "../../uni_modules/nutui-uni/components/formitem/formitem.js";
|
||||
const _easycom_nut_icon = () => "../../uni_modules/nutui-uni/components/icon/icon.js";
|
||||
const _easycom_nut_textarea = () => "../../uni_modules/nutui-uni/components/textarea/textarea.js";
|
||||
const _easycom_nut_radio = () => "../../uni_modules/nutui-uni/components/radio/radio.js";
|
||||
const _easycom_nut_radio_group = () => "../../uni_modules/nutui-uni/components/radiogroup/radiogroup.js";
|
||||
const _easycom_shmily_drag_image = () => "../../uni_modules/shmily-drag-image/components/shmily-drag-image/shmily-drag-image.js";
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
const _easycom_nut_form = () => "../../uni_modules/nutui-uni/components/form/form.js";
|
||||
const _easycom_nut_picker = () => "../../uni_modules/nutui-uni/components/picker/picker.js";
|
||||
const _easycom_nut_popup = () => "../../uni_modules/nutui-uni/components/popup/popup.js";
|
||||
const _easycom_nut_cascader = () => "../../uni_modules/nutui-uni/components/cascader/cascader.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_input + _easycom_nut_form_item + _easycom_nut_icon + _easycom_nut_textarea + _easycom_nut_radio + _easycom_nut_radio_group + _easycom_shmily_drag_image + _easycom_nut_button + _easycom_nut_form + _easycom_nut_picker + _easycom_nut_popup + _easycom_nut_cascader)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "goodsAdd",
|
||||
setup(__props) {
|
||||
const onScan = () => {
|
||||
common_vendor.index.scanCode({
|
||||
onlyFromCamera: true,
|
||||
success: (res) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsAdd.vue:174", res);
|
||||
form.goods_no = res.result;
|
||||
},
|
||||
fail: () => {
|
||||
common_vendor.index.showToast({
|
||||
icon: "none",
|
||||
title: "扫码失败"
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const filter_params = common_vendor.reactive({});
|
||||
const show_product_cascader = common_vendor.ref(false);
|
||||
const show_degree_popup = common_vendor.ref(false);
|
||||
const popup_degree_val = common_vendor.ref([]);
|
||||
const cascader_product_val = common_vendor.ref([]);
|
||||
const form = common_vendor.reactive({
|
||||
// goods_id: 0,
|
||||
goods_name: "",
|
||||
goods_no: "",
|
||||
goods_price: "",
|
||||
goods_stock: "",
|
||||
content: "",
|
||||
details_content: "",
|
||||
status: "10",
|
||||
images: [],
|
||||
add_person: "",
|
||||
// disk: '未选择',
|
||||
degree_id: 0,
|
||||
degree_name: "未选择",
|
||||
type_id: 0,
|
||||
type_name: "未选择",
|
||||
brand_id: 0,
|
||||
brand_name: "未选择",
|
||||
product_id: 0,
|
||||
product_name: "未选择"
|
||||
// video_url: ''
|
||||
// goods_no: '',
|
||||
// goods_status: '10',
|
||||
// goods_sort: 0,
|
||||
});
|
||||
const onProductChange = (...args) => {
|
||||
};
|
||||
const onSubmit = () => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsAdd.vue:271", "form====>", form);
|
||||
api_goods.fetchGoodsAdd(form).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
icon: "none",
|
||||
title: "新增商品成功"
|
||||
});
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateBack({
|
||||
delta: 1
|
||||
// 返回上一页
|
||||
});
|
||||
}, 500);
|
||||
});
|
||||
};
|
||||
const onProcutPathChange = (args) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsAdd.vue:299", args);
|
||||
form.type_id = 0;
|
||||
form.type_name = "";
|
||||
form.brand_id = 0;
|
||||
form.brand_name = "";
|
||||
form.product_id = 0;
|
||||
form.product_name = "";
|
||||
if (args.length >= 1 && args[0] !== null) {
|
||||
form.type_id = args[0].value;
|
||||
form.type_name = args[0].text;
|
||||
}
|
||||
if (args.length >= 2 && args[1] !== null) {
|
||||
form.brand_id = args[1].value;
|
||||
form.brand_name = args[1].text;
|
||||
}
|
||||
if (args.length >= 3 && args[2] !== null) {
|
||||
form.product_id = args[2].value;
|
||||
form.product_name = args[2].text;
|
||||
}
|
||||
};
|
||||
const onConfirmDegree = () => {
|
||||
form.degree_id = popup_degree_val.value[0];
|
||||
filter_params.degree_list.forEach((item) => {
|
||||
if (item.degree_id === form.degree_id) {
|
||||
form.degree_name = item.degree_name;
|
||||
}
|
||||
});
|
||||
show_degree_popup.value = false;
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
api_goods.fetchFilterParmas(1).then((res) => {
|
||||
Object.assign(filter_params, res);
|
||||
filter_params.degree_list.unshift({
|
||||
degree_id: 0,
|
||||
degree_name: "未选择"
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsAdd.vue:348", "filter_params", filter_params);
|
||||
});
|
||||
});
|
||||
const addGoodsImg = () => {
|
||||
var _a;
|
||||
common_vendor.index.chooseImage({
|
||||
count: 9 - (((_a = form.image) == null ? void 0 : _a.length) || 0),
|
||||
sourceType: ["album", "camera"],
|
||||
success: (res) => {
|
||||
res.tempFiles.forEach((file) => {
|
||||
common_vendor.index.uploadFile({
|
||||
url: api_request.getUploadImageUrl(),
|
||||
filePath: file.path,
|
||||
name: "iFile",
|
||||
formData: {
|
||||
group_id: 1
|
||||
},
|
||||
success: (res2) => {
|
||||
let data = JSON.parse(res2.data).data;
|
||||
form.images.push({
|
||||
id: parseInt(data.file_id),
|
||||
file_path: data.file_path
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o(($event) => form.goods_name = $event),
|
||||
b: common_vendor.p({
|
||||
placeholder: "请输入名称",
|
||||
type: "text",
|
||||
modelValue: form.goods_name
|
||||
}),
|
||||
c: common_vendor.p({
|
||||
label: "名称"
|
||||
}),
|
||||
d: common_vendor.o(onScan),
|
||||
e: common_vendor.p({
|
||||
name: "scan2",
|
||||
size: "30",
|
||||
["custom-color"]: "#000000"
|
||||
}),
|
||||
f: common_vendor.o(($event) => form.goods_no = $event),
|
||||
g: common_vendor.p({
|
||||
placeholder: "请输入串号",
|
||||
type: "text",
|
||||
modelValue: form.goods_no
|
||||
}),
|
||||
h: common_vendor.p({
|
||||
label: "串号"
|
||||
}),
|
||||
i: common_vendor.o(($event) => form.goods_price = $event),
|
||||
j: common_vendor.p({
|
||||
placeholder: "请输入售价",
|
||||
type: "nubmer",
|
||||
modelValue: form.goods_price
|
||||
}),
|
||||
k: common_vendor.p({
|
||||
label: "售价"
|
||||
}),
|
||||
l: common_vendor.o(($event) => form.content = $event),
|
||||
m: common_vendor.p({
|
||||
autosize: true,
|
||||
placeholder: "请输入说明",
|
||||
type: "text",
|
||||
modelValue: form.content
|
||||
}),
|
||||
n: common_vendor.p({
|
||||
label: "说明"
|
||||
}),
|
||||
o: common_vendor.o(($event) => form.details_content = $event),
|
||||
p: common_vendor.p({
|
||||
autosize: true,
|
||||
placeholder: "请输入介绍",
|
||||
type: "text",
|
||||
modelValue: form.details_content
|
||||
}),
|
||||
q: common_vendor.p({
|
||||
label: "介绍"
|
||||
}),
|
||||
r: common_vendor.p({
|
||||
label: "10"
|
||||
}),
|
||||
s: common_vendor.p({
|
||||
label: "20"
|
||||
}),
|
||||
t: common_vendor.o(($event) => form.status = $event),
|
||||
v: common_vendor.p({
|
||||
direction: "horizontal",
|
||||
modelValue: form.status
|
||||
}),
|
||||
w: common_vendor.p({
|
||||
label: "状态"
|
||||
}),
|
||||
x: common_vendor.t(form.degree_name),
|
||||
y: common_vendor.o(($event) => show_degree_popup.value = true),
|
||||
z: common_vendor.t(form.type_name),
|
||||
A: common_vendor.t(form.brand_name),
|
||||
B: common_vendor.t(form.product_name),
|
||||
C: common_vendor.o(($event) => show_product_cascader.value = true),
|
||||
D: common_vendor.o(($event) => form.images = $event),
|
||||
E: common_vendor.p({
|
||||
number: 9,
|
||||
["add-image"]: addGoodsImg,
|
||||
keyName: "file_path",
|
||||
modelValue: form.images
|
||||
}),
|
||||
F: common_vendor.o(onSubmit),
|
||||
G: common_vendor.p({
|
||||
type: "primary",
|
||||
block: true
|
||||
}),
|
||||
H: common_vendor.o(onConfirmDegree),
|
||||
I: common_vendor.o(($event) => show_degree_popup.value = false),
|
||||
J: common_vendor.o(($event) => popup_degree_val.value = $event),
|
||||
K: common_vendor.p({
|
||||
columns: filter_params.degree_list,
|
||||
["field-names"]: {
|
||||
text: "degree_name",
|
||||
value: "degree_id"
|
||||
},
|
||||
title: "选择成色",
|
||||
modelValue: popup_degree_val.value
|
||||
}),
|
||||
L: common_vendor.o(($event) => show_degree_popup.value = $event),
|
||||
M: common_vendor.p({
|
||||
position: "bottom",
|
||||
["safe-area-inset-bottom"]: true,
|
||||
visible: show_degree_popup.value
|
||||
}),
|
||||
N: common_vendor.o(onProductChange),
|
||||
O: common_vendor.o(onProcutPathChange),
|
||||
P: common_vendor.o(($event) => show_product_cascader.value = $event),
|
||||
Q: common_vendor.o(($event) => cascader_product_val.value = $event),
|
||||
R: common_vendor.p({
|
||||
title: "机型选择",
|
||||
["text-key"]: "label",
|
||||
["value-key"]: "value",
|
||||
["title-ellipsis"]: false,
|
||||
["children-key"]: "children",
|
||||
options: filter_params.drop_down_options,
|
||||
visible: show_product_cascader.value,
|
||||
modelValue: cascader_product_val.value
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-262d0393"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/config/goodsAdd.js.map
|
||||
18
unpackage/dist/dev/mp-weixin/pages/config/goodsAdd.json
vendored
Normal file
18
unpackage/dist/dev/mp-weixin/pages/config/goodsAdd.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"navigationBarTitleText": "新增商品",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"nut-input": "../../uni_modules/nutui-uni/components/input/input",
|
||||
"nut-form-item": "../../uni_modules/nutui-uni/components/formitem/formitem",
|
||||
"nut-icon": "../../uni_modules/nutui-uni/components/icon/icon",
|
||||
"nut-textarea": "../../uni_modules/nutui-uni/components/textarea/textarea",
|
||||
"nut-radio": "../../uni_modules/nutui-uni/components/radio/radio",
|
||||
"nut-radio-group": "../../uni_modules/nutui-uni/components/radiogroup/radiogroup",
|
||||
"shmily-drag-image": "../../uni_modules/shmily-drag-image/components/shmily-drag-image/shmily-drag-image",
|
||||
"nut-button": "../../uni_modules/nutui-uni/components/button/button",
|
||||
"nut-form": "../../uni_modules/nutui-uni/components/form/form",
|
||||
"nut-picker": "../../uni_modules/nutui-uni/components/picker/picker",
|
||||
"nut-popup": "../../uni_modules/nutui-uni/components/popup/popup",
|
||||
"nut-cascader": "../../uni_modules/nutui-uni/components/cascader/cascader"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/config/goodsAdd.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/config/goodsAdd.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="page-content data-v-262d0393"><view class="data-v-262d0393" style="padding:20rpx"><nut-form class="data-v-262d0393" u-s="{{['d']}}" u-i="262d0393-0" bind:__l="__l"><nut-form-item wx:if="{{c}}" class="data-v-262d0393" u-s="{{['d']}}" u-i="262d0393-1,262d0393-0" bind:__l="__l" u-p="{{c}}"><nut-input wx:if="{{b}}" class="nut-input-text data-v-262d0393" u-i="262d0393-2,262d0393-1" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}"/></nut-form-item><nut-form-item wx:if="{{h}}" class="data-v-262d0393" u-s="{{['d']}}" u-i="262d0393-3,262d0393-0" bind:__l="__l" u-p="{{h}}"><nut-input wx:if="{{g}}" u-s="{{['right']}}" class="nut-input-text data-v-262d0393" u-i="262d0393-4,262d0393-3" bind:__l="__l" bindupdateModelValue="{{f}}" u-p="{{g}}"><nut-icon class="data-v-262d0393" bindclick="{{d}}" u-i="262d0393-5,262d0393-4" bind:__l="__l" u-p="{{e}}" slot="right"/></nut-input></nut-form-item><nut-form-item wx:if="{{k}}" class="data-v-262d0393" u-s="{{['d']}}" u-i="262d0393-6,262d0393-0" bind:__l="__l" u-p="{{k}}"><nut-input wx:if="{{j}}" class="nut-input-text data-v-262d0393" u-i="262d0393-7,262d0393-6" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"/></nut-form-item><nut-form-item wx:if="{{n}}" class="data-v-262d0393" u-s="{{['d']}}" u-i="262d0393-8,262d0393-0" bind:__l="__l" u-p="{{n}}"><nut-textarea wx:if="{{m}}" class="data-v-262d0393" u-i="262d0393-9,262d0393-8" bind:__l="__l" bindupdateModelValue="{{l}}" u-p="{{m}}"/></nut-form-item><nut-form-item wx:if="{{q}}" class="data-v-262d0393" u-s="{{['d']}}" u-i="262d0393-10,262d0393-0" bind:__l="__l" u-p="{{q}}"><nut-textarea wx:if="{{p}}" class="data-v-262d0393" u-i="262d0393-11,262d0393-10" bind:__l="__l" bindupdateModelValue="{{o}}" u-p="{{p}}"/></nut-form-item><nut-form-item wx:if="{{w}}" class="data-v-262d0393" u-s="{{['d']}}" u-i="262d0393-12,262d0393-0" bind:__l="__l" u-p="{{w}}"><nut-radio-group wx:if="{{v}}" class="data-v-262d0393" u-s="{{['d']}}" u-i="262d0393-13,262d0393-12" bind:__l="__l" bindupdateModelValue="{{t}}" u-p="{{v}}"><nut-radio wx:if="{{r}}" class="data-v-262d0393" u-s="{{['d']}}" u-i="262d0393-14,262d0393-13" bind:__l="__l" u-p="{{r}}">下架</nut-radio><nut-radio wx:if="{{s}}" class="data-v-262d0393" u-s="{{['d']}}" u-i="262d0393-15,262d0393-13" bind:__l="__l" u-p="{{s}}">上架</nut-radio></nut-radio-group></nut-form-item><nut-form-item class="data-v-262d0393" u-s="{{['label','d']}}" u-i="262d0393-16,262d0393-0" bind:__l="__l"><view slot="label">成色</view><view class="data-v-262d0393" style="color:black" bindtap="{{y}}"><text class="data-v-262d0393">{{x}}</text></view></nut-form-item><nut-form-item class="data-v-262d0393" u-s="{{['label','d']}}" u-i="262d0393-17,262d0393-0" bind:__l="__l"><view slot="label">机型</view><view class="data-v-262d0393" style="color:black" bindtap="{{C}}"><text class="data-v-262d0393">{{z}},{{A}},{{B}}</text></view></nut-form-item><nut-form-item class="data-v-262d0393" u-s="{{['label','d']}}" u-i="262d0393-18,262d0393-0" bind:__l="__l"><view slot="label">商品图片</view><shmily-drag-image class="data-v-262d0393" u-i="262d0393-19,262d0393-18" bind:__l="__l" bindupdateModelValue="{{D}}" u-p="{{E}}"></shmily-drag-image></nut-form-item><view class="data-v-262d0393" style="align-items:center;text-align:center;padding:20rpx 60rpx"><nut-button wx:if="{{G}}" class="data-v-262d0393" u-s="{{['d']}}" bindclick="{{F}}" u-i="262d0393-20,262d0393-0" bind:__l="__l" u-p="{{G}}"> 新增商品 </nut-button></view></nut-form></view><nut-popup wx:if="{{M}}" class="data-v-262d0393" u-s="{{['d']}}" u-i="262d0393-21" bind:__l="__l" bindupdateVisible="{{L}}" u-p="{{M}}"><nut-picker wx:if="{{K}}" class="data-v-262d0393" bindconfirm="{{H}}" bindcancel="{{I}}" u-i="262d0393-22,262d0393-21" bind:__l="__l" bindupdateModelValue="{{J}}" u-p="{{K}}"></nut-picker></nut-popup><nut-cascader wx:if="{{R}}" class="data-v-262d0393" bindchange="{{N}}" bindpathChange="{{O}}" u-i="262d0393-23" bind:__l="__l" bindupdateVisible="{{P}}" bindupdateModelValue="{{Q}}" u-p="{{R}}"></nut-cascader></view>
|
||||
68
unpackage/dist/dev/mp-weixin/pages/config/goodsAdd.wxss
vendored
Normal file
68
unpackage/dist/dev/mp-weixin/pages/config/goodsAdd.wxss
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page-content.data-v-262d0393 {
|
||||
min-height: 100vh;
|
||||
background-color: #f2f3f5;
|
||||
}
|
||||
.list.data-v-262d0393 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
background: #ffffff;
|
||||
align-items: center;
|
||||
max-height: 300rpx;
|
||||
overflow-y: scroll;
|
||||
padding: 10px;
|
||||
}
|
||||
.list .list-item.data-v-262d0393 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 20rpx 10rpx;
|
||||
}
|
||||
101
unpackage/dist/dev/mp-weixin/pages/config/goodsDetail.js
vendored
Normal file
101
unpackage/dist/dev/mp-weixin/pages/config/goodsDetail.js
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_goods = require("../../api/goods.js");
|
||||
const api_config = require("../../api/config.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_watermark2 = common_vendor.resolveComponent("nut-watermark");
|
||||
const _easycom_nut_cell_group2 = common_vendor.resolveComponent("nut-cell-group");
|
||||
(_easycom_nut_watermark2 + _easycom_nut_cell_group2)();
|
||||
}
|
||||
const _easycom_nut_watermark = () => "../../uni_modules/nutui-uni/components/watermark/watermark.js";
|
||||
const _easycom_nut_cell_group = () => "../../uni_modules/nutui-uni/components/cellgroup/cellgroup.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_watermark + _easycom_nut_cell_group)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "goodsDetail",
|
||||
setup(__props) {
|
||||
const serviceTxt = common_vendor.ref("");
|
||||
const id = common_vendor.ref(0);
|
||||
const detail = common_vendor.reactive({});
|
||||
common_vendor.onLoad((options) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsDetail.vue:83", "init");
|
||||
getConfig();
|
||||
id.value = options.id;
|
||||
api_goods.fetchGoodsDetail(id.value).then((res) => {
|
||||
Object.assign(detail, res);
|
||||
});
|
||||
});
|
||||
const getConfig = () => {
|
||||
api_config.fetchGetConfig().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsDetail.vue:102", "getConfig=====>", res);
|
||||
serviceTxt.value = res.appConfig.service_txt;
|
||||
});
|
||||
};
|
||||
common_vendor.onShareTimeline((res) => {
|
||||
return {
|
||||
title: detail.goods_name,
|
||||
path: "/pages/mall/detail?id=" + detail.goods_id,
|
||||
imageUrl: detail.image[0].file_path
|
||||
};
|
||||
});
|
||||
common_vendor.onShareAppMessage((res) => {
|
||||
return {
|
||||
title: detail.goods_name,
|
||||
path: "/pages/mall/detail?id=" + detail.goods_id,
|
||||
imageUrl: detail.image[0].file_path
|
||||
};
|
||||
});
|
||||
const showGoodsImages = (index) => {
|
||||
common_vendor.index.previewImage({
|
||||
current: index,
|
||||
// 指定当前显示的图片索引
|
||||
urls: detail.image.map((e) => {
|
||||
return e.file_path;
|
||||
})
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
var _a, _b, _c, _d, _e, _f, _g;
|
||||
return common_vendor.e({
|
||||
a: ((_a = detail.status) == null ? void 0 : _a.value) === 10
|
||||
}, ((_b = detail.status) == null ? void 0 : _b.value) === 10 ? {
|
||||
b: common_vendor.p({
|
||||
["z-index"]: 1,
|
||||
content: "此商品已下架"
|
||||
})
|
||||
} : {}, {
|
||||
c: ((_c = detail.status) == null ? void 0 : _c.value) === 30
|
||||
}, ((_d = detail.status) == null ? void 0 : _d.value) === 30 ? {
|
||||
d: common_vendor.p({
|
||||
["z-index"]: 1,
|
||||
content: "此商品已锁定"
|
||||
})
|
||||
} : {}, {
|
||||
e: ((_e = detail.status) == null ? void 0 : _e.value) === 40
|
||||
}, ((_f = detail.status) == null ? void 0 : _f.value) === 40 ? {
|
||||
f: common_vendor.p({
|
||||
["z-index"]: 1,
|
||||
content: "此商品已售出"
|
||||
})
|
||||
} : {}, {
|
||||
g: common_vendor.f(detail.image, (item, idx, i0) => {
|
||||
return {
|
||||
a: item.file_path,
|
||||
b: common_vendor.o(($event) => showGoodsImages(idx), idx),
|
||||
c: idx
|
||||
};
|
||||
}),
|
||||
h: common_vendor.t(detail.goods_price),
|
||||
i: common_vendor.t((_g = detail.degree) == null ? void 0 : _g.degree_name),
|
||||
j: common_vendor.t(detail.goods_name),
|
||||
k: common_vendor.t(detail.content),
|
||||
l: common_vendor.t(serviceTxt.value)
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-d67bd9c3"]]);
|
||||
_sfc_main.__runtimeHooks = 6;
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/config/goodsDetail.js.map
|
||||
8
unpackage/dist/dev/mp-weixin/pages/config/goodsDetail.json
vendored
Normal file
8
unpackage/dist/dev/mp-weixin/pages/config/goodsDetail.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"navigationBarTitleText": "店铺商品详情",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"nut-watermark": "../../uni_modules/nutui-uni/components/watermark/watermark",
|
||||
"nut-cell-group": "../../uni_modules/nutui-uni/components/cellgroup/cellgroup"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/config/goodsDetail.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/config/goodsDetail.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="content data-v-d67bd9c3"><nut-watermark wx:if="{{a}}" class="mark1 data-v-d67bd9c3" u-i="d67bd9c3-0" bind:__l="__l" u-p="{{b}}"></nut-watermark><nut-watermark wx:if="{{c}}" class="mark1 data-v-d67bd9c3" u-i="d67bd9c3-1" bind:__l="__l" u-p="{{d}}"></nut-watermark><nut-watermark wx:if="{{e}}" class="mark1 data-v-d67bd9c3" u-i="d67bd9c3-2" bind:__l="__l" u-p="{{f}}"></nut-watermark><swiper class="swiper data-v-d67bd9c3" circular indicator-dots autoplay><swiper-item wx:for="{{g}}" wx:for-item="item" wx:key="c" class="data-v-d67bd9c3" bindtap="{{item.b}}"><image class="data-v-d67bd9c3" src="{{item.a}}" mode="aspectFill"></image></swiper-item></swiper><view class="goods_info data-v-d67bd9c3"><nut-cell-group class="data-v-d67bd9c3" u-s="{{['d']}}" u-i="d67bd9c3-3" bind:__l="__l"><view class="price data-v-d67bd9c3"><text class="unit data-v-d67bd9c3">¥</text><text class="value data-v-d67bd9c3">{{h}}</text></view></nut-cell-group><nut-cell-group class="data-v-d67bd9c3" u-s="{{['d']}}" u-i="d67bd9c3-4" bind:__l="__l"><view class="name data-v-d67bd9c3"><view class="top data-v-d67bd9c3"><view class="tag data-v-d67bd9c3"><text class="data-v-d67bd9c3">{{i}}</text></view><text class="title data-v-d67bd9c3">{{j}}</text></view><view class="data-v-d67bd9c3"><text class="info data-v-d67bd9c3">{{k}}</text></view></view></nut-cell-group><view class="service data-v-d67bd9c3"><view class="info data-v-d67bd9c3"><text class="title data-v-d67bd9c3">服务</text><text class="value data-v-d67bd9c3">{{l}}</text></view></view></view></view>
|
||||
211
unpackage/dist/dev/mp-weixin/pages/config/goodsDetail.wxss
vendored
Normal file
211
unpackage/dist/dev/mp-weixin/pages/config/goodsDetail.wxss
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.bottom-action.data-v-d67bd9c3 {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 50px;
|
||||
background: #fff;
|
||||
width: calc(100% - 20px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 0 auto;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.bottom-action .bottom-action-icon.data-v-d67bd9c3 {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.bottom-action .bottom-action-icon .bottom-action-icon-item.data-v-d67bd9c3 {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.bottom-action .bottom-action-icon .bottom-action-icon-item text.data-v-d67bd9c3 {
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
font-size: 11px;
|
||||
}
|
||||
.bottom-action .bottom-action-btn.data-v-d67bd9c3 {
|
||||
-ms-flex-align: center;
|
||||
-ms-flex-pack: end;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.content.data-v-d67bd9c3 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: calc(100vh - 50px);
|
||||
/* align-items: center; */
|
||||
background-color: #f2f3f5;
|
||||
--nut-cell-group-title-color: #000;
|
||||
--nut-collapse-item-padding: 10px 10px 10px 10px;
|
||||
--nut-collapse-wrapper-content-padding: 10px 10px 10px 10px;
|
||||
--nut-collapse-item-color: #000;
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
.report-inner.data-v-d67bd9c3 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
}
|
||||
.report-inner .report-item .report-item-name.data-v-d67bd9c3 {
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
font-weight: 700;
|
||||
}
|
||||
.report-inner .report-item .report-item-content.data-v-d67bd9c3 {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.report-inner .report-item .report-item-content .report-item-content-item.data-v-d67bd9c3 {
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
width: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.count-item.data-v-d67bd9c3 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
.swiper.data-v-d67bd9c3 {
|
||||
width: 100%;
|
||||
height: 414px;
|
||||
}
|
||||
.swiper image.data-v-d67bd9c3 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.goods_info.data-v-d67bd9c3 {
|
||||
padding: 5px;
|
||||
color: #000;
|
||||
}
|
||||
.goods_info .price.data-v-d67bd9c3 {
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
.goods_info .price .unit.data-v-d67bd9c3 {
|
||||
font-size: 12px;
|
||||
}
|
||||
.goods_info .price .value.data-v-d67bd9c3 {
|
||||
font-size: 24px;
|
||||
}
|
||||
.goods_info .name.data-v-d67bd9c3 {
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
flex-direction: column;
|
||||
}
|
||||
.goods_info .name .top.data-v-d67bd9c3 {
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
}
|
||||
.goods_info .name .top .tag.data-v-d67bd9c3 {
|
||||
background: #000;
|
||||
padding: 1px 2px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.goods_info .name .top .tag text.data-v-d67bd9c3 {
|
||||
font-size: 10px;
|
||||
color: #fff;
|
||||
}
|
||||
.goods_info .name .top .title.data-v-d67bd9c3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
.goods_info .name .info.data-v-d67bd9c3 {
|
||||
color: rgba(0, 0, 0, 0.7);
|
||||
font-size: 13px;
|
||||
}
|
||||
.goods_info .service.data-v-d67bd9c3 {
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.goods_info .service .info.data-v-d67bd9c3 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 5px;
|
||||
}
|
||||
.goods_info .service .info .title.data-v-d67bd9c3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
.goods_info .service .info .value.data-v-d67bd9c3 {
|
||||
color: rgba(0, 0, 0, 0.7);
|
||||
font-size: 13px;
|
||||
}
|
||||
.goods_info .service .right_icon.data-v-d67bd9c3 {
|
||||
background-color: currentColor;
|
||||
-webkit-mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0zNTMuODMgMTU4LjE3YTQyLjY3IDQyLjY3IDAgMSAxIDYwLjM0LTYwLjM0bDM4NCAzODRhNDIuNjcgNDIuNjcgMCAwIDEgMCA2MC4zNmwtMzg0IDM4NGE0Mi42NyA0Mi42NyAwIDEgMS02MC4zNC02MC4zNkw3MDcuNjcgNTEyeiIvPjwvc3ZnPg==") 0 0/100% 100% no-repeat;
|
||||
mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0zNTMuODMgMTU4LjE3YTQyLjY3IDQyLjY3IDAgMSAxIDYwLjM0LTYwLjM0bDM4NCAzODRhNDIuNjcgNDIuNjcgMCAwIDEgMCA2MC4zNmwtMzg0IDM4NGE0Mi42NyA0Mi42NyAwIDEgMS02MC4zNC02MC4zNkw3MDcuNjcgNTEyeiIvPjwvc3ZnPg==") 0 0/100% 100% no-repeat;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
.goods_info .report.data-v-d67bd9c3 {
|
||||
border-radius: 5px;
|
||||
padding: 1px;
|
||||
background: #fff;
|
||||
}
|
||||
331
unpackage/dist/dev/mp-weixin/pages/config/goodsEdit.js
vendored
Normal file
331
unpackage/dist/dev/mp-weixin/pages/config/goodsEdit.js
vendored
Normal file
@@ -0,0 +1,331 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_goods = require("../../api/goods.js");
|
||||
const api_request = require("../../api/request.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_input2 = common_vendor.resolveComponent("nut-input");
|
||||
const _easycom_nut_form_item2 = common_vendor.resolveComponent("nut-form-item");
|
||||
const _easycom_nut_icon2 = common_vendor.resolveComponent("nut-icon");
|
||||
const _easycom_nut_textarea2 = common_vendor.resolveComponent("nut-textarea");
|
||||
const _easycom_nut_radio2 = common_vendor.resolveComponent("nut-radio");
|
||||
const _easycom_nut_radio_group2 = common_vendor.resolveComponent("nut-radio-group");
|
||||
const _easycom_shmily_drag_image2 = common_vendor.resolveComponent("shmily-drag-image");
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
const _easycom_nut_form2 = common_vendor.resolveComponent("nut-form");
|
||||
const _easycom_nut_picker2 = common_vendor.resolveComponent("nut-picker");
|
||||
const _easycom_nut_popup2 = common_vendor.resolveComponent("nut-popup");
|
||||
const _easycom_nut_cascader2 = common_vendor.resolveComponent("nut-cascader");
|
||||
(_easycom_nut_input2 + _easycom_nut_form_item2 + _easycom_nut_icon2 + _easycom_nut_textarea2 + _easycom_nut_radio2 + _easycom_nut_radio_group2 + _easycom_shmily_drag_image2 + _easycom_nut_button2 + _easycom_nut_form2 + _easycom_nut_picker2 + _easycom_nut_popup2 + _easycom_nut_cascader2)();
|
||||
}
|
||||
const _easycom_nut_input = () => "../../uni_modules/nutui-uni/components/input/input.js";
|
||||
const _easycom_nut_form_item = () => "../../uni_modules/nutui-uni/components/formitem/formitem.js";
|
||||
const _easycom_nut_icon = () => "../../uni_modules/nutui-uni/components/icon/icon.js";
|
||||
const _easycom_nut_textarea = () => "../../uni_modules/nutui-uni/components/textarea/textarea.js";
|
||||
const _easycom_nut_radio = () => "../../uni_modules/nutui-uni/components/radio/radio.js";
|
||||
const _easycom_nut_radio_group = () => "../../uni_modules/nutui-uni/components/radiogroup/radiogroup.js";
|
||||
const _easycom_shmily_drag_image = () => "../../uni_modules/shmily-drag-image/components/shmily-drag-image/shmily-drag-image.js";
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
const _easycom_nut_form = () => "../../uni_modules/nutui-uni/components/form/form.js";
|
||||
const _easycom_nut_picker = () => "../../uni_modules/nutui-uni/components/picker/picker.js";
|
||||
const _easycom_nut_popup = () => "../../uni_modules/nutui-uni/components/popup/popup.js";
|
||||
const _easycom_nut_cascader = () => "../../uni_modules/nutui-uni/components/cascader/cascader.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_input + _easycom_nut_form_item + _easycom_nut_icon + _easycom_nut_textarea + _easycom_nut_radio + _easycom_nut_radio_group + _easycom_shmily_drag_image + _easycom_nut_button + _easycom_nut_form + _easycom_nut_picker + _easycom_nut_popup + _easycom_nut_cascader)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "goodsEdit",
|
||||
setup(__props) {
|
||||
const id = common_vendor.ref(0);
|
||||
const is_show_edit = common_vendor.ref(false);
|
||||
const show_product_cascader = common_vendor.ref(false);
|
||||
const show_degree_popup = common_vendor.ref(false);
|
||||
const popup_degree_val = common_vendor.ref([]);
|
||||
const cascader_product_val = common_vendor.ref([]);
|
||||
const filter_params = common_vendor.reactive({});
|
||||
const form = common_vendor.reactive({
|
||||
goods_id: 0,
|
||||
goods_name: "",
|
||||
goods_no: "",
|
||||
goods_price: "",
|
||||
goods_stock: "",
|
||||
content: "",
|
||||
details_content: "",
|
||||
status: "10",
|
||||
images: [],
|
||||
add_person: "",
|
||||
degree_id: 0,
|
||||
degree_name: "未选择",
|
||||
type_id: 0,
|
||||
type_name: "未选择",
|
||||
brand_id: 0,
|
||||
brand_name: "未选择",
|
||||
product_id: 0,
|
||||
product_name: "未选择"
|
||||
});
|
||||
common_vendor.onMounted(() => {
|
||||
api_goods.fetchFilterParmas(1).then((res) => {
|
||||
Object.assign(filter_params, res);
|
||||
filter_params.degree_list.unshift({
|
||||
degree_id: 0,
|
||||
degree_name: "未选择"
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsEdit.vue:166", "filter_params", filter_params);
|
||||
});
|
||||
});
|
||||
common_vendor.onLoad((options) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsEdit.vue:171", "goods_id===>", options.id);
|
||||
id.value = options.id;
|
||||
is_show_edit.value = false;
|
||||
api_goods.fetchGoodsDetail(id.value).then((res) => {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
||||
is_show_edit.value = true;
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsEdit.vue:177", "====>", res);
|
||||
form.goods_id = res.goods_id;
|
||||
form.goods_name = res.goods_name;
|
||||
form.goods_no = res.goods_no;
|
||||
form.goods_price = res.goods_price;
|
||||
form.content = res.content;
|
||||
form.details_content = res.details_content;
|
||||
form.status = res.status.value.toString();
|
||||
form.degree_id = ((_a = res.degree) == null ? void 0 : _a.degree_id) ?? 0;
|
||||
form.degree_name = ((_b = res.degree) == null ? void 0 : _b.degree_name) ?? "未选择";
|
||||
form.type_id = ((_c = res.type) == null ? void 0 : _c.type_id) ?? 0;
|
||||
form.type_name = ((_d = res.type) == null ? void 0 : _d.name) ?? "未选择";
|
||||
form.brand_id = ((_e = res.brand) == null ? void 0 : _e.brand_id) ?? 0;
|
||||
form.brand_name = ((_f = res.brand) == null ? void 0 : _f.name) ?? "未选择";
|
||||
form.product_id = ((_g = res.product) == null ? void 0 : _g.product_id) ?? 0;
|
||||
form.product_name = ((_h = res.product) == null ? void 0 : _h.name) ?? "未选择";
|
||||
popup_degree_val.value = [((_i = res.degree) == null ? void 0 : _i.degree_id) ?? 0];
|
||||
cascader_product_val.value = [
|
||||
((_j = res.type) == null ? void 0 : _j.type_id) ?? 0,
|
||||
((_k = res.brand) == null ? void 0 : _k.brand_id) ?? 0,
|
||||
((_l = res.product) == null ? void 0 : _l.product_id) ?? 0
|
||||
];
|
||||
form.images = [];
|
||||
(_m = res.image) == null ? void 0 : _m.forEach((item) => {
|
||||
form.images.push({
|
||||
id: item.image_id,
|
||||
file_path: item.file_path
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
const onProductChange = (...args) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsEdit.vue:210", 0, ...args);
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsEdit.vue:211", cascader_product_val);
|
||||
};
|
||||
const onSubmit = () => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsEdit.vue:215", "form===>", form);
|
||||
api_goods.fetchGoodsEdit(form).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
icon: "none",
|
||||
title: "编辑商品成功"
|
||||
});
|
||||
setTimeout(() => {
|
||||
common_vendor.index.navigateBack({
|
||||
delta: 1
|
||||
// 返回上一页
|
||||
});
|
||||
}, 500);
|
||||
});
|
||||
};
|
||||
const onScan = () => {
|
||||
common_vendor.index.scanCode({
|
||||
onlyFromCamera: true,
|
||||
success: (res) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsEdit.vue:237", res);
|
||||
form.goods_no = res.result;
|
||||
},
|
||||
fail: () => {
|
||||
common_vendor.index.showToast({
|
||||
icon: "none",
|
||||
title: "扫码失败"
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const onProcutPathChange = (args) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsEdit.vue:250", args);
|
||||
form.type_id = 0;
|
||||
form.type_name = "";
|
||||
form.brand_id = 0;
|
||||
form.brand_name = "";
|
||||
form.product_id = 0;
|
||||
form.product_name = "";
|
||||
if (args.length >= 1 && args[0] !== null) {
|
||||
form.type_id = args[0].value;
|
||||
form.type_name = args[0].text;
|
||||
}
|
||||
if (args.length >= 2 && args[1] !== null) {
|
||||
form.brand_id = args[1].value;
|
||||
form.brand_name = args[1].text;
|
||||
}
|
||||
if (args.length >= 3 && args[2] !== null) {
|
||||
form.product_id = args[2].value;
|
||||
form.product_name = args[2].text;
|
||||
}
|
||||
};
|
||||
const onConfirmDegree = () => {
|
||||
form.degree_id = popup_degree_val.value[0];
|
||||
filter_params.degree_list.forEach((item) => {
|
||||
if (item.degree_id === form.degree_id) {
|
||||
form.degree_name = item.degree_name;
|
||||
}
|
||||
});
|
||||
show_degree_popup.value = false;
|
||||
};
|
||||
const addGoodsImg = () => {
|
||||
var _a;
|
||||
common_vendor.index.chooseImage({
|
||||
count: 9 - (((_a = form.image) == null ? void 0 : _a.length) || 0),
|
||||
sourceType: ["album", "camera"],
|
||||
success: (res) => {
|
||||
res.tempFiles.forEach((file) => {
|
||||
common_vendor.index.uploadFile({
|
||||
url: api_request.getUploadImageUrl(),
|
||||
filePath: file.path,
|
||||
name: "iFile",
|
||||
formData: {
|
||||
group_id: 1
|
||||
},
|
||||
success: (res2) => {
|
||||
let data = JSON.parse(res2.data).data;
|
||||
form.images.push({
|
||||
id: parseInt(data.file_id),
|
||||
file_path: data.file_path
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: is_show_edit.value
|
||||
}, is_show_edit.value ? {
|
||||
b: common_vendor.o(($event) => form.goods_name = $event),
|
||||
c: common_vendor.p({
|
||||
placeholder: "请输入名称",
|
||||
type: "text",
|
||||
modelValue: form.goods_name
|
||||
}),
|
||||
d: common_vendor.p({
|
||||
label: "名称"
|
||||
}),
|
||||
e: common_vendor.o(onScan),
|
||||
f: common_vendor.p({
|
||||
name: "scan2",
|
||||
size: "30",
|
||||
["custom-color"]: "#000000"
|
||||
}),
|
||||
g: common_vendor.o(($event) => form.goods_no = $event),
|
||||
h: common_vendor.p({
|
||||
placeholder: "请输入串号",
|
||||
type: "text",
|
||||
modelValue: form.goods_no
|
||||
}),
|
||||
i: common_vendor.p({
|
||||
label: "串号"
|
||||
}),
|
||||
j: common_vendor.o(($event) => form.goods_price = $event),
|
||||
k: common_vendor.p({
|
||||
placeholder: "请输入售价",
|
||||
type: "nubmer",
|
||||
modelValue: form.goods_price
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
label: "售价"
|
||||
}),
|
||||
m: common_vendor.o(($event) => form.content = $event),
|
||||
n: common_vendor.p({
|
||||
autosize: true,
|
||||
placeholder: "请输入说明",
|
||||
type: "text",
|
||||
modelValue: form.content
|
||||
}),
|
||||
o: common_vendor.p({
|
||||
label: "说明"
|
||||
}),
|
||||
p: common_vendor.o(($event) => form.details_content = $event),
|
||||
q: common_vendor.p({
|
||||
autosize: true,
|
||||
placeholder: "请输入介绍",
|
||||
type: "text",
|
||||
modelValue: form.details_content
|
||||
}),
|
||||
r: common_vendor.p({
|
||||
label: "介绍"
|
||||
}),
|
||||
s: common_vendor.p({
|
||||
label: "10"
|
||||
}),
|
||||
t: common_vendor.p({
|
||||
label: "20"
|
||||
}),
|
||||
v: common_vendor.o(($event) => form.status = $event),
|
||||
w: common_vendor.p({
|
||||
direction: "horizontal",
|
||||
modelValue: form.status
|
||||
}),
|
||||
x: common_vendor.p({
|
||||
label: "状态"
|
||||
}),
|
||||
y: common_vendor.t(form.degree_name),
|
||||
z: common_vendor.o(($event) => show_degree_popup.value = true),
|
||||
A: common_vendor.t(form.type_name),
|
||||
B: common_vendor.t(form.brand_name),
|
||||
C: common_vendor.t(form.product_name),
|
||||
D: common_vendor.o(($event) => show_product_cascader.value = true),
|
||||
E: common_vendor.o(($event) => form.images = $event),
|
||||
F: common_vendor.p({
|
||||
number: 9,
|
||||
["add-image"]: addGoodsImg,
|
||||
keyName: "file_path",
|
||||
modelValue: form.images
|
||||
}),
|
||||
G: common_vendor.o(onSubmit),
|
||||
H: common_vendor.p({
|
||||
type: "primary",
|
||||
block: true
|
||||
})
|
||||
} : {}, {
|
||||
I: common_vendor.o(onConfirmDegree),
|
||||
J: common_vendor.o(($event) => show_degree_popup.value = false),
|
||||
K: common_vendor.o(($event) => popup_degree_val.value = $event),
|
||||
L: common_vendor.p({
|
||||
columns: filter_params.degree_list,
|
||||
["field-names"]: {
|
||||
text: "degree_name",
|
||||
value: "degree_id"
|
||||
},
|
||||
title: "选择成色",
|
||||
modelValue: popup_degree_val.value
|
||||
}),
|
||||
M: common_vendor.o(($event) => show_degree_popup.value = $event),
|
||||
N: common_vendor.p({
|
||||
position: "bottom",
|
||||
["safe-area-inset-bottom"]: true,
|
||||
visible: show_degree_popup.value
|
||||
}),
|
||||
O: common_vendor.o(onProductChange),
|
||||
P: common_vendor.o(onProcutPathChange),
|
||||
Q: common_vendor.o(($event) => show_product_cascader.value = $event),
|
||||
R: common_vendor.o(($event) => cascader_product_val.value = $event),
|
||||
S: common_vendor.p({
|
||||
title: "机型选择",
|
||||
["text-key"]: "label",
|
||||
["value-key"]: "value",
|
||||
["title-ellipsis"]: false,
|
||||
["children-key"]: "children",
|
||||
options: filter_params.drop_down_options,
|
||||
visible: show_product_cascader.value,
|
||||
modelValue: cascader_product_val.value
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a30aee39"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/config/goodsEdit.js.map
|
||||
18
unpackage/dist/dev/mp-weixin/pages/config/goodsEdit.json
vendored
Normal file
18
unpackage/dist/dev/mp-weixin/pages/config/goodsEdit.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"navigationBarTitleText": "编辑商品",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"nut-input": "../../uni_modules/nutui-uni/components/input/input",
|
||||
"nut-form-item": "../../uni_modules/nutui-uni/components/formitem/formitem",
|
||||
"nut-icon": "../../uni_modules/nutui-uni/components/icon/icon",
|
||||
"nut-textarea": "../../uni_modules/nutui-uni/components/textarea/textarea",
|
||||
"nut-radio": "../../uni_modules/nutui-uni/components/radio/radio",
|
||||
"nut-radio-group": "../../uni_modules/nutui-uni/components/radiogroup/radiogroup",
|
||||
"shmily-drag-image": "../../uni_modules/shmily-drag-image/components/shmily-drag-image/shmily-drag-image",
|
||||
"nut-button": "../../uni_modules/nutui-uni/components/button/button",
|
||||
"nut-form": "../../uni_modules/nutui-uni/components/form/form",
|
||||
"nut-picker": "../../uni_modules/nutui-uni/components/picker/picker",
|
||||
"nut-popup": "../../uni_modules/nutui-uni/components/popup/popup",
|
||||
"nut-cascader": "../../uni_modules/nutui-uni/components/cascader/cascader"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/config/goodsEdit.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/config/goodsEdit.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="page-content data-v-a30aee39"><view wx:if="{{a}}" class="data-v-a30aee39" style="padding:20rpx"><nut-form class="data-v-a30aee39" u-s="{{['d']}}" u-i="a30aee39-0" bind:__l="__l"><nut-form-item wx:if="{{d}}" class="data-v-a30aee39" u-s="{{['d']}}" u-i="a30aee39-1,a30aee39-0" bind:__l="__l" u-p="{{d}}"><nut-input wx:if="{{c}}" class="nut-input-text data-v-a30aee39" u-i="a30aee39-2,a30aee39-1" bind:__l="__l" bindupdateModelValue="{{b}}" u-p="{{c}}"/></nut-form-item><nut-form-item wx:if="{{i}}" class="data-v-a30aee39" u-s="{{['d']}}" u-i="a30aee39-3,a30aee39-0" bind:__l="__l" u-p="{{i}}"><nut-input wx:if="{{h}}" u-s="{{['right']}}" class="nut-input-text data-v-a30aee39" u-i="a30aee39-4,a30aee39-3" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"><nut-icon class="data-v-a30aee39" bindclick="{{e}}" u-i="a30aee39-5,a30aee39-4" bind:__l="__l" u-p="{{f}}" slot="right"/></nut-input></nut-form-item><nut-form-item wx:if="{{l}}" class="data-v-a30aee39" u-s="{{['d']}}" u-i="a30aee39-6,a30aee39-0" bind:__l="__l" u-p="{{l}}"><nut-input wx:if="{{k}}" class="nut-input-text data-v-a30aee39" u-i="a30aee39-7,a30aee39-6" bind:__l="__l" bindupdateModelValue="{{j}}" u-p="{{k}}"/></nut-form-item><nut-form-item wx:if="{{o}}" class="data-v-a30aee39" u-s="{{['d']}}" u-i="a30aee39-8,a30aee39-0" bind:__l="__l" u-p="{{o}}"><nut-textarea wx:if="{{n}}" class="data-v-a30aee39" u-i="a30aee39-9,a30aee39-8" bind:__l="__l" bindupdateModelValue="{{m}}" u-p="{{n}}"/></nut-form-item><nut-form-item wx:if="{{r}}" class="data-v-a30aee39" u-s="{{['d']}}" u-i="a30aee39-10,a30aee39-0" bind:__l="__l" u-p="{{r}}"><nut-textarea wx:if="{{q}}" class="data-v-a30aee39" u-i="a30aee39-11,a30aee39-10" bind:__l="__l" bindupdateModelValue="{{p}}" u-p="{{q}}"/></nut-form-item><nut-form-item wx:if="{{x}}" class="data-v-a30aee39" u-s="{{['d']}}" u-i="a30aee39-12,a30aee39-0" bind:__l="__l" u-p="{{x}}"><nut-radio-group wx:if="{{w}}" class="data-v-a30aee39" u-s="{{['d']}}" u-i="a30aee39-13,a30aee39-12" bind:__l="__l" bindupdateModelValue="{{v}}" u-p="{{w}}"><nut-radio wx:if="{{s}}" class="data-v-a30aee39" u-s="{{['d']}}" u-i="a30aee39-14,a30aee39-13" bind:__l="__l" u-p="{{s}}">下架</nut-radio><nut-radio wx:if="{{t}}" class="data-v-a30aee39" u-s="{{['d']}}" u-i="a30aee39-15,a30aee39-13" bind:__l="__l" u-p="{{t}}">上架</nut-radio></nut-radio-group></nut-form-item><nut-form-item class="data-v-a30aee39" u-s="{{['label','d']}}" u-i="a30aee39-16,a30aee39-0" bind:__l="__l"><view slot="label">成色</view><view class="data-v-a30aee39" style="color:black" bindtap="{{z}}"><text class="data-v-a30aee39">{{y}}</text></view></nut-form-item><nut-form-item class="data-v-a30aee39" u-s="{{['label','d']}}" u-i="a30aee39-17,a30aee39-0" bind:__l="__l"><view slot="label">机型</view><view class="data-v-a30aee39" style="color:black" bindtap="{{D}}"><text class="data-v-a30aee39">{{A}},{{B}},{{C}}</text></view></nut-form-item><nut-form-item class="data-v-a30aee39" u-s="{{['label','d']}}" u-i="a30aee39-18,a30aee39-0" bind:__l="__l"><view slot="label">商品图片</view><shmily-drag-image class="data-v-a30aee39" u-i="a30aee39-19,a30aee39-18" bind:__l="__l" bindupdateModelValue="{{E}}" u-p="{{F}}"></shmily-drag-image></nut-form-item><view class="data-v-a30aee39" style="align-items:center;text-align:center;padding:20rpx 60rpx"><nut-button wx:if="{{H}}" class="data-v-a30aee39" u-s="{{['d']}}" bindclick="{{G}}" u-i="a30aee39-20,a30aee39-0" bind:__l="__l" u-p="{{H}}"> 保存修改 </nut-button></view></nut-form></view><nut-popup wx:if="{{N}}" class="data-v-a30aee39" u-s="{{['d']}}" u-i="a30aee39-21" bind:__l="__l" bindupdateVisible="{{M}}" u-p="{{N}}"><nut-picker wx:if="{{L}}" class="data-v-a30aee39" bindconfirm="{{I}}" bindcancel="{{J}}" u-i="a30aee39-22,a30aee39-21" bind:__l="__l" bindupdateModelValue="{{K}}" u-p="{{L}}"></nut-picker></nut-popup><nut-cascader wx:if="{{S}}" class="data-v-a30aee39" bindchange="{{O}}" bindpathChange="{{P}}" u-i="a30aee39-23" bind:__l="__l" bindupdateVisible="{{Q}}" bindupdateModelValue="{{R}}" u-p="{{S}}"></nut-cascader></view>
|
||||
55
unpackage/dist/dev/mp-weixin/pages/config/goodsEdit.wxss
vendored
Normal file
55
unpackage/dist/dev/mp-weixin/pages/config/goodsEdit.wxss
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page-content.data-v-a30aee39 {
|
||||
min-height: 100vh;
|
||||
background-color: #f2f3f5;
|
||||
--nut-searchbar-input-height: 40px;
|
||||
}
|
||||
383
unpackage/dist/dev/mp-weixin/pages/config/goodsList.js
vendored
Normal file
383
unpackage/dist/dev/mp-weixin/pages/config/goodsList.js
vendored
Normal file
@@ -0,0 +1,383 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_goods = require("../../api/goods.js");
|
||||
const utils_helper = require("../../utils/helper.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
const _easycom_nut_searchbar2 = common_vendor.resolveComponent("nut-searchbar");
|
||||
const _easycom_nut_menu_item2 = common_vendor.resolveComponent("nut-menu-item");
|
||||
const _easycom_nut_menu2 = common_vendor.resolveComponent("nut-menu");
|
||||
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
|
||||
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||
(_easycom_nut_button2 + _easycom_nut_searchbar2 + _easycom_nut_menu_item2 + _easycom_nut_menu2 + _easycom_nut_tag2 + _easycom_z_paging2)();
|
||||
}
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
const _easycom_nut_searchbar = () => "../../uni_modules/nutui-uni/components/searchbar/searchbar.js";
|
||||
const _easycom_nut_menu_item = () => "../../uni_modules/nutui-uni/components/menuitem/menuitem.js";
|
||||
const _easycom_nut_menu = () => "../../uni_modules/nutui-uni/components/menu/menu.js";
|
||||
const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js";
|
||||
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_button + _easycom_nut_searchbar + _easycom_nut_menu_item + _easycom_nut_menu + _easycom_nut_tag + _easycom_z_paging)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "goodsList",
|
||||
setup(__props) {
|
||||
const getImg = (goods) => {
|
||||
var _a, _b;
|
||||
const url = (_b = (_a = goods == null ? void 0 : goods.image) == null ? void 0 : _a[0]) == null ? void 0 : _b.file_path;
|
||||
return url ? url + "?imageView2/1/w/200/h/200" : "";
|
||||
};
|
||||
const paging = common_vendor.ref(null);
|
||||
const dataList = common_vendor.ref([]);
|
||||
const selectPriceSortRef = common_vendor.ref(null);
|
||||
const selectDegreeRef = common_vendor.ref(null);
|
||||
const selectProductRef = common_vendor.ref(null);
|
||||
const state = common_vendor.reactive({
|
||||
type_params: [],
|
||||
// 产品类型
|
||||
drop_down_options: [],
|
||||
// 产品类型下的品牌列表
|
||||
o_drop_down_options: [],
|
||||
// 价格排序
|
||||
price_sort_params: [
|
||||
{
|
||||
text: "默认排序",
|
||||
value: ""
|
||||
},
|
||||
{
|
||||
text: "价格升序",
|
||||
value: "ascend"
|
||||
},
|
||||
{
|
||||
text: "价格降序",
|
||||
value: "descend"
|
||||
}
|
||||
],
|
||||
// 成色所有选项
|
||||
degree_params: [],
|
||||
price_sort: "",
|
||||
price_sort_name: "默认排序",
|
||||
degree_ids: [],
|
||||
degree_name: "成色",
|
||||
product_name: "机型",
|
||||
type_id: 1,
|
||||
// 产品类型id 默认 1 手机
|
||||
type_name: "手机",
|
||||
brand_id: 0,
|
||||
// 品牌id // 默认 0 全部
|
||||
brand_name: "全部",
|
||||
product_ids: [0],
|
||||
// 机型ids 默认 0 全部
|
||||
search_val: ""
|
||||
// 搜索
|
||||
});
|
||||
const onSearch = () => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsList.vue:241", "搜索:", state.search_val);
|
||||
paging.value.reload();
|
||||
};
|
||||
const onClear = () => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsList.vue:247", "搜索:", state.search_val);
|
||||
paging.value.reload();
|
||||
};
|
||||
const onResetProduct = () => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsList.vue:255", "重置产品");
|
||||
state.type_id = 1;
|
||||
state.type_name = "手机";
|
||||
state.brand_id = 0;
|
||||
state.brand_name = "全部";
|
||||
state.product_ids = [0];
|
||||
state.product_name = "机型";
|
||||
};
|
||||
const onConfirmProduct = () => {
|
||||
var _a;
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsList.vue:265", "当前产品类型", {
|
||||
"type_id": state.type_id,
|
||||
"type_name": state.type_name,
|
||||
"brand_id": state.brand_id,
|
||||
"brand_name": state.brand_name,
|
||||
"product_ids": state.product_ids
|
||||
});
|
||||
(_a = selectProductRef.value) == null ? void 0 : _a.toggle(false);
|
||||
paging.value.reload();
|
||||
};
|
||||
const selectProduct = (product) => {
|
||||
if (product.value === 0) {
|
||||
state.product_ids = [0];
|
||||
} else {
|
||||
state.product_ids = state.product_ids.filter((e) => e != 0);
|
||||
const index = state.product_ids.indexOf(product.value);
|
||||
if (index > -1) {
|
||||
state.product_ids.splice(index, 1);
|
||||
if (state.product_ids.length === 0) {
|
||||
state.product_ids = [0];
|
||||
}
|
||||
} else {
|
||||
state.product_ids.push(product.value);
|
||||
}
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsList.vue:294", product);
|
||||
};
|
||||
const productOptions = common_vendor.computed(() => {
|
||||
var _a;
|
||||
return (_a = state == null ? void 0 : state.o_drop_down_options[state.type_id]) == null ? void 0 : _a.children[state.brand_id].children;
|
||||
});
|
||||
const selectBrand = (brand) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsList.vue:304", brand);
|
||||
state.brand_id = brand.value;
|
||||
state.brand_name = brand.label;
|
||||
state.product_ids = [0];
|
||||
state.product_name = brand.label;
|
||||
};
|
||||
const selectType = (type) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsList.vue:314", type);
|
||||
state.type_id = type.type_id;
|
||||
state.type_name = type.name;
|
||||
state.brand_id = 0;
|
||||
state.brand_name = "全部";
|
||||
state.product_ids = [0];
|
||||
};
|
||||
const selectPriceSort = (item) => {
|
||||
var _a;
|
||||
if (state.price_sort !== item.value) {
|
||||
state.price_sort = item.value;
|
||||
state.price_sort_name = item.text;
|
||||
} else {
|
||||
state.price_sort_name = "默认排序";
|
||||
state.price_sort = "";
|
||||
}
|
||||
(_a = selectPriceSortRef.value) == null ? void 0 : _a.toggle(false);
|
||||
paging.value.reload();
|
||||
};
|
||||
const selectDegree = (item) => {
|
||||
const index = state.degree_ids.indexOf(item.value);
|
||||
if (index > -1) {
|
||||
state.degree_ids.splice(index, 1);
|
||||
} else {
|
||||
state.degree_ids.push(item.value);
|
||||
}
|
||||
if (state.degree_ids.length > 0) {
|
||||
state.degree_name = "已选" + state.degree_ids.length.toString() + "项";
|
||||
} else {
|
||||
state.degree_name = "成色";
|
||||
}
|
||||
};
|
||||
const onResetDegree = () => {
|
||||
var _a;
|
||||
state.degree_ids = [];
|
||||
state.degree_name = "成色";
|
||||
(_a = selectDegreeRef.value) == null ? void 0 : _a.toggle(false);
|
||||
paging.value.reload();
|
||||
};
|
||||
const onConfirmDegree = () => {
|
||||
var _a;
|
||||
if (state.degree_ids.length > 0) {
|
||||
state.degree_name = "已选" + state.degree_ids.length.toString() + "项";
|
||||
} else {
|
||||
state.degree_name = "成色";
|
||||
}
|
||||
(_a = selectDegreeRef.value) == null ? void 0 : _a.toggle(false);
|
||||
paging.value.reload();
|
||||
};
|
||||
const queryList = (pageNo, pageSize) => {
|
||||
const params = {
|
||||
pageSize,
|
||||
page: pageNo,
|
||||
price_sort: state.price_sort,
|
||||
degree_ids: state.degree_ids,
|
||||
type_id: state.type_id,
|
||||
brand_id: state.brand_id,
|
||||
product_ids: state.product_ids,
|
||||
search: state.search_val
|
||||
};
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsList.vue:387", params);
|
||||
api_goods.fetchSysGoodsList(params).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsList.vue:389", "res=>", res.list);
|
||||
paging.value.complete(res.list);
|
||||
}).catch((res) => {
|
||||
paging.value.complete(false);
|
||||
});
|
||||
};
|
||||
const init = () => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsList.vue:406", "init111");
|
||||
api_goods.fetchFilterParmas().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsList.vue:409", res);
|
||||
let degree_params = res.degree_list;
|
||||
state.degree_params = degree_params.reduce((it, cit) => {
|
||||
it.push({
|
||||
text: cit.degree_name,
|
||||
value: cit.degree_id
|
||||
});
|
||||
return it;
|
||||
}, state.degree_params) || [];
|
||||
state.type_params = res.type_list;
|
||||
state.drop_down_options = res.drop_down_options;
|
||||
state.o_drop_down_options = res.o_drop_down_options;
|
||||
});
|
||||
};
|
||||
common_vendor.onShow(() => {
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsList.vue:428", "onshow---");
|
||||
common_vendor.index.__f__("log", "at pages/config/goodsList.vue:429", "paging.value", paging.value);
|
||||
if (paging.value) {
|
||||
paging.value.refresh();
|
||||
}
|
||||
});
|
||||
common_vendor.onMounted(() => {
|
||||
init();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
var _a;
|
||||
return {
|
||||
a: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/goodsAdd")),
|
||||
b: common_vendor.p({
|
||||
type: "primary",
|
||||
block: true,
|
||||
plain: true
|
||||
}),
|
||||
c: common_vendor.o(onSearch),
|
||||
d: common_vendor.p({
|
||||
type: "primary"
|
||||
}),
|
||||
e: common_vendor.o(onSearch),
|
||||
f: common_vendor.o(onClear),
|
||||
g: common_vendor.o(($event) => state.search_val = $event),
|
||||
h: common_vendor.p({
|
||||
placeholder: "请输入商品名称",
|
||||
clearable: true,
|
||||
["input-background"]: "#eee",
|
||||
modelValue: state.search_val
|
||||
}),
|
||||
i: common_vendor.f(state.price_sort_params, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.text),
|
||||
b: state.price_sort === item.value ? 1 : "",
|
||||
c: idx,
|
||||
d: common_vendor.o(($event) => selectPriceSort(item), idx)
|
||||
};
|
||||
}),
|
||||
j: common_vendor.sr(selectPriceSortRef, "d044a737-5,d044a737-4", {
|
||||
"k": "selectPriceSortRef"
|
||||
}),
|
||||
k: common_vendor.p({
|
||||
title: state.price_sort_name
|
||||
}),
|
||||
l: common_vendor.f(state.type_params, (type, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(type.name),
|
||||
b: idx,
|
||||
c: common_vendor.o(($event) => selectType(type), idx),
|
||||
d: state.type_id == type.type_id ? 1 : ""
|
||||
};
|
||||
}),
|
||||
m: common_vendor.f((_a = state == null ? void 0 : state.drop_down_options[state.type_id]) == null ? void 0 : _a.children, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.label),
|
||||
b: idx,
|
||||
c: common_vendor.o(($event) => selectBrand(item), idx),
|
||||
d: item.value == state.brand_id ? 1 : ""
|
||||
};
|
||||
}),
|
||||
n: common_vendor.f(productOptions.value, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.label),
|
||||
b: idx,
|
||||
c: state.product_ids.includes(item.value) ? 1 : "",
|
||||
d: common_vendor.o(($event) => selectProduct(item), idx)
|
||||
};
|
||||
}),
|
||||
o: common_vendor.o(($event) => onResetProduct()),
|
||||
p: common_vendor.p({
|
||||
plain: true,
|
||||
type: "default"
|
||||
}),
|
||||
q: common_vendor.o(($event) => onConfirmProduct()),
|
||||
r: common_vendor.p({
|
||||
block: true,
|
||||
type: "primary"
|
||||
}),
|
||||
s: common_vendor.sr(selectProductRef, "d044a737-6,d044a737-4", {
|
||||
"k": "selectProductRef"
|
||||
}),
|
||||
t: common_vendor.p({
|
||||
title: state.product_name
|
||||
}),
|
||||
v: common_vendor.f(state.degree_params, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.text),
|
||||
b: state.degree_ids.includes(item.value) ? 1 : "",
|
||||
c: idx,
|
||||
d: common_vendor.o(($event) => selectDegree(item), idx)
|
||||
};
|
||||
}),
|
||||
w: common_vendor.o(($event) => onResetDegree()),
|
||||
x: common_vendor.p({
|
||||
plain: true,
|
||||
type: "default"
|
||||
}),
|
||||
y: common_vendor.o(($event) => onConfirmDegree()),
|
||||
z: common_vendor.p({
|
||||
block: true,
|
||||
type: "primary"
|
||||
}),
|
||||
A: common_vendor.sr(selectDegreeRef, "d044a737-9,d044a737-4", {
|
||||
"k": "selectDegreeRef"
|
||||
}),
|
||||
B: common_vendor.p({
|
||||
title: state.degree_name
|
||||
}),
|
||||
C: common_vendor.p({
|
||||
["title-class"]: "titleClass"
|
||||
}),
|
||||
D: common_vendor.s("top:0px"),
|
||||
E: common_vendor.f(dataList.value, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: getImg(item),
|
||||
b: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/goodsDetail?id=" + item.goods_id), index),
|
||||
c: common_vendor.t(item.degree.degree_name),
|
||||
d: "d044a737-12-" + i0 + ",d044a737-0",
|
||||
e: common_vendor.t(item.goods_name),
|
||||
f: common_vendor.t(item.content),
|
||||
g: common_vendor.t(item.goods_price),
|
||||
h: common_vendor.t(item.status.text),
|
||||
i: item.status.value == 10 || item.status.value == 20
|
||||
}, item.status.value == 10 || item.status.value == 20 ? {
|
||||
j: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/goodsEdit?id=" + item.goods_id), index),
|
||||
k: "d044a737-13-" + i0 + ",d044a737-0",
|
||||
l: common_vendor.p({
|
||||
size: "small",
|
||||
type: "primary"
|
||||
})
|
||||
} : {}, {
|
||||
m: item.status.value == 40
|
||||
}, item.status.value == 40 ? {
|
||||
n: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/goodsEdit?id=" + item.goods_id), index),
|
||||
o: "d044a737-14-" + i0 + ",d044a737-0",
|
||||
p: common_vendor.p({
|
||||
size: "small",
|
||||
type: "primary"
|
||||
})
|
||||
} : {}, {
|
||||
q: index
|
||||
});
|
||||
}),
|
||||
F: common_vendor.p({
|
||||
["custom-color"]: "#1a1a1a"
|
||||
}),
|
||||
G: common_vendor.sr(paging, "d044a737-0", {
|
||||
"k": "paging"
|
||||
}),
|
||||
H: common_vendor.o(queryList),
|
||||
I: common_vendor.o(($event) => dataList.value = $event),
|
||||
J: common_vendor.p({
|
||||
["refresher-enabled"]: false,
|
||||
["auto-clean-list-when-reload"]: false,
|
||||
["auto-scroll-to-top-when-reload"]: false,
|
||||
modelValue: dataList.value
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-d044a737"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/config/goodsList.js.map
|
||||
12
unpackage/dist/dev/mp-weixin/pages/config/goodsList.json
vendored
Normal file
12
unpackage/dist/dev/mp-weixin/pages/config/goodsList.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"navigationBarTitleText": "商品管理",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"nut-button": "../../uni_modules/nutui-uni/components/button/button",
|
||||
"nut-searchbar": "../../uni_modules/nutui-uni/components/searchbar/searchbar",
|
||||
"nut-menu-item": "../../uni_modules/nutui-uni/components/menuitem/menuitem",
|
||||
"nut-menu": "../../uni_modules/nutui-uni/components/menu/menu",
|
||||
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
|
||||
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/config/goodsList.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/config/goodsList.wxml
vendored
Normal file
File diff suppressed because one or more lines are too long
312
unpackage/dist/dev/mp-weixin/pages/config/goodsList.wxss
vendored
Normal file
312
unpackage/dist/dev/mp-weixin/pages/config/goodsList.wxss
vendored
Normal file
@@ -0,0 +1,312 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page-content.data-v-d044a737 {
|
||||
min-height: 100vh;
|
||||
background-color: #f2f3f5;
|
||||
--nut-menu-bar-box-shadow: none;
|
||||
--nut-menu-item-content-padding: 20rpx;
|
||||
--nut-menu-item-content-max-height: 900rpx;
|
||||
--nut-searchbar-input-height: 40px;
|
||||
}
|
||||
.data-v-d044a737 .titleClass .nut-menu__title-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
}
|
||||
.top-bar.data-v-d044a737 {
|
||||
background: #fff;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 20rpx 60rpx;
|
||||
}
|
||||
.goods-item.data-v-d044a737 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 20rpx;
|
||||
gap: 20rpx;
|
||||
}
|
||||
.goods-item .goods-item-image.data-v-d044a737 {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
}
|
||||
.goods-item .goods-item-image .goods-item-image-img.data-v-d044a737 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.goods-item .goods-item-content.data-v-d044a737 {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
/* 首尾贴边,中间均分 */
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-header.data-v-d044a737 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 6rpx 0;
|
||||
gap: 20rpx;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-body.data-v-d044a737 {
|
||||
padding: 6rpx 0;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-body .goods-item-content-body-desc.data-v-d044a737 {
|
||||
color: #7c7c7c;
|
||||
font-size: 26rpx;
|
||||
/* 关键属性 */
|
||||
display: -webkit-box;
|
||||
/* 使用弹性盒子布局 */
|
||||
-webkit-box-orient: vertical;
|
||||
/* 垂直方向排列 */
|
||||
-webkit-line-clamp: 2;
|
||||
/* 限制显示两行 */
|
||||
overflow: hidden;
|
||||
/* 超出部分隐藏 */
|
||||
text-overflow: ellipsis;
|
||||
/* 超出时显示省略号 */
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-stock.data-v-d044a737 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-stock .goods-item-content-stock-desc.data-v-d044a737 {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-stock .goods-item-content-status-desc.data-v-d044a737 {
|
||||
font-size: 26rpx;
|
||||
color: red;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-footer.data-v-d044a737 {
|
||||
padding: 6rpx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-footer .goods-item-content-footer-btn.data-v-d044a737 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 10rpx;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-footer .goods-item-content-footer-btn .share-btn.data-v-d044a737 {
|
||||
border-radius: 50rpx;
|
||||
border: 2rpx solid red;
|
||||
font-size: 26rpx;
|
||||
align-items: center;
|
||||
height: 54rpx;
|
||||
color: red;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.filter-types.data-v-d044a737 {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
gap: 10rpx;
|
||||
padding: 10rpx;
|
||||
height: 60rpx;
|
||||
background-color: #fff;
|
||||
border-bottom: 2rpx solid gainsboro;
|
||||
border-top: 2rpx solid gainsboro;
|
||||
}
|
||||
.filter-types .filter-type-inner.data-v-d044a737 {
|
||||
align-items: center;
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 16rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
font-size: 28rpx;
|
||||
gap: 15rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
.filter-types .filter-type-inner.active.data-v-d044a737 {
|
||||
background-color: rgba(250, 44, 25, 0.1);
|
||||
color: var(--nutui-color-primary);
|
||||
}
|
||||
.tabs-container.data-v-d044a737 {
|
||||
display: flex;
|
||||
}
|
||||
.tabs-container .tab-pane-inner.data-v-d044a737 {
|
||||
height: 600rpx;
|
||||
}
|
||||
.tabs-container .tabs-inner.data-v-d044a737 {
|
||||
overflow-y: scroll;
|
||||
height: 600rpx;
|
||||
width: 160rpx;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.tabs-container .tabs-inner .tab-inner.data-v-d044a737 {
|
||||
display: flex;
|
||||
height: 60rpx;
|
||||
padding: 10rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #F5F5F5;
|
||||
}
|
||||
.tabs-container .tabs-inner .tab-inner text.data-v-d044a737 {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
}
|
||||
.tabs-container .tabs-inner .tab-inner-active.data-v-d044a737 {
|
||||
background-color: rgba(250, 44, 25, 0.1);
|
||||
color: var(--nutui-color-primary);
|
||||
}
|
||||
.degree-inner.data-v-d044a737 {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-wrap: wrap;
|
||||
gap: 10rpx;
|
||||
width: 100%;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
.degree-item.data-v-d044a737 {
|
||||
align-items: center;
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 10rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
font-size: 26rpx;
|
||||
gap: 10rpx;
|
||||
justify-content: center;
|
||||
min-height: 80rpx;
|
||||
width: calc(50% - 10rpx);
|
||||
}
|
||||
.degree-item.active.data-v-d044a737 {
|
||||
background-color: rgba(250, 44, 25, 0.1);
|
||||
color: var(--nutui-color-primary);
|
||||
}
|
||||
.product-btns.data-v-d044a737 {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.product-btns .reset.data-v-d044a737 {
|
||||
flex: 1;
|
||||
}
|
||||
.product-btns .confirm.data-v-d044a737 {
|
||||
flex: 2;
|
||||
}
|
||||
.degree-btns.data-v-d044a737 {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
.degree-btns .reset.data-v-d044a737 {
|
||||
flex: 1;
|
||||
/* 重置按钮占 1 份 */
|
||||
}
|
||||
.degree-btns .confirm.data-v-d044a737 {
|
||||
flex: 2;
|
||||
/* 确认按钮占 2 份 */
|
||||
}
|
||||
.main-nav-container.data-v-d044a737 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #fff;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.nav-button.data-v-d044a737 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 45%;
|
||||
height: 160rpx;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
.phone-button.data-v-d044a737 {
|
||||
background: linear-gradient(135deg, #6a5ae0, #8d7bfb);
|
||||
color: white;
|
||||
}
|
||||
.parts-button.data-v-d044a737 {
|
||||
background: linear-gradient(135deg, #ff6b6b, #ee5253);
|
||||
color: white;
|
||||
}
|
||||
.nav-button-bg.data-v-d044a737 {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
width: 50%;
|
||||
opacity: 0.2;
|
||||
object-fit: cover;
|
||||
}
|
||||
.nav-button-icon.data-v-d044a737 {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
margin-right: 20rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
.nav-button-content.data-v-d044a737 {
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.nav-button-title.data-v-d044a737 {
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.nav-button-desc.data-v-d044a737 {
|
||||
font-size: 24rpx;
|
||||
opacity: 0.85;
|
||||
}
|
||||
691
unpackage/dist/dev/mp-weixin/pages/config/price.js
vendored
Normal file
691
unpackage/dist/dev/mp-weixin/pages/config/price.js
vendored
Normal file
@@ -0,0 +1,691 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_config = require("../../api/config.js");
|
||||
const api_house_goods = require("../../api/house_goods.js");
|
||||
if (!Array) {
|
||||
const _easycom_z_tabs2 = common_vendor.resolveComponent("z-tabs");
|
||||
const _easycom_nut_noticebar2 = common_vendor.resolveComponent("nut-noticebar");
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
const _easycom_nut_input2 = common_vendor.resolveComponent("nut-input");
|
||||
const _easycom_nut_radio2 = common_vendor.resolveComponent("nut-radio");
|
||||
const _easycom_nut_radio_group2 = common_vendor.resolveComponent("nut-radio-group");
|
||||
const _easycom_nut_menu_item2 = common_vendor.resolveComponent("nut-menu-item");
|
||||
const _easycom_nut_menu2 = common_vendor.resolveComponent("nut-menu");
|
||||
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
|
||||
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||
const _easycom_nut_popup2 = common_vendor.resolveComponent("nut-popup");
|
||||
const _easycom_nut_switch2 = common_vendor.resolveComponent("nut-switch");
|
||||
const _easycom_nut_cell2 = common_vendor.resolveComponent("nut-cell");
|
||||
(_easycom_z_tabs2 + _easycom_nut_noticebar2 + _easycom_nut_button2 + _easycom_nut_input2 + _easycom_nut_radio2 + _easycom_nut_radio_group2 + _easycom_nut_menu_item2 + _easycom_nut_menu2 + _easycom_nut_tag2 + _easycom_z_paging2 + _easycom_nut_popup2 + _easycom_nut_switch2 + _easycom_nut_cell2)();
|
||||
}
|
||||
const _easycom_z_tabs = () => "../../uni_modules/z-tabs/components/z-tabs/z-tabs.js";
|
||||
const _easycom_nut_noticebar = () => "../../uni_modules/nutui-uni/components/noticebar/noticebar.js";
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
const _easycom_nut_input = () => "../../uni_modules/nutui-uni/components/input/input.js";
|
||||
const _easycom_nut_radio = () => "../../uni_modules/nutui-uni/components/radio/radio.js";
|
||||
const _easycom_nut_radio_group = () => "../../uni_modules/nutui-uni/components/radiogroup/radiogroup.js";
|
||||
const _easycom_nut_menu_item = () => "../../uni_modules/nutui-uni/components/menuitem/menuitem.js";
|
||||
const _easycom_nut_menu = () => "../../uni_modules/nutui-uni/components/menu/menu.js";
|
||||
const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js";
|
||||
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
||||
const _easycom_nut_popup = () => "../../uni_modules/nutui-uni/components/popup/popup.js";
|
||||
const _easycom_nut_switch = () => "../../uni_modules/nutui-uni/components/switch/switch.js";
|
||||
const _easycom_nut_cell = () => "../../uni_modules/nutui-uni/components/cell/cell.js";
|
||||
if (!Math) {
|
||||
(_easycom_z_tabs + _easycom_nut_noticebar + _easycom_nut_button + _easycom_nut_input + _easycom_nut_radio + _easycom_nut_radio_group + _easycom_nut_menu_item + _easycom_nut_menu + _easycom_nut_tag + _easycom_z_paging + _easycom_nut_popup + _easycom_nut_switch + _easycom_nut_cell)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "price",
|
||||
setup(__props) {
|
||||
common_vendor.onLoad((options) => {
|
||||
});
|
||||
const getImg = (goods) => {
|
||||
var _a, _b, _c;
|
||||
const url = (_c = (_b = (_a = goods == null ? void 0 : goods.goods_house) == null ? void 0 : _a.image) == null ? void 0 : _b[0]) == null ? void 0 : _c.file_path;
|
||||
return url ? url + "?imageView2/1/w/200/h/200" : "";
|
||||
};
|
||||
const getConfig = () => {
|
||||
api_config.fetchGetConfig().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:329", "getConfig=====>", res);
|
||||
isWarehouse.value = res.appConfig.is_warehouse == 1;
|
||||
});
|
||||
};
|
||||
const setConfig = () => {
|
||||
let form = {
|
||||
is_warehouse: Number(isWarehouse.value)
|
||||
};
|
||||
api_config.fetchSetConfig(form).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
icon: "none",
|
||||
title: "操作成功"
|
||||
});
|
||||
});
|
||||
};
|
||||
const getPrice = (goods) => {
|
||||
const list = singleRule.value || singleRule;
|
||||
const rule = list.find((item) => item.product_id === goods.goods_id);
|
||||
if (!rule) {
|
||||
return "未单独设置";
|
||||
}
|
||||
const basePrice = Number(goods.goods_price);
|
||||
const val = Number(rule.val);
|
||||
let finalPrice = basePrice;
|
||||
if (rule.val_type == 1) {
|
||||
finalPrice = basePrice + val;
|
||||
} else if (rule.val_type == 2) {
|
||||
finalPrice = basePrice + basePrice * val / 100;
|
||||
}
|
||||
return finalPrice.toFixed(2);
|
||||
};
|
||||
const paging = common_vendor.ref(null);
|
||||
const dataList = common_vendor.ref([]);
|
||||
const user_goods_cart_ids = common_vendor.ref([]);
|
||||
const goods_cart_ids = common_vendor.ref([]);
|
||||
const selectPriceSortRef = common_vendor.ref(null);
|
||||
const selectDegreeRef = common_vendor.ref(null);
|
||||
const selectProductRef = common_vendor.ref(null);
|
||||
const state = common_vendor.reactive({
|
||||
type_params: [],
|
||||
// 产品类型
|
||||
drop_down_options: [],
|
||||
// 产品类型下的品牌列表
|
||||
o_drop_down_options: [],
|
||||
// 价格排序
|
||||
price_sort_params: [
|
||||
{
|
||||
text: "默认排序",
|
||||
value: ""
|
||||
},
|
||||
{
|
||||
text: "价格升序",
|
||||
value: "ascend"
|
||||
},
|
||||
{
|
||||
text: "价格降序",
|
||||
value: "descend"
|
||||
}
|
||||
],
|
||||
// 成色所有选项
|
||||
degree_params: [],
|
||||
price_sort: "",
|
||||
price_sort_name: "默认排序",
|
||||
degree_ids: [],
|
||||
degree_name: "成色",
|
||||
product_name: "机型",
|
||||
type_id: 1,
|
||||
// 产品类型id 默认 1 手机
|
||||
type_name: "手机",
|
||||
brand_id: 0,
|
||||
// 品牌id // 默认 0 全部
|
||||
brand_name: "全部",
|
||||
product_ids: [0]
|
||||
// 机型ids 默认 0 全部
|
||||
// search_val: '', // 搜索
|
||||
});
|
||||
const onResetProduct = () => {
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:427", "重置产品");
|
||||
state.type_id = 1;
|
||||
state.type_name = "手机";
|
||||
state.brand_id = 0;
|
||||
state.brand_name = "全部";
|
||||
state.product_ids = [0];
|
||||
state.product_name = "机型";
|
||||
};
|
||||
const onConfirmProduct = () => {
|
||||
var _a;
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:438", "当前产品类型", {
|
||||
"type_id": state.type_id,
|
||||
"type_name": state.type_name,
|
||||
"brand_id": state.brand_id,
|
||||
"brand_name": state.brand_name,
|
||||
"product_ids": state.product_ids
|
||||
});
|
||||
(_a = selectProductRef.value) == null ? void 0 : _a.toggle(false);
|
||||
paging.value.reload();
|
||||
};
|
||||
const selectProduct = (product) => {
|
||||
if (product.value === 0) {
|
||||
state.product_ids = [0];
|
||||
} else {
|
||||
state.product_ids = state.product_ids.filter((e) => e != 0);
|
||||
const index = state.product_ids.indexOf(product.value);
|
||||
if (index > -1) {
|
||||
state.product_ids.splice(index, 1);
|
||||
if (state.product_ids.length === 0) {
|
||||
state.product_ids = [0];
|
||||
}
|
||||
} else {
|
||||
state.product_ids.push(product.value);
|
||||
}
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:466", product);
|
||||
};
|
||||
const productOptions = common_vendor.computed(() => {
|
||||
var _a;
|
||||
return (_a = state == null ? void 0 : state.o_drop_down_options[state.type_id]) == null ? void 0 : _a.children[state.brand_id].children;
|
||||
});
|
||||
const selectBrand = (brand) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:475", brand);
|
||||
state.brand_id = brand.value;
|
||||
state.brand_name = brand.label;
|
||||
state.product_ids = [0];
|
||||
state.product_name = brand.label;
|
||||
};
|
||||
const selectType = (type) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:487", type);
|
||||
state.type_id = type.type_id;
|
||||
state.type_name = type.name;
|
||||
state.brand_id = 0;
|
||||
state.brand_name = "全部";
|
||||
state.product_ids = [0];
|
||||
};
|
||||
const selectPriceSort = (item) => {
|
||||
var _a;
|
||||
if (state.price_sort !== item.value) {
|
||||
state.price_sort = item.value;
|
||||
state.price_sort_name = item.text;
|
||||
} else {
|
||||
state.price_sort_name = "默认排序";
|
||||
state.price_sort = "";
|
||||
}
|
||||
(_a = selectPriceSortRef.value) == null ? void 0 : _a.toggle(false);
|
||||
paging.value.reload();
|
||||
};
|
||||
const selectDegree = (item) => {
|
||||
const index = state.degree_ids.indexOf(item.value);
|
||||
if (index > -1) {
|
||||
state.degree_ids.splice(index, 1);
|
||||
} else {
|
||||
state.degree_ids.push(item.value);
|
||||
}
|
||||
if (state.degree_ids.length > 0) {
|
||||
state.degree_name = "已选" + state.degree_ids.length.toString() + "项";
|
||||
} else {
|
||||
state.degree_name = "成色";
|
||||
}
|
||||
};
|
||||
const onResetDegree = () => {
|
||||
var _a;
|
||||
state.degree_ids = [];
|
||||
state.degree_name = "成色";
|
||||
(_a = selectDegreeRef.value) == null ? void 0 : _a.toggle(false);
|
||||
paging.value.reload();
|
||||
};
|
||||
const onConfirmDegree = () => {
|
||||
var _a;
|
||||
if (state.degree_ids.length > 0) {
|
||||
state.degree_name = "已选" + state.degree_ids.length.toString() + "项";
|
||||
} else {
|
||||
state.degree_name = "成色";
|
||||
}
|
||||
(_a = selectDegreeRef.value) == null ? void 0 : _a.toggle(false);
|
||||
paging.value.reload();
|
||||
};
|
||||
const queryList = (pageNo, pageSize) => {
|
||||
const params = {
|
||||
pageSize,
|
||||
page: pageNo,
|
||||
price_sort: state.price_sort,
|
||||
degree_ids: state.degree_ids,
|
||||
type_id: state.type_id,
|
||||
brand_id: state.brand_id,
|
||||
product_ids: state.product_ids,
|
||||
search: state.search_val
|
||||
};
|
||||
api_house_goods.houseFetchGoodsList(params).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:561", res);
|
||||
paging.value.complete(res.list);
|
||||
user_goods_cart_ids.value = res.user_cart_goods_ids;
|
||||
goods_cart_ids.value = res.cart_goods_ids;
|
||||
}).catch((res) => {
|
||||
paging.value.complete(false);
|
||||
user_goods_cart_ids.value = [];
|
||||
goods_cart_ids.value = [];
|
||||
});
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
init();
|
||||
});
|
||||
const init = () => {
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:587", "init");
|
||||
getConfig();
|
||||
api_config.fetchGetPriceRules().then((res) => {
|
||||
var _a;
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:594", "res", res);
|
||||
rangeRule.value = (res == null ? void 0 : res.range) ?? [];
|
||||
singleRule.value = (res == null ? void 0 : res.single) ?? [];
|
||||
Object.assign(warehouseRule, ((_a = res == null ? void 0 : res.warehouse) == null ? void 0 : _a[0]) ?? {
|
||||
val: "",
|
||||
val_type: 1
|
||||
});
|
||||
});
|
||||
api_house_goods.houseFetchFilterParmas().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:609", res);
|
||||
let degree_params = res.degree_list;
|
||||
state.degree_params = degree_params.reduce((it, cit) => {
|
||||
it.push({
|
||||
text: cit.degree_name,
|
||||
value: cit.degree_id
|
||||
});
|
||||
return it;
|
||||
}, state.degree_params) || [];
|
||||
state.type_params = res.type_list;
|
||||
state.drop_down_options = res.drop_down_options;
|
||||
state.o_drop_down_options = res.o_drop_down_options;
|
||||
});
|
||||
};
|
||||
const showGoodsImages = (goods) => {
|
||||
var _a;
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:633", goods.goods_house);
|
||||
common_vendor.index.previewImage({
|
||||
// current: index, // 指定当前显示的图片索引
|
||||
urls: (_a = goods == null ? void 0 : goods.goods_house) == null ? void 0 : _a.image.map((e) => {
|
||||
return e.file_path;
|
||||
})
|
||||
});
|
||||
};
|
||||
const tabList = common_vendor.ref(["区间调价", "单机调价", "整仓调价"]);
|
||||
const tabIndex = common_vendor.ref(0);
|
||||
const tabsChange = (index) => {
|
||||
tabIndex.value = index;
|
||||
};
|
||||
const isWarehouse = common_vendor.ref(false);
|
||||
const warehouseRule = common_vendor.reactive({
|
||||
val: "",
|
||||
val_type: 1
|
||||
});
|
||||
const onIsWarehouseChange = (val) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:667", isWarehouse.value);
|
||||
setConfig();
|
||||
};
|
||||
const saveWarehouseRule = () => {
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:673", warehouseRule);
|
||||
let data = {
|
||||
warehouseRule: {
|
||||
...warehouseRule
|
||||
}
|
||||
};
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:679", data);
|
||||
submit(data, 3);
|
||||
};
|
||||
const singleRule = common_vendor.ref([]);
|
||||
const tempSingleRule = common_vendor.reactive({
|
||||
val: "",
|
||||
val_type: 1,
|
||||
product_id: 0
|
||||
});
|
||||
const showEdit = common_vendor.ref(false);
|
||||
const detail = common_vendor.reactive({});
|
||||
const onEdit = (goods) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:698", "----", goods);
|
||||
Object.assign(detail, goods);
|
||||
showEdit.value = true;
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:701", "----", detail.value);
|
||||
};
|
||||
const onClosePopup = () => {
|
||||
Object.assign(detail, {});
|
||||
Object.assign(tempSingleRule, {
|
||||
val: "",
|
||||
val_type: 1,
|
||||
product_id: 0
|
||||
});
|
||||
showEdit.value = false;
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:712", "关闭");
|
||||
};
|
||||
const saveSingleRule = () => {
|
||||
tempSingleRule.product_id = detail.goods_id;
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:719", "tempSingleRule.value", tempSingleRule);
|
||||
let data = {
|
||||
singleRule: {
|
||||
...tempSingleRule
|
||||
}
|
||||
};
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:725", data);
|
||||
submit(data, 2);
|
||||
};
|
||||
const rangeRule = common_vendor.ref([]);
|
||||
const addRule = () => {
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:735", rangeRule.value);
|
||||
rangeRule.value.unshift({
|
||||
min_price: "",
|
||||
max_price: "",
|
||||
val: "",
|
||||
val_type: 1
|
||||
});
|
||||
};
|
||||
const removeRule = (index) => {
|
||||
rangeRule.value.splice(index, 1);
|
||||
};
|
||||
const saveRangeRule = () => {
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:749", rangeRule.value);
|
||||
let data = {
|
||||
rangeRule: rangeRule.value
|
||||
};
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:753", data);
|
||||
submit(data, 1);
|
||||
};
|
||||
const submit = (data, type) => {
|
||||
api_config.fetchSetPriceRules(data).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
icon: "none",
|
||||
title: "规则配置成功"
|
||||
});
|
||||
api_config.fetchGetPriceRules().then((res2) => {
|
||||
var _a;
|
||||
common_vendor.index.__f__("log", "at pages/config/price.vue:767", "res", res2);
|
||||
rangeRule.value = (res2 == null ? void 0 : res2.range) ?? [];
|
||||
singleRule.value = (res2 == null ? void 0 : res2.single) ?? [];
|
||||
Object.assign(warehouseRule, ((_a = res2 == null ? void 0 : res2.warehouse) == null ? void 0 : _a[0]) ?? {
|
||||
val: "",
|
||||
val_type: 1
|
||||
});
|
||||
if (type == 2) {
|
||||
onClosePopup();
|
||||
paging.value.refresh();
|
||||
}
|
||||
if (type == 3) {
|
||||
getConfig();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
var _a, _b, _c, _d, _e, _f;
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o(tabsChange),
|
||||
b: common_vendor.p({
|
||||
list: tabList.value,
|
||||
["active-color"]: "rgba(233, 100, 67, 1)"
|
||||
}),
|
||||
c: tabIndex.value == 0
|
||||
}, tabIndex.value == 0 ? {
|
||||
d: common_vendor.p({
|
||||
text: "区间调价:可以针对价格区间进行批量固定加价,或者按照原价的百分比加价",
|
||||
background: `rgba(251, 248, 220, 1)`,
|
||||
["custom-color"]: `#D9500B`
|
||||
})
|
||||
} : {}, {
|
||||
e: tabIndex.value == 1
|
||||
}, tabIndex.value == 1 ? {
|
||||
f: common_vendor.p({
|
||||
text: "单机调价:针对某款机器进行固定加价,或者按照原价的百分比加价",
|
||||
background: `rgba(251, 248, 220, 1)`,
|
||||
["custom-color"]: `#D9500B`
|
||||
})
|
||||
} : {}, {
|
||||
g: tabIndex.value == 2
|
||||
}, tabIndex.value == 2 ? {
|
||||
h: common_vendor.p({
|
||||
text: "整仓调价:针对整个仓库进行固定加价,或者按照原价的百分比加价",
|
||||
background: `rgba(251, 248, 220, 1)`,
|
||||
["custom-color"]: `#D9500B`
|
||||
})
|
||||
} : {}, {
|
||||
i: tabIndex.value == 0
|
||||
}, tabIndex.value == 0 ? {
|
||||
j: common_vendor.o(addRule),
|
||||
k: common_vendor.p({
|
||||
type: "primary",
|
||||
plain: true
|
||||
}),
|
||||
l: common_vendor.o(saveRangeRule),
|
||||
m: common_vendor.p({
|
||||
type: "primary"
|
||||
}),
|
||||
n: common_vendor.f(rangeRule.value, (item, index, i0) => {
|
||||
return {
|
||||
a: "9320a8b3-6-" + i0,
|
||||
b: common_vendor.o(($event) => item.min_price = $event, index),
|
||||
c: common_vendor.p({
|
||||
type: "number",
|
||||
placeholder: "0",
|
||||
["input-align"]: "right",
|
||||
modelValue: item.min_price
|
||||
}),
|
||||
d: "9320a8b3-7-" + i0,
|
||||
e: common_vendor.o(($event) => item.max_price = $event, index),
|
||||
f: common_vendor.p({
|
||||
type: "number",
|
||||
placeholder: "0",
|
||||
["input-align"]: "right",
|
||||
modelValue: item.max_price
|
||||
}),
|
||||
g: "9320a8b3-8-" + i0,
|
||||
h: common_vendor.o(($event) => item.val = $event, index),
|
||||
i: common_vendor.p({
|
||||
type: "number",
|
||||
placeholder: "0",
|
||||
["input-align"]: "right",
|
||||
modelValue: item.val
|
||||
}),
|
||||
j: "9320a8b3-10-" + i0 + "," + ("9320a8b3-9-" + i0),
|
||||
k: "9320a8b3-11-" + i0 + "," + ("9320a8b3-9-" + i0),
|
||||
l: "9320a8b3-9-" + i0,
|
||||
m: common_vendor.o(($event) => item.val_type = $event, index),
|
||||
n: common_vendor.p({
|
||||
direction: "horizontal",
|
||||
modelValue: item.val_type
|
||||
}),
|
||||
o: common_vendor.o(($event) => removeRule(index), index),
|
||||
p: "9320a8b3-12-" + i0,
|
||||
q: index
|
||||
};
|
||||
}),
|
||||
o: common_vendor.p({
|
||||
label: 1
|
||||
}),
|
||||
p: common_vendor.p({
|
||||
label: 2
|
||||
}),
|
||||
q: common_vendor.p({
|
||||
type: "danger",
|
||||
size: "mini"
|
||||
})
|
||||
} : {}, {
|
||||
r: tabIndex.value == 1
|
||||
}, tabIndex.value == 1 ? {
|
||||
s: common_vendor.f(state.price_sort_params, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.text),
|
||||
b: state.price_sort === item.value ? 1 : "",
|
||||
c: idx,
|
||||
d: common_vendor.o(($event) => selectPriceSort(item), idx)
|
||||
};
|
||||
}),
|
||||
t: common_vendor.sr(selectPriceSortRef, "9320a8b3-14,9320a8b3-13", {
|
||||
"k": "selectPriceSortRef"
|
||||
}),
|
||||
v: common_vendor.p({
|
||||
title: state.price_sort_name
|
||||
}),
|
||||
w: common_vendor.f(state.type_params, (type, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(type.name),
|
||||
b: idx,
|
||||
c: common_vendor.o(($event) => selectType(type), idx),
|
||||
d: state.type_id == type.type_id ? 1 : ""
|
||||
};
|
||||
}),
|
||||
x: common_vendor.f((_a = state == null ? void 0 : state.drop_down_options[state.type_id]) == null ? void 0 : _a.children, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.label),
|
||||
b: idx,
|
||||
c: common_vendor.o(($event) => selectBrand(item), idx),
|
||||
d: item.value == state.brand_id ? 1 : ""
|
||||
};
|
||||
}),
|
||||
y: common_vendor.f(productOptions.value, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.label),
|
||||
b: idx,
|
||||
c: state.product_ids.includes(item.value) ? 1 : "",
|
||||
d: common_vendor.o(($event) => selectProduct(item), idx)
|
||||
};
|
||||
}),
|
||||
z: common_vendor.o(($event) => onResetProduct()),
|
||||
A: common_vendor.p({
|
||||
plain: true,
|
||||
type: "default"
|
||||
}),
|
||||
B: common_vendor.o(($event) => onConfirmProduct()),
|
||||
C: common_vendor.p({
|
||||
block: true,
|
||||
type: "primary"
|
||||
}),
|
||||
D: common_vendor.sr(selectProductRef, "9320a8b3-15,9320a8b3-13", {
|
||||
"k": "selectProductRef"
|
||||
}),
|
||||
E: common_vendor.p({
|
||||
title: state.product_name
|
||||
}),
|
||||
F: common_vendor.f(state.degree_params, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.text),
|
||||
b: state.degree_ids.includes(item.value) ? 1 : "",
|
||||
c: idx,
|
||||
d: common_vendor.o(($event) => selectDegree(item), idx)
|
||||
};
|
||||
}),
|
||||
G: common_vendor.o(($event) => onResetDegree()),
|
||||
H: common_vendor.p({
|
||||
plain: true,
|
||||
type: "default"
|
||||
}),
|
||||
I: common_vendor.o(($event) => onConfirmDegree()),
|
||||
J: common_vendor.p({
|
||||
block: true,
|
||||
type: "primary"
|
||||
}),
|
||||
K: common_vendor.sr(selectDegreeRef, "9320a8b3-18,9320a8b3-13", {
|
||||
"k": "selectDegreeRef"
|
||||
}),
|
||||
L: common_vendor.p({
|
||||
title: state.degree_name
|
||||
}),
|
||||
M: common_vendor.p({
|
||||
["title-class"]: "titleClass"
|
||||
}),
|
||||
N: common_vendor.f(dataList.value, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: getImg(item),
|
||||
b: common_vendor.o(($event) => showGoodsImages(item), index),
|
||||
c: common_vendor.t(item.goods_house.degree.degree_name),
|
||||
d: "9320a8b3-22-" + i0 + ",9320a8b3-21",
|
||||
e: common_vendor.t(item.goods_house.goods_name),
|
||||
f: common_vendor.t(item.goods_house.content),
|
||||
g: common_vendor.t(item.goods_house.goods_price),
|
||||
h: common_vendor.t(getPrice(item)),
|
||||
i: !goods_cart_ids.value.includes(item.goods_id) && !user_goods_cart_ids.value.includes(item.goods_id)
|
||||
}, !goods_cart_ids.value.includes(item.goods_id) && !user_goods_cart_ids.value.includes(item.goods_id) ? {
|
||||
j: common_vendor.o(($event) => onEdit(item), index),
|
||||
k: "9320a8b3-23-" + i0 + ",9320a8b3-21",
|
||||
l: common_vendor.p({
|
||||
size: "small",
|
||||
type: "primary"
|
||||
})
|
||||
} : {
|
||||
m: "9320a8b3-24-" + i0 + ",9320a8b3-21",
|
||||
n: common_vendor.p({
|
||||
size: "small",
|
||||
plain: true
|
||||
})
|
||||
}, {
|
||||
o: index
|
||||
});
|
||||
}),
|
||||
O: common_vendor.p({
|
||||
["custom-color"]: "#1a1a1a"
|
||||
}),
|
||||
P: common_vendor.sr(paging, "9320a8b3-21", {
|
||||
"k": "paging"
|
||||
}),
|
||||
Q: common_vendor.o(queryList),
|
||||
R: common_vendor.o(($event) => dataList.value = $event),
|
||||
S: common_vendor.p({
|
||||
fixed: false,
|
||||
["refresher-enabled"]: false,
|
||||
["auto-clean-list-when-reload"]: false,
|
||||
["auto-scroll-to-top-when-reload"]: false,
|
||||
modelValue: dataList.value
|
||||
})
|
||||
} : {}, {
|
||||
T: getImg(detail),
|
||||
U: common_vendor.o(($event) => showGoodsImages(detail)),
|
||||
V: common_vendor.t((_c = (_b = detail == null ? void 0 : detail.goods_house) == null ? void 0 : _b.degree) == null ? void 0 : _c.degree_name),
|
||||
W: common_vendor.p({
|
||||
["custom-color"]: "#1a1a1a"
|
||||
}),
|
||||
X: common_vendor.t((_d = detail == null ? void 0 : detail.goods_house) == null ? void 0 : _d.goods_name),
|
||||
Y: common_vendor.t((_e = detail == null ? void 0 : detail.goods_house) == null ? void 0 : _e.content),
|
||||
Z: common_vendor.t((_f = detail == null ? void 0 : detail.goods_house) == null ? void 0 : _f.goods_price),
|
||||
aa: common_vendor.t(getPrice(detail)),
|
||||
ab: common_vendor.o(($event) => tempSingleRule.val = $event),
|
||||
ac: common_vendor.p({
|
||||
type: "number",
|
||||
placeholder: "0",
|
||||
["input-align"]: "right",
|
||||
modelValue: tempSingleRule.val
|
||||
}),
|
||||
ad: common_vendor.p({
|
||||
label: 1
|
||||
}),
|
||||
ae: common_vendor.p({
|
||||
label: 2
|
||||
}),
|
||||
af: common_vendor.o(($event) => tempSingleRule.val_type = $event),
|
||||
ag: common_vendor.p({
|
||||
direction: "horizontal",
|
||||
modelValue: tempSingleRule.val_type
|
||||
}),
|
||||
ah: common_vendor.o(($event) => saveSingleRule()),
|
||||
ai: common_vendor.p({
|
||||
type: "primary",
|
||||
block: true
|
||||
}),
|
||||
aj: common_vendor.o(onClosePopup),
|
||||
ak: common_vendor.o(($event) => showEdit.value = $event),
|
||||
al: common_vendor.p({
|
||||
["custom-style"]: {
|
||||
height: "45%"
|
||||
},
|
||||
position: "bottom",
|
||||
["safe-area-inset-bottom"]: true,
|
||||
visible: showEdit.value
|
||||
}),
|
||||
am: tabIndex.value == 2
|
||||
}, tabIndex.value == 2 ? {
|
||||
an: common_vendor.o(onIsWarehouseChange),
|
||||
ao: common_vendor.o(($event) => isWarehouse.value = $event),
|
||||
ap: common_vendor.p({
|
||||
modelValue: isWarehouse.value
|
||||
}),
|
||||
aq: common_vendor.o(($event) => warehouseRule.val = $event),
|
||||
ar: common_vendor.p({
|
||||
type: "number",
|
||||
placeholder: "0",
|
||||
["input-align"]: "right",
|
||||
modelValue: warehouseRule.val
|
||||
}),
|
||||
as: common_vendor.p({
|
||||
label: 1
|
||||
}),
|
||||
at: common_vendor.p({
|
||||
label: 2
|
||||
}),
|
||||
av: common_vendor.o(($event) => warehouseRule.val_type = $event),
|
||||
aw: common_vendor.p({
|
||||
direction: "horizontal",
|
||||
modelValue: warehouseRule.val_type
|
||||
}),
|
||||
ax: common_vendor.o(($event) => saveWarehouseRule()),
|
||||
ay: common_vendor.p({
|
||||
type: "primary",
|
||||
block: true
|
||||
})
|
||||
} : {});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9320a8b3"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/config/price.js.map
|
||||
19
unpackage/dist/dev/mp-weixin/pages/config/price.json
vendored
Normal file
19
unpackage/dist/dev/mp-weixin/pages/config/price.json
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"navigationBarTitleText": "价格调整",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"z-tabs": "../../uni_modules/z-tabs/components/z-tabs/z-tabs",
|
||||
"nut-noticebar": "../../uni_modules/nutui-uni/components/noticebar/noticebar",
|
||||
"nut-button": "../../uni_modules/nutui-uni/components/button/button",
|
||||
"nut-input": "../../uni_modules/nutui-uni/components/input/input",
|
||||
"nut-radio": "../../uni_modules/nutui-uni/components/radio/radio",
|
||||
"nut-radio-group": "../../uni_modules/nutui-uni/components/radiogroup/radiogroup",
|
||||
"nut-menu-item": "../../uni_modules/nutui-uni/components/menuitem/menuitem",
|
||||
"nut-menu": "../../uni_modules/nutui-uni/components/menu/menu",
|
||||
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
|
||||
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging",
|
||||
"nut-popup": "../../uni_modules/nutui-uni/components/popup/popup",
|
||||
"nut-switch": "../../uni_modules/nutui-uni/components/switch/switch",
|
||||
"nut-cell": "../../uni_modules/nutui-uni/components/cell/cell"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/config/price.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/config/price.wxml
vendored
Normal file
File diff suppressed because one or more lines are too long
373
unpackage/dist/dev/mp-weixin/pages/config/price.wxss
vendored
Normal file
373
unpackage/dist/dev/mp-weixin/pages/config/price.wxss
vendored
Normal file
@@ -0,0 +1,373 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page-content.data-v-9320a8b3 {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
--nut-menu-bar-box-shadow: none;
|
||||
--nut-menu-item-content-padding: 20rpx;
|
||||
--nut-menu-item-content-max-height: 900rpx;
|
||||
}
|
||||
|
||||
/* Tabs 固定在顶部 */
|
||||
.tabs-wrapper.data-v-9320a8b3 {
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 999;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/* 滚动区域撑满剩余高度 */
|
||||
.scroll-area.data-v-9320a8b3 {
|
||||
flex: 1;
|
||||
background-color: #f2f3f5;
|
||||
/* 灰色背景 */
|
||||
}
|
||||
.top-bar.data-v-9320a8b3 {
|
||||
background: #fff;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
/* 规则样式 */
|
||||
.rule-item.data-v-9320a8b3 {
|
||||
background: #fff;
|
||||
padding: 20rpx;
|
||||
margin: 20rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.row.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.field.data-v-9320a8b3 {
|
||||
width: 48%;
|
||||
}
|
||||
.label.data-v-9320a8b3 {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
margin-bottom: 6rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
.delete-btn.data-v-9320a8b3 {
|
||||
text-align: right;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.data-v-9320a8b3 .titleClass .nut-menu__title-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
}
|
||||
.filter-types.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
gap: 10rpx;
|
||||
padding: 10rpx;
|
||||
height: 60rpx;
|
||||
background-color: #fff;
|
||||
border-bottom: 2rpx solid gainsboro;
|
||||
border-top: 2rpx solid gainsboro;
|
||||
}
|
||||
.filter-types .filter-type-inner.data-v-9320a8b3 {
|
||||
align-items: center;
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 16rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
font-size: 28rpx;
|
||||
gap: 15rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
.filter-types .filter-type-inner.active.data-v-9320a8b3 {
|
||||
background-color: rgba(250, 44, 25, 0.1);
|
||||
color: var(--nutui-color-primary);
|
||||
}
|
||||
.tabs-container.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
}
|
||||
.tabs-container .tab-pane-inner.data-v-9320a8b3 {
|
||||
height: 600rpx;
|
||||
}
|
||||
.tabs-container .tabs-inner.data-v-9320a8b3 {
|
||||
overflow-y: scroll;
|
||||
height: 600rpx;
|
||||
width: 160rpx;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.tabs-container .tabs-inner .tab-inner.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
height: 60rpx;
|
||||
padding: 10rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #F5F5F5;
|
||||
}
|
||||
.tabs-container .tabs-inner .tab-inner text.data-v-9320a8b3 {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
}
|
||||
.tabs-container .tabs-inner .tab-inner-active.data-v-9320a8b3 {
|
||||
background-color: rgba(250, 44, 25, 0.1);
|
||||
color: var(--nutui-color-primary);
|
||||
}
|
||||
.degree-inner.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-wrap: wrap;
|
||||
gap: 10rpx;
|
||||
width: 100%;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
.degree-item.data-v-9320a8b3 {
|
||||
align-items: center;
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 10rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
font-size: 26rpx;
|
||||
gap: 10rpx;
|
||||
justify-content: center;
|
||||
min-height: 80rpx;
|
||||
width: calc(50% - 10rpx);
|
||||
}
|
||||
.degree-item.active.data-v-9320a8b3 {
|
||||
background-color: rgba(250, 44, 25, 0.1);
|
||||
color: var(--nutui-color-primary);
|
||||
}
|
||||
.product-btns.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.product-btns .reset.data-v-9320a8b3 {
|
||||
flex: 1;
|
||||
}
|
||||
.product-btns .confirm.data-v-9320a8b3 {
|
||||
flex: 2;
|
||||
}
|
||||
.degree-btns.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
.degree-btns .reset.data-v-9320a8b3 {
|
||||
flex: 1;
|
||||
/* 重置按钮占 1 份 */
|
||||
}
|
||||
.degree-btns .confirm.data-v-9320a8b3 {
|
||||
flex: 2;
|
||||
/* 确认按钮占 2 份 */
|
||||
}
|
||||
.goods-item.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 20rpx;
|
||||
gap: 20rpx;
|
||||
}
|
||||
.goods-item .goods-item-image.data-v-9320a8b3 {
|
||||
width: 170rpx;
|
||||
height: 170rpx;
|
||||
}
|
||||
.goods-item .goods-item-image .goods-item-image-img.data-v-9320a8b3 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.goods-item .goods-item-content.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
/* 首尾贴边,中间均分 */
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-header.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10rpx 0;
|
||||
gap: 20rpx;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-body.data-v-9320a8b3 {
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-body .goods-item-content-body-desc.data-v-9320a8b3 {
|
||||
color: #7c7c7c;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-footer.data-v-9320a8b3 {
|
||||
padding: 10rpx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-footer .goods-item-content-footer-btn.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 10rpx;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-footer .goods-item-content-footer-btn .share-btn.data-v-9320a8b3 {
|
||||
border-radius: 50rpx;
|
||||
border: 2rpx solid red;
|
||||
font-size: 26rpx;
|
||||
align-items: center;
|
||||
height: 54rpx;
|
||||
color: red;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/** 商品弹出改价 **/
|
||||
.goods-popup .goods-card-edit.data-v-9320a8b3 {
|
||||
background: #fff;
|
||||
padding: 20rpx;
|
||||
margin: 20rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.goods-popup .goods-card-edit .row.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.goods-popup .goods-card-edit .field.data-v-9320a8b3 {
|
||||
width: 48%;
|
||||
}
|
||||
.goods-popup .goods-card-edit .label.data-v-9320a8b3 {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
margin-bottom: 6rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
.goods-popup .goods-card.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.goods-popup .goods-card .goods-card-left.data-v-9320a8b3 {
|
||||
width: 190rpx;
|
||||
height: 190rpx;
|
||||
}
|
||||
.goods-popup .goods-card .goods-card-left image.data-v-9320a8b3 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.goods-popup .goods-card .goods-card-right.data-v-9320a8b3 {
|
||||
flex: 1;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
.goods-popup .goods-card .goods-card-right .goods-card-right-top.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10rpx 0;
|
||||
gap: 20rpx;
|
||||
}
|
||||
.goods-popup .goods-card .goods-card-right .goods-card-right-middle.data-v-9320a8b3 {
|
||||
margin-top: 10rpx;
|
||||
margin-bottom: 10rpx;
|
||||
color: #7c7c7c;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.goods-popup .goods-card .goods-card-right .goods-card-right-bottom.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/******/
|
||||
.switch-lab.data-v-9320a8b3 {
|
||||
padding: 0 10px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #909ca4;
|
||||
}
|
||||
.warehouse .warehouse-edit.data-v-9320a8b3 {
|
||||
background: #fff;
|
||||
padding: 20rpx;
|
||||
margin: 20rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.warehouse .warehouse-edit .row.data-v-9320a8b3 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.warehouse .warehouse-edit .field.data-v-9320a8b3 {
|
||||
width: 48%;
|
||||
}
|
||||
.warehouse .warehouse-edit .label.data-v-9320a8b3 {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
margin-bottom: 6rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
128
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/detail.js
vendored
Normal file
128
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/detail.js
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const api_order = require("../../../api/order.js");
|
||||
const utils_helper = require("../../../utils/helper.js");
|
||||
const api_config = require("../../../api/config.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_step2 = common_vendor.resolveComponent("nut-step");
|
||||
const _easycom_nut_steps2 = common_vendor.resolveComponent("nut-steps");
|
||||
const _easycom_nut_cell2 = common_vendor.resolveComponent("nut-cell");
|
||||
const _easycom_nut_cell_group2 = common_vendor.resolveComponent("nut-cell-group");
|
||||
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
|
||||
const _easycom_nut_price2 = common_vendor.resolveComponent("nut-price");
|
||||
(_easycom_nut_step2 + _easycom_nut_steps2 + _easycom_nut_cell2 + _easycom_nut_cell_group2 + _easycom_nut_tag2 + _easycom_nut_price2)();
|
||||
}
|
||||
const _easycom_nut_step = () => "../../../uni_modules/nutui-uni/components/step/step.js";
|
||||
const _easycom_nut_steps = () => "../../../uni_modules/nutui-uni/components/steps/steps.js";
|
||||
const _easycom_nut_cell = () => "../../../uni_modules/nutui-uni/components/cell/cell.js";
|
||||
const _easycom_nut_cell_group = () => "../../../uni_modules/nutui-uni/components/cellgroup/cellgroup.js";
|
||||
const _easycom_nut_tag = () => "../../../uni_modules/nutui-uni/components/tag/tag.js";
|
||||
const _easycom_nut_price = () => "../../../uni_modules/nutui-uni/components/price/price.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_step + _easycom_nut_steps + _easycom_nut_cell + _easycom_nut_cell_group + _easycom_nut_tag + _easycom_nut_price)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "detail",
|
||||
setup(__props) {
|
||||
const audit = common_vendor.ref(true);
|
||||
const id = common_vendor.ref(0);
|
||||
const detail = common_vendor.reactive({});
|
||||
const images = common_vendor.ref([]);
|
||||
common_vendor.onLoad((options) => {
|
||||
id.value = options.id;
|
||||
});
|
||||
common_vendor.onShow(() => {
|
||||
getConfig();
|
||||
api_order.fetchOrderDetail(id.value).then((res) => {
|
||||
Object.assign(detail, res);
|
||||
});
|
||||
});
|
||||
const getConfig = () => {
|
||||
api_config.fetchGetConfig().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/shopOrder/detail.vue:126", "getConfig=====>", res);
|
||||
audit.value = res.appConfig.is_audit == 1;
|
||||
common_vendor.index.__f__("log", "at pages/config/shopOrder/detail.vue:128", res.appConfig.pay_imgs);
|
||||
let pay_imgs = JSON.parse(res.appConfig.pay_imgs) || [];
|
||||
let wechat_imgs = JSON.parse(res.appConfig.wechat_imgs) || [];
|
||||
let pay_imgs_arr = pay_imgs.map((item) => item.file_path) || [];
|
||||
let wechat_imgs_arr = wechat_imgs.map((item) => item.file_path) || [];
|
||||
const merged_imgs_arr = pay_imgs_arr.concat(wechat_imgs_arr);
|
||||
images.value = merged_imgs_arr;
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
title: "待付款"
|
||||
}),
|
||||
b: common_vendor.p({
|
||||
title: "待发货"
|
||||
}),
|
||||
c: common_vendor.p({
|
||||
title: "待收货"
|
||||
}),
|
||||
d: common_vendor.p({
|
||||
title: "已完成"
|
||||
}),
|
||||
e: common_vendor.p({
|
||||
current: detail.progress
|
||||
}),
|
||||
f: detail.address_info
|
||||
}, detail.address_info ? {
|
||||
g: common_vendor.t(detail.address_info.user_name),
|
||||
h: common_vendor.t(detail.address_info.tel_number),
|
||||
i: common_vendor.t(detail.address_info.province_name + detail.address_info.city_name + detail.address_info.county_name + detail.address_info.street_name + detail.address_info.detail_info_new)
|
||||
} : {}, {
|
||||
j: common_vendor.f(detail.goods, (goods, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(goods.snapshot_info.degree.degree_name),
|
||||
b: "4bf0d63e-9-" + i0 + "," + ("4bf0d63e-8-" + i0),
|
||||
c: common_vendor.t(goods.goods_name),
|
||||
d: common_vendor.t(goods.goods_no),
|
||||
e: "4bf0d63e-10-" + i0 + "," + ("4bf0d63e-8-" + i0),
|
||||
f: common_vendor.p({
|
||||
price: goods.goods_price,
|
||||
size: "small",
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
g: index,
|
||||
h: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/mall/detail?id=" + goods.goods_id), index),
|
||||
i: "4bf0d63e-8-" + i0 + ",4bf0d63e-7"
|
||||
};
|
||||
}),
|
||||
k: common_vendor.p({
|
||||
["custom-color"]: "#1a1a1a"
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
center: true
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
price: detail.pay_price,
|
||||
size: "normal",
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
n: common_vendor.p({
|
||||
title: "订单编号",
|
||||
desc: detail.order_no
|
||||
}),
|
||||
o: common_vendor.p({
|
||||
title: "下单时间",
|
||||
desc: detail.create_time
|
||||
}),
|
||||
p: detail.progress >= 3
|
||||
}, detail.progress >= 3 ? {
|
||||
q: common_vendor.p({
|
||||
title: "物流公司",
|
||||
desc: detail.express_company
|
||||
}),
|
||||
r: common_vendor.p({
|
||||
title: "物流单号",
|
||||
desc: detail.express_no
|
||||
})
|
||||
} : {});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-4bf0d63e"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/config/shopOrder/detail.js.map
|
||||
11
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/detail.json
vendored
Normal file
11
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/detail.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"navigationBarTitleText": "店铺订单-详情",
|
||||
"usingComponents": {
|
||||
"nut-step": "../../../uni_modules/nutui-uni/components/step/step",
|
||||
"nut-steps": "../../../uni_modules/nutui-uni/components/steps/steps",
|
||||
"nut-cell": "../../../uni_modules/nutui-uni/components/cell/cell",
|
||||
"nut-cell-group": "../../../uni_modules/nutui-uni/components/cellgroup/cellgroup",
|
||||
"nut-tag": "../../../uni_modules/nutui-uni/components/tag/tag",
|
||||
"nut-price": "../../../uni_modules/nutui-uni/components/price/price"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/detail.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/detail.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="page-content data-v-4bf0d63e"><nut-steps wx:if="{{e}}" class="data-v-4bf0d63e" u-s="{{['d']}}" u-i="4bf0d63e-0" bind:__l="__l" u-p="{{e}}"><nut-step wx:if="{{a}}" class="data-v-4bf0d63e" u-s="{{['d']}}" u-i="4bf0d63e-1,4bf0d63e-0" bind:__l="__l" u-p="{{a}}">1</nut-step><nut-step wx:if="{{b}}" class="data-v-4bf0d63e" u-s="{{['d']}}" u-i="4bf0d63e-2,4bf0d63e-0" bind:__l="__l" u-p="{{b}}">2</nut-step><nut-step wx:if="{{c}}" class="data-v-4bf0d63e" u-s="{{['d']}}" u-i="4bf0d63e-3,4bf0d63e-0" bind:__l="__l" u-p="{{c}}">3</nut-step><nut-step wx:if="{{d}}" class="data-v-4bf0d63e" u-s="{{['d']}}" u-i="4bf0d63e-4,4bf0d63e-0" bind:__l="__l" u-p="{{d}}">4</nut-step></nut-steps><nut-cell-group class="data-v-4bf0d63e" u-s="{{['d']}}" u-i="4bf0d63e-5" bind:__l="__l"><nut-cell class="data-v-4bf0d63e" u-s="{{['d']}}" u-i="4bf0d63e-6,4bf0d63e-5" bind:__l="__l"><view wx:if="{{f}}" class="address-inner data-v-4bf0d63e"><text class="data-v-4bf0d63e">{{g}} - {{h}}</text><text class="data-v-4bf0d63e">{{i}}</text></view></nut-cell></nut-cell-group><nut-cell-group class="data-v-4bf0d63e" u-s="{{['d']}}" u-i="4bf0d63e-7" bind:__l="__l"><nut-cell wx:for="{{j}}" wx:for-item="goods" wx:key="g" class="data-v-4bf0d63e" u-s="{{['title','link']}}" bindclick="{{goods.h}}" u-i="{{goods.i}}" bind:__l="__l" u-p="{{l}}"><view class="goods-info-row data-v-4bf0d63e" slot="title"><view class="left-text data-v-4bf0d63e"><view class="goods-name data-v-4bf0d63e"><nut-tag wx:if="{{k}}" class="data-v-4bf0d63e" u-s="{{['d']}}" u-i="{{goods.b}}" bind:__l="__l" u-p="{{k}}">{{goods.a}}</nut-tag><text class="data-v-4bf0d63e" style="margin-left:10rpx">{{goods.c}}</text></view><text class="goods-no data-v-4bf0d63e">串号:{{goods.d}}</text></view></view><nut-price class="data-v-4bf0d63e" u-i="{{goods.e}}" bind:__l="__l" u-p="{{goods.f}}" slot="link"/></nut-cell></nut-cell-group><nut-cell-group class="data-v-4bf0d63e" u-s="{{['d']}}" u-i="4bf0d63e-11" bind:__l="__l"><nut-cell class="data-v-4bf0d63e" u-s="{{['d']}}" u-i="4bf0d63e-12,4bf0d63e-11" bind:__l="__l"><view class="total-price-inner data-v-4bf0d63e"><text class="data-v-4bf0d63e">商品总额</text><nut-price wx:if="{{m}}" class="data-v-4bf0d63e" u-i="4bf0d63e-13,4bf0d63e-12" bind:__l="__l" u-p="{{m}}"/></view></nut-cell></nut-cell-group><nut-cell-group class="data-v-4bf0d63e" u-s="{{['d']}}" u-i="4bf0d63e-14" bind:__l="__l"><nut-cell wx:if="{{n}}" class="data-v-4bf0d63e" u-i="4bf0d63e-15,4bf0d63e-14" bind:__l="__l" u-p="{{n}}"/><nut-cell wx:if="{{o}}" class="data-v-4bf0d63e" u-i="4bf0d63e-16,4bf0d63e-14" bind:__l="__l" u-p="{{o}}"/></nut-cell-group><nut-cell-group wx:if="{{p}}" class="data-v-4bf0d63e" u-s="{{['d']}}" u-i="4bf0d63e-17" bind:__l="__l"><nut-cell wx:if="{{q}}" class="data-v-4bf0d63e" u-i="4bf0d63e-18,4bf0d63e-17" bind:__l="__l" u-p="{{q}}"/><nut-cell wx:if="{{r}}" class="data-v-4bf0d63e" u-i="4bf0d63e-19,4bf0d63e-17" bind:__l="__l" u-p="{{r}}"/></nut-cell-group></view>
|
||||
77
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/detail.wxss
vendored
Normal file
77
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/detail.wxss
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page-content.data-v-4bf0d63e {
|
||||
min-height: 100vh;
|
||||
background-color: #f2f3f5;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.address-inner.data-v-4bf0d63e {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.total-price-inner.data-v-4bf0d63e {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.total-price-inner view.data-v-4bf0d63e:nth-child(2) {
|
||||
color: #fa2c19;
|
||||
}
|
||||
.wechat-img-inner.data-v-4bf0d63e {
|
||||
margin-top: 60rpx;
|
||||
padding: 0rpx 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
407
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/index.js
vendored
Normal file
407
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/index.js
vendored
Normal file
@@ -0,0 +1,407 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const api_order = require("../../../api/order.js");
|
||||
const api_config = require("../../../api/config.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_dialog2 = common_vendor.resolveComponent("nut-dialog");
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
const _easycom_nut_searchbar2 = common_vendor.resolveComponent("nut-searchbar");
|
||||
const _easycom_nut_tabs2 = common_vendor.resolveComponent("nut-tabs");
|
||||
const _easycom_nut_sticky2 = common_vendor.resolveComponent("nut-sticky");
|
||||
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
|
||||
const _easycom_nut_price2 = common_vendor.resolveComponent("nut-price");
|
||||
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||
const _easycom_nut_cell2 = common_vendor.resolveComponent("nut-cell");
|
||||
const _easycom_nut_cell_group2 = common_vendor.resolveComponent("nut-cell-group");
|
||||
const _easycom_nut_input2 = common_vendor.resolveComponent("nut-input");
|
||||
const _easycom_nut_form_item2 = common_vendor.resolveComponent("nut-form-item");
|
||||
const _easycom_nut_form2 = common_vendor.resolveComponent("nut-form");
|
||||
const _easycom_nut_popup2 = common_vendor.resolveComponent("nut-popup");
|
||||
(_easycom_nut_dialog2 + _easycom_nut_button2 + _easycom_nut_searchbar2 + _easycom_nut_tabs2 + _easycom_nut_sticky2 + _easycom_nut_tag2 + _easycom_nut_price2 + _easycom_z_paging2 + _easycom_nut_cell2 + _easycom_nut_cell_group2 + _easycom_nut_input2 + _easycom_nut_form_item2 + _easycom_nut_form2 + _easycom_nut_popup2)();
|
||||
}
|
||||
const _easycom_nut_dialog = () => "../../../uni_modules/nutui-uni/components/dialog/dialog.js";
|
||||
const _easycom_nut_button = () => "../../../uni_modules/nutui-uni/components/button/button.js";
|
||||
const _easycom_nut_searchbar = () => "../../../uni_modules/nutui-uni/components/searchbar/searchbar.js";
|
||||
const _easycom_nut_tabs = () => "../../../uni_modules/nutui-uni/components/tabs/tabs.js";
|
||||
const _easycom_nut_sticky = () => "../../../uni_modules/nutui-uni/components/sticky/sticky.js";
|
||||
const _easycom_nut_tag = () => "../../../uni_modules/nutui-uni/components/tag/tag.js";
|
||||
const _easycom_nut_price = () => "../../../uni_modules/nutui-uni/components/price/price.js";
|
||||
const _easycom_z_paging = () => "../../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
||||
const _easycom_nut_cell = () => "../../../uni_modules/nutui-uni/components/cell/cell.js";
|
||||
const _easycom_nut_cell_group = () => "../../../uni_modules/nutui-uni/components/cellgroup/cellgroup.js";
|
||||
const _easycom_nut_input = () => "../../../uni_modules/nutui-uni/components/input/input.js";
|
||||
const _easycom_nut_form_item = () => "../../../uni_modules/nutui-uni/components/formitem/formitem.js";
|
||||
const _easycom_nut_form = () => "../../../uni_modules/nutui-uni/components/form/form.js";
|
||||
const _easycom_nut_popup = () => "../../../uni_modules/nutui-uni/components/popup/popup.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_dialog + _easycom_nut_button + _easycom_nut_searchbar + _easycom_nut_tabs + _easycom_nut_sticky + _easycom_nut_tag + _easycom_nut_price + _easycom_z_paging + _easycom_nut_cell + _easycom_nut_cell_group + _easycom_nut_input + _easycom_nut_form_item + _easycom_nut_form + _easycom_nut_popup)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const audit = common_vendor.ref(true);
|
||||
const images = common_vendor.ref([]);
|
||||
const openDeliveryPopup = common_vendor.ref(false);
|
||||
const orderDetail = common_vendor.reactive({});
|
||||
const form = common_vendor.reactive({
|
||||
order_id: 0,
|
||||
express_company: "",
|
||||
express_no: ""
|
||||
});
|
||||
const deliveryOrder = () => {
|
||||
form.order_id = orderDetail.order_id;
|
||||
common_vendor.index.__f__("log", "at pages/config/shopOrder/index.vue:233", "form===>", form);
|
||||
api_order.fetchDeliveryOrder(form).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
icon: "none",
|
||||
title: "发货成功"
|
||||
});
|
||||
onCloseDeliveryPopup();
|
||||
paging.value.reload();
|
||||
});
|
||||
};
|
||||
const onClickDeliveryOrder = (order) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/shopOrder/index.vue:246", order);
|
||||
Object.assign(orderDetail, order);
|
||||
openDeliveryPopup.value = true;
|
||||
};
|
||||
const onCloseDeliveryPopup = () => {
|
||||
Object.assign(orderDetail, {});
|
||||
Object.assign(form, {
|
||||
order_id: 0,
|
||||
express_company: "",
|
||||
express_no: ""
|
||||
});
|
||||
openDeliveryPopup.value = false;
|
||||
common_vendor.index.__f__("log", "at pages/config/shopOrder/index.vue:262", "关闭");
|
||||
};
|
||||
const current_tab_idx = common_vendor.ref(0);
|
||||
const dataList = common_vendor.ref([]);
|
||||
const paging = common_vendor.ref(null);
|
||||
const tabs_config = [
|
||||
{
|
||||
title: "全部",
|
||||
status: "all"
|
||||
},
|
||||
{
|
||||
title: "待付款",
|
||||
status: "payment"
|
||||
},
|
||||
{
|
||||
title: "待发货",
|
||||
status: "delivery"
|
||||
},
|
||||
{
|
||||
title: "待收货",
|
||||
status: "received"
|
||||
},
|
||||
{
|
||||
title: "已完成",
|
||||
status: "finish"
|
||||
}
|
||||
];
|
||||
const visibleCancelOrderDialog = common_vendor.ref(false);
|
||||
const current_cancel_order_id = common_vendor.ref(0);
|
||||
const visiblePayOrderDialog = common_vendor.ref(false);
|
||||
const current_pay_order_id = common_vendor.ref(0);
|
||||
const search_val = common_vendor.ref("");
|
||||
const onChangeTab = (item, idx) => {
|
||||
current_tab_idx.value = idx;
|
||||
paging.value.reload();
|
||||
};
|
||||
const getConfig = () => {
|
||||
api_config.fetchGetConfig().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/shopOrder/index.vue:326", "getConfig=====>", res);
|
||||
audit.value = res.appConfig.is_audit == 1;
|
||||
common_vendor.index.__f__("log", "at pages/config/shopOrder/index.vue:328", res.appConfig.pay_imgs);
|
||||
let pay_imgs = JSON.parse(res.appConfig.pay_imgs) || [];
|
||||
let wechat_imgs = JSON.parse(res.appConfig.wechat_imgs) || [];
|
||||
let pay_imgs_arr = pay_imgs.map((item) => item.file_path) || [];
|
||||
let wechat_imgs_arr = wechat_imgs.map((item) => item.file_path) || [];
|
||||
const merged_imgs_arr = pay_imgs_arr.concat(wechat_imgs_arr);
|
||||
images.value = merged_imgs_arr;
|
||||
});
|
||||
};
|
||||
const navigateToDetail = (id) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/shopOrder/index.vue:355", id);
|
||||
if (!id) {
|
||||
common_vendor.index.__f__("warn", "at pages/config/shopOrder/index.vue:357", "导航ID不能为空");
|
||||
return;
|
||||
}
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/config/shopOrder/detail?id=${encodeURIComponent(id)}`
|
||||
});
|
||||
};
|
||||
const onClickCancelOrder = () => {
|
||||
api_order.fetchCancelOrder(current_cancel_order_id.value).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
title: "取消成功",
|
||||
icon: "none"
|
||||
});
|
||||
paging.value.reload();
|
||||
});
|
||||
};
|
||||
const onClickPayOrder = () => {
|
||||
api_order.fetchPayOrder(current_pay_order_id.value).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
title: "标记付款成功",
|
||||
icon: "none"
|
||||
});
|
||||
paging.value.reload();
|
||||
});
|
||||
};
|
||||
const apiFetchOrderList = (pageNo = 1, pageSize = 10) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/shopOrder/index.vue:395", tabs_config[current_tab_idx.value]["status"]);
|
||||
const params = {
|
||||
page: pageNo,
|
||||
pageSize: 10,
|
||||
status: tabs_config[current_tab_idx.value]["status"],
|
||||
goods_no: search_val.value
|
||||
};
|
||||
api_order.fetchOrderList(params).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/shopOrder/index.vue:403", res);
|
||||
paging.value.complete(res.list);
|
||||
}).catch((res) => {
|
||||
paging.value.complete(false);
|
||||
});
|
||||
};
|
||||
common_vendor.onLoad((options) => {
|
||||
current_tab_idx.value = parseInt(options.tab);
|
||||
});
|
||||
common_vendor.onShow(() => {
|
||||
getConfig();
|
||||
if (paging.value) {
|
||||
paging.value.refresh();
|
||||
}
|
||||
});
|
||||
const onSearch = () => {
|
||||
common_vendor.index.__f__("log", "at pages/config/shopOrder/index.vue:433", "搜索:", search_val.value);
|
||||
paging.value.reload();
|
||||
};
|
||||
const onClear = () => {
|
||||
common_vendor.index.__f__("log", "at pages/config/shopOrder/index.vue:439", "搜索:", search_val.value);
|
||||
paging.value.reload();
|
||||
};
|
||||
const getStatusText = (order) => {
|
||||
if (order.order_status.value == 20) {
|
||||
return order.order_status.text;
|
||||
} else if (order.order_status.value == 30) {
|
||||
return order.order_status.text;
|
||||
} else if (order.order_status.value == 10) {
|
||||
if (order.pay_status.value == 10) {
|
||||
return order.pay_status.text;
|
||||
} else if (order.pay_status.value == 20) {
|
||||
if (order.delivery_status.value == 10) {
|
||||
return order.delivery_status.text;
|
||||
} else if (order.delivery_status.value == 20) {
|
||||
return order.receipt_status.text;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o(($event) => visibleCancelOrderDialog.value = false),
|
||||
b: common_vendor.o(onClickCancelOrder),
|
||||
c: common_vendor.o(($event) => visibleCancelOrderDialog.value = $event),
|
||||
d: common_vendor.p({
|
||||
title: "取消订单",
|
||||
content: "确认取消吗?此操作不可恢复!",
|
||||
visible: visibleCancelOrderDialog.value
|
||||
}),
|
||||
e: common_vendor.o(($event) => visiblePayOrderDialog.value = false),
|
||||
f: common_vendor.o(onClickPayOrder),
|
||||
g: common_vendor.o(($event) => visiblePayOrderDialog.value = $event),
|
||||
h: common_vendor.p({
|
||||
title: "标记付款",
|
||||
content: "确认标记吗?此操作不可恢复!",
|
||||
visible: visiblePayOrderDialog.value
|
||||
}),
|
||||
i: common_vendor.o(onSearch),
|
||||
j: common_vendor.p({
|
||||
size: "small",
|
||||
type: "primary"
|
||||
}),
|
||||
k: common_vendor.o(onSearch),
|
||||
l: common_vendor.o(onClear),
|
||||
m: common_vendor.o(($event) => search_val.value = $event),
|
||||
n: common_vendor.p({
|
||||
placeholder: "请输入商品串号",
|
||||
clearable: true,
|
||||
["input-background"]: "#eee",
|
||||
modelValue: search_val.value
|
||||
}),
|
||||
o: common_vendor.f(tabs_config, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.title),
|
||||
b: idx,
|
||||
c: idx === current_tab_idx.value ? 1 : "",
|
||||
d: common_vendor.o(($event) => onChangeTab(item, idx), idx)
|
||||
};
|
||||
}),
|
||||
p: common_vendor.o(($event) => current_tab_idx.value = $event),
|
||||
q: common_vendor.p({
|
||||
background: "#fff",
|
||||
modelValue: current_tab_idx.value
|
||||
}),
|
||||
r: common_vendor.f(dataList.value, (order, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(order.create_time),
|
||||
b: common_vendor.t(getStatusText(order)),
|
||||
c: "c1fe0406-7-" + i0 + ",c1fe0406-6",
|
||||
d: common_vendor.f(order.goods, (goods, iidx, i1) => {
|
||||
return {
|
||||
a: common_vendor.t(goods.snapshot_info.degree.degree_name),
|
||||
b: "c1fe0406-8-" + i0 + "-" + i1 + ",c1fe0406-6",
|
||||
c: common_vendor.t(goods.goods_name),
|
||||
d: common_vendor.t(goods.goods_no),
|
||||
e: "c1fe0406-9-" + i0 + "-" + i1 + ",c1fe0406-6",
|
||||
f: common_vendor.p({
|
||||
price: goods.goods_price,
|
||||
size: "small",
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
g: iidx,
|
||||
h: common_vendor.o(($event) => navigateToDetail(order.order_id), iidx)
|
||||
};
|
||||
}),
|
||||
e: "c1fe0406-10-" + i0 + ",c1fe0406-6",
|
||||
f: common_vendor.p({
|
||||
price: order.total_price,
|
||||
size: "normal",
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
g: order.order_status.value === 10
|
||||
}, order.order_status.value === 10 ? common_vendor.e({
|
||||
h: order.delivery_status.value !== 20
|
||||
}, order.delivery_status.value !== 20 ? {
|
||||
i: common_vendor.o(($event) => {
|
||||
visibleCancelOrderDialog.value = true;
|
||||
current_cancel_order_id.value = order.order_id;
|
||||
}, index),
|
||||
j: "c1fe0406-11-" + i0 + ",c1fe0406-6",
|
||||
k: common_vendor.p({
|
||||
plain: true,
|
||||
size: "small"
|
||||
})
|
||||
} : {}, {
|
||||
l: order.pay_status.value === 10 && !audit.value
|
||||
}, order.pay_status.value === 10 && !audit.value ? {
|
||||
m: common_vendor.o(($event) => {
|
||||
visiblePayOrderDialog.value = true;
|
||||
current_pay_order_id.value = order.order_id;
|
||||
}, index),
|
||||
n: "c1fe0406-12-" + i0 + ",c1fe0406-6",
|
||||
o: common_vendor.p({
|
||||
type: "primary",
|
||||
size: "small"
|
||||
})
|
||||
} : {}, {
|
||||
p: order.pay_status.value === 20 && order.delivery_status.value === 10
|
||||
}, order.pay_status.value === 20 && order.delivery_status.value === 10 ? {
|
||||
q: common_vendor.o(($event) => onClickDeliveryOrder(order), index),
|
||||
r: "c1fe0406-13-" + i0 + ",c1fe0406-6",
|
||||
s: common_vendor.p({
|
||||
type: "primary",
|
||||
size: "small"
|
||||
})
|
||||
} : {}) : {}, {
|
||||
t: index
|
||||
});
|
||||
}),
|
||||
s: common_vendor.p({
|
||||
["custom-color"]: "#1a1a1a"
|
||||
}),
|
||||
t: common_vendor.p({
|
||||
["custom-color"]: "#1a1a1a"
|
||||
}),
|
||||
v: common_vendor.sr(paging, "c1fe0406-6", {
|
||||
"k": "paging"
|
||||
}),
|
||||
w: common_vendor.o(apiFetchOrderList),
|
||||
x: common_vendor.o(($event) => dataList.value = $event),
|
||||
y: common_vendor.p({
|
||||
fixed: false,
|
||||
modelValue: dataList.value
|
||||
}),
|
||||
z: orderDetail.address_info
|
||||
}, orderDetail.address_info ? {
|
||||
A: common_vendor.t(orderDetail.address_info.user_name),
|
||||
B: common_vendor.t(orderDetail.address_info.tel_number),
|
||||
C: common_vendor.t(orderDetail.address_info.province_name + orderDetail.address_info.city_name + orderDetail.address_info.county_name + orderDetail.address_info.street_name + orderDetail.address_info.detail_info_new)
|
||||
} : {}, {
|
||||
D: common_vendor.f(orderDetail.goods, (goods, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(goods.snapshot_info.degree.degree_name),
|
||||
b: "c1fe0406-19-" + i0 + "," + ("c1fe0406-18-" + i0),
|
||||
c: common_vendor.t(goods.goods_name),
|
||||
d: common_vendor.t(goods.goods_no),
|
||||
e: "c1fe0406-20-" + i0 + "," + ("c1fe0406-18-" + i0),
|
||||
f: common_vendor.p({
|
||||
price: goods.goods_price,
|
||||
size: "small",
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
g: index,
|
||||
h: "c1fe0406-18-" + i0 + ",c1fe0406-17"
|
||||
};
|
||||
}),
|
||||
E: common_vendor.p({
|
||||
["custom-color"]: "#1a1a1a"
|
||||
}),
|
||||
F: common_vendor.p({
|
||||
center: true
|
||||
}),
|
||||
G: common_vendor.p({
|
||||
price: orderDetail.pay_price,
|
||||
size: "normal",
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
H: common_vendor.p({
|
||||
title: "订单编号",
|
||||
desc: orderDetail.order_no
|
||||
}),
|
||||
I: common_vendor.p({
|
||||
title: "下单时间",
|
||||
desc: orderDetail.create_time
|
||||
}),
|
||||
J: common_vendor.o(($event) => form.express_company = $event),
|
||||
K: common_vendor.p({
|
||||
placeholder: "请输入物流公司",
|
||||
type: "text",
|
||||
modelValue: form.express_company
|
||||
}),
|
||||
L: common_vendor.p({
|
||||
label: "物流公司名称"
|
||||
}),
|
||||
M: common_vendor.o(($event) => form.express_no = $event),
|
||||
N: common_vendor.p({
|
||||
placeholder: "请输入物流单号",
|
||||
type: "text",
|
||||
modelValue: form.express_no
|
||||
}),
|
||||
O: common_vendor.p({
|
||||
label: "物流单号"
|
||||
}),
|
||||
P: common_vendor.o(deliveryOrder),
|
||||
Q: common_vendor.p({
|
||||
type: "primary",
|
||||
block: true
|
||||
}),
|
||||
R: common_vendor.o(onCloseDeliveryPopup),
|
||||
S: common_vendor.o(($event) => openDeliveryPopup.value = $event),
|
||||
T: common_vendor.p({
|
||||
["custom-style"]: {
|
||||
height: "65%"
|
||||
},
|
||||
position: "bottom",
|
||||
["safe-area-inset-bottom"]: true,
|
||||
visible: openDeliveryPopup.value
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c1fe0406"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/config/shopOrder/index.js.map
|
||||
19
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/index.json
vendored
Normal file
19
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/index.json
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"navigationBarTitleText": "店铺订单",
|
||||
"usingComponents": {
|
||||
"nut-dialog": "../../../uni_modules/nutui-uni/components/dialog/dialog",
|
||||
"nut-button": "../../../uni_modules/nutui-uni/components/button/button",
|
||||
"nut-searchbar": "../../../uni_modules/nutui-uni/components/searchbar/searchbar",
|
||||
"nut-tabs": "../../../uni_modules/nutui-uni/components/tabs/tabs",
|
||||
"nut-sticky": "../../../uni_modules/nutui-uni/components/sticky/sticky",
|
||||
"nut-tag": "../../../uni_modules/nutui-uni/components/tag/tag",
|
||||
"nut-price": "../../../uni_modules/nutui-uni/components/price/price",
|
||||
"z-paging": "../../../uni_modules/z-paging/components/z-paging/z-paging",
|
||||
"nut-cell": "../../../uni_modules/nutui-uni/components/cell/cell",
|
||||
"nut-cell-group": "../../../uni_modules/nutui-uni/components/cellgroup/cellgroup",
|
||||
"nut-input": "../../../uni_modules/nutui-uni/components/input/input",
|
||||
"nut-form-item": "../../../uni_modules/nutui-uni/components/formitem/formitem",
|
||||
"nut-form": "../../../uni_modules/nutui-uni/components/form/form",
|
||||
"nut-popup": "../../../uni_modules/nutui-uni/components/popup/popup"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/index.wxml
vendored
Normal file
File diff suppressed because one or more lines are too long
181
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/index.wxss
vendored
Normal file
181
unpackage/dist/dev/mp-weixin/pages/config/shopOrder/index.wxss
vendored
Normal file
@@ -0,0 +1,181 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page-content.data-v-c1fe0406 {
|
||||
min-height: 100vh;
|
||||
background-color: #f2f3f5;
|
||||
}
|
||||
.order-popup .address-inner.data-v-c1fe0406 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.order-popup .total-price-inner.data-v-c1fe0406 {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.order-popup .total-price-inner view.data-v-c1fe0406:nth-child(2) {
|
||||
color: #fa2c19;
|
||||
}
|
||||
.wechat-img-inner.data-v-c1fe0406 {
|
||||
margin-top: 60rpx;
|
||||
padding: 0rpx 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.order-list.data-v-c1fe0406 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
.order-inner.data-v-c1fe0406 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #fff;
|
||||
border-radius: 15rpx;
|
||||
overflow: hidden;
|
||||
margin: 20rpx;
|
||||
/* 信息行布局 */
|
||||
}
|
||||
.order-inner .order-inner-header.data-v-c1fe0406 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #dcdcdc;
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
font-size: 24rpx;
|
||||
justify-content: space-between;
|
||||
line-height: 45rpx;
|
||||
padding: 15rpx 20rpx;
|
||||
}
|
||||
.order-inner .goods-info-row.data-v-c1fe0406 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
border-bottom: 2rpx solid #f2f3f5;
|
||||
/* 左侧文字样式 */
|
||||
/* 右侧价格样式 */
|
||||
}
|
||||
.order-inner .goods-info-row .left-text.data-v-c1fe0406 {
|
||||
flex: 1;
|
||||
}
|
||||
.order-inner .goods-info-row .goods-name.data-v-c1fe0406 {
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
display: block;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.order-inner .goods-info-row .goods-no.data-v-c1fe0406 {
|
||||
font-size: 26rpx;
|
||||
color: #000000;
|
||||
display: block;
|
||||
}
|
||||
.order-inner .goods-info-row .price.data-v-c1fe0406 {
|
||||
margin-left: 20rpx;
|
||||
align-self: center;
|
||||
/* 垂直居中在两行文字之间 */
|
||||
}
|
||||
.order-inner .footer.data-v-c1fe0406 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.order-inner .footer .order-inner-price.data-v-c1fe0406 {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-top: 10rpx;
|
||||
padding-right: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
font-size: 24rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.order-inner .footer .order-inner-action.data-v-c1fe0406 {
|
||||
display: flex;
|
||||
padding-top: 10rpx;
|
||||
padding-bottom: 30rpx;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.title-list.data-v-c1fe0406 {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
.title-list .title-item.data-v-c1fe0406 {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
.title-list .tabs-active.data-v-c1fe0406 {
|
||||
font-weight: bold;
|
||||
color: var(--nut-tabs-titles-item-active-color, var(--nut-title-color, #1a1a1a));
|
||||
opacity: var(--nut-tabs-titles-item-line-opacity, 1);
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
.title-list .tabs-active .item__line.data-v-c1fe0406 {
|
||||
position: absolute;
|
||||
bottom: -10%;
|
||||
left: 50%;
|
||||
overflow: hidden;
|
||||
content: " ";
|
||||
border-radius: var(--nut-tabs-titles-item-line-border-radius, 0);
|
||||
opacity: var(--nut-tabs-titles-item-line-opacity, 1);
|
||||
transition: width 0.3s ease;
|
||||
transform: translate(-50%, 0);
|
||||
width: var(--nut-tabs-horizontal-titles-item-active-line-width, 40px);
|
||||
height: 3px;
|
||||
content: " ";
|
||||
background: var(--nut-tabs-horizontal-tab-line-color, linear-gradient(90deg, var(--nut-primary-color, #fa2c19) 0%, rgba(250, 44, 25, 0.15) 100%));
|
||||
}
|
||||
305
unpackage/dist/dev/mp-weixin/pages/config/store.js
vendored
Normal file
305
unpackage/dist/dev/mp-weixin/pages/config/store.js
vendored
Normal file
@@ -0,0 +1,305 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_config = require("../../api/config.js");
|
||||
const api_request = require("../../api/request.js");
|
||||
const api_house_order = require("../../api/house_order.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_cell2 = common_vendor.resolveComponent("nut-cell");
|
||||
const _easycom_nut_cell_group2 = common_vendor.resolveComponent("nut-cell-group");
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
const _easycom_nut_input2 = common_vendor.resolveComponent("nut-input");
|
||||
const _easycom_nut_form_item2 = common_vendor.resolveComponent("nut-form-item");
|
||||
const _easycom_nut_textarea2 = common_vendor.resolveComponent("nut-textarea");
|
||||
const _easycom_nut_switch2 = common_vendor.resolveComponent("nut-switch");
|
||||
const _easycom_shmily_drag_image2 = common_vendor.resolveComponent("shmily-drag-image");
|
||||
const _easycom_nut_form2 = common_vendor.resolveComponent("nut-form");
|
||||
(_easycom_nut_cell2 + _easycom_nut_cell_group2 + _easycom_nut_button2 + _easycom_nut_input2 + _easycom_nut_form_item2 + _easycom_nut_textarea2 + _easycom_nut_switch2 + _easycom_shmily_drag_image2 + _easycom_nut_form2)();
|
||||
}
|
||||
const _easycom_nut_cell = () => "../../uni_modules/nutui-uni/components/cell/cell.js";
|
||||
const _easycom_nut_cell_group = () => "../../uni_modules/nutui-uni/components/cellgroup/cellgroup.js";
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
const _easycom_nut_input = () => "../../uni_modules/nutui-uni/components/input/input.js";
|
||||
const _easycom_nut_form_item = () => "../../uni_modules/nutui-uni/components/formitem/formitem.js";
|
||||
const _easycom_nut_textarea = () => "../../uni_modules/nutui-uni/components/textarea/textarea.js";
|
||||
const _easycom_nut_switch = () => "../../uni_modules/nutui-uni/components/switch/switch.js";
|
||||
const _easycom_shmily_drag_image = () => "../../uni_modules/shmily-drag-image/components/shmily-drag-image/shmily-drag-image.js";
|
||||
const _easycom_nut_form = () => "../../uni_modules/nutui-uni/components/form/form.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_cell + _easycom_nut_cell_group + _easycom_nut_button + _easycom_nut_input + _easycom_nut_form_item + _easycom_nut_textarea + _easycom_nut_switch + _easycom_shmily_drag_image + _easycom_nut_form)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "store",
|
||||
setup(__props) {
|
||||
const isBucket = common_vendor.ref(false);
|
||||
const isAudit = common_vendor.ref(false);
|
||||
const form = common_vendor.reactive({
|
||||
shop_name: "",
|
||||
shop_desc: "",
|
||||
shop_phone: "",
|
||||
is_audit: 0,
|
||||
bulletin_txt: "",
|
||||
service_txt: "",
|
||||
pay_imgs: [],
|
||||
wechat_imgs: [],
|
||||
address_info: {}
|
||||
});
|
||||
const onIsAuditChange = (val) => {
|
||||
form.is_audit = Number(isAudit.value);
|
||||
common_vendor.index.__f__("log", "at pages/config/store.vue:117", form);
|
||||
};
|
||||
const chooseAddress = () => {
|
||||
common_vendor.index.chooseAddress({
|
||||
success(res) {
|
||||
common_vendor.index.__f__("log", "at pages/config/store.vue:124", res);
|
||||
form.address_info = {
|
||||
address_id: res.addressID || 1,
|
||||
user_name: res.userName,
|
||||
tel_number: res.telNumber,
|
||||
city_name: res.cityName || "",
|
||||
county_name: res.countyName || "",
|
||||
detail_info: res.detailInfo || "",
|
||||
detail_info_new: res.detailInfoNew || "",
|
||||
national_code: res.nationalCode || "",
|
||||
national_code_full: res.nationalCodeFull || "",
|
||||
postal_code: res.postalCode || "",
|
||||
province_name: res.provinceName || "",
|
||||
street_name: res.streetName || ""
|
||||
};
|
||||
}
|
||||
});
|
||||
};
|
||||
const getConfig = () => {
|
||||
api_config.fetchGetConfig().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/config/store.vue:149", "res=====>", res);
|
||||
form.shop_name = res.appConfig.shop_name;
|
||||
form.shop_desc = res.appConfig.shop_desc;
|
||||
form.shop_phone = res.appConfig.shop_phone;
|
||||
form.bulletin_txt = res.appConfig.bulletin_txt;
|
||||
form.service_txt = res.appConfig.service_txt;
|
||||
form.address_info = res.appConfig.address_info;
|
||||
form.is_audit = res.appConfig.is_audit;
|
||||
isAudit.value = res.appConfig.is_audit == 1;
|
||||
if (res.appConfig.bucket) {
|
||||
isBucket.value = true;
|
||||
}
|
||||
let pay_imgs = JSON.parse(res.appConfig.pay_imgs);
|
||||
let wechat_imgs = JSON.parse(res.appConfig.wechat_imgs);
|
||||
pay_imgs.forEach((item) => {
|
||||
form.pay_imgs.push({
|
||||
id: item.image_id,
|
||||
file_path: item.file_path
|
||||
});
|
||||
});
|
||||
wechat_imgs.forEach((item) => {
|
||||
form.wechat_imgs.push({
|
||||
id: item.image_id,
|
||||
file_path: item.file_path
|
||||
});
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/config/store.vue:180", "form=====>", form);
|
||||
});
|
||||
};
|
||||
const onSubmit = () => {
|
||||
api_config.fetchSetConfig(form).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
icon: "none",
|
||||
title: "更新商城配置成功"
|
||||
});
|
||||
setTimeout(() => {
|
||||
common_vendor.index.redirectTo({
|
||||
url: "/pages/config/store",
|
||||
success: (res2) => {
|
||||
},
|
||||
fail: () => {
|
||||
},
|
||||
complete: () => {
|
||||
}
|
||||
});
|
||||
}, 500);
|
||||
});
|
||||
};
|
||||
const saveAddress = () => {
|
||||
api_house_order.houseFetchUpdateAddress({
|
||||
address: form.address_info
|
||||
}).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
icon: "none",
|
||||
title: "保存收货地址成功"
|
||||
});
|
||||
setTimeout(() => {
|
||||
common_vendor.index.redirectTo({
|
||||
url: "/pages/config/store",
|
||||
success: (res2) => {
|
||||
},
|
||||
fail: () => {
|
||||
},
|
||||
complete: () => {
|
||||
}
|
||||
});
|
||||
}, 500);
|
||||
});
|
||||
};
|
||||
common_vendor.onMounted(() => {
|
||||
getConfig();
|
||||
});
|
||||
const addPayImg = () => {
|
||||
common_vendor.index.chooseImage({
|
||||
count: 9 - (form.pay_imgs.length || 0),
|
||||
sourceType: ["album", "camera"],
|
||||
success: (res) => {
|
||||
res.tempFiles.forEach((file) => {
|
||||
common_vendor.index.uploadFile({
|
||||
url: api_request.getUploadImageUrl(),
|
||||
filePath: file.path,
|
||||
name: "iFile",
|
||||
formData: {
|
||||
group_id: 1
|
||||
},
|
||||
success: (res2) => {
|
||||
let data = JSON.parse(res2.data).data;
|
||||
form.pay_imgs.push({
|
||||
id: parseInt(data.file_id),
|
||||
file_path: data.file_path
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const addWechatImg = () => {
|
||||
common_vendor.index.chooseImage({
|
||||
count: 9 - (form.wechat_imgs.length || 0),
|
||||
sourceType: ["album", "camera"],
|
||||
success: (res) => {
|
||||
res.tempFiles.forEach((file) => {
|
||||
common_vendor.index.uploadFile({
|
||||
url: api_request.getUploadImageUrl(),
|
||||
filePath: file.path,
|
||||
name: "iFile",
|
||||
formData: {
|
||||
group_id: 1
|
||||
},
|
||||
success: (res2) => {
|
||||
let data = JSON.parse(res2.data).data;
|
||||
form.wechat_imgs.push({
|
||||
id: parseInt(data.file_id),
|
||||
file_path: data.file_path
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
var _a, _b;
|
||||
return common_vendor.e({
|
||||
a: !((_a = form.address_info) == null ? void 0 : _a.address_id)
|
||||
}, !((_b = form.address_info) == null ? void 0 : _b.address_id) ? {
|
||||
b: common_vendor.o(chooseAddress),
|
||||
c: common_vendor.p({
|
||||
title: "收货地址",
|
||||
["is-link"]: true
|
||||
})
|
||||
} : {
|
||||
d: common_vendor.o(chooseAddress),
|
||||
e: common_vendor.p({
|
||||
title: form.address_info.user_name + " " + form.address_info.tel_number,
|
||||
["is-link"]: true,
|
||||
["sub-title"]: form.address_info.province_name + form.address_info.city_name + form.address_info.county_name + form.address_info.street_name + form.address_info.detail_info_new
|
||||
})
|
||||
}, {
|
||||
f: common_vendor.o(($event) => saveAddress()),
|
||||
g: common_vendor.p({
|
||||
type: "primary",
|
||||
block: true
|
||||
}),
|
||||
h: common_vendor.o(($event) => form.shop_name = $event),
|
||||
i: common_vendor.p({
|
||||
placeholder: "请输入店铺名称",
|
||||
type: "text",
|
||||
modelValue: form.shop_name
|
||||
}),
|
||||
j: common_vendor.p({
|
||||
label: "商城名称"
|
||||
}),
|
||||
k: common_vendor.o(($event) => form.shop_desc = $event),
|
||||
l: common_vendor.p({
|
||||
autosize: true,
|
||||
placeholder: "请输入店铺介绍",
|
||||
type: "text",
|
||||
modelValue: form.shop_desc
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
label: "商城介绍"
|
||||
}),
|
||||
n: common_vendor.o(($event) => form.shop_phone = $event),
|
||||
o: common_vendor.p({
|
||||
placeholder: "请输入手机号码",
|
||||
type: "text",
|
||||
modelValue: form.shop_phone
|
||||
}),
|
||||
p: common_vendor.p({
|
||||
label: "手机号码"
|
||||
}),
|
||||
q: common_vendor.o(($event) => form.bulletin_txt = $event),
|
||||
r: common_vendor.p({
|
||||
autosize: true,
|
||||
placeholder: "请输入首页公告",
|
||||
type: "text",
|
||||
modelValue: form.bulletin_txt
|
||||
}),
|
||||
s: common_vendor.p({
|
||||
label: "首页公告"
|
||||
}),
|
||||
t: common_vendor.o(($event) => form.service_txt = $event),
|
||||
v: common_vendor.p({
|
||||
autosize: true,
|
||||
placeholder: "请输入服务描述",
|
||||
type: "text",
|
||||
modelValue: form.service_txt
|
||||
}),
|
||||
w: common_vendor.p({
|
||||
label: "服务描述"
|
||||
}),
|
||||
x: common_vendor.o(onIsAuditChange),
|
||||
y: common_vendor.o(($event) => isAudit.value = $event),
|
||||
z: common_vendor.p({
|
||||
modelValue: isAudit.value
|
||||
}),
|
||||
A: common_vendor.p({
|
||||
label: "是否审核模式"
|
||||
}),
|
||||
B: isBucket.value
|
||||
}, isBucket.value ? {
|
||||
C: common_vendor.o(($event) => form.pay_imgs = $event),
|
||||
D: common_vendor.p({
|
||||
number: 9,
|
||||
["add-image"]: addPayImg,
|
||||
keyName: "file_path",
|
||||
modelValue: form.pay_imgs
|
||||
})
|
||||
} : {}, {
|
||||
E: isBucket.value
|
||||
}, isBucket.value ? {
|
||||
F: common_vendor.o(($event) => form.wechat_imgs = $event),
|
||||
G: common_vendor.p({
|
||||
number: 9,
|
||||
["add-image"]: addWechatImg,
|
||||
keyName: "file_path",
|
||||
modelValue: form.wechat_imgs
|
||||
})
|
||||
} : {}, {
|
||||
H: common_vendor.o(onSubmit),
|
||||
I: common_vendor.p({
|
||||
type: "primary",
|
||||
block: true
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-5e515d66"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/config/store.js.map
|
||||
14
unpackage/dist/dev/mp-weixin/pages/config/store.json
vendored
Normal file
14
unpackage/dist/dev/mp-weixin/pages/config/store.json
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"navigationBarTitleText": "商城配置",
|
||||
"usingComponents": {
|
||||
"nut-cell": "../../uni_modules/nutui-uni/components/cell/cell",
|
||||
"nut-cell-group": "../../uni_modules/nutui-uni/components/cellgroup/cellgroup",
|
||||
"nut-button": "../../uni_modules/nutui-uni/components/button/button",
|
||||
"nut-input": "../../uni_modules/nutui-uni/components/input/input",
|
||||
"nut-form-item": "../../uni_modules/nutui-uni/components/formitem/formitem",
|
||||
"nut-textarea": "../../uni_modules/nutui-uni/components/textarea/textarea",
|
||||
"nut-switch": "../../uni_modules/nutui-uni/components/switch/switch",
|
||||
"shmily-drag-image": "../../uni_modules/shmily-drag-image/components/shmily-drag-image/shmily-drag-image",
|
||||
"nut-form": "../../uni_modules/nutui-uni/components/form/form"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/config/store.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/config/store.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="page-content data-v-5e515d66"><view class="data-v-5e515d66" style="padding:20rpx"><nut-cell-group class="data-v-5e515d66" u-s="{{['d']}}" u-i="5e515d66-0" bind:__l="__l"><nut-cell wx:if="{{a}}" class="data-v-5e515d66" bindclick="{{b}}" u-i="5e515d66-1,5e515d66-0" bind:__l="__l" u-p="{{c}}"></nut-cell><nut-cell wx:else class="data-v-5e515d66" bindclick="{{d}}" u-i="5e515d66-2,5e515d66-0" bind:__l="__l" u-p="{{e||''}}"></nut-cell></nut-cell-group><view class="wechat-img-inner data-v-5e515d66"><nut-button wx:if="{{g}}" class="data-v-5e515d66" u-s="{{['d']}}" bindclick="{{f}}" u-i="5e515d66-3" bind:__l="__l" u-p="{{g}}"> 保存收货地址 </nut-button></view><nut-form class="data-v-5e515d66" u-s="{{['d']}}" u-i="5e515d66-4" bind:__l="__l"><nut-form-item wx:if="{{j}}" class="data-v-5e515d66" u-s="{{['d']}}" u-i="5e515d66-5,5e515d66-4" bind:__l="__l" u-p="{{j}}"><nut-input wx:if="{{i}}" class="nut-input-text data-v-5e515d66" u-i="5e515d66-6,5e515d66-5" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}"/></nut-form-item><nut-form-item wx:if="{{m}}" class="data-v-5e515d66" u-s="{{['d']}}" u-i="5e515d66-7,5e515d66-4" bind:__l="__l" u-p="{{m}}"><nut-textarea wx:if="{{l}}" class="data-v-5e515d66" u-i="5e515d66-8,5e515d66-7" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"/></nut-form-item><nut-form-item wx:if="{{p}}" class="data-v-5e515d66" u-s="{{['d']}}" u-i="5e515d66-9,5e515d66-4" bind:__l="__l" u-p="{{p}}"><nut-input wx:if="{{o}}" class="nut-input-text data-v-5e515d66" u-i="5e515d66-10,5e515d66-9" bind:__l="__l" bindupdateModelValue="{{n}}" u-p="{{o}}"/></nut-form-item><nut-form-item wx:if="{{s}}" class="data-v-5e515d66" u-s="{{['d']}}" u-i="5e515d66-11,5e515d66-4" bind:__l="__l" u-p="{{s}}"><nut-textarea wx:if="{{r}}" class="data-v-5e515d66" u-i="5e515d66-12,5e515d66-11" bind:__l="__l" bindupdateModelValue="{{q}}" u-p="{{r}}"/></nut-form-item><nut-form-item wx:if="{{w}}" class="data-v-5e515d66" u-s="{{['d']}}" u-i="5e515d66-13,5e515d66-4" bind:__l="__l" u-p="{{w}}"><nut-textarea wx:if="{{v}}" class="data-v-5e515d66" u-i="5e515d66-14,5e515d66-13" bind:__l="__l" bindupdateModelValue="{{t}}" u-p="{{v}}"/></nut-form-item><nut-form-item wx:if="{{A}}" class="data-v-5e515d66" u-s="{{['d']}}" u-i="5e515d66-15,5e515d66-4" bind:__l="__l" u-p="{{A}}"><nut-switch wx:if="{{z}}" class="data-v-5e515d66" bindchange="{{x}}" u-i="5e515d66-16,5e515d66-15" bind:__l="__l" bindupdateModelValue="{{y}}" u-p="{{z}}"/></nut-form-item><nut-form-item wx:if="{{B}}" class="data-v-5e515d66" u-s="{{['label','d']}}" u-i="5e515d66-17,5e515d66-4" bind:__l="__l"><view slot="label">收款二维码</view><shmily-drag-image class="data-v-5e515d66" u-i="5e515d66-18,5e515d66-17" bind:__l="__l" bindupdateModelValue="{{C}}" u-p="{{D}}"></shmily-drag-image></nut-form-item><nut-form-item wx:if="{{E}}" class="data-v-5e515d66" u-s="{{['label','d']}}" u-i="5e515d66-19,5e515d66-4" bind:__l="__l"><view slot="label">微信二维码</view><shmily-drag-image class="data-v-5e515d66" u-i="5e515d66-20,5e515d66-19" bind:__l="__l" bindupdateModelValue="{{F}}" u-p="{{G}}"></shmily-drag-image></nut-form-item><view class="data-v-5e515d66" style="align-items:center;text-align:center;padding:20rpx 80rpx"><nut-button wx:if="{{I}}" class="data-v-5e515d66" u-s="{{['d']}}" bindclick="{{H}}" u-i="5e515d66-21,5e515d66-4" bind:__l="__l" u-p="{{I}}"> 保存配置 </nut-button></view></nut-form></view></view>
|
||||
75
unpackage/dist/dev/mp-weixin/pages/config/store.wxss
vendored
Normal file
75
unpackage/dist/dev/mp-weixin/pages/config/store.wxss
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page-content.data-v-5e515d66 {
|
||||
min-height: 100vh;
|
||||
background-color: #f2f3f5;
|
||||
}
|
||||
.wechat-img-inner.data-v-5e515d66 {
|
||||
padding: 0rpx 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.list.data-v-5e515d66 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
background: #ffffff;
|
||||
align-items: center;
|
||||
max-height: 300rpx;
|
||||
overflow-y: scroll;
|
||||
padding: 10px;
|
||||
}
|
||||
.list .list-item.data-v-5e515d66 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 20rpx 10rpx;
|
||||
}
|
||||
892
unpackage/dist/dev/mp-weixin/pages/index/index.js
vendored
Normal file
892
unpackage/dist/dev/mp-weixin/pages/index/index.js
vendored
Normal file
@@ -0,0 +1,892 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_house_goods = require("../../api/house_goods.js");
|
||||
const api_goods = require("../../api/goods.js");
|
||||
const api_config = require("../../api/config.js");
|
||||
const utils_helper = require("../../utils/helper.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_noticebar2 = common_vendor.resolveComponent("nut-noticebar");
|
||||
const _easycom_z_tabs2 = common_vendor.resolveComponent("z-tabs");
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
const _easycom_nut_searchbar2 = common_vendor.resolveComponent("nut-searchbar");
|
||||
const _easycom_nut_menu_item2 = common_vendor.resolveComponent("nut-menu-item");
|
||||
const _easycom_nut_menu2 = common_vendor.resolveComponent("nut-menu");
|
||||
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
|
||||
const _easycom_nut_price2 = common_vendor.resolveComponent("nut-price");
|
||||
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||
(_easycom_nut_noticebar2 + _easycom_z_tabs2 + _easycom_nut_button2 + _easycom_nut_searchbar2 + _easycom_nut_menu_item2 + _easycom_nut_menu2 + _easycom_nut_tag2 + _easycom_nut_price2 + _easycom_z_paging2)();
|
||||
}
|
||||
const _easycom_nut_noticebar = () => "../../uni_modules/nutui-uni/components/noticebar/noticebar.js";
|
||||
const _easycom_z_tabs = () => "../../uni_modules/z-tabs/components/z-tabs/z-tabs.js";
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
const _easycom_nut_searchbar = () => "../../uni_modules/nutui-uni/components/searchbar/searchbar.js";
|
||||
const _easycom_nut_menu_item = () => "../../uni_modules/nutui-uni/components/menuitem/menuitem.js";
|
||||
const _easycom_nut_menu = () => "../../uni_modules/nutui-uni/components/menu/menu.js";
|
||||
const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js";
|
||||
const _easycom_nut_price = () => "../../uni_modules/nutui-uni/components/price/price.js";
|
||||
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
||||
if (!Math) {
|
||||
(IndexCustomNavigationbar + _easycom_nut_noticebar + _easycom_z_tabs + _easycom_nut_button + _easycom_nut_searchbar + _easycom_nut_menu_item + _easycom_nut_menu + _easycom_nut_tag + _easycom_nut_price + _easycom_z_paging)();
|
||||
}
|
||||
const IndexCustomNavigationbar = () => "../../components/index-custom-navigationbar/index.js";
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const statusBarHeight = common_vendor.index.getWindowInfo().statusBarHeight;
|
||||
const windowWidth = common_vendor.index.getWindowInfo().windowWidth;
|
||||
const menu_top = common_vendor.ref(0);
|
||||
const menu_bottom = common_vendor.ref(0);
|
||||
const menu_button_info = common_vendor.index.getMenuButtonBoundingClientRect();
|
||||
menu_top.value = menu_button_info.top;
|
||||
menu_bottom.value = menu_button_info.bottom;
|
||||
const navbarHeight = menu_bottom.value - statusBarHeight + (menu_top.value - statusBarHeight);
|
||||
const getImg = (goods) => {
|
||||
var _a, _b, _c, _d, _e;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:332", "====>tabIndex", tabIndex.value);
|
||||
if (tabIndex.value === 0) {
|
||||
const url = (_c = (_b = (_a = goods == null ? void 0 : goods.goods_house) == null ? void 0 : _a.image) == null ? void 0 : _b[0]) == null ? void 0 : _c.file_path;
|
||||
return url ? url + "?imageView2/1/w/200/h/200" : "";
|
||||
} else {
|
||||
const url = (_e = (_d = goods == null ? void 0 : goods.image) == null ? void 0 : _d[0]) == null ? void 0 : _e.file_path;
|
||||
return url ? url + "?imageView2/1/w/200/h/200" : "";
|
||||
}
|
||||
};
|
||||
const audit = common_vendor.ref(true);
|
||||
const shopName = common_vendor.ref("");
|
||||
const shopDesc = common_vendor.ref("");
|
||||
const bulletinTxt = common_vendor.ref("");
|
||||
const isWarehouse = common_vendor.ref(false);
|
||||
const getConfig = () => {
|
||||
api_config.fetchGetConfig().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:361", "getConfig=====>", res);
|
||||
audit.value = res.appConfig.is_audit == 1;
|
||||
shopName.value = res.appConfig.shop_name;
|
||||
shopDesc.value = res.appConfig.shop_desc;
|
||||
bulletinTxt.value = res.appConfig.bulletin_txt;
|
||||
isWarehouse.value = res.appConfig.is_warehouse == 1;
|
||||
});
|
||||
};
|
||||
const singleRule = common_vendor.ref([]);
|
||||
const rangeRule = common_vendor.ref([]);
|
||||
const warehouseRule = common_vendor.reactive({
|
||||
val: 0,
|
||||
val_type: 1
|
||||
});
|
||||
const GetPriceRules = () => {
|
||||
api_config.fetchGetPriceRules().then((res) => {
|
||||
var _a;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:385", "res", res);
|
||||
rangeRule.value = (res == null ? void 0 : res.range) ?? [];
|
||||
singleRule.value = (res == null ? void 0 : res.single) ?? [];
|
||||
Object.assign(warehouseRule, ((_a = res == null ? void 0 : res.warehouse) == null ? void 0 : _a[0]) ?? {
|
||||
val: 0,
|
||||
val_type: 1
|
||||
});
|
||||
});
|
||||
};
|
||||
const getPrice = (goods) => {
|
||||
if (isWarehouse.value) {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:404", "开启整仓调价");
|
||||
const list = singleRule.value || singleRule;
|
||||
const rule = list.find((item) => item.product_id === goods.goods_id);
|
||||
if (rule) {
|
||||
const basePrice = Number(goods.goods_price);
|
||||
const val = Number(rule.val);
|
||||
let finalPrice = basePrice;
|
||||
if (rule.val_type == 1) {
|
||||
finalPrice = basePrice + val;
|
||||
} else if (rule.val_type == 2) {
|
||||
finalPrice = basePrice + basePrice * val / 100;
|
||||
}
|
||||
return finalPrice.toFixed(2);
|
||||
} else {
|
||||
const basePrice = Number(goods.goods_price);
|
||||
const val = Number(warehouseRule.val);
|
||||
let finalPrice = basePrice;
|
||||
if (warehouseRule.val_type == 1) {
|
||||
finalPrice = basePrice + val;
|
||||
} else if (warehouseRule.val_type == 2) {
|
||||
finalPrice = basePrice + basePrice * val / 100;
|
||||
}
|
||||
return finalPrice.toFixed(2);
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:435", "未开启整仓调价");
|
||||
const singleRuleList = singleRule.value || singleRule;
|
||||
const oneRule = singleRuleList.find((item) => item.product_id === goods.goods_id);
|
||||
if (oneRule) {
|
||||
const basePrice = Number(goods.goods_price);
|
||||
const val = Number(oneRule.val);
|
||||
let finalPrice = basePrice;
|
||||
if (oneRule.val_type == 1) {
|
||||
finalPrice = basePrice + val;
|
||||
} else if (oneRule.val_type == 2) {
|
||||
finalPrice = basePrice + basePrice * val / 100;
|
||||
}
|
||||
return finalPrice.toFixed(2);
|
||||
} else {
|
||||
const basePrice = Number(goods.goods_price);
|
||||
const rangeRulelist = rangeRule.value || rangeRule;
|
||||
const quRule = rangeRulelist.find((item) => {
|
||||
const min = Number(item.min_price);
|
||||
const max = Number(item.max_price);
|
||||
return basePrice >= min && basePrice < max;
|
||||
}) || null;
|
||||
if (quRule) {
|
||||
const val = Number(quRule.val);
|
||||
let finalPrice = basePrice;
|
||||
if (quRule.val_type == 1) {
|
||||
finalPrice = basePrice + val;
|
||||
} else if (quRule.val_type == 2) {
|
||||
finalPrice = basePrice + basePrice * val / 100;
|
||||
}
|
||||
return finalPrice.toFixed(2);
|
||||
} else {
|
||||
return basePrice;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
const tabList = common_vendor.ref(["仓库现货", "店内现货"]);
|
||||
const tabIndex = common_vendor.ref(0);
|
||||
const tabsChange = (index) => {
|
||||
tabIndex.value = index;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:495", tabIndex.value);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:497", "切换tab 重置选中排序");
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:498", "切换tab 重置选中产品");
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:499", "切换tab 重置选中成色");
|
||||
if (tabIndex.value === 0) {
|
||||
dataList.value = [];
|
||||
house_state.price_sort_name = "默认排序";
|
||||
house_state.price_sort = "";
|
||||
house_state.type_id = 1;
|
||||
house_state.type_name = "手机";
|
||||
house_state.brand_id = 0;
|
||||
house_state.brand_name = "全部";
|
||||
house_state.product_ids = [0];
|
||||
house_state.product_name = "机型";
|
||||
house_state.degree_ids = [];
|
||||
house_state.degree_name = "成色";
|
||||
} else {
|
||||
dataList.value = [];
|
||||
state.price_sort_name = "默认排序";
|
||||
state.price_sort = "";
|
||||
state.type_id = 1;
|
||||
state.type_name = "手机";
|
||||
state.brand_id = 0;
|
||||
state.brand_name = "全部";
|
||||
state.product_ids = [0];
|
||||
state.product_name = "机型";
|
||||
state.degree_ids = [];
|
||||
state.degree_name = "成色";
|
||||
}
|
||||
paging.value.reload();
|
||||
};
|
||||
const paging = common_vendor.ref(null);
|
||||
const dataList = common_vendor.ref([]);
|
||||
const user_goods_cart_ids = common_vendor.ref([]);
|
||||
const goods_cart_ids = common_vendor.ref([]);
|
||||
const selectPriceSortRef = common_vendor.ref(null);
|
||||
const selectDegreeRef = common_vendor.ref(null);
|
||||
const selectProductRef = common_vendor.ref(null);
|
||||
const house_state = common_vendor.reactive({
|
||||
type_params: [],
|
||||
// 产品类型
|
||||
drop_down_options: [],
|
||||
// 产品类型下的品牌列表
|
||||
o_drop_down_options: [],
|
||||
// 价格排序
|
||||
price_sort_params: [
|
||||
{
|
||||
text: "默认排序",
|
||||
value: ""
|
||||
},
|
||||
{
|
||||
text: "价格升序",
|
||||
value: "ascend"
|
||||
},
|
||||
{
|
||||
text: "价格降序",
|
||||
value: "descend"
|
||||
}
|
||||
],
|
||||
// 成色所有选项
|
||||
degree_params: [],
|
||||
price_sort: "",
|
||||
price_sort_name: "默认排序",
|
||||
degree_ids: [],
|
||||
degree_name: "成色",
|
||||
product_name: "机型",
|
||||
type_id: 1,
|
||||
// 产品类型id 默认 1 手机
|
||||
type_name: "手机",
|
||||
brand_id: 0,
|
||||
// 品牌id // 默认 0 全部
|
||||
brand_name: "全部",
|
||||
product_ids: [0],
|
||||
// 机型ids 默认 0 全部
|
||||
search_val: ""
|
||||
// 搜索
|
||||
});
|
||||
const state = common_vendor.reactive({
|
||||
type_params: [],
|
||||
// 产品类型
|
||||
drop_down_options: [],
|
||||
// 产品类型下的品牌列表
|
||||
o_drop_down_options: [],
|
||||
// 价格排序
|
||||
price_sort_params: [
|
||||
{
|
||||
text: "默认排序",
|
||||
value: ""
|
||||
},
|
||||
{
|
||||
text: "价格升序",
|
||||
value: "ascend"
|
||||
},
|
||||
{
|
||||
text: "价格降序",
|
||||
value: "descend"
|
||||
}
|
||||
],
|
||||
// 成色所有选项
|
||||
degree_params: [],
|
||||
price_sort: "",
|
||||
price_sort_name: "默认排序",
|
||||
degree_ids: [],
|
||||
degree_name: "成色",
|
||||
product_name: "机型",
|
||||
type_id: 1,
|
||||
// 产品类型id 默认 1 手机
|
||||
type_name: "手机",
|
||||
brand_id: 0,
|
||||
// 品牌id // 默认 0 全部
|
||||
brand_name: "全部",
|
||||
product_ids: [0],
|
||||
// 机型ids 默认 0 全部
|
||||
search_val: ""
|
||||
// 搜索
|
||||
});
|
||||
const onSearch = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:679", "搜索:", state.search_val);
|
||||
paging.value.reload();
|
||||
};
|
||||
const onClear = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:685", "搜索:", state.search_val);
|
||||
paging.value.reload();
|
||||
};
|
||||
const onResetProduct = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:693", "====>tabIndex", tabIndex.value);
|
||||
if (tabIndex.value === 0) {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:695", "重置产品");
|
||||
house_state.type_id = 1;
|
||||
house_state.type_name = "手机";
|
||||
house_state.brand_id = 0;
|
||||
house_state.brand_name = "全部";
|
||||
house_state.product_ids = [0];
|
||||
house_state.product_name = "机型";
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:703", "重置产品");
|
||||
state.type_id = 1;
|
||||
state.type_name = "手机";
|
||||
state.brand_id = 0;
|
||||
state.brand_name = "全部";
|
||||
state.product_ids = [0];
|
||||
state.product_name = "机型";
|
||||
}
|
||||
};
|
||||
const onConfirmProduct = () => {
|
||||
var _a;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:715", "====>tabIndex", tabIndex.value);
|
||||
if (tabIndex.value === 0) {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:717", "当前仓库产品类型", {
|
||||
"type_id": house_state.type_id,
|
||||
"type_name": house_state.type_name,
|
||||
"brand_id": house_state.brand_id,
|
||||
"brand_name": house_state.brand_name,
|
||||
"product_ids": house_state.product_ids
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:725", "当前自营产品类型", {
|
||||
"type_id": state.type_id,
|
||||
"type_name": state.type_name,
|
||||
"brand_id": state.brand_id,
|
||||
"brand_name": state.brand_name,
|
||||
"product_ids": state.product_ids
|
||||
});
|
||||
}
|
||||
(_a = selectProductRef.value) == null ? void 0 : _a.toggle(false);
|
||||
paging.value.reload();
|
||||
};
|
||||
const selectProduct = (product) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:742", "====>tabIndex", tabIndex.value);
|
||||
if (tabIndex.value === 0) {
|
||||
if (product.value === 0) {
|
||||
house_state.product_ids = [0];
|
||||
} else {
|
||||
house_state.product_ids = house_state.product_ids.filter((e) => e != 0);
|
||||
const index = house_state.product_ids.indexOf(product.value);
|
||||
if (index > -1) {
|
||||
house_state.product_ids.splice(index, 1);
|
||||
if (house_state.product_ids.length === 0) {
|
||||
house_state.product_ids = [0];
|
||||
}
|
||||
} else {
|
||||
house_state.product_ids.push(product.value);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (product.value === 0) {
|
||||
state.product_ids = [0];
|
||||
} else {
|
||||
state.product_ids = state.product_ids.filter((e) => e != 0);
|
||||
const index = state.product_ids.indexOf(product.value);
|
||||
if (index > -1) {
|
||||
state.product_ids.splice(index, 1);
|
||||
if (state.product_ids.length === 0) {
|
||||
state.product_ids = [0];
|
||||
}
|
||||
} else {
|
||||
state.product_ids.push(product.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:776", product);
|
||||
};
|
||||
const productOptions = common_vendor.computed(() => {
|
||||
var _a, _b;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:780", "====>tabIndex", tabIndex.value);
|
||||
if (tabIndex.value === 0) {
|
||||
return (_a = house_state == null ? void 0 : house_state.o_drop_down_options[house_state.type_id]) == null ? void 0 : _a.children[house_state.brand_id].children;
|
||||
} else {
|
||||
return (_b = state == null ? void 0 : state.o_drop_down_options[state.type_id]) == null ? void 0 : _b.children[state.brand_id].children;
|
||||
}
|
||||
});
|
||||
const selectBrand = (brand) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:790", "====>tabIndex", tabIndex.value);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:791", "====>brand", brand);
|
||||
if (tabIndex.value === 0) {
|
||||
house_state.brand_id = brand.value;
|
||||
house_state.brand_name = brand.label;
|
||||
house_state.product_ids = [0];
|
||||
house_state.product_name = brand.label;
|
||||
} else {
|
||||
state.brand_id = brand.value;
|
||||
state.brand_name = brand.label;
|
||||
state.product_ids = [0];
|
||||
state.product_name = brand.label;
|
||||
}
|
||||
};
|
||||
const selectType = (type) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:811", "====>tabIndex", tabIndex.value);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:812", "====>type", type);
|
||||
if (tabIndex.value === 0) {
|
||||
house_state.type_id = type.type_id;
|
||||
house_state.type_name = type.name;
|
||||
house_state.brand_id = 0;
|
||||
house_state.brand_name = "全部";
|
||||
house_state.product_ids = [0];
|
||||
} else {
|
||||
state.type_id = type.type_id;
|
||||
state.type_name = type.name;
|
||||
state.brand_id = 0;
|
||||
state.brand_name = "全部";
|
||||
state.product_ids = [0];
|
||||
}
|
||||
};
|
||||
const selectPriceSort = (item) => {
|
||||
var _a;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:836", "====>tabIndex", tabIndex.value);
|
||||
if (tabIndex.value === 0) {
|
||||
if (house_state.price_sort !== item.value) {
|
||||
house_state.price_sort = item.value;
|
||||
house_state.price_sort_name = item.text;
|
||||
} else {
|
||||
house_state.price_sort_name = "默认排序";
|
||||
house_state.price_sort = "";
|
||||
}
|
||||
} else {
|
||||
if (state.price_sort !== item.value) {
|
||||
state.price_sort = item.value;
|
||||
state.price_sort_name = item.text;
|
||||
} else {
|
||||
state.price_sort_name = "默认排序";
|
||||
state.price_sort = "";
|
||||
}
|
||||
}
|
||||
(_a = selectPriceSortRef.value) == null ? void 0 : _a.toggle(false);
|
||||
paging.value.reload();
|
||||
};
|
||||
const selectDegree = (item) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:861", "====>tabIndex", tabIndex.value);
|
||||
if (tabIndex.value === 0) {
|
||||
const index = house_state.degree_ids.indexOf(item.value);
|
||||
if (index > -1) {
|
||||
house_state.degree_ids.splice(index, 1);
|
||||
} else {
|
||||
house_state.degree_ids.push(item.value);
|
||||
}
|
||||
if (house_state.degree_ids.length > 0) {
|
||||
house_state.degree_name = "已选" + house_state.degree_ids.length.toString() + "项";
|
||||
} else {
|
||||
house_state.degree_name = "成色";
|
||||
}
|
||||
} else {
|
||||
const index = state.degree_ids.indexOf(item.value);
|
||||
if (index > -1) {
|
||||
state.degree_ids.splice(index, 1);
|
||||
} else {
|
||||
state.degree_ids.push(item.value);
|
||||
}
|
||||
if (state.degree_ids.length > 0) {
|
||||
state.degree_name = "已选" + state.degree_ids.length.toString() + "项";
|
||||
} else {
|
||||
state.degree_name = "成色";
|
||||
}
|
||||
}
|
||||
};
|
||||
const onResetDegree = () => {
|
||||
var _a;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:891", "====>tabIndex", tabIndex.value);
|
||||
if (tabIndex.value === 0) {
|
||||
house_state.degree_ids = [];
|
||||
house_state.degree_name = "成色";
|
||||
} else {
|
||||
state.degree_ids = [];
|
||||
state.degree_name = "成色";
|
||||
}
|
||||
(_a = selectDegreeRef.value) == null ? void 0 : _a.toggle(false);
|
||||
paging.value.reload();
|
||||
};
|
||||
const onConfirmDegree = () => {
|
||||
var _a;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:905", "====>tabIndex", tabIndex.value);
|
||||
if (tabIndex.value === 0) {
|
||||
if (house_state.degree_ids.length > 0) {
|
||||
house_state.degree_name = "已选" + house_state.degree_ids.length.toString() + "项";
|
||||
} else {
|
||||
house_state.degree_name = "成色";
|
||||
}
|
||||
} else {
|
||||
if (state.degree_ids.length > 0) {
|
||||
state.degree_name = "已选" + state.degree_ids.length.toString() + "项";
|
||||
} else {
|
||||
state.degree_name = "成色";
|
||||
}
|
||||
}
|
||||
(_a = selectDegreeRef.value) == null ? void 0 : _a.toggle(false);
|
||||
paging.value.reload();
|
||||
};
|
||||
const queryList = (pageNo, pageSize) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:928", "====>tabIndex", tabIndex.value);
|
||||
if (tabIndex.value === 0) {
|
||||
const params = {
|
||||
pageSize,
|
||||
page: pageNo,
|
||||
price_sort: house_state.price_sort,
|
||||
degree_ids: house_state.degree_ids,
|
||||
type_id: house_state.type_id,
|
||||
brand_id: house_state.brand_id,
|
||||
product_ids: house_state.product_ids,
|
||||
search: house_state.search_val
|
||||
};
|
||||
api_house_goods.houseFetchGoodsList(params).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:941", res);
|
||||
paging.value.complete(res.list);
|
||||
user_goods_cart_ids.value = res.user_cart_goods_ids;
|
||||
goods_cart_ids.value = res.cart_goods_ids;
|
||||
}).catch((res) => {
|
||||
paging.value.complete(false);
|
||||
user_goods_cart_ids.value = [];
|
||||
goods_cart_ids.value = [];
|
||||
});
|
||||
} else {
|
||||
const params = {
|
||||
pageSize,
|
||||
page: pageNo,
|
||||
price_sort: state.price_sort,
|
||||
degree_ids: state.degree_ids,
|
||||
type_id: state.type_id,
|
||||
brand_id: state.brand_id,
|
||||
product_ids: state.product_ids,
|
||||
search: state.search_val
|
||||
};
|
||||
api_goods.fetchGoodsList(params).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:965", res);
|
||||
paging.value.complete(res.list);
|
||||
user_goods_cart_ids.value = res.user_cart_goods_ids;
|
||||
goods_cart_ids.value = res.cart_goods_ids;
|
||||
}).catch((res) => {
|
||||
paging.value.complete(false);
|
||||
user_goods_cart_ids.value = [];
|
||||
goods_cart_ids.value = [];
|
||||
});
|
||||
}
|
||||
};
|
||||
common_vendor.onShareAppMessage((obj) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:984", "====>tabIndex", tabIndex.value);
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:985", obj);
|
||||
if (tabIndex.value === 0) {
|
||||
if (obj.from == "button") {
|
||||
let goods = obj.target.dataset.goods;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:989", goods);
|
||||
return {
|
||||
title: goods.goods_house.goods_name,
|
||||
imageUrl: goods.goods_house.image[0].file_path,
|
||||
path: "/pages/mall/houseDetail?id=" + goods.goods_id
|
||||
};
|
||||
}
|
||||
} else {
|
||||
if (obj.from == "button") {
|
||||
let goods = obj.target.dataset.goods;
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:999", goods);
|
||||
return {
|
||||
title: goods.goods_name,
|
||||
imageUrl: goods.image[0].file_path,
|
||||
path: "/pages/mall/detail?id=" + goods.goods_id
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
const init = () => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:1033", "init");
|
||||
getConfig();
|
||||
GetPriceRules();
|
||||
api_house_goods.houseFetchFilterParmas().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:1054", "仓库默认筛选项目====>", res);
|
||||
let degree_params = res.degree_list;
|
||||
house_state.degree_params = degree_params.reduce((it, cit) => {
|
||||
it.push({
|
||||
text: cit.degree_name,
|
||||
value: cit.degree_id
|
||||
});
|
||||
return it;
|
||||
}, house_state.degree_params) || [];
|
||||
house_state.type_params = res.type_list;
|
||||
house_state.drop_down_options = res.drop_down_options;
|
||||
house_state.o_drop_down_options = res.o_drop_down_options;
|
||||
});
|
||||
api_goods.fetchFilterParmas().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:1073", "本地默认筛选项目====>", res);
|
||||
let degree_params = res.degree_list;
|
||||
state.degree_params = degree_params.reduce((it, cit) => {
|
||||
it.push({
|
||||
text: cit.degree_name,
|
||||
value: cit.degree_id
|
||||
});
|
||||
return it;
|
||||
}, state.degree_params) || [];
|
||||
state.type_params = res.type_list;
|
||||
state.drop_down_options = res.drop_down_options;
|
||||
state.o_drop_down_options = res.o_drop_down_options;
|
||||
});
|
||||
};
|
||||
common_vendor.onShow(() => {
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:1093", "onshow---");
|
||||
getConfig();
|
||||
GetPriceRules();
|
||||
common_vendor.index.__f__("log", "at pages/index/index.vue:1097", "paging.value", paging.value);
|
||||
if (paging.value) {
|
||||
paging.value.refresh();
|
||||
}
|
||||
});
|
||||
common_vendor.onMounted(() => {
|
||||
init();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
var _a, _b;
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
statusBarHeight: common_vendor.unref(statusBarHeight),
|
||||
windowWidth: common_vendor.unref(windowWidth),
|
||||
navbarHeight,
|
||||
title: shopName.value,
|
||||
desc: shopDesc.value
|
||||
}),
|
||||
b: common_vendor.p({
|
||||
text: bulletinTxt.value,
|
||||
background: `rgba(251, 248, 220, 1)`,
|
||||
["custom-color"]: `#D9500B`
|
||||
}),
|
||||
c: common_vendor.o(tabsChange),
|
||||
d: common_vendor.p({
|
||||
list: tabList.value,
|
||||
["active-color"]: "rgba(233, 100, 67, 1)"
|
||||
}),
|
||||
e: tabIndex.value == 0
|
||||
}, tabIndex.value == 0 ? {
|
||||
f: common_vendor.o(onSearch),
|
||||
g: common_vendor.p({
|
||||
type: "primary"
|
||||
}),
|
||||
h: common_vendor.o(onSearch),
|
||||
i: common_vendor.o(onClear),
|
||||
j: common_vendor.o(($event) => house_state.search_val = $event),
|
||||
k: common_vendor.p({
|
||||
placeholder: "请输入商品名称",
|
||||
clearable: true,
|
||||
["input-background"]: "#eee",
|
||||
modelValue: house_state.search_val
|
||||
}),
|
||||
l: common_vendor.f(house_state.price_sort_params, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.text),
|
||||
b: house_state.price_sort === item.value ? 1 : "",
|
||||
c: idx,
|
||||
d: common_vendor.o(($event) => selectPriceSort(item), idx)
|
||||
};
|
||||
}),
|
||||
m: common_vendor.sr(selectPriceSortRef, "1cf27b2a-7,1cf27b2a-6", {
|
||||
"k": "selectPriceSortRef"
|
||||
}),
|
||||
n: common_vendor.p({
|
||||
title: house_state.price_sort_name
|
||||
}),
|
||||
o: common_vendor.f(house_state.type_params, (type, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(type.name),
|
||||
b: idx,
|
||||
c: common_vendor.o(($event) => selectType(type), idx),
|
||||
d: house_state.type_id == type.type_id ? 1 : ""
|
||||
};
|
||||
}),
|
||||
p: common_vendor.f((_a = house_state == null ? void 0 : house_state.drop_down_options[house_state.type_id]) == null ? void 0 : _a.children, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.label),
|
||||
b: idx,
|
||||
c: common_vendor.o(($event) => selectBrand(item), idx),
|
||||
d: item.value == house_state.brand_id ? 1 : ""
|
||||
};
|
||||
}),
|
||||
q: common_vendor.f(productOptions.value, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.label),
|
||||
b: idx,
|
||||
c: house_state.product_ids.includes(item.value) ? 1 : "",
|
||||
d: common_vendor.o(($event) => selectProduct(item), idx)
|
||||
};
|
||||
}),
|
||||
r: common_vendor.o(($event) => onResetProduct()),
|
||||
s: common_vendor.p({
|
||||
plain: true,
|
||||
type: "default"
|
||||
}),
|
||||
t: common_vendor.o(($event) => onConfirmProduct()),
|
||||
v: common_vendor.p({
|
||||
block: true,
|
||||
type: "primary"
|
||||
}),
|
||||
w: common_vendor.sr(selectProductRef, "1cf27b2a-8,1cf27b2a-6", {
|
||||
"k": "selectProductRef"
|
||||
}),
|
||||
x: common_vendor.p({
|
||||
title: house_state.product_name
|
||||
}),
|
||||
y: common_vendor.f(house_state.degree_params, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.text),
|
||||
b: house_state.degree_ids.includes(item.value) ? 1 : "",
|
||||
c: idx,
|
||||
d: common_vendor.o(($event) => selectDegree(item), idx)
|
||||
};
|
||||
}),
|
||||
z: common_vendor.o(($event) => onResetDegree()),
|
||||
A: common_vendor.p({
|
||||
plain: true,
|
||||
type: "default"
|
||||
}),
|
||||
B: common_vendor.o(($event) => onConfirmDegree()),
|
||||
C: common_vendor.p({
|
||||
block: true,
|
||||
type: "primary"
|
||||
}),
|
||||
D: common_vendor.sr(selectDegreeRef, "1cf27b2a-11,1cf27b2a-6", {
|
||||
"k": "selectDegreeRef"
|
||||
}),
|
||||
E: common_vendor.p({
|
||||
title: house_state.degree_name
|
||||
}),
|
||||
F: common_vendor.p({
|
||||
["title-class"]: "titleClass"
|
||||
})
|
||||
} : {}, {
|
||||
G: tabIndex.value == 1
|
||||
}, tabIndex.value == 1 ? {
|
||||
H: common_vendor.o(onSearch),
|
||||
I: common_vendor.p({
|
||||
type: "primary"
|
||||
}),
|
||||
J: common_vendor.o(onSearch),
|
||||
K: common_vendor.o(onClear),
|
||||
L: common_vendor.o(($event) => state.search_val = $event),
|
||||
M: common_vendor.p({
|
||||
placeholder: "请输入商品名称",
|
||||
clearable: true,
|
||||
["input-background"]: "#eee",
|
||||
modelValue: state.search_val
|
||||
}),
|
||||
N: common_vendor.f(state.price_sort_params, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.text),
|
||||
b: state.price_sort === item.value ? 1 : "",
|
||||
c: idx,
|
||||
d: common_vendor.o(($event) => selectPriceSort(item), idx)
|
||||
};
|
||||
}),
|
||||
O: common_vendor.sr(selectPriceSortRef, "1cf27b2a-17,1cf27b2a-16", {
|
||||
"k": "selectPriceSortRef"
|
||||
}),
|
||||
P: common_vendor.p({
|
||||
title: state.price_sort_name
|
||||
}),
|
||||
Q: common_vendor.f(state.type_params, (type, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(type.name),
|
||||
b: idx,
|
||||
c: common_vendor.o(($event) => selectType(type), idx),
|
||||
d: state.type_id == type.type_id ? 1 : ""
|
||||
};
|
||||
}),
|
||||
R: common_vendor.f((_b = state == null ? void 0 : state.drop_down_options[state.type_id]) == null ? void 0 : _b.children, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.label),
|
||||
b: idx,
|
||||
c: common_vendor.o(($event) => selectBrand(item), idx),
|
||||
d: item.value == state.brand_id ? 1 : ""
|
||||
};
|
||||
}),
|
||||
S: common_vendor.f(productOptions.value, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.label),
|
||||
b: idx,
|
||||
c: state.product_ids.includes(item.value) ? 1 : "",
|
||||
d: common_vendor.o(($event) => selectProduct(item), idx)
|
||||
};
|
||||
}),
|
||||
T: common_vendor.o(($event) => onResetProduct()),
|
||||
U: common_vendor.p({
|
||||
plain: true,
|
||||
type: "default"
|
||||
}),
|
||||
V: common_vendor.o(($event) => onConfirmProduct()),
|
||||
W: common_vendor.p({
|
||||
block: true,
|
||||
type: "primary"
|
||||
}),
|
||||
X: common_vendor.sr(selectProductRef, "1cf27b2a-18,1cf27b2a-16", {
|
||||
"k": "selectProductRef"
|
||||
}),
|
||||
Y: common_vendor.p({
|
||||
title: state.product_name
|
||||
}),
|
||||
Z: common_vendor.f(state.degree_params, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.text),
|
||||
b: state.degree_ids.includes(item.value) ? 1 : "",
|
||||
c: idx,
|
||||
d: common_vendor.o(($event) => selectDegree(item), idx)
|
||||
};
|
||||
}),
|
||||
aa: common_vendor.o(($event) => onResetDegree()),
|
||||
ab: common_vendor.p({
|
||||
plain: true,
|
||||
type: "default"
|
||||
}),
|
||||
ac: common_vendor.o(($event) => onConfirmDegree()),
|
||||
ad: common_vendor.p({
|
||||
block: true,
|
||||
type: "primary"
|
||||
}),
|
||||
ae: common_vendor.sr(selectDegreeRef, "1cf27b2a-21,1cf27b2a-16", {
|
||||
"k": "selectDegreeRef"
|
||||
}),
|
||||
af: common_vendor.p({
|
||||
title: state.degree_name
|
||||
}),
|
||||
ag: common_vendor.p({
|
||||
["title-class"]: "titleClass"
|
||||
})
|
||||
} : {}, {
|
||||
ah: common_vendor.s("top:" + (common_vendor.unref(statusBarHeight) + navbarHeight) + "px"),
|
||||
ai: tabIndex.value == 0
|
||||
}, tabIndex.value == 0 ? {
|
||||
aj: common_vendor.f(dataList.value, (item, index, i0) => {
|
||||
var _a2, _b2, _c, _d;
|
||||
return common_vendor.e({
|
||||
a: getImg(item),
|
||||
b: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/mall/houseDetail?id=" + item.goods_id), index),
|
||||
c: common_vendor.t((_b2 = (_a2 = item == null ? void 0 : item.goods_house) == null ? void 0 : _a2.degree) == null ? void 0 : _b2.degree_name),
|
||||
d: "1cf27b2a-24-" + i0 + ",1cf27b2a-0",
|
||||
e: common_vendor.t((_c = item == null ? void 0 : item.goods_house) == null ? void 0 : _c.goods_name),
|
||||
f: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/mall/houseDetail?id=" + item.goods_id), index),
|
||||
g: common_vendor.t((_d = item == null ? void 0 : item.goods_house) == null ? void 0 : _d.content),
|
||||
h: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/mall/houseDetail?id=" + item.goods_id), index),
|
||||
i: "1cf27b2a-25-" + i0 + ",1cf27b2a-0",
|
||||
j: common_vendor.p({
|
||||
price: getPrice(item)
|
||||
})
|
||||
}, !audit.value ? common_vendor.e({
|
||||
k: goods_cart_ids.value.includes(item.goods_id)
|
||||
}, goods_cart_ids.value.includes(item.goods_id) ? {
|
||||
l: "1cf27b2a-26-" + i0 + ",1cf27b2a-0",
|
||||
m: common_vendor.p({
|
||||
size: "small",
|
||||
plain: true
|
||||
})
|
||||
} : {}, {
|
||||
n: item
|
||||
}) : {}, {
|
||||
o: index
|
||||
});
|
||||
}),
|
||||
ak: common_vendor.p({
|
||||
["custom-color"]: "#1a1a1a"
|
||||
}),
|
||||
al: !audit.value
|
||||
} : {
|
||||
an: common_vendor.f(dataList.value, (item, index, i0) => {
|
||||
var _a2;
|
||||
return common_vendor.e({
|
||||
a: getImg(item),
|
||||
b: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/mall/detail?id=" + item.goods_id), index),
|
||||
c: common_vendor.t((_a2 = item == null ? void 0 : item.degree) == null ? void 0 : _a2.degree_name),
|
||||
d: "1cf27b2a-27-" + i0 + ",1cf27b2a-0",
|
||||
e: common_vendor.t(item.goods_name),
|
||||
f: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/mall/detail?id=" + item.goods_id), index),
|
||||
g: common_vendor.t(item.content),
|
||||
h: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/mall/detail?id=" + item.goods_id), index),
|
||||
i: "1cf27b2a-28-" + i0 + ",1cf27b2a-0",
|
||||
j: common_vendor.p({
|
||||
price: item.goods_price
|
||||
})
|
||||
}, !audit.value ? {
|
||||
k: item
|
||||
} : {}, {
|
||||
l: index
|
||||
});
|
||||
}),
|
||||
ao: common_vendor.p({
|
||||
["custom-color"]: "#1a1a1a"
|
||||
}),
|
||||
ap: !audit.value
|
||||
}, {
|
||||
am: tabIndex.value == 1,
|
||||
aq: common_vendor.sr(paging, "1cf27b2a-0", {
|
||||
"k": "paging"
|
||||
}),
|
||||
ar: common_vendor.o(queryList),
|
||||
as: common_vendor.o(($event) => dataList.value = $event),
|
||||
at: common_vendor.p({
|
||||
["refresher-enabled"]: false,
|
||||
["auto-clean-list-when-reload"]: false,
|
||||
["auto-scroll-to-top-when-reload"]: false,
|
||||
modelValue: dataList.value
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]);
|
||||
_sfc_main.__runtimeHooks = 2;
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map
|
||||
17
unpackage/dist/dev/mp-weixin/pages/index/index.json
vendored
Normal file
17
unpackage/dist/dev/mp-weixin/pages/index/index.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"navigationBarTitleText": "主页",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"nut-noticebar": "../../uni_modules/nutui-uni/components/noticebar/noticebar",
|
||||
"z-tabs": "../../uni_modules/z-tabs/components/z-tabs/z-tabs",
|
||||
"nut-button": "../../uni_modules/nutui-uni/components/button/button",
|
||||
"nut-searchbar": "../../uni_modules/nutui-uni/components/searchbar/searchbar",
|
||||
"nut-menu-item": "../../uni_modules/nutui-uni/components/menuitem/menuitem",
|
||||
"nut-menu": "../../uni_modules/nutui-uni/components/menu/menu",
|
||||
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
|
||||
"nut-price": "../../uni_modules/nutui-uni/components/price/price",
|
||||
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging",
|
||||
"index-custom-navigationbar": "../../components/index-custom-navigationbar/index"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml
vendored
Normal file
File diff suppressed because one or more lines are too long
283
unpackage/dist/dev/mp-weixin/pages/index/index.wxss
vendored
Normal file
283
unpackage/dist/dev/mp-weixin/pages/index/index.wxss
vendored
Normal file
@@ -0,0 +1,283 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page-content.data-v-1cf27b2a {
|
||||
min-height: 100vh;
|
||||
background-color: #f2f3f5;
|
||||
--nut-menu-bar-box-shadow: none;
|
||||
--nut-menu-item-content-padding: 20rpx;
|
||||
--nut-menu-item-content-max-height: 900rpx;
|
||||
--nut-searchbar-input-height: 40px;
|
||||
}
|
||||
.data-v-1cf27b2a .titleClass .nut-menu__title-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
}
|
||||
.goods-item.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 20rpx;
|
||||
gap: 20rpx;
|
||||
}
|
||||
.goods-item .goods-item-image.data-v-1cf27b2a {
|
||||
width: 170rpx;
|
||||
height: 170rpx;
|
||||
}
|
||||
.goods-item .goods-item-image .goods-item-image-img.data-v-1cf27b2a {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.goods-item .goods-item-content.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
/* 首尾贴边,中间均分 */
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-header.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10rpx 0;
|
||||
gap: 20rpx;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-body.data-v-1cf27b2a {
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-body .goods-item-content-body-desc.data-v-1cf27b2a {
|
||||
color: #7c7c7c;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-footer.data-v-1cf27b2a {
|
||||
padding: 10rpx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-footer .goods-item-content-footer-btn.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 10rpx;
|
||||
}
|
||||
.goods-item .goods-item-content .goods-item-content-footer .goods-item-content-footer-btn .share-btn.data-v-1cf27b2a {
|
||||
border-radius: 50rpx;
|
||||
border: 2rpx solid red;
|
||||
font-size: 26rpx;
|
||||
align-items: center;
|
||||
height: 54rpx;
|
||||
color: red;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.filter-types.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
gap: 10rpx;
|
||||
padding: 10rpx;
|
||||
height: 60rpx;
|
||||
background-color: #fff;
|
||||
border-bottom: 2rpx solid gainsboro;
|
||||
border-top: 2rpx solid gainsboro;
|
||||
}
|
||||
.filter-types .filter-type-inner.data-v-1cf27b2a {
|
||||
align-items: center;
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 16rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
font-size: 28rpx;
|
||||
gap: 15rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
.filter-types .filter-type-inner.active.data-v-1cf27b2a {
|
||||
background-color: rgba(250, 44, 25, 0.1);
|
||||
color: var(--nutui-color-primary);
|
||||
}
|
||||
.tabs-container.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
}
|
||||
.tabs-container .tab-pane-inner.data-v-1cf27b2a {
|
||||
height: 600rpx;
|
||||
}
|
||||
.tabs-container .tabs-inner.data-v-1cf27b2a {
|
||||
overflow-y: scroll;
|
||||
height: 600rpx;
|
||||
width: 160rpx;
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.tabs-container .tabs-inner .tab-inner.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
height: 60rpx;
|
||||
padding: 10rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #F5F5F5;
|
||||
}
|
||||
.tabs-container .tabs-inner .tab-inner text.data-v-1cf27b2a {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
}
|
||||
.tabs-container .tabs-inner .tab-inner-active.data-v-1cf27b2a {
|
||||
background-color: rgba(250, 44, 25, 0.1);
|
||||
color: var(--nutui-color-primary);
|
||||
}
|
||||
.degree-inner.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-wrap: wrap;
|
||||
gap: 10rpx;
|
||||
width: 100%;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
.degree-item.data-v-1cf27b2a {
|
||||
align-items: center;
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 10rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
font-size: 26rpx;
|
||||
gap: 10rpx;
|
||||
justify-content: center;
|
||||
min-height: 80rpx;
|
||||
width: calc(50% - 10rpx);
|
||||
}
|
||||
.degree-item.active.data-v-1cf27b2a {
|
||||
background-color: rgba(250, 44, 25, 0.1);
|
||||
color: var(--nutui-color-primary);
|
||||
}
|
||||
.product-btns.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.product-btns .reset.data-v-1cf27b2a {
|
||||
flex: 1;
|
||||
}
|
||||
.product-btns .confirm.data-v-1cf27b2a {
|
||||
flex: 2;
|
||||
}
|
||||
.degree-btns.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
.degree-btns .reset.data-v-1cf27b2a {
|
||||
flex: 1;
|
||||
/* 重置按钮占 1 份 */
|
||||
}
|
||||
.degree-btns .confirm.data-v-1cf27b2a {
|
||||
flex: 2;
|
||||
/* 确认按钮占 2 份 */
|
||||
}
|
||||
.main-nav-container.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #fff;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.nav-button.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 45%;
|
||||
height: 160rpx;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
.phone-button.data-v-1cf27b2a {
|
||||
background: linear-gradient(135deg, #6a5ae0, #8d7bfb);
|
||||
color: white;
|
||||
}
|
||||
.parts-button.data-v-1cf27b2a {
|
||||
background: linear-gradient(135deg, #ff6b6b, #ee5253);
|
||||
color: white;
|
||||
}
|
||||
.nav-button-bg.data-v-1cf27b2a {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
width: 50%;
|
||||
opacity: 0.2;
|
||||
object-fit: cover;
|
||||
}
|
||||
.nav-button-icon.data-v-1cf27b2a {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
margin-right: 20rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
.nav-button-content.data-v-1cf27b2a {
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.nav-button-title.data-v-1cf27b2a {
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.nav-button-desc.data-v-1cf27b2a {
|
||||
font-size: 24rpx;
|
||||
opacity: 0.85;
|
||||
}
|
||||
88
unpackage/dist/dev/mp-weixin/pages/login/index.js
vendored
Normal file
88
unpackage/dist/dev/mp-weixin/pages/login/index.js
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_user = require("../../api/user.js");
|
||||
const utils_helper = require("../../utils/helper.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_icon2 = common_vendor.resolveComponent("nut-icon");
|
||||
const _easycom_nut_avatar2 = common_vendor.resolveComponent("nut-avatar");
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
(_easycom_nut_icon2 + _easycom_nut_avatar2 + _easycom_nut_button2)();
|
||||
}
|
||||
const _easycom_nut_icon = () => "../../uni_modules/nutui-uni/components/icon/icon.js";
|
||||
const _easycom_nut_avatar = () => "../../uni_modules/nutui-uni/components/avatar/avatar.js";
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_icon + _easycom_nut_avatar + _easycom_nut_button)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const code = common_vendor.ref("");
|
||||
const redirect_url = common_vendor.ref("");
|
||||
common_vendor.onLoad((options) => {
|
||||
redirect_url.value = options.redirect_url;
|
||||
});
|
||||
common_vendor.onMounted(() => {
|
||||
common_vendor.index.login({
|
||||
provider: "weixin",
|
||||
success(res) {
|
||||
if (res.errMsg === "login:ok") {
|
||||
code.value = res.code;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
const getUserInfo = (res) => {
|
||||
if (code.value === "") {
|
||||
common_vendor.index.showToast({
|
||||
icon: "none",
|
||||
title: "请稍后再试"
|
||||
});
|
||||
return;
|
||||
}
|
||||
api_user.login(code.value, JSON.stringify(res.detail.userInfo)).then((res2) => {
|
||||
common_vendor.index.__f__("log", "at pages/login/index.vue:63", res2);
|
||||
common_vendor.index.setStorageSync("token", res2.token);
|
||||
common_vendor.index.setStorageSync("uid", res2.user_id);
|
||||
if (res2.is_bind_phone) {
|
||||
utils_helper.navigateTo("/pages/login/phoneAuthorization");
|
||||
return;
|
||||
}
|
||||
common_vendor.index.showToast({
|
||||
title: "授权成功",
|
||||
icon: "none"
|
||||
});
|
||||
if (redirect_url.value !== "undefined") {
|
||||
utils_helper.navigateTo(redirect_url.value);
|
||||
} else {
|
||||
common_vendor.index.navigateBack();
|
||||
}
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
size: "30",
|
||||
name: "my"
|
||||
}),
|
||||
b: common_vendor.p({
|
||||
size: "80"
|
||||
}),
|
||||
c: common_vendor.o(getUserInfo),
|
||||
d: common_vendor.p({
|
||||
type: "success",
|
||||
size: "large",
|
||||
["open-type"]: "getUserInfo"
|
||||
}),
|
||||
e: common_vendor.o(($event) => common_vendor.unref(utils_helper.switchTab)("/pages/index/index")),
|
||||
f: common_vendor.p({
|
||||
type: "danger",
|
||||
size: "large"
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-d08ef7d4"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/login/index.js.map
|
||||
8
unpackage/dist/dev/mp-weixin/pages/login/index.json
vendored
Normal file
8
unpackage/dist/dev/mp-weixin/pages/login/index.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"navigationBarTitleText": "授权登录",
|
||||
"usingComponents": {
|
||||
"nut-icon": "../../uni_modules/nutui-uni/components/icon/icon",
|
||||
"nut-avatar": "../../uni_modules/nutui-uni/components/avatar/avatar",
|
||||
"nut-button": "../../uni_modules/nutui-uni/components/button/button"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/login/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/login/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="content data-v-d08ef7d4"><view class="avatar data-v-d08ef7d4"><nut-avatar wx:if="{{b}}" class="data-v-d08ef7d4" u-s="{{['d']}}" u-i="d08ef7d4-0" bind:__l="__l" u-p="{{b}}"><nut-icon wx:if="{{a}}" class="data-v-d08ef7d4" u-i="d08ef7d4-1,d08ef7d4-0" bind:__l="__l" u-p="{{a}}"/></nut-avatar></view><view class="divider data-v-d08ef7d4"></view></view><view class="tip-infos data-v-d08ef7d4"><text class="data-v-d08ef7d4">申请获取以下权限</text><text class="data-v-d08ef7d4">获得你的公开信息(昵称、头像等)</text></view><view class="authorize-btn-inner data-v-d08ef7d4"><nut-button wx:if="{{d}}" class="data-v-d08ef7d4" u-s="{{['d']}}" bindgetuserinfo="{{c}}" u-i="d08ef7d4-2" bind:__l="__l" u-p="{{d}}">授权登录</nut-button></view><view class="authorize-btn-inner data-v-d08ef7d4"><nut-button wx:if="{{f}}" class="data-v-d08ef7d4" u-s="{{['d']}}" bindclick="{{e}}" u-i="d08ef7d4-3" bind:__l="__l" u-p="{{f}}">暂不登录</nut-button></view>
|
||||
77
unpackage/dist/dev/mp-weixin/pages/login/index.wxss
vendored
Normal file
77
unpackage/dist/dev/mp-weixin/pages/login/index.wxss
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.divider.data-v-d08ef7d4 {
|
||||
height: 1px;
|
||||
background: #eee;
|
||||
width: 100%;
|
||||
}
|
||||
.content.data-v-d08ef7d4 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
padding: 25px 15px;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
}
|
||||
.tip-infos.data-v-d08ef7d4 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
padding: 10px 25px;
|
||||
gap: 10px;
|
||||
}
|
||||
.tip-infos text.data-v-d08ef7d4:nth-child(2) {
|
||||
font-size: 15px;
|
||||
color: #666;
|
||||
}
|
||||
.authorize-btn-inner.data-v-d08ef7d4 {
|
||||
padding: 15px;
|
||||
}
|
||||
65
unpackage/dist/dev/mp-weixin/pages/login/phoneAuthorization.js
vendored
Normal file
65
unpackage/dist/dev/mp-weixin/pages/login/phoneAuthorization.js
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_user = require("../../api/user.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
_easycom_nut_button2();
|
||||
}
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
if (!Math) {
|
||||
_easycom_nut_button();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "phoneAuthorization",
|
||||
setup(__props) {
|
||||
const code = common_vendor.ref("");
|
||||
const redirect_url = common_vendor.ref("");
|
||||
common_vendor.onLoad((options) => {
|
||||
redirect_url.value = options.redirect_url;
|
||||
});
|
||||
common_vendor.onMounted(() => {
|
||||
common_vendor.index.login({
|
||||
provider: "weixin",
|
||||
success(res) {
|
||||
if (res.errMsg === "login:ok") {
|
||||
code.value = res.code;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
const getPhoneNumber = (res) => {
|
||||
if (res.detail.code) {
|
||||
api_user.fetchUserPhone(res.detail.code).then((res2) => {
|
||||
common_vendor.index.__f__("log", "at pages/login/phoneAuthorization.vue:54", res2);
|
||||
if (res2.msg === "success" && res2.code === 1) {
|
||||
common_vendor.index.showToast({
|
||||
title: "授权成功",
|
||||
icon: "none"
|
||||
});
|
||||
common_vendor.index.__f__("log", "at pages/login/phoneAuthorization.vue:60", "code");
|
||||
common_vendor.index.switchTab({
|
||||
url: "/pages/mine/index"
|
||||
});
|
||||
} else {
|
||||
common_vendor.index.switchTab({
|
||||
url: "/pages/mine/index"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o(getPhoneNumber),
|
||||
b: common_vendor.p({
|
||||
type: "success",
|
||||
size: "large",
|
||||
["open-type"]: "getPhoneNumber"
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9edfa882"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/login/phoneAuthorization.js.map
|
||||
6
unpackage/dist/dev/mp-weixin/pages/login/phoneAuthorization.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/pages/login/phoneAuthorization.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "授权手机号",
|
||||
"usingComponents": {
|
||||
"nut-button": "../../uni_modules/nutui-uni/components/button/button"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/login/phoneAuthorization.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/login/phoneAuthorization.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="tip-infos data-v-9edfa882"><text class="data-v-9edfa882">申请获取以下权限</text><text class="data-v-9edfa882">获得你的手机号信息</text></view><view class="authorize-btn-inner data-v-9edfa882"><nut-button wx:if="{{b}}" class="data-v-9edfa882" u-s="{{['d']}}" bindgetphonenumber="{{a}}" u-i="9edfa882-0" bind:__l="__l" u-p="{{b}}">授权手机号</nut-button></view>
|
||||
77
unpackage/dist/dev/mp-weixin/pages/login/phoneAuthorization.wxss
vendored
Normal file
77
unpackage/dist/dev/mp-weixin/pages/login/phoneAuthorization.wxss
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.divider.data-v-9edfa882 {
|
||||
height: 1px;
|
||||
background: #eee;
|
||||
width: 100%;
|
||||
}
|
||||
.content.data-v-9edfa882 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
padding: 25px 15px;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
}
|
||||
.tip-infos.data-v-9edfa882 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
padding: 10px 25px;
|
||||
gap: 10px;
|
||||
}
|
||||
.tip-infos text.data-v-9edfa882:nth-child(2) {
|
||||
font-size: 15px;
|
||||
color: #666;
|
||||
}
|
||||
.authorize-btn-inner.data-v-9edfa882 {
|
||||
padding: 15px;
|
||||
}
|
||||
136
unpackage/dist/dev/mp-weixin/pages/mall/detail.js
vendored
Normal file
136
unpackage/dist/dev/mp-weixin/pages/mall/detail.js
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const utils_helper = require("../../utils/helper.js");
|
||||
const api_goods = require("../../api/goods.js");
|
||||
const api_config = require("../../api/config.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_watermark2 = common_vendor.resolveComponent("nut-watermark");
|
||||
const _easycom_nut_cell_group2 = common_vendor.resolveComponent("nut-cell-group");
|
||||
const _easycom_nut_icon2 = common_vendor.resolveComponent("nut-icon");
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
(_easycom_nut_watermark2 + _easycom_nut_cell_group2 + _easycom_nut_icon2 + _easycom_nut_button2)();
|
||||
}
|
||||
const _easycom_nut_watermark = () => "../../uni_modules/nutui-uni/components/watermark/watermark.js";
|
||||
const _easycom_nut_cell_group = () => "../../uni_modules/nutui-uni/components/cellgroup/cellgroup.js";
|
||||
const _easycom_nut_icon = () => "../../uni_modules/nutui-uni/components/icon/icon.js";
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_watermark + _easycom_nut_cell_group + _easycom_nut_icon + _easycom_nut_button)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "detail",
|
||||
setup(__props) {
|
||||
const audit = common_vendor.ref(true);
|
||||
const serviceTxt = common_vendor.ref("");
|
||||
const id = common_vendor.ref(0);
|
||||
const detail = common_vendor.reactive({});
|
||||
common_vendor.onLoad((options) => {
|
||||
common_vendor.index.__f__("log", "at pages/mall/detail.vue:110", "init");
|
||||
getConfig();
|
||||
id.value = options.id;
|
||||
api_goods.fetchGoodsDetail(id.value).then((res) => {
|
||||
Object.assign(detail, res);
|
||||
});
|
||||
});
|
||||
const buyNow = (goodsId) => {
|
||||
let token = common_vendor.index.getStorageSync("token");
|
||||
if (token) {
|
||||
common_vendor.index.__f__("log", "at pages/mall/detail.vue:127", "已经登陆");
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/order/preview?ids=${goodsId}&from=item`
|
||||
});
|
||||
} else {
|
||||
utils_helper.goToLoginPage();
|
||||
}
|
||||
};
|
||||
const getConfig = () => {
|
||||
api_config.fetchGetConfig().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/mall/detail.vue:140", "getConfig=====>", res);
|
||||
audit.value = res.appConfig.is_audit == 1;
|
||||
serviceTxt.value = res.appConfig.service_txt;
|
||||
});
|
||||
};
|
||||
common_vendor.onShareTimeline((res) => {
|
||||
return {
|
||||
title: detail.goods_name,
|
||||
path: "/pages/mall/detail?id=" + detail.goods_id,
|
||||
imageUrl: detail.image[0].file_path
|
||||
};
|
||||
});
|
||||
common_vendor.onShareAppMessage((res) => {
|
||||
return {
|
||||
title: detail.goods_name,
|
||||
path: "/pages/mall/detail?id=" + detail.goods_id,
|
||||
imageUrl: detail.image[0].file_path
|
||||
};
|
||||
});
|
||||
const showGoodsImages = (index) => {
|
||||
common_vendor.index.previewImage({
|
||||
current: index,
|
||||
// 指定当前显示的图片索引
|
||||
urls: detail.image.map((e) => {
|
||||
return e.file_path;
|
||||
})
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
||||
return common_vendor.e({
|
||||
a: ((_a = detail.status) == null ? void 0 : _a.value) === 10
|
||||
}, ((_b = detail.status) == null ? void 0 : _b.value) === 10 ? {
|
||||
b: common_vendor.p({
|
||||
["z-index"]: 1,
|
||||
content: "此商品已下架"
|
||||
})
|
||||
} : {}, {
|
||||
c: ((_c = detail.status) == null ? void 0 : _c.value) === 30
|
||||
}, ((_d = detail.status) == null ? void 0 : _d.value) === 30 ? {
|
||||
d: common_vendor.p({
|
||||
["z-index"]: 1,
|
||||
content: "此商品已锁定"
|
||||
})
|
||||
} : {}, {
|
||||
e: ((_e = detail.status) == null ? void 0 : _e.value) === 40
|
||||
}, ((_f = detail.status) == null ? void 0 : _f.value) === 40 ? {
|
||||
f: common_vendor.p({
|
||||
["z-index"]: 1,
|
||||
content: "此商品已售出"
|
||||
})
|
||||
} : {}, {
|
||||
g: common_vendor.f(detail.image, (item, idx, i0) => {
|
||||
return {
|
||||
a: item.file_path,
|
||||
b: common_vendor.o(($event) => showGoodsImages(idx), idx),
|
||||
c: idx
|
||||
};
|
||||
}),
|
||||
h: common_vendor.t(detail.goods_price),
|
||||
i: common_vendor.t((_g = detail.degree) == null ? void 0 : _g.degree_name),
|
||||
j: common_vendor.t(detail.goods_name),
|
||||
k: common_vendor.t(detail.content),
|
||||
l: common_vendor.t(serviceTxt.value),
|
||||
m: common_vendor.p({
|
||||
name: "service"
|
||||
}),
|
||||
n: ((_h = detail.status) == null ? void 0 : _h.value) === 20
|
||||
}, ((_i = detail.status) == null ? void 0 : _i.value) === 20 ? common_vendor.e({
|
||||
o: !audit.value
|
||||
}, !audit.value ? {
|
||||
p: common_vendor.o(($event) => buyNow(detail.goods_id)),
|
||||
q: common_vendor.p({
|
||||
type: "primary"
|
||||
})
|
||||
} : {}) : common_vendor.e({
|
||||
r: !audit.value
|
||||
}, !audit.value ? {
|
||||
s: common_vendor.p({
|
||||
plain: true
|
||||
})
|
||||
} : {}));
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-da39d73f"]]);
|
||||
_sfc_main.__runtimeHooks = 6;
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mall/detail.js.map
|
||||
9
unpackage/dist/dev/mp-weixin/pages/mall/detail.json
vendored
Normal file
9
unpackage/dist/dev/mp-weixin/pages/mall/detail.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTitleText": "店铺商品详情",
|
||||
"usingComponents": {
|
||||
"nut-watermark": "../../uni_modules/nutui-uni/components/watermark/watermark",
|
||||
"nut-cell-group": "../../uni_modules/nutui-uni/components/cellgroup/cellgroup",
|
||||
"nut-icon": "../../uni_modules/nutui-uni/components/icon/icon",
|
||||
"nut-button": "../../uni_modules/nutui-uni/components/button/button"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/mall/detail.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/mall/detail.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="content data-v-da39d73f"><nut-watermark wx:if="{{a}}" class="mark1 data-v-da39d73f" u-i="da39d73f-0" bind:__l="__l" u-p="{{b}}"></nut-watermark><nut-watermark wx:if="{{c}}" class="mark1 data-v-da39d73f" u-i="da39d73f-1" bind:__l="__l" u-p="{{d}}"></nut-watermark><nut-watermark wx:if="{{e}}" class="mark1 data-v-da39d73f" u-i="da39d73f-2" bind:__l="__l" u-p="{{f}}"></nut-watermark><swiper class="swiper data-v-da39d73f" circular indicator-dots autoplay><swiper-item wx:for="{{g}}" wx:for-item="item" wx:key="c" class="data-v-da39d73f" bindtap="{{item.b}}"><image class="data-v-da39d73f" src="{{item.a}}" mode="aspectFill"></image></swiper-item></swiper><view class="goods_info data-v-da39d73f"><nut-cell-group class="data-v-da39d73f" u-s="{{['d']}}" u-i="da39d73f-3" bind:__l="__l"><view class="price data-v-da39d73f"><text class="unit data-v-da39d73f">¥</text><text class="value data-v-da39d73f">{{h}}</text></view></nut-cell-group><nut-cell-group class="data-v-da39d73f" u-s="{{['d']}}" u-i="da39d73f-4" bind:__l="__l"><view class="name data-v-da39d73f"><view class="top data-v-da39d73f"><view class="tag data-v-da39d73f"><text class="data-v-da39d73f">{{i}}</text></view><text class="title data-v-da39d73f">{{j}}</text></view><view class="data-v-da39d73f"><text class="info data-v-da39d73f">{{k}}</text></view></view></nut-cell-group><view class="service data-v-da39d73f"><view class="info data-v-da39d73f"><text class="title data-v-da39d73f">服务</text><text class="value data-v-da39d73f">{{l}}</text></view></view></view><view class="bottom-action data-v-da39d73f"><view class="bottom-action-icon data-v-da39d73f"><button plain open-type="contact" style="border:none;border-width:0" class="bottom-action-icon-item data-v-da39d73f"><nut-icon wx:if="{{m}}" class="data-v-da39d73f" u-i="da39d73f-5" bind:__l="__l" u-p="{{m}}"></nut-icon><text class="data-v-da39d73f">客服</text></button></view><view wx:if="{{n}}" class="bottom-action-btn data-v-da39d73f"><nut-button wx:if="{{o}}" class="data-v-da39d73f" u-s="{{['d']}}" bindclick="{{p}}" u-i="da39d73f-6" bind:__l="__l" u-p="{{q}}">立即购买</nut-button></view><view wx:else class="bottom-action-btn data-v-da39d73f"><nut-button wx:if="{{r}}" class="data-v-da39d73f" u-s="{{['d']}}" u-i="da39d73f-7" bind:__l="__l" u-p="{{s}}">暂不支持购买</nut-button></view></view></view>
|
||||
211
unpackage/dist/dev/mp-weixin/pages/mall/detail.wxss
vendored
Normal file
211
unpackage/dist/dev/mp-weixin/pages/mall/detail.wxss
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.bottom-action.data-v-da39d73f {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 50px;
|
||||
background: #fff;
|
||||
width: calc(100% - 20px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 0 auto;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.bottom-action .bottom-action-icon.data-v-da39d73f {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.bottom-action .bottom-action-icon .bottom-action-icon-item.data-v-da39d73f {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.bottom-action .bottom-action-icon .bottom-action-icon-item text.data-v-da39d73f {
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
font-size: 11px;
|
||||
}
|
||||
.bottom-action .bottom-action-btn.data-v-da39d73f {
|
||||
-ms-flex-align: center;
|
||||
-ms-flex-pack: end;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.content.data-v-da39d73f {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: calc(100vh - 50px);
|
||||
/* align-items: center; */
|
||||
background-color: #f2f3f5;
|
||||
--nut-cell-group-title-color: #000;
|
||||
--nut-collapse-item-padding: 10px 10px 10px 10px;
|
||||
--nut-collapse-wrapper-content-padding: 10px 10px 10px 10px;
|
||||
--nut-collapse-item-color: #000;
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
.report-inner.data-v-da39d73f {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
}
|
||||
.report-inner .report-item .report-item-name.data-v-da39d73f {
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
font-weight: 700;
|
||||
}
|
||||
.report-inner .report-item .report-item-content.data-v-da39d73f {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.report-inner .report-item .report-item-content .report-item-content-item.data-v-da39d73f {
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
width: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.count-item.data-v-da39d73f {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
.swiper.data-v-da39d73f {
|
||||
width: 100%;
|
||||
height: 414px;
|
||||
}
|
||||
.swiper image.data-v-da39d73f {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.goods_info.data-v-da39d73f {
|
||||
padding: 5px;
|
||||
color: #000;
|
||||
}
|
||||
.goods_info .price.data-v-da39d73f {
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
.goods_info .price .unit.data-v-da39d73f {
|
||||
font-size: 12px;
|
||||
}
|
||||
.goods_info .price .value.data-v-da39d73f {
|
||||
font-size: 24px;
|
||||
}
|
||||
.goods_info .name.data-v-da39d73f {
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
flex-direction: column;
|
||||
}
|
||||
.goods_info .name .top.data-v-da39d73f {
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
}
|
||||
.goods_info .name .top .tag.data-v-da39d73f {
|
||||
background: #000;
|
||||
padding: 1px 2px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.goods_info .name .top .tag text.data-v-da39d73f {
|
||||
font-size: 10px;
|
||||
color: #fff;
|
||||
}
|
||||
.goods_info .name .top .title.data-v-da39d73f {
|
||||
font-size: 16px;
|
||||
}
|
||||
.goods_info .name .info.data-v-da39d73f {
|
||||
color: rgba(0, 0, 0, 0.7);
|
||||
font-size: 13px;
|
||||
}
|
||||
.goods_info .service.data-v-da39d73f {
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.goods_info .service .info.data-v-da39d73f {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 5px;
|
||||
}
|
||||
.goods_info .service .info .title.data-v-da39d73f {
|
||||
font-size: 16px;
|
||||
}
|
||||
.goods_info .service .info .value.data-v-da39d73f {
|
||||
color: rgba(0, 0, 0, 0.7);
|
||||
font-size: 13px;
|
||||
}
|
||||
.goods_info .service .right_icon.data-v-da39d73f {
|
||||
background-color: currentColor;
|
||||
-webkit-mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0zNTMuODMgMTU4LjE3YTQyLjY3IDQyLjY3IDAgMSAxIDYwLjM0LTYwLjM0bDM4NCAzODRhNDIuNjcgNDIuNjcgMCAwIDEgMCA2MC4zNmwtMzg0IDM4NGE0Mi42NyA0Mi42NyAwIDEgMS02MC4zNC02MC4zNkw3MDcuNjcgNTEyeiIvPjwvc3ZnPg==") 0 0/100% 100% no-repeat;
|
||||
mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0zNTMuODMgMTU4LjE3YTQyLjY3IDQyLjY3IDAgMSAxIDYwLjM0LTYwLjM0bDM4NCAzODRhNDIuNjcgNDIuNjcgMCAwIDEgMCA2MC4zNmwtMzg0IDM4NGE0Mi42NyA0Mi42NyAwIDEgMS02MC4zNC02MC4zNkw3MDcuNjcgNTEyeiIvPjwvc3ZnPg==") 0 0/100% 100% no-repeat;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
.goods_info .report.data-v-da39d73f {
|
||||
border-radius: 5px;
|
||||
padding: 1px;
|
||||
background: #fff;
|
||||
}
|
||||
303
unpackage/dist/dev/mp-weixin/pages/mall/houseDetail.js
vendored
Normal file
303
unpackage/dist/dev/mp-weixin/pages/mall/houseDetail.js
vendored
Normal file
@@ -0,0 +1,303 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const utils_helper = require("../../utils/helper.js");
|
||||
const api_house_goods = require("../../api/house_goods.js");
|
||||
const api_house_order = require("../../api/house_order.js");
|
||||
const api_config = require("../../api/config.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_watermark2 = common_vendor.resolveComponent("nut-watermark");
|
||||
const _easycom_nut_cell_group2 = common_vendor.resolveComponent("nut-cell-group");
|
||||
const _easycom_nut_icon2 = common_vendor.resolveComponent("nut-icon");
|
||||
const _easycom_nut_collapse_item2 = common_vendor.resolveComponent("nut-collapse-item");
|
||||
const _easycom_nut_collapse2 = common_vendor.resolveComponent("nut-collapse");
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
(_easycom_nut_watermark2 + _easycom_nut_cell_group2 + _easycom_nut_icon2 + _easycom_nut_collapse_item2 + _easycom_nut_collapse2 + _easycom_nut_button2)();
|
||||
}
|
||||
const _easycom_nut_watermark = () => "../../uni_modules/nutui-uni/components/watermark/watermark.js";
|
||||
const _easycom_nut_cell_group = () => "../../uni_modules/nutui-uni/components/cellgroup/cellgroup.js";
|
||||
const _easycom_nut_icon = () => "../../uni_modules/nutui-uni/components/icon/icon.js";
|
||||
const _easycom_nut_collapse_item = () => "../../uni_modules/nutui-uni/components/collapseitem/collapseitem.js";
|
||||
const _easycom_nut_collapse = () => "../../uni_modules/nutui-uni/components/collapse/collapse.js";
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_watermark + _easycom_nut_cell_group + _easycom_nut_icon + _easycom_nut_collapse_item + _easycom_nut_collapse + _easycom_nut_button)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "houseDetail",
|
||||
setup(__props) {
|
||||
const audit = common_vendor.ref(true);
|
||||
const isWarehouse = common_vendor.ref(false);
|
||||
const singleRule = common_vendor.ref([]);
|
||||
const rangeRule = common_vendor.ref([]);
|
||||
const warehouseRule = common_vendor.reactive({
|
||||
val: 0,
|
||||
val_type: 1
|
||||
});
|
||||
const GetPriceRules = () => {
|
||||
api_config.fetchGetPriceRules().then((res) => {
|
||||
var _a;
|
||||
common_vendor.index.__f__("log", "at pages/mall/houseDetail.vue:174", "res", res);
|
||||
rangeRule.value = (res == null ? void 0 : res.range) ?? [];
|
||||
singleRule.value = (res == null ? void 0 : res.single) ?? [];
|
||||
Object.assign(warehouseRule, ((_a = res == null ? void 0 : res.warehouse) == null ? void 0 : _a[0]) ?? {
|
||||
val: 0,
|
||||
val_type: 1
|
||||
});
|
||||
});
|
||||
};
|
||||
const getPrice = (goods) => {
|
||||
if (isWarehouse.value) {
|
||||
common_vendor.index.__f__("log", "at pages/mall/houseDetail.vue:192", "开启整仓调价");
|
||||
const list = singleRule.value || singleRule;
|
||||
const rule = list.find((item) => item.product_id === goods.goods_id);
|
||||
if (rule) {
|
||||
const basePrice = Number(goods.goods_price);
|
||||
const val = Number(rule.val);
|
||||
let finalPrice = basePrice;
|
||||
if (rule.val_type == 1) {
|
||||
finalPrice = basePrice + val;
|
||||
} else if (rule.val_type == 2) {
|
||||
finalPrice = basePrice + basePrice * val / 100;
|
||||
}
|
||||
return finalPrice.toFixed(2);
|
||||
} else {
|
||||
const basePrice = Number(goods.goods_price);
|
||||
const val = Number(warehouseRule.val);
|
||||
let finalPrice = basePrice;
|
||||
if (warehouseRule.val_type == 1) {
|
||||
finalPrice = basePrice + val;
|
||||
} else if (warehouseRule.val_type == 2) {
|
||||
finalPrice = basePrice + basePrice * val / 100;
|
||||
}
|
||||
return finalPrice.toFixed(2);
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/mall/houseDetail.vue:223", "未开启整仓调价");
|
||||
const singleRuleList = singleRule.value || singleRule;
|
||||
const oneRule = singleRuleList.find((item) => item.product_id === goods.goods_id);
|
||||
if (oneRule) {
|
||||
const basePrice = Number(goods.goods_price);
|
||||
const val = Number(oneRule.val);
|
||||
let finalPrice = basePrice;
|
||||
if (oneRule.val_type == 1) {
|
||||
finalPrice = basePrice + val;
|
||||
} else if (oneRule.val_type == 2) {
|
||||
finalPrice = basePrice + basePrice * val / 100;
|
||||
}
|
||||
return finalPrice.toFixed(2);
|
||||
} else {
|
||||
const basePrice = Number(goods.goods_price);
|
||||
const rangeRulelist = rangeRule.value || rangeRule;
|
||||
const quRule = rangeRulelist.find((item) => {
|
||||
const min = Number(item.min_price);
|
||||
const max = Number(item.max_price);
|
||||
return basePrice >= min && basePrice < max;
|
||||
}) || null;
|
||||
if (quRule) {
|
||||
const val = Number(quRule.val);
|
||||
let finalPrice = basePrice;
|
||||
if (quRule.val_type == 1) {
|
||||
finalPrice = basePrice + val;
|
||||
} else if (quRule.val_type == 2) {
|
||||
finalPrice = basePrice + basePrice * val / 100;
|
||||
}
|
||||
return finalPrice.toFixed(2);
|
||||
} else {
|
||||
return basePrice;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
const id = common_vendor.ref(0);
|
||||
const detail = common_vendor.reactive({});
|
||||
const user_goods_cart_ids = common_vendor.ref([]);
|
||||
const goods_cart_ids = common_vendor.ref([]);
|
||||
const buyNow = (goodsId) => {
|
||||
let token = common_vendor.index.getStorageSync("token");
|
||||
if (token) {
|
||||
api_house_order.houseFetchCheckGoods({
|
||||
goods_id: goodsId
|
||||
}).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/mall/houseDetail.vue:292", res);
|
||||
common_vendor.index.__f__("log", "at pages/mall/houseDetail.vue:293", "已经登陆");
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/order/housePreview?ids=${goodsId}&from=item`
|
||||
});
|
||||
});
|
||||
} else {
|
||||
utils_helper.goToLoginPage();
|
||||
}
|
||||
};
|
||||
const getConfig = () => {
|
||||
api_config.fetchGetConfig().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/mall/houseDetail.vue:309", "getConfig=====>", res);
|
||||
audit.value = res.appConfig.is_audit == 1;
|
||||
isWarehouse.value = res.appConfig.is_warehouse == 1;
|
||||
});
|
||||
};
|
||||
common_vendor.onLoad((options) => {
|
||||
common_vendor.index.__f__("log", "at pages/mall/houseDetail.vue:317", "init");
|
||||
getConfig();
|
||||
GetPriceRules();
|
||||
id.value = options.id;
|
||||
api_house_goods.houseFetchGoodsDetail(id.value).then((res) => {
|
||||
Object.assign(detail, res);
|
||||
});
|
||||
api_house_goods.houseFetchCartGoodsIds().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/mall/houseDetail.vue:331", res);
|
||||
user_goods_cart_ids.value = res.user_cart_goods_ids;
|
||||
goods_cart_ids.value = res.cart_goods_ids;
|
||||
});
|
||||
});
|
||||
common_vendor.onShareTimeline((res) => {
|
||||
return {
|
||||
title: detail.goods_name,
|
||||
path: "/pages/mall/houseDetail?id=" + detail.goods_id,
|
||||
imageUrl: detail.image[0].file_path
|
||||
};
|
||||
});
|
||||
common_vendor.onShareAppMessage((res) => {
|
||||
return {
|
||||
title: detail.goods_name,
|
||||
path: "/pages/mall/houseDetail?id=" + detail.goods_id,
|
||||
imageUrl: detail.image[0].file_path
|
||||
};
|
||||
});
|
||||
const activeNames = common_vendor.ref([1, 2]);
|
||||
const onChange = (modelValue, currName, status) => {
|
||||
common_vendor.index.__f__("log", "at pages/mall/houseDetail.vue:364", modelValue, currName, status);
|
||||
};
|
||||
const showGoodsImages = (index) => {
|
||||
common_vendor.index.previewImage({
|
||||
current: index,
|
||||
// 指定当前显示的图片索引
|
||||
urls: detail.image.map((e) => {
|
||||
return e.file_path;
|
||||
})
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
||||
return common_vendor.e({
|
||||
a: ((_a = detail.shelves_status) == null ? void 0 : _a.value) === 10
|
||||
}, ((_b = detail.shelves_status) == null ? void 0 : _b.value) === 10 ? {
|
||||
b: common_vendor.p({
|
||||
["z-index"]: 1,
|
||||
content: "此商品已下架"
|
||||
})
|
||||
} : {}, {
|
||||
c: ((_c = detail.shelves_status) == null ? void 0 : _c.value) === 30
|
||||
}, ((_d = detail.shelves_status) == null ? void 0 : _d.value) === 30 ? {
|
||||
d: common_vendor.p({
|
||||
["z-index"]: 1,
|
||||
content: "此商品已售出"
|
||||
})
|
||||
} : {}, {
|
||||
e: detail.is_locked
|
||||
}, detail.is_locked ? {
|
||||
f: common_vendor.p({
|
||||
["z-index"]: 1,
|
||||
content: "此商品被锁单"
|
||||
})
|
||||
} : {}, {
|
||||
g: common_vendor.f(detail.image, (item, idx, i0) => {
|
||||
return {
|
||||
a: item.file_path,
|
||||
b: common_vendor.o(($event) => showGoodsImages(idx), idx),
|
||||
c: idx
|
||||
};
|
||||
}),
|
||||
h: common_vendor.t(getPrice(detail)),
|
||||
i: common_vendor.t((_e = detail.degree) == null ? void 0 : _e.degree_name),
|
||||
j: common_vendor.t(detail.goods_name),
|
||||
k: common_vendor.t(detail.content),
|
||||
l: common_vendor.t(detail.service_txt),
|
||||
m: common_vendor.p({
|
||||
name: "tips",
|
||||
size: "12",
|
||||
["custom-color"]: "#ff3535"
|
||||
}),
|
||||
n: common_vendor.t((_f = detail.report_tags) == null ? void 0 : _f.bad_count),
|
||||
o: common_vendor.f((_g = detail == null ? void 0 : detail.report_tags) == null ? void 0 : _g.bad, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.name),
|
||||
b: common_vendor.f(item.value_list, (iitem, iidx, i1) => {
|
||||
return {
|
||||
a: "cec1cea2-9-" + i0 + "-" + i1 + ",cec1cea2-7",
|
||||
b: common_vendor.t(iitem.name),
|
||||
c: iidx
|
||||
};
|
||||
}),
|
||||
c: idx
|
||||
};
|
||||
}),
|
||||
p: common_vendor.p({
|
||||
name: "tips",
|
||||
size: "12",
|
||||
["custom-color"]: "#ff3535"
|
||||
}),
|
||||
q: common_vendor.p({
|
||||
name: 1,
|
||||
icon: "rect-down"
|
||||
}),
|
||||
r: common_vendor.p({
|
||||
name: "success",
|
||||
size: "12",
|
||||
["custom-color"]: "#5dcc30"
|
||||
}),
|
||||
s: common_vendor.t((_h = detail.report_tags) == null ? void 0 : _h.ok_count),
|
||||
t: common_vendor.f((_i = detail == null ? void 0 : detail.report_tags) == null ? void 0 : _i.ok, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.name),
|
||||
b: common_vendor.f(item.value_list, (iitem, iidx, i1) => {
|
||||
return {
|
||||
a: "cec1cea2-12-" + i0 + "-" + i1 + ",cec1cea2-10",
|
||||
b: common_vendor.t(iitem.name),
|
||||
c: iidx
|
||||
};
|
||||
}),
|
||||
c: idx
|
||||
};
|
||||
}),
|
||||
v: common_vendor.p({
|
||||
name: "success",
|
||||
size: "12",
|
||||
["custom-color"]: "#5dcc30"
|
||||
}),
|
||||
w: common_vendor.p({
|
||||
name: 2,
|
||||
icon: "rect-down"
|
||||
}),
|
||||
x: common_vendor.o(onChange),
|
||||
y: common_vendor.o(($event) => activeNames.value = $event),
|
||||
z: common_vendor.p({
|
||||
modelValue: activeNames.value
|
||||
}),
|
||||
A: common_vendor.p({
|
||||
title: "验机报告"
|
||||
}),
|
||||
B: common_vendor.p({
|
||||
name: "service"
|
||||
}),
|
||||
C: ((_j = detail.shelves_status) == null ? void 0 : _j.value) === 20 && !goods_cart_ids.value.includes(detail.goods_id)
|
||||
}, ((_k = detail.shelves_status) == null ? void 0 : _k.value) === 20 && !goods_cart_ids.value.includes(detail.goods_id) ? common_vendor.e({
|
||||
D: !audit.value
|
||||
}, !audit.value ? {
|
||||
E: common_vendor.o(($event) => buyNow(detail.goods_id)),
|
||||
F: common_vendor.p({
|
||||
type: "primary"
|
||||
})
|
||||
} : {}) : common_vendor.e({
|
||||
G: !audit.value
|
||||
}, !audit.value ? {
|
||||
H: common_vendor.p({
|
||||
plain: true
|
||||
})
|
||||
} : {}));
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-cec1cea2"]]);
|
||||
_sfc_main.__runtimeHooks = 6;
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mall/houseDetail.js.map
|
||||
11
unpackage/dist/dev/mp-weixin/pages/mall/houseDetail.json
vendored
Normal file
11
unpackage/dist/dev/mp-weixin/pages/mall/houseDetail.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"navigationBarTitleText": "仓库商品详情",
|
||||
"usingComponents": {
|
||||
"nut-watermark": "../../uni_modules/nutui-uni/components/watermark/watermark",
|
||||
"nut-cell-group": "../../uni_modules/nutui-uni/components/cellgroup/cellgroup",
|
||||
"nut-icon": "../../uni_modules/nutui-uni/components/icon/icon",
|
||||
"nut-collapse-item": "../../uni_modules/nutui-uni/components/collapseitem/collapseitem",
|
||||
"nut-collapse": "../../uni_modules/nutui-uni/components/collapse/collapse",
|
||||
"nut-button": "../../uni_modules/nutui-uni/components/button/button"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/mall/houseDetail.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/mall/houseDetail.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="content data-v-cec1cea2"><nut-watermark wx:if="{{a}}" class="mark1 data-v-cec1cea2" u-i="cec1cea2-0" bind:__l="__l" u-p="{{b}}"></nut-watermark><nut-watermark wx:if="{{c}}" class="mark1 data-v-cec1cea2" u-i="cec1cea2-1" bind:__l="__l" u-p="{{d}}"></nut-watermark><nut-watermark wx:if="{{e}}" class="mark1 data-v-cec1cea2" u-i="cec1cea2-2" bind:__l="__l" u-p="{{f}}"></nut-watermark><swiper class="swiper data-v-cec1cea2" circular indicator-dots autoplay><swiper-item wx:for="{{g}}" wx:for-item="item" wx:key="c" class="data-v-cec1cea2" bindtap="{{item.b}}"><image class="data-v-cec1cea2" src="{{item.a}}" mode="aspectFill"></image></swiper-item></swiper><view class="goods_info data-v-cec1cea2"><nut-cell-group class="data-v-cec1cea2" u-s="{{['d']}}" u-i="cec1cea2-3" bind:__l="__l"><view class="price data-v-cec1cea2"><text class="unit data-v-cec1cea2">¥</text><text class="value data-v-cec1cea2">{{h}}</text></view></nut-cell-group><nut-cell-group class="data-v-cec1cea2" u-s="{{['d']}}" u-i="cec1cea2-4" bind:__l="__l"><view class="name data-v-cec1cea2"><view class="top data-v-cec1cea2"><view class="tag data-v-cec1cea2"><text class="data-v-cec1cea2">{{i}}</text></view><text class="title data-v-cec1cea2">{{j}}</text></view><view class="data-v-cec1cea2"><text class="info data-v-cec1cea2">{{k}}</text></view></view></nut-cell-group><view class="service data-v-cec1cea2"><view class="info data-v-cec1cea2"><text class="title data-v-cec1cea2">服务</text><text class="value data-v-cec1cea2">{{l}}</text></view></view><nut-cell-group wx:if="{{A}}" class="data-v-cec1cea2" u-s="{{['d']}}" u-i="cec1cea2-5" bind:__l="__l" u-p="{{A}}"><nut-collapse wx:if="{{z}}" class="data-v-cec1cea2" u-s="{{['d']}}" bindchange="{{x}}" u-i="cec1cea2-6,cec1cea2-5" bind:__l="__l" bindupdateModelValue="{{y}}" u-p="{{z}}"><nut-collapse-item wx:if="{{q}}" class="data-v-cec1cea2" u-s="{{['title','value','d']}}" u-i="cec1cea2-7,cec1cea2-6" bind:__l="__l" u-p="{{q}}"><view slot="title"> 瑕疵项 </view><view class="count-item data-v-cec1cea2" slot="value"><nut-icon wx:if="{{m}}" class="data-v-cec1cea2" u-i="cec1cea2-8,cec1cea2-7" bind:__l="__l" u-p="{{m}}"></nut-icon><text class="data-v-cec1cea2">{{n}}项</text></view><view class="report-inner data-v-cec1cea2"><view wx:for="{{o}}" wx:for-item="item" wx:key="c" class="report-item data-v-cec1cea2"><view class="report-item-name data-v-cec1cea2">{{item.a}}</view><view class="report-item-content data-v-cec1cea2"><view wx:for="{{item.b}}" wx:for-item="iitem" wx:key="c" class="report-item-content-item data-v-cec1cea2"><nut-icon wx:if="{{p}}" class="data-v-cec1cea2" u-i="{{iitem.a}}" bind:__l="__l" u-p="{{p}}"></nut-icon><text class="data-v-cec1cea2">{{iitem.b}}</text></view></view></view></view></nut-collapse-item><nut-collapse-item wx:if="{{w}}" class="data-v-cec1cea2" u-s="{{['title','value','d']}}" u-i="cec1cea2-10,cec1cea2-6" bind:__l="__l" u-p="{{w}}"><view slot="title"> 正常项 </view><view class="count-item data-v-cec1cea2" slot="value"><nut-icon wx:if="{{r}}" class="data-v-cec1cea2" u-i="cec1cea2-11,cec1cea2-10" bind:__l="__l" u-p="{{r}}"></nut-icon><text class="data-v-cec1cea2">{{s}}项</text></view><view class="report-inner data-v-cec1cea2"><view wx:for="{{t}}" wx:for-item="item" wx:key="c" class="report-item data-v-cec1cea2"><view class="report-item-name data-v-cec1cea2">{{item.a}}</view><view class="report-item-content data-v-cec1cea2"><view wx:for="{{item.b}}" wx:for-item="iitem" wx:key="c" class="report-item-content-item data-v-cec1cea2"><nut-icon wx:if="{{v}}" class="data-v-cec1cea2" u-i="{{iitem.a}}" bind:__l="__l" u-p="{{v}}"></nut-icon><text class="data-v-cec1cea2">{{iitem.b}}</text></view></view></view></view></nut-collapse-item></nut-collapse></nut-cell-group></view><view class="bottom-action data-v-cec1cea2"><view class="bottom-action-icon data-v-cec1cea2"><button plain open-type="contact" style="border:none;border-width:0" class="bottom-action-icon-item data-v-cec1cea2"><nut-icon wx:if="{{B}}" class="data-v-cec1cea2" u-i="cec1cea2-13" bind:__l="__l" u-p="{{B}}"></nut-icon><text class="data-v-cec1cea2">客服</text></button></view><view wx:if="{{C}}" class="bottom-action-btn data-v-cec1cea2"><nut-button wx:if="{{D}}" class="data-v-cec1cea2" u-s="{{['d']}}" bindclick="{{E}}" u-i="cec1cea2-14" bind:__l="__l" u-p="{{F}}">立即购买</nut-button></view><view wx:else class="bottom-action-btn data-v-cec1cea2"><nut-button wx:if="{{G}}" class="data-v-cec1cea2" u-s="{{['d']}}" u-i="cec1cea2-15" bind:__l="__l" u-p="{{H}}">已锁定</nut-button></view></view></view>
|
||||
211
unpackage/dist/dev/mp-weixin/pages/mall/houseDetail.wxss
vendored
Normal file
211
unpackage/dist/dev/mp-weixin/pages/mall/houseDetail.wxss
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.bottom-action.data-v-cec1cea2 {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 50px;
|
||||
background: #fff;
|
||||
width: calc(100% - 20px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 0 auto;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.bottom-action .bottom-action-icon.data-v-cec1cea2 {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.bottom-action .bottom-action-icon .bottom-action-icon-item.data-v-cec1cea2 {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.bottom-action .bottom-action-icon .bottom-action-icon-item text.data-v-cec1cea2 {
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
font-size: 11px;
|
||||
}
|
||||
.bottom-action .bottom-action-btn.data-v-cec1cea2 {
|
||||
-ms-flex-align: center;
|
||||
-ms-flex-pack: end;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.content.data-v-cec1cea2 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* align-items: center; */
|
||||
background-color: #f2f3f5;
|
||||
height: calc(100% - 50px);
|
||||
--nut-cell-group-title-color: #000;
|
||||
--nut-collapse-item-padding: 10px 10px 10px 10px;
|
||||
--nut-collapse-wrapper-content-padding: 10px 10px 10px 10px;
|
||||
--nut-collapse-item-color: #000;
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
.report-inner.data-v-cec1cea2 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
}
|
||||
.report-inner .report-item .report-item-name.data-v-cec1cea2 {
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
font-weight: 700;
|
||||
}
|
||||
.report-inner .report-item .report-item-content.data-v-cec1cea2 {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.report-inner .report-item .report-item-content .report-item-content-item.data-v-cec1cea2 {
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
width: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.count-item.data-v-cec1cea2 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
.swiper.data-v-cec1cea2 {
|
||||
width: 100%;
|
||||
height: 414px;
|
||||
}
|
||||
.swiper image.data-v-cec1cea2 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.goods_info.data-v-cec1cea2 {
|
||||
padding: 5px;
|
||||
color: #000;
|
||||
}
|
||||
.goods_info .price.data-v-cec1cea2 {
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
.goods_info .price .unit.data-v-cec1cea2 {
|
||||
font-size: 12px;
|
||||
}
|
||||
.goods_info .price .value.data-v-cec1cea2 {
|
||||
font-size: 24px;
|
||||
}
|
||||
.goods_info .name.data-v-cec1cea2 {
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
flex-direction: column;
|
||||
}
|
||||
.goods_info .name .top.data-v-cec1cea2 {
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
}
|
||||
.goods_info .name .top .tag.data-v-cec1cea2 {
|
||||
background: #000;
|
||||
padding: 1px 2px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.goods_info .name .top .tag text.data-v-cec1cea2 {
|
||||
font-size: 10px;
|
||||
color: #fff;
|
||||
}
|
||||
.goods_info .name .top .title.data-v-cec1cea2 {
|
||||
font-size: 16px;
|
||||
}
|
||||
.goods_info .name .info.data-v-cec1cea2 {
|
||||
color: rgba(0, 0, 0, 0.7);
|
||||
font-size: 13px;
|
||||
}
|
||||
.goods_info .service.data-v-cec1cea2 {
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.goods_info .service .info.data-v-cec1cea2 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 5px;
|
||||
}
|
||||
.goods_info .service .info .title.data-v-cec1cea2 {
|
||||
font-size: 16px;
|
||||
}
|
||||
.goods_info .service .info .value.data-v-cec1cea2 {
|
||||
color: rgba(0, 0, 0, 0.7);
|
||||
font-size: 13px;
|
||||
}
|
||||
.goods_info .service .right_icon.data-v-cec1cea2 {
|
||||
background-color: currentColor;
|
||||
-webkit-mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0zNTMuODMgMTU4LjE3YTQyLjY3IDQyLjY3IDAgMSAxIDYwLjM0LTYwLjM0bDM4NCAzODRhNDIuNjcgNDIuNjcgMCAwIDEgMCA2MC4zNmwtMzg0IDM4NGE0Mi42NyA0Mi42NyAwIDEgMS02MC4zNC02MC4zNkw3MDcuNjcgNTEyeiIvPjwvc3ZnPg==") 0 0/100% 100% no-repeat;
|
||||
mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0zNTMuODMgMTU4LjE3YTQyLjY3IDQyLjY3IDAgMSAxIDYwLjM0LTYwLjM0bDM4NCAzODRhNDIuNjcgNDIuNjcgMCAwIDEgMCA2MC4zNmwtMzg0IDM4NGE0Mi42NyA0Mi42NyAwIDEgMS02MC4zNC02MC4zNkw3MDcuNjcgNTEyeiIvPjwvc3ZnPg==") 0 0/100% 100% no-repeat;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
.goods_info .report.data-v-cec1cea2 {
|
||||
border-radius: 5px;
|
||||
padding: 1px;
|
||||
background: #fff;
|
||||
}
|
||||
165
unpackage/dist/dev/mp-weixin/pages/mine/index.js
vendored
Normal file
165
unpackage/dist/dev/mp-weixin/pages/mine/index.js
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_user = require("../../api/user.js");
|
||||
const utils_helper = require("../../utils/helper.js");
|
||||
const api_order = require("../../api/order.js");
|
||||
const api_config = require("../../api/config.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_avatar2 = common_vendor.resolveComponent("nut-avatar");
|
||||
const _easycom_nut_icon2 = common_vendor.resolveComponent("nut-icon");
|
||||
const _easycom_nut_grid_item2 = common_vendor.resolveComponent("nut-grid-item");
|
||||
const _easycom_nut_grid2 = common_vendor.resolveComponent("nut-grid");
|
||||
const _easycom_nut_cell_group2 = common_vendor.resolveComponent("nut-cell-group");
|
||||
const _easycom_nut_cell2 = common_vendor.resolveComponent("nut-cell");
|
||||
(_easycom_nut_avatar2 + _easycom_nut_icon2 + _easycom_nut_grid_item2 + _easycom_nut_grid2 + _easycom_nut_cell_group2 + _easycom_nut_cell2)();
|
||||
}
|
||||
const _easycom_nut_avatar = () => "../../uni_modules/nutui-uni/components/avatar/avatar.js";
|
||||
const _easycom_nut_icon = () => "../../uni_modules/nutui-uni/components/icon/icon.js";
|
||||
const _easycom_nut_grid_item = () => "../../uni_modules/nutui-uni/components/griditem/griditem.js";
|
||||
const _easycom_nut_grid = () => "../../uni_modules/nutui-uni/components/grid/grid.js";
|
||||
const _easycom_nut_cell_group = () => "../../uni_modules/nutui-uni/components/cellgroup/cellgroup.js";
|
||||
const _easycom_nut_cell = () => "../../uni_modules/nutui-uni/components/cell/cell.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_avatar + _easycom_nut_icon + _easycom_nut_grid_item + _easycom_nut_grid + _easycom_nut_cell_group + _easycom_nut_cell)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const audit = common_vendor.ref(true);
|
||||
const showMyOrder = common_vendor.ref(false);
|
||||
const phone = common_vendor.ref("");
|
||||
const uid = common_vendor.ref(0);
|
||||
const userInfo = common_vendor.reactive({});
|
||||
const countInfo = common_vendor.reactive({
|
||||
all: 0,
|
||||
payment: 0,
|
||||
delivery: 0,
|
||||
received: 0
|
||||
});
|
||||
common_vendor.onLoad((options) => {
|
||||
});
|
||||
const makePhoneCall = (phoneNumber) => {
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:163", 123);
|
||||
common_vendor.index.makePhoneCall({
|
||||
phoneNumber,
|
||||
success: () => {
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:167", "拨打电话成功");
|
||||
},
|
||||
fail: (err) => {
|
||||
common_vendor.index.__f__("error", "at pages/mine/index.vue:170", "拨打电话失败:", err);
|
||||
}
|
||||
});
|
||||
};
|
||||
const getConfig = () => {
|
||||
api_config.fetchGetConfig().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:179", "getConfig=====>", res);
|
||||
audit.value = res.appConfig.is_audit == 1;
|
||||
phone.value = res.appConfig.shop_phone;
|
||||
});
|
||||
};
|
||||
common_vendor.onShow(() => {
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:190", "init");
|
||||
let userId = common_vendor.index.getStorageSync("uid");
|
||||
common_vendor.index.__f__("log", "at pages/mine/index.vue:193", "userId", userId);
|
||||
uid.value = userId;
|
||||
getConfig();
|
||||
if (uid.value > 0) {
|
||||
api_user.fetchUserInfo().then((res) => {
|
||||
Object.assign(userInfo, res);
|
||||
showMyOrder.value = true;
|
||||
api_order.fetchOrderTotalCount().then((res2) => {
|
||||
Object.assign(countInfo, res2);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: uid.value > 0
|
||||
}, uid.value > 0 ? {
|
||||
b: common_vendor.p({
|
||||
size: "large"
|
||||
}),
|
||||
c: common_vendor.t(userInfo.nickName),
|
||||
d: common_vendor.t(userInfo.user_id)
|
||||
} : {
|
||||
e: common_vendor.p({
|
||||
name: "my"
|
||||
}),
|
||||
f: common_vendor.p({
|
||||
size: "large"
|
||||
}),
|
||||
g: common_vendor.o(($event) => common_vendor.unref(utils_helper.goToLoginPage)()),
|
||||
h: common_vendor.o(($event) => common_vendor.unref(utils_helper.goToLoginPage)())
|
||||
}, {
|
||||
i: common_vendor.p({
|
||||
name: "people"
|
||||
}),
|
||||
j: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/store")),
|
||||
k: common_vendor.p({
|
||||
text: "商城配置"
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
name: "refresh"
|
||||
}),
|
||||
m: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/price")),
|
||||
n: common_vendor.p({
|
||||
text: "价格调整"
|
||||
}),
|
||||
o: common_vendor.p({
|
||||
name: "shop"
|
||||
}),
|
||||
p: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/goodsList")),
|
||||
q: common_vendor.p({
|
||||
text: "商品管理"
|
||||
}),
|
||||
r: common_vendor.p({
|
||||
name: "order"
|
||||
}),
|
||||
s: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/config/shopOrder/index?tab=0")),
|
||||
t: common_vendor.p({
|
||||
text: "店铺订单"
|
||||
}),
|
||||
v: common_vendor.p({
|
||||
title: "店铺管理"
|
||||
}),
|
||||
w: showMyOrder.value && !audit.value
|
||||
}, showMyOrder.value && !audit.value ? {
|
||||
x: common_vendor.t(countInfo.all),
|
||||
y: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/order/index?tab=0")),
|
||||
z: common_vendor.p({
|
||||
text: "全部"
|
||||
}),
|
||||
A: common_vendor.t(countInfo.payment),
|
||||
B: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/order/index?tab=1")),
|
||||
C: common_vendor.p({
|
||||
text: "待付款"
|
||||
}),
|
||||
D: common_vendor.t(countInfo.delivery),
|
||||
E: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/order/index?tab=2")),
|
||||
F: common_vendor.p({
|
||||
text: "待发货"
|
||||
}),
|
||||
G: common_vendor.t(countInfo.received),
|
||||
H: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/order/index?tab=3")),
|
||||
I: common_vendor.p({
|
||||
text: "待收货"
|
||||
}),
|
||||
J: common_vendor.p({
|
||||
title: "我的订单"
|
||||
})
|
||||
} : {}, {
|
||||
K: common_vendor.o(($event) => makePhoneCall(phone.value)),
|
||||
L: common_vendor.p({
|
||||
title: phone.value
|
||||
}),
|
||||
M: common_vendor.p({
|
||||
title: "联系我们"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-569e925a"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine/index.js.map
|
||||
11
unpackage/dist/dev/mp-weixin/pages/mine/index.json
vendored
Normal file
11
unpackage/dist/dev/mp-weixin/pages/mine/index.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的",
|
||||
"usingComponents": {
|
||||
"nut-avatar": "../../uni_modules/nutui-uni/components/avatar/avatar",
|
||||
"nut-icon": "../../uni_modules/nutui-uni/components/icon/icon",
|
||||
"nut-grid-item": "../../uni_modules/nutui-uni/components/griditem/griditem",
|
||||
"nut-grid": "../../uni_modules/nutui-uni/components/grid/grid",
|
||||
"nut-cell-group": "../../uni_modules/nutui-uni/components/cellgroup/cellgroup",
|
||||
"nut-cell": "../../uni_modules/nutui-uni/components/cell/cell"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/mine/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/mine/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="page-content data-v-569e925a"><view wx:if="{{a}}" class="user-inner data-v-569e925a"><view class="data-v-569e925a"><nut-avatar wx:if="{{b}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-0" bind:__l="__l" u-p="{{b}}">用户</nut-avatar></view><view class="user-info-style data-v-569e925a"><text class="nickname data-v-569e925a">{{c}}</text><text class="user-id data-v-569e925a">UID:{{d}}</text></view></view><view wx:else class="user-inner data-v-569e925a"><view class="data-v-569e925a" bindtap="{{g}}"><nut-avatar wx:if="{{f}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-1" bind:__l="__l" u-p="{{f}}"><nut-icon wx:if="{{e}}" class="data-v-569e925a" u-i="569e925a-2,569e925a-1" bind:__l="__l" u-p="{{e}}"/></nut-avatar></view><view class="data-v-569e925a" bindtap="{{h}}"><text class="data-v-569e925a">点击登录</text></view></view><view class="content data-v-569e925a"><nut-cell-group wx:if="{{v}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-3" bind:__l="__l" u-p="{{v}}"><nut-grid class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-4,569e925a-3" bind:__l="__l"><nut-grid-item wx:if="{{k}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{j}}" u-i="569e925a-5,569e925a-4" bind:__l="__l" u-p="{{k}}"><nut-icon wx:if="{{i}}" class="data-v-569e925a" u-i="569e925a-6,569e925a-5" bind:__l="__l" u-p="{{i}}"></nut-icon></nut-grid-item><nut-grid-item wx:if="{{n}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{m}}" u-i="569e925a-7,569e925a-4" bind:__l="__l" u-p="{{n}}"><nut-icon wx:if="{{l}}" class="data-v-569e925a" u-i="569e925a-8,569e925a-7" bind:__l="__l" u-p="{{l}}"></nut-icon></nut-grid-item><nut-grid-item wx:if="{{q}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{p}}" u-i="569e925a-9,569e925a-4" bind:__l="__l" u-p="{{q}}"><nut-icon wx:if="{{o}}" class="data-v-569e925a" u-i="569e925a-10,569e925a-9" bind:__l="__l" u-p="{{o}}"></nut-icon></nut-grid-item><nut-grid-item wx:if="{{t}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{s}}" u-i="569e925a-11,569e925a-4" bind:__l="__l" u-p="{{t}}"><nut-icon wx:if="{{r}}" class="data-v-569e925a" u-i="569e925a-12,569e925a-11" bind:__l="__l" u-p="{{r}}"></nut-icon></nut-grid-item></nut-grid></nut-cell-group><nut-cell-group wx:if="{{w}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-13" bind:__l="__l" u-p="{{J}}"><nut-grid class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-14,569e925a-13" bind:__l="__l"><nut-grid-item wx:if="{{z}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{y}}" u-i="569e925a-15,569e925a-14" bind:__l="__l" u-p="{{z}}">{{x}}</nut-grid-item><nut-grid-item wx:if="{{C}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{B}}" u-i="569e925a-16,569e925a-14" bind:__l="__l" u-p="{{C}}">{{A}}</nut-grid-item><nut-grid-item wx:if="{{F}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{E}}" u-i="569e925a-17,569e925a-14" bind:__l="__l" u-p="{{F}}">{{D}}</nut-grid-item><nut-grid-item wx:if="{{I}}" class="data-v-569e925a" u-s="{{['d']}}" bindclick="{{H}}" u-i="569e925a-18,569e925a-14" bind:__l="__l" u-p="{{I}}">{{G}}</nut-grid-item></nut-grid></nut-cell-group><nut-cell-group wx:if="{{M}}" class="data-v-569e925a" u-s="{{['d']}}" u-i="569e925a-19" bind:__l="__l" u-p="{{M}}"><nut-cell wx:if="{{L}}" class="data-v-569e925a" bindclick="{{K}}" u-i="569e925a-20,569e925a-19" bind:__l="__l" u-p="{{L}}"></nut-cell></nut-cell-group></view></view>
|
||||
91
unpackage/dist/dev/mp-weixin/pages/mine/index.wxss
vendored
Normal file
91
unpackage/dist/dev/mp-weixin/pages/mine/index.wxss
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page-content.data-v-569e925a {
|
||||
min-height: 100vh;
|
||||
background-color: #f2f3f5;
|
||||
}
|
||||
.user-inner.data-v-569e925a {
|
||||
background: linear-gradient(30deg, rgba(198, 77, 255, 0.99), rgba(102, 204, 255, 0.99));
|
||||
height: 150px;
|
||||
width: calc(100% - 20px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0px 10px;
|
||||
gap: 15px;
|
||||
}
|
||||
.user-info-style.data-v-569e925a {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.nickname.data-v-569e925a {
|
||||
font-size: 20px;
|
||||
/* 大字体 */
|
||||
font-weight: bold;
|
||||
/* 加粗 */
|
||||
color: #333;
|
||||
/* 深色文字 */
|
||||
margin-bottom: 5px;
|
||||
/* 与UID的间距 */
|
||||
}
|
||||
.user-id.data-v-569e925a {
|
||||
font-size: 14px;
|
||||
/* 小字体 */
|
||||
color: #fff;
|
||||
/* 浅色文字 */
|
||||
}
|
||||
.content.data-v-569e925a {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* align-items: center; */
|
||||
background-color: #f2f3f5;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
151
unpackage/dist/dev/mp-weixin/pages/order/detail.js
vendored
Normal file
151
unpackage/dist/dev/mp-weixin/pages/order/detail.js
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_order = require("../../api/order.js");
|
||||
const utils_helper = require("../../utils/helper.js");
|
||||
const api_config = require("../../api/config.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_step2 = common_vendor.resolveComponent("nut-step");
|
||||
const _easycom_nut_steps2 = common_vendor.resolveComponent("nut-steps");
|
||||
const _easycom_nut_cell2 = common_vendor.resolveComponent("nut-cell");
|
||||
const _easycom_nut_cell_group2 = common_vendor.resolveComponent("nut-cell-group");
|
||||
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
|
||||
const _easycom_nut_price2 = common_vendor.resolveComponent("nut-price");
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
(_easycom_nut_step2 + _easycom_nut_steps2 + _easycom_nut_cell2 + _easycom_nut_cell_group2 + _easycom_nut_tag2 + _easycom_nut_price2 + _easycom_nut_button2)();
|
||||
}
|
||||
const _easycom_nut_step = () => "../../uni_modules/nutui-uni/components/step/step.js";
|
||||
const _easycom_nut_steps = () => "../../uni_modules/nutui-uni/components/steps/steps.js";
|
||||
const _easycom_nut_cell = () => "../../uni_modules/nutui-uni/components/cell/cell.js";
|
||||
const _easycom_nut_cell_group = () => "../../uni_modules/nutui-uni/components/cellgroup/cellgroup.js";
|
||||
const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js";
|
||||
const _easycom_nut_price = () => "../../uni_modules/nutui-uni/components/price/price.js";
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_step + _easycom_nut_steps + _easycom_nut_cell + _easycom_nut_cell_group + _easycom_nut_tag + _easycom_nut_price + _easycom_nut_button)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "detail",
|
||||
setup(__props) {
|
||||
const audit = common_vendor.ref(true);
|
||||
const id = common_vendor.ref(0);
|
||||
const detail = common_vendor.reactive({});
|
||||
const images = common_vendor.ref([]);
|
||||
common_vendor.onLoad((options) => {
|
||||
id.value = options.id;
|
||||
});
|
||||
common_vendor.onShow(() => {
|
||||
getConfig();
|
||||
api_order.fetchOrderDetail(id.value).then((res) => {
|
||||
Object.assign(detail, res);
|
||||
});
|
||||
});
|
||||
const getConfig = () => {
|
||||
api_config.fetchGetConfig().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/order/detail.vue:149", "getConfig=====>", res);
|
||||
audit.value = res.appConfig.is_audit == 1;
|
||||
common_vendor.index.__f__("log", "at pages/order/detail.vue:151", res.appConfig.pay_imgs);
|
||||
let pay_imgs = JSON.parse(res.appConfig.pay_imgs) || [];
|
||||
let wechat_imgs = JSON.parse(res.appConfig.wechat_imgs) || [];
|
||||
let pay_imgs_arr = pay_imgs.map((item) => item.file_path) || [];
|
||||
let wechat_imgs_arr = wechat_imgs.map((item) => item.file_path) || [];
|
||||
const merged_imgs_arr = pay_imgs_arr.concat(wechat_imgs_arr);
|
||||
images.value = merged_imgs_arr;
|
||||
});
|
||||
};
|
||||
const showPayImgs = () => {
|
||||
if (images.value.length === 0) {
|
||||
common_vendor.index.showToast({
|
||||
title: "暂无图片",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/order/detail.vue:170", "preview images:", images);
|
||||
common_vendor.index.previewImage({
|
||||
urls: images.value
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
title: "待付款"
|
||||
}),
|
||||
b: common_vendor.p({
|
||||
title: "待发货"
|
||||
}),
|
||||
c: common_vendor.p({
|
||||
title: "待收货"
|
||||
}),
|
||||
d: common_vendor.p({
|
||||
title: "已完成"
|
||||
}),
|
||||
e: common_vendor.p({
|
||||
current: detail.progress
|
||||
}),
|
||||
f: detail.address_info
|
||||
}, detail.address_info ? {
|
||||
g: common_vendor.t(detail.address_info.user_name),
|
||||
h: common_vendor.t(detail.address_info.tel_number),
|
||||
i: common_vendor.t(detail.address_info.province_name + detail.address_info.city_name + detail.address_info.county_name + detail.address_info.street_name + detail.address_info.detail_info_new)
|
||||
} : {}, {
|
||||
j: common_vendor.f(detail.goods, (goods, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(goods.snapshot_info.degree.degree_name),
|
||||
b: "6b23c96c-9-" + i0 + "," + ("6b23c96c-8-" + i0),
|
||||
c: common_vendor.t(goods.goods_name),
|
||||
d: common_vendor.t(goods.goods_no),
|
||||
e: "6b23c96c-10-" + i0 + "," + ("6b23c96c-8-" + i0),
|
||||
f: common_vendor.p({
|
||||
price: goods.goods_price,
|
||||
size: "small",
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
g: index,
|
||||
h: common_vendor.o(($event) => common_vendor.unref(utils_helper.navigateTo)("/pages/mall/detail?id=" + goods.goods_id), index),
|
||||
i: "6b23c96c-8-" + i0 + ",6b23c96c-7"
|
||||
};
|
||||
}),
|
||||
k: common_vendor.p({
|
||||
["custom-color"]: "#1a1a1a"
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
center: true
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
price: detail.pay_price,
|
||||
size: "normal",
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
n: common_vendor.p({
|
||||
title: "订单编号",
|
||||
desc: detail.order_no
|
||||
}),
|
||||
o: common_vendor.p({
|
||||
title: "下单时间",
|
||||
desc: detail.create_time
|
||||
}),
|
||||
p: detail.progress >= 3
|
||||
}, detail.progress >= 3 ? {
|
||||
q: common_vendor.p({
|
||||
title: "物流公司",
|
||||
desc: detail.express_company
|
||||
}),
|
||||
r: common_vendor.p({
|
||||
title: "物流单号",
|
||||
desc: detail.express_no
|
||||
})
|
||||
} : {}, {
|
||||
s: detail.progress === 1 && !audit.value
|
||||
}, detail.progress === 1 && !audit.value ? {
|
||||
t: common_vendor.o(($event) => showPayImgs()),
|
||||
v: common_vendor.p({
|
||||
type: "primary",
|
||||
block: true
|
||||
})
|
||||
} : {});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-6b23c96c"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/detail.js.map
|
||||
12
unpackage/dist/dev/mp-weixin/pages/order/detail.json
vendored
Normal file
12
unpackage/dist/dev/mp-weixin/pages/order/detail.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"navigationBarTitleText": "订单详情",
|
||||
"usingComponents": {
|
||||
"nut-step": "../../uni_modules/nutui-uni/components/step/step",
|
||||
"nut-steps": "../../uni_modules/nutui-uni/components/steps/steps",
|
||||
"nut-cell": "../../uni_modules/nutui-uni/components/cell/cell",
|
||||
"nut-cell-group": "../../uni_modules/nutui-uni/components/cellgroup/cellgroup",
|
||||
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
|
||||
"nut-price": "../../uni_modules/nutui-uni/components/price/price",
|
||||
"nut-button": "../../uni_modules/nutui-uni/components/button/button"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/order/detail.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/order/detail.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="page-content data-v-6b23c96c"><nut-steps wx:if="{{e}}" class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-0" bind:__l="__l" u-p="{{e}}"><nut-step wx:if="{{a}}" class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-1,6b23c96c-0" bind:__l="__l" u-p="{{a}}">1</nut-step><nut-step wx:if="{{b}}" class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-2,6b23c96c-0" bind:__l="__l" u-p="{{b}}">2</nut-step><nut-step wx:if="{{c}}" class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-3,6b23c96c-0" bind:__l="__l" u-p="{{c}}">3</nut-step><nut-step wx:if="{{d}}" class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-4,6b23c96c-0" bind:__l="__l" u-p="{{d}}">4</nut-step></nut-steps><nut-cell-group class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-5" bind:__l="__l"><nut-cell class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-6,6b23c96c-5" bind:__l="__l"><view wx:if="{{f}}" class="address-inner data-v-6b23c96c"><text class="data-v-6b23c96c">{{g}} - {{h}}</text><text class="data-v-6b23c96c">{{i}}</text></view></nut-cell></nut-cell-group><nut-cell-group class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-7" bind:__l="__l"><nut-cell wx:for="{{j}}" wx:for-item="goods" wx:key="g" class="data-v-6b23c96c" u-s="{{['title','link']}}" bindclick="{{goods.h}}" u-i="{{goods.i}}" bind:__l="__l" u-p="{{l}}"><view class="goods-info-row data-v-6b23c96c" slot="title"><view class="left-text data-v-6b23c96c"><view class="goods-name data-v-6b23c96c"><nut-tag wx:if="{{k}}" class="data-v-6b23c96c" u-s="{{['d']}}" u-i="{{goods.b}}" bind:__l="__l" u-p="{{k}}">{{goods.a}}</nut-tag><text class="data-v-6b23c96c" style="margin-left:10rpx">{{goods.c}}</text></view><text class="goods-no data-v-6b23c96c">串号:{{goods.d}}</text></view></view><nut-price class="data-v-6b23c96c" u-i="{{goods.e}}" bind:__l="__l" u-p="{{goods.f}}" slot="link"/></nut-cell></nut-cell-group><nut-cell-group class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-11" bind:__l="__l"><nut-cell class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-12,6b23c96c-11" bind:__l="__l"><view class="total-price-inner data-v-6b23c96c"><text class="data-v-6b23c96c">商品总额</text><nut-price wx:if="{{m}}" class="data-v-6b23c96c" u-i="6b23c96c-13,6b23c96c-12" bind:__l="__l" u-p="{{m}}"/></view></nut-cell></nut-cell-group><nut-cell-group class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-14" bind:__l="__l"><nut-cell wx:if="{{n}}" class="data-v-6b23c96c" u-i="6b23c96c-15,6b23c96c-14" bind:__l="__l" u-p="{{n}}"/><nut-cell wx:if="{{o}}" class="data-v-6b23c96c" u-i="6b23c96c-16,6b23c96c-14" bind:__l="__l" u-p="{{o}}"/></nut-cell-group><nut-cell-group wx:if="{{p}}" class="data-v-6b23c96c" u-s="{{['d']}}" u-i="6b23c96c-17" bind:__l="__l"><nut-cell wx:if="{{q}}" class="data-v-6b23c96c" u-i="6b23c96c-18,6b23c96c-17" bind:__l="__l" u-p="{{q}}"/><nut-cell wx:if="{{r}}" class="data-v-6b23c96c" u-i="6b23c96c-19,6b23c96c-17" bind:__l="__l" u-p="{{r}}"/></nut-cell-group><view wx:if="{{s}}" class="wechat-img-inner data-v-6b23c96c"><nut-button wx:if="{{v}}" class="data-v-6b23c96c" u-s="{{['d']}}" bindclick="{{t}}" u-i="6b23c96c-20" bind:__l="__l" u-p="{{v}}"> 点我付款 </nut-button></view></view>
|
||||
77
unpackage/dist/dev/mp-weixin/pages/order/detail.wxss
vendored
Normal file
77
unpackage/dist/dev/mp-weixin/pages/order/detail.wxss
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page-content.data-v-6b23c96c {
|
||||
min-height: 100vh;
|
||||
background-color: #f2f3f5;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.address-inner.data-v-6b23c96c {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.total-price-inner.data-v-6b23c96c {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.total-price-inner view.data-v-6b23c96c:nth-child(2) {
|
||||
color: #fa2c19;
|
||||
}
|
||||
.wechat-img-inner.data-v-6b23c96c {
|
||||
margin-top: 60rpx;
|
||||
padding: 0rpx 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
245
unpackage/dist/dev/mp-weixin/pages/order/housePreview.js
vendored
Normal file
245
unpackage/dist/dev/mp-weixin/pages/order/housePreview.js
vendored
Normal file
@@ -0,0 +1,245 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_house_order = require("../../api/house_order.js");
|
||||
const api_config = require("../../api/config.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_cell2 = common_vendor.resolveComponent("nut-cell");
|
||||
const _easycom_nut_cell_group2 = common_vendor.resolveComponent("nut-cell-group");
|
||||
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
|
||||
const _easycom_nut_price2 = common_vendor.resolveComponent("nut-price");
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
(_easycom_nut_cell2 + _easycom_nut_cell_group2 + _easycom_nut_tag2 + _easycom_nut_price2 + _easycom_nut_button2)();
|
||||
}
|
||||
const _easycom_nut_cell = () => "../../uni_modules/nutui-uni/components/cell/cell.js";
|
||||
const _easycom_nut_cell_group = () => "../../uni_modules/nutui-uni/components/cellgroup/cellgroup.js";
|
||||
const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js";
|
||||
const _easycom_nut_price = () => "../../uni_modules/nutui-uni/components/price/price.js";
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_cell + _easycom_nut_cell_group + _easycom_nut_tag + _easycom_nut_price + _easycom_nut_button)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "housePreview",
|
||||
setup(__props) {
|
||||
const audit = common_vendor.ref(true);
|
||||
const isWarehouse = common_vendor.ref(false);
|
||||
const singleRule = common_vendor.ref([]);
|
||||
const rangeRule = common_vendor.ref([]);
|
||||
const warehouseRule = common_vendor.reactive({
|
||||
val: 0,
|
||||
val_type: 1
|
||||
});
|
||||
const GetPriceRules = () => {
|
||||
api_config.fetchGetPriceRules().then((res) => {
|
||||
var _a;
|
||||
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:107", "res", res);
|
||||
rangeRule.value = (res == null ? void 0 : res.range) ?? [];
|
||||
singleRule.value = (res == null ? void 0 : res.single) ?? [];
|
||||
Object.assign(warehouseRule, ((_a = res == null ? void 0 : res.warehouse) == null ? void 0 : _a[0]) ?? {
|
||||
val: 0,
|
||||
val_type: 1
|
||||
});
|
||||
});
|
||||
};
|
||||
const getPrice = (goods2) => {
|
||||
if (isWarehouse.value) {
|
||||
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:125", "开启整仓调价");
|
||||
const list = singleRule.value || singleRule;
|
||||
const rule = list.find((item) => item.product_id === (goods2 == null ? void 0 : goods2.goods_id));
|
||||
if (rule) {
|
||||
const basePrice = Number(goods2 == null ? void 0 : goods2.goods_price);
|
||||
const val = Number(rule.val);
|
||||
let finalPrice = basePrice;
|
||||
if (rule.val_type == 1) {
|
||||
finalPrice = basePrice + val;
|
||||
} else if (rule.val_type == 2) {
|
||||
finalPrice = basePrice + basePrice * val / 100;
|
||||
}
|
||||
return finalPrice.toFixed(2);
|
||||
} else {
|
||||
const basePrice = Number(goods2 == null ? void 0 : goods2.goods_price);
|
||||
const val = Number(warehouseRule.val);
|
||||
let finalPrice = basePrice;
|
||||
if (warehouseRule.val_type == 1) {
|
||||
finalPrice = basePrice + val;
|
||||
} else if (warehouseRule.val_type == 2) {
|
||||
finalPrice = basePrice + basePrice * val / 100;
|
||||
}
|
||||
return finalPrice.toFixed(2);
|
||||
}
|
||||
} else {
|
||||
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:156", "未开启整仓调价");
|
||||
const singleRuleList = singleRule.value || singleRule;
|
||||
const oneRule = singleRuleList.find((item) => item.product_id === (goods2 == null ? void 0 : goods2.goods_id));
|
||||
if (oneRule) {
|
||||
const basePrice = Number(goods2 == null ? void 0 : goods2.goods_price);
|
||||
const val = Number(oneRule.val);
|
||||
let finalPrice = basePrice;
|
||||
if (oneRule.val_type == 1) {
|
||||
finalPrice = basePrice + val;
|
||||
} else if (oneRule.val_type == 2) {
|
||||
finalPrice = basePrice + basePrice * val / 100;
|
||||
}
|
||||
return finalPrice.toFixed(2);
|
||||
} else {
|
||||
const basePrice = Number(goods2 == null ? void 0 : goods2.goods_price);
|
||||
const rangeRulelist = rangeRule.value || rangeRule;
|
||||
const quRule = rangeRulelist.find((item) => {
|
||||
const min = Number(item.min_price);
|
||||
const max = Number(item.max_price);
|
||||
return basePrice >= min && basePrice < max;
|
||||
}) || null;
|
||||
if (quRule) {
|
||||
const val = Number(quRule.val);
|
||||
let finalPrice = basePrice;
|
||||
if (quRule.val_type == 1) {
|
||||
finalPrice = basePrice + val;
|
||||
} else if (quRule.val_type == 2) {
|
||||
finalPrice = basePrice + basePrice * val / 100;
|
||||
}
|
||||
return finalPrice.toFixed(2);
|
||||
} else {
|
||||
return basePrice;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
const getConfig = () => {
|
||||
api_config.fetchGetConfig().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:204", "getConfig=====>", res);
|
||||
audit.value = res.appConfig.is_audit == 1;
|
||||
isWarehouse.value = res.appConfig.is_warehouse == 1;
|
||||
});
|
||||
};
|
||||
const chooseAddress = () => {
|
||||
common_vendor.index.chooseAddress({
|
||||
success(res) {
|
||||
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:226", res);
|
||||
Object.assign(form, {
|
||||
address_info: {
|
||||
address_id: res.addressID || 1,
|
||||
user_name: res.userName,
|
||||
tel_number: res.telNumber,
|
||||
city_name: res.cityName || "",
|
||||
county_name: res.countyName || "",
|
||||
detail_info: res.detailInfo || "",
|
||||
detail_info_new: res.detailInfoNew || "",
|
||||
national_code: res.nationalCode || "",
|
||||
national_code_full: res.nationalCodeFull || "",
|
||||
postal_code: res.postalCode || "",
|
||||
province_name: res.provinceName || "",
|
||||
street_name: res.streetName || ""
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
common_vendor.ref([]);
|
||||
const goods = common_vendor.reactive({});
|
||||
const order_total_price = common_vendor.ref(0);
|
||||
const order_total_num = common_vendor.ref(0);
|
||||
const form = common_vendor.reactive({
|
||||
goods_id: 0,
|
||||
address_info: {}
|
||||
});
|
||||
const fromStr = common_vendor.ref("");
|
||||
common_vendor.onLoad((options) => {
|
||||
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:271", "init");
|
||||
getConfig();
|
||||
GetPriceRules();
|
||||
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:277", "🚀 ~ from:", options.from);
|
||||
fromStr.value = options.from;
|
||||
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:279", "🚀 ~ ids:", options.ids);
|
||||
form.goods_id = options.ids;
|
||||
});
|
||||
common_vendor.onShow(() => {
|
||||
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:287", "🚀 ~ onShowfrom:", fromStr.value);
|
||||
if (fromStr.value === "list" || fromStr.value === "item") {
|
||||
api_house_order.houseFetchGoodsPreview({
|
||||
goods_id: form.goods_id
|
||||
}).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:292", res);
|
||||
Object.assign(goods, res.goods);
|
||||
order_total_price.value = res.order_total_price;
|
||||
order_total_num.value = res.order_total_num;
|
||||
});
|
||||
}
|
||||
});
|
||||
common_vendor.onHide(() => {
|
||||
fromStr.value = "";
|
||||
});
|
||||
const onSubmitClick = () => {
|
||||
var _a;
|
||||
if (!((_a = form.address_info) == null ? void 0 : _a.address_id)) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请选择收货地址",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
api_house_order.fetchOrderbuyNow(form).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/order/housePreview.vue:318", res);
|
||||
common_vendor.index.redirectTo({
|
||||
url: "/pages/order/detail?id=" + res.order_id,
|
||||
success: (res2) => {
|
||||
},
|
||||
fail: () => {
|
||||
},
|
||||
complete: () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
var _a, _b, _c, _d, _e, _f;
|
||||
return common_vendor.e({
|
||||
a: !((_a = form.address_info) == null ? void 0 : _a.address_id)
|
||||
}, !((_b = form.address_info) == null ? void 0 : _b.address_id) ? {
|
||||
b: common_vendor.o(chooseAddress),
|
||||
c: common_vendor.p({
|
||||
title: "添加地址",
|
||||
["is-link"]: true
|
||||
})
|
||||
} : {
|
||||
d: common_vendor.o(chooseAddress),
|
||||
e: common_vendor.p({
|
||||
title: form.address_info.user_name + " " + form.address_info.tel_number,
|
||||
["is-link"]: true,
|
||||
["sub-title"]: form.address_info.province_name + form.address_info.city_name + form.address_info.county_name + form.address_info.street_name + form.address_info.detail_info_new
|
||||
})
|
||||
}, {
|
||||
f: common_vendor.t((_d = (_c = goods == null ? void 0 : goods.goods_house) == null ? void 0 : _c.degree) == null ? void 0 : _d.degree_name),
|
||||
g: common_vendor.p({
|
||||
["custom-color"]: "#1a1a1a"
|
||||
}),
|
||||
h: common_vendor.t((_e = goods == null ? void 0 : goods.goods_house) == null ? void 0 : _e.goods_name),
|
||||
i: common_vendor.t((_f = goods == null ? void 0 : goods.goods_house) == null ? void 0 : _f.goods_no),
|
||||
j: common_vendor.p({
|
||||
price: getPrice(goods == null ? void 0 : goods.goods_house),
|
||||
size: "small",
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
k: common_vendor.p({
|
||||
center: true
|
||||
}),
|
||||
l: common_vendor.t(order_total_num.value),
|
||||
m: common_vendor.p({
|
||||
price: getPrice(goods == null ? void 0 : goods.goods_house),
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
n: common_vendor.p({
|
||||
size: "large",
|
||||
price: getPrice(goods == null ? void 0 : goods.goods_house),
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
o: common_vendor.o(onSubmitClick),
|
||||
p: common_vendor.p({
|
||||
type: "primary"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f68461ec"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/housePreview.js.map
|
||||
10
unpackage/dist/dev/mp-weixin/pages/order/housePreview.json
vendored
Normal file
10
unpackage/dist/dev/mp-weixin/pages/order/housePreview.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "提交订单",
|
||||
"usingComponents": {
|
||||
"nut-cell": "../../uni_modules/nutui-uni/components/cell/cell",
|
||||
"nut-cell-group": "../../uni_modules/nutui-uni/components/cellgroup/cellgroup",
|
||||
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
|
||||
"nut-price": "../../uni_modules/nutui-uni/components/price/price",
|
||||
"nut-button": "../../uni_modules/nutui-uni/components/button/button"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/order/housePreview.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/order/housePreview.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="page-content data-v-f68461ec"><nut-cell-group class="data-v-f68461ec" u-s="{{['d']}}" u-i="f68461ec-0" bind:__l="__l"><nut-cell wx:if="{{a}}" class="data-v-f68461ec" bindclick="{{b}}" u-i="f68461ec-1,f68461ec-0" bind:__l="__l" u-p="{{c}}"></nut-cell><nut-cell wx:else class="data-v-f68461ec" bindclick="{{d}}" u-i="f68461ec-2,f68461ec-0" bind:__l="__l" u-p="{{e||''}}"></nut-cell></nut-cell-group><nut-cell-group class="data-v-f68461ec" u-s="{{['d']}}" u-i="f68461ec-3" bind:__l="__l"><nut-cell wx:if="{{k}}" class="data-v-f68461ec" u-s="{{['title','link']}}" u-i="f68461ec-4,f68461ec-3" bind:__l="__l" u-p="{{k}}"><view class="goods-info-row data-v-f68461ec" slot="title"><view class="left-text data-v-f68461ec"><view class="goods-name data-v-f68461ec"><nut-tag wx:if="{{g}}" class="data-v-f68461ec" u-s="{{['d']}}" u-i="f68461ec-5,f68461ec-4" bind:__l="__l" u-p="{{g}}">{{f}}</nut-tag><text class="data-v-f68461ec" style="margin-left:10rpx">{{h}}</text></view><text class="goods-no data-v-f68461ec">串号:{{i}}</text></view></view><nut-price class="data-v-f68461ec" u-i="f68461ec-6,f68461ec-4" bind:__l="__l" u-p="{{j}}" slot="link"/></nut-cell></nut-cell-group><nut-cell-group class="data-v-f68461ec" u-s="{{['d']}}" u-i="f68461ec-7" bind:__l="__l"><nut-cell class="data-v-f68461ec" u-s="{{['d']}}" u-i="f68461ec-8,f68461ec-7" bind:__l="__l"><view class="total-price-inner data-v-f68461ec"><text class="data-v-f68461ec">件数</text><text class="data-v-f68461ec">{{l}}件</text></view></nut-cell><nut-cell class="data-v-f68461ec" u-s="{{['d']}}" u-i="f68461ec-9,f68461ec-7" bind:__l="__l"><view class="total-price-inner data-v-f68461ec"><text class="data-v-f68461ec">商品总额</text><nut-price wx:if="{{m}}" class="data-v-f68461ec" u-i="f68461ec-10,f68461ec-9" bind:__l="__l" u-p="{{m}}"/></view></nut-cell></nut-cell-group><view class="bottom-submit-inner data-v-f68461ec"><view class="bottom-submit-inner-info data-v-f68461ec"><text class="data-v-f68461ec">合计:</text><nut-price wx:if="{{n}}" class="data-v-f68461ec" u-i="f68461ec-11" bind:__l="__l" u-p="{{n}}"/></view><view class="bottom-submit-inner-btn data-v-f68461ec"><nut-button wx:if="{{p}}" class="data-v-f68461ec" u-s="{{['d']}}" bindclick="{{o}}" u-i="f68461ec-12" bind:__l="__l" u-p="{{p}}">确认下单</nut-button></view></view></view>
|
||||
107
unpackage/dist/dev/mp-weixin/pages/order/housePreview.wxss
vendored
Normal file
107
unpackage/dist/dev/mp-weixin/pages/order/housePreview.wxss
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page-content.data-v-f68461ec {
|
||||
min-height: calc(100vh - 60px);
|
||||
background-color: #f2f3f5;
|
||||
padding: 20rpx;
|
||||
padding-bottom: 140rpx;
|
||||
}
|
||||
|
||||
/* 信息行布局 */
|
||||
.goods-info-row.data-v-f68461ec {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 10rpx;
|
||||
/* 左侧文字样式 */
|
||||
/* 右侧价格样式 */
|
||||
}
|
||||
.goods-info-row .left-text.data-v-f68461ec {
|
||||
flex: 1;
|
||||
}
|
||||
.goods-info-row .goods-name.data-v-f68461ec {
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
display: block;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.goods-info-row .goods-no.data-v-f68461ec {
|
||||
font-size: 26rpx;
|
||||
color: #000000;
|
||||
display: block;
|
||||
}
|
||||
.goods-info-row .price.data-v-f68461ec {
|
||||
margin-left: 20rpx;
|
||||
align-self: center;
|
||||
/* 垂直居中在两行文字之间 */
|
||||
}
|
||||
.bottom-submit-inner.data-v-f68461ec {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 120rpx;
|
||||
background: #fff;
|
||||
width: calc(100% - 40rpx);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 0 auto;
|
||||
padding: 15rpx 20rpx;
|
||||
}
|
||||
.total-price-inner.data-v-f68461ec {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.total-price-inner view.data-v-f68461ec:nth-child(2) {
|
||||
color: #fa2c19;
|
||||
}
|
||||
284
unpackage/dist/dev/mp-weixin/pages/order/index.js
vendored
Normal file
284
unpackage/dist/dev/mp-weixin/pages/order/index.js
vendored
Normal file
@@ -0,0 +1,284 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_order = require("../../api/order.js");
|
||||
const api_config = require("../../api/config.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_dialog2 = common_vendor.resolveComponent("nut-dialog");
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
const _easycom_nut_searchbar2 = common_vendor.resolveComponent("nut-searchbar");
|
||||
const _easycom_nut_tabs2 = common_vendor.resolveComponent("nut-tabs");
|
||||
const _easycom_nut_sticky2 = common_vendor.resolveComponent("nut-sticky");
|
||||
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
|
||||
const _easycom_nut_price2 = common_vendor.resolveComponent("nut-price");
|
||||
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||
(_easycom_nut_dialog2 + _easycom_nut_button2 + _easycom_nut_searchbar2 + _easycom_nut_tabs2 + _easycom_nut_sticky2 + _easycom_nut_tag2 + _easycom_nut_price2 + _easycom_z_paging2)();
|
||||
}
|
||||
const _easycom_nut_dialog = () => "../../uni_modules/nutui-uni/components/dialog/dialog.js";
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
const _easycom_nut_searchbar = () => "../../uni_modules/nutui-uni/components/searchbar/searchbar.js";
|
||||
const _easycom_nut_tabs = () => "../../uni_modules/nutui-uni/components/tabs/tabs.js";
|
||||
const _easycom_nut_sticky = () => "../../uni_modules/nutui-uni/components/sticky/sticky.js";
|
||||
const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js";
|
||||
const _easycom_nut_price = () => "../../uni_modules/nutui-uni/components/price/price.js";
|
||||
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_dialog + _easycom_nut_button + _easycom_nut_searchbar + _easycom_nut_tabs + _easycom_nut_sticky + _easycom_nut_tag + _easycom_nut_price + _easycom_z_paging)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const audit = common_vendor.ref(true);
|
||||
const images = common_vendor.ref([]);
|
||||
const current_tab_idx = common_vendor.ref(0);
|
||||
const dataList = common_vendor.ref([]);
|
||||
const paging = common_vendor.ref(null);
|
||||
const tabs_config = [
|
||||
{
|
||||
title: "全部",
|
||||
status: "all"
|
||||
},
|
||||
{
|
||||
title: "待付款",
|
||||
status: "payment"
|
||||
},
|
||||
{
|
||||
title: "待发货",
|
||||
status: "delivery"
|
||||
},
|
||||
{
|
||||
title: "待收货",
|
||||
status: "received"
|
||||
},
|
||||
{
|
||||
title: "已完成",
|
||||
status: "finish"
|
||||
}
|
||||
];
|
||||
const visibleCancelOrderDialog = common_vendor.ref(false);
|
||||
const current_cancel_order_id = common_vendor.ref(0);
|
||||
const search_val = common_vendor.ref("");
|
||||
const onChangeTab = (item, idx) => {
|
||||
current_tab_idx.value = idx;
|
||||
paging.value.reload();
|
||||
};
|
||||
const getConfig = () => {
|
||||
api_config.fetchGetConfig().then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:165", "getConfig=====>", res);
|
||||
audit.value = res.appConfig.is_audit == 1;
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:167", res.appConfig.pay_imgs);
|
||||
let pay_imgs = JSON.parse(res.appConfig.pay_imgs) || [];
|
||||
let wechat_imgs = JSON.parse(res.appConfig.wechat_imgs) || [];
|
||||
let pay_imgs_arr = pay_imgs.map((item) => item.file_path) || [];
|
||||
let wechat_imgs_arr = wechat_imgs.map((item) => item.file_path) || [];
|
||||
const merged_imgs_arr = pay_imgs_arr.concat(wechat_imgs_arr);
|
||||
images.value = merged_imgs_arr;
|
||||
});
|
||||
};
|
||||
const showPayImgs = () => {
|
||||
if (images.value.length === 0) {
|
||||
common_vendor.index.showToast({
|
||||
title: "暂无图片",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:186", "preview images:", images);
|
||||
common_vendor.index.previewImage({
|
||||
urls: images.value
|
||||
});
|
||||
};
|
||||
const navigateToDetail = (id) => {
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:194", id);
|
||||
if (!id) {
|
||||
common_vendor.index.__f__("warn", "at pages/order/index.vue:196", "导航ID不能为空");
|
||||
return;
|
||||
}
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/order/detail?id=${encodeURIComponent(id)}`
|
||||
});
|
||||
};
|
||||
const onClickCancelOrder = () => {
|
||||
api_order.fetchCancelOrder(current_cancel_order_id.value).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
title: "取消成功",
|
||||
icon: "none"
|
||||
});
|
||||
paging.value.reload();
|
||||
});
|
||||
};
|
||||
const onClickReceiptOrder = (id) => {
|
||||
api_order.fetchReceiptOrder(id).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
title: "确认收货成功",
|
||||
icon: "none"
|
||||
});
|
||||
paging.value.reload();
|
||||
});
|
||||
};
|
||||
const apiFetchOrderList = (pageNo = 1, pageSize = 10) => {
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:229", tabs_config[current_tab_idx.value]["status"]);
|
||||
const params = {
|
||||
page: pageNo,
|
||||
pageSize: 10,
|
||||
status: tabs_config[current_tab_idx.value]["status"],
|
||||
goods_no: search_val.value
|
||||
};
|
||||
api_order.fetchOrderList(params).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:237", res);
|
||||
paging.value.complete(res.list);
|
||||
}).catch((res) => {
|
||||
paging.value.complete(false);
|
||||
});
|
||||
};
|
||||
common_vendor.onLoad((options) => {
|
||||
current_tab_idx.value = parseInt(options.tab);
|
||||
});
|
||||
common_vendor.onShow(() => {
|
||||
getConfig();
|
||||
});
|
||||
const onSearch = () => {
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:261", "搜索:", search_val.value);
|
||||
paging.value.reload();
|
||||
};
|
||||
const onClear = () => {
|
||||
common_vendor.index.__f__("log", "at pages/order/index.vue:267", "搜索:", search_val.value);
|
||||
paging.value.reload();
|
||||
};
|
||||
const getStatusText = (order) => {
|
||||
if (order.order_status.value == 20) {
|
||||
return order.order_status.text;
|
||||
} else if (order.order_status.value == 30) {
|
||||
return order.order_status.text;
|
||||
} else if (order.order_status.value == 10) {
|
||||
if (order.pay_status.value == 10) {
|
||||
return order.pay_status.text;
|
||||
} else if (order.pay_status.value == 20) {
|
||||
if (order.delivery_status.value == 10) {
|
||||
return order.delivery_status.text;
|
||||
} else if (order.delivery_status.value == 20) {
|
||||
return order.receipt_status.text;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o(($event) => visibleCancelOrderDialog.value = false),
|
||||
b: common_vendor.o(onClickCancelOrder),
|
||||
c: common_vendor.o(($event) => visibleCancelOrderDialog.value = $event),
|
||||
d: common_vendor.p({
|
||||
title: "取消订单",
|
||||
content: "确认取消吗?此操作不可恢复!",
|
||||
visible: visibleCancelOrderDialog.value
|
||||
}),
|
||||
e: common_vendor.o(onSearch),
|
||||
f: common_vendor.p({
|
||||
size: "small",
|
||||
type: "primary"
|
||||
}),
|
||||
g: common_vendor.o(onSearch),
|
||||
h: common_vendor.o(onClear),
|
||||
i: common_vendor.o(($event) => search_val.value = $event),
|
||||
j: common_vendor.p({
|
||||
placeholder: "请输入商品串号",
|
||||
clearable: true,
|
||||
["input-background"]: "#eee",
|
||||
modelValue: search_val.value
|
||||
}),
|
||||
k: common_vendor.f(tabs_config, (item, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.title),
|
||||
b: idx,
|
||||
c: idx === current_tab_idx.value ? 1 : "",
|
||||
d: common_vendor.o(($event) => onChangeTab(item, idx), idx)
|
||||
};
|
||||
}),
|
||||
l: common_vendor.o(($event) => current_tab_idx.value = $event),
|
||||
m: common_vendor.p({
|
||||
background: "#fff",
|
||||
modelValue: current_tab_idx.value
|
||||
}),
|
||||
n: common_vendor.f(dataList.value, (order, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.t(order.create_time),
|
||||
b: common_vendor.t(getStatusText(order)),
|
||||
c: "17a44f9d-6-" + i0 + ",17a44f9d-5",
|
||||
d: common_vendor.f(order.goods, (goods, iidx, i1) => {
|
||||
return {
|
||||
a: common_vendor.t(goods.snapshot_info.degree.degree_name),
|
||||
b: "17a44f9d-7-" + i0 + "-" + i1 + ",17a44f9d-5",
|
||||
c: common_vendor.t(goods.goods_name),
|
||||
d: common_vendor.t(goods.goods_no),
|
||||
e: "17a44f9d-8-" + i0 + "-" + i1 + ",17a44f9d-5",
|
||||
f: common_vendor.p({
|
||||
price: goods.goods_price,
|
||||
size: "small",
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
g: iidx,
|
||||
h: common_vendor.o(($event) => navigateToDetail(order.order_id), iidx)
|
||||
};
|
||||
}),
|
||||
e: "17a44f9d-9-" + i0 + ",17a44f9d-5",
|
||||
f: common_vendor.p({
|
||||
price: order.total_price,
|
||||
size: "normal",
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
g: order.order_status.value === 10
|
||||
}, order.order_status.value === 10 ? common_vendor.e({
|
||||
h: order.pay_status.value === 10
|
||||
}, order.pay_status.value === 10 ? {
|
||||
i: common_vendor.o(($event) => {
|
||||
visibleCancelOrderDialog.value = true;
|
||||
current_cancel_order_id.value = order.order_id;
|
||||
}, index),
|
||||
j: "17a44f9d-10-" + i0 + ",17a44f9d-5",
|
||||
k: common_vendor.p({
|
||||
plain: true,
|
||||
size: "small"
|
||||
})
|
||||
} : {}, {
|
||||
l: order.pay_status.value === 10 && !audit.value
|
||||
}, order.pay_status.value === 10 && !audit.value ? {
|
||||
m: common_vendor.o(($event) => showPayImgs(), index),
|
||||
n: "17a44f9d-11-" + i0 + ",17a44f9d-5",
|
||||
o: common_vendor.p({
|
||||
type: "primary",
|
||||
size: "small"
|
||||
})
|
||||
} : {}, {
|
||||
p: order.pay_status.value === 20 && order.delivery_status.value === 20 && order.receipt_status.value === 10
|
||||
}, order.pay_status.value === 20 && order.delivery_status.value === 20 && order.receipt_status.value === 10 ? {
|
||||
q: common_vendor.o(($event) => onClickReceiptOrder(order.order_id), index),
|
||||
r: "17a44f9d-12-" + i0 + ",17a44f9d-5",
|
||||
s: common_vendor.p({
|
||||
type: "primary",
|
||||
size: "small"
|
||||
})
|
||||
} : {}) : {}, {
|
||||
t: index
|
||||
});
|
||||
}),
|
||||
o: common_vendor.p({
|
||||
["custom-color"]: "#1a1a1a"
|
||||
}),
|
||||
p: common_vendor.p({
|
||||
["custom-color"]: "#1a1a1a"
|
||||
}),
|
||||
q: common_vendor.sr(paging, "17a44f9d-5", {
|
||||
"k": "paging"
|
||||
}),
|
||||
r: common_vendor.o(apiFetchOrderList),
|
||||
s: common_vendor.o(($event) => dataList.value = $event),
|
||||
t: common_vendor.p({
|
||||
fixed: false,
|
||||
modelValue: dataList.value
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-17a44f9d"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/index.js.map
|
||||
13
unpackage/dist/dev/mp-weixin/pages/order/index.json
vendored
Normal file
13
unpackage/dist/dev/mp-weixin/pages/order/index.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的订单",
|
||||
"usingComponents": {
|
||||
"nut-dialog": "../../uni_modules/nutui-uni/components/dialog/dialog",
|
||||
"nut-button": "../../uni_modules/nutui-uni/components/button/button",
|
||||
"nut-searchbar": "../../uni_modules/nutui-uni/components/searchbar/searchbar",
|
||||
"nut-tabs": "../../uni_modules/nutui-uni/components/tabs/tabs",
|
||||
"nut-sticky": "../../uni_modules/nutui-uni/components/sticky/sticky",
|
||||
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
|
||||
"nut-price": "../../uni_modules/nutui-uni/components/price/price",
|
||||
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/order/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/order/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="page-content data-v-17a44f9d"><nut-dialog wx:if="{{d}}" class="data-v-17a44f9d" bindcancel="{{a}}" bindok="{{b}}" u-i="17a44f9d-0" bind:__l="__l" bindupdateVisible="{{c}}" u-p="{{d}}"/><nut-sticky class="data-v-17a44f9d" u-s="{{['d']}}" u-i="17a44f9d-1" bind:__l="__l"><nut-searchbar wx:if="{{j}}" class="data-v-17a44f9d" u-s="{{['rightout']}}" bindsearch="{{g}}" bindclear="{{h}}" u-i="17a44f9d-2,17a44f9d-1" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"><nut-button class="data-v-17a44f9d" u-s="{{['d']}}" bindclick="{{e}}" u-i="17a44f9d-3,17a44f9d-2" bind:__l="__l" u-p="{{f}}" slot="rightout">搜索</nut-button></nut-searchbar><nut-tabs wx:if="{{m}}" class="data-v-17a44f9d" u-s="{{['titles']}}" u-i="17a44f9d-4,17a44f9d-1" bind:__l="__l" bindupdateModelValue="{{l}}" u-p="{{m}}"><view class="title-list data-v-17a44f9d" slot="titles"><view wx:for="{{k}}" wx:for-item="item" wx:key="b" class="{{['title-item', 'data-v-17a44f9d', item.c && 'tabs-active']}}" bindtap="{{item.d}}"><view class="nut-tabs__titles-item__text data-v-17a44f9d">{{item.a}}</view><view class="item__line data-v-17a44f9d"/></view></view></nut-tabs></nut-sticky><z-paging wx:if="{{t}}" u-s="{{['d']}}" u-r="paging" style="height:88vh" class="order-list r data-v-17a44f9d" bindquery="{{r}}" u-i="17a44f9d-5" bind:__l="__l" bindupdateModelValue="{{s}}" u-p="{{t}}"><view wx:for="{{n}}" wx:for-item="order" wx:key="t" class="order-inner data-v-17a44f9d"><view class="order-inner-header data-v-17a44f9d"><text class="data-v-17a44f9d">{{order.a}}</text><nut-tag wx:if="{{o}}" class="data-v-17a44f9d" u-s="{{['d']}}" u-i="{{order.c}}" bind:__l="__l" u-p="{{o}}">{{order.b}}</nut-tag></view><view wx:for="{{order.d}}" wx:for-item="goods" wx:key="g" class="goods-info-row data-v-17a44f9d" bindtap="{{goods.h}}"><view class="left-text data-v-17a44f9d"><view class="goods-name data-v-17a44f9d"><nut-tag wx:if="{{p}}" class="data-v-17a44f9d" u-s="{{['d']}}" u-i="{{goods.b}}" bind:__l="__l" u-p="{{p}}">{{goods.a}}</nut-tag><text class="data-v-17a44f9d" style="margin-left:10rpx">{{goods.c}}</text></view><text class="goods-no data-v-17a44f9d">串号:{{goods.d}}</text></view><view class="price data-v-17a44f9d"><nut-price wx:if="{{goods.f}}" class="data-v-17a44f9d" u-i="{{goods.e}}" bind:__l="__l" u-p="{{goods.f}}"/></view></view><view class="footer data-v-17a44f9d"><view class="order-inner-price data-v-17a44f9d"> 总计:<nut-price wx:if="{{order.f}}" class="data-v-17a44f9d" u-i="{{order.e}}" bind:__l="__l" u-p="{{order.f}}"/></view><view wx:if="{{order.g}}" class="order-inner-action data-v-17a44f9d"><view class="data-v-17a44f9d" style="margin-left:10rpx"><nut-button wx:if="{{order.h}}" class="data-v-17a44f9d" u-s="{{['d']}}" bindclick="{{order.i}}" u-i="{{order.j}}" bind:__l="__l" u-p="{{order.k}}"> 取消订单 </nut-button></view><view class="data-v-17a44f9d" style="margin-left:10rpx"><nut-button wx:if="{{order.l}}" class="data-v-17a44f9d" u-s="{{['d']}}" bindclick="{{order.m}}" u-i="{{order.n}}" bind:__l="__l" u-p="{{order.o}}"> 点我付款 </nut-button></view><view class="data-v-17a44f9d" style="margin-left:10rpx"><nut-button wx:if="{{order.p}}" class="data-v-17a44f9d" u-s="{{['d']}}" bindclick="{{order.q}}" u-i="{{order.r}}" bind:__l="__l" u-p="{{order.s}}"> 确认收货 </nut-button></view></view></view></view></z-paging></view>
|
||||
159
unpackage/dist/dev/mp-weixin/pages/order/index.wxss
vendored
Normal file
159
unpackage/dist/dev/mp-weixin/pages/order/index.wxss
vendored
Normal file
@@ -0,0 +1,159 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page-content.data-v-17a44f9d {
|
||||
min-height: 100vh;
|
||||
background-color: #f2f3f5;
|
||||
}
|
||||
.order-list.data-v-17a44f9d {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
.order-inner.data-v-17a44f9d {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #fff;
|
||||
border-radius: 15rpx;
|
||||
overflow: hidden;
|
||||
margin: 20rpx;
|
||||
/* 信息行布局 */
|
||||
}
|
||||
.order-inner .order-inner-header.data-v-17a44f9d {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #dcdcdc;
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
font-size: 24rpx;
|
||||
justify-content: space-between;
|
||||
line-height: 45rpx;
|
||||
padding: 15rpx 20rpx;
|
||||
}
|
||||
.order-inner .goods-info-row.data-v-17a44f9d {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
border-bottom: 2rpx solid #f2f3f5;
|
||||
/* 左侧文字样式 */
|
||||
/* 右侧价格样式 */
|
||||
}
|
||||
.order-inner .goods-info-row .left-text.data-v-17a44f9d {
|
||||
flex: 1;
|
||||
}
|
||||
.order-inner .goods-info-row .goods-name.data-v-17a44f9d {
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
display: block;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.order-inner .goods-info-row .goods-no.data-v-17a44f9d {
|
||||
font-size: 26rpx;
|
||||
color: #000000;
|
||||
display: block;
|
||||
}
|
||||
.order-inner .goods-info-row .price.data-v-17a44f9d {
|
||||
margin-left: 20rpx;
|
||||
align-self: center;
|
||||
/* 垂直居中在两行文字之间 */
|
||||
}
|
||||
.order-inner .footer.data-v-17a44f9d {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.order-inner .footer .order-inner-price.data-v-17a44f9d {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-top: 10rpx;
|
||||
padding-right: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
font-size: 24rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.order-inner .footer .order-inner-action.data-v-17a44f9d {
|
||||
display: flex;
|
||||
padding-top: 10rpx;
|
||||
padding-bottom: 30rpx;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.title-list.data-v-17a44f9d {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
.title-list .title-item.data-v-17a44f9d {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
.title-list .tabs-active.data-v-17a44f9d {
|
||||
font-weight: bold;
|
||||
color: var(--nut-tabs-titles-item-active-color, var(--nut-title-color, #1a1a1a));
|
||||
opacity: var(--nut-tabs-titles-item-line-opacity, 1);
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
.title-list .tabs-active .item__line.data-v-17a44f9d {
|
||||
position: absolute;
|
||||
bottom: -10%;
|
||||
left: 50%;
|
||||
overflow: hidden;
|
||||
content: " ";
|
||||
border-radius: var(--nut-tabs-titles-item-line-border-radius, 0);
|
||||
opacity: var(--nut-tabs-titles-item-line-opacity, 1);
|
||||
transition: width 0.3s ease;
|
||||
transform: translate(-50%, 0);
|
||||
width: var(--nut-tabs-horizontal-titles-item-active-line-width, 40px);
|
||||
height: 3px;
|
||||
content: " ";
|
||||
background: var(--nut-tabs-horizontal-tab-line-color, linear-gradient(90deg, var(--nut-primary-color, #fa2c19) 0%, rgba(250, 44, 25, 0.15) 100%));
|
||||
}
|
||||
157
unpackage/dist/dev/mp-weixin/pages/order/preview.js
vendored
Normal file
157
unpackage/dist/dev/mp-weixin/pages/order/preview.js
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_order = require("../../api/order.js");
|
||||
if (!Array) {
|
||||
const _easycom_nut_cell2 = common_vendor.resolveComponent("nut-cell");
|
||||
const _easycom_nut_cell_group2 = common_vendor.resolveComponent("nut-cell-group");
|
||||
const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag");
|
||||
const _easycom_nut_price2 = common_vendor.resolveComponent("nut-price");
|
||||
const _easycom_nut_button2 = common_vendor.resolveComponent("nut-button");
|
||||
(_easycom_nut_cell2 + _easycom_nut_cell_group2 + _easycom_nut_tag2 + _easycom_nut_price2 + _easycom_nut_button2)();
|
||||
}
|
||||
const _easycom_nut_cell = () => "../../uni_modules/nutui-uni/components/cell/cell.js";
|
||||
const _easycom_nut_cell_group = () => "../../uni_modules/nutui-uni/components/cellgroup/cellgroup.js";
|
||||
const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js";
|
||||
const _easycom_nut_price = () => "../../uni_modules/nutui-uni/components/price/price.js";
|
||||
const _easycom_nut_button = () => "../../uni_modules/nutui-uni/components/button/button.js";
|
||||
if (!Math) {
|
||||
(_easycom_nut_cell + _easycom_nut_cell_group + _easycom_nut_tag + _easycom_nut_price + _easycom_nut_button)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "preview",
|
||||
setup(__props) {
|
||||
const chooseAddress = () => {
|
||||
common_vendor.index.chooseAddress({
|
||||
success(res) {
|
||||
common_vendor.index.__f__("log", "at pages/order/preview.vue:145", res);
|
||||
Object.assign(form, {
|
||||
address_info: {
|
||||
address_id: res.addressID || 1,
|
||||
user_name: res.userName,
|
||||
tel_number: res.telNumber,
|
||||
city_name: res.cityName || "",
|
||||
county_name: res.countyName || "",
|
||||
detail_info: res.detailInfo || "",
|
||||
detail_info_new: res.detailInfoNew || "",
|
||||
national_code: res.nationalCode || "",
|
||||
national_code_full: res.nationalCodeFull || "",
|
||||
postal_code: res.postalCode || "",
|
||||
province_name: res.provinceName || "",
|
||||
street_name: res.streetName || ""
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
common_vendor.ref([]);
|
||||
const list = common_vendor.reactive([]);
|
||||
const order_total_price = common_vendor.ref(0);
|
||||
const order_total_num = common_vendor.ref(0);
|
||||
const form = common_vendor.reactive({
|
||||
goods_id: 0,
|
||||
address_info: {}
|
||||
});
|
||||
const fromStr = common_vendor.ref("");
|
||||
common_vendor.onLoad((options) => {
|
||||
common_vendor.index.__f__("log", "at pages/order/preview.vue:186", "🚀 ~ from:", options.from);
|
||||
fromStr.value = options.from;
|
||||
common_vendor.index.__f__("log", "at pages/order/preview.vue:188", "🚀 ~ ids:", options.ids);
|
||||
form.goods_id = options.ids;
|
||||
});
|
||||
common_vendor.onShow(() => {
|
||||
common_vendor.index.__f__("log", "at pages/order/preview.vue:196", "🚀 ~ onShowfrom:", fromStr.value);
|
||||
if (fromStr.value === "list" || fromStr.value === "item") {
|
||||
api_order.fetchOrderPreview(form).then((res) => {
|
||||
Object.assign(list, res.goods_list);
|
||||
Object.assign(form.address_info, res.address_info);
|
||||
order_total_price.value = res.order_total_price;
|
||||
order_total_num.value = res.order_total_num;
|
||||
});
|
||||
}
|
||||
});
|
||||
common_vendor.onHide(() => {
|
||||
fromStr.value = "";
|
||||
});
|
||||
const onSubmitClick = () => {
|
||||
var _a;
|
||||
if (!((_a = form.address_info) == null ? void 0 : _a.address_id)) {
|
||||
common_vendor.index.showToast({
|
||||
title: "请选择收货地址",
|
||||
icon: "none"
|
||||
});
|
||||
return;
|
||||
}
|
||||
api_order.fetchOrderbuyNow(form).then((res) => {
|
||||
common_vendor.index.__f__("log", "at pages/order/preview.vue:223", res);
|
||||
common_vendor.index.redirectTo({
|
||||
url: "/pages/order/detail?id=" + res.order_id,
|
||||
success: (res2) => {
|
||||
},
|
||||
fail: () => {
|
||||
},
|
||||
complete: () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
var _a, _b;
|
||||
return common_vendor.e({
|
||||
a: !((_a = form.address_info) == null ? void 0 : _a.address_id)
|
||||
}, !((_b = form.address_info) == null ? void 0 : _b.address_id) ? {
|
||||
b: common_vendor.o(chooseAddress),
|
||||
c: common_vendor.p({
|
||||
title: "添加地址",
|
||||
["is-link"]: true
|
||||
})
|
||||
} : {
|
||||
d: common_vendor.o(chooseAddress),
|
||||
e: common_vendor.p({
|
||||
title: form.address_info.user_name + " " + form.address_info.tel_number,
|
||||
["is-link"]: true,
|
||||
["sub-title"]: form.address_info.province_name + form.address_info.city_name + form.address_info.county_name + form.address_info.street_name + form.address_info.detail_info_new
|
||||
})
|
||||
}, {
|
||||
f: common_vendor.f(list, (goods, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(goods.degree.degree_name),
|
||||
b: "2ea27d69-5-" + i0 + "," + ("2ea27d69-4-" + i0),
|
||||
c: common_vendor.t(goods.goods_name),
|
||||
d: common_vendor.t(goods.goods_no),
|
||||
e: "2ea27d69-6-" + i0 + "," + ("2ea27d69-4-" + i0),
|
||||
f: common_vendor.p({
|
||||
price: goods.goods_price,
|
||||
size: "small",
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
g: index,
|
||||
h: "2ea27d69-4-" + i0 + ",2ea27d69-3"
|
||||
};
|
||||
}),
|
||||
g: common_vendor.p({
|
||||
["custom-color"]: "#1a1a1a"
|
||||
}),
|
||||
h: common_vendor.p({
|
||||
center: true
|
||||
}),
|
||||
i: common_vendor.t(order_total_num.value),
|
||||
j: common_vendor.p({
|
||||
price: order_total_price.value,
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
k: common_vendor.p({
|
||||
size: "large",
|
||||
price: order_total_price.value,
|
||||
["need-symbol"]: true
|
||||
}),
|
||||
l: common_vendor.o(onSubmitClick),
|
||||
m: common_vendor.p({
|
||||
type: "primary"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2ea27d69"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/preview.js.map
|
||||
10
unpackage/dist/dev/mp-weixin/pages/order/preview.json
vendored
Normal file
10
unpackage/dist/dev/mp-weixin/pages/order/preview.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "提交订单",
|
||||
"usingComponents": {
|
||||
"nut-cell": "../../uni_modules/nutui-uni/components/cell/cell",
|
||||
"nut-cell-group": "../../uni_modules/nutui-uni/components/cellgroup/cellgroup",
|
||||
"nut-tag": "../../uni_modules/nutui-uni/components/tag/tag",
|
||||
"nut-price": "../../uni_modules/nutui-uni/components/price/price",
|
||||
"nut-button": "../../uni_modules/nutui-uni/components/button/button"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/order/preview.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/order/preview.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="page-content data-v-2ea27d69"><nut-cell-group class="data-v-2ea27d69" u-s="{{['d']}}" u-i="2ea27d69-0" bind:__l="__l"><nut-cell wx:if="{{a}}" class="data-v-2ea27d69" bindclick="{{b}}" u-i="2ea27d69-1,2ea27d69-0" bind:__l="__l" u-p="{{c}}"></nut-cell><nut-cell wx:else class="data-v-2ea27d69" bindclick="{{d}}" u-i="2ea27d69-2,2ea27d69-0" bind:__l="__l" u-p="{{e||''}}"></nut-cell></nut-cell-group><nut-cell-group class="data-v-2ea27d69" u-s="{{['d']}}" u-i="2ea27d69-3" bind:__l="__l"><nut-cell wx:for="{{f}}" wx:for-item="goods" wx:key="g" class="data-v-2ea27d69" u-s="{{['title','link']}}" u-i="{{goods.h}}" bind:__l="__l" u-p="{{h}}"><view class="goods-info-row data-v-2ea27d69" slot="title"><view class="left-text data-v-2ea27d69"><view class="goods-name data-v-2ea27d69"><nut-tag wx:if="{{g}}" class="data-v-2ea27d69" u-s="{{['d']}}" u-i="{{goods.b}}" bind:__l="__l" u-p="{{g}}">{{goods.a}}</nut-tag><text class="data-v-2ea27d69" style="margin-left:10rpx">{{goods.c}}</text></view><text class="goods-no data-v-2ea27d69">串号:{{goods.d}}</text></view></view><nut-price class="data-v-2ea27d69" u-i="{{goods.e}}" bind:__l="__l" u-p="{{goods.f}}" slot="link"/></nut-cell></nut-cell-group><nut-cell-group class="data-v-2ea27d69" u-s="{{['d']}}" u-i="2ea27d69-7" bind:__l="__l"><nut-cell class="data-v-2ea27d69" u-s="{{['d']}}" u-i="2ea27d69-8,2ea27d69-7" bind:__l="__l"><view class="total-price-inner data-v-2ea27d69"><text class="data-v-2ea27d69">件数</text><text class="data-v-2ea27d69">{{i}}件</text></view></nut-cell><nut-cell class="data-v-2ea27d69" u-s="{{['d']}}" u-i="2ea27d69-9,2ea27d69-7" bind:__l="__l"><view class="total-price-inner data-v-2ea27d69"><text class="data-v-2ea27d69">商品总额</text><nut-price wx:if="{{j}}" class="data-v-2ea27d69" u-i="2ea27d69-10,2ea27d69-9" bind:__l="__l" u-p="{{j}}"/></view></nut-cell></nut-cell-group><view class="bottom-submit-inner data-v-2ea27d69"><view class="bottom-submit-inner-info data-v-2ea27d69"><text class="data-v-2ea27d69">合计:</text><nut-price wx:if="{{k}}" class="data-v-2ea27d69" u-i="2ea27d69-11" bind:__l="__l" u-p="{{k}}"/></view><view class="bottom-submit-inner-btn data-v-2ea27d69"><nut-button wx:if="{{m}}" class="data-v-2ea27d69" u-s="{{['d']}}" bindclick="{{l}}" u-i="2ea27d69-12" bind:__l="__l" u-p="{{m}}">确认下单</nut-button></view></view></view>
|
||||
107
unpackage/dist/dev/mp-weixin/pages/order/preview.wxss
vendored
Normal file
107
unpackage/dist/dev/mp-weixin/pages/order/preview.wxss
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.page-content.data-v-2ea27d69 {
|
||||
min-height: calc(100vh - 60px);
|
||||
background-color: #f2f3f5;
|
||||
padding: 20rpx;
|
||||
padding-bottom: 140rpx;
|
||||
}
|
||||
|
||||
/* 信息行布局 */
|
||||
.goods-info-row.data-v-2ea27d69 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 10rpx;
|
||||
/* 左侧文字样式 */
|
||||
/* 右侧价格样式 */
|
||||
}
|
||||
.goods-info-row .left-text.data-v-2ea27d69 {
|
||||
flex: 1;
|
||||
}
|
||||
.goods-info-row .goods-name.data-v-2ea27d69 {
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
display: block;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.goods-info-row .goods-no.data-v-2ea27d69 {
|
||||
font-size: 26rpx;
|
||||
color: #000000;
|
||||
display: block;
|
||||
}
|
||||
.goods-info-row .price.data-v-2ea27d69 {
|
||||
margin-left: 20rpx;
|
||||
align-self: center;
|
||||
/* 垂直居中在两行文字之间 */
|
||||
}
|
||||
.bottom-submit-inner.data-v-2ea27d69 {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 120rpx;
|
||||
background: #fff;
|
||||
width: calc(100% - 40rpx);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 0 auto;
|
||||
padding: 15rpx 20rpx;
|
||||
}
|
||||
.total-price-inner.data-v-2ea27d69 {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.total-price-inner view.data-v-2ea27d69:nth-child(2) {
|
||||
color: #fa2c19;
|
||||
}
|
||||
115
unpackage/dist/dev/mp-weixin/popup.js
vendored
Normal file
115
unpackage/dist/dev/mp-weixin/popup.js
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
"use strict";
|
||||
const uni_modules_nutuiUni_components__constants_event = require("./uni_modules/nutui-uni/components/_constants/event.js");
|
||||
require("./common/vendor.js");
|
||||
require("./uni_modules/nutui-uni/components/_utils/env.js");
|
||||
const uni_modules_nutuiUni_components__utils_props = require("./uni_modules/nutui-uni/components/_utils/props.js");
|
||||
const uni_modules_nutuiUni_components__utils_is = require("./uni_modules/nutui-uni/components/_utils/is.js");
|
||||
const overlayProps = {
|
||||
...uni_modules_nutuiUni_components__utils_props.commonProps,
|
||||
/**
|
||||
* @description 控制遮罩的显示/隐藏
|
||||
*/
|
||||
visible: Boolean,
|
||||
/**
|
||||
* @description 自定义遮罩层级
|
||||
*/
|
||||
zIndex: Number,
|
||||
/**
|
||||
* @description 显示/隐藏的动画时长,单位毫秒
|
||||
*/
|
||||
duration: uni_modules_nutuiUni_components__utils_props.makeNumericProp(300),
|
||||
/**
|
||||
* @description 自定义遮罩类名
|
||||
*/
|
||||
overlayClass: uni_modules_nutuiUni_components__utils_props.makeStringProp(""),
|
||||
/**
|
||||
* @description 自定义遮罩样式
|
||||
*/
|
||||
overlayStyle: Object,
|
||||
/**
|
||||
* @description 遮罩显示时的背景是否锁定
|
||||
*/
|
||||
lockScroll: Boolean,
|
||||
/**
|
||||
* @description 点击遮罩时是否关闭
|
||||
*/
|
||||
closeOnClickOverlay: uni_modules_nutuiUni_components__utils_props.truthProp,
|
||||
/**
|
||||
* @description 是否保留遮罩关闭后的内容
|
||||
*/
|
||||
destroyOnClose: Boolean
|
||||
};
|
||||
const overlayEmits = {
|
||||
[uni_modules_nutuiUni_components__constants_event.UPDATE_VISIBLE_EVENT]: (visible) => uni_modules_nutuiUni_components__utils_is.isBoolean(visible),
|
||||
[uni_modules_nutuiUni_components__constants_event.CLICK_EVENT]: (evt) => evt instanceof Object
|
||||
};
|
||||
const popupProps = {
|
||||
...overlayProps,
|
||||
...uni_modules_nutuiUni_components__utils_props.commonProps,
|
||||
/**
|
||||
* @description 弹出位置(top,bottom,left,right,center)
|
||||
*/
|
||||
position: uni_modules_nutuiUni_components__utils_props.makeStringProp("center"),
|
||||
/**
|
||||
* @description 动画名
|
||||
*/
|
||||
transition: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
/**
|
||||
* @description 自定义弹框类名
|
||||
*/
|
||||
popClass: uni_modules_nutuiUni_components__utils_props.makeStringProp(""),
|
||||
/**
|
||||
* @description 是否显示圆角
|
||||
*/
|
||||
round: Boolean,
|
||||
/**
|
||||
* @description 是否显示关闭按钮
|
||||
*/
|
||||
closeable: Boolean,
|
||||
/**
|
||||
* @description 关闭按钮图标
|
||||
*/
|
||||
closeIcon: uni_modules_nutuiUni_components__utils_props.makeStringProp("close"),
|
||||
/**
|
||||
* @description 关闭按钮位置(top-left,top-right,bottom-left,bottom-right)
|
||||
*/
|
||||
closeIconPosition: uni_modules_nutuiUni_components__utils_props.makeStringProp("top-right"),
|
||||
/**
|
||||
* @description 是否保留弹层关闭后的内容
|
||||
*/
|
||||
destroyOnClose: uni_modules_nutuiUni_components__utils_props.truthProp,
|
||||
/**
|
||||
* @description 是否显示遮罩层
|
||||
*/
|
||||
overlay: uni_modules_nutuiUni_components__utils_props.truthProp,
|
||||
/**
|
||||
* @description 是否开启 iPhone 系列全面屏底部安全区适配,仅当 `position` 为 `bottom` 时有效
|
||||
*/
|
||||
safeAreaInsetBottom: Boolean,
|
||||
/**
|
||||
* @description 是否开启 iPhone 顶部安全区适配
|
||||
*/
|
||||
safeAreaInsetTop: uni_modules_nutuiUni_components__utils_props.truthProp
|
||||
};
|
||||
const popupEmits = {
|
||||
[uni_modules_nutuiUni_components__constants_event.UPDATE_VISIBLE_EVENT]: (value) => true,
|
||||
"click-pop": (event) => true,
|
||||
"click-close-icon": () => true,
|
||||
"click-overlay": () => true,
|
||||
[uni_modules_nutuiUni_components__constants_event.OPEN_EVENT]: () => true,
|
||||
[uni_modules_nutuiUni_components__constants_event.OPENED_EVENT]: () => true,
|
||||
[uni_modules_nutuiUni_components__constants_event.CLOSE_EVENT]: () => true,
|
||||
[uni_modules_nutuiUni_components__constants_event.CLOSED_EVENT]: () => true,
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
"opend": () => true
|
||||
};
|
||||
exports.overlayEmits = overlayEmits;
|
||||
exports.overlayProps = overlayProps;
|
||||
exports.popupEmits = popupEmits;
|
||||
exports.popupProps = popupProps;
|
||||
//# sourceMappingURL=../.sourcemap/mp-weixin/popup.js.map
|
||||
37
unpackage/dist/dev/mp-weixin/project.config.json
vendored
Normal file
37
unpackage/dist/dev/mp-weixin/project.config.json
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"description": "项目配置文件。",
|
||||
"packOptions": {
|
||||
"ignore": []
|
||||
},
|
||||
"setting": {
|
||||
"urlCheck": true,
|
||||
"es6": true,
|
||||
"postcss": true,
|
||||
"minified": true,
|
||||
"newFeature": true,
|
||||
"bigPackageSizeSupport": true,
|
||||
"ignoreDevUnusedFiles": false
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "",
|
||||
"appid": "wxb25de48f873c4843",
|
||||
"projectname": "yuntaoji",
|
||||
"condition": {
|
||||
"search": {
|
||||
"current": -1,
|
||||
"list": []
|
||||
},
|
||||
"conversation": {
|
||||
"current": -1,
|
||||
"list": []
|
||||
},
|
||||
"game": {
|
||||
"current": -1,
|
||||
"list": []
|
||||
},
|
||||
"miniprogram": {
|
||||
"current": -1,
|
||||
"list": []
|
||||
}
|
||||
}
|
||||
}
|
||||
18
unpackage/dist/dev/mp-weixin/project.private.config.json
vendored
Normal file
18
unpackage/dist/dev/mp-weixin/project.private.config.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"setting": {
|
||||
"urlCheck": false
|
||||
},
|
||||
"condition": {
|
||||
"miniprogram": {
|
||||
"list": [
|
||||
{
|
||||
"name": "pages/config/price",
|
||||
"pathName": "pages/config/price",
|
||||
"query": "",
|
||||
"scene": null,
|
||||
"launchMode": "default"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
unpackage/dist/dev/mp-weixin/static/empty.png
vendored
Normal file
BIN
unpackage/dist/dev/mp-weixin/static/empty.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
1
unpackage/dist/dev/mp-weixin/static/iconfont/parts-icon.svg
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/static/iconfont/parts-icon.svg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1747759569015" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3710" width="200" height="200"><path d="M485.646222 413.795556l92.629334-92.629334c-23.239111-59.320889-10.908444-129.365333 37.034666-177.294222a165.134222 165.134222 0 0 1 148.309334-45.425778v0.085334a16.526222 16.526222 0 0 1 9.969777 27.278222h0.028445l-88.419556 88.419555a32.725333 32.725333 0 0 0 0 46.293334l47.217778 47.217777a32.725333 32.725333 0 0 0 46.293333 0l87.694223-87.694222a16.526222 16.526222 0 0 1 28.046222 9.272889h0.042666a165.134222 165.134222 0 0 1-45.411555 148.323556c-47.928889 47.928889-117.973333 60.273778-177.294222 37.020444l-20.081778 20.081778-14.037333-14.037333a28.444444 28.444444 0 0 0-40.220445 0l-50.289778 50.289777-50.275555-50.289777a28.330667 28.330667 0 0 0-11.235556-6.912z m-96.256 96.241777c1.351111 4.124444 3.655111 7.964444 6.926222 11.235556l50.275556 50.289778-50.275556 50.275555a28.444444 28.444444 0 0 0 0 40.234667l14.037334 14.037333-162.474667 162.460445a66.133333 66.133333 0 1 1-93.511111-93.511111L389.404444 510.037333z m160.540445 18.602667l58.552889-58.567111a16.355556 16.355556 0 0 1 23.153777 0l25.528889 25.543111c5.404444 5.390222 6.286222 13.568 2.673778 19.882667a33.066667 33.066667 0 0 0 44.672 42.951111l0.042667 0.071111c5.660444-2.702222 12.558222-1.962667 17.578666 2.161778l0.056889-0.056889 143.914667 143.928889a81.820444 81.820444 0 0 1 0 115.712l-71.296 71.296a81.820444 81.820444 0 0 1-115.726222 0l-142.791111-142.791111a16.540444 16.540444 0 0 1-2.872889-19.512889l-0.085334-0.056889a33.066667 33.066667 0 0 0-43.448889-43.832889 16.540444 16.540444 0 0 1-20.053333-3.057778l-25.216-25.216a16.355556 16.355556 0 0 1 0-23.139555l58.552889-58.567112L235.960889 308.195556h-37.475556a16.355556 16.355556 0 0 1-14.037333-7.936l-58.794667-97.991112a16.355556 16.355556 0 0 1 2.460445-19.996444l28.686222-28.672a16.355556 16.355556 0 0 1 19.996444-2.460444l97.991112 58.780444c4.920889 2.958222 7.936 8.291556 7.936 14.037333v37.489778L549.930667 528.64z m69.162666 192.312889a21.333333 21.333333 0 0 0 0 30.165333l90.510223 90.510222a21.333333 21.333333 0 0 0 30.165333-30.165333l-90.510222-90.510222a21.333333 21.333333 0 0 0-30.165334 0z m76.430223-76.430222a21.333333 21.333333 0 0 0 0 30.165333l90.510222 90.510222a21.333333 21.333333 0 1 0 30.165333-30.165333l-90.510222-90.510222a21.333333 21.333333 0 0 0-30.165333 0z" fill="#ffffff" p-id="3711"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
1
unpackage/dist/dev/mp-weixin/static/iconfont/phone-icon.svg
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/static/iconfont/phone-icon.svg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1747759524592" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2743" id="mx_n_1747759524593" width="200" height="200"><path d="M695.808 85.333333H328.192C264.832 85.333333 213.333333 133.12 213.333333 192v640C213.333333 890.88 264.832 938.666667 328.192 938.666667h367.616C759.168 938.666667 810.666667 890.88 810.666667 832v-640C810.666667 133.12 759.168 85.333333 695.808 85.333333z m-252.757333 746.666667c0-35.413333 28.629333-64 64-64a64 64 0 1 1-64 64zM305.237333 682.666667V213.418667a42.666667 42.666667 0 0 1 42.666667-42.666667h328.234667a42.666667 42.666667 0 0 1 42.666666 42.666667v469.333333a42.666667 42.666667 0 0 1-42.666666 42.666667l-328.277334-0.128a42.666667 42.666667 0 0 1-42.666666-42.666667z" fill="#ffffff" p-id="2744"></path></svg>
|
||||
|
After Width: | Height: | Size: 810 B |
BIN
unpackage/dist/dev/mp-weixin/static/logo.png
vendored
Normal file
BIN
unpackage/dist/dev/mp-weixin/static/logo.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
1
unpackage/dist/dev/mp-weixin/static/package.svg
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/static/package.svg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="undefined" d="M397.17 430.96c0-18.65 15.14-33.72 33.79-33.72h162.08a33.79 33.79 0 0 1 0 67.51H430.96a33.79 33.79 0 0 1-33.72-33.79z"/><path fill="undefined" d="M200.63 138.61A174.52 174.52 0 0 1 336.9 73.14h350.2c52.96 0 103.13 24.14 136.27 65.47l89.23 111.61c24.8 30.94 38.25 69.41 38.26 108.98v417.14a174.52 174.52 0 0 1-174.52 174.52H247.66A174.52 174.52 0 0 1 73.14 776.34V359.2c0-39.57 13.46-78.04 38.26-108.98zm136.27 7.68c-30.72 0-59.9 13.97-79.14 38.03l-71.98 89.97h652.44l-71.98-89.97a101.38 101.38 0 0 0-79.14-38.03zm540.08 200.99a36.86 36.86 0 0 1-2.92.15H149.94c-1.02 0-1.97 0-2.92-.15-.51 3.95-.73 7.97-.73 11.92v417.14c0 56.03 45.35 101.38 101.37 101.37h528.68c56.03 0 101.38-45.35 101.37-101.37V359.2c0-3.95-.22-7.97-.73-11.92"/></svg>
|
||||
|
After Width: | Height: | Size: 826 B |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user