增加新功能

This commit is contained in:
hejiangming
2025-03-23 20:36:06 +08:00
parent 2ae62b59ed
commit 78270eeda0
184 changed files with 2690 additions and 1496 deletions
+8
View File
@@ -28,8 +28,16 @@ function getSettleList(data) {
data
});
}
function settle(data) {
return utils_request.request({
url: "/cart/settle",
method: "post",
data
});
}
exports.getCartList = getCartList;
exports.getSettleList = getSettleList;
exports.removeGoods = removeGoods;
exports.settle = settle;
exports.updateGoodsNum = updateGoodsNum;
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/cart.js.map
+10
View File
@@ -1,6 +1,8 @@
"use strict";
const utils_request = require("../utils/request.js");
const utils_config = require("../utils/config.js");
function getUserList(data) {
data.appId = utils_config.APPID;
return utils_request.request({
url: "/common/getSmsCode",
method: "post",
@@ -14,6 +16,14 @@ function getCascadeRegion(data) {
data
});
}
function getCascadeCategory(data) {
return utils_request.request({
url: "/common/getCascadeCategory",
method: "get",
data
});
}
exports.getCascadeCategory = getCascadeCategory;
exports.getCascadeRegion = getCascadeRegion;
exports.getUserList = getUserList;
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/common.js.map
-11
View File
@@ -1,11 +0,0 @@
"use strict";
const utils_request = require("../utils/request.js");
function loginbysms(params) {
return utils_request.request({
url: "/auth/loginbysms",
method: "post",
data: params
});
}
exports.loginbysms = loginbysms;
//# sourceMappingURL=../../.sourcemap/mp-weixin/api/login.js.map
+1
View File
@@ -30,6 +30,7 @@ if (!Math) {
"./pages/productInfo/productInfo.js";
"./pages/order_submit/order_submit.js";
"./pages/order_submit_ok/order_submit_ok.js";
"./pages/LuckyWheel/LuckyWheel.js";
}
const _sfc_main = {
onLaunch: function() {
+2 -1
View File
@@ -25,7 +25,8 @@
"pages/invite_friends/invite_friends",
"pages/productInfo/productInfo",
"pages/order_submit/order_submit",
"pages/order_submit_ok/order_submit_ok"
"pages/order_submit_ok/order_submit_ok",
"pages/LuckyWheel/LuckyWheel"
],
"window": {
"navigationStyle": "custom"
+4 -1
View File
@@ -4409,6 +4409,7 @@
display: grid;
justify-content: center;
margin-top: 220rpx;
width: 100%;
}
.not_order_warp .not_order_warp_img {
text-align: center;
@@ -4509,6 +4510,7 @@
.preference_product .product_item_right {
margin-left: 20rpx;
display: grid;
width: calc(100% - 194rpx);
}
.preference_product .product_item_right .title_warp {
font-weight: bold;
@@ -4534,7 +4536,8 @@
font-size: 22rpx;
}
.preference_product .product_item_right .price_zq_warp {
width: 50%;
width: 300rpx;
text-align: center;
border-radius: 8rpx;
font-weight: bold;
font-size: 20rpx;
+8 -8
View File
@@ -6156,9 +6156,9 @@ function populateParameters(fromRes, toRes) {
appVersion: "1.0.1",
appVersionCode: "100",
appLanguage: getAppLanguage(hostLanguage),
uniCompileVersion: "4.55",
uniCompilerVersion: "4.55",
uniRuntimeVersion: "4.55",
uniCompileVersion: "4.56",
uniCompilerVersion: "4.56",
uniRuntimeVersion: "4.56",
uniPlatform: "mp-weixin",
deviceBrand,
deviceModel: model,
@@ -6307,9 +6307,9 @@ const getAppBaseInfo = {
appLanguage: getAppLanguage(hostLanguage),
isUniAppX: false,
uniPlatform: "mp-weixin",
uniCompileVersion: "4.55",
uniCompilerVersion: "4.55",
uniRuntimeVersion: "4.55"
uniCompileVersion: "4.56",
uniCompilerVersion: "4.56",
uniRuntimeVersion: "4.56"
};
extend(toRes, parameters);
}
@@ -7016,9 +7016,9 @@ function initOnError() {
};
}
function initRuntimeSocketService() {
const hosts = "192.168.0.111,127.0.0.1";
const hosts = "127.0.0.1,192.168.101.3";
const port = "8090";
const id = "mp-weixin_OjCIix";
const id = "mp-weixin_M_zJML";
const lazy = typeof swan !== "undefined";
let restoreError = lazy ? () => {
} : initOnError();
+58 -69
View File
@@ -1,5 +1,7 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_product = require("../../api/product.js");
const utils_enumUtils = require("../../utils/enumUtils.js");
const choiceness = () => "../../components/choiceness/choiceness.js";
const _sfc_main = {
components: { choiceness },
@@ -75,26 +77,10 @@ const _sfc_main = {
}
],
currentLanguage: {},
yxProduct: [
{
id: 1,
name: "中文中文中文中文中文",
url: "/static/common/product_def.png",
price: 99
},
{
id: 2,
name: "中文中文中文中文",
url: "/static/common/product_def.png",
price: 99
},
{
id: 3,
name: "中文中文中文中文中文",
url: "/static/common/product_def.png",
price: 99
}
],
yxProduct: [],
// 好物优选列表
faddishProduct: [],
// 爆款专区
hotList: [
{
id: 1,
@@ -120,9 +106,15 @@ const _sfc_main = {
url: "/static/common/product_def.png",
price: 99
}
]
],
// 热门
productLoading: false
};
},
mounted() {
this.querySearchList(utils_enumUtils.SEARCH_TYPE.SOMETHING);
this.querySearchList(utils_enumUtils.SEARCH_TYPE.EXPLOSIVE);
},
methods: {
jumpTurntable() {
common_vendor.index.navigateTo({
@@ -143,22 +135,44 @@ const _sfc_main = {
common_vendor.index.navigateTo({
url: "/pages/search/search"
});
},
/**
* 查询商品列表
*/
async querySearchList(type) {
this.productLoading = true;
const params = {
type,
page: 1,
pageSize: 3
};
const resp = await api_product.searchList(params);
if (resp && resp.bizcode === 100) {
if (type === utils_enumUtils.SEARCH_TYPE.SOMETHING) {
this.yxProduct = resp.data;
} else if (type === utils_enumUtils.SEARCH_TYPE.EXPLOSIVE) {
this.faddishProduct = resp.data;
}
}
this.productLoading = false;
}
}
};
if (!Array) {
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
const _easycom_up_swiper2 = common_vendor.resolveComponent("up-swiper");
const _easycom_up_loading_icon2 = common_vendor.resolveComponent("up-loading-icon");
const _easycom_choiceness2 = common_vendor.resolveComponent("choiceness");
const _easycom_up_action_sheet2 = common_vendor.resolveComponent("up-action-sheet");
(_easycom_up_image2 + _easycom_up_swiper2 + _easycom_choiceness2 + _easycom_up_action_sheet2)();
(_easycom_up_image2 + _easycom_up_swiper2 + _easycom_up_loading_icon2 + _easycom_choiceness2 + _easycom_up_action_sheet2)();
}
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
const _easycom_up_swiper = () => "../../uni_modules/uview-plus/components/u-swiper/u-swiper.js";
const _easycom_up_loading_icon = () => "../../uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.js";
const _easycom_choiceness = () => "../../components/choiceness/choiceness.js";
const _easycom_up_action_sheet = () => "../../uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.js";
if (!Math) {
(_easycom_up_image + _easycom_up_swiper + _easycom_choiceness + _easycom_up_action_sheet)();
(_easycom_up_image + _easycom_up_swiper + _easycom_up_loading_icon + _easycom_choiceness + _easycom_up_action_sheet)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
@@ -217,9 +231,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
bgColor: "#f1f6ff00"
}),
n: common_vendor.o((...args) => $options.jumpPrdference && $options.jumpPrdference(...args)),
o: common_vendor.f($data.yxProduct, (item, k0, i0) => {
o: common_vendor.p({
show: $data.productLoading
}),
p: common_vendor.f($data.yxProduct, (item, k0, i0) => {
return {
a: "07e72d3c-7-" + i0,
a: "07e72d3c-8-" + i0,
b: common_vendor.p({
src: item.url,
width: "100%",
@@ -228,20 +245,24 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
shape: "square",
radius: "16"
}),
c: common_vendor.t(item.name),
d: item.id
c: common_vendor.t(item.title),
d: common_vendor.t(item.price),
e: item.id
};
}),
p: common_vendor.p({
q: common_vendor.p({
src: "/static/common/right_y_st2.png",
width: "12",
height: "12",
bgColor: "#f1f6ff00"
}),
q: common_vendor.o((...args) => $options.jumpWelcome && $options.jumpWelcome(...args)),
r: common_vendor.f($data.yxProduct, (item, k0, i0) => {
r: common_vendor.o((...args) => $options.jumpWelcome && $options.jumpWelcome(...args)),
s: common_vendor.p({
show: $data.productLoading
}),
t: common_vendor.f($data.faddishProduct, (item, k0, i0) => {
return {
a: "07e72d3c-9-" + i0,
a: "07e72d3c-11-" + i0,
b: common_vendor.p({
src: item.url,
width: "100%",
@@ -250,51 +271,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
shape: "square",
radius: "16"
}),
c: common_vendor.t(item.name),
d: item.id
c: common_vendor.t(item.title),
d: common_vendor.t(item.price),
e: item.id
};
}),
s: common_vendor.p({
src: "/static/home/hot.png",
width: "20",
height: "20",
bgColor: "#f1f6ff00"
}),
t: common_vendor.p({
src: "/static/common/right_y_st.png",
width: "12",
height: "12",
bgColor: "#f1f6ff00"
}),
v: common_vendor.f($data.hotList, (item, k0, i0) => {
return {
a: "07e72d3c-12-" + i0,
b: common_vendor.p({
src: item.url,
width: "100%",
height: "100",
bgColor: "#f1f6ff00"
}),
c: common_vendor.t(item.name),
d: "07e72d3c-13-" + i0,
e: common_vendor.t(item.price),
f: item.id
};
}),
w: common_vendor.p({
src: "/static/home/hot_price.png",
width: "12",
height: "12",
bgColor: "#f1f6ff00"
}),
x: common_vendor.p({
v: common_vendor.p({
src: "/static/common/right.png",
width: "16",
height: "16",
bgColor: "#f1f6ff00"
}),
y: common_vendor.o(($event) => $data.languageShow = false),
z: common_vendor.p({
w: common_vendor.o(($event) => $data.languageShow = false),
x: common_vendor.p({
actions: $data.languageList,
show: $data.languageShow,
cancelText: "取消"
+1
View File
@@ -4,6 +4,7 @@
"choiceness": "../../components/choiceness/choiceness",
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image",
"up-swiper": "../../uni_modules/uview-plus/components/u-swiper/u-swiper",
"up-loading-icon": "../../uni_modules/uview-plus/components/u-loading-icon/u-loading-icon",
"up-action-sheet": "../../uni_modules/uview-plus/components/u-action-sheet/u-action-sheet"
}
}
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -129,13 +129,13 @@
padding: 20rpx;
border-radius: 24rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.home_content_warp .product_content .product_item.data-v-07e72d3c {
width: 32%;
border-radius: 16rpx;
position: relative;
margin-right: 20rpx;
}
.home_content_warp .product_content .product_f_item.data-v-07e72d3c {
position: absolute;
+32 -20
View File
@@ -2,7 +2,7 @@
const common_vendor = require("../../common/vendor.js");
const utils_enumUtils = require("../../utils/enumUtils.js");
const api_common = require("../../api/common.js");
const api_login = require("../../api/login.js");
const api_auth = require("../../api/auth.js");
const utils_auth = require("../../utils/auth.js");
const InputCodeComm = () => "../../components/code-comm/code-comm.js";
const _sfc_main = {
@@ -28,8 +28,9 @@ const _sfc_main = {
// 是否显示
isPolicy: false,
// 是否同意
countdown: false
countdown: false,
// 清空倒计时
butLoading: false
};
},
methods: {
@@ -49,13 +50,16 @@ const _sfc_main = {
});
return;
}
this.butLoading = true;
let response = {};
if (this.loginWay === "password")
;
else {
if (this.loginWay === "password") {
params.mobile = form.name;
params.password = form.password;
response = await api_auth.loginbypw(params);
} else {
params.mobile = form.name;
params.smsCode = form.code;
response = await api_login.loginbysms(params);
response = await api_auth.loginbysms(params);
}
const data = response.data;
utils_auth.setStorageFun(utils_auth.TOKEN_NAME, data.token);
@@ -63,11 +67,14 @@ const _sfc_main = {
const userInfo = {
avatar: data.avatarUrl,
name: data.name,
userId: data.userId
userId: data.userId,
grade: data.grade,
inviteCode: data.inviteCode
};
utils_auth.setStorageFun(utils_auth.USER_DATA, userInfo);
let currentTimeStamp = (/* @__PURE__ */ new Date()).getTime();
utils_auth.setStorageFun(utils_auth.USER_LOGIN_TIME, currentTimeStamp);
this.butLoading = false;
this.$refs.uToastRef.show({
type: "success",
message: response.msg
@@ -77,10 +84,8 @@ const _sfc_main = {
}, 2e3);
},
checkNameParam(val) {
common_vendor.index.__f__("log", "at pages/login/login.vue:175", "val", val);
},
checkParam(val) {
common_vendor.index.__f__("log", "at pages/login/login.vue:178", "val", val);
},
/**
* 获取手机验证码
@@ -100,6 +105,7 @@ const _sfc_main = {
type: utils_enumUtils.SMS_TYPE.LOGIN
};
const response = await api_common.getUserList(params);
common_vendor.index.__f__("log", "at pages/login/login.vue:208", "responseresponseresponse", response);
if (response && response.bizcode === 100) {
this.$refs.uToastRef.show({
type: "success",
@@ -120,17 +126,19 @@ if (!Array) {
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
const _easycom_up_count_down2 = common_vendor.resolveComponent("up-count-down");
const _easycom_up_loading_icon2 = common_vendor.resolveComponent("up-loading-icon");
const _easycom_up_checkbox2 = common_vendor.resolveComponent("up-checkbox");
const _easycom_up_toast2 = common_vendor.resolveComponent("up-toast");
(_easycom_up_image2 + _easycom_up_input2 + _easycom_up_count_down2 + _easycom_up_checkbox2 + _easycom_up_toast2)();
(_easycom_up_image2 + _easycom_up_input2 + _easycom_up_count_down2 + _easycom_up_loading_icon2 + _easycom_up_checkbox2 + _easycom_up_toast2)();
}
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
const _easycom_up_count_down = () => "../../uni_modules/uview-plus/components/u-count-down/u-count-down.js";
const _easycom_up_loading_icon = () => "../../uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.js";
const _easycom_up_checkbox = () => "../../uni_modules/uview-plus/components/u-checkbox/u-checkbox.js";
const _easycom_up_toast = () => "../../uni_modules/uview-plus/components/u-toast/u-toast.js";
if (!Math) {
(_easycom_up_image + _easycom_up_input + _easycom_up_count_down + _easycom_up_checkbox + _easycom_up_toast)();
(_easycom_up_image + _easycom_up_input + _easycom_up_count_down + _easycom_up_loading_icon + _easycom_up_checkbox + _easycom_up_toast)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
@@ -207,18 +215,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
modelValue: $data.form.code
})
}), {
v: common_vendor.o((...args) => $options.loginFun && $options.loginFun(...args)),
w: $data.loginWay === "password"
v: common_vendor.p({
color: "#FFFFFF",
show: $data.butLoading
}),
w: common_vendor.o((...args) => $options.loginFun && $options.loginFun(...args)),
x: $data.loginWay === "password"
}, $data.loginWay === "password" ? {
x: common_vendor.o(($event) => $data.loginWay = "code")
y: common_vendor.o(($event) => $data.loginWay = "code")
} : {}, {
y: $data.loginWay === "code"
z: $data.loginWay === "code"
}, $data.loginWay === "code" ? {
z: common_vendor.o(($event) => $data.loginWay = "password")
A: common_vendor.o(($event) => $data.loginWay = "password")
} : {}, {
A: common_vendor.o((...args) => $options.jumpRegister && $options.jumpRegister(...args)),
B: common_vendor.o(($event) => $data.isPolicy = $event),
C: common_vendor.p({
B: common_vendor.o((...args) => $options.jumpRegister && $options.jumpRegister(...args)),
C: common_vendor.o(($event) => $data.isPolicy = $event),
D: common_vendor.p({
name: "isCheck",
usedAlone: true,
shape: "circle",
@@ -227,7 +239,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
iconSize: "18",
checked: $data.isPolicy
}),
D: common_vendor.sr("uToastRef", "e4e4508d-9")
E: common_vendor.sr("uToastRef", "e4e4508d-10")
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-e4e4508d"]]);
+1
View File
@@ -4,6 +4,7 @@
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image",
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
"up-count-down": "../../uni_modules/uview-plus/components/u-count-down/u-count-down",
"up-loading-icon": "../../uni_modules/uview-plus/components/u-loading-icon/u-loading-icon",
"up-checkbox": "../../uni_modules/uview-plus/components/u-checkbox/u-checkbox",
"up-toast": "../../uni_modules/uview-plus/components/u-toast/u-toast"
}
+1 -1
View File
@@ -1 +1 @@
<view class="login_warp data-v-e4e4508d"><view class="login_logo_warp data-v-e4e4508d"><view class="data-v-e4e4508d" style="margin-left:8rpx"><up-image wx:if="{{a}}" class="data-v-e4e4508d" u-i="e4e4508d-0" bind:__l="__l" u-p="{{a}}"></up-image></view><view class="data-v-e4e4508d" style="margin-top:20rpx"><up-image wx:if="{{b}}" class="data-v-e4e4508d" u-i="e4e4508d-1" bind:__l="__l" u-p="{{b}}"></up-image></view></view><view class="login_info data-v-e4e4508d"><view class="login_info_item data-v-e4e4508d"><up-input wx:if="{{e}}" class="data-v-e4e4508d" bindchange="{{c}}" u-i="e4e4508d-2" bind:__l="__l" bindupdateModelValue="{{d}}" u-p="{{e}}"></up-input></view><view wx:if="{{f}}" class="login_info_item data-v-e4e4508d"><up-input wx:if="{{n}}" class="data-v-e4e4508d" u-s="{{['suffix']}}" bindchange="{{l}}" u-i="e4e4508d-3" bind:__l="__l" bindupdateModelValue="{{m}}" u-p="{{n}}"><view slot="suffix" style="margin-right:10rpx"><up-image wx:if="{{g}}" class="data-v-e4e4508d" bindclick="{{h}}" u-i="e4e4508d-4,e4e4508d-3" bind:__l="__l" u-p="{{i}}"></up-image><up-image wx:else class="data-v-e4e4508d" bindclick="{{j}}" u-i="e4e4508d-5,e4e4508d-3" bind:__l="__l" u-p="{{k||''}}"></up-image></view></up-input></view><view wx:else class="login_info_item data-v-e4e4508d"><up-input wx:if="{{t}}" class="data-v-e4e4508d" u-s="{{['suffix']}}" u-i="e4e4508d-6" bind:__l="__l" bindupdateModelValue="{{s}}" u-p="{{t}}"><view slot="suffix" style="margin-right:10rpx"><view wx:if="{{o}}" class="code-warp data-v-e4e4508d"><up-count-down wx:if="{{q}}" class="data-v-e4e4508d" bindfinish="{{p}}" u-i="e4e4508d-7,e4e4508d-6" bind:__l="__l" u-p="{{q}}"></up-count-down><text class="data-v-e4e4508d" style="margin-left:10rpx">s</text></view><view wx:else bindtap="{{r}}" class="code_msg data-v-e4e4508d"> 获取验证码 </view></view></up-input></view><view class="login_comm_but login_comm_but_yes data-v-e4e4508d" bindtap="{{v}}"> 登录 </view><view class="cut_way_warp data-v-e4e4508d"><view wx:if="{{w}}" class="data-v-e4e4508d" bindtap="{{x}}">验证码登录</view><view wx:if="{{y}}" class="data-v-e4e4508d" bindtap="{{z}}">密码登录登录</view><view class="data-v-e4e4508d" bindtap="{{A}}">注册</view></view></view><view class="policy_warp data-v-e4e4508d"><up-checkbox wx:if="{{C}}" class="data-v-e4e4508d" u-s="{{['label']}}" u-i="e4e4508d-8" bind:__l="__l" bindupdateChecked="{{B}}" u-p="{{C}}"><view slot="label"><text class="data-v-e4e4508d">已阅读并同意</text><text class="policy_a_warp data-v-e4e4508d">《哈希优品服务协议》</text><text class="data-v-e4e4508d">及</text><text class="policy_a_warp data-v-e4e4508d">《隐私政策》</text></view></up-checkbox></view><up-toast class="r data-v-e4e4508d" u-r="uToastRef" u-i="e4e4508d-9" bind:__l="__l"></up-toast></view>
<view class="login_warp data-v-e4e4508d"><view class="login_logo_warp data-v-e4e4508d"><view class="data-v-e4e4508d" style="margin-left:8rpx"><up-image wx:if="{{a}}" class="data-v-e4e4508d" u-i="e4e4508d-0" bind:__l="__l" u-p="{{a}}"></up-image></view><view class="data-v-e4e4508d" style="margin-top:20rpx"><up-image wx:if="{{b}}" class="data-v-e4e4508d" u-i="e4e4508d-1" bind:__l="__l" u-p="{{b}}"></up-image></view></view><view class="login_info data-v-e4e4508d"><view class="login_info_item data-v-e4e4508d"><up-input wx:if="{{e}}" class="data-v-e4e4508d" bindchange="{{c}}" u-i="e4e4508d-2" bind:__l="__l" bindupdateModelValue="{{d}}" u-p="{{e}}"></up-input></view><view wx:if="{{f}}" class="login_info_item data-v-e4e4508d"><up-input wx:if="{{n}}" class="data-v-e4e4508d" u-s="{{['suffix']}}" bindchange="{{l}}" u-i="e4e4508d-3" bind:__l="__l" bindupdateModelValue="{{m}}" u-p="{{n}}"><view slot="suffix" style="margin-right:10rpx"><up-image wx:if="{{g}}" class="data-v-e4e4508d" bindclick="{{h}}" u-i="e4e4508d-4,e4e4508d-3" bind:__l="__l" u-p="{{i}}"></up-image><up-image wx:else class="data-v-e4e4508d" bindclick="{{j}}" u-i="e4e4508d-5,e4e4508d-3" bind:__l="__l" u-p="{{k||''}}"></up-image></view></up-input></view><view wx:else class="login_info_item data-v-e4e4508d"><up-input wx:if="{{t}}" class="data-v-e4e4508d" u-s="{{['suffix']}}" u-i="e4e4508d-6" bind:__l="__l" bindupdateModelValue="{{s}}" u-p="{{t}}"><view slot="suffix" style="margin-right:10rpx"><view wx:if="{{o}}" class="code-warp data-v-e4e4508d"><up-count-down wx:if="{{q}}" class="data-v-e4e4508d" bindfinish="{{p}}" u-i="e4e4508d-7,e4e4508d-6" bind:__l="__l" u-p="{{q}}"></up-count-down><text class="data-v-e4e4508d" style="margin-left:10rpx">s</text></view><view wx:else bindtap="{{r}}" class="code_msg data-v-e4e4508d"> 获取验证码 </view></view></up-input></view><view class="login_comm_but login_comm_but_yes data-v-e4e4508d" bindtap="{{w}}"><up-loading-icon wx:if="{{v}}" class="data-v-e4e4508d" u-i="e4e4508d-8" bind:__l="__l" u-p="{{v}}"></up-loading-icon><text class="data-v-e4e4508d" style="margin-left:10rpx">登录</text></view><view class="cut_way_warp data-v-e4e4508d"><view wx:if="{{x}}" class="data-v-e4e4508d" bindtap="{{y}}">验证码登录</view><view wx:if="{{z}}" class="data-v-e4e4508d" bindtap="{{A}}">密码登录登录</view><view class="data-v-e4e4508d" bindtap="{{B}}">注册</view></view></view><view class="policy_warp data-v-e4e4508d"><up-checkbox wx:if="{{D}}" class="data-v-e4e4508d" u-s="{{['label']}}" u-i="e4e4508d-9" bind:__l="__l" bindupdateChecked="{{C}}" u-p="{{D}}"><view slot="label"><text class="data-v-e4e4508d">已阅读并同意</text><text class="policy_a_warp data-v-e4e4508d">《哈希优品服务协议》</text><text class="data-v-e4e4508d">及</text><text class="policy_a_warp data-v-e4e4508d">《隐私政策》</text></view></up-checkbox></view><up-toast class="r data-v-e4e4508d" u-r="uToastRef" u-i="e4e4508d-10" bind:__l="__l"></up-toast></view>
+2
View File
@@ -49,6 +49,8 @@
font-size: 32rpx;
color: #999999;
padding: 28rpx 0;
display: flex;
justify-content: center;
}
.login_comm_but_yes.data-v-e4e4508d {
background: #FF7C41;
+7 -9
View File
@@ -28,8 +28,8 @@ const _sfc_main = {
path: "/pages/mine_order/mine_order"
},
{
id: utils_enumUtils.ORDER_TYPE.AFTER_SALE,
title: "退款售后",
id: utils_enumUtils.ORDER_TYPE.SUCCEED,
title: "待评价",
url: "/static/mine/order_afterSale.png",
path: "/pages/mine_order/mine_order"
}
@@ -143,8 +143,6 @@ const _sfc_main = {
let path = "/pages/mine_order/mine_order";
if (item && Object.keys(item).length !== 0) {
path = "/pages/mine_order/mine_order?type=" + item.id;
} else {
path = "/pages/mine_order/mine_order?type=0";
}
common_vendor.index.navigateTo({
url: path
@@ -183,8 +181,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
height: "18",
bgColor: "#f1f6ff00"
}),
e: common_vendor.t($data.userData.userId),
f: common_vendor.o(($event) => $options.copyData($data.userData.userId)),
e: common_vendor.t($data.userData.inviteCode),
f: common_vendor.o(($event) => $options.copyData($data.userData.inviteCode)),
g: common_vendor.p({
src: "/static/common/copy.png",
width: "14",
@@ -216,7 +214,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
l: common_vendor.o(($event) => $options.jumpOrder({})),
m: common_vendor.f($data.orderTemplList, (item, k0, i0) => {
return {
a: "81c02944-6-" + i0,
a: "41c0836b-6-" + i0,
b: common_vendor.p({
src: item.url,
width: "30",
@@ -230,7 +228,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
}),
n: common_vendor.f($data.applyList, (item, k0, i0) => {
return {
a: "81c02944-7-" + i0,
a: "41c0836b-7-" + i0,
b: common_vendor.p({
src: item.url,
width: "36",
@@ -268,7 +266,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
}),
s: common_vendor.f($data.toolList, (item, k0, i0) => {
return {
a: "81c02944-12-" + i0,
a: "41c0836b-12-" + i0,
b: common_vendor.p({
src: item.url,
width: "30",
+1 -1
View File
@@ -1 +1 @@
<view class="mine_warp"><view class="mine_header"><view wx:if="{{a}}" class="mine_data"><up-image wx:if="{{b}}" u-i="81c02944-0" bind:__l="__l" u-p="{{b}}"></up-image><view class="mine_info"><view class="mine_info_name"><text style="margin-right:20rpx">{{c}}</text><up-image wx:if="{{d}}" u-i="81c02944-1" bind:__l="__l" u-p="{{d}}"></up-image></view><view class="mine_info_id"><text style="margin-right:20rpx">ID:{{e}}</text><up-image wx:if="{{g}}" bindclick="{{f}}" u-i="81c02944-2" bind:__l="__l" u-p="{{g}}"></up-image></view></view></view><view wx:else class="mine_no_login_data"><view class="mine_data"><up-image wx:if="{{h}}" u-i="81c02944-3" bind:__l="__l" u-p="{{h}}"></up-image><view class="mine_info_not_login"> 未登录 </view></view><view bindtap="{{j}}" class="login_warp"><text style="margin-right:10rpx">立即登录</text><up-image wx:if="{{i}}" u-i="81c02944-4" bind:__l="__l" u-p="{{i}}"></up-image></view></view></view><view class="mine_content_warp"><view class="mine_content_comm_warp"><view class="mine_order_title"><view>我的订单</view><view class="mine_order_title_all" bindtap="{{l}}"><view style="margin-right:10rpx">全部</view><up-image wx:if="{{k}}" u-i="81c02944-5" bind:__l="__l" u-p="{{k}}"></up-image></view></view><view class="mine_order_list"><view wx:for="{{m}}" wx:for-item="item" wx:key="d" class="mine_fontsize_comm_warp order_list_item" bindtap="{{item.e}}"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view>{{item.c}}</view></view></view></view><view class="mine_content_comm_warp mine_top_comm_warp apply_list"><view wx:for="{{n}}" wx:for-item="item" wx:key="d" class="apply_item mine_fontsize_comm_warp" bindtap="{{item.e}}"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view>{{item.c}}</view></view></view><view class="mine_top_comm_warp enter_list"><view class="enter_item"><view><view class="enter_title">商家入驻</view><view class="enter_apply"><text class="enter_apply_title">申请</text><up-image wx:if="{{o}}" u-i="81c02944-8" bind:__l="__l" u-p="{{o}}"></up-image></view></view><up-image wx:if="{{p}}" u-i="81c02944-9" bind:__l="__l" u-p="{{p}}"></up-image></view><view class="enter_item"><view><view class="enter_title">企业/品牌入驻</view><view class="enter_apply"><text class="enter_apply_title">申请</text><up-image wx:if="{{q}}" u-i="81c02944-10" bind:__l="__l" u-p="{{q}}"></up-image></view></view><up-image wx:if="{{r}}" u-i="81c02944-11" bind:__l="__l" u-p="{{r}}"></up-image></view></view><view class="mine_content_comm_warp mine_top_comm_warp mine_tool_warp"><view class="mine_tool_title">服务工具</view><view class="tool_list"><view wx:for="{{s}}" wx:for-item="item" wx:key="d" class="tool_item" bindtap="{{item.e}}"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><text class="mine_fontsize_comm_warp">{{item.c}}</text></view></view></view></view></view>
<view class="mine_warp"><view class="mine_header"><view wx:if="{{a}}" class="mine_data"><up-image wx:if="{{b}}" u-i="41c0836b-0" bind:__l="__l" u-p="{{b}}"></up-image><view class="mine_info"><view class="mine_info_name"><text style="margin-right:20rpx">{{c}}</text><up-image wx:if="{{d}}" u-i="41c0836b-1" bind:__l="__l" u-p="{{d}}"></up-image></view><view class="mine_info_id"><text style="margin-right:20rpx">ID:{{e}}</text><up-image wx:if="{{g}}" bindclick="{{f}}" u-i="41c0836b-2" bind:__l="__l" u-p="{{g}}"></up-image></view></view></view><view wx:else class="mine_no_login_data"><view class="mine_data"><up-image wx:if="{{h}}" u-i="41c0836b-3" bind:__l="__l" u-p="{{h}}"></up-image><view class="mine_info_not_login"> 未登录 </view></view><view bindtap="{{j}}" class="login_warp"><text style="margin-right:10rpx">立即登录</text><up-image wx:if="{{i}}" u-i="41c0836b-4" bind:__l="__l" u-p="{{i}}"></up-image></view></view></view><view class="mine_content_warp"><view class="mine_content_comm_warp"><view class="mine_order_title"><view>我的订单</view><view class="mine_order_title_all" bindtap="{{l}}"><view style="margin-right:10rpx">全部</view><up-image wx:if="{{k}}" u-i="41c0836b-5" bind:__l="__l" u-p="{{k}}"></up-image></view></view><view class="mine_order_list"><view wx:for="{{m}}" wx:for-item="item" wx:key="d" class="mine_fontsize_comm_warp order_list_item" bindtap="{{item.e}}"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view>{{item.c}}</view></view></view></view><view class="mine_content_comm_warp mine_top_comm_warp apply_list"><view wx:for="{{n}}" wx:for-item="item" wx:key="d" class="apply_item mine_fontsize_comm_warp" bindtap="{{item.e}}"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view>{{item.c}}</view></view></view><view class="mine_top_comm_warp enter_list"><view class="enter_item"><view><view class="enter_title">商家入驻</view><view class="enter_apply"><text class="enter_apply_title">申请</text><up-image wx:if="{{o}}" u-i="41c0836b-8" bind:__l="__l" u-p="{{o}}"></up-image></view></view><up-image wx:if="{{p}}" u-i="41c0836b-9" bind:__l="__l" u-p="{{p}}"></up-image></view><view class="enter_item"><view><view class="enter_title">企业/品牌入驻</view><view class="enter_apply"><text class="enter_apply_title">申请</text><up-image wx:if="{{q}}" u-i="41c0836b-10" bind:__l="__l" u-p="{{q}}"></up-image></view></view><up-image wx:if="{{r}}" u-i="41c0836b-11" bind:__l="__l" u-p="{{r}}"></up-image></view></view><view class="mine_content_comm_warp mine_top_comm_warp mine_tool_warp"><view class="mine_tool_title">服务工具</view><view class="tool_list"><view wx:for="{{s}}" wx:for-item="item" wx:key="d" class="tool_item" bindtap="{{item.e}}"><up-image wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><text class="mine_fontsize_comm_warp">{{item.c}}</text></view></view></view></view></view>
@@ -1 +1 @@
<view class="mine_address_warp data-v-1172d71f"><block wx:if="{{a}}"><view wx:for="{{b}}" wx:for-item="item" wx:key="m" class="address_item data-v-1172d71f"><view class="address_item_info data-v-1172d71f"><view class="data-v-1172d71f">{{item.a}}</view><view class="data-v-1172d71f" style="margin-left:20rpx">{{item.b}}</view></view><view class="address_item_address data-v-1172d71f">{{item.c}} {{item.d}} {{item.e}} {{item.f}} {{item.g}}</view><view class="address_operate data-v-1172d71f"><up-checkbox wx:if="{{item.j}}" class="data-v-1172d71f" bindchange="{{item.h}}" u-i="{{item.i}}" bind:__l="__l" u-p="{{item.j}}"></up-checkbox><view class="operate_item data-v-1172d71f"><view class="operate_ data-v-1172d71f" bindtap="{{item.k}}">删除</view><view class="operate_ data-v-1172d71f" bindtap="{{item.l}}">修改</view></view></view></view></block><view wx:else class="not_order_warp data-v-1172d71f"><view class="not_order_warp_img data-v-1172d71f"><up-image wx:if="{{c}}" class="data-v-1172d71f" u-i="1172d71f-1" bind:__l="__l" u-p="{{c}}"></up-image></view><view class="not_order_msg_warp data-v-1172d71f">暂时地址,快去添加吧~</view></view><view class="add_but data-v-1172d71f" bindtap="{{d}}"> 新增地址 </view></view>
<view class="mine_address_warp data-v-1172d71f"><block wx:if="{{a}}"><view wx:for="{{b}}" wx:for-item="item" wx:key="m" class="address_item data-v-1172d71f"><view class="address_item_info data-v-1172d71f"><view class="data-v-1172d71f">{{item.a}}</view><view class="data-v-1172d71f" style="margin-left:20rpx">{{item.b}}</view></view><view class="address_item_address data-v-1172d71f">{{item.c}} {{item.d}} {{item.e}} {{item.f}} {{item.g}}</view><view class="address_operate data-v-1172d71f"><up-checkbox wx:if="{{item.j}}" class="data-v-1172d71f" bindchange="{{item.h}}" u-i="{{item.i}}" bind:__l="__l" u-p="{{item.j}}"></up-checkbox><view class="operate_item data-v-1172d71f"><view class="operate_ data-v-1172d71f" bindtap="{{item.k}}">删除</view><view class="operate_ data-v-1172d71f" bindtap="{{item.l}}">修改</view></view></view></view></block><view wx:else class="not_order_warp data-v-1172d71f"><view class="not_order_warp_img data-v-1172d71f"><up-image wx:if="{{c}}" class="data-v-1172d71f" u-i="1172d71f-1" bind:__l="__l" u-p="{{c}}"></up-image></view><view class="not_order_msg_warp data-v-1172d71f">暂无地址,快去添加吧~</view></view><view class="add_but data-v-1172d71f" bindtap="{{d}}"> 新增地址 </view></view>
+43 -47
View File
@@ -2,6 +2,7 @@
const common_vendor = require("../../common/vendor.js");
const utils_enumUtils = require("../../utils/enumUtils.js");
const utils_enumCssUtils = require("../../utils/enumCssUtils.js");
const api_order = require("../../api/order.js");
const _sfc_main = {
computed: {
ORDER_TYPE() {
@@ -16,13 +17,7 @@ const _sfc_main = {
},
data() {
return {
type: 0,
// 选中的类型
orderTypeList: [
{
id: 0,
title: "全部"
},
{
id: utils_enumUtils.ORDER_TYPE.UNPAID,
title: "待支付"
@@ -36,13 +31,17 @@ const _sfc_main = {
title: "待收货"
},
{
id: utils_enumUtils.ORDER_TYPE.AFTER_SALE,
title: "退款售后"
id: utils_enumUtils.ORDER_TYPE.SUCCEED,
title: "待评价"
}
],
form: {
search: null
search: null,
//搜索
page: 1,
pageSize: 15,
type: 0
// 选中的类型
},
orderList: [
{
@@ -183,7 +182,8 @@ const _sfc_main = {
},
onLoad(options) {
const type = options.type;
this.type = type ? parseInt(type, 10) : 0;
this.form.type = type ? parseInt(type, 10) : utils_enumUtils.ORDER_TYPE.UNPAID;
this.getOrderList();
},
methods: {
getValue: utils_enumUtils.getValue,
@@ -196,13 +196,24 @@ const _sfc_main = {
common_vendor.index.__f__("log", "at pages/mine_order/mine_order.vue:297", "searchFun", val);
},
checkType(item) {
this.type = item.id;
this.form.type = item.id;
this.getOrderList();
},
jumpOrderInfo() {
common_vendor.index.navigateTo({
url: "/pages/mine_order_info/mine_order_info?type=" + this.type
});
},
async getOrderList() {
const params = {
...this.form
};
const resp = await api_order.getOrderList(params);
common_vendor.index.__f__("log", "at pages/mine_order/mine_order.vue:313", "resp", resp);
if (resp && resp.bizcode === 100) {
this.orderList = resp.data;
}
},
checkCancel(status) {
this.cancelShow = status;
if (!status) {
@@ -226,7 +237,7 @@ const _sfc_main = {
});
return;
}
common_vendor.index.__f__("log", "at pages/mine_order/mine_order.vue:330", "params", params);
common_vendor.index.__f__("log", "at pages/mine_order/mine_order.vue:342", "params", params);
this.checkCancel(false);
}
}
@@ -271,7 +282,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
e: common_vendor.f($data.orderTypeList, (item, k0, i0) => {
return {
a: common_vendor.t(item.title),
b: common_vendor.n($data.type === item.id ? "order_type_title_item order_type_title_item_sel" : "order_type_title_item"),
b: common_vendor.n($data.form.type === item.id ? "order_type_title_item order_type_title_item_sel" : "order_type_title_item"),
c: common_vendor.o(($event) => $options.checkType(item), item.id),
d: item.id
};
@@ -282,63 +293,48 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: "abc152e3-2-" + i0,
b: common_vendor.p({
src: item.url,
src: item.shopLogo,
width: "22",
height: "22",
bgColor: "#f1f6ff00"
}),
c: common_vendor.t(item.name),
d: item.status !== 1
}, item.status !== 1 ? {
c: common_vendor.t(item.shopName),
d: item.status !== $options.ORDER_TYPE.UNPAID
}, item.status !== $options.ORDER_TYPE.UNPAID ? {
e: common_vendor.t($options.getValue($options.ORDER_STATUS, item.status)),
f: $options.ORDER_STATUS_CSS[item.status]
} : {
g: common_vendor.t(item.paymentTime)
g: common_vendor.t(item.expireTime)
}, {
h: common_vendor.f(item.product, (pItem, k1, i1) => {
h: common_vendor.f(item.items, (pItem, k1, i1) => {
return {
a: "abc152e3-3-" + i0 + "-" + i1,
b: common_vendor.p({
src: pItem.url,
src: pItem.mainGraph,
width: "80",
height: "80",
bgColor: "#f1f6ff00"
}),
c: common_vendor.t(pItem.title),
d: common_vendor.t(pItem.tag.join(" ")),
e: common_vendor.f(pItem.description, (dItem, k2, i2) => {
return {
a: common_vendor.t(dItem)
};
}),
f: common_vendor.t(pItem.total),
g: common_vendor.t(pItem.quantity),
h: pItem.id
d: common_vendor.t(pItem.goodsSpece),
e: common_vendor.t(pItem.goodsAmount),
f: common_vendor.t(pItem.buyNum),
g: pItem.id
};
}),
i: item.status === $options.ORDER_TYPE.UNSHIPPED
i: common_vendor.t(item.buyNum),
j: common_vendor.t(item.sumAmount),
k: item.status === $options.ORDER_TYPE.UNSHIPPED
}, item.status === $options.ORDER_TYPE.UNSHIPPED ? {
j: common_vendor.o(($event) => $options.checkCancel(true), item.id)
l: common_vendor.o(($event) => $options.checkCancel(true), item.id)
} : {}, {
k: item.status === $options.ORDER_TYPE.UNPAID
m: item.status === $options.ORDER_TYPE.UNPAID
}, item.status === $options.ORDER_TYPE.UNPAID ? {
l: common_vendor.o((...args) => $options.jumpOrderInfo && $options.jumpOrderInfo(...args), item.id)
n: common_vendor.o((...args) => $options.jumpOrderInfo && $options.jumpOrderInfo(...args), item.id)
} : {}, {
m: item.status === $options.ORDER_TYPE.COMPLETED
}, item.status === $options.ORDER_TYPE.COMPLETED ? {} : {}, {
n: item.status === $options.ORDER_TYPE.NOT_RECEIVE
o: item.status === $options.ORDER_TYPE.NOT_RECEIVE
}, item.status === $options.ORDER_TYPE.NOT_RECEIVE ? {} : {}, {
o: item.status === $options.ORDER_TYPE.UNSHIPPED
}, item.status === $options.ORDER_TYPE.UNSHIPPED ? {} : {}, {
p: item.status === $options.ORDER_TYPE.COMPLETED
}, item.status === $options.ORDER_TYPE.COMPLETED ? {} : {}, {
q: item.status === $options.ORDER_TYPE.AFTER_SALE
}, item.status === $options.ORDER_TYPE.AFTER_SALE ? {} : {}, {
r: [$options.ORDER_TYPE.COMPLETED].includes(item.status)
}, [$options.ORDER_TYPE.COMPLETED].includes(item.status) ? {} : {}, {
s: [$options.ORDER_TYPE.COMPLETED, $options.ORDER_TYPE.CANCELED].includes(item.status)
}, [$options.ORDER_TYPE.COMPLETED, $options.ORDER_TYPE.CANCELED].includes(item.status) ? {} : {}, {
t: item.id
p: item.id
});
})
} : {
File diff suppressed because one or more lines are too long
+62 -5
View File
@@ -23,9 +23,13 @@ const _sfc_main = {
{
id: 5,
name: "HMC"
},
{
id: 6,
name: "抽奖"
}
],
selInfo: 1,
selInfo: 6,
orderList: [
{
id: 1,
@@ -72,7 +76,35 @@ const _sfc_main = {
amount: 1e3,
typeName: "收入到账"
}
],
// 其他列表
prizeDrawList: [
{
id: 1,
name: "20元优惠券",
time: "01-01 14:10:10",
isGet: false,
// 未领取
isShowGet: true
},
{
id: 2,
name: "20元优惠券",
time: "01-01 14:10:10",
isGet: true,
// 已领取
isShowGet: true
},
{
id: 3,
name: "20元优惠券",
time: "01-01 14:10:10",
isGet: false,
// 已领取
isShowGet: false
}
]
// 抽奖列表
};
},
methods: {
@@ -96,7 +128,7 @@ if (!Math) {
_easycom_up_image();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
return common_vendor.e({
a: common_vendor.o((...args) => $options.jumpBonus && $options.jumpBonus(...args)),
b: common_vendor.f($data.infoList, (item, k0, i0) => {
return common_vendor.e({
@@ -108,9 +140,34 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
e: common_vendor.o(($event) => $options.selectInfo(item), item.id)
});
}),
c: common_vendor.f($data.orderList, (item, k0, i0) => {
return {
c: $data.selInfo === 6
}, $data.selInfo === 6 ? {
d: common_vendor.f($data.prizeDrawList, (item, k0, i0) => {
return common_vendor.e({
a: "00f7ce42-0-" + i0,
b: common_vendor.t(item.name),
c: common_vendor.t(item.time),
d: item.isShowGet
}, item.isShowGet ? {
e: item.isGet
} : {}, {
f: item.isShowGet
}, item.isShowGet ? {
g: !item.isGet
} : {}, {
h: item.id
});
}),
e: common_vendor.p({
src: "/static/mine/purse_sf.png",
width: "40",
height: "40",
bgColor: "#f1f6ff00"
})
} : {
f: common_vendor.f($data.orderList, (item, k0, i0) => {
return {
a: "00f7ce42-1-" + i0,
b: common_vendor.p({
src: item.type === 1 ? "/static/mine/purse_sf.png" : "/static/mine/purse_xf.png",
width: "40",
@@ -125,7 +182,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
h: item.id
};
})
};
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-00f7ce42"]]);
wx.createPage(MiniProgramPage);
@@ -1 +1 @@
<view class="purse_warp data-v-00f7ce42"><view class="purse_collect data-v-00f7ce42"><view class="collect_item collect_item_but data-v-00f7ce42"><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">余额(元)</view><view class="collect_value data-v-00f7ce42">100.00</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42" bindtap="{{a}}"><view class="collect_title data-v-00f7ce42">奖金(元)</view><view class="collect_value data-v-00f7ce42">200.21</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">兑换券</view><view class="collect_value data-v-00f7ce42">10</view></view></view><view class="collect_item data-v-00f7ce42"><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">HM(锁仓)</view><view class="collect_value data-v-00f7ce42">100.00</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42"> HM(可交易)</view><view class="collect_value data-v-00f7ce42">200.21</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">HMC</view><view class="collect_value data-v-00f7ce42">10</view></view></view></view><view class="info_warp data-v-00f7ce42"><view class="info_title_warp data-v-00f7ce42"><view wx:for="{{b}}" wx:for-item="item" wx:key="d" class="{{['data-v-00f7ce42', item.c]}}" bindtap="{{item.e}}"><text class="data-v-00f7ce42">{{item.a}}</text><view wx:if="{{item.b}}" class="info_title_item_sel_but_warp data-v-00f7ce42"></view></view></view><view class="info_list_warp data-v-00f7ce42"><view wx:for="{{c}}" wx:for-item="item" wx:key="h" class="purse_info_item data-v-00f7ce42"><view class="purse_info_left data-v-00f7ce42"><up-image wx:if="{{item.b}}" class="data-v-00f7ce42" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view class="purse_data_warp data-v-00f7ce42"><view class="purse_info_name data-v-00f7ce42">{{item.c}}</view><view class="purse_info_value data-v-00f7ce42">{{item.d}}</view></view></view><view class="ipurse_nfo_right data-v-00f7ce42"><view class="purse_info_title data-v-00f7ce42">{{item.e}} {{item.f}}</view><view class="purse_info_value data-v-00f7ce42">{{item.g}}</view></view></view></view></view></view>
<view class="purse_warp data-v-00f7ce42"><view class="purse_collect data-v-00f7ce42"><view class="collect_item collect_item_but data-v-00f7ce42"><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">余额(元)</view><view class="collect_value data-v-00f7ce42">100.00</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42" bindtap="{{a}}"><view class="collect_title data-v-00f7ce42">奖金(元)</view><view class="collect_value data-v-00f7ce42">200.21</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">兑换券</view><view class="collect_value data-v-00f7ce42">10</view></view></view><view class="collect_item data-v-00f7ce42"><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">HM(锁仓)</view><view class="collect_value data-v-00f7ce42">100.00</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42"> HM(可交易)</view><view class="collect_value data-v-00f7ce42">200.21</view></view><view class="item_right_warp data-v-00f7ce42"></view><view class="item_warp data-v-00f7ce42"><view class="collect_title data-v-00f7ce42">HMC</view><view class="collect_value data-v-00f7ce42">10</view></view></view></view><view class="info_warp data-v-00f7ce42"><view class="info_title_warp data-v-00f7ce42"><view wx:for="{{b}}" wx:for-item="item" wx:key="d" class="{{['data-v-00f7ce42', item.c]}}" bindtap="{{item.e}}"><text class="data-v-00f7ce42">{{item.a}}</text><view wx:if="{{item.b}}" class="info_title_item_sel_but_warp data-v-00f7ce42"></view></view></view><view wx:if="{{c}}" class="prize_draw_warp data-v-00f7ce42"><view wx:for="{{d}}" wx:for-item="item" wx:key="h" class="prize_draw_item data-v-00f7ce42"><view class="prize_draw_left_warp data-v-00f7ce42"><up-image wx:if="{{e}}" class="data-v-00f7ce42" u-i="{{item.a}}" bind:__l="__l" u-p="{{e}}"></up-image><view class="data-v-00f7ce42" style="margin-left:20rpx"><view class="title_ data-v-00f7ce42">{{item.b}}</view><view class="time_ data-v-00f7ce42">{{item.c}}</view></view></view><view wx:if="{{item.d}}" class="prize_draw_right_warp data-v-00f7ce42" hidden="{{!item.e}}">去领取</view><view wx:if="{{item.f}}" class="prize_draw_right_warp yes_ data-v-00f7ce42" hidden="{{!item.g}}">已领取</view></view></view><view wx:else class="info_list_warp data-v-00f7ce42"><view wx:for="{{f}}" wx:for-item="item" wx:key="h" class="purse_info_item data-v-00f7ce42"><view class="purse_info_left data-v-00f7ce42"><up-image wx:if="{{item.b}}" class="data-v-00f7ce42" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view class="purse_data_warp data-v-00f7ce42"><view class="purse_info_name data-v-00f7ce42">{{item.c}}</view><view class="purse_info_value data-v-00f7ce42">{{item.d}}</view></view></view><view class="ipurse_nfo_right data-v-00f7ce42"><view class="purse_info_title data-v-00f7ce42">{{item.e}} {{item.f}}</view><view class="purse_info_value data-v-00f7ce42">{{item.g}}</view></view></view></view></view></view>
@@ -61,6 +61,39 @@
.info_warp.data-v-00f7ce42 {
margin-top: 30rpx;
}
.info_warp .prize_draw_warp .prize_draw_item.data-v-00f7ce42 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 0;
border-bottom: 1rpx solid #EEEEEE;
}
.info_warp .prize_draw_warp .prize_draw_left_warp.data-v-00f7ce42 {
display: flex;
align-items: center;
}
.info_warp .prize_draw_warp .title_.data-v-00f7ce42 {
font-weight: bold;
font-size: 28rpx;
color: #333333;
}
.info_warp .prize_draw_warp .time_.data-v-00f7ce42 {
font-size: 24rpx;
color: #666666;
margin-top: 10rpx;
}
.info_warp .prize_draw_warp .prize_draw_right_warp.data-v-00f7ce42 {
background: #FF7C41;
border-radius: 10rpx;
text-align: center;
color: #FFFFFF;
padding: 10rpx 28rpx;
height: 48rpx;
}
.info_warp .prize_draw_warp .yes_.data-v-00f7ce42 {
background: #F5F5F5;
color: #666666;
}
.info_warp .info_title_warp.data-v-00f7ce42 {
display: flex;
padding-left: 10rpx;
@@ -2,6 +2,7 @@
const common_vendor = require("../../common/vendor.js");
const utils_enumUtils = require("../../utils/enumUtils.js");
const api_cart = require("../../api/cart.js");
const api_payment = require("../../api/payment.js");
const utils_index = require("../../utils/index.js");
const Address = () => "../../components/address.js";
const _sfc_main = {
@@ -96,7 +97,6 @@ const _sfc_main = {
}
data.shops = shops;
data.paymentMethod = null;
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:245", "data", data);
this.orderInfo = data;
}
},
@@ -126,26 +126,148 @@ const _sfc_main = {
// 获取备注
getRemark() {
const orderInfo = this.orderInfo;
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:277", "orderInfo", orderInfo);
const remarkArr = [];
if (orderInfo && Object.keys(orderInfo).length !== 0)
;
if (orderInfo && Object.keys(orderInfo).length !== 0) {
const remarObj = {};
if (orderInfo.shops && orderInfo.shops.length !== 0) {
orderInfo.shops.map((sItem) => {
if (sItem.addrTimes && sItem.addrTimes.length !== 0) {
sItem.addrTimes.map((addItem) => {
if (addItem.remark) {
remarObj.gkey = addItem.groupKey;
remarObj.rmk = addItem.remark;
}
});
}
});
}
remarkArr.push(remarObj);
}
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:295", "remarkArr", remarkArr);
return remarkArr;
},
/**
* 去支付
*/
goPay() {
async goPay() {
const orderInfo = this.orderInfo;
const way = orderInfo.paymentMethod;
if (!way || way === 0) {
this.$refs.uToastRef.show({
type: "error",
message: "请先选择支付方式"
});
return;
}
const params = {
addrId: this.orderInfo.address.id,
addrId: orderInfo.address.id,
// 收货地址ID
cartIds: this.ids,
//结算的购物车ID,多个以逗号分割,ALL表示全选
payway: 0,
payway: way,
// 支付方式:1-微信,2-支付宝
remark: null
remark: JSON.stringify(this.getRemark())
//备注信息'[{"sid":"店铺ID","rmk":"备注内容"},{"sid":"店铺ID","rmk":"备注内容"}]'
};
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:294", "params", params);
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:317", "params", params);
const resp = await api_cart.settle(params);
if (resp && resp.bizcode === 100) {
const item = resp.data;
if (params.payway === utils_enumUtils.PAYMENT_WAY.WECHAT) {
if (item.wechat && Object.keys(item.wechat).length !== 0) {
this.appWxpay(item.wechat);
} else {
this.$refs.uToastRef.show({
type: "error",
message: "订单支付失败"
});
}
} else if (params.payway === utils_enumUtils.PAYMENT_WAY.ALIPAY) {
if (item.alipay && Object.keys(item.alipay).length !== 0) {
this.zfbPay(item.alipay);
} else {
this.$refs.uToastRef.show({
type: "error",
message: "订单支付失败"
});
}
}
}
},
// app 微信支付
appWxpay(item) {
const newThis = this;
const orderInfo = {
"appid": item.appId,
// 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
"noncestr": item.nonceStr,
// 随机字符串
"package": "Sign=WXPay",
// 固定值
"partnerid": item.partnerId,
// 微信支付商户号
"prepayid": item.prepayId,
// 统一下单订单号
"timestamp": item.timeStamp,
// 时间戳(单位:秒)
"sign": item.sign
// 签名,这里用的 MD5/RSA 签名
};
common_vendor.index.requestPayment({
provider: "wxpay",
orderInfo,
success: function(res) {
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:359", "success:" + res);
newThis.payFeedbackFun(item.orderId, res.orderNum, 1);
newThis.jumpWayOk();
},
fail: function(err) {
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:364", "fail:", err);
this.$refs.uToastRef.show({
type: "error",
message: "支付失败"
});
}
});
},
// 支付宝支付
zfbPay(item) {
const that = this;
common_vendor.index.requestPayment({
provider: "alipay",
orderInfo: item.orderStr,
success(res) {
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:379", "res", res);
that.payFeedbackFun(item.orderId, item.orderNum, 1);
that.jumpWayOk();
},
//调用失败的回调
fail(err) {
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:385", "fail:", err);
this.$refs.uToastRef.show({
type: "error",
message: "支付失败"
});
}
});
},
// 跳转到支付成功页面
jumpWayOk() {
common_vendor.index.navigateTo({
url: "/pages/order_submit_ok/order_submit_ok"
});
},
// 支付结果回调
async payFeedbackFun(orderId, orderNum, status) {
const params = {
orderId,
orderNum,
status
};
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:406", "params", params);
const response = await api_payment.feedback(params);
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:408", "反馈结果", response);
},
// 地址选中
getAddressValueFunc(item) {
@@ -153,6 +275,7 @@ const _sfc_main = {
addressObj.addressStr = utils_index.assembleAddress(addressObj).names;
this.selectAddress = addressObj;
},
// 地址选中OK
addressOk() {
const type = this.addressType;
const addressIndex = this.addressIndex;
+46 -99
View File
@@ -1,100 +1,20 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_product = require("../../api/product.js");
const utils_enumUtils = require("../../utils/enumUtils.js");
const _sfc_main = {
data() {
return {
swiperList: [
"/static/home/banner03.png"
],
productList: [
{
id: 1,
name: "Michael Kors I Jodie 老花狗牙托特包手提单肩包-小号...",
url: "/static/common/product_def.png",
zqPrice: 42.84,
// 专区价格
price: 424.84,
// 到手价格
oPrice: 466.84,
// 原价价格
type: 1
// 1:爆款区的 0:普通区
},
{
id: 2,
name: "Michael Kors I Jodie 老花狗牙托特包手提单肩包-小号...",
url: "/static/common/product_def.png",
zqPrice: 42.84,
// 专区价格
price: 424.84,
// 到手价格
oPrice: 466.84,
// 原价价格
type: 0
},
{
id: 3,
name: "Michael Kors I Jodie 老花狗牙托特包手提单肩包-小号...",
url: "/static/common/product_def.png",
zqPrice: 42.84,
// 专区价格
price: 424.84,
// 到手价格
oPrice: 466.84,
// 原价价格
type: 0
},
{
id: 4,
name: "Michael Kors I Jodie 老花狗牙托特包手提单肩包-小号...",
url: "/static/common/product_def.png",
zqPrice: 42.84,
// 专区价格
price: 424.84,
// 到手价格
oPrice: 466.84,
// 原价价格
type: 1
},
{
id: 5,
name: "Michael Kors I Jodie 老花狗牙托特包手提单肩包-小号...",
url: "/static/common/product_def.png",
zqPrice: 42.84,
// 专区价格
price: 424.84,
// 到手价格
oPrice: 466.84,
// 原价价格
type: 0
},
{
id: 6,
name: "Michael Kors I Jodie 老花狗牙托特包手提单肩包-小号...",
url: "/static/common/product_def.png",
zqPrice: 42.84,
// 专区价格
price: 424.84,
// 到手价格
oPrice: 466.84,
// 原价价格
type: 0
},
{
id: 7,
name: "Michael Kors I Jodie 老花狗牙托特包手提单肩包-小号...",
url: "/static/common/product_def.png",
zqPrice: 42.84,
// 专区价格
price: 424.84,
// 到手价格
oPrice: 466.84,
// 原价价格
type: 0
}
]
productList: [],
productListLoading: false
};
},
onLoad() {
this.getSearchList();
},
methods: {
jumpHome() {
common_vendor.index.switchTab({
@@ -106,18 +26,42 @@ const _sfc_main = {
common_vendor.index.navigateTo({
url: "/pages/invite_friends/invite_friends"
});
},
async getSearchList() {
this.productListLoading = true;
const params = {
type: utils_enumUtils.SEARCH_TYPE.SOMETHING,
page: 1,
pageSize: 99
};
const resp = await api_product.searchList(params);
if (resp && resp.bizcode === 100) {
this.productList = resp.data;
}
this.productListLoading = false;
},
/**
* 跳转到商品详情
* @param {Object} item
*/
jumpInfo(item) {
common_vendor.index.navigateTo({
url: "/pages/productInfo/productInfo?id=" + item.id
});
}
}
};
if (!Array) {
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
const _easycom_up_swiper2 = common_vendor.resolveComponent("up-swiper");
(_easycom_up_image2 + _easycom_up_swiper2)();
const _easycom_up_loading_page2 = common_vendor.resolveComponent("up-loading-page");
(_easycom_up_image2 + _easycom_up_swiper2 + _easycom_up_loading_page2)();
}
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
const _easycom_up_swiper = () => "../../uni_modules/uview-plus/components/u-swiper/u-swiper.js";
const _easycom_up_loading_page = () => "../../uni_modules/uview-plus/components/u-loading-page/u-loading-page.js";
if (!Math) {
(_easycom_up_image + _easycom_up_swiper)();
(_easycom_up_image + _easycom_up_swiper + _easycom_up_loading_page)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
@@ -145,22 +89,25 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
height: "20",
bgColor: "#f1f6ff00"
}),
g: common_vendor.f($data.productList, (item, k0, i0) => {
return common_vendor.e({
a: "7539d408-4-" + i0,
g: common_vendor.p({
loading: $data.productListLoading
}),
h: common_vendor.f($data.productList, (item, index, i0) => {
return {
a: "7539d408-5-" + i0,
b: common_vendor.p({
src: item.url,
width: "100",
height: "100",
bgColor: "#f1f6ff00"
}),
c: item.type === 1
}, item.type === 1 ? {} : {}, {
d: common_vendor.t(item.name),
e: common_vendor.t(item.oPrice),
f: common_vendor.t(item.zqPrice),
g: common_vendor.t(item.price)
});
c: common_vendor.t(item.title),
d: common_vendor.t(item.adPrice),
e: common_vendor.t(item.adPrice - item.price),
f: common_vendor.t(item.price),
g: index,
h: common_vendor.o(($event) => $options.jumpInfo(item), index)
};
})
};
}
@@ -2,6 +2,7 @@
"navigationStyle": "custom",
"usingComponents": {
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image",
"up-swiper": "../../uni_modules/uview-plus/components/u-swiper/u-swiper"
"up-swiper": "../../uni_modules/uview-plus/components/u-swiper/u-swiper",
"up-loading-page": "../../uni_modules/uview-plus/components/u-loading-page/u-loading-page"
}
}
@@ -1 +1 @@
<view class="preference_warp data-v-7539d408"><view class="header_comm data-v-7539d408"><up-image wx:if="{{b}}" class="data-v-7539d408" bindclick="{{a}}" u-i="7539d408-0" bind:__l="__l" u-p="{{b}}"></up-image><view class="data-v-7539d408">好物优选专区</view><up-image wx:if="{{d}}" class="data-v-7539d408" bindclick="{{c}}" u-i="7539d408-1" bind:__l="__l" u-p="{{d}}"></up-image></view><view class="preference_content_warp data-v-7539d408"><up-swiper wx:if="{{e}}" class="data-v-7539d408" u-i="7539d408-2" bind:__l="__l" u-p="{{e}}"></up-swiper><view class="preference_title data-v-7539d408"><up-image wx:if="{{f}}" class="data-v-7539d408" u-i="7539d408-3" bind:__l="__l" u-p="{{f}}"></up-image><view class="msg data-v-7539d408">好物优选</view></view><view class="preference_product data-v-7539d408"><view wx:for="{{g}}" wx:for-item="item" class="product_item data-v-7539d408"><view class="product_item_left data-v-7539d408"><up-image wx:if="{{item.b}}" class="data-v-7539d408" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view wx:if="{{item.c}}" class="product_item_left_bz product_item_left_bz_img data-v-7539d408"><view class="data-v-7539d408">爆款专区</view></view></view><view class="product_item_right data-v-7539d408"><view class="title_warp data-v-7539d408">{{item.d}}</view><view class="price_warp data-v-7539d408"><view class="price_o_warp data-v-7539d408"><view class="price_o_title_warp data-v-7539d408">原价</view><view class="price_o_value_warp data-v-7539d408"><text class="data-v-7539d408">¥</text><text class="data-v-7539d408">{{item.e}}</text></view></view><view class="price_zq_warp data-v-7539d408"><view class="price_lj_warp data-v-7539d408">专区立省{{item.f}}元</view><view class="price_ds_warp data-v-7539d408">到手¥<text class="data-v-7539d408" style="font-size:31rpx">{{item.g}}</text></view></view></view></view></view></view></view></view>
<view class="preference_warp data-v-7539d408"><view class="header_comm data-v-7539d408"><up-image wx:if="{{b}}" class="data-v-7539d408" bindclick="{{a}}" u-i="7539d408-0" bind:__l="__l" u-p="{{b}}"></up-image><view class="data-v-7539d408">好物优选专区</view><up-image wx:if="{{d}}" class="data-v-7539d408" bindclick="{{c}}" u-i="7539d408-1" bind:__l="__l" u-p="{{d}}"></up-image></view><view class="preference_content_warp data-v-7539d408"><up-swiper wx:if="{{e}}" class="data-v-7539d408" u-i="7539d408-2" bind:__l="__l" u-p="{{e}}"></up-swiper><view class="preference_title data-v-7539d408"><up-image wx:if="{{f}}" class="data-v-7539d408" u-i="7539d408-3" bind:__l="__l" u-p="{{f}}"></up-image><view class="msg data-v-7539d408">好物优选</view></view><view class="preference_product data-v-7539d408"><up-loading-page wx:if="{{g}}" class="data-v-7539d408" u-i="7539d408-4" bind:__l="__l" u-p="{{g}}"></up-loading-page><view wx:for="{{h}}" wx:for-item="item" wx:key="g" class="product_item data-v-7539d408" bindtap="{{item.h}}"><view class="product_item_left data-v-7539d408"><up-image wx:if="{{item.b}}" class="data-v-7539d408" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view class="product_item_left_bz product_item_left_bz_img data-v-7539d408"><view class="data-v-7539d408">爆款专区</view></view></view><view class="product_item_right data-v-7539d408"><view class="title_warp data-v-7539d408">{{item.c}}</view><view class="price_warp data-v-7539d408"><view class="price_o_warp data-v-7539d408"><view class="price_o_title_warp data-v-7539d408">原价</view><view class="price_o_value_warp data-v-7539d408"><text class="data-v-7539d408">¥</text><text class="data-v-7539d408">{{item.d}}</text></view></view><view class="price_zq_warp data-v-7539d408"><view class="price_lj_warp data-v-7539d408">专区立省{{item.e}}元</view><view class="price_ds_warp data-v-7539d408">到手¥<text class="data-v-7539d408" style="font-size:31rpx">{{item.f}}</text></view></view></view></view></view></view></view></view>
+58 -65
View File
@@ -16,20 +16,7 @@ const _sfc_main = {
specificationShow: false,
specificationShowType: "",
// 弹框类型
orderInfo: {
id: 1,
url: "/static/common/product_def.png",
price: 87,
oPrice: 199,
couponPrice: 50,
inventory: 100,
// 库存
quantity: 1,
addressObj: {
name: "李个",
address: "郑州市金水区东风路街道白庙小区五号楼"
}
},
orderInfo: {},
specificationList: [],
//规格
selectSpecification: [],
@@ -55,16 +42,21 @@ const _sfc_main = {
// 返回的页面数,默认为1,返回到上一级
});
},
jumpHome() {
common_vendor.index.switchTab({
url: "/pages/home/home"
});
},
// 分享
jumpShare() {
common_vendor.index.navigateTo({
url: "/pages/invite_friends/invite_friends"
});
jumpOther(type) {
if (type === "home") {
common_vendor.index.switchTab({
// 首页
url: "/pages/home/home"
});
} else if (type === "share") {
common_vendor.index.navigateTo({
url: "/pages/invite_friends/invite_friends"
});
} else if (type === "cart") {
common_vendor.index.switchTab({
url: "/pages/shopping_cart/shopping_cart"
});
}
},
/**
* 查询详细内容
@@ -83,12 +75,13 @@ const _sfc_main = {
data.quantity = 1;
data.inventory = 0;
this.orderInfo = data;
this.getSpecification(data.specs);
}
},
checkSpecification(val, type) {
async checkSpecification(val, type) {
if (val) {
this.querySpecification();
await this.querySpecification();
const data = this.orderInfo;
this.getSpecification(data.specs);
} else {
this.specificationList = [];
this.selectSpecification = [];
@@ -99,12 +92,10 @@ const _sfc_main = {
},
// 拆解规格
getSpecification(specs) {
common_vendor.index.__f__("log", "at pages/productInfo/productInfo.vue:296", "specs", specs);
const optionArr = [];
if (specs) {
const arr = JSON.parse(specs);
arr.map((item) => {
common_vendor.index.__f__("log", "at pages/productInfo/productInfo.vue:301", "item", item);
optionArr.push({
type: item.type,
items: item.items,
@@ -173,18 +164,14 @@ const _sfc_main = {
}
this.orderInfo.quantity = currentQuantity;
},
/**
* 立即购买,确定订单页面
*/
// 立即购买,确定订单页面
byFun() {
this.addCart();
common_vendor.index.navigateTo({
url: "/pages/order_submit/order_submit"
});
},
/**
* 加入购入车
*/
// 加入购入车
async addCart() {
const selectTempl = this.selectSpecificationTempl;
if (!selectTempl || Object.keys(selectTempl).length === 0) {
@@ -247,7 +234,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
height: "30",
bgColor: "#f1f6ff00"
}),
f: common_vendor.o($options.jumpShare),
f: common_vendor.o(_ctx.jumpShare),
g: common_vendor.p({
src: "/static/common/share_st.png",
width: "30",
@@ -291,46 +278,53 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
bgColor: "#f1f6ff00"
}),
v: $data.orderInfo.detailInfo,
w: common_vendor.o($options.jumpHome),
w: common_vendor.o(($event) => $options.jumpOther("home")),
x: common_vendor.p({
src: "/static/product/home.png",
width: "20",
height: "20",
bgColor: "#f1f6ff00"
}),
y: common_vendor.o($options.jumpShare),
y: common_vendor.o(($event) => $options.jumpOther("share")),
z: common_vendor.p({
src: "/static/product/kefu.png",
width: "20",
height: "20",
bgColor: "#f1f6ff00"
}),
A: common_vendor.o(($event) => $options.checkSpecification(true, "addCart")),
B: common_vendor.o(($event) => $options.checkSpecification(true, "buy")),
C: common_vendor.p({
A: common_vendor.o(($event) => $options.jumpOther("cart")),
B: common_vendor.p({
src: "/static/product/cart.png",
width: "24",
height: "20",
bgColor: "#f1f6ff00"
}),
C: common_vendor.o(($event) => $options.checkSpecification(true, "addCart")),
D: common_vendor.o(($event) => $options.checkSpecification(true, "buy")),
E: common_vendor.p({
src: $data.orderInfo.mainGraph,
width: "100",
height: "100",
bgColor: "#f1f6ff00"
}),
D: $data.selectSpecificationTempl && Object.keys($data.selectSpecificationTempl).length !== 0
F: $data.selectSpecificationTempl && Object.keys($data.selectSpecificationTempl).length !== 0
}, $data.selectSpecificationTempl && Object.keys($data.selectSpecificationTempl).length !== 0 ? {
E: common_vendor.t($data.selectSpecificationTempl.price)
G: common_vendor.t($data.selectSpecificationTempl.price)
} : {
F: common_vendor.t($data.orderInfo.minPrice),
G: common_vendor.t($data.orderInfo.maxPrice)
H: common_vendor.t($data.orderInfo.minPrice),
I: common_vendor.t($data.orderInfo.maxPrice)
}, {
H: $data.orderInfo.couponPrice && $data.orderInfo.couponPrice !== 0
J: $data.orderInfo.couponPrice && $data.orderInfo.couponPrice !== 0
}, $data.orderInfo.couponPrice && $data.orderInfo.couponPrice !== 0 ? {
I: common_vendor.t($data.orderInfo.couponPrice)
K: common_vendor.t($data.orderInfo.couponPrice)
} : {}, {
J: common_vendor.t($data.orderInfo.adPrice),
K: $data.orderInfo.couponPrice && $data.orderInfo.couponPrice !== 0
L: common_vendor.t($data.orderInfo.adPrice),
M: $data.orderInfo.couponPrice && $data.orderInfo.couponPrice !== 0
}, $data.orderInfo.couponPrice && $data.orderInfo.couponPrice !== 0 ? {
L: common_vendor.t($data.orderInfo.couponPrice)
N: common_vendor.t($data.orderInfo.couponPrice)
} : {}, {
M: common_vendor.t($data.orderInfo.inventory || 0),
N: common_vendor.f($data.specificationList, (item, index, i0) => {
O: common_vendor.t($data.orderInfo.inventory || 0),
P: common_vendor.f($data.specificationList, (item, index, i0) => {
return {
a: common_vendor.t(item.type),
b: common_vendor.f(item.items, (oItem, oIndex, i1) => {
@@ -344,26 +338,25 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
c: item.id
};
}),
O: common_vendor.o(($event) => $options.quantityFun("minus")),
P: common_vendor.t($data.orderInfo.quantity),
Q: common_vendor.o(($event) => $options.quantityFun("add")),
R: $data.specificationShowType === "buy"
Q: common_vendor.o(($event) => $options.quantityFun("minus")),
R: common_vendor.t($data.orderInfo.quantity),
S: common_vendor.o(($event) => $options.quantityFun("add")),
T: $data.specificationShowType === "buy"
}, $data.specificationShowType === "buy" ? {
S: common_vendor.o((...args) => $options.byFun && $options.byFun(...args))
U: common_vendor.o((...args) => $options.byFun && $options.byFun(...args))
} : $data.specificationShowType === "addCart" ? {
U: common_vendor.o((...args) => $options.addCart && $options.addCart(...args))
W: common_vendor.o((...args) => $options.addCart && $options.addCart(...args))
} : {
V: common_vendor.o((...args) => $options.addCart && $options.addCart(...args)),
W: common_vendor.o((...args) => $options.byFun && $options.byFun(...args))
X: common_vendor.o((...args) => $options.addCart && $options.addCart(...args)),
Y: common_vendor.o((...args) => $options.byFun && $options.byFun(...args))
}, {
T: $data.specificationShowType === "addCart",
X: common_vendor.o(($event) => $data.specificationShow = $event),
Y: common_vendor.p({
V: $data.specificationShowType === "addCart",
Z: common_vendor.p({
show: $data.specificationShow,
round: 10,
closeOnClickOverlay: false,
closeable: true,
mode: "bottom",
show: $data.specificationShow
mode: "bottom"
})
});
}
File diff suppressed because one or more lines are too long
@@ -145,7 +145,7 @@
.product_but_warp .product_but_left.data-v-ceb0d096 {
display: flex;
justify-content: space-between;
width: 30%;
width: 36%;
}
.product_but_warp .product_but_left .left_item.data-v-ceb0d096 {
width: 50%;
+80 -60
View File
@@ -1,11 +1,15 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const utils_enumUtils = require("../../utils/enumUtils.js");
const api_common = require("../../api/common.js");
const api_auth = require("../../api/auth.js");
const utils_auth = require("../../utils/auth.js");
const _sfc_main = {
data() {
return {
form: {
mobile: null,
code: null,
smsCode: null,
// 验证码
loginPassword: null,
loginPassword2: null,
@@ -27,51 +31,49 @@ const _sfc_main = {
loginPassword2IsShow: false,
transactionCodeIsShow: false,
// 交易密码
isPolicy: false
isPolicy: false,
butLoading: false
};
},
methods: {
registerFun() {
const params = {
...this.form
};
common_vendor.index.__f__("log", "at pages/register/register.vue:139", "params", params);
if (!params.mobile) {
async registerFun() {
const form = this.form;
if (!form.mobile) {
this.$refs.uToastRef.show({
type: "error",
message: "请输入手机号"
});
return;
}
if (!params.code) {
if (!form.smsCode) {
this.$refs.uToastRef.show({
type: "error",
message: "请输入验证码"
});
return;
}
if (!params.loginPassword) {
if (!form.loginPassword) {
this.$refs.uToastRef.show({
type: "error",
message: "请输入登录密码"
});
return;
}
if (!params.loginPassword2) {
if (!form.loginPassword2) {
this.$refs.uToastRef.show({
type: "error",
message: "请输入二次确认密码"
});
return;
}
if (params.loginPassword !== params.loginPassword2) {
if (form.loginPassword !== form.loginPassword2) {
this.$refs.uToastRef.show({
type: "error",
message: "两次输入的登录密码不一致"
});
return;
}
if (!params.referralCode) {
if (!form.referralCode) {
this.$refs.uToastRef.show({
type: "error",
message: "请输入推荐码"
@@ -85,19 +87,66 @@ const _sfc_main = {
});
return;
}
common_vendor.index.__f__("log", "at pages/register/register.vue:189", "params", params);
common_vendor.index.switchTab({
url: "/pages/home/home"
});
this.butLoading = true;
const params = {
mobile: form.mobile,
smsCode: form.smsCode,
password: form.loginPassword,
inviteCode: form.referralCode
};
const resp = await api_auth.register(params);
if (resp && resp.bizcode === 100) {
const data = resp.data;
utils_auth.setStorageFun(utils_auth.TOKEN_NAME, data.token);
utils_auth.setStorageFun(utils_auth.USER_KEY, "");
const userInfo = {
avatar: data.avatarUrl,
name: data.name,
userId: data.userId,
grade: data.grade,
inviteCode: data.inviteCode
};
utils_auth.setStorageFun(utils_auth.USER_DATA, userInfo);
let currentTimeStamp = (/* @__PURE__ */ new Date()).getTime();
utils_auth.setStorageFun(utils_auth.USER_LOGIN_TIME, currentTimeStamp);
this.$refs.uToastRef.show({
type: "success",
message: resp.msg
});
setTimeout(() => {
common_vendor.index.switchTab({
url: "/pages/home/home"
});
}, 2e3);
}
this.butLoading = false;
},
/**
* 获取手机验证码
*/
getMobileCode() {
async getMobileCode() {
const form = this.form;
if (!form.mobile) {
this.$refs.uToastRef.show({
type: "error",
message: "请输入手机号码"
});
return;
}
this.countdown = true;
},
getCode(val) {
this.countdown = false;
const params = {
mobile: form.mobile,
type: utils_enumUtils.SMS_TYPE.REGISTER
};
const response = await api_common.getUserList(params);
if (response && response.bizcode === 100) {
this.$refs.uToastRef.show({
type: "success",
message: response.msg
});
} else {
this.countdown = false;
}
}
}
};
@@ -128,7 +177,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
}),
c: $data.countdown
}, $data.countdown ? {
d: common_vendor.o(($event) => $options.getCode(false)),
d: common_vendor.o(($event) => $data.countdown = false),
e: common_vendor.p({
time: 60 * 1e3,
format: "ss"
@@ -136,12 +185,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
} : {
f: common_vendor.o((...args) => $options.getMobileCode && $options.getMobileCode(...args))
}, {
g: common_vendor.o(($event) => $data.form.code = $event),
g: common_vendor.o(($event) => $data.form.smsCode = $event),
h: common_vendor.p({
placeholder: "请输入验证码",
border: "surround",
customStyle: $data.inputCss,
modelValue: $data.form.code
modelValue: $data.form.smsCode
}),
i: $data.loginPasswordIsShow
}, $data.loginPasswordIsShow ? {
@@ -203,46 +252,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
type: $data.loginPassword2IsShow ? "text" : "password",
modelValue: $data.form.loginPassword2
}),
x: $data.transactionCodeIsShow
}, $data.transactionCodeIsShow ? {
y: common_vendor.o(($event) => {
$data.transactionCodeIsShow = false;
}),
z: common_vendor.p({
src: "/static/login/show.png",
width: "20",
height: "20",
bgColor: "#f1f6ff00"
})
} : {
A: common_vendor.o(($event) => {
$data.transactionCodeIsShow = true;
}),
B: common_vendor.p({
src: "/static/login/hidden.png",
width: "20",
height: "20",
bgColor: "#f1f6ff00"
})
}, {
C: common_vendor.o(($event) => $data.form.transactionCode = $event),
D: common_vendor.p({
placeholder: "请输入交易密码",
border: "surround",
customStyle: $data.inputCss,
type: $data.transactionCodeIsShow ? "text" : "password",
modelValue: $data.form.transactionCode
}),
E: common_vendor.o(($event) => $data.form.referralCode = $event),
F: common_vendor.p({
x: common_vendor.o(($event) => $data.form.referralCode = $event),
y: common_vendor.p({
placeholder: "推荐码",
border: "surround",
customStyle: $data.inputCss,
modelValue: $data.form.referralCode
}),
G: common_vendor.o((...args) => $options.registerFun && $options.registerFun(...args)),
H: common_vendor.o(($event) => $data.isPolicy = $event),
I: common_vendor.p({
z: common_vendor.o((...args) => $options.registerFun && $options.registerFun(...args)),
A: $data.butLoading,
B: common_vendor.o(($event) => $data.isPolicy = $event),
C: common_vendor.p({
name: "isCheck",
usedAlone: true,
shape: "circle",
@@ -251,7 +271,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
iconSize: "18",
checked: $data.isPolicy
}),
J: common_vendor.sr("uToastRef", "60fa605e-14")
D: common_vendor.sr("uToastRef", "6cfc9b6b-11")
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
+1 -1
View File
@@ -1 +1 @@
<view class="register_warp"><view class="register_title_warp">注册</view><view class="register_ifo_warp"><view class="register_info_item"><up-input wx:if="{{b}}" u-i="60fa605e-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}"></up-input></view><view class="register_info_item"><up-input wx:if="{{h}}" u-s="{{['suffix']}}" u-i="60fa605e-1" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"><view slot="suffix" style="margin-right:10rpx"><view wx:if="{{c}}" class="code-warp"><up-count-down wx:if="{{e}}" bindfinish="{{d}}" u-i="60fa605e-2,60fa605e-1" bind:__l="__l" u-p="{{e}}"></up-count-down><text style="margin-left:10rpx">s</text></view><view wx:else bindtap="{{f}}" class="code_msg"> 获取验证码 </view></view></up-input></view><view class="register_info_item"><up-input wx:if="{{o}}" u-s="{{['suffix']}}" u-i="60fa605e-3" bind:__l="__l" bindupdateModelValue="{{n}}" u-p="{{o}}"><view slot="suffix" style="margin-right:10rpx"><up-image wx:if="{{i}}" bindclick="{{j}}" u-i="60fa605e-4,60fa605e-3" bind:__l="__l" u-p="{{k}}"></up-image><up-image wx:else bindclick="{{l}}" u-i="60fa605e-5,60fa605e-3" bind:__l="__l" u-p="{{m||''}}"></up-image></view></up-input></view><view class="register_info_item"><up-input wx:if="{{w}}" u-s="{{['suffix']}}" u-i="60fa605e-6" bind:__l="__l" bindupdateModelValue="{{v}}" u-p="{{w}}"><view slot="suffix" style="margin-right:10rpx"><up-image wx:if="{{p}}" bindclick="{{q}}" u-i="60fa605e-7,60fa605e-6" bind:__l="__l" u-p="{{r}}"></up-image><up-image wx:else bindclick="{{s}}" u-i="60fa605e-8,60fa605e-6" bind:__l="__l" u-p="{{t||''}}"></up-image></view></up-input></view><view class="register_info_item"><up-input wx:if="{{D}}" u-s="{{['suffix']}}" u-i="60fa605e-9" bind:__l="__l" bindupdateModelValue="{{C}}" u-p="{{D}}"><view slot="suffix" style="margin-right:10rpx"><up-image wx:if="{{x}}" bindclick="{{y}}" u-i="60fa605e-10,60fa605e-9" bind:__l="__l" u-p="{{z}}"></up-image><up-image wx:else bindclick="{{A}}" u-i="60fa605e-11,60fa605e-9" bind:__l="__l" u-p="{{B||''}}"></up-image></view></up-input></view><view class="register_info_item"><up-input wx:if="{{F}}" u-i="60fa605e-12" bind:__l="__l" bindupdateModelValue="{{E}}" u-p="{{F}}"></up-input></view></view><view class="login_comm_but login_comm_but_yes" bindtap="{{G}}"> 注册 </view><view class="policy_warp"><up-checkbox wx:if="{{I}}" u-s="{{['label']}}" u-i="60fa605e-13" bind:__l="__l" bindupdateChecked="{{H}}" u-p="{{I}}"><view slot="label"><text>已阅读并同意</text><text class="policy_a_warp">《哈希优品服务协议》</text><text>及</text><text class="policy_a_warp">《隐私政策》</text></view></up-checkbox></view><up-toast class="r" u-r="uToastRef" u-i="60fa605e-14" bind:__l="__l"></up-toast></view>
<view class="register_warp"><view class="register_title_warp">注册</view><view class="register_ifo_warp"><view class="register_info_item"><up-input wx:if="{{b}}" u-i="6cfc9b6b-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}"></up-input></view><view class="register_info_item"><up-input wx:if="{{h}}" u-s="{{['suffix']}}" u-i="6cfc9b6b-1" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"><view slot="suffix" style="margin-right:10rpx"><view wx:if="{{c}}" class="code-warp"><up-count-down wx:if="{{e}}" bindfinish="{{d}}" u-i="6cfc9b6b-2,6cfc9b6b-1" bind:__l="__l" u-p="{{e}}"></up-count-down><text style="margin-left:10rpx">s</text></view><view wx:else bindtap="{{f}}" class="code_msg"> 获取验证码 </view></view></up-input></view><view class="register_info_item"><up-input wx:if="{{o}}" u-s="{{['suffix']}}" u-i="6cfc9b6b-3" bind:__l="__l" bindupdateModelValue="{{n}}" u-p="{{o}}"><view slot="suffix" style="margin-right:10rpx"><up-image wx:if="{{i}}" bindclick="{{j}}" u-i="6cfc9b6b-4,6cfc9b6b-3" bind:__l="__l" u-p="{{k}}"></up-image><up-image wx:else bindclick="{{l}}" u-i="6cfc9b6b-5,6cfc9b6b-3" bind:__l="__l" u-p="{{m||''}}"></up-image></view></up-input></view><view class="register_info_item"><up-input wx:if="{{w}}" u-s="{{['suffix']}}" u-i="6cfc9b6b-6" bind:__l="__l" bindupdateModelValue="{{v}}" u-p="{{w}}"><view slot="suffix" style="margin-right:10rpx"><up-image wx:if="{{p}}" bindclick="{{q}}" u-i="6cfc9b6b-7,6cfc9b6b-6" bind:__l="__l" u-p="{{r}}"></up-image><up-image wx:else bindclick="{{s}}" u-i="6cfc9b6b-8,6cfc9b6b-6" bind:__l="__l" u-p="{{t||''}}"></up-image></view></up-input></view><view class="register_info_item"><up-input wx:if="{{y}}" u-i="6cfc9b6b-9" bind:__l="__l" bindupdateModelValue="{{x}}" u-p="{{y}}"></up-input></view></view><view class="login_comm_but login_comm_but_yes" bindtap="{{z}}" loading="{{A}}"> 注册 </view><view class="policy_warp"><up-checkbox wx:if="{{C}}" u-s="{{['label']}}" u-i="6cfc9b6b-10" bind:__l="__l" bindupdateChecked="{{B}}" u-p="{{C}}"><view slot="label"><text>已阅读并同意</text><text class="policy_a_warp">《哈希优品服务协议》</text><text>及</text><text class="policy_a_warp">《隐私政策》</text></view></up-checkbox></view><up-toast class="r" u-r="uToastRef" u-i="6cfc9b6b-11" bind:__l="__l"></up-toast></view>
+35 -10
View File
@@ -35,14 +35,28 @@ const _sfc_main = {
}
],
// 搜索历史记录
form: {
keyword: null,
type: null,
categoryId: null,
//
page: 1,
pageSize: 20
},
isShowSearch: false,
searchVal: null,
poductList: [],
// 产品列表
imgSize: "min"
// big:大,min:笑
};
},
onLoad(option) {
const id = option.categoryId;
if (id && id !== 0) {
this.form.categoryId = id;
this.searchClickFun();
}
},
methods: {
jumpHome() {
common_vendor.index.switchTab({
@@ -51,24 +65,35 @@ const _sfc_main = {
},
// 删除历史
searchHistoryDelete(item) {
common_vendor.index.__f__("log", "at pages/search/search.vue:141", "item", item);
common_vendor.index.__f__("log", "at pages/search/search.vue:154", "item", item);
this.isShowSearch = false;
},
/**
* 查询产品
*/
async searchClick(item) {
this.searchVal = item.name;
this.form.keyword = item.name;
this.searchClickFun();
},
/**
* 查询产品
*/
async searchClickFun() {
const param = {
keyword: this.searchVal
const form = this.form;
const params = {
page: form.page,
pageSize: form.pageSize
};
const resp = await api_product.searchList(param);
if (form.categoryId) {
params.categoryId = form.categoryId;
}
if (form.keyword) {
params.keyword = form.keyword;
}
if (form.type) {
params.type = form.type;
}
const resp = await api_product.searchList(params);
if (resp && resp.bizcode === 100) {
this.poductList = resp.data;
}
@@ -115,7 +140,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
bgColor: "#f1f6ff00"
}),
e: common_vendor.o((...args) => $options.searchClickFun && $options.searchClickFun(...args)),
f: common_vendor.o(($event) => $data.searchVal = $event),
f: common_vendor.o(($event) => $data.form.keyword = $event),
g: common_vendor.p({
placeholder: "搜索关键字(商品、店铺、品牌)",
customStyle: {
@@ -124,10 +149,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
"border-radius": "20rpx !important",
"width": "590rpx"
},
modelValue: $data.searchVal
modelValue: $data.form.keyword
}),
h: !$data.searchVal
}, !$data.searchVal ? common_vendor.e({
h: !$data.poductList || $data.poductList.length === 0
}, !$data.poductList || $data.poductList.length === 0 ? common_vendor.e({
i: common_vendor.o(($event) => {
$data.isShowSearch = true;
}),
@@ -15,11 +15,16 @@ const _sfc_main = {
// 购物车列表
isEdit: false,
// 是否编辑
isAll: false
isAll: false,
// 是否全选
total: 0,
// 总合计的金额
count: 0,
// 总条数
listLoading: false
};
},
mounted() {
onLoad() {
this.getCartList();
},
methods: {
@@ -27,18 +32,19 @@ const _sfc_main = {
* 查询购物车列表
*/
async getCartList() {
this.listLoading = true;
const resp = await api_cart.getCartList();
if (resp && resp.bizcode === 100) {
const data = this.transformedArray(resp.data);
this.shoppingTotal = resp.data.length;
this.shoppingList = data;
}
this.listLoading = false;
},
// 处理购物车的数据
transformedArray(originalArray) {
const newOriginalArray = [];
originalArray.map((curr) => {
common_vendor.index.__f__("log", "at pages/shopping_cart/shopping_cart.vue:156", "currcurrcurrcurr", curr);
const existingShop = newOriginalArray.find((shop) => shop.shopId === curr.shopId && shop.shopName === curr.shopName);
if (existingShop) {
existingShop.product.push({
@@ -122,7 +128,7 @@ const _sfc_main = {
goodsNum: currentQuantity
};
const result = await api_cart.updateGoodsNum(params);
common_vendor.index.__f__("log", "at pages/shopping_cart/shopping_cart.vue:226", "result", result);
common_vendor.index.__f__("log", "at pages/shopping_cart/shopping_cart.vue:232", "result", result);
if (result && result.bizcode === 100) {
this.shoppingList[index].product[pIndex].buyNum = currentQuantity;
}
@@ -131,7 +137,6 @@ const _sfc_main = {
* 结算订单
*/
settleShopping() {
common_vendor.index.__f__("log", "at pages/shopping_cart/shopping_cart.vue:235", "结算订单....");
const deleteId = this.getCheckList();
if (!deleteId || deleteId.length === 0) {
this.$refs.uToastRef.show({
@@ -140,11 +145,11 @@ const _sfc_main = {
});
return;
}
this.isAll = false;
this.selectCheck(false);
common_vendor.index.navigateTo({
url: "/pages/order_submit/order_submit?ids=" + deleteId.join(",")
});
this.isAll = false;
this.selectCheck(false);
},
/**
* 删除选中的
@@ -230,43 +235,95 @@ const _sfc_main = {
}
});
this.shoppingList = currentShoppingList;
},
/**
* 商品详情
* @param {Object} item
*/
jumpInfo(item) {
common_vendor.index.__f__("log", "at pages/shopping_cart/shopping_cart.vue:348", "item", item);
common_vendor.index.navigateTo({
url: "/pages/productInfo/productInfo?id=" + item.goodsId
});
},
// 单个产品的单选按钮选中与取消选中
productChange(val, index, pIndex) {
let total = this.total;
let count = this.count;
const data = this.shoppingList[index].product[pIndex];
if (val) {
total = total + data.buyNum * data.unitPrice;
count = count + data.buyNum;
} else {
total = total - data.buyNum * data.unitPrice;
count = count - data.buyNum;
}
this.total = total;
this.count = count;
},
// 单个店铺的单选按钮选中与取消选中
shoppingChange(val, index) {
let total = this.total;
let count = this.count;
const data = this.shoppingList[index];
data.product.map((item) => {
if (val) {
item.isCheck = true;
total = total + item.buyNum * item.unitPrice;
count = count + item.buyNum;
} else {
item.isCheck = false;
total = total - item.buyNum * item.unitPrice;
count = count - item.buyNum;
}
});
this.shoppingList[index] = data;
this.total = total;
this.count = count;
}
}
};
if (!Array) {
const _easycom_up_loading_page2 = common_vendor.resolveComponent("up-loading-page");
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
const _easycom_up_checkbox2 = common_vendor.resolveComponent("up-checkbox");
const _easycom_choiceness2 = common_vendor.resolveComponent("choiceness");
const _easycom_up_toast2 = common_vendor.resolveComponent("up-toast");
(_easycom_up_image2 + _easycom_up_checkbox2 + _easycom_choiceness2 + _easycom_up_toast2)();
(_easycom_up_loading_page2 + _easycom_up_image2 + _easycom_up_checkbox2 + _easycom_choiceness2 + _easycom_up_toast2)();
}
const _easycom_up_loading_page = () => "../../uni_modules/uview-plus/components/u-loading-page/u-loading-page.js";
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
const _easycom_up_checkbox = () => "../../uni_modules/uview-plus/components/u-checkbox/u-checkbox.js";
const _easycom_choiceness = () => "../../components/choiceness/choiceness.js";
const _easycom_up_toast = () => "../../uni_modules/uview-plus/components/u-toast/u-toast.js";
if (!Math) {
(_easycom_up_image + _easycom_up_checkbox + _easycom_choiceness + _easycom_up_toast)();
(_easycom_up_loading_page + _easycom_up_image + _easycom_up_checkbox + _easycom_choiceness + _easycom_up_toast)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: common_vendor.t($data.shoppingTotal),
b: common_vendor.o(($event) => $data.isEdit = true),
c: !$data.isDataNull
c: common_vendor.p({
loading: $data.listLoading
}),
d: !$data.isDataNull
}, !$data.isDataNull ? {
d: common_vendor.f($data.shoppingList, (item, index, i0) => {
e: common_vendor.f($data.shoppingList, (item, index, i0) => {
return {
a: "7cc1684a-1-" + i0 + "," + ("7cc1684a-0-" + i0),
a: "7cc1684a-2-" + i0 + "," + ("7cc1684a-1-" + i0),
b: common_vendor.p({
src: item.shopLogo ? item.shopLogo : "/static/shopping/store.png",
width: "22",
height: "22",
bgColor: "#f1f6ff00"
bgColor: "#f1f6ff00",
shape: "circle"
}),
c: common_vendor.t(item.shopName),
d: common_vendor.t(item.id),
e: "7cc1684a-0-" + i0,
f: common_vendor.o(($event) => item.isCheck = $event, item.id),
g: common_vendor.p({
e: common_vendor.o((event) => $options.shoppingChange(event, index), item.id),
f: "7cc1684a-1-" + i0,
g: common_vendor.o(($event) => item.isCheck = $event, item.id),
h: common_vendor.p({
customStyle: {
marginBottom: "8px"
},
@@ -278,11 +335,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
iconSize: "18",
checked: item.isCheck
}),
h: common_vendor.f(item.product, (pItem, pIndex, i1) => {
i: common_vendor.f(item.product, (pItem, pIndex, i1) => {
return common_vendor.e({
a: "7cc1684a-2-" + i0 + "-" + i1,
b: common_vendor.o(($event) => pItem.isCheck = $event, pItem.id),
c: common_vendor.p({
a: common_vendor.o((event) => $options.productChange(event, index, pIndex), pItem.id),
b: "7cc1684a-3-" + i0 + "-" + i1,
c: common_vendor.o(($event) => pItem.isCheck = $event, pItem.id),
d: common_vendor.p({
customStyle: {
marginBottom: "8px"
},
@@ -295,41 +353,42 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
disabled: !pItem.isAvail,
checked: pItem.isCheck
}),
d: "7cc1684a-3-" + i0 + "-" + i1,
e: common_vendor.p({
e: "7cc1684a-4-" + i0 + "-" + i1,
f: common_vendor.p({
src: pItem.mainGraph,
width: "100",
height: "100",
bgColor: "#f1f6ff00"
}),
f: common_vendor.t(pItem.name),
g: common_vendor.t(pItem.goodsSpece),
h: common_vendor.t(pItem.unitPrice),
g: common_vendor.t(pItem.name),
h: common_vendor.t(pItem.goodsSpece),
i: common_vendor.t(pItem.unitPrice),
j: common_vendor.o(($event) => $options.quantityFun("minus", index, pIndex, pItem.id), pItem.id),
k: common_vendor.t(pItem.buyNum),
l: common_vendor.o(($event) => $options.quantityFun("add", index, pIndex, pItem.id), pItem.id),
m: !pItem.isAvail
j: common_vendor.t(pItem.unitPrice),
k: common_vendor.o(($event) => $options.quantityFun("minus", index, pIndex, pItem.id), pItem.id),
l: common_vendor.t(pItem.buyNum),
m: common_vendor.o(($event) => $options.quantityFun("add", index, pIndex, pItem.id), pItem.id),
n: !pItem.isAvail
}, !pItem.isAvail ? {} : {}, {
n: pItem.id
o: common_vendor.o(($event) => $options.jumpInfo(pItem), pItem.id),
p: pItem.id
});
}),
i: item.id
j: item.id
};
})
} : {
e: common_vendor.p({
f: common_vendor.p({
src: "/static/common/not_shopping.png",
width: "80",
height: "80",
bgColor: "#f1f6ff00"
})
}, {
f: !$data.isDataNull
g: !$data.isDataNull
}, !$data.isDataNull ? common_vendor.e({
g: common_vendor.o($options.isAllChange),
h: common_vendor.o(($event) => $data.isAll = $event),
i: common_vendor.p({
h: common_vendor.o($options.isAllChange),
i: common_vendor.o(($event) => $data.isAll = $event),
j: common_vendor.p({
name: "isAll",
usedAlone: true,
shape: "circle",
@@ -338,14 +397,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
iconSize: "18",
checked: $data.isAll
}),
j: $data.isEdit
k: common_vendor.t($data.total),
l: $data.isEdit
}, $data.isEdit ? {
k: common_vendor.o((...args) => $options.deleteShopping && $options.deleteShopping(...args))
m: common_vendor.o((...args) => $options.deleteShopping && $options.deleteShopping(...args))
} : {
l: common_vendor.o((...args) => $options.settleShopping && $options.settleShopping(...args))
n: common_vendor.t($data.count),
o: common_vendor.o((...args) => $options.settleShopping && $options.settleShopping(...args))
}) : {}, {
m: common_vendor.sr("uToastRef", "7cc1684a-7"),
n: $data.isDataNull ? "calc(100vh - 134rpx)" : "calc(100vh - 256rpx)"
p: common_vendor.sr("uToastRef", "7cc1684a-8"),
q: $data.isDataNull ? "calc(100vh - 134rpx)" : "calc(100vh - 256rpx)"
});
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7cc1684a"]]);
@@ -2,6 +2,7 @@
"navigationStyle": "custom",
"usingComponents": {
"choiceness": "../../components/choiceness/choiceness",
"up-loading-page": "../../uni_modules/uview-plus/components/u-loading-page/u-loading-page",
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image",
"up-checkbox": "../../uni_modules/uview-plus/components/u-checkbox/u-checkbox",
"up-toast": "../../uni_modules/uview-plus/components/u-toast/u-toast"
@@ -1 +1 @@
<view style="{{'height:' + n}}" class="shopping_cart_warp data-v-7cc1684a"><view class="shopping_cart_header data-v-7cc1684a"><view class="cart data-v-7cc1684a">购物车({{a}})</view><view class="enit_but data-v-7cc1684a" bindtap="{{b}}">编辑</view></view><view class="shopping_cart_content data-v-7cc1684a"><block wx:if="{{c}}"><view wx:for="{{d}}" wx:for-item="item" wx:key="i" class="shopping_cart_content_item data-v-7cc1684a"><up-checkbox wx:if="{{item.g}}" class="data-v-7cc1684a" u-s="{{['label']}}" u-i="{{item.e}}" bind:__l="__l" bindupdateChecked="{{item.f}}" u-p="{{item.g}}"><view class="content_item_header data-v-7cc1684a" slot="label"><up-image wx:if="{{item.b}}" class="data-v-7cc1684a" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view class="order_product_title data-v-7cc1684a">{{item.c}}{{item.d}}</view></view></up-checkbox><view class="data-v-7cc1684a"><view wx:for="{{item.h}}" wx:for-item="pItem" wx:key="n" class="content_item_info data-v-7cc1684a"><up-checkbox wx:if="{{pItem.c}}" class="data-v-7cc1684a" u-i="{{pItem.a}}" bind:__l="__l" bindupdateChecked="{{pItem.b}}" u-p="{{pItem.c}}"></up-checkbox><view class="info_item data-v-7cc1684a"><up-image wx:if="{{pItem.e}}" class="data-v-7cc1684a" u-i="{{pItem.d}}" bind:__l="__l" u-p="{{pItem.e}}"></up-image><view class="content_info data-v-7cc1684a"><view class="shopping_content_info_title data-v-7cc1684a">{{pItem.f}}</view><view class="content_info_description data-v-7cc1684a">{{pItem.g}}</view><view class="shopping_info_amount data-v-7cc1684a"><view class="data-v-7cc1684a"><view class="data-v-7cc1684a" style="color:#FF7C41FF"><text class="data-v-7cc1684a" style="font-size:22rpx">¥</text><text class="data-v-7cc1684a" style="font-size:32rpx">{{pItem.h}}</text></view><view class="shopping_info_amount_original data-v-7cc1684a">¥{{pItem.i}}</view></view><view class="data-v-7cc1684a"><view class="shopping_info_quantity data-v-7cc1684a"><view class="quantity_but data-v-7cc1684a" bindtap="{{pItem.j}}">-</view><view class="quantity_value data-v-7cc1684a">{{pItem.k}}</view><view class="quantity_but data-v-7cc1684a" bindtap="{{pItem.l}}">+</view></view><view wx:if="{{pItem.m}}" class="insufficient_stock data-v-7cc1684a">库存不足</view></view></view></view></view></view></view></view></block><view wx:else class="not_order_warp data-v-7cc1684a"><up-image wx:if="{{e}}" class="data-v-7cc1684a" u-i="7cc1684a-4" bind:__l="__l" u-p="{{e}}"></up-image><view class="not_order_msg_warp data-v-7cc1684a">购物车是空的</view></view><choiceness class="data-v-7cc1684a" u-i="7cc1684a-5" bind:__l="__l"/></view><view wx:if="{{f}}" class="data-v-7cc1684a"><view class="shopping_cart_but data-v-7cc1684a"><view class="shopping_cart_but_total data-v-7cc1684a"><up-checkbox wx:if="{{i}}" class="data-v-7cc1684a" u-s="{{['label']}}" bindchange="{{g}}" u-i="7cc1684a-6" bind:__l="__l" bindupdateChecked="{{h}}" u-p="{{i}}"><text class="data-v-7cc1684a" style="font-size:26rpx;color:#444444" slot="label">全选</text></up-checkbox><text class="data-v-7cc1684a" style="margin-left:20rpx;font-size:24rpx;color:#444444">合计:</text><text class="data-v-7cc1684a" style="font-size:24rpx">¥</text><text class="data-v-7cc1684a" style="font-size:32rpx">2000.00</text></view><view wx:if="{{j}}" class="delete_but_css data-v-7cc1684a" bindtap="{{k}}"> 删除 </view><view wx:else class="add_but_css data-v-7cc1684a" bindtap="{{l}}"> 结算(2) </view></view></view><up-toast class="r data-v-7cc1684a" u-r="uToastRef" u-i="7cc1684a-7" bind:__l="__l"></up-toast></view>
<view style="{{'height:' + q}}" class="shopping_cart_warp data-v-7cc1684a"><view class="shopping_cart_header data-v-7cc1684a"><view class="cart data-v-7cc1684a">购物车({{a}})</view><view class="enit_but data-v-7cc1684a" bindtap="{{b}}">编辑</view></view><up-loading-page wx:if="{{c}}" class="data-v-7cc1684a" u-i="7cc1684a-0" bind:__l="__l" u-p="{{c}}"></up-loading-page><view class="shopping_cart_content data-v-7cc1684a"><block wx:if="{{d}}"><view wx:for="{{e}}" wx:for-item="item" wx:key="j" class="shopping_cart_content_item data-v-7cc1684a"><up-checkbox wx:if="{{item.h}}" class="data-v-7cc1684a" u-s="{{['label']}}" bindchange="{{item.e}}" u-i="{{item.f}}" bind:__l="__l" bindupdateChecked="{{item.g}}" u-p="{{item.h}}"><view class="content_item_header data-v-7cc1684a" slot="label"><up-image wx:if="{{item.b}}" class="data-v-7cc1684a" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view class="order_product_title data-v-7cc1684a">{{item.c}}{{item.d}}</view></view></up-checkbox><view class="data-v-7cc1684a"><view wx:for="{{item.i}}" wx:for-item="pItem" wx:key="p" class="content_item_info data-v-7cc1684a"><up-checkbox wx:if="{{pItem.d}}" class="data-v-7cc1684a" bindchange="{{pItem.a}}" u-i="{{pItem.b}}" bind:__l="__l" bindupdateChecked="{{pItem.c}}" u-p="{{pItem.d}}"></up-checkbox><view class="info_item data-v-7cc1684a" bindtap="{{pItem.o}}"><up-image wx:if="{{pItem.f}}" class="data-v-7cc1684a" u-i="{{pItem.e}}" bind:__l="__l" u-p="{{pItem.f}}"></up-image><view class="content_info data-v-7cc1684a"><view class="shopping_content_info_title data-v-7cc1684a">{{pItem.g}}</view><view class="content_info_description data-v-7cc1684a">{{pItem.h}}</view><view class="shopping_info_amount data-v-7cc1684a"><view class="data-v-7cc1684a"><view class="data-v-7cc1684a" style="color:#FF7C41FF"><text class="data-v-7cc1684a" style="font-size:22rpx">¥</text><text class="data-v-7cc1684a" style="font-size:32rpx">{{pItem.i}}</text></view><view class="shopping_info_amount_original data-v-7cc1684a">¥{{pItem.j}}</view></view><view class="data-v-7cc1684a"><view class="shopping_info_quantity data-v-7cc1684a"><view class="quantity_but data-v-7cc1684a" bindtap="{{pItem.k}}">-</view><view class="quantity_value data-v-7cc1684a">{{pItem.l}}</view><view class="quantity_but data-v-7cc1684a" bindtap="{{pItem.m}}">+</view></view><view wx:if="{{pItem.n}}" class="insufficient_stock data-v-7cc1684a">库存不足</view></view></view></view></view></view></view></view></block><view wx:else class="not_order_warp data-v-7cc1684a"><up-image wx:if="{{f}}" class="data-v-7cc1684a" u-i="7cc1684a-5" bind:__l="__l" u-p="{{f}}"></up-image><view class="not_order_msg_warp data-v-7cc1684a">购物车是空的</view></view><choiceness class="data-v-7cc1684a" u-i="7cc1684a-6" bind:__l="__l"/></view><view wx:if="{{g}}" class="data-v-7cc1684a"><view class="shopping_cart_but data-v-7cc1684a"><view class="shopping_cart_but_total data-v-7cc1684a"><up-checkbox wx:if="{{j}}" class="data-v-7cc1684a" u-s="{{['label']}}" bindchange="{{h}}" u-i="7cc1684a-7" bind:__l="__l" bindupdateChecked="{{i}}" u-p="{{j}}"><text class="data-v-7cc1684a" style="font-size:26rpx;color:#444444" slot="label">全选</text></up-checkbox><text class="data-v-7cc1684a" style="margin-left:20rpx;font-size:24rpx;color:#444444">合计:</text><text class="data-v-7cc1684a" style="font-size:24rpx">¥</text><text class="data-v-7cc1684a" style="font-size:32rpx">{{k}}</text></view><view wx:if="{{l}}" class="delete_but_css data-v-7cc1684a" bindtap="{{m}}"> 删除 </view><view wx:else class="add_but_css data-v-7cc1684a" bindtap="{{o}}"> 结算({{n}}) </view></view></view><up-toast class="r data-v-7cc1684a" u-r="uToastRef" u-i="7cc1684a-8" bind:__l="__l"></up-toast></view>
@@ -64,6 +64,7 @@
}
.shopping_cart_content .shopping_cart_content_item .content_info.data-v-7cc1684a {
margin-left: 10rpx;
width: calc(100% - 100rpx);
}
.shopping_cart_content .shopping_cart_content_item .shopping_content_info_title.data-v-7cc1684a {
font-weight: bold;
+80 -20
View File
@@ -1,6 +1,7 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_classify_data = require("../../common/classify.data.js");
const api_common = require("../../api/common.js");
const _sfc_main = {
data() {
return {
@@ -8,15 +9,33 @@ const _sfc_main = {
tabbar: common_classify_data.classifyData,
scrollTop: 0,
//tab标题的滚动条位置
current: 0,
current: null,
// 预设当前项的值
menuHeight: 0,
// 左边菜单的高度
menuItemHeight: 0,
// 左边菜单item的高度
bannerList: ["/static/common/product_def_banner.png", "/static/common/product_def_banner.png", "/static/common/product_def_banner.png"]
bannerList: [
"/static/common/product_def_banner.png",
"/static/common/product_def_banner.png",
"/static/common/product_def_banner.png"
],
tabbarList: [],
// 左侧的主分类
tabbarContentList: [],
// 右侧内容的分类
tabbarContentLoading: false
};
},
mounted() {
this.getSort(0).then((resp) => {
if (resp && resp.length !== 0) {
const fData = resp[0];
this.tabbarList = resp;
this.swichMenu(fData, 0);
}
});
},
methods: {
checkCategory(val) {
this.selCategory = val;
@@ -26,19 +45,38 @@ const _sfc_main = {
url: "/pages/search/search"
});
},
// 查询分类
async getSort(pId) {
const params = {
parentId: pId
};
const resp = await api_common.getCascadeCategory(params);
if (resp && resp.bizcode === 100) {
return resp.data;
}
return [];
},
getImg() {
return Math.floor(Math.random() * 35);
},
// 点击左边的栏目切换
async swichMenu(index) {
async swichMenu(item, index) {
if (index == this.current)
return;
this.tabbarContentLoading = true;
const firstData = await this.getSort(item.id);
for (let fItem of firstData) {
const twoData = await this.getSort(fItem.id);
fItem.foods = twoData;
}
this.tabbarContentList = firstData;
this.current = index;
if (this.menuHeight == 0 || this.menuItemHeight == 0) {
await this.getElRect("menu-scroll-view", "menuHeight");
await this.getElRect("u-tab-item", "menuItemHeight");
}
this.scrollTop = index * this.menuItemHeight + this.menuItemHeight / 2 - this.menuHeight / 2;
this.tabbarContentLoading = false;
},
// 获取一个目标元素的高度
getElRect(elClass, dataVal) {
@@ -54,18 +92,29 @@ const _sfc_main = {
this[dataVal] = res.height;
}).exec();
});
},
// 跳转到搜索页面
jumpProduct(item) {
common_vendor.index.navigateTo({
url: "/pages/search/search?categoryId=" + item.id
});
}
}
};
if (!Array) {
const _easycom_up_search2 = common_vendor.resolveComponent("up-search");
const _easycom_up_swiper2 = common_vendor.resolveComponent("up-swiper");
(_easycom_up_search2 + _easycom_up_swiper2)();
const _easycom_up_loading_page2 = common_vendor.resolveComponent("up-loading-page");
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
const _component_template = common_vendor.resolveComponent("template");
(_easycom_up_search2 + _easycom_up_swiper2 + _easycom_up_loading_page2 + _easycom_up_image2 + _component_template)();
}
const _easycom_up_search = () => "../../uni_modules/uview-plus/components/u-search/u-search.js";
const _easycom_up_swiper = () => "../../uni_modules/uview-plus/components/u-swiper/u-swiper.js";
const _easycom_up_loading_page = () => "../../uni_modules/uview-plus/components/u-loading-page/u-loading-page.js";
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
if (!Math) {
(_easycom_up_search + _easycom_up_swiper)();
(_easycom_up_search + _easycom_up_swiper + _easycom_up_loading_page + _easycom_up_image)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
@@ -85,34 +134,45 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
placeholder: "搜索"
}),
h: common_vendor.o((...args) => $options.jumpSearch && $options.jumpSearch(...args)),
i: common_vendor.f($data.tabbar, (item, index, i0) => {
i: common_vendor.f($data.tabbarList, (item, index, i0) => {
return {
a: common_vendor.t(item.name),
b: index,
c: common_vendor.n($data.current == index ? "u-tab-item-active" : ""),
d: index,
e: common_vendor.o(($event) => $options.swichMenu(index), index)
e: common_vendor.o(($event) => $options.swichMenu(item, index), index)
};
}),
j: $data.scrollTop,
k: common_vendor.f($data.tabbar, (item, index, i0) => {
k: common_vendor.p({
list: $data.bannerList,
height: "80px"
}),
l: common_vendor.p({
loading: $data.tabbarContentLoading
}),
m: common_vendor.f($data.tabbarContentList, (item, index, i0) => {
return common_vendor.e({
a: $data.current == index
}, $data.current == index ? {
b: "1255c49a-1-" + i0,
c: common_vendor.p({
list: $data.bannerList,
height: "80px"
}),
d: common_vendor.t(item.name),
e: common_vendor.f(item.foods, (item1, index1, i1) => {
a: common_vendor.t(item.name),
b: item.foods && item.foods.length !== 0
}, item.foods && item.foods.length !== 0 ? {
c: common_vendor.f(item.foods, (item1, index1, i1) => {
return {
a: item1.icon,
a: item1.icon ? item1.icon : "/static/common/def_img.jpg",
b: common_vendor.t(item1.name),
c: index1
c: index1,
d: common_vendor.o(($event) => $options.jumpProduct(item1), index1)
};
})
} : {}, {
} : {
d: "1255c49a-3-" + i0,
e: common_vendor.p({
src: "/static/common/not_shopping.png",
width: "100",
height: "100",
bgColor: "#f1f6ff00"
})
}, {
f: index
});
})
+3 -1
View File
@@ -2,6 +2,8 @@
"navigationStyle": "custom",
"usingComponents": {
"up-search": "../../uni_modules/uview-plus/components/u-search/u-search",
"up-swiper": "../../uni_modules/uview-plus/components/u-swiper/u-swiper"
"up-swiper": "../../uni_modules/uview-plus/components/u-swiper/u-swiper",
"up-loading-page": "../../uni_modules/uview-plus/components/u-loading-page/u-loading-page",
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image"
}
}
+1 -1
View File
@@ -1 +1 @@
<view class="sort_warp data-v-1255c49a"><view class="sort_header data-v-1255c49a"><view class="sort_category_header data-v-1255c49a"><view class="{{['data-v-1255c49a', b]}}" bindtap="{{c}}"><view class="data-v-1255c49a">分类</view><view wx:if="{{a}}" class="category_item_sel_but data-v-1255c49a"></view></view><view class="{{['data-v-1255c49a', e]}}" bindtap="{{f}}"><view class="data-v-1255c49a">品牌</view><view wx:if="{{d}}" class="category_item_sel_but data-v-1255c49a"></view></view></view><view class="data-v-1255c49a" style="width:200rpx" bindtap="{{h}}"><up-search wx:if="{{g}}" class="data-v-1255c49a" u-i="1255c49a-0" bind:__l="__l" u-p="{{g}}"></up-search></view></view><view class="u-menu-wrap data-v-1255c49a"><scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view data-v-1255c49a" scroll-top="{{j}}"><view wx:for="{{i}}" wx:for-item="item" wx:key="b" class="{{['u-tab-item', 'data-v-1255c49a', item.c]}}" data-current="{{item.d}}" catchtap="{{item.e}}"><text class="u-line-1 data-v-1255c49a">{{item.a}}</text></view></scroll-view><block wx:for="{{k}}" wx:for-item="item" wx:key="f"><scroll-view wx:if="{{item.a}}" scroll-y class="right-box data-v-1255c49a"><view class="data-v-1255c49a" style="padding:0rpx 20rpx"><up-swiper wx:if="{{item.c}}" class="data-v-1255c49a" u-i="{{item.b}}" bind:__l="__l" u-p="{{item.c}}"></up-swiper></view><view class="page-view data-v-1255c49a"><view class="class-item data-v-1255c49a"><view class="item-title data-v-1255c49a"><text class="data-v-1255c49a">{{item.d}}</text></view><view class="item-container data-v-1255c49a"><view wx:for="{{item.e}}" wx:for-item="item1" wx:key="c" class="thumb-box data-v-1255c49a"><image class="item-menu-image data-v-1255c49a" src="{{item1.a}}" mode=""></image><view class="item-menu-name data-v-1255c49a">{{item1.b}}</view></view></view></view></view></scroll-view></block></view></view>
<view class="sort_warp data-v-1255c49a"><view class="sort_header data-v-1255c49a"><view class="sort_category_header data-v-1255c49a"><view class="{{['data-v-1255c49a', b]}}" bindtap="{{c}}"><view class="data-v-1255c49a">分类</view><view wx:if="{{a}}" class="category_item_sel_but data-v-1255c49a"></view></view><view class="{{['data-v-1255c49a', e]}}" bindtap="{{f}}"><view class="data-v-1255c49a">品牌</view><view wx:if="{{d}}" class="category_item_sel_but data-v-1255c49a"></view></view></view><view class="data-v-1255c49a" style="width:200rpx" bindtap="{{h}}"><up-search wx:if="{{g}}" class="data-v-1255c49a" u-i="1255c49a-0" bind:__l="__l" u-p="{{g}}"></up-search></view></view><view class="u-menu-wrap data-v-1255c49a"><scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view data-v-1255c49a" scroll-top="{{j}}"><view wx:for="{{i}}" wx:for-item="item" wx:key="b" class="{{['u-tab-item', 'data-v-1255c49a', item.c]}}" data-current="{{item.d}}" catchtap="{{item.e}}"><text class="u-line-1 data-v-1255c49a">{{item.a}}</text></view></scroll-view><block class="data-v-1255c49a" u-s="{{['d']}}"><scroll-view scroll-y class="right-box data-v-1255c49a"><view class="data-v-1255c49a" style="padding:0rpx 20rpx"><up-swiper wx:if="{{k}}" class="data-v-1255c49a" u-i="1255c49a-1" bind:__l="__l" u-p="{{k}}"></up-swiper></view><view class="page-view data-v-1255c49a"><up-loading-page wx:if="{{l}}" class="data-v-1255c49a" u-i="1255c49a-2" bind:__l="__l" u-p="{{l}}"></up-loading-page><view wx:for="{{m}}" wx:for-item="item" wx:key="f" class="class-item data-v-1255c49a"><view class="item-title data-v-1255c49a"><text class="data-v-1255c49a">{{item.a}}</text></view><view wx:if="{{item.b}}" class="item-container data-v-1255c49a"><view wx:for="{{item.c}}" wx:for-item="item1" wx:key="c" class="thumb-box data-v-1255c49a" bindtap="{{item1.d}}"><image class="item-menu-image data-v-1255c49a" src="{{item1.a}}" mode=""></image><view class="item-menu-name data-v-1255c49a">{{item1.b}}</view></view></view><view wx:else class="not_order_warp data-v-1255c49a"><view class="not_order_warp_img data-v-1255c49a"><up-image wx:if="{{item.e}}" class="data-v-1255c49a" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"></up-image></view><view class="not_order_msg_warp data-v-1255c49a">暂无分类,快去添加吧~</view></view></view></view></scroll-view></block></view></view>
+3 -2
View File
@@ -127,6 +127,7 @@
font-weight: normal;
font-size: 24rpx;
color: #303133;
margin-top: 10rpx;
}
.item-container.data-v-1255c49a {
display: flex;
@@ -141,6 +142,6 @@
margin-top: 20rpx;
}
.item-menu-image.data-v-1255c49a {
width: 120rpx;
height: 120rpx;
width: 110rpx;
height: 110rpx;
}
+31 -14
View File
@@ -45,13 +45,13 @@ const _sfc_main = {
// 点击开始抽奖
start() {
let { areaNumber } = this;
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:73", "areaNumber", areaNumber);
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:92", "areaNumber", areaNumber);
const singleAngle = 360 / areaNumber;
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:75", "singleAngle", singleAngle);
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:94", "singleAngle", singleAngle);
this.singleAngle = singleAngle;
let index = Math.floor(Math.random() * 6 + 1);
this.award = index;
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:79", "index", index);
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:98", "index", index);
this.begin(index);
},
begin(awardNumer) {
@@ -63,11 +63,11 @@ const _sfc_main = {
return;
this.isStart = true;
let endAddAngle = 0;
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:91", "awardNumer", awardNumer);
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:92", "singleAngle", singleAngle);
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:110", "awardNumer", awardNumer);
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:111", "singleAngle", singleAngle);
endAddAngle = 360 - ((awardNumer - 1) * singleAngle + singleAngle / 2);
const rangeAngle = (Math.floor(Math.random() * 4) + 4) * 360;
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:97", endAddAngle);
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:116", endAddAngle);
let cAngle;
deg = 0;
this.timer = setInterval(() => {
@@ -87,20 +87,26 @@ const _sfc_main = {
this.deg = deg;
}, 1e3 / 60);
},
// 用户点击开始抽奖
// turntableStart() {
// let index = Math.floor(Math.random() * 6 + 1) //前端随机数,这里应该后台返回中奖结果
// this.award = index
// this.$refs.turntable.begin(this.award);
// },
// 抽奖完成后操作
turntableSuccess() {
const index = this.award - 1;
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:131", "bind:success", this.awardList[index]);
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:144", "bind:success", this.awardList[index]);
common_vendor.index.showToast({
title: `恭喜你获得${this.awardList[index].title}`,
icon: "none"
});
},
/**
* 开始多次抽奖
*/
drawsFun(count) {
common_vendor.index.__f__("log", "at pages/turntable/turntable.vue:154", "开始多次抽奖。。count", count);
this.start();
},
/**
* 跳转到中奖记录
*/
jumpWinningRecord() {
}
}
};
@@ -124,7 +130,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
c: common_assets._imports_0,
d: common_vendor.s("-webkit-transform:rotate(" + $data.deg + "deg) translateZ(0);transform:rotate(" + $data.deg + "deg) translateZ(0)"),
e: common_assets._imports_1,
f: common_vendor.o((...args) => $options.start && $options.start(...args))
f: common_vendor.o((...args) => $options.start && $options.start(...args)),
g: common_vendor.o(($event) => $options.drawsFun(1)),
h: common_vendor.o(($event) => $options.drawsFun(10)),
i: common_vendor.o(($event) => $options.drawsFun(100)),
j: common_vendor.o(($event) => $options.drawsFun(365)),
k: common_vendor.o($options.jumpWinningRecord),
l: common_vendor.p({
src: "/static/turntable/record.png",
width: "14",
height: "14",
bgColor: "#f1f6ff00"
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
@@ -1 +1 @@
<view class="turntable_warp"><view class="turntable_header_warp"><view class="header_title_warp"><up-image wx:if="{{b}}" bindclick="{{a}}" u-i="42dcd262-0" bind:__l="__l" u-p="{{b}}"></up-image><view class="title_">幸运转盘百亿补贴</view></view><view class="turntable_content_warp"><view class="frequency_warp"><view class="turntable_wp sol-class"><image src="{{c}}" style="{{d}}"></image><view class="turntable_pointer" bindtap="{{f}}"><image src="{{e}}"></image></view></view></view></view></view></view>
<view class="turntable_warp"><view class="turntable_header_warp"><view class="header_title_warp"><up-image wx:if="{{b}}" bindclick="{{a}}" u-i="573c7e2f-0" bind:__l="__l" u-p="{{b}}"></up-image><view class="title_">幸运转盘百亿补贴</view></view><view class="turntable_content_warp"><view class="frequency_warp"><view class="turntable_wp sol-class"><image src="{{c}}" style="{{d}}"></image><view class="turntable_pointer" bindtap="{{f}}"><image src="{{e}}"></image></view></view><view class="draws_warp"><view class="draws_item_warp" bindtap="{{g}}">抽1次</view><view class="draws_item_warp" bindtap="{{h}}">抽10次</view><view class="draws_item_warp" bindtap="{{i}}">抽100次</view><view class="draws_item_warp" bindtap="{{j}}">抽356次</view></view></view></view><view class="rule"><view class="rule_title"><view class="title">活动规则</view></view><view class="rule_content">内容XXXXXXXXXXXXXXXXXXXXXXXX</view></view></view><view class="winning_record"><view style="margin-top:10rpx"><up-image wx:if="{{l}}" bindclick="{{k}}" u-i="573c7e2f-1" bind:__l="__l" u-p="{{l}}"></up-image></view><view style="margin-left:10rpx">中奖记录</view></view></view>
@@ -24,6 +24,7 @@
/* 垂直间距 */
.turntable_warp {
height: 100vh;
position: relative;
}
.turntable_header_warp {
height: 1200rpx;
@@ -57,12 +58,59 @@
/* 将图片居中显示 */
width: 100%;
height: 820rpx;
position: relative;
}
.turntable_header_warp .turntable_content_warp .draws_warp {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 0 84rpx;
position: absolute;
top: 576rpx;
width: calc(100% - 168rpx);
}
.turntable_header_warp .turntable_content_warp .draws_warp .draws_item_warp {
width: 40%;
text-align: center;
background: #FE2F32;
border-radius: 16rpx;
border: 2px solid #FFC8C8;
margin-bottom: 20rpx;
color: #ffffff;
padding: 20rpx 0rpx;
}
.turntable_header_warp .rule {
background: #FFFFFF;
border-radius: 50rpx 50rpx 0rpx 0rpx;
min-height: 500rpx;
padding: 30rpx;
}
.turntable_header_warp .rule .rule_title {
display: flex;
justify-content: center;
margin-bottom: 30rpx;
}
.turntable_header_warp .rule .rule_title .title {
background: #FF2524;
border-radius: 30rpx 0rpx 40rpx 0rpx;
color: #FFFFFF;
padding: 10rpx 0;
width: 280rpx;
text-align: center;
font-size: 40rpx;
}
.turntable_header_warp .rule .rule_content {
font-weight: 400;
font-size: 28rpx;
color: #999999;
line-height: 38rpx;
}
.turntable_wp {
width: 610rpx;
height: 610rpx;
position: relative;
margin: 0 auto;
top: -176rpx;
}
.turntable_wp image {
display: block;
@@ -76,4 +124,18 @@
top: 50%;
left: 50%;
margin: -125rpx 0 0 -112rpx;
}
.winning_record {
position: absolute;
right: 0rpx;
top: 200rpx;
background: rgba(92, 0, 1, 0.5);
border-radius: 30rpx 0rpx 0rpx 30rpx;
display: flex;
align-items: center;
color: #FFFFFF;
padding: 10rpx 20rpx;
font-weight: 500;
font-size: 25rpx;
color: #FBFAFA;
}
+46 -99
View File
@@ -1,100 +1,20 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_product = require("../../api/product.js");
const utils_enumUtils = require("../../utils/enumUtils.js");
const _sfc_main = {
data() {
return {
swiperList: [
"/static/home/banner03.png"
],
productList: [
{
id: 1,
name: "Michael Kors I Jodie 老花狗牙托特包手提单肩包-小号...",
url: "/static/common/product_def.png",
zqPrice: 42.84,
// 专区价格
price: 424.84,
// 到手价格
oPrice: 466.84,
// 原价价格
type: 1
// 1:爆款区的 0:普通区
},
{
id: 2,
name: "Michael Kors I Jodie 老花狗牙托特包手提单肩包-小号...",
url: "/static/common/product_def.png",
zqPrice: 42.84,
// 专区价格
price: 424.84,
// 到手价格
oPrice: 466.84,
// 原价价格
type: 0
},
{
id: 3,
name: "Michael Kors I Jodie 老花狗牙托特包手提单肩包-小号...",
url: "/static/common/product_def.png",
zqPrice: 42.84,
// 专区价格
price: 424.84,
// 到手价格
oPrice: 466.84,
// 原价价格
type: 0
},
{
id: 4,
name: "Michael Kors I Jodie 老花狗牙托特包手提单肩包-小号...",
url: "/static/common/product_def.png",
zqPrice: 42.84,
// 专区价格
price: 424.84,
// 到手价格
oPrice: 466.84,
// 原价价格
type: 1
},
{
id: 5,
name: "Michael Kors I Jodie 老花狗牙托特包手提单肩包-小号...",
url: "/static/common/product_def.png",
zqPrice: 42.84,
// 专区价格
price: 424.84,
// 到手价格
oPrice: 466.84,
// 原价价格
type: 0
},
{
id: 6,
name: "Michael Kors I Jodie 老花狗牙托特包手提单肩包-小号...",
url: "/static/common/product_def.png",
zqPrice: 42.84,
// 专区价格
price: 424.84,
// 到手价格
oPrice: 466.84,
// 原价价格
type: 0
},
{
id: 7,
name: "Michael Kors I Jodie 老花狗牙托特包手提单肩包-小号...",
url: "/static/common/product_def.png",
zqPrice: 42.84,
// 专区价格
price: 424.84,
// 到手价格
oPrice: 466.84,
// 原价价格
type: 0
}
]
productList: [],
productListLoading: false
};
},
onLoad() {
this.getSearchList();
},
methods: {
jumpHome() {
common_vendor.index.switchTab({
@@ -106,18 +26,42 @@ const _sfc_main = {
common_vendor.index.navigateTo({
url: "/pages/invite_friends/invite_friends"
});
},
async getSearchList() {
this.productListLoading = true;
const params = {
type: utils_enumUtils.SEARCH_TYPE.EXPLOSIVE,
page: 1,
pageSize: 99
};
const resp = await api_product.searchList(params);
if (resp && resp.bizcode === 100) {
this.productList = resp.data;
}
this.productListLoading = false;
},
/**
* 跳转到商品详情
* @param {Object} item
*/
jumpInfo(item) {
common_vendor.index.navigateTo({
url: "/pages/productInfo/productInfo?id=" + item.id
});
}
}
};
if (!Array) {
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
const _easycom_up_swiper2 = common_vendor.resolveComponent("up-swiper");
(_easycom_up_image2 + _easycom_up_swiper2)();
const _easycom_up_loading_page2 = common_vendor.resolveComponent("up-loading-page");
(_easycom_up_image2 + _easycom_up_swiper2 + _easycom_up_loading_page2)();
}
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
const _easycom_up_swiper = () => "../../uni_modules/uview-plus/components/u-swiper/u-swiper.js";
const _easycom_up_loading_page = () => "../../uni_modules/uview-plus/components/u-loading-page/u-loading-page.js";
if (!Math) {
(_easycom_up_image + _easycom_up_swiper)();
(_easycom_up_image + _easycom_up_swiper + _easycom_up_loading_page)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
@@ -144,22 +88,25 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
width: "200",
height: "20"
}),
g: common_vendor.f($data.productList, (item, k0, i0) => {
return common_vendor.e({
a: "085f0530-4-" + i0,
g: common_vendor.p({
loading: $data.productListLoading
}),
h: common_vendor.f($data.productList, (item, index, i0) => {
return {
a: "085f0530-5-" + i0,
b: common_vendor.p({
src: item.url,
width: "100",
height: "100",
bgColor: "#f1f6ff00"
}),
c: item.type === 1
}, item.type === 1 ? {} : {}, {
d: common_vendor.t(item.name),
e: common_vendor.t(item.oPrice),
f: common_vendor.t(item.zqPrice),
g: common_vendor.t(item.price)
});
c: common_vendor.t(item.title),
d: common_vendor.t(item.adPrice),
e: common_vendor.t(item.adPrice),
f: common_vendor.t(item.adPrice),
g: index,
h: common_vendor.o(($event) => $options.jumpInfo(item), index)
};
})
};
}
+2 -1
View File
@@ -2,6 +2,7 @@
"navigationStyle": "custom",
"usingComponents": {
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image",
"up-swiper": "../../uni_modules/uview-plus/components/u-swiper/u-swiper"
"up-swiper": "../../uni_modules/uview-plus/components/u-swiper/u-swiper",
"up-loading-page": "../../uni_modules/uview-plus/components/u-loading-page/u-loading-page"
}
}
+1 -1
View File
@@ -1 +1 @@
<view class="preference_warp data-v-085f0530"><view class="header_comm data-v-085f0530"><up-image wx:if="{{b}}" class="data-v-085f0530" bindclick="{{a}}" u-i="085f0530-0" bind:__l="__l" u-p="{{b}}"></up-image><view class="data-v-085f0530">爆款专区</view><up-image wx:if="{{d}}" class="data-v-085f0530" bindclick="{{c}}" u-i="085f0530-1" bind:__l="__l" u-p="{{d}}"></up-image></view><view class="preference_content_warp data-v-085f0530"><up-swiper wx:if="{{e}}" class="data-v-085f0530" u-i="085f0530-2" bind:__l="__l" u-p="{{e}}"></up-swiper><view class="preference_title data-v-085f0530"><up-image wx:if="{{f}}" class="data-v-085f0530" u-i="085f0530-3" bind:__l="__l" u-p="{{f}}"></up-image><view class="msg data-v-085f0530">款款都是爆款</view></view><view class="preference_product data-v-085f0530"><view wx:for="{{g}}" wx:for-item="item" class="product_item data-v-085f0530"><view class="product_item_left data-v-085f0530"><up-image wx:if="{{item.b}}" class="data-v-085f0530" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view wx:if="{{item.c}}" class="product_item_left_bz product_item_left_bz_img data-v-085f0530"><view class="data-v-085f0530">爆款专区</view></view></view><view class="product_item_right data-v-085f0530"><view class="title_warp data-v-085f0530">{{item.d}}</view><view class="price_warp data-v-085f0530"><view class="price_o_warp data-v-085f0530"><view class="price_o_title_warp data-v-085f0530">原价</view><view class="price_o_value_warp data-v-085f0530"><text class="data-v-085f0530">¥</text><text class="data-v-085f0530">{{item.e}}</text></view></view><view class="price_zq_warp data-v-085f0530"><view class="price_lj_warp data-v-085f0530">专区立省{{item.f}}元</view><view class="price_ds_warp data-v-085f0530">到手¥<text class="data-v-085f0530" style="font-size:31rpx">{{item.g}}</text></view></view></view></view></view></view></view></view>
<view class="preference_warp data-v-085f0530"><view class="header_comm data-v-085f0530"><up-image wx:if="{{b}}" class="data-v-085f0530" bindclick="{{a}}" u-i="085f0530-0" bind:__l="__l" u-p="{{b}}"></up-image><view class="data-v-085f0530">爆款专区</view><up-image wx:if="{{d}}" class="data-v-085f0530" bindclick="{{c}}" u-i="085f0530-1" bind:__l="__l" u-p="{{d}}"></up-image></view><view class="preference_content_warp data-v-085f0530"><up-swiper wx:if="{{e}}" class="data-v-085f0530" u-i="085f0530-2" bind:__l="__l" u-p="{{e}}"></up-swiper><view class="preference_title data-v-085f0530"><up-image wx:if="{{f}}" class="data-v-085f0530" u-i="085f0530-3" bind:__l="__l" u-p="{{f}}"></up-image><view class="msg data-v-085f0530">款款都是爆款</view></view><view class="preference_product data-v-085f0530"><up-loading-page wx:if="{{g}}" class="data-v-085f0530" u-i="085f0530-4" bind:__l="__l" u-p="{{g}}"></up-loading-page><view wx:for="{{h}}" wx:for-item="item" wx:key="g" class="product_item data-v-085f0530" bindtap="{{item.h}}"><view class="product_item_left data-v-085f0530"><up-image wx:if="{{item.b}}" class="data-v-085f0530" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></up-image><view class="product_item_left_bz product_item_left_bz_img data-v-085f0530"><view class="data-v-085f0530">爆款专区</view></view></view><view class="product_item_right data-v-085f0530"><view class="title_warp data-v-085f0530">{{item.c}}</view><view class="price_warp data-v-085f0530"><view class="price_o_warp data-v-085f0530"><view class="price_o_title_warp data-v-085f0530">原价</view><view class="price_o_value_warp data-v-085f0530"><text class="data-v-085f0530">¥</text><text class="data-v-085f0530">{{item.d}}</text></view></view><view class="price_zq_warp data-v-085f0530"><view class="price_lj_warp data-v-085f0530">专区立省{{item.e}}元</view><view class="price_ds_warp data-v-085f0530">到手¥<text class="data-v-085f0530" style="font-size:31rpx">{{item.f}}</text></view></view></view></view></view></view></view></view>
+1 -1
View File
@@ -18,7 +18,7 @@
}
},
"compileType": "miniprogram",
"libVersion": "3.7.8",
"libVersion": "3.7.11",
"appid": "touristappid",
"projectname": "哈希优品",
"condition": {
+28 -7
View File
@@ -7,6 +7,34 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/LuckyWheel/LuckyWheel",
"pathName": "pages/LuckyWheel/LuckyWheel",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/welcome/welcome",
"pathName": "pages/welcome/welcome",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "好物",
"pathName": "pages/preference/preference",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "详情",
"pathName": "pages/productInfo/productInfo",
"query": "id=1003",
"launchMode": "default",
"scene": null
},
{
"name": "提交订单",
"pathName": "pages/order_submit/order_submit",
@@ -105,13 +133,6 @@
"launchMode": "default",
"scene": null
},
{
"name": "我的订单",
"pathName": "pages/mine_order/mine_order",
"query": "type=0",
"launchMode": "default",
"scene": null
},
{
"name": "钱包",
"pathName": "pages/mine_purse/mine_purse",
+4
View File
@@ -1,2 +1,6 @@
"use strict";
const BASE_URL = "http://cl55un59859.vicp.fun:24346";
const APPID = "hmuk25aaf86reta9sdwpo";
exports.APPID = APPID;
exports.BASE_URL = BASE_URL;
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/config.js.map
+2 -6
View File
@@ -6,12 +6,8 @@ const ORDER_STATUS_CSS = {
//待发货
3: "#FF0050",
//待收货
4: "#999999",
//已完成
5: "#999999",
//退款中
6: "#999999"
//已取消
4: "#999999"
//待评价
};
exports.ORDER_STATUS_CSS = ORDER_STATUS_CSS;
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/enumCssUtils.js.map
+16 -14
View File
@@ -13,25 +13,25 @@ function getValue(optionArr, key) {
}
const SMS_TYPE = {
"PASSWD": "passwd",
"LOGIN": "login"
"LOGIN": "login",
"REGISTER": "register"
};
const ORDER_TYPE = {
"ALL": 0,
"UNPAID": 1,
"UNPAID": 0,
"PAYMENT_IMG": 1,
"UNSHIPPED": 2,
"NOT_RECEIVE": 3,
"AFTER_SALE": 4,
"CANCELED": 5,
"COMPLETED": 6
"SUCCEED": 4,
"CLOSE": 5
};
const ORDER_STATUS = [
{
key: 0,
name: "全部"
name: "待支付"
},
{
key: 1,
name: "待付款"
name: "支付中"
},
{
key: 2,
@@ -43,15 +43,11 @@ const ORDER_STATUS = [
},
{
key: 4,
name: "退款售后"
name: "交易成功"
},
{
key: 5,
name: "已取消"
},
{
key: 6,
name: "已完成"
name: "交易关闭"
}
];
const PAYMENT_WAY = {
@@ -82,11 +78,17 @@ const PRODUCT_DELIVERY_TIME = [
value: "大于48小时发货"
}
];
const SEARCH_TYPE = {
NORMAL: 0,
EXPLOSIVE: 1,
SOMETHING: 2
};
exports.ORDER_STATUS = ORDER_STATUS;
exports.ORDER_TYPE = ORDER_TYPE;
exports.PAYMENT_WAY = PAYMENT_WAY;
exports.PAYMENT_WAY_ = PAYMENT_WAY_;
exports.PRODUCT_DELIVERY_TIME = PRODUCT_DELIVERY_TIME;
exports.SEARCH_TYPE = SEARCH_TYPE;
exports.SMS_TYPE = SMS_TYPE;
exports.getValue = getValue;
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/enumUtils.js.map
+61 -10
View File
@@ -1,21 +1,23 @@
"use strict";
const common_vendor = require("../common/vendor.js");
const utils_auth = require("./auth.js");
const baseUrl = "http://192.168.0.108:8087";
const utils_config = require("./config.js");
function request(options) {
const { url, method = "GET", data = {}, headers = {} } = options;
const token = utils_auth.getStorageFun(utils_auth.TOKEN_NAME);
const defaultHeaders = {
"HSM-AUTH": token ? token : "",
// 如果存在token, 则添加到请求头中
// 'HSM-AUTH': token ? token : '', // 如果存在token, 则添加到请求头中
"content-type": ["post", "POST"].includes(method) ? "application/x-www-form-urlencoded" : "application/json"
};
if (token) {
defaultHeaders["HSM-AUTH"] = token;
}
return new Promise((resolve, reject) => {
common_vendor.index.showLoading({
title: "加载中..."
});
common_vendor.index.request({
url: baseUrl + url,
url: utils_config.BASE_URL + url,
method,
data,
header: {
@@ -25,17 +27,66 @@ function request(options) {
},
success: (res) => {
common_vendor.index.hideLoading();
if (res.statusCode === 200) {
resolve(res.data);
} else if (res.statusCode === 201) {
reject(new Error("Unauthorized"));
const data2 = res.data;
if (data2.bizcode === 100) {
resolve(data2);
} else if (data2.bizcode === 201) {
if ([201, 200].includes(data2.errcode)) {
common_vendor.index.showToast({
title: "登录失效,请从新登录",
icon: "none",
// 可选 success/loading/none
duration: 2e3,
// 持续时长,单位ms
mask: false,
// 是否显示透明蒙层,防止触摸穿透
position: "middle"
// 位置,可选 top/middle/bottom
});
} else {
common_vendor.index.showToast({
title: data2.msg,
icon: "none",
// 可选 success/loading/none
duration: 2e3,
// 持续时长,单位ms
mask: false,
// 是否显示透明蒙层,防止触摸穿透
position: "middle"
// 位置,可选 top/middle/bottom
});
}
if ([201, 200, 205].includes(data2.errcode)) {
setTimeout(() => {
common_vendor.index.navigateTo({
url: "/pages/login/login"
});
}, 2e3);
}
} else {
reject(res);
common_vendor.index.showToast({
title: data2.msg,
icon: "error",
// 可选 success/loading/none
duration: 2e3,
// 持续时长,单位ms
mask: false
// 是否显示透明蒙层,防止触摸穿透
});
reject(data2);
}
},
fail: (error) => {
common_vendor.index.hideLoading();
reject(error);
common_vendor.index.showToast({
title: "服务器异常,稍后再试",
icon: "error",
// 可选 success/loading/none
duration: 2e3,
// 持续时长,单位ms
mask: false
// 是否显示透明蒙层,防止触摸穿透
});
}
});
});