Compare commits

...

54 Commits

Author SHA1 Message Date
DESKTOP-GMUNQ1B\k
64b7a52d22 1 2024-04-09 18:04:54 +08:00
SK-20231103YIXF\Administrator
e8d2053c69 1 2024-04-09 09:22:14 +08:00
SK-20231103YIXF\Administrator
7ce2829aa5 2 2024-04-08 16:42:44 +08:00
DESKTOP-GMUNQ1B\k
20834e3d99 bug修改 2024-04-07 17:16:49 +08:00
DESKTOP-GMUNQ1B\k
068b3a12df 1 2024-04-03 17:41:28 +08:00
weipengfei
2b2d3891ba 1 2024-04-03 13:47:09 +08:00
DESKTOP-GMUNQ1B\k
cda31b548e 1 2024-04-02 18:35:04 +08:00
DESKTOP-GMUNQ1B\k
48018b340b 1 2024-04-02 16:37:16 +08:00
DESKTOP-GMUNQ1B\k
4e9e9862db 1 2024-04-02 14:46:49 +08:00
weipengfei
5bf33c61c0 新增商品送货方式 2024-04-02 14:43:54 +08:00
weipengfei
761fef7e32 更新 2024-04-02 14:22:22 +08:00
DESKTOP-GMUNQ1B\k
fde2ed3eee 1 2024-04-01 11:36:40 +08:00
DESKTOP-GMUNQ1B\k
34a21b8fb0 提现修改 2024-03-30 11:05:34 +08:00
DESKTOP-GMUNQ1B\k
926c71c0d3 1 2024-03-29 17:09:20 +08:00
weipengfei
83e56bb3ff 更新 2024-03-29 11:20:59 +08:00
weipengfei
db2f611ba2 更新 2024-03-27 17:20:24 +08:00
DESKTOP-GMUNQ1B\k
2fab29d60c 1 2024-03-27 15:39:38 +08:00
DESKTOP-GMUNQ1B\k
e9a8aed642 q 2024-03-27 15:10:27 +08:00
weipengfei
bc4a352a2d 更新 2024-03-26 18:07:58 +08:00
weipengfei
2244c6edac Merge branch 'new' of https://gitea.lihaink.cn/mkm/shop-applet into new 2024-03-26 17:21:27 +08:00
weipengfei
38d8bb7c81 更新 2024-03-26 17:21:22 +08:00
DESKTOP-GMUNQ1B\k
cdd1fee2f8 1 2024-03-26 17:10:08 +08:00
DESKTOP-GMUNQ1B\k
f4cf86803e 商户审核 2024-03-25 17:00:20 +08:00
DESKTOP-GMUNQ1B\k
9ce6ec1c2a 1 2024-03-23 18:24:59 +08:00
DESKTOP-GMUNQ1B\k
8f36cee5a4 1 2024-03-23 18:01:12 +08:00
DESKTOP-GMUNQ1B\k
ec27fd1ffe 1 2024-03-23 14:40:10 +08:00
weipengfei
f433a6f239 修复bug 2024-03-22 18:23:17 +08:00
DESKTOP-GMUNQ1B\k
8405461850 1 2024-03-22 17:42:25 +08:00
weipengfei
51448c0cf6 更新 2024-03-22 16:32:27 +08:00
weipengfei
dd2396275a 更新 2024-03-22 16:02:41 +08:00
weipengfei
57b2bc9b59 更新 2024-03-22 15:49:25 +08:00
weipengfei
d80bac72e2 更新 2024-03-22 14:51:05 +08:00
weipengfei
4ae04408b4 Merge branch 'new' of https://gitea.lihaink.cn/mkm/shop-applet into new 2024-03-22 10:52:03 +08:00
weipengfei
00f2d3487a 更新 2024-03-22 10:51:54 +08:00
DESKTOP-GMUNQ1B\k
47b4284326 1 2024-03-22 10:50:55 +08:00
weipengfei
8167f71bfd Merge branch 'new' of https://gitea.lihaink.cn/mkm/shop-applet into new 2024-03-21 17:31:38 +08:00
weipengfei
95431d4bd6 修复bug 2024-03-21 17:26:58 +08:00
DESKTOP-GMUNQ1B\k
735e91b8b2 1 2024-03-21 16:44:52 +08:00
weipengfei
ece51bf8d8 Merge branch 'new' of https://gitea.lihaink.cn/mkm/shop-applet into new 2024-03-21 15:26:03 +08:00
weipengfei
af0d0b8ef8 更新 2024-03-21 15:25:58 +08:00
DESKTOP-GMUNQ1B\k
e0f0987ea6 1 2024-03-21 14:42:09 +08:00
weipengfei
9d5b5426f9 更新 2024-03-21 14:36:49 +08:00
weipengfei
c9fd0ac0ab 更新 2024-03-21 14:08:57 +08:00
weipengfei
b832389a2c Merge branch 'new' of https://gitea.lihaink.cn/mkm/shop-applet into new 2024-03-21 11:23:03 +08:00
weipengfei
6b11dd932c 更新 2024-03-21 11:21:29 +08:00
DESKTOP-GMUNQ1B\k
0a4bfff2df 1 2024-03-21 11:20:37 +08:00
DESKTOP-GMUNQ1B\k
6a2a0778b4 类型改变 2024-03-20 17:32:43 +08:00
weipengfei
b92ef54b5f 新增商品详情 2024-03-20 16:42:39 +08:00
weipengfei
bd06f19214 更新 2024-03-20 16:29:58 +08:00
weipengfei
9f71108ece Merge branch 'new' of https://gitea.lihaink.cn/mkm/shop-applet into new 2024-03-19 18:15:34 +08:00
weipengfei
c6baaf7555 更新 2024-03-19 18:15:20 +08:00
DESKTOP-GMUNQ1B\k
a0b3ec00f6 1 2024-03-19 18:10:33 +08:00
weipengfei
d69560e61d 更新 2024-03-19 14:46:13 +08:00
DESKTOP-GMUNQ1B\k
4537bbaa0f 商户收款 2024-03-18 16:36:42 +08:00
92 changed files with 12500 additions and 8856 deletions

99
App.vue
View File

@ -16,13 +16,11 @@
checkLogin
} from "./libs/login";
import {
getUserInfo
} from '@/api/user.js';
import {
parseToken
} from "@/api/appLet.js";
import {
parseToken
} from "@/api/appLet.js";
import {
HTTP_REQUEST_URL
} from './config/app';
@ -32,7 +30,9 @@
history
} from '@/api/public.js'
import Routine from './libs/routine.js';
import { Toast } from "./libs/uniApi";
import {
Toast
} from "./libs/uniApi";
export default {
data() {
@ -97,52 +97,47 @@
key: 'launchFlag'
})
//
// parseToken({
// token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXNoaS1taWRkbGUubGloYWluay5jbiIsImF1ZCI6ImNlc2hpLW1pZGRsZS5saWhhaW5rLmNuIiwiaWF0IjoxNzAwNjIwMjUxLCJuYmYiOjE3MDA2MjAyNTEsImV4cCI6MTcwMTIyNTA1MSwiZGF0YSI6eyJ1aWQiOjUsInBob25lIjoiMTc2ODUxNTE2NDMiLCJhdmF0YXIiOiIvcmVzb3VyY2UvaW1hZ2UvYWRtaW5hcGkvZGVmYXVsdC9kZWZhdWx0X2F2YXRhci5wbmciLCJuaWNrbmFtZSI6Ilx1NzUyOFx1NjIzNzE3Njg1MTUxNjQzIn19.sTWAHCScRY9FExwJw1MReHTnRBcK7tYu1AMSia_Sm4M'
// }).then((res)=>{
// this.$store.commit("LOGIN", {
// 'token': res.data.token,
// 'time': 604800
// });
// this.$isResolve()
// }).catch((err)=>{
// if(err==''){
// this.$store.commit("LOGIN", {
// 'token': option.referrerInfo?.extraData?.uniMP,
// 'time': 604800
// });
// }else {
// Toast(err);
// }
// this.$isResolve()
// })
//
// parseToken({
// token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXNoaS1taWRkbGUubGloYWluay5jbiIsImF1ZCI6ImNlc2hpLW1pZGRsZS5saWhhaW5rLmNuIiwiaWF0IjoxNzAwNjIwMjUxLCJuYmYiOjE3MDA2MjAyNTEsImV4cCI6MTcwMTIyNTA1MSwiZGF0YSI6eyJ1aWQiOjUsInBob25lIjoiMTc2ODUxNTE2NDMiLCJhdmF0YXIiOiIvcmVzb3VyY2UvaW1hZ2UvYWRtaW5hcGkvZGVmYXVsdC9kZWZhdWx0X2F2YXRhci5wbmciLCJuaWNrbmFtZSI6Ilx1NzUyOFx1NjIzNzE3Njg1MTUxNjQzIn19.sTWAHCScRY9FExwJw1MReHTnRBcK7tYu1AMSia_Sm4M'
// }).then((res)=>{
// this.$store.commit("LOGIN", {
// 'token': res.data.token,
// 'time': 604800
// });
// this.$isResolve()
// }).catch((err)=>{
// if(err==''){
// this.$store.commit("LOGIN", {
// 'token': option.referrerInfo?.extraData?.uniMP,
// 'time': 604800
// });
// }else {
// Toast(err);
// }
// this.$isResolve()
// })
if (option?.referrerInfo?.extraData?.uniMP) {
uni.setStorageSync('uniMP', option.referrerInfo?.extraData?.uniMP);
// this.$store.commit("LOGIN", {
// 'token': option.referrerInfo?.extraData?.token,
// 'time': 604800
// });
parseToken({
token: option.referrerInfo?.extraData?.token
}).then((res)=>{
this.$store.commit("LOGIN", {
'token': res.data.token,
'time': 604800
});
this.$isResolve()
}).catch((err)=>{
this.$store.commit("LOGIN", {
'token': option.referrerInfo?.extraData?.token,
'time': 604800
});
console.log('TOKEN解析错误:', err);
this.$isResolve()
})
}else {
this.$isResolve()
}
parseToken({
token: option.referrerInfo?.extraData?.token
}).then((res) => {
this.$store.commit("LOGIN", {
'token': res.data.token,
'time': 604800
});
this.$isResolve()
}).catch((err) => {
this.$store.commit("LOGIN", {
'token': option.referrerInfo?.extraData?.token,
'time': 604800
});
this.$isResolve()
})
} else {
this.$isResolve()
}
// #ifdef APP-PLUS
// #endif
@ -436,6 +431,12 @@
box-sizing: border-box;
}
.c_active {
&:active {
opacity: .8;
}
}
.custom_style {
color: #fff;
display: flex;

View File

@ -9,6 +9,14 @@
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
/**
* 设置自提人姓名 电话
* @returns {*}
*/
export function delivery(data) {
return request.post(`admin/${data.mer_id}/delivery/${data.order_id}`, data);
}
/**
* 统计数据
*/
@ -363,4 +371,22 @@ export function getSubsidyRecord(merId, data) {
return request.get(`server/${merId}/subsidyRecord`, data, {
login: true
});
}
/*
领取补贴
*/
export function couponReceive(data) {
return request.get(`server/${data.mer_id}/subsidyReceive/${data.id}`);
}
/*
拒绝领取补贴
*/
export function couponRefuse(data) {
return request.post(`server/${data.mer_id}/subsidyRefuse/${data.id}`, {
reason: data.reason
}, {
login: true
});
}

View File

@ -206,6 +206,13 @@ export function modifyPhone(data) {
export function modifyPassword(data) {
return request.post('user/change/password', data);
}
/** 设置支付密码 */
export function setPayPwd(data) {
return request.post('User/set/withdrawal_pwd', data);
}
/** 退出登錄 */
export function logout() {
return request.get('logout');

View File

@ -1,7 +1,7 @@
import request from "@/utils/request.js";
/**
* 文章详情
*
*
*/
export function parseToken(data) {

View File

@ -9,6 +9,14 @@
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
/**
* 校验支付密码是否正确
* @param numType
*/
export function verifyPwd(data) {
return request.post("order/verifyPwd", data);
}
/**
* 获取购物车列表
* @param numType boolean true 购物车数量,false=购物车产品数量

View File

@ -16,6 +16,13 @@ export function addCart(data) {
return request.post(`user/cart/create`, data);
}
/**
* 根据店铺 获取商品
*/
export function getProductInfo1(data) {
return request.get(`order_mix`, data);
}
/**
* 根据店铺id 获取店铺信息
*/

View File

@ -9,6 +9,17 @@
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
/**
* 商户类型列表
*/
export const intentionList = (data) => request.get('intention/detail', data)
/**
* 商户类型申请
*/
export const shopTypeChange = (data) => request.post('intention/change', data)
/**
* 获取商品详情
*/
@ -328,5 +339,4 @@ export function intention(data) {
*/
export function intentionbus(data) {
return request.post(`intention/business`, data);
}
}

View File

@ -1,5 +1,16 @@
import request from "@/utils/request.js";
/**
* 获取商铺云商品列表
* @param {Object} id 商铺 id
* @param {Object} data 商铺商品列表数据
*/
export function getStoreCloudGoods(id, data) {
return request.get("product/spu/merchant/" + id + "/merCloudProduct", data, {
noAuth: true
});
}
/**
* 扫码查询商品
*
@ -595,8 +606,7 @@ export function vicinityStoreApi(data) {
商家入驻 -- 获取商户入驻申请协议内容
*/
export function agreeiness(data) {
return request.get(`business/agree`, data, { noAuth: true });
}
return request.get(`business/agree`, data, {
noAuth: true
});
}

View File

@ -8,88 +8,128 @@
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
import request1 from "@/utils/requestb.js";
import Cache from '@/utils/cache'
/**
* 报错信息记录
*/
export function errorReport(data) {
return request.post(`api/err/report`, data);
}
/**
* 提现----查询单条信息
*/
export function getById(id) {
return request.get(`admin/${id}/get_one`);
}
/**
* 提现----审核进度
*/
export function progressBankList(merId) {
return request.get(`admin/${merId}/bank_progress`);
}
/**
* 提现----添加银行卡
*/
export function addBank(merId, data) {
return request.post(`admin/${merId}/add_bank`, data);
}
/**
* 提现----查询银行卡
*/
export function searchBank(merId) {
return request.get(`admin/${merId}/bank_list`);
}
/**
* 获取版本信息
*/
export function Appversion(data) {
return request.get(`app/version`, data, {
noAuth: true
});
return request.get(`app/version`, data, {
noAuth: true
});
}
/**
* 提交提现
*/
export function postCreateApplyAPI(merId, data) {
return request.post(`admin/${merId}/create_apply`, data);
return request.post(`admin/${merId}/create_apply`, data);
}
/**
* 申请提现
*/
export function getAdminApplyAPI(merId, data) {
return request.get(`admin/${merId}/apply`, data);
return request.get(`admin/${merId}/apply`, data);
}
/**
* 提现记录
*/
export function getAdminApplyListAPI(merId) {
return request.get(`admin/${merId}/lis_apply`);
return request.get(`admin/${merId}/lis_apply`);
}
/**
* 获取用户信息
*
*/
export function getUserInfo() {
return request.get('user');
return request.get('user');
}
/**
* 头像
*
*/
export function editAvatar(data) {
return request.post('user/change/info', data);
return request.post('user/change/info', data);
}
// 修改昵称
export function updateInfo(data) {
return request.post('user/change/avatar', data);
return request.post('user/change/avatar', data);
}
/**
* h5用户登录
* @param data object 用户账号密码
*/
export function loginH5(data) {
return request.post("auth/login", data, {
noAuth: true
});
return request.post("auth/login", data, {
noAuth: true
});
}
/**
* h5用户手机号登录
* @param data object 用户手机号 也只能
*/
export function loginMobile(data) {
return request.post("auth/smslogin", data, {
noAuth: true
});
return request.post("auth/smslogin", data, {
noAuth: true
});
}
/**
* h5用户手机号登录
* @param data object 用户手机号 也只能
*/
export function loginMpPhone(data) {
return request.post("auth/mp_phone", data, {
noAuth: true
});
return request.post("auth/mp_phone", data, {
noAuth: true
});
}
/**
* 验证码key
*/
export function getCodeApi() {
return request.get("verify_code", {}, {
noAuth: true
});
return request.get("verify_code", {}, {
noAuth: true
});
}
/**
@ -97,18 +137,18 @@ export function getCodeApi() {
* @param data object 用户手机号
*/
export function registerVerify(data) {
return request.post("auth/verify", data, {
noAuth: true
});
return request.post("auth/verify", data, {
noAuth: true
});
}
/**
* h5用户手机号注册
* @param data object 用户手机号 验证码 密码
*/
export function register(data) {
return request.post("auth/register", data, {
noAuth: true
});
return request.post("auth/register", data, {
noAuth: true
});
}
/**
@ -116,30 +156,32 @@ export function register(data) {
* @param data object 用户手机号 验证码 密码
*/
export function registerReset(data) {
return request.post("/register/reset", data, {
noAuth: true
});
return request.post("/register/reset", data, {
noAuth: true
});
}
/**
* 用户手机号忘记密码
*/
export function registerForget(data) {
return request.post("user/change_pwd", data, {
noAuth: true
});
return request.post("user/change_pwd", data, {
noAuth: true
});
}
/**
* 获取用户中心菜单
*
*/
export function getMenuList() {
return request.get("common/menus", {}, { noAuth: true });
return request.get("common/menus", {}, {
noAuth: true
});
}
/*
* 签到用户信息
* */
export function getSignUser() {
return request.get("user/sign/info");
return request.get("user/sign/info");
}
/**
@ -147,20 +189,20 @@ export function getSignUser() {
*
*/
export function getSignConfig() {
return request.get('sign/config')
return request.get('sign/config')
}
/**
* 获取签到列表
* @param object data
*/
export function getSignList(data) {
return request.get('user/sign/lst', data);
return request.get('user/sign/lst', data);
}
/**
* 用户签到
*/
export function setSignIntegral() {
return request.post('user/sign/create')
return request.post('user/sign/create')
}
/**
@ -169,32 +211,32 @@ export function setSignIntegral() {
*
*/
export function getSignMonthList(data) {
return request.get('user/sign/month', data)
return request.get('user/sign/month', data)
}
/**
* 活动状态
*
*/
export function userActivity() {
return request.get('user/activity');
return request.get('user/activity');
}
/*
* 资金明细types|0=全部,1=消费,2=充值,3=返佣
* */
export function getCommissionInfo(q, types) {
return request.get("user/bill", q);
return request.get("user/bill", q);
}
/*
* 提现列表
* */
export function extractLst(data) {
return request.get("user/extract/lst", data);
return request.get("user/extract/lst", data);
}
/*
* 积分记录
* */
export function getIntegralList(data) {
return request.get("user/integral/lst", data);
return request.get("user/integral/lst", data);
}
/**
@ -202,16 +244,16 @@ export function getIntegralList(data) {
*
*/
export function spreadBanner() {
//#ifdef H5
return request.get('user/spread_image', {
type: 'wechat'
});
//#endif
//#ifdef MP
return request.get('user/spread_image', {
type: 'routine'
});
//#endif
//#ifdef H5
return request.get('user/spread_image', {
type: 'wechat'
});
//#endif
//#ifdef MP
return request.get('user/spread_image', {
type: 'routine'
});
//#endif
}
/**
*
@ -219,7 +261,7 @@ export function spreadBanner() {
* @param object data
*/
export function spreadPeople(data) {
return request.get('user/spread_list', data);
return request.get('user/spread_list', data);
}
/**
*
@ -227,13 +269,13 @@ export function spreadPeople(data) {
* @param int type
*/
export function spreadCount(type) {
return request.get('spread/count/' + type);
return request.get('spread/count/' + type);
}
/*
* 推广数据
* */
export function getSpreadInfo() {
return request.get("/commission");
return request.get("/commission");
}
/**
*
@ -241,54 +283,54 @@ export function getSpreadInfo() {
* @param object data
*/
export function spreadOrder(data) {
return request.get('user/spread_order', data);
return request.get('user/spread_order', data);
}
/*
* 获取推广人排行
* */
export function getRankList(data) {
return request.get("user/spread_top", data);
return request.get("user/spread_top", data);
}
/*
* 获取佣金排名
* */
export function getBrokerageRank(q) {
return request.get("user/brokerage_top", q);
return request.get("user/brokerage_top", q);
}
/**
* 提现申请
* @param object data
*/
export function extractCash(data) {
return request.post('user/extract/create', data)
return request.post('user/extract/create', data)
}
/**
* 提现银行/提现最低金额
*
*/
export function extractBank() {
return request.get('user/extract/banklst');
return request.get('user/extract/banklst');
}
/**
* 会员等级列表
*
*/
export function userLevelGrade() {
return request.get('user/level/grade');
return request.get('user/level/grade');
}
/**
* 获取某个等级任务
* @param int id 任务id
*/
export function userLevelTask(id) {
return request.get('user/level/task/' + id);
return request.get('user/level/task/' + id);
}
/**
* 检查用户是否可以成为会员
*
*/
export function userLevelDetection() {
return request.get('user/level/detection');
return request.get('user/level/detection');
}
/**
*
@ -296,21 +338,21 @@ export function userLevelDetection() {
* @param object data
*/
export function getAddressList(data) {
return request.get('user/address/lst', data);
return request.get('user/address/lst', data);
}
/**
* 设置默认地址
* @param int id
*/
export function setAddressDefault(id) {
return request.post('user/address/update/' + id)
return request.post('user/address/update/' + id)
}
/**
* 修改 添加地址
* @param object data
*/
export function editAddress(data) {
return request.post('user/address/create', data);
return request.post('user/address/create', data);
}
/**
* 删除地址
@ -318,285 +360,287 @@ export function editAddress(data) {
*
*/
export function delAddress(id) {
return request.post('user/address/delete/' + id)
return request.post('user/address/delete/' + id)
}
/**
* 获取单个地址
* @param int id
*/
export function getAddressDetail(id) {
return request.get('user/address/detail/' + id);
return request.get('user/address/detail/' + id);
}
/**
* 修改用户信息
* @param object
*/
export function userEdit(data) {
return request.post('user/edit', data);
return request.post('user/edit', data);
}
/*
* 退出登录
* */
export function getLogout() {
return request.post("logout");
return request.post("logout");
}
/**
* 佣金转入
*
*/
export function rechargeBrokerage(data) {
return request.post('user/recharge/brokerage', data)
return request.post('user/recharge/brokerage', data)
}
/**
* 小程序充值
*
*/
export function rechargeRoutine(data) {
return request.post('recharge/routine', data)
return request.post('recharge/routine', data)
}
/*
* 公众号充值
* */
export function rechargeWechat(data) {
return request.post("user/recharge", data);
return request.post("user/recharge", data);
}
/**
* 获取默认地址
*
*/
export function getAddressDefault() {
return request.get('address/default');
return request.get('address/default');
}
/**
* 充值金额选择
*/
export function getRechargeApi() {
return request.get("common/recharge_quota");
return request.get("common/recharge_quota");
}
/**
* 登陆记录
*/
export function setVisit(data) {
return request.post('user/set_visit', {
...data
}, {
noAuth: true
});
return request.post('user/set_visit', {
...data
}, {
noAuth: true
});
}
/**
* 客服列表
*/
export function serviceList(data) {
return request.get("service/list", data);
return request.get("service/list", data);
}
/**
* 客服列表
*/
export function serviceLogin(key, data) {
return request.post("service/scan_login/" + key, data);
return request.post("service/scan_login/" + key, data);
}
/**
* 客服获取客户列表
*/
export function serviceUserList(mer_id, data) {
return request.get("service/user_list/" + mer_id, data);
return request.get("service/user_list/" + mer_id, data);
}
/**
* 用户获取聊天记录详情
*/
export function getChatRecord(to_uid, data) {
return request.get("service/history/" + to_uid, data);
return request.get("service/history/" + to_uid, data);
}
/**
* 客服获取聊天记录详情
*/
export function getMerHistory(userid, mer_id, data) {
return request.get("service/mer_history/" + mer_id + '/' + userid, data);
return request.get("service/mer_history/" + mer_id + '/' + userid, data);
}
/**
* 静默绑定推广人
* @param {Object} puid
*/
export function spread(puid) {
Cache.set("spread", puid || 0);
return request.post("user/spread", {
spread_spid: puid
});
Cache.set("spread", puid || 0);
return request.post("user/spread", {
spread_spid: puid
});
}
/**
* 反馈类型
*/
export function feedbackType() {
return request.get("common/feedback_type");
return request.get("common/feedback_type");
}
/**
* 提交反馈
*/
export function feedback(data) {
return request.post("user/feedback", {
...data
});
return request.post("user/feedback", {
...data
});
}
/**
* 反馈列表
*/
export function feedbackList(data) {
return request.get("user/feedback/list", data);
return request.get("user/feedback/list", data);
}
/**
* 反馈列表
*/
export function feedbackDetail(id) {
return request.get("user/feedback/detail/" + id);
return request.get("user/feedback/detail/" + id);
}
/**
* 浏览记录
*/
export function historyList(data) {
return request.get("user/history", data);
return request.get("user/history", data);
}
/**
* 删除浏览记录
*/
export function historyDelete(id) {
return request.post("user/history/delete/" + id);
return request.post("user/history/delete/" + id);
}
/**
* 批量删除浏览记录
*/
export function historyBatchDelete(data) {
return request.post("user/history/batch/delete", data);
return request.post("user/history/batch/delete", data);
}
/**
* 批量收藏浏览记录
*/
export function historyBatchCollect(data) {
return request.post("user/relation/batch/create", data);
return request.post("user/relation/batch/create", data);
}
/**
* 佣金记录
*/
export function brokerage_list(data) {
return request.get("user/brokerage_list", data);
return request.get("user/brokerage_list", data);
}
/**
* 佣金数据
*/
export function spreadInfo() {
return request.get("user/spread_info");
return request.get("user/spread_info");
}
// 图片验证码
export function getCaptcha() {
return request.get('captcha', {}, {
noAuth: true
});
return request.get('captcha', {}, {
noAuth: true
});
}
// 用户账户列表
export function userAcc() {
return request.get('user/account', {}, {
noAuth: true
});
return request.get('user/account', {}, {
noAuth: true
});
}
// 创建发票
export function invoiceSave(data) {
return request.post('user/receipt/create', data);
return request.post('user/receipt/create', data);
}
// 编辑发票
export function invoiceUpdate(id, data) {
return request.post('user/receipt/update/' + id, data);
return request.post('user/receipt/update/' + id, data);
}
// 获取默认发票
export function invoiceDefault(id) {
return request.post('user/receipt/is_default/' + id);
return request.post('user/receipt/is_default/' + id);
}
// 发票抬头--列表
export function invoice(data) {
return request.get('user/receipt/lst', data);
return request.get('user/receipt/lst', data);
}
// 发票抬头--删除
export function invoiceDelete(id) {
return request.post('user/receipt/delete/' + id);
return request.post('user/receipt/delete/' + id);
}
// 发票--详情
export function invoiceDetail(id) {
return request.get('user/receipt/detail/' + id);
return request.get('user/receipt/detail/' + id);
}
/**
* 新版分享海报信息获取
*
*/
export function spreadMsg(data) {
return request.get('user/v2/spread_image', data);
return request.get('user/v2/spread_image', data);
}
/**
* 图片链接转base64
*
*/
export function imgToBase(data) {
return request.post('common/base64', data);
return request.post('common/base64', data);
}
/**
* 获取协议
*
*/
export function getAgreementApi(key) {
return request.get('agreement/' + key, {}, { noAuth: true });
return request.get('agreement/' + key, {}, {
noAuth: true
});
}
/**
* 获取协议
*
*/
export function getIntegralInfo() {
return request.get('user/integral/info');
return request.get('user/integral/info');
}
/**
* 获取店铺列表
*
*/
export function getStoreList(data) {
return request.get('user/services', data);
return request.get('user/services', data);
}
/*
获取佣金说明
*/
export function commissionDescription() {
return request.get('agreement/sys_extension_agree')
return request.get('agreement/sys_extension_agree')
}
/*
获取用户分销等级信息
*/
export function getBrokerageInfo() {
return request.get('user/brokerage/info')
return request.get('user/brokerage/info')
}
/*
获取用户分销等级表格数据
*/
export function getBrokerageGrade() {
return request.get('user/brokerage/all')
return request.get('user/brokerage/all')
}
/*
分销员升级提醒
*/
export function brokerageNotice(data) {
return request.get(`user/brokerage/notice`, data)
return request.get(`user/brokerage/notice`, data)
}
/*
口令解析
*/
export function pwdResolution(data) {
return request.get(`command/copy?key=${data}`)
return request.get(`command/copy?key=${data}`)
}
/*
获取佣金说明
*/
export function getInstructions(key) {
return request.get(`agreement/${key}`)
return request.get(`agreement/${key}`)
}
/*
会员信息
*/
export function memberInfo() {
return request.get('user/member/info')
return request.get('user/member/info')
}
/**
* 成长值记录
@ -604,7 +648,7 @@ export function memberInfo() {
*
*/
export function growthValueRecord(data) {
return request.get('user/member/log', data)
return request.get('user/member/log', data)
}
/**
* 协议规则列表
@ -612,7 +656,9 @@ export function growthValueRecord(data) {
*
*/
export function cacheLst() {
return request.get('agreement_lst', {}, { noAuth: true })
return request.get('agreement_lst', {}, {
noAuth: true
})
}
/**
* 协议规则列表对应的数据
@ -620,7 +666,9 @@ export function cacheLst() {
*
*/
export function cacheInfo(key) {
return request.get(`agreement/${key}`, {}, { noAuth: true })
return request.get(`agreement/${key}`, {}, {
noAuth: true
})
}
/**
* 注销账户
@ -628,7 +676,7 @@ export function cacheInfo(key) {
*
*/
export function userOut(data) {
return request.post(`user/cancel`, data)
return request.post(`user/cancel`, data)
}
/**
* 获取聊天用户信息
@ -636,7 +684,7 @@ export function userOut(data) {
*
*/
export function serviceUser(merId, uid) {
return request.get(`service/user/${merId}/${uid}`)
return request.get(`service/user/${merId}/${uid}`)
}
/**
* 保存聊天用户备注
@ -644,7 +692,9 @@ export function serviceUser(merId, uid) {
*
*/
export function serviceSaveMark(merId, uid, mark) {
return request.post(`service/mark/${merId}/${uid}`, { mark })
return request.post(`service/mark/${merId}/${uid}`, {
mark
})
}
/**
* 获取会员卡类型
@ -652,7 +702,7 @@ export function serviceSaveMark(merId, uid, mark) {
*
*/
export function memberCard() {
return request.get(`svip/pay_lst`)
return request.get(`svip/pay_lst`)
}
/**
* 开通付费会员--支付
@ -660,7 +710,7 @@ export function memberCard() {
*
*/
export function memberCardCreate(id, data) {
return request.post(`svip/pay/${id}`, data)
return request.post(`svip/pay/${id}`, data)
}
/**
* 付费会员权益
@ -668,7 +718,9 @@ export function memberCardCreate(id, data) {
*
*/
export function memberEquity() {
return request.get(`svip/user_info`, {}, { noAuth: true })
return request.get(`svip/user_info`, {}, {
noAuth: true
})
}
/**
* 付费会员优惠券
@ -676,7 +728,9 @@ export function memberEquity() {
*
*/
export function memberCouponLst() {
return request.get(`svip/coupon_lst`, {}, { noAuth: true })
return request.get(`svip/coupon_lst`, {}, {
noAuth: true
})
}
/**
* 付费会员优惠券--领取
@ -684,7 +738,7 @@ export function memberCouponLst() {
*
*/
export function receiveMemberCoupon(id) {
return request.post(`svip/coupon_receive/${id}`)
return request.post(`svip/coupon_receive/${id}`)
}
/**
* 付费会员--会员商品
@ -692,7 +746,9 @@ export function receiveMemberCoupon(id) {
*
*/
export function groomList(data) {
return request.get(`svip/product_lst`, data, { noAuth: true })
return request.get(`svip/product_lst`, data, {
noAuth: true
})
}
/**
* 客服聊天--撤回消息
@ -700,7 +756,7 @@ export function groomList(data) {
*
*/
export function chatReverstApi(id) {
return request.post(`service/recall/${id}`)
return request.post(`service/recall/${id}`)
}
/**
* 客服聊天--判断店铺是否有在线客服
@ -708,7 +764,7 @@ export function chatReverstApi(id) {
*
*/
export function hasServiceApi(id) {
return request.get(`has_service/${id}`)
return request.get(`has_service/${id}`)
}
/**
* 银行卡提现--银行卡信息
@ -716,11 +772,11 @@ export function hasServiceApi(id) {
*
*/
export function getBankInfo() {
return request.get(`user/extract/history_bank`)
return request.get(`user/extract/history_bank`)
}
// 商户账单管理
export function getBillDetil() {
return request.get(`mer/financial_record`)
return request.get(`mer/financial_record`)
}
@ -728,5 +784,5 @@ export function getBillDetil() {
//获取商户入驻所签署公司
export function merstreet(data) {
return request1.get(`company/street_company`, data);
}
return request1.get(`company/street_company`, data);
}

View File

@ -5,7 +5,7 @@
<view class="c_card">
<view class="c_content">
<scroll-view style="height: 100%;" scroll-y>
<view v-if="info.content" v-html="info.content.content"></view>
<view v-if="info&&info.content&&info.content.content" v-html="info.content.content"></view>
</scroll-view>
</view>
</view>

View File

@ -21,7 +21,7 @@
<view v-else class="money">
<view class="acea-row row-middle">
<view class="acea-row row-middle">
<text></text><text class="num">{{ attr.productSelect.procure_price }}</text>
<text></text><text class="num">{{ attr.productSelect.wholesale_price }}</text>
<view v-if="attr.productSelect && attr.productSelect.svip_price>0" class="acea-row row-middle">
<text class='vip-money'>{{attr.productSelect.svip_price}}</text>
<view class="vipImg">

View File

@ -73,7 +73,7 @@
.z-bootm-img2 {
width: 38rpx;
height: 34rpx;
height: 38rpx;
margin-top: -15rpx;
margin-left: -15rpx;
position: absolute;

View File

@ -0,0 +1,93 @@
<template>
<view>
<uni-popup ref="payModal" type="center" safeArea :animation="true">
<view class="payModal">
<view class="payModal-title">{{code == 101?'未设置密码':'支付密码错误'}}</view>
<view class="payModal-btns">
<view class="wrap" style="display: flex;flex: 1;" v-if="code == 101">
<view class="payModal-btns-left payModal-common" @click="handleClick(1)">设置密码</view>
<view class="payModal-btns-right payModal-common" @click="handleClick(2)">取消</view>
</view>
<view class="wrap" style="display: flex;flex: 1;" v-else>
<view class="payModal-btns-left payModal-common" @click="handleClick(1)">忘记密码</view>
<view class="payModal-btns-right payModal-common" @click="handleClick(2)">重试</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
return {
code: ''
}
},
methods: {
//
handleOpen(code) {
this.code = code;
this.$refs.payModal.open();
},
//
handleClose() {
this.$refs.payModal.close();
},
handleClick(type) {
if (type == 1) {
this.$emit('left', this.code);
} else {
this.$emit("right", this.code);
}
}
}
}
</script>
<style lang="scss">
.payModal {
width: 600rpx;
background-color: #fff;
border-radius: 30rpx;
.payModal-title {
text-align: center;
padding: 40rpx 50rpx 50rpx;
font-size: 30rpx;
color: #333;
border-bottom: 2rpx solid #e6e6e6;
}
.payModal-btns {
display: flex;
flex: 1;
.payModal-btns-left {
height: 88rpx;
line-height: 88rpx;
flex: 1;
text-align: center;
font-weight: bold;
border-right: 2rpx solid #e6e6e6;
color: #333;
}
.payModal-btns-right {
color: #2a5ac2;
}
.payModal-common {
height: 88rpx;
line-height: 88rpx;
flex: 1;
text-align: center;
font-weight: bold;
}
}
}
</style>

View File

@ -5,7 +5,7 @@
选择付款方式<text class="iconfont icon-guanbi" @click='close'></text>
</view>
<view class="item acea-row row-between-wrapper" @click='goPay(item.number || 0 , item.value)'
v-for="(item,index) in payMode" :key="index" v-if="item.payStatus == 1">
v-for="(item,index) in payMode" v-if="item.payStatus==1" :key="index">
<view class="left acea-row row-between-wrapper">
<view class="iconfont" :class="item.icon"></view>
<view class="text">
@ -20,6 +20,12 @@
</view>
</view>
<view class="mask" ref="close" @click='close' v-if="pay_close"></view>
<!-- 支付密码 键盘 -->
<popups ref="popups" :isPay="true" @confirm="handleConfirm" @clear="handleClear" @change="handleChange" />
<!-- 密码错误事件处理 -->
<payPwd ref="payPwd" @left="handleLeft" @right="handleRight"></payPwd>
</view>
</template>
@ -27,7 +33,7 @@
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
@ -35,9 +41,17 @@
// +----------------------------------------------------------------------
import {
orderPay,
presellOrderPay
integralOrderPay,
presellOrderPay,
verifyPwd
} from '@/api/order.js';
import payPwd from "@/components/payPwd/index.vue";
import popups from "@/components/popups/index.vue";
export default {
components: {
payPwd,
popups
},
props: {
payMode: {
type: Array,
@ -64,13 +78,18 @@
isCall: {
type: Boolean,
default: false
},
returnUrl: {
type: String,
default: ''
}
},
data() {
return {
type: ''
};
},
methods: {
close: function() {
this.$emit('onChangeFun', {
@ -78,7 +97,6 @@
});
},
goPay: function(number, paytype) {
if (this.isCall) {
return this.$emit('onChangeFun', {
action: 'payCheck',
@ -99,7 +117,6 @@
// #endif
} else if (paytype == 'balance') {
type = 'balance';
console.log('123');
} else if (paytype == 'alipay') {
// #ifndef MP
type = 'alipay';
@ -107,9 +124,8 @@
// #ifdef MP
type = 'alipayQr';
// #endif
} else if (paytype == 'creditBuy') {
console.log('123123');
type = 'creditBuy'
} else if (paytype == 'public') {
type = 'public';
}
if (!that.order_id) return that.$util.Tips({
title: '请选择要支付的订单'
@ -117,29 +133,79 @@
if (paytype == 'balance' && parseFloat(number) < parseFloat(that.totalPrice)) return that.$util.Tips({
title: '余额不足!'
});
uni.showLoading({
title: '支付中'
this.type = type;
if (paytype == 'balance' || paytype == 'merBalance') {
this.$refs.popups.handleOpen();
} else {
uni.showLoading({
title: '订单支付中'
});
this.trueOrderPay();
}
},
//
handleConfirm(e) {
//
verifyPwd({
withdrawal_pwd: e
}).then(res => {
//
const code = res.data.code;
if (code == 100) { //
uni.showLoading({
title: '订单支付中',
mask: true
});
this.trueOrderPay();
} else {
this.$refs.payPwd.handleOpen(code);
}
}).catch(err => {
console.log(err)
})
},
handleClear() {},
handleChange() {},
// 101 102
handleLeft(code) {
uni.navigateTo({
url: "/pages/users/user_modify_pwd/index?type=payPwd"
});
let orderApi = that.order_type === 1 ? presellOrderPay : orderPay
this.$refs.payPwd.handleClose();
},
//
handleRight(code) {
if (code == 101) { //
this.$refs.payPwd.handleClose(code);
} else {
this.$refs.payPwd.handleClose();
this.$refs.popups.handleOpen();
}
},
trueOrderPay() {
let that = this;
let orderApi = that.order_type === 1 ? presellOrderPay : that.order_type === 2 ? integralOrderPay :
orderPay
orderApi(that.order_id, {
type: type,
type: that.type,
// #ifdef H5
return_url: this.order_type == 98 ? 'http://' + window.location.host +
'/pages/users/order_list/indexCopy' : 'http://' + window.location.host +
'/pages/users/order_list/index',
return_url: that.returnUrl !== '' ? 'http://' + window.location.host + that.returnUrl :
'http://' + window.location.host + '/pages/users/order_list/index',
// #endif
}).then(res => {
let status = res.data.status,
orderId = res.data.result.order_id,
jsConfig = res.data.result.config,
callback_key = res.data.result.pay_key,
goPages = this.order_type == 98 ? '/pages/users/order_list/indexCopy' :
'/pages/users/order_list/index'
goPages = that.returnUrl ? that.returnUrl : '/pages/users/order_list/index';
switch (status) {
case 'ORDER_EXIST':
case 'EXTEND_ORDER':
@ -163,7 +229,7 @@
icon: 'success'
}, {
tab: 5,
url: goPages + '?status=2'
url: goPages + '?status=1'
});
break;
case 'alipay':
@ -185,7 +251,7 @@
jsConfig.timeStamp = jsConfig.timestamp;
// #ifndef APP-PLUS
that.$wechat.pay(jsConfig).then(res => {
// console.log('success'+res.data)
console.log('测试支付数据无效的success' + res.data)
this.$emit('onChangeFun', {
action: 'payClose'
});
@ -195,10 +261,10 @@
icon: 'success'
}, {
tab: 5,
url: goPages + 'status=2'
url: goPages + 'status=1'
});
}).catch(res => {
// console.log('catch'+res.data)
console.log('测试支付数据无效的catch' + res.data)
if (res.errMsg == 'chooseWXPay:cancel') {
if (that.isCall) {
return that.$util.Tips({
@ -209,7 +275,7 @@
title: '取消支付'
}, {
tab: 5,
url: goPages + '?status=1'
url: goPages + '?status=0'
});
}
}
@ -222,7 +288,6 @@
} else {
mp_pay_name = 'requestPayment'
}
console.log(mp_pay_name, jsConfig)
uni[mp_pay_name]({
provider: 'wxpay',
orderInfo: jsConfig,
@ -235,11 +300,10 @@
icon: 'success'
}, {
tab: 5,
url: goPages + 'status=2'
url: goPages + 'status=1'
});
},
fail: (e) => {
console.log(e)
if (that.isCall) {
return that.$util.Tips({
title: '取消支付'
@ -249,7 +313,7 @@
title: '取消支付'
}, {
tab: 5,
url: goPages + '?status=1'
url: goPages + '?status=0'
});
}
},
@ -284,7 +348,7 @@
icon: 'success'
}, {
tab: 5,
url: goPages + '?status=2'
url: goPages + '?status=1'
});
return that.$util.Tips({
@ -292,7 +356,7 @@
icon: 'success'
}, {
tab: 5,
url: goPages + '?status=2'
url: goPages + '?status=1'
});
},
fail: function(e) {
@ -307,10 +371,9 @@
complete: function(e) {
uni.hideLoading();
//
if (res.errMsg == 'requestPayment:cancel') return that.$util
.Tips({
title: '取消支付'
});
if (res.errMsg == 'requestPayment:cancel') return that.$util.Tips({
title: '取消支付'
});
that.$emit('onChangeFun', {
action: 'payClose'
});
@ -329,6 +392,16 @@
});
break;
// #ifdef H5
case "public":
uni.hideLoading();
that.$emit('onChangeFun', {
action: 'payClose'
});
//
return that.$util.Tips({
title: "下单成功,请上传付款凭证!"
});
break;
case 'h5':
let host = window.location.protocol + "//" + window.location.host;
let url = `${host}/pages/order_pay_status/index?order_id=${orderId}`
@ -355,7 +428,7 @@
icon: 'success'
}, {
tab: 5,
url: goPages + 'status=2'
url: goPages + 'status=1'
});
},
@ -392,7 +465,7 @@
border-radius: 16rpx 16rpx 0 0;
background-color: #fff;
padding-bottom: 60rpx;
z-index: 99999;
z-index: 99;
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
transform: translate3d(0, 100%, 0);
}

View File

@ -0,0 +1,247 @@
<template>
<view>
<uni-popup ref="popup" type="bottom" :mask-background-color="isPay?'rgba(0,0,0,.8)':'transparent'" safeArea
backgroundColor="transparent" :animation="true" @maskClick="maskClick">
<view class="popup-wrap" :style="{'border-radius':isPay?'': 0}">
<view class="paybox" v-if="isPay">
<view class="paybox-title">
<view class="paybox-title-left"></view>
<view class="paybox-title-middle">请输入支付密码</view>
<view class="paybox-titler-right" @click="handleClose">
<u-icon name="close" size="18" color="#666" />
</view>
</view>
<view class="paybox-input">
<u-code-input v-model="value" mode="box" dot readonly></u-code-input>
</view>
</view>
<view class="keyboard">
<view class="keyboard-left" :style="{width:isPay?'100%':''}">
<block v-for="(item,indx) in keys" :key="indx">
<view class="keyboard-left-item active del" v-if="item=='del'" @click="handleClick(item)">
<image style="width: 48rpx;height: 48rpx;" src="@/static/del.webp" />
</view>
<view class="keyboard-left-item word active"
:style="{width:isPay?'0%':'',border:isPay?'0':''}" v-else-if="item == '.'"
@click="handleClick(item)">
{{isPay?'':item}}
</view>
<view class="keyboard-left-item word active"
:style="{width:(isPay && item == '0')?'66.66%':''}" v-else @click="handleClick(item)">
{{item}}
</view>
</block>
</view>
<view class="keyboard-right" :style="{width:isPay?'0%':''}">
<view class="keyboard-right-clear word active" @click="handleClear">清空</view>
<view class="keyboard-right-pay word active-pay" @click="handlePay">{{txt}}</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
name: "popups",
props: {
txt: {
type: String,
default: '付款'
},
isPay: { //
type: Boolean,
default: false
}
},
data() {
return {
keys: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, '.', 'del'],
value: '',
}
},
watch: {
value(newVal, oldVal) {
//
if (newVal.length == 6 && this.isPay) {
this.handlePay();
}
}
},
methods: {
//
handleClick(item) {
if (this.value.length >= 10) return;
if (item == ".") {
if (!this.value) {
this.value = '0.';
} else {
if (this.value.indexOf('.') > -1) return;
this.value = this.value + item;
}
} else if (item == 'del') {
if (this.value == "0.")
this.value = this.value.substring(0, 0);
else
this.value = this.value.substring(0, this.value.length - 1);
} else if (item == 0) {
if (this.isPay) {
this.value = this.value + item;
} else {
if (this.value) {
if (this.value.lastIndexOf('.') != -1 && this.value.length - this.value.lastIndexOf('.') == 3)
return;
this.value = this.value + item;
} else {
this.value = this.value + item;
}
}
} else {
if (this.value.lastIndexOf('.') != -1 && this.value.length - this.value.lastIndexOf('.') == 3) return;
this.value = this.value + item;
}
this.$emit('change', this.value);
},
//
handleClear() {
this.value = '';
this.$emit('clear');
},
//
handlePay() {
// .
if (this.value && this.value.endsWith('.')) {
this.value = this.value.replace('.', '');
}
this.$emit('confirm', this.value);
this.handleClose();
},
//
handleOpen() {
this.value = '';
this.$refs.popup.open();
},
//
handleClose() {
this.$refs.popup.close();
},
maskClick() {
// .
if (this.value && this.value.endsWith('.')) {
this.value = this.value.replace('.', '');
}
this.$emit('change', this.value);
}
}
}
</script>
<style lang="scss" scoped>
.popup-wrap {
background-color: #fff;
border-radius: 30rpx 30rpx 0 0;
.paybox {
.paybox-title {
display: flex;
justify-content: space-between;
padding: 40rpx;
.paybox-title-left {}
.paybox-title-middle {
font-size: 30rpx;
font-weight: bold;
color: #333;
}
.paybox-titler-right {}
}
.paybox-input {
display: flex;
justify-content: center;
margin-bottom: 40rpx;
/deep/.u-code-input__item {
background-color: #E6E6E6;
border-radius: 8rpx;
border: 0 !important;
}
}
}
}
.keyboard {
display: flex;
padding-bottom: 20rpx;
border-top: 2rpx solid #E6E6E6;
.keyboard-left {
width: 75%;
display: flex;
flex-wrap: wrap;
.keyboard-left-item {
width: 33.3%;
height: 120rpx;
line-height: 102rpx;
border-bottom: 2rpx solid #E6E6E6;
border-right: 2rpx solid #E6E6E6;
}
.del {
display: flex;
justify-content: center;
align-items: center;
}
}
.keyboard-right {
width: 25%;
.keyboard-right-clear {
width: 100%;
height: 240rpx;
line-height: 226rpx;
}
.keyboard-right-pay {
width: 100%;
height: 240rpx;
line-height: 226rpx;
text-align: center;
background-color: #40AE36;
color: #fff !important;
}
}
.word {
font-weight: 600;
font-size: 34rpx;
color: #000000;
text-align: center;
}
.active:active {
background-color: rgba(232, 232, 232, 0.5);
}
.active-pay:active {
opacity: .9;
}
}
</style>

253
components/popups/index.vue Normal file
View File

@ -0,0 +1,253 @@
<template>
<view>
<uni-popup ref="popup" type="bottom" :mask-background-color="isPay?'rgba(0,0,0,.8)':'transparent'" safeArea
backgroundColor="transparent" :animation="true" @maskClick="maskClick">
<view class="popup-wrap" :style="{'border-radius':isPay?'': 0}">
<view class="paybox" v-if="isPay">
<view class="paybox-title">
<view class="paybox-title-left"></view>
<view class="paybox-title-middle">{{title}}</view>
<view class="paybox-titler-right" @click="handleClose">
<u-icon name="close" size="18" color="#666" />
</view>
</view>
<view class="paybox-input">
<u-code-input v-model="value" mode="box" dot readonly></u-code-input>
</view>
</view>
<view class="keyboard">
<view class="keyboard-left" :style="{width:isPay?'100%':''}">
<block v-for="(item,indx) in keys" :key="indx">
<view class="keyboard-left-item active del" v-if="item=='del'" @click="handleClick(item)">
<image style="width: 48rpx;height: 48rpx;" src="@/static/del.webp" />
</view>
<view class="keyboard-left-item word active"
:style="{width:isPay?'0%':'',border:isPay?'0':''}" v-else-if="item == '.'"
@click="handleClick(item)">
{{isPay?'':item}}
</view>
<view class="keyboard-left-item word active"
:style="{width:(isPay && item == '0')?'66.66%':''}" v-else @click="handleClick(item)">
{{item}}
</view>
</block>
</view>
<view class="keyboard-right" :style="{width:isPay?'0%':''}">
<view class="keyboard-right-clear word active" @click="handleClear">清空</view>
<view class="keyboard-right-pay word active-pay" @click="handlePay">{{txt}}</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
name: "popups",
props: {
txt: {
type: String,
default: '付款'
},
isPay: { //
type: Boolean,
default: false
},
title: {
type: String,
default: '请输入支付密码'
}
},
data() {
return {
keys: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, '.', 'del'],
value: '',
}
},
watch: {
value(newVal, oldVal) {
//
if (newVal.length == 6 && this.isPay) {
this.handlePay();
}
}
},
methods: {
//
handleClick(item) {
if (this.value.length >= 10) return;
if (item == ".") {
if (!this.value) {
this.value = '0.';
} else {
if (this.value.indexOf('.') > -1) return;
this.value = this.value + item;
}
} else if (item == 'del') {
if (this.value == "0.")
this.value = this.value.substring(0, 0);
else
this.value = this.value.substring(0, this.value.length - 1);
} else if (item == 0) {
if (this.isPay) {
this.value = this.value + item;
} else {
if (this.value) {
if (this.value.lastIndexOf('.') != -1 && this.value.length - this.value.lastIndexOf('.') == 3)
return;
this.value = this.value + item;
} else {
this.value = this.value + item;
}
}
} else {
if (this.value.lastIndexOf('.') != -1 && this.value.length - this.value.lastIndexOf('.') == 3) return;
this.value = this.value + item;
}
this.$emit('change', this.value);
},
//
handleClear() {
this.value = '';
this.$emit('clear');
},
//
handlePay() {
// .
if (this.value && this.value.endsWith('.')) {
this.value = this.value.replace('.', '');
}
this.$emit('confirm', this.value);
this.handleClose();
},
//
handleOpen() {
this.value = '';
this.$refs.popup.open();
},
//
handleClose() {
this.$emit('change')
this.$refs.popup.close();
},
maskClick() {
// .
if (this.value && this.value.endsWith('.')) {
this.value = this.value.replace('.', '');
}
this.handleClose();
this.$emit('change', this.value);
}
}
}
</script>
<style lang="scss" scoped>
.popup-wrap {
background-color: #fff;
border-radius: 30rpx 30rpx 0 0;
.paybox {
.paybox-title {
display: flex;
justify-content: space-between;
padding: 40rpx;
.paybox-title-left {}
.paybox-title-middle {
font-size: 30rpx;
font-weight: bold;
color: #333;
}
.paybox-titler-right {}
}
.paybox-input {
display: flex;
justify-content: center;
margin-bottom: 40rpx;
/deep/.u-code-input__item {
background-color: #E6E6E6;
border-radius: 8rpx;
border: 0 !important;
}
}
}
}
.keyboard {
display: flex;
padding-bottom: 20rpx;
border-top: 2rpx solid #E6E6E6;
.keyboard-left {
width: 75%;
display: flex;
flex-wrap: wrap;
.keyboard-left-item {
width: 33.3%;
height: 120rpx;
line-height: 102rpx;
border-bottom: 2rpx solid #E6E6E6;
border-right: 2rpx solid #E6E6E6;
}
.del {
display: flex;
justify-content: center;
align-items: center;
}
}
.keyboard-right {
width: 25%;
.keyboard-right-clear {
width: 100%;
height: 240rpx;
line-height: 226rpx;
}
.keyboard-right-pay {
width: 100%;
height: 240rpx;
line-height: 226rpx;
text-align: center;
background-color: #40AE36;
color: #fff !important;
}
}
.word {
font-weight: 600;
font-size: 34rpx;
color: #000000;
text-align: center;
}
.active:active {
background-color: rgba(232, 232, 232, 0.5);
}
.active-pay:active {
opacity: .9;
}
}
</style>

View File

@ -119,10 +119,10 @@
},
computed:{
leftPrice(){
return this.sku[this.changeSkuKey]?.procure_price?.split('.')[0]||'0';
return this.sku[this.changeSkuKey]?.wholesale_price?.split('.')[0]||'0';
},
rightPrice(){
return this.sku[this.changeSkuKey]?.procure_price?.split('.')[1]||'00';
return this.sku[this.changeSkuKey]?.wholesale_price?.split('.')[1]||'00';
}
},
methods: {
@ -247,7 +247,7 @@
// return console.log(this.sku[this.changeSkuKey]);
if(this.cart_num<this.once_min_count) return Toast(`至少要购买${this.once_min_count}件哦`);
if(!this.sku[this.changeSkuKey]) return Toast('该规格有错误, 请选择其他规格');
if(+this.sku[this.changeSkuKey].procure_price * +this.cart_num<=0) return Toast('无法购买价格小于等于0的商品');
if(+this.sku[this.changeSkuKey].wholesale_price * +this.cart_num<=0) return Toast('无法购买价格小于等于0的商品');
if (this.sku[this.changeSkuKey]) {
if (this.cart_num > this.sku[this.changeSkuKey].stock) return uni.showToast({
icon: 'none',

View File

@ -184,12 +184,14 @@
setTimeout(() => {
this.fSelecting = false;
}, 500);
console.log("选择图片");
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (r) => {
console.log("选择图片成功");
// #ifdef MP-ALIPAY
uni.showLoading();
// #endif
@ -254,7 +256,10 @@
uni.hideLoading();
}
});
}
},
fail: (err) => {
console.log("选择图片错误");
}
})
},
fUpload() {
@ -1261,7 +1266,7 @@
}
</script>
<style>
<style scoped>
.my-canvas {
display: flex;
position: fixed !important;

View File

@ -9,8 +9,8 @@ let httpApiThree
let wsApi
// 在打包之前请检查当前环境是否正确
const env = 'dev'; // 开发
// const env = 'prod'; // 生产
// const env = 'dev'; // 开发
const env = 'prod'; // 生产
// const env = 'prew'; // 预上线
switch (env) {

View File

@ -87,7 +87,7 @@ export function clearStorage() {
@title 最多汉字数量7个
@icon success loading none
*/
export function Toast(title, icon = 'none', obj = {}, duration = 800) {
export function Toast(title, icon = 'none', obj = {}, duration = 1200) {
let toastData = {
title: title,
duration: duration,

View File

@ -25,10 +25,10 @@ Vue.component('BaseMoney', BaseMoney)
Vue.component('barcode', barcode)
Vue.prototype.$util = util;
Vue.prototype.$Cache = Cache;
Vue.prototype.$procure_price = (item)=>{
Vue.prototype.$wholesale_price = (item)=>{
if(item.sku){
let key = Object.keys(item.sku)||[''];
return item.sku[key[0]]?.procure_price;
return item.sku[key[0]]?.wholesale_price;
}
else return '无批发价';
}

View File

@ -1,218 +1,217 @@
{
"name" : "惠农商户平台",
"appid" : "__UNI__1EE148C",
"description" : "",
"versionName" : "1.3.9",
"versionCode" : 139,
"transformPx" : false,
/* 5+App */
"app-plus" : {
"titleNView" : true,
"usingComponents" : true,
"nvueCompiler" : "uni-app",
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"compatible" : {
"ignoreVersion" : true //trueHBuilderX1.9.0
},
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {
"VideoPlayer" : {},
"iBeacon" : {},
"Barcode" : {},
"Camera" : {},
"Geolocation" : {},
"Payment" : {},
"Share" : {},
"OAuth" : {},
"UniMP" : {
"description" : "uni小程序"
},
"Maps" : {}
},
"safearea" : {
"bottom" : {
"offset" : "none"
}
},
/* */
"distribute" : {
/* android */
"android" : {
"resizeableActivity" : true,
"permissions" : [
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.BATTERY_STATS\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"permissionExternalStorage" : {
"request" : "none",
"prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
},
"permissionPhoneState" : {
"request" : "none" //
}
},
/* ios */
"ios" : {
"privacyDescription" : {
"NSPhotoLibraryUsageDescription" : "上传用户头像保存分享海报",
"NSPhotoLibraryAddUsageDescription" : "上传用户头像保存分享海报",
"NSCameraUsageDescription" : "上传用户头像保存分享海报",
"NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店",
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店"
},
"idfa" : false,
"dSYMs" : false
},
/* SDK */
"sdkConfigs" : {
"maps" : {
"amap" : {
"appkey_ios" : "0a3202688624938fd5d2f37b52c30d5d",
"appkey_android" : "0354f5ddc11e2ea76c5aac647f44d945",
"name" : "amapIvoVHpJR"
}
},
"payment" : {
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "wx9d68c92b550ddd1e",
"UniversalLinks" : "https://mer.crmeb.net/"
}
},
"share" : {
"weixin" : {
"appid" : "wx9d68c92b550ddd1e",
"UniversalLinks" : "https://mer.crmeb.net/"
}
},
"geolocation" : {
"amap" : {
"name" : "amapIvoVHpJR",
"__platform__" : [ "ios", "android" ],
"appkey_ios" : "0a3202688624938fd5d2f37b52c30d5d",
"appkey_android" : "0354f5ddc11e2ea76c5aac647f44d945"
},
"system" : {
"__platform__" : [ "ios", "android" ]
}
},
"oauth" : {},
"ad" : {}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen" : {
"useOriginalMsgbox" : true
}
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wxfb4695444ab8d0d0",
"setting" : {
"urlCheck" : false,
"minified" : true,
"postcss" : true,
"es6" : true
},
"permission" : {
"scope.userLocation" : {
"desc" : "获取您的位置"
}
},
"requiredPrivateInfos" : [ "getLocation", "chooseAddress" ],
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"h5" : {
"devServer" : {
"https" : false
},
"router" : {
"mode" : "history",
"base" : ""
},
"domain" : "",
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7"
}
}
},
"title" : "加载中...",
"template" : "template.h5.html"
}
"name": "惠农商户平台",
"appid": "__UNI__1EE148C",
"description": "",
"versionName": "1.4.9",
"versionCode": 1490,
"transformPx": false,
/* 5+App */
"app-plus": {
"titleNView": true,
"usingComponents": true,
"nvueCompiler": "uni-app",
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"compatible": {
"ignoreVersion": true //trueHBuilderX1.9.0
},
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
/* */
"modules": {
"VideoPlayer": {},
"iBeacon": {},
"Barcode": {},
"Camera": {},
"Geolocation": {},
"Payment": {},
"Share": {},
"OAuth": {},
"UniMP": {
"description": "uni小程序"
},
"Maps": {}
},
"safearea": {
"bottom": {
"offset": "none"
}
},
/* */
"distribute": {
/* android */
"android": {
"resizeableActivity": true,
"permissions": [
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.BATTERY_STATS\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
],
"abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
"permissionExternalStorage": {
"request": "none",
"prompt": "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
},
"permissionPhoneState": {
"request": "none" //
}
},
/* ios */
"ios": {
"privacyDescription": {
"NSPhotoLibraryUsageDescription": "上传用户头像保存分享海报",
"NSPhotoLibraryAddUsageDescription": "上传用户头像保存分享海报",
"NSCameraUsageDescription": "上传用户头像保存分享海报",
"NSLocationWhenInUseUsageDescription": "根据客户地理位置推荐最近门店",
"NSLocationAlwaysUsageDescription": "根据客户地理位置推荐最近门店",
"NSLocationAlwaysAndWhenInUseUsageDescription": "根据客户地理位置推荐最近门店"
},
"idfa": false,
"dSYMs": false
},
/* SDK */
"sdkConfigs": {
"maps": {
"amap": {
"appkey_ios": "0a3202688624938fd5d2f37b52c30d5d",
"appkey_android": "0354f5ddc11e2ea76c5aac647f44d945",
"name": "amapIvoVHpJR"
}
},
"payment": {
"weixin": {
"__platform__": ["ios", "android"],
"appid": "wx9d68c92b550ddd1e",
"UniversalLinks": "https://mer.crmeb.net/"
}
},
"share": {
"weixin": {
"appid": "wx9d68c92b550ddd1e",
"UniversalLinks": "https://mer.crmeb.net/"
}
},
"geolocation": {
"amap": {
"name": "amapIvoVHpJR",
"__platform__": ["ios", "android"],
"appkey_ios": "0a3202688624938fd5d2f37b52c30d5d",
"appkey_android": "0354f5ddc11e2ea76c5aac647f44d945"
},
"system": {
"__platform__": ["ios", "android"]
}
},
"oauth": {},
"ad": {}
},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen": {
"useOriginalMsgbox": true
}
}
},
/* */
"quickapp": {},
/* */
"mp-weixin": {
"appid": "wxfb4695444ab8d0d0",
"setting": {
"urlCheck": false,
"minified": true,
"postcss": true,
"es6": true
},
"permission": {
"scope.userLocation": {
"desc": "获取您的位置"
}
},
"requiredPrivateInfos": ["getLocation", "chooseAddress"],
"usingComponents": true
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"h5": {
"devServer": {
"https": false
},
"router": {
"mode": "history",
"base": ""
},
"domain": "",
"sdkConfigs": {
"maps": {
"qqmap": {
"key": "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7"
}
}
},
"title": "加载中...",
"template": "template.h5.html"
}
}
//
/* ios */
/* ios */

View File

@ -78,6 +78,12 @@
"scrollIndicator": false //
}
}
}, {
"path": "pages/index/unregist",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/nongKe/supply_chain/shopping_trolley",
@ -303,6 +309,28 @@
}
],
"subPackages": [{
"root": "pages/withdrawal",
"name": "withdrawal",
"pages": [{
"path": "index",
"style": {
"navigationBarTitleText": "提货付款",
"navigationStyle": "custom"
}
}, {
"path": "add",
"style": {
"navigationBarTitleText": "添加银行卡",
"navigationStyle": "custom"
}
}, {
"path": "progress",
"style": {
"navigationBarTitleText": "提现进度",
"navigationStyle": "custom"
}
}]
}, {
"root": "pages/payment",
"name": "payment",
"pages": [{
@ -1392,71 +1420,81 @@
"style": {
"navigationBarTitleText": "添加店铺分类"
}
},
{
}, {
"path": "addGoods/index",
"style": {
"navigationBarTitleText": "添加商品"
}
},
{
}, {
"path": "addGoods/secound",
"style": {
"navigationBarTitleText": "添加商品"
}
},
{
}, {
"path": "addGoods/addGoodDetils",
"style": {
"navigationBarTitleText": "商品详情"
}
},
{
}, {
"path": "addGoods/singleSpecification",
"style": {
"navigationBarTitleText": "单规格"
}
},
{
}, {
"path": "addGoods/mulSpecification",
"style": {
"navigationBarTitleText": "多规格"
}
},
{
}, {
"path": "addGoods/specificationProperties",
"style": {
"navigationBarTitleText": "规格属性"
}
},
{
}, {
"path": "addGoods/freightTemplate",
"style": {
"navigationBarTitleText": "运费模板",
"onReachBottomDistance": 100,
"enablePullDownRefresh": false
}
},
{
}, {
"path": "addGoods/addFreightTemplate",
"style": {
"navigationBarTitleText": "新增运费模板"
}
},
{
}, {
"path": "addGoods/modifyPrice",
"style": {
"navigationBarTitleText": "修改价格-多规格"
}
},
{
}, {
"path": "basicSet",
"style": {
"navigationBarTitleText": "商户基本设置",
"enablePullDownRefresh": false
}
},
{
}, {
"path": "shop_type_change/index",
"style": {
"navigationBarTitleText": "类型变更",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "shop_type_change/progress",
"style": {
"navigationBarTitleText": "变更进度",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "shop_type_change/list",
"style": {
"navigationBarTitleText": "申请记录",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "addGood/addGood",
"style": {
"navigationBarTitleText": "商品设置",
@ -1675,14 +1713,14 @@
"iconPath": "static/tabbar_icon/s.png",
"selectedIconPath": "static/tabbar_icon/s-a.png",
"text": "统计"
},
{
"pagePath": "pages/nongKe/supply_chain/shopping_trolley",
"iconPath": "static/tabbar_icon/d.png",
"selectedIconPath": "static/tabbar_icon/d-a.png",
"text": "采购车"
}
// {
// "pagePath": "pages/nongKe/supply_chain/shopping_trolley",
// "iconPath": "static/tabbar_icon/d.png",
// "selectedIconPath": "static/tabbar_icon/d-a.png",
// "text": "采购车"
// }
// {
// "pagePath": "pages/product/list/index",
// "iconPath": "static/tabbar_icon/c.png",
// "selectedIconPath": "static/tabbar_icon/c-a.png",

View File

@ -1,389 +1,578 @@
<template>
<view class="page">
<view class="bg">
<image mode="widthFix" style="width: 100%;"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/87960202402291430371479.webp"></image>
<view class="card" :class="{card2:type==2}">
<view class="c-head">
<view :class="type==2?'left':'right'" @click="changeType(2)">增收销售补贴</view>
<!-- <view :class="type==1?'left':'right'" @click="changeType(1)">春耕采购补贴</view> -->
<view v-if="mer_info.type_code=='PersonalStore'" :class="type==1?'left':'right'" @click="changeType(1)">春耕采购补贴</view>
<view v-else></view>
</view>
<view class="c-body-title">
<view>补贴金额</view>
<view>补贴状态</view>
</view>
<view class="c-body-text">
<view class="price">{{info.subsidy_amount}}</view>
<view>
<text v-if="info.subsidy_status" class="price">已到账</text>
<text v-else>未激活</text>
</view>
</view>
</view>
<view class="bottom"></view>
</view>
<image @click="back" class="bg_back"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="bg_title">补贴进度</view>
<view class="body" >
<view class="b-card" v-if="type==1">
<view class="b-top">
<view>春耕采购金额{{info.spring_subsidy_amount}}</view>
<view>剩余金额{{info.balance}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss">
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp"></image>
<view class="text">{{info.spring_subsidy_rate}}%</view>
</view>
</view>
<view v-if="info.spring_subsidy_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<view class="b-card">
<view class="b-top">
<view>销售目标金额{{info.sale_target}}</view>
<view>当前进度{{info.sale_amount}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.sale_finish_rate}%`}">
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp"></image>
<view class="text">{{info.sale_finish_rate}}%</view>
</view>
</view>
<view v-if="info.sale_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<view class="b-card">
<view class="b-top">
<view>里海云仓采购目标金额{{info.official_purchase_target}}</view>
<view>当前进度{{info.official_purchase_amount}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.official_purchase_finish_rate}%`}">
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp"></image>
<view class="text">{{info.official_purchase_finish_rate}}%</view>
</view>
</view>
<view v-if="info.official_purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<view class="b-card">
<view class="b-top">
<view>其他采购目标金额{{info.purchase_target}}</view>
<view>当前进度{{info.purchase_amount}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.purchase_finish_rate}%`}">
<image class="image" src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp"></image>
<view class="text">{{info.purchase_finish_rate}}%</view>
</view>
</view>
<view v-if="info.purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<view class="b-tips" v-if="type==1">
*春耕采购余额使用完采购金额和销售金额达到后才可获取补贴
</view>
<view class="b-list" v-else>
<view class="list-head"></view>
<view class="list-body">
<view class="list-b-title">
<view>采购金额</view>
<view>销售金额</view>
<view>补贴金额</view>
<view>状态</view>
</view>
<view class="list-b-text" v-for="(item,index) in list" :key="index">
<view class="item1">{{ item.extra.purchase_amount }}</view>
<view class="item2">{{ item.extra.sale_amount }}</view>
<view class="item3" v-if="item.status!=1">{{ cPrice(item.coupon_price) }}</view>
<view class="item3" v-else>{{ item.coupon_price }}</view>
<view class="item4">
<text v-if="item.status!=1">未激活</text>
<text v-else style="color: #FF5E0C;">已到账</text>
</view>
</view>
<view class="list-b-text" style="align-items: center;" v-if="list.length == 0">
<view>暂无数据</view>
</view>
</view>
</view>
</view>
</view>
<view class="page">
<view class="bg">
<image mode="widthFix" style="width: 100%;"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/87960202402291430371479.webp"></image>
<view class="card" :class="{card2:type==2}">
<view class="c-head">
<view :class="type==2?'left':'right'" @click="changeType(2)">增收销售补贴</view>
<!-- <view :class="type==1?'left':'right'" @click="changeType(1)">春耕采购补贴</view> -->
<view v-if="mer_info.type_code=='PersonalStore'" :class="type==1?'left':'right'"
@click="changeType(1)">春耕采购补贴</view>
<view v-else></view>
</view>
<view class="c-body-title">
<view>补贴金额</view>
<view>补贴状态</view>
</view>
<view class="c-body-text">
<view class="price">{{info.subsidy_amount}}</view>
<view>
<text v-if="info.subsidy_status==2" class="price">{{info.subsidy_status_name}}</text>
<text v-else>{{info.subsidy_status_name}}</text>
</view>
</view>
</view>
<view class="bottom"></view>
</view>
<image @click="back" class="bg_back"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/uploads/new_activity/back.png"></image>
<view class="bg_title">补贴进度</view>
<view class="body">
<view class="b-card" v-if="type==1">
<view class="b-top">
<view>春耕采购金额{{info.spring_subsidy}}</view>
<view>剩余金额{{info.balance}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.spring_subsidy_rate}%`}">
<image class="image"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
</image>
<view class="text">{{info.spring_subsidy_rate}}%</view>
</view>
</view>
<view v-if="info.spring_subsidy_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<view class="b-card">
<view class="b-top">
<view>销售目标金额{{info.sale_target}}</view>
<view>当前进度{{info.sale_amount}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.sale_finish_rate}%`}">
<image class="image"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
</image>
<view class="text">{{info.sale_finish_rate}}%</view>
</view>
</view>
<view v-if="info.sale_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<view class="b-card" v-if="type==1">
<view class="b-top">
<view>采购目标金额{{info.purchase_target}}</view>
<view>当前进度{{info.purchase_amount}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.purchase_finish_rate}%`}">
<image class="image"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
</image>
<view class="text">{{info.purchase_finish_rate}}%</view>
</view>
</view>
<view v-if="info.purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<block v-else>
<view class="b-card">
<view class="b-top">
<view>里海云仓采购目标金额{{info.official_purchase_target}}</view>
<view>当前进度{{info.official_purchase_amount}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.official_purchase_finish_rate}%`}">
<image class="image"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
</image>
<view class="text">{{info.official_purchase_finish_rate}}%</view>
</view>
</view>
<view v-if="info.official_purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
<view class="b-card">
<view class="b-top">
<view>其他采购目标金额{{info.purchase_target}}</view>
<view>当前进度{{info.purchase_amount}}</view>
</view>
<view class="b-bottom">
<view class="pro">
<view class="loss" :style="{left: `-${100-info.purchase_finish_rate}%`}">
<image class="image"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/f805f20240229155704834.webp">
</image>
<view class="text">{{info.purchase_finish_rate}}%</view>
</view>
</view>
<view v-if="info.purchase_finish_rate>=100" style="color: #FF5E0C;">已完成</view>
<view v-else style="color: #ADADAD;">未完成</view>
</view>
</view>
</block>
<view class="b-tips" v-if="type==1">
*春耕采购余额使用完采购金额和销售金额达到后才可获取补贴<br>
*当进度完成时将在每月月底进行统计审核审核完成后经本人确认一个季度内到账
</view>
<view class="b-tips" v-if="type==2">
*当进度完成时将在每月月底进行统计审核审核完成后经本人确认一个季度内到账
</view>
<view class="b-list">
<view class="list-head"></view>
<view class="list-body">
<view class="list-b-title">
<view>采购金额</view>
<view>销售金额</view>
<view>补贴金额</view>
<view>状态</view>
</view>
<view class="list-b-text" v-for="(item,index) in list" :key="index">
<view class="item1">
{{ cPrice2(item.extra.official_purchase_target, item.extra.purchase_target) }}</view>
<view class="item2">{{ item.extra.sale_target }}</view>
<view class="item3">
<text v-if="item.id==0">{{cPrice(item.coupon_price)}}</text>
<text v-else>{{item.coupon_price}}</text>
</view>
<view class="item4" @click="showPopup(item.send_status, item.id)">
<!-- send_status 发放状态-1未激活0待审核1待领取2已完成 -->
<text v-if="item.send_status==2||item.send_status==1"
style="color: #FF5E0C;">{{item.send_status_cn}}</text>
<text v-else>{{item.send_status_cn}}</text>
</view>
</view>
<view class="list-b-text" style="align-items: center;" v-if="list.length == 0">
<view>暂无数据</view>
</view>
</view>
</view>
<uni-popup type="center" ref="pupRef">
<view style="width: 630rpx;height: 500rpx;position: relative;">
<view style="position: absolute;top: 0;right: 10rpx;" @click="closePopup">
<image style="width: 50rpx;height: 50rpx;"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/c8b19202403201714381681.webp"></image>
</view>
<view style="width: 630rpx;position: absolute;top: 70rpx;right: 0;"
:class="[send_status_cn>0?'h430':'h310']">
<image style="width: 100%;" :class="[send_status_cn>0?'h430':'h310']"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/23ad8202403201716417527.webp"></image>
<view
style="position: absolute;top: 0;left: 0;width: 100%;height: 100%;padding: 30rpx;display: flex;flex-direction: column;justify-content: center;">
<view style="padding-bottom: 50rpx;font-size: 32rpx;color: #2E2E2E;">
<text v-if="send_status_cn==-1">补贴未激活</text>
<text v-else-if="send_status_cn==0">补贴审核中</text>
<text v-else-if="send_status_cn==1">补贴待领取</text>
<text v-else-if="send_status_cn==10">请填写错误内容</text>
</view>
<view style="color: #7A7A7A;font-size: 28rpx;">
<text v-if="send_status_cn==-1">当前采购目标金额销售目标金额未完成无法提交报审</text>
<text v-else-if="send_status_cn==0">你的补贴申请已提交报审审核周期为3个月内审核完成后将会以短信形式通知</text>
<text v-else-if="send_status_cn==1">
请核对补贴金额是否正确如有疑问请联系工作人员
电话13627640188
</text>
</view>
<view v-if="send_status_cn==10"
style="background-color: #fff;border-radius: 20rpx;padding: 20rpx;">
<textarea v-model="reason" placeholder="请填写错误内容" style="height: 100rpx;" />
</view>
<view v-if="send_status_cn==1"
style="display: flex;justify-content: center;margin-top: 30rpx;color: #F98144;">
<view @click="reAudit"
style="padding: 9rpx 50rpx 12rpx 50rpx;border-radius: 40rpx;border: 4rpx solid #F98144;margin-right: 100rpx;">
错误</view>
<view @click="couponReceive"
style="padding: 9rpx 50rpx 12rpx 50rpx;border-radius: 40rpx;border: 4rpx solid #F98144;color: #FFF;background-color: #F98144;">
正确</view>
</view>
<view v-else-if="send_status_cn==10"
style="display: flex;justify-content: center;margin-top: 30rpx;color: #F98144;">
<view @click="couponRefuse"
style="padding: 9rpx 50rpx 12rpx 50rpx;border-radius: 40rpx;border: 4rpx solid #F98144;color: #FFF;background-color: #F98144;">
提交</view>
</view>
</view>
</view>
</view>
</uni-popup>
</view>
</view>
</template>
<script>
import { getSubsidy, getSubsidyRecord } from "@/api/admin.js"
export default {
data() {
return {
type: 2,
mer_id: '',
info: {},
list: [],
where:{
page: 1,
limit: 20,
type: 2
},
mer_info:{
type_code: ''
}
}
},
onLoad() {
let user = this.$store.state.app.userInfo;
if(typeof user == 'string') user = JSON.parse(user);
this.mer_info.type_code = user.mer_info.type_code;
this.mer_id = user.service.mer_id;
this.getSubsidy();
if(this.type==2)this.getSubsidyRecord();
},
onShow() {},
methods: {
back() {
uni.navigateBack();
},
changeType(type){
this.type = type;
this.getSubsidy();
if(type==2)this.getSubsidyRecord();
},
getSubsidy(){
if(!this.mer_id) return ;
getSubsidy(this.mer_id, {
type: this.type
}).then(res=>{
this.info = res.data;
})
},
getSubsidyRecord(){
getSubsidyRecord(this.mer_id, this.where).then(res=>{
this.list = res.data.record;
})
},
cPrice(n){ //
let t = Number(this.info.official_purchase_finish_rate) + Number(this.info.purchase_finish_rate) + Number(this.info.sale_finish_rate);
t/=3*100;
t==0?t=1:null;
return (+n*t).toFixed(2);
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
import {
getSubsidy,
getSubsidyRecord,
couponReceive,
couponRefuse
} from "@/api/admin.js"
import {
Toast
} from "../../libs/uniApi";
export default {
data() {
return {
type: 2,
mer_id: '',
info: {},
list: [],
send_status_cn: '1',
send_id: 0,
reason: '',
where: {
page: 1,
limit: 20,
type: 2
},
mer_info: {
type_code: ''
}
}
},
onLoad() {
let user = this.$store.state.app.userInfo;
if (typeof user == 'string') user = JSON.parse(user);
this.mer_info.type_code = user.mer_info.type_code;
this.mer_id = user.service.mer_id;
this.getSubsidy();
this.getSubsidyRecord();
// this.$nextTick(res=>{
// this.$refs.pupRef.open();
// })
},
onShow() {},
methods: {
showPopup(type, send_id) {
this.send_status_cn = type;
this.send_id = send_id;
if (type == 2) Toast('已经领取过啦');
else this.$refs.pupRef.open();
},
closePopup() {
this.$refs.pupRef.close();
},
back() {
uni.navigateBack();
},
changeType(type) {
this.type = type;
this.where.type = type;
this.getSubsidy();
this.getSubsidyRecord();
},
getSubsidy() {
if (!this.mer_id) return;
getSubsidy(this.mer_id, {
type: this.type
}).then(res => {
this.info = res.data;
})
},
couponReceive() {
this.closePopup();
couponReceive({
mer_id: this.mer_id,
id: this.send_id,
}).then(res => {
this.$nextTick(() => {
Toast('领取成功')
})
}).catch(err => {
this.$nextTick(() => {
Toast(err)
})
})
},
reAudit() {
this.send_status_cn = 10;
},
couponRefuse() {
if (this.reason == '') return Toast('错误内容不能为空');
this.closePopup();
couponRefuse({
mer_id: this.mer_id,
id: this.send_id,
reason: this.reason
}).then(res => {
this.$nextTick(() => {
Toast('提交成功')
})
}).catch(err => {
this.$nextTick(() => {
Toast(err)
})
})
},
getSubsidyRecord() {
getSubsidyRecord(this.mer_id, this.where).then(res => {
this.list = res.data.record;
})
},
cPrice(n) { //
let t = Number(this.info.official_purchase_finish_rate) + Number(this.info.purchase_finish_rate) + Number(
this.info.sale_finish_rate);
t /= 3 * 100;
t == 0 ? t = 1 : null;
return (+n * t).toFixed(2);
},
cPrice2(a, b) {
a = Number(a);
b = Number(b);
return (a + b).toFixed(2)
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
page{
background-color: #fff;
}
.page {
position: relative;
font-size: 28rpx;
background-color: #fff;
}
page {
background-color: #fff;
}
.bg {
position: absolute;
top: 0;
left: 0;
width: 750rpx;
height: 530rpx;
.card{
position: absolute;
transition: 300ms;
bottom: 30rpx;
left: 50%;
transform: translate(-50%);
width: 670rpx;
height: 290rpx;
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/b4cfc20240229163236372.webp');
background-size: 100% 100%;
background-repeat: no-repeat;
padding-bottom: 40rpx;
.c-head{
display: flex;
justify-content: space-around;
height: 90rpx;
overflow: hidden;
margin-top: 20rpx;
view{
flex: 1;
text-align: center;
}
.left{
font-size: 32rpx;
color: #DF4104;
line-height: 80rpx;
}
.right{
color: #7A7A7A;
line-height: 100rpx;
}
}
.c-body-title{
display: flex;
justify-content: space-around;
color: #2E2E2E;
height: 70rpx;
align-items: center;
}
.c-body-text{
display: flex;
justify-content: space-around;
color: #7A7A7A;
height: 70rpx;
align-items: center;
.price{
color: #F13B3B;
}
}
}
.card2{
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e5b2e202402291538018132.webp');
}
.bottom{
position: absolute;
left: 0;
bottom: -1px;
width: 100%;
height: 50rpx;
border-radius: 50rpx 50rpx 0 0;
background-color: #fff;
}
}
.page {
position: relative;
font-size: 28rpx;
background-color: #fff;
}
.bg_back {
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
.bg {
position: absolute;
top: 0;
left: 0;
width: 750rpx;
height: 530rpx;
.bg_title {
font-size: 32rpx;
color: #fff;
font-weight: 500;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 50%;
transform: translate(-50%);
}
.body{
padding: 530rpx 30rpx 30rpx 30rpx;
.b-card{
padding-bottom: 30rpx;
.b-top{
display: flex;
justify-content: space-between;
font-size: 26rpx;
}
.b-bottom{
display: flex;
justify-content: space-between;
align-items: center;
height: 80rpx;
.pro{
width: 570rpx;
height: 28rpx;
border-radius: 28rpx;
overflow: hidden;
position: relative;
background-color: #ffdfce;
.loss{
width: 570rpx;
height: 28rpx;
position: absolute;
top: 0;
left: -100%;
}
.image{
width: 570rpx;
height: 28rpx;
}
.text{
position: absolute;
right: 0;
top: 0;
font-size: 20rpx;
color: #fff;
border-radius: 28rpx;
background-color: #FF5E0C;
padding: 0 10rpx;
height: 30rpx;
border: 2rpx solid #ffad82;
}
}
}
}
.b-tips{
color: #7A7A7A;
font-size: 24rpx;
}
.b-list{
.list-head{
width: 690rpx;
height: 45rpx;
background: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/7bc46202402291702073308.webp');
background-size: 100% 100%;
background-repeat: no-repeat;
}
.list-body{
.list-b-title{
padding: 20rpx 0;
display: flex;
view{
flex: 1;
text-align: center;
flex-shrink: 0;
}
}
.list-b-text{
background-color: #F9F9F9;
border-radius: 12rpx;
padding: 20rpx 0;
margin-bottom: 20rpx;
display: flex;
font-size: 24rpx;
view{
flex: 1;
text-align: center;
flex-shrink: 0;
}
.item1{
color: #F13B3B;
}
.item2{
color: #20A162;
}
.item3{
color: #FF8056;
}
.item4{
color: #2E2E2E;
}
}
}
}
}
.card {
position: absolute;
transition: 300ms;
bottom: 30rpx;
left: 50%;
transform: translate(-50%);
width: 670rpx;
height: 290rpx;
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/b4cfc20240229163236372.webp');
background-size: 100% 100%;
background-repeat: no-repeat;
padding-bottom: 40rpx;
.c-head {
display: flex;
justify-content: space-around;
height: 90rpx;
overflow: hidden;
margin-top: 20rpx;
view {
flex: 1;
text-align: center;
}
.left {
font-size: 32rpx;
color: #DF4104;
line-height: 80rpx;
}
.right {
color: #7A7A7A;
line-height: 100rpx;
}
}
.c-body-title {
display: flex;
justify-content: space-around;
color: #2E2E2E;
height: 70rpx;
align-items: center;
}
.c-body-text {
display: flex;
justify-content: space-around;
color: #7A7A7A;
height: 70rpx;
align-items: center;
.price {
color: #F13B3B;
}
}
}
.card2 {
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e5b2e202402291538018132.webp');
}
.bottom {
position: absolute;
left: 0;
bottom: -1px;
width: 100%;
height: 50rpx;
border-radius: 50rpx 50rpx 0 0;
background-color: #fff;
}
}
.bg_back {
height: 34rpx;
width: 20rpx;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 30rpx;
}
.bg_title {
font-size: 32rpx;
color: #fff;
font-weight: 500;
position: absolute;
top: calc(var(--status-bar-height) + 30rpx);
left: 50%;
transform: translate(-50%);
}
.body {
padding: 530rpx 30rpx 30rpx 30rpx;
.b-card {
padding-bottom: 30rpx;
.b-top {
display: flex;
justify-content: space-between;
font-size: 26rpx;
}
.b-bottom {
display: flex;
justify-content: space-between;
align-items: center;
height: 80rpx;
.pro {
width: 570rpx;
height: 28rpx;
border-radius: 28rpx;
overflow: hidden;
position: relative;
background-color: #ffdfce;
.loss {
width: 570rpx;
height: 28rpx;
position: absolute;
top: 0;
left: -100%;
}
.image {
width: 570rpx;
height: 28rpx;
}
.text {
position: absolute;
right: 0;
top: 0;
font-size: 20rpx;
color: #fff;
border-radius: 28rpx;
background-color: #FF5E0C;
padding: 0 10rpx;
height: 30rpx;
border: 2rpx solid #ffad82;
}
}
}
}
.b-tips {
color: #7A7A7A;
font-size: 24rpx;
margin-bottom: 30rpx;
}
.b-list {
.list-head {
width: 690rpx;
height: 45rpx;
background: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/def/7bc46202402291702073308.webp');
background-size: 100% 100%;
background-repeat: no-repeat;
}
.list-body {
.list-b-title {
padding: 20rpx 0;
display: flex;
view {
flex: 1;
text-align: center;
flex-shrink: 0;
}
}
.list-b-text {
background-color: #F9F9F9;
border-radius: 12rpx;
padding: 20rpx 0;
margin-bottom: 20rpx;
display: flex;
font-size: 24rpx;
view {
flex: 1;
text-align: center;
flex-shrink: 0;
}
.item1 {
color: #F13B3B;
}
.item2 {
color: #20A162;
}
.item3 {
color: #FF8056;
}
.item4 {
color: #2E2E2E;
}
}
}
}
}
.h430 {
height: 430rpx;
}
.h310 {
height: 310rpx;
}
</style>

View File

@ -137,7 +137,7 @@
<view class="info" v-if="item.cart_info && item.cart_info.product">
<view class="name line2">{{item.cart_info.product.store_name}}</view>
<view class="info_sku" v-if="item.cart_info && item.cart_info.productAttr">{{item.cart_info.productAttr.sku}}</view>
<view class="info_price" v-if="item.cart_info && item.cart_info.productAttr"><text>{{item.cart_info.productAttr.procure_price}}</text></view>
<view class="info_price" v-if="item.cart_info && item.cart_info.productAttr"><text>{{item.cart_info.productAttr.wholesale_price}}</text></view>
<view class='carnum acea-row row-center-wrapper'>
<view class="reduce" :class="item.numSub ? 'on' : ''" @click.stop='subCart(item)'>-</view>
<view class='num'>{{item.split_num}}</view>
@ -161,7 +161,7 @@
<view class="info_sku" v-if="item.cart_info && item.cart_info.productAttr">{{item.cart_info.productAttr.sku}}</view>
</view>
<view class="pro_price" v-if="item.cart_info && item.cart_info.productAttr">
<view class="info_price">{{item.cart_info.productAttr.procure_price}}</view>
<view class="info_price">{{item.cart_info.productAttr.wholesale_price}}</view>
<view class="info_num">x{{item.product_num}}</view>
<view class="refund_num" v-if="item.product_num-item.refund_num>0">{{item.product_num-item.refund_num}}{{item.is_refund==1?'退款中' : item.is_refund==2 ? '已退款' : item.is_refund==3?'全部退款':''}}</view>
</view>

View File

@ -201,7 +201,7 @@
options.product_type ? uni.setStorageSync("PRODUCT_TYPE", 98) : uni.removeStorageSync("PRODUCT_TYPE");
this.getOrderStatistics(this.mer_id);
this.getList(this.mer_id)
this.purchaseOrderList(this.mer_id)
// this.purchaseOrderList(this.mer_id)
},
methods: {
getIndex: function() {

File diff suppressed because it is too large Load Diff

View File

@ -51,7 +51,7 @@
</view>
</view>
<view class="money">
<view class="x-money">{{ item.cart_info.productAttr.procure_price }}</view>
<view class="x-money">{{ item.cart_info.productAttr.wholesale_price }}</view>
<view class="num">x{{ item.product_num }}
<text class="font-color refund_num" v-if="item.product_num-item.refund_num>0">(-{{item.product_num-item.refund_num}})</text>
</view>

View File

@ -11,6 +11,9 @@
<view>
<scroll-view class="nav acea-row" scroll-x="true" style="white-space: nowrap; display: flex;"
scroll-with-animation show-scrollbar="true">
<view class="item" :class="where.status == '' ? 'on' : ''" @click="changeStatus('')">
全部
</view>
<view class="item" :class="where.status == 1 ? 'on' : ''" @click="changeStatus(1)">
待付款
</view>
@ -36,7 +39,7 @@
</view>
</view>
<view v-if="where.status == 6" class="list">
<view v-if="(where.status == 6)" class="list">
<view class="item" v-for="(item, index) in list" :key="index">
<view class="order-num acea-row row-middle">
<text v-if="item.order && item.order.activity_type != 0" class="activity_type">
@ -50,7 +53,8 @@
<view v-if="val.product" class="goods acea-row row-between-wrapper">
<view class="picTxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="val.product.cart_info.productAttr.image||val.product.cart_info.product.image" />
<image
:src="val.product.cart_info.productAttr.image||val.product.cart_info.product.image" />
</view>
<view class="text acea-row row-between row-column">
<view class="info line1 refund-info">
@ -96,12 +100,12 @@
<view v-else class="list">
<view class="item" v-for="(item, index) in list" :key="index">
<view class="order-num acea-row row-middle">
<text class="cloud-tag" v-if="item.source==103">云商品</text>
<text class="cloud-tag" v-if="item.source==103">云商品</text>
<text v-else-if="item.activity_type != 0" class="activity_type">
{{ item.activity_type == 1 ? '秒杀' : item.activity_type == 2 ? '预售' : item.activity_type == 3 ? '助力' : item.activity_type == 4 ? '拼团' : item.activity_type == 10 ? '套餐' :'' }}
</text>
订单号{{ item.order_sn }}
<text class="time">下单时间{{ item.create_time }}</text>
</text>
订单号{{ item.order_sn }}
<text class="time">下单时间{{ item.create_time }}</text>
<text class="order-status"
v-if="item.refunding != 0 && where.status != 1">{{item.refunding==1 ? '退款中' : item.refunding==2 ? '部分退款' : '全部退款'}}</text>
</view>
@ -120,9 +124,10 @@
<view class="attr" v-if="val.cart_info.productAttr.sku">
{{ val.cart_info.productAttr.sku }}
</view>
<view class="attr" @click.stop="showBarCode(val.cart_info.productAttr.product)" v-if="val.cart_info.productAttr.product&&val.cart_info.productAttr.product.bar_code">
商品条码: {{ val.cart_info.productAttr.product.bar_code }}
</view>
<view class="attr" @click.stop="showBarCode(val.cart_info.productAttr.product)"
v-if="val.cart_info.productAttr.product&&val.cart_info.productAttr.product.bar_code">
商品条码: {{ val.cart_info.productAttr.product.bar_code }}
</view>
</view>
</view>
<view class="money">
@ -174,14 +179,16 @@
一键改价
</view>
<view class="bnt" @click="modify(item, 1)">订单备注</view>
<view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&&(item.activity_type==98||item.activity_type==99)"
<view class="bnt bnt_color"
v-if="where.status == 2 && item.order_type == 0&&(item.activity_type==98||item.activity_type==99)"
@click="toPostage(item)">去发货
</view>
<view class="bnt bnt_color" v-if="where.status == 2 && item.order_type == 0&& item.order_type !=1 &&item.activity_type==0"
<view class="bnt bnt_color"
v-if="(where.status == 2 || (item.order_type === 0 && item.status === 0 && item.paid == 1)) && item.order_type == 0 && item.order_type !=1 && item.activity_type==0"
@click="toPostagequ(item)">去发货
</view>
<view class="bnt bnt_color"
v-if="(where.status == 2 && item.order_type == 1) || where.is_verify == 1"
v-if="((item.order_type == 1 && item.status === 0 && item.paid == 1) && item.order_type == 1) || where.is_verify == 1"
@click="toDetail(item)">去核销</view>
</view>
</view>
@ -209,18 +216,53 @@
</view>
<view class="mask" @touchmove.prevent v-show="refundMark === true"></view>
</view>
<view class="form-wrap" v-if="popUpShow"
style="position: fixed;z-index: 11; top: 0;left: 0;width:100vw;height:100vh;background:rgba(0,0,0,.4);display: flex;align-items: center;justify-content: center;">
<view class="form">
<view class="form-item">
<view class="form-item-label">送货人姓名</view>
<view class="form-item-val">
<u-input v-model="deliveryForm.delivery_name" placeholder="请输入送货人姓名"
placeholderStyle="color:#999;font-size:26rpx;" border="surround"></u-input>
</view>
</view>
<view class="form-item">
<view class="form-item-label">送货人电话</view>
<view class="form-item-val">
<u-input v-model="deliveryForm.delivery_id" placeholder="请输入送货人电话"
placeholderStyle="color:#999;font-size:26rpx;" border="surround"></u-input>
</view>
</view>
<view class="form-item">
<view class="form-item-label">备注</view>
<view class="form-item-val">
<u-input v-model="deliveryForm.remark" placeholder="请输入备注"
placeholderStyle="color:#999;font-size:26rpx;"></u-input>
</view>
</view>
<view class="form-btn">
<view class="form-btn-cancel" @click="popUpShow = false">取消</view>
<view class="form-btn-confirm" @click="handleSubmitDelivery">确认</view>
</view>
</view>
</view>
<!--
<u-popup :show="popUpShow" mode="center" :closeOnClickOverlay="true" round="12" @close="popUpClose">
<view style="text-align: center;margin-top: 30rpx;">
请把二维码展示给取货人员
</view>
<view style="padding: 28.07rpx;">
<image :src="payCodeUrl" style="width:400rpx;height: 400rpx;"></image>
</view>
</u-popup>
<view class="bar-code" v-show="showBar" @click="showBar=false">
<barcode ref="code"></barcode>
</view>
</u-popup> -->
<view class="bar-code" v-show="showBar" @click="showBar=false">
<barcode ref="code"></barcode>
</view>
</view>
</template>
@ -244,7 +286,8 @@
refundOrderReceive,
setRefundMark,
postconfirm,
logisticsCode
logisticsCode,
delivery
} from "@/api/admin";
import Loading from '@/components/Loading/index'
@ -252,6 +295,9 @@
import {
isMoney
} from '@/utils/validate.js'
import {
Toast
} from "../../../libs/uniApi";
export default {
name: "AdminOrderList",
components: {
@ -260,7 +306,14 @@
},
data() {
return {
showBar: false,
//
deliveryForm: {
delivery_name: '',
delivery_id: '',
delivery_type: 2,
mer_id: ''
},
showBar: false,
current: "",
change: false,
refundMark: false,
@ -271,7 +324,7 @@
status: 1,
search_info: '',
product_type: '',
pay_time: null,
pay_time: null,
},
list: [],
loaded: false,
@ -293,17 +346,21 @@
that.init();
}
},
},
onLoad(option) {
this.where.product_type = uni.getStorageSync("PRODUCT_TYPE") ?? ""
this.where.status = option.types
if (option.types == 99) {
delete this.where.status;
this.where.is_verify = 1;
}
this.current = "";
this.merId = option.merId;
if(option.pay_time){
this.where.pay_time = option.pay_time;
}
if (option.pay_time) {
this.where.pay_time = option.pay_time;
}
this.getIndex();
},
methods: {
@ -312,13 +369,13 @@
this.popUpShow = false
},
showBarCode(val){
this.showBar = true
this.$refs['code'].init({
name: val.store_name,
code: val.bar_code
});
},
showBarCode(val) {
this.showBar = true
this.$refs['code'].init({
name: val.store_name,
code: val.bar_code
});
},
//
tongyi(id, number) {
let data = {
@ -342,14 +399,12 @@
},
handleSearch() {
this.loaded = false;
this.where.page = 1;
this.list = [];
this.where.page = 1;
this.list = [];
this.getIndex();
},
//
getIndex() {
let that = this;
// console.log(that.merId)
if (that.loading || that.loaded) return;
@ -402,12 +457,12 @@
if (val != 'verify') {
if (this.where.status != val) {
this.where.status = val;
this.where.search_info=''
this.where.search_info = ''
delete this.where.is_verify;
this.init();
}
} else {
this.where.search_info=''
this.where.search_info = ''
this.where.is_verify = 1;
delete this.where.status;
this.init();
@ -477,16 +532,62 @@
}
})
},
//
toPostagequ(item) {
this.popUpShow = true
logisticsCode(item.order_id).then(res => {
//
handleSubmitDelivery(item) {
if (!this.deliveryForm.delivery_name) return this.$util.Tips({
title: "请输入送货人姓名!"
})
if (!uni.$u.test.mobile(this.deliveryForm.delivery_id)) {
console.log(3123123);
return uni.showToast({
title: "手机号输入有误!",
icon: "none"
});
}
let that = this;
delivery(this.deliveryForm).then(res => {
if (res.status == 200) {
this.payCodeUrl = res.data.qrcode
this.$util.Tips({
title: res.message
})
that.init();
setTimeout(() => {
that.popUpShow = false;
}, 1000)
}
}).catch((err) => {
that.$util.Tips({
title: err
})
})
},
//
toPostagequ(item) {
this.deliveryForm.delivery_name = '';
this.deliveryForm.delivery_id = '';
this.deliveryForm.remark = '';
this.deliveryForm.mer_id = item.mer_id;
this.deliveryForm.order_id = item.order_id;
this.popUpShow = true;
// this.shipment.delivery_name = this.shipment.to_name
// this.shipment.delivery_id = this.shipment.to_phone
// logisticsCode(item.order_id).then(res => {
// if (res.status == 200) {
// this.payCodeUrl = res.data.qrcode
// }
// })
},
toPostage(item) {
let that = this;
if (item.refunding != 0) {
@ -575,7 +676,7 @@
uni.navigateTo({
url: `/pages/admin/orderDetail/index?id=${item.order_id}&mer_id=${item.mer_id}`
})
},
toRefundDetail(item) {
uni.navigateTo({
@ -590,11 +691,72 @@
</script>
<style lang="scss">
.form {
position: relative;
z-index: 11;
padding: 40rpx 60rpx;
background-color: #fff;
border-radius: 20rpx;
.form-item {
display: flex;
align-items: center;
.form-item-label {
width: 140rpx;
font-size: 28rpx;
color: #333;
font-weight: bold;
margin-right: 20rpx;
}
.form-item-val {
flex: 1;
}
}
.form-btn {
display: flex;
justify-content: center;
margin-top: 50rpx;
.form-btn-cancel {
width: 83px;
height: 60rpx;
line-height: 60rpx;
border-radius: 30rpx;
text-align: center;
color: #2291F8;
border: 2rpx solid #2291F8;
margin-right: 40rpx;
}
.form-btn-confirm {
width: 83px;
height: 60rpx;
line-height: 60rpx;
background: linear-gradient(90deg, #2291F8 0%, #1CD1DC 100%);
border-radius: 30rpx;
text-align: center;
color: #fff;
font-size: 28rpx;
}
.form-btn-cancel:active {
background: rgba(209, 220, 255, .3);
}
.form-btn-confirm:active {
opacity: .8;
}
}
}
.pos-order-list .top-header {
position: fixed;
top: 0;
left: 0;
z-index: 9999;
z-index: 10;
width: 100%;
background-color: #fff;
}
@ -1017,25 +1179,27 @@
flex: 1;
}
}
.bar-code{
position: fixed;
top: 0;
left: 0;
z-index: 999999;
width: 100vw;
height: 100vh;
background-color: rgba(0,0,0,0.2);
display: flex;
align-items: center;
justify-content: center;
}
.cloud-tag{
font-size: 20rpx;
padding: 2rpx 5rpx;
font-weight: 400;
background-color: #ff4c3c;
border-radius: 8rpx;
margin-right: 6rpx;
color: #fff;
}
.bar-code {
position: fixed;
top: 0;
left: 0;
z-index: 999999;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.2);
display: flex;
align-items: center;
justify-content: center;
}
.cloud-tag {
font-size: 20rpx;
padding: 2rpx 5rpx;
font-weight: 400;
background-color: #ff4c3c;
border-radius: 8rpx;
margin-right: 6rpx;
color: #fff;
}
</style>

View File

@ -125,7 +125,7 @@
</view>
</view>
<view class="money">
<view class="x-money">{{ val.cart_info.productAttr.procure_price }}</view>
<view class="x-money">{{ val.cart_info.productAttr.wholesale_price }}</view>
<view class="num">x{{ val.product_num }}</view>
<!-- <view class="refund-num" v-if="val.product_num-val.refund_num>0">{{val.product_num-val.refund_num}}{{val.is_refund==1?'退款中' : val.is_refund==2 ? '已退款' : val.is_refund==3?'全部退款':''}}</view> -->
</view>

View File

@ -1,6 +1,5 @@
<template>
<view class="content">
<view class="content-top">
<view class="content-tops">
<view class="content-top_img" v-if="Object.keys(userInfoData).length>0">
@ -79,26 +78,6 @@
</view>
</view>
<view class="content-tools" style="margin-top: 30rpx;"
v-if="$store.state.app.userInfo&&$store.state.app.userInfo.mer_info&&$store.state.app.userInfo.mer_info.type_code=='TypeSupplyChain'">
<view class="tools-one" style="margin-bottom: 20rpx;">
转账订单
<view class=""></view>
</view>
<view class="content-order">
<view class="" v-for="(item,i) in other_order" :key='i' @click="other_shopporder(item)">
<view class="content-order-two">
{{item.value}}
</view>
<view class="content-order-one">
{{item.name}}
</view>
</view>
<view class="" v-for="item in 3" :key="'empty'+item">
</view>
</view>
</view>
<view class="content-tools">
<view class="tools-one">
@ -168,7 +147,7 @@
<view class="list-one_right-c">
</view>
<view class="list-one_right-b">待发货</view>
<view class="list-one_right-b">{{item.order_type == 0?'待发货':'待核销'}} </view>
</view>
</view>
<view class="">
@ -194,9 +173,7 @@
style="color: #F84221;">{{g.cart_info.productAttr.price.split('.')[1] }}</span>(含快递:0.00
</view>
</view>
</view>
</view>
<view class="list-three">
<view class="list-three-one">
@ -219,7 +196,9 @@
</view>
<view class="list-four">
<view class="btn" @click="refundModify(item,1)">备注</view>
<view class="btn1" @click="shopdetail(item)">去发货</view>
<view class="btn1" @click="shopdetail(item)">
{{item.order_type == 0?'去发货':'去核销'}}
</view>
</view>
</view>
@ -231,10 +210,7 @@
<view class='loadingicon acea-row row-center-wrapper' v-if='productList.length > 0'>
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
</view>
</view>
<view>
<view class="priceChange" :class="refundMark === true ? 'on' : ''">
@ -447,7 +423,8 @@
import {
merstreet,
getUserInfo,
getAdminApplyAPI
getAdminApplyAPI,
progressBankList
} from '@/api/user.js';
import {
business,
@ -490,36 +467,43 @@
name: '本月订单数',
value: 0
}, {
name: '补贴金额',
name: '补贴',
value: 0
}, {
name: '生产资料包余额',
name: '春耕采购余额',
value: 0
}, {
name: '今日订单数',
value: 0
}, ],
order: [{
name: '待付款',
type: 1,
value: 0
}, {
name: '待发货',
type: 2,
value: 0
}, {
name: '待收货',
type: 3,
value: 0
}, {
name: '待评价',
type: 4,
value: 0
}, {
name: '退款',
type: 6,
value: 0
}],
name: '待付款',
type: 1,
value: 0
}, {
name: '待核销',
type: 99,
value: 0
}, {
name: '待发货',
type: 2,
value: 0
}, {
name: '待收货',
type: 3,
value: 0
},
// {
// name: '',
// type: 4,
// value: 0
// },
{
name: '退款',
type: 6,
value: 0
}
],
other_order: [{
name: '待发货',
type: 2,
@ -539,21 +523,21 @@
type: 13,
image: require('@/static/images/index9.png')
},
{
name: '供货采购',
type: 3,
image: require('@/static/images/index4.png')
},
{
name: '扫码付款',
type: 18,
image: require('@/static/images/index25.png')
},
{
name: '进货管理',
type: 4,
image: require('@/static/images/index5.png')
},
// {
// name: '',
// type: 3,
// image: require('@/static/images/index4.png')
// },
// {
// name: '',
// type: 18,
// image: require('@/static/images/index25.png')
// },
// {
// name: '',
// type: 4,
// image: require('@/static/images/index5.png')
// },
{
name: '订单管理',
type: 2,
@ -589,11 +573,11 @@
type: 17,
image: require('@/static/images/index24.png')
},
{
name: '转账订单',
type: 19,
image: require('@/static/images/index13.png')
},
// {
// name: '',
// type: 19,
// image: require('@/static/images/index13.png')
// },
{
name: '提现管理',
type: 5,
@ -617,6 +601,10 @@
name: '收付明细',
type: 22,
image: require('@/static/images/index14.png')
}, {
name: '商户类型',
type: 23,
image: require('@/static/images/index26.png')
},
@ -641,11 +629,11 @@
type: 2,
image: require('@/static/images/index1.png')
},
{
name: '扫码付款',
type: 18,
image: require('@/static/images/index25.png')
},
// {
// name: '',
// type: 18,
// image: require('@/static/images/index25.png')
// },
{
name: '提现管理',
type: 5,
@ -671,16 +659,16 @@
type: 17,
image: require('@/static/images/index24.png')
},
{
name: '供货采购',
type: 3,
image: require('@/static/images/index4.png')
},
{
name: '进货管理',
type: 4,
image: require('@/static/images/index5.png')
},
// {
// name: '',
// type: 3,
// image: require('@/static/images/index4.png')
// },
// {
// name: '',
// type: 4,
// image: require('@/static/images/index5.png')
// },
{
name: '商户设置',
type: 12,
@ -695,6 +683,10 @@
name: '收付明细',
type: 22,
image: require('@/static/images/index14.png')
}, {
name: '商户类型',
type: 23,
image: require('@/static/images/index26.png')
},
// {
// name: '',
@ -722,11 +714,11 @@
type: 5,
image: require('@/static/images/index8.png')
},
{
name: '供货采购',
type: 3,
image: require('@/static/images/index4.png')
},
// {
// name: '',
// type: 3,
// image: require('@/static/images/index4.png')
// },
{
name: '提货付款',
type: 17,
@ -741,22 +733,26 @@
name: '收付明细',
type: 22,
image: require('@/static/images/index14.png')
}, {
name: '商户类型',
type: 23,
image: require('@/static/images/index26.png')
},
{
name: '扫码付款',
type: 18,
image: require('@/static/images/index25.png')
},
{
name: '进货管理',
type: 4,
image: require('@/static/images/index5.png')
},
{
name: '转账订单',
type: 19,
image: require('@/static/images/index13.png')
},
// {
// name: '',
// type: 18,
// image: require('@/static/images/index25.png')
// },
// {
// name: '',
// type: 4,
// image: require('@/static/images/index5.png')
// },
// {
// name: '',
// type: 19,
// image: require('@/static/images/index13.png')
// },
{
name: '订单核销',
type: 7,
@ -786,7 +782,7 @@
where: {
page: 1,
limit: 3,
status: 2
status: 9
},
where1: {
product_type: 0
@ -885,8 +881,21 @@
handleToWithDraw(item, index) {
if (index == 4) return;
let url;
if (index == 0) url = "/pages/users/embody/embody?mer_id=" + this.userInfoData.service.mer_id;
if (index == 2) url = `/pages/admin/orderList/index?merId=${this.userInfoData.service.mer_id}&types=2`;
if (index == 0) {
progressBankList(this.userInfoData.service.mer_id).then(res => {
const data = res.data.list || [];
if ((data.length == 1 && data[0].is_check === 0) || (data.length == 2 && data[
0].is_check === 0 && data[1].is_check === 0)) {
url = '/pages/withdrawal/progress?mer_id=' + this.userInfoData.service.mer_id
} else {
url = '/pages/withdrawal/index?mer_id=' + this.userInfoData.service.mer_id
}
return uni.navigateTo({
url: url
})
})
}
if (index == 2) url = `/pages/admin/orderList/index?merId=${this.userInfoData.service.mer_id}&types=`;
if (index == 3) url = "/pages/activeCode/subsidy";
uni.navigateTo({
@ -941,17 +950,20 @@
uni.navigateTo({
url: '/pages/admin/orderList/index?merId=' + this.userInfoData.service.mer_id +
'&types=' + item.type
})
break;
case 6:
uni.navigateTo({
url: '/pages/admin/orderList/index?merId=' + this.userInfoData.service.mer_id +
'&types=' + item.type
})
break;
case 99:
uni.navigateTo({
url: '/pages/admin/orderList/index?merId=' + this.userInfoData.service.mer_id +
'&types=' + item.type
})
break;
}
} else {
this.isAuto = true;
@ -994,12 +1006,9 @@
case 6:
uni.navigateTo({
url: '/pages/admin/orderList/indexOther?merId=' + this.userInfoData.service
.mer_id +
'&types=' + item.type
.mer_id + '&types=' + item.type
})
break;
}
} else {
this.isAuto = true;
@ -1231,50 +1240,58 @@
})
} else {
uni.navigateTo({
url: `/pages/store/home/index?id=` + this.userInfoData.service.mer_id + `&type=7`
url: `/pages/store/home/index?id=` + this.userInfoData.service.mer_id
})
}
},
//
shopdetail(item) {
uni.navigateTo({
url: '/pages/admin/orderDetail/index?id=' + item.order_id + '&mer_id=' + this.userInfoData
.service.mer_id
})
if (item.order_type == 0) {
uni.navigateTo({
url: '/pages/admin/orderDetail/index?id=' + item.order_id + '&mer_id=' + this.userInfoData
.service.mer_id
})
} else {
uni.navigateTo({
url: '/pages/admin/order_cancellation/index?mer_id=' + this.userInfoData.service.mer_id
})
}
},
//
getindex() {
const data = {
product_type: this.where1.product_type
}
orderStatistics(this.userInfoData.service.mer_id, data).then(
res => {
this.order[0].value = res.data.order.unpaid
this.order[1].value = res.data.order.unshipped
this.order[2].value = res.data.order.untake
this.order[3].value = res.data.order.unevaluate
this.order[4].value = res.data.order.refund
this.list[2].value = res.data.data.month.orderNum
this.list[5].value = res.data.data.today.orderNum
},
err => {
that.$util.Tips({
title: err.msg
})
}
);
otherOrderStatistics(this.userInfoData.service.mer_id, data).then(
res => {
this.other_order[0].value = res.data.order.unshipped
this.other_order[1].value = res.data.order.untake
},
err => {
that.$util.Tips({
title: err.msg
})
}
);
orderStatistics(this.userInfoData.service.mer_id, data).then(res => {
this.order[0].value = res.data.order.unpaid;
this.order[1].value = res.data.order.verify;
this.order[2].value = res.data.order.unshipped
this.order[3].value = res.data.order.untake
// this.order[4].value = res.data.order.unevaluate
this.order[4].value = res.data.order.refund
this.list[2].value = res.data.data.month.orderNum
this.list[5].value = res.data.data.today.orderNum
}, err => {
this.$util.Tips({
title: err.msg
})
});
// otherOrderStatistics(this.userInfoData.service.mer_id, data).then(
// res => {
// this.other_order[0].value = res.data.order.unshipped
// this.other_order[1].value = res.data.order.untake
// },
// err => {
// that.$util.Tips({
// title: err.msg
// })
// }
// );
},
open() {
this.isshow = !this.isshow
@ -1309,17 +1326,21 @@
this.isgShow = true
}
if (res.data.mer_info.length == 0) {
uni.showModal({
title: '暂未开通商户',
complete(res) {
// #ifdef APP-PLUS
uni.sendHostEvent('closeApp', (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
});
// #endif
}
//
uni.reLaunch({
url: "/pages/index/unregist"
})
// uni.showModal({
// title: '',
// complete(res) {
// // #ifdef APP-PLUS
// uni.sendHostEvent('closeApp', (ret) => {
// //
// console.log('' + JSON.stringify(ret));
// });
// // #endif
// }
// })
} else {
this.getindex()
this.getGoods(true)
@ -1334,8 +1355,14 @@
storeActivityTotal().then(res => {
res.data.forEach(item => {
if (item.type == 1) this.list[4].value = item.total_amount;
if (item.type == 2) this.list[3].value = item.total_amount;
if (item.type == 13) {
this.list[4].value = item.total_amount;
this.list[4].name = item.type_cn;
}
if (item.type == 2) {
this.list[3].value = item.total_amount;
this.list[3].name = item.type_cn;
}
})
})
}
@ -1411,7 +1438,6 @@
title: '申请正在审核中,请勿重复提交'
})
}
} else {
this.isFshow = true
this.countDown()
@ -1450,8 +1476,22 @@
})
break;
case 5:
uni.navigateTo({
url: '/pages/users/embody/embody?mer_id=' + this.userInfoData.service.mer_id
//
progressBankList(this.userInfoData.service.mer_id).then(res => {
const data = res.data.list || [];
if ((data.length == 1 && data[0].is_check === 0) || (data.length == 2 && data[
0].is_check === 0 && data[1].is_check === 0)) {
uni.navigateTo({
url: '/pages/withdrawal/progress?mer_id=' + this.userInfoData
.service.mer_id
})
} else {
uni.navigateTo({
// url: '/pages/users/embody/embody?mer_id=' + this.userInfoData.service.mer_id
url: '/pages/withdrawal/index?mer_id=' + this.userInfoData
.service.mer_id
})
}
})
break;
case 6:
@ -1528,6 +1568,14 @@
url: '/pages/payment/payment_detail?mer_id=' + this.userInfoData.service.mer_id
})
break;
case 23:
if (this.userInfoData.mer_info.mer_settlement_agree_status == 0) Toast('暂无权限');
else uni.navigateTo({
url: '/pages/product/shop_type_change/index?mer_id=' + this.userInfoData
.service.mer_id
})
break;
case 17:
if (this.userInfoData.mer_info.mer_settlement_agree_status == 0) Toast('暂无权限');
else uni.navigateTo({
@ -2252,7 +2300,6 @@
width: 100%;
height: 100%;
}
}
}
@ -2277,8 +2324,6 @@
margin-top: 61rpx;
.content-middlea {
// width: 161rpx;
// flex: 1;
width: 33.33%;
flex-shrink: 0;
text-align: center;
@ -2316,7 +2361,6 @@
.content-bottom {
background-color: #ffffff;
border-radius: 32rpx 32rpx 0px 0px;
// margin-top: 41rpx;
padding-top: 46rpx;
.content-order {
@ -2324,7 +2368,6 @@
display: flex;
justify-content: space-around;
view {
width: 100rpx;

130
pages/index/unregist.vue Normal file
View File

@ -0,0 +1,130 @@
<!-- 未开通商户 -->
<template>
<view class="unregist">
<view class="icon" @click="handleBack">
<u-icon name="arrow-left" color="#fff" size="20"></u-icon>
</view>
<view class="head">
<image src="@/static/images/f.png"></image>
<text>暂无信息</text>
</view>
<view class="con">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/e70e7202404021040448288.png"></image>
<text class="empty">暂无数据</text>
<text class="no_shop">您还没有开通商户</text>
</view>
<view class="btn c_active" @click="handleOpen">
<text>点击开通</text>
</view>
</view>
</template>
<script>
export default {
methods: {
handleBack() {
console.log(1241)
// #ifdef APP-PLUS
uni.sendHostEvent('backApp', (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
});
// #endif
},
handleOpen() {
// #ifdef APP-PLUS
uni.sendHostEvent('closeAppToOpenShop', (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
});
// #endif
}
}
}
</script>
<style lang="scss">
.unregist {
position: relative;
.icon {
position: absolute;
top: calc(30rpx + var(--status-bar-height));
left: 30rpx;
z-index: 10;
}
.head {
display: flex;
align-items: center;
width: 100%;
height: 360rpx;
background-image: url(https://lihai001.oss-cn-chengdu.aliyuncs.com/def/a2e04202404021019436262.webp);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
margin-bottom: 200rpx;
image {
width: 112rpx;
height: 112rpx;
border-radius: 50%;
margin: 0 12rpx 0 60rpx;
}
text {
font-size: 28rpx;
color: #FFFFFF;
}
}
.con {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
image {
width: 512rpx;
height: 334rpx;
margin: 0 auto;
}
.empty {
margin-bottom: 16rpx;
font-size: 34rpx;
color: #000000;
}
.no_shop {
font-size: 24rpx;
color: #999999;
line-height: 0rpx;
}
}
.btn {
position: fixed;
left: 50%;
transform: translateX(-50%);
bottom: 80rpx;
width: 650rpx;
height: 88rpx;
line-height: 88rpx;
background: linear-gradient(359deg, #72BE53 0%, #46B03A 100%);
border-radius: 88rpx;
text-align: center;
text {
font-weight: 600;
font-size: 30rpx;
color: #F5F5F5;
}
}
}
</style>

View File

@ -78,8 +78,8 @@
<view :class="{'active': storeParam.order=='sales'}" @click="set_where('sales')">销量</view>
<!-- <view :class="{'active': storeParam.order.includes('price')}" @click="set_where(price_order)">
<text style="margin-right: 5rpx;">价格</text>
<image class="icon" v-if="price_order=='procure_price_asc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/up'+keyColor+'.png'"></image>
<image class="icon" v-else-if="price_order=='procure_price_desc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/down'+keyColor+'.png'"></image>
<image class="icon" v-if="price_order=='wholesale_price_asc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/up'+keyColor+'.png'"></image>
<image class="icon" v-else-if="price_order=='wholesale_price_desc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/down'+keyColor+'.png'"></image>
<image class="icon" v-else src='/static/images/horn.png'></image>
</view> -->
</view>
@ -104,7 +104,7 @@
<view v-else-if="item.unit_name">{{item.unit_name}}</view>
</view>
<view class="r_btn" v-if="getAttr(item)">
<view><text style="font-size: 33rpx;">{{ getAttr(item).procure_price.split('.')[0] }}.</text>{{getAttr(item).procure_price.split('.')[1]}}</view>
<view><text style="font-size: 33rpx;">{{ getAttr(item).wholesale_price.split('.')[0] }}.</text>{{getAttr(item).wholesale_price.split('.')[1]}}</view>
<image src="@/static/images/icon/plus.png" style="width: 40rpx;height: 40rpx;border-radius: 40rpx;"></image>
</view>
</view>
@ -254,7 +254,7 @@
street: "",
showPicker: false,
status: "loadmore",
price_order: 'procure_price_asc', //(), procure_price_asc, procure_price_desc
price_order: 'wholesale_price_asc', //(), wholesale_price_asc, wholesale_price_desc
//
downMenu: [{
title: '默认',
@ -685,8 +685,8 @@
// this.storeParam.order = 'location' //使
this.storeParam.order = e //
this.getStoreList();
if(e=='procure_price_asc') return this.price_order = 'procure_price_desc';
if(e=='procure_price_desc') return this.price_order = 'procure_price_asc';
if(e=='wholesale_price_asc') return this.price_order = 'wholesale_price_desc';
if(e=='wholesale_price_desc') return this.price_order = 'wholesale_price_asc';
},
backjJump() {
uni.navigateBack({
@ -785,7 +785,7 @@
this.cartList = res.data.list
this.cartList.forEach(e => {
e.list.forEach(item => {
this.totalMoney += item.cart_num * item.productAttr.procure_price
this.totalMoney += item.cart_num * item.productAttr.wholesale_price
})
})
this.totalMoney = this.totalMoney.toFixed(2)

View File

@ -78,8 +78,8 @@
<view :class="{'active': storeParam.order=='sales'}" @click="set_where('sales')">销量</view>
<!-- <view :class="{'active': storeParam.order.includes('price')}" @click="set_where(price_order)">
<text style="margin-right: 5rpx;">价格</text>
<image class="icon" v-if="price_order=='procure_price_asc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/up'+keyColor+'.png'"></image>
<image class="icon" v-else-if="price_order=='procure_price_desc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/down'+keyColor+'.png'"></image>
<image class="icon" v-if="price_order=='wholesale_price_asc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/up'+keyColor+'.png'"></image>
<image class="icon" v-else-if="price_order=='wholesale_price_desc'&&storeParam.order.includes('price')" :src="domain+'/static/diy/down'+keyColor+'.png'"></image>
<image class="icon" v-else src='/static/images/horn.png'></image>
</view> -->
</view>
@ -104,7 +104,7 @@
<view v-else-if="item.unit_name">{{item.unit_name}}</view>
</view>
<view class="r_btn" v-if="getAttr(item)">
<view><text style="font-size: 33rpx;">{{ getAttr(item).procure_price.split('.')[0] }}.</text>{{getAttr(item).procure_price.split('.')[1]}}</view>
<view><text style="font-size: 33rpx;">{{ getAttr(item).wholesale_price.split('.')[0] }}.</text>{{getAttr(item).wholesale_price.split('.')[1]}}</view>
<image src="@/static/images/icon/plus.png" style="width: 40rpx;height: 40rpx;border-radius: 40rpx;"></image>
</view>
</view>
@ -253,7 +253,7 @@
street: "",
showPicker: false,
status: "loadmore",
price_order: 'procure_price_asc', //(), procure_price_asc, procure_price_desc
price_order: 'wholesale_price_asc', //(), wholesale_price_asc, wholesale_price_desc
//
downMenu: [{
title: '默认',
@ -681,8 +681,8 @@
// this.storeParam.order = 'location' //使
this.storeParam.order = e //
this.getStoreList();
if(e=='procure_price_asc') return this.price_order = 'procure_price_desc';
if(e=='procure_price_desc') return this.price_order = 'procure_price_asc';
if(e=='wholesale_price_asc') return this.price_order = 'wholesale_price_desc';
if(e=='wholesale_price_desc') return this.price_order = 'wholesale_price_asc';
},
backjJump() {
uni.navigateBack({
@ -780,7 +780,7 @@
this.cartList = res.data.list
this.cartList.forEach(e => {
e.list.forEach(item => {
this.totalMoney += item.cart_num * item.productAttr.procure_price
this.totalMoney += item.cart_num * item.productAttr.wholesale_price
})
})
this.totalMoney = this.totalMoney.toFixed(2)

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,7 @@
<view class="right_goods_msg">
<view class="num">
<text style="margin-right: 5rpx;">¥</text>
<text>{{$procure_price(item)}}</text>
<text>{{$wholesale_price(item)}}</text>
</view>
<!-- <view class="add_goods" @click="getGoodsDetails(item)">加入购物单</view> -->
</view>

View File

@ -58,7 +58,7 @@
v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text>
</view>
<view class='money acea-row row-middle'>
<text>{{goods.productAttr.procure_price}}</text>
<text>{{goods.productAttr.wholesale_price}}</text>
<view v-if="goods.productAttr.show_svip_price" class="vipImg">
<image src="/static/images/svip.png"></image>
</view>
@ -238,7 +238,7 @@
cartAttr: false,
productAttr: [],
productSelect: {
procure_price: ''
wholesale_price: ''
}
},
isOpen: false, //
@ -428,7 +428,7 @@
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product
.image);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
@ -448,7 +448,7 @@
);
this.$set(this.attr.productSelect, "image", goods.product.image);
this.$set(this.attr.productSelect, "price", goods.product.price);
this.$set(this.attr.productSelect, "procure_price", goods.product.price);
this.$set(this.attr.productSelect, "wholesale_price", goods.product.price);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", "");
@ -464,7 +464,7 @@
);
this.$set(this.attr.productSelect, "image", goods.product.image);
this.$set(this.attr.productSelect, "price", goods.product.price);
this.$set(this.attr.productSelect, "procure_price", goods.product.price);
this.$set(this.attr.productSelect, "wholesale_price", goods.product.price);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", goods.product.stock);
this.$set(this.attr.productSelect, "unique", goods.product.unique || "");
@ -476,7 +476,7 @@
this.$set(this.attr.productSelect, "store_name", goods.product.store_name);
this.$set(this.attr.productSelect, "image", productSelect.image);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
@ -551,7 +551,7 @@
if (productSelect && productSelect.stock > 0) {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this, "uniqueValue", productSelect.unique);
@ -560,7 +560,7 @@
} else {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0);
@ -849,7 +849,7 @@
// //
el.list.forEach(e => {
if (e.check) {
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.procure_price, e.cart_num))
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.wholesale_price, e.cart_num))
totalNum += +e.cart_num
}
})

View File

@ -52,7 +52,7 @@
v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text>
</view>
<view class='money acea-row row-middle'>
<text>{{goods.productAttr.procure_price}}</text>
<text>{{goods.productAttr.wholesale_price}}</text>
<view v-if="goods.productAttr.show_svip_price" class="vipImg">
<image src="/static/images/svip.png"></image>
</view>
@ -232,7 +232,7 @@
cartAttr: false,
productAttr: [],
productSelect: {
procure_price: ''
wholesale_price: ''
}
},
isOpen: false, //
@ -422,7 +422,7 @@
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product
.image);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
@ -442,7 +442,7 @@
);
this.$set(this.attr.productSelect, "image", goods.product.image);
this.$set(this.attr.productSelect, "price", goods.product.price);
this.$set(this.attr.productSelect, "procure_price", goods.product.price);
this.$set(this.attr.productSelect, "wholesale_price", goods.product.price);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", "");
@ -458,7 +458,7 @@
);
this.$set(this.attr.productSelect, "image", goods.product.image);
this.$set(this.attr.productSelect, "price", goods.product.price);
this.$set(this.attr.productSelect, "procure_price", goods.product.price);
this.$set(this.attr.productSelect, "wholesale_price", goods.product.price);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", goods.product.stock);
this.$set(this.attr.productSelect, "unique", goods.product.unique || "");
@ -470,7 +470,7 @@
this.$set(this.attr.productSelect, "store_name", goods.product.store_name);
this.$set(this.attr.productSelect, "image", productSelect.image);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
@ -545,7 +545,7 @@
if (productSelect && productSelect.stock > 0) {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this, "uniqueValue", productSelect.unique);
@ -554,7 +554,7 @@
} else {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0);
@ -836,7 +836,7 @@
// //
el.list.forEach(e => {
if (e.check) {
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.procure_price, e.cart_num))
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.wholesale_price, e.cart_num))
totalNum += +e.cart_num
}
})

View File

@ -52,7 +52,7 @@
v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text>
</view>
<view class='money acea-row row-middle'>
<text>{{goods.productAttr.procure_price}}</text>
<text>{{goods.productAttr.wholesale_price}}</text>
<view v-if="goods.productAttr.show_svip_price" class="vipImg">
<image src="/static/images/svip.png"></image>
</view>
@ -232,7 +232,7 @@
cartAttr: false,
productAttr: [],
productSelect: {
procure_price: ''
wholesale_price: ''
}
},
isOpen: false, //
@ -424,7 +424,7 @@
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product
.image);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
@ -444,7 +444,7 @@
);
this.$set(this.attr.productSelect, "image", goods.product.image);
this.$set(this.attr.productSelect, "price", goods.product.price);
this.$set(this.attr.productSelect, "procure_price", goods.product.price);
this.$set(this.attr.productSelect, "wholesale_price", goods.product.price);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", "");
@ -460,7 +460,7 @@
);
this.$set(this.attr.productSelect, "image", goods.product.image);
this.$set(this.attr.productSelect, "price", goods.product.price);
this.$set(this.attr.productSelect, "procure_price", goods.product.price);
this.$set(this.attr.productSelect, "wholesale_price", goods.product.price);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", goods.product.stock);
this.$set(this.attr.productSelect, "unique", goods.product.unique || "");
@ -472,7 +472,7 @@
this.$set(this.attr.productSelect, "store_name", goods.product.store_name);
this.$set(this.attr.productSelect, "image", productSelect.image);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
this.$set(this.attr.productSelect, "svip_price", productSelect.svip_price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
@ -547,7 +547,7 @@
if (productSelect && productSelect.stock > 0) {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this, "uniqueValue", productSelect.unique);
@ -556,7 +556,7 @@
} else {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage);
this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "procure_price", productSelect.procure_price);
this.$set(this.attr.productSelect, "wholesale_price", productSelect.wholesale_price);
this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", "");
this.$set(this.attr.productSelect, "cart_num", 0);
@ -844,7 +844,7 @@
// //
el.list.forEach(e => {
if (e.check) {
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.procure_price, e.cart_num))
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.wholesale_price, e.cart_num))
totalNum += +e.cart_num
}
})

View File

@ -933,8 +933,8 @@
});
getOtherOrderDetail(that.order_id).then(res => {
uni.hideLoading();
res.data.orderProduct[0].cart_info.productAttr.price = res.data.orderProduct[0].cart_info.productAttr.procure_price;
res.data.orderProduct[0].cart_info.product.price = res.data.orderProduct[0].cart_info.productAttr.procure_price;
res.data.orderProduct[0].cart_info.productAttr.price = res.data.orderProduct[0].cart_info.productAttr.wholesale_price;
res.data.orderProduct[0].cart_info.product.price = res.data.orderProduct[0].cart_info.productAttr.wholesale_price;
that.$set(that, 'orderInfo', res.data);
that.orderInfo.take = res.data.take;
that.$set(that, 'cartInfo', res.data.orderProduct);

View File

@ -1,66 +1,73 @@
<template>
<view class="container">
<view class="v-navbar">
<view v-if="!isWeixin" class="v-navbar">
<u-navbar title="提货付款" :safeAreaInsetTop="false" :fixed="false" @leftClick="leftClick" bgColor="transparent"
leftIconColor="#fff" :titleStyle="{color:'#fff',fontWeight:'bold',fontSize:'32rpx'}">
leftIconColor="#333" :titleStyle="{color:'#333',fontWeight:'bold',fontSize:'32rpx'}">
</u-navbar>
</view>
<view v-if="merchantInfo && !isEmpty">
<view class="v-desc">
<view>
<view class="v-desc-main">确认提货付款</view>
<view class="v-desc-sub">{{merchantInfo.merchant.mer_name}}</view>
</view>
<u-image :showLoading="true" :src="merchantInfo.merchant.mer_avatar" width="182rpx" height="182rpx"
:radius="10" />
<view style="height: 50rpx;"></view>
<view class="wrap">
<view class="shop">
<image src="@/static/shop_logo.webp" style="width: 62rpx;height: 54rpx;" />
<text class="shop-name" v-if="mer_name">{{mer_name||''}}</text>
</view>
<!-- 付款金额 -->
<view class="v-con">
<view class="v-con-text">付款金额</view>
<view class="v-con-input" style="margin-right: 10px;">
<text style="color: #303133;font-size:46rpx;"></text>
<u--input type="digit" fontSize="23" v-model="cartForm.total_amount" placeholder="请输入金额"
border="none" placeholderStyle="color:#999;font-size:30rpx" @input="validateDecimal">
<view class="v-con-text">订单金额</view>
<view class="v-con-input" @click="handleOpenKeyboard">
<text style="color: #303133;font-size:32rpx;"></text>
<u--input type="text" fontSize="23" height="112rpx" placeholder="请输入金额" border="none" readonly
v-model="cartForm.total_amount" placeholderStyle="color:#999;font-size:32rpx">
</u--input>
<view class="placeholder"></view>
</view>
<view class="v-wrap" v-if="cartForm.total_amount">
<view class="v-wrap-money">
<text class="icon"></text>
<text class="num">{{cartForm.total_amount}}</text>
</view>
<view class="v-wrap-desc">
<view class="v-wrap-desc-main">实物提货券</view>
<view class="v-wrap-desc-sub">即买即用</view>
<view class="v-con-group">
<view class="v-con-group-title">
<view class="v-con-group-title-left">套餐详情</view>
<view class="v-con-group-title-right" @click.stop="handleOpen">
<text>{{isOpen?'折叠':'展开'}}</text>
<u-icon :name="isOpen?'arrow-down' : 'arrow-right'" size="15"></u-icon>
</view>
</view>
<scroll-view scroll-y>
<view class="v-con-group-list" :style="{'max-height':isOpen?'400rpx':'0'}">
<block v-for="(item,indx) in merchantInfo" :key="indx">
<view class="v-con-group-list-item">
<image :src="item.image" :showLoading="true" style="width:86rpx;height:86rpx;" />
<text class="line1">{{item.store_name}}</text>
</view>
</block>
</view>
</scroll-view>
</view>
</view>
<view class="v-btn-wrap">
<view class="v-btn" @click="submitOrder">提交订单</view>
<view class="v-btn-wrap" @click="cartForm.total_amount?submitOrder():null">
<view class="v-btn">{{Number(cartForm.total_amount||0).toFixed(2)}} 确认支付</view>
</view>
<!-- 登陆 -->
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun">
</authorize>
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun" />
</view>
<!-- 无商户信息提示 -->
<view v-else class="empty">
<image src="/static/images/no_thing.png"></image>
<text style="margin-top: 60rpx;">{{tips}}</text>
<!-- 登陆 -->
<authorize :isAuto="isAuto" :isGoIndex="false" :isShowAuth="isShowAuth" @authColse="authColse"
@onLoadFun="onLoadFun">
<!-- <view class="empty">
<authorize v-show="!isWeixin" ref="authRef" :isAuto="isAuto" :isGoIndex="false" :isShowAuth="isShowAuth"
@authColse="authColse" @onLoadFun="onLoadFun">
</authorize>
</view>
</view> -->
<!-- 键盘 -->
<popups ref="popups" @confirm="handleConfirm" @clear="handleClear" @change="handleChange"></popups>
</view>
</template>
<script>
var that;
import {
getProductInfo,
getProductInfo1,
addCart,
orderCheck
} from "@/api/payment.js";
@ -69,17 +76,23 @@
mapGetters
} from "vuex";
import authorize from '@/components/Authorize';
import { Toast } from "../../libs/uniApi";
import {
Toast
} from "../../libs/uniApi";
import popups from "@/components/popups/index.vue";
export default {
components: {
authorize
authorize,
popups
},
computed: {
...mapGetters(['isLogin']),
},
data() {
return {
isEmpty: false,
isEmpty: true,
// isWeixin: this.$wechat.isWeixin(),
isWeixin: false,
cartForm: {
product_id: '',
product_attr_unique: '',
@ -103,29 +116,67 @@ import { Toast } from "../../libs/uniApi";
isAuto: false, //
isShowAuth: false, //
mer_id: '',
tips: '暂未登陆~'
changeTxt: '展开',
isOpen: false,
keyBoardShow: false,
mer_name: ''
}
},
onLoad(opt) {
that = this;
this.mer_id = opt.mer_id;
},
onShow() {
if (!this.isLogin) {
Cache.set("login_back_url_weixin", "/" + getCurrentPages()[0].route + "?mer_id=" + this.mer_id);
this.isAuto = true;
this.isShowAuth = true;
if (this.isWeixin) {
this.$nextTick(() => {
this.$refs.authRef.toWecahtAuth();
})
}
} else {
this.checkForm.cart_id = [];
this.getProductInfoByMerid(this.mer_id);
this.checkForm.cart_id = [];
this.getProductInfoByMerid();
}
},
methods: {
validateDecimal(event) {
let val = (this.cartForm.total_amount.match(/^\d*(\.?\d{0,2})/g)[0]) || ''
this.$nextTick(() => {
this.cartForm.total_amount = val;
})
//
handleOpenKeyboard() {
if (!this.isLogin) {
Cache.set("login_back_url_weixin", "/" + getCurrentPages()[0].route + "?mer_id=" + this.mer_id);
this.isAuto = true;
this.isShowAuth = true;
if (this.isWeixin) {
this.$nextTick(() => {
this.$refs.authRef.toWecahtAuth();
})
}
} else {
this.$refs.popups.handleOpen('money');
}
},
//
handleConfirm(e) {
if (!e) return;
this.cartForm.total_amount = e;
this.submitOrder();
},
//
handleClear() {
this.cartForm.total_amount = '';
this.merchantInfo = [];
},
//
handleChange(e) {
this.cartForm.total_amount = e;
uni.$u.debounce(that.getProductInfoByMerid, 200)
},
leftClick(e) {
@ -133,60 +184,94 @@ import { Toast } from "../../libs/uniApi";
url: '/pages/index/index'
})
},
//
authColse: function(e) {
this.isShowAuth = e;
},
onLoadFun() {
this.getProductInfoByMerid(this.mer_id);
this.isShowAuth = false;
},
//
submitOrder() {
async submitOrder() {
if (!this.cartForm.total_amount) {
return this.$util.Tips({
title: "请输入付款金额!"
})
}
//
this.cartForm.product_id = this.merchantInfo.product_id;
this.cartForm.product_type = this.merchantInfo.product_type;
this.cartForm.product_attr_unique = this.merchantInfo.sku[''].unique;
let that = this;
addCart(this.cartForm).then(res => {
// ID
that.checkForm.cart_id.push(res.data.cart_id);
//
for (var i = 0; i < that.merchantInfo.length; i++) {
let info = {
product_id: that.merchantInfo[i].product_id,
product_attr_unique: that.merchantInfo[i].unique,
cart_num: that.merchantInfo[i].num,
is_new: 1,
product_type: 0,
source: 999,
total_amount: that.cartForm.total_amount
};
try {
let res = await addCart(info);
that.checkForm.cart_id.push(res.data.cart_id);
} catch (e) {
return that.$util.Tips({
title: err.message || err.msg || err
})
}
}
if (that.checkForm.cart_id && that.checkForm.cart_id.length > 0) {
orderCheck(that.checkForm).then(res1 => {
uni.navigateTo({
url: "/pages/payment/settlement?cartId=" + this.checkForm
.cart_id + "&money=" + this.cartForm.total_amount +
"&merName=" + this.merchantInfo.merchant.mer_name,
url: "/pages/payment/settlement",
success: (res) => {
res.eventChannel.emit('datas', res1.data.platformConsumption);
uni.setStorageSync('datas', {
platformConsumption: res1.data.platformConsumption ||
[],
productData: that.merchantInfo,
checkForm: that.checkForm,
money: that.cartForm.total_amount,
merName: that.mer_name,
money: that.cartForm.total_amount,
key: res1.data.key
})
},
fail(err) {
console.log(err)
}
})
}).catch(err=>{
Toast(err.message || err)
});
}).catch((err) => {
this.$util.Tips({
title: err.message || err.msg || err
})
})
}).catch(err => {
Toast(err.message || err)
});
}
},
getProductInfoByMerid(merid) {
let that = this;
getProductInfo({
mer_id: merid
//
handleOpen() {
this.isOpen = !this.isOpen;
},
//
getProductInfoByMerid(merid, money) {
getProductInfo1({
mer_id: that.mer_id,
money: that.cartForm.total_amount
}).then(res => {
this.merchantInfo = res.data;
if (!that.cartForm.total_amount) {
this.mer_name = res.data.merchant;
} else {
that.merchantInfo = res.data.list;
}
}).catch((err) => {
this.tips = err.message || err.smg || err;
this.$util.Tips({
that.$util.Tips({
title: err.message || err.msg || err
}, () => {
})
// #ifdef APP
setTimeout(() => {
@ -200,49 +285,6 @@ import { Toast } from "../../libs/uniApi";
that.isEmpty = true;
// #endif
})
},
//
handleSavePic() {
// URL
let imageUrl = this.qrcodeUrl; // 使
// #ifdef H5
var a = document.createElement("a");
a.download = imageUrl;
a.href = imageUrl;
document.body.appendChild(a);
a.click();
a.remove();
// #endif
// #ifndef H5
let that = this;
uni.downloadFile({
url: imageUrl,
success(res) {
if (res.statusCode === 200) {
let tempFilePath = res.tempFilePath; //
uni.saveImageToPhotosAlbum({
filePath: tempFilePath,
success() {
return that.$util.Tips({
title: '图片已保存至相册!'
});
},
fail(err) {
console.error('保存失败', err);
}
});
} else {
console.error('下载失败', res.statusCode);
}
},
fail(err) {
console.error('下载失败', err);
}
});
// #endif
}
}
}
@ -250,11 +292,11 @@ import { Toast } from "../../libs/uniApi";
<style lang="scss">
page {
background-color: #FCDFAD;
background-color: #F9F9F9;
}
.empty {
margin: 130rpx 0 150rpx;
margin: 0;
text-align: center;
image,
@ -274,7 +316,7 @@ import { Toast } from "../../libs/uniApi";
.container {
position: relative;
height: 100vh;
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/c582c202402291601584806.webp");
// background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/c582c202402291601584806.webp");
background-size: 100% auto;
background-repeat: no-repeat;
padding-top: var(--status-bar-height);
@ -304,34 +346,56 @@ import { Toast } from "../../libs/uniApi";
}
}
.wrap {
margin: 0 52rpx 0 54rpx;
}
.shop {
display: flex;
align-items: center;
margin-bottom: 54rpx;
text {
margin-left: 32rpx;
}
}
.v-con {
position: absolute;
top: 436rpx;
left: 50%;
transform: translateX(-50%);
width: 710rpx;
height: 680rpx;
background: linear-gradient(180deg, #FEB992 0%, #FFFFFF 31%, #FFFFFF 100%);
border-radius: 20rpx;
margin: 0 auto;
box-shadow: 0 -4rpx 0px 0px #fff;
padding: 53rpx 30rpx 0 30rpx;
box-sizing: border-box;
margin: 0 auto 150rpx;
.v-con-text {
margin-bottom: 60rpx;
font-weight: 400;
font-size: 32rpx;
color: #2E2E2E;
line-height: 16rpx;
font-size: 30rpx;
color: #000000;
}
.v-con-input {
position: relative;
display: flex;
align-items: center;
margin-bottom: 83rpx;
padding: 0 0 40rpx 12rpx;
height: 112rpx;
margin-bottom: 32rpx;
border-bottom: 1rpx solid #D6D6D6;
/deep/.uni-input-input {
height: 112rpx;
font-weight: bold;
font-size: 72rpx;
}
text {
font-weight: 400;
font-size: 32rpx;
color: #000000;
}
.placeholder {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
.v-wrap {
@ -340,9 +404,6 @@ import { Toast } from "../../libs/uniApi";
padding-left: 20rpx;
width: 666rpx;
height: 210rpx;
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/2f9c2202402291652415355.webp");
background-size: 100% 100%;
background-repeat: no-repeat;
.v-wrap-money {
display: flex;
@ -377,37 +438,92 @@ import { Toast } from "../../libs/uniApi";
}
}
}
}
.v-btn-wrap {
position: fixed;
z-index: 11;
bottom: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 240rpx;
background-color: #FDD6A6;
.v-btn {
width: 650rpx;
height: 100rpx;
line-height: 100rpx;
background: #FF8056;
box-shadow: 0rpx 3rpx 3rpx 1rpx rgba(255, 94, 12, 0.4);
border-radius: 55rpx 55rpx 55rpx 55rpx;
border: 1rpx solid #FF8056;
font-weight: 600;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
.v-con-group {
.v-con-group-title {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32rpx;
&:active {
opacity: .8;
.v-con-group-title-left {
font-weight: 400;
font-size: 30rpx;
color: #000000;
}
.v-con-group-title-right {
display: flex;
align-items: center;
text {
margin-right: 18rpx;
font-weight: 400;
font-size: 30rpx;
color: #000000;
}
}
}
.v-con-group-list {
transition: max-height linear .1s;
.v-con-group-list-item {
display: flex;
align-items: center;
margin-bottom: 14rpx;
text {
margin-left: 30rpx;
font-size: 26rpx;
color: #333333;
}
}
}
}
}
.v-btn-wrap {
width: 100%;
height: 90rpx;
line-height: 90rpx;
background: #40AE36;
border-radius: 10rpx;
font-weight: 400;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
// position: fixed;
// z-index: 11;
// bottom: 0;
// left: 0;
// display: flex;
// justify-content: center;
// align-items: center;
// width: 100%;
// height: 240rpx;
// background-color: #FDD6A6;
// .v-btn {
// width: 650rpx;
// height: 100rpx;
// line-height: 100rpx;
// background: #FF8056;
// box-shadow: 0rpx 3rpx 3rpx 1rpx rgba(255, 94, 12, 0.4);
// border-radius: 55rpx 55rpx 55rpx 55rpx;
// border: 1rpx solid #FF8056;
// font-weight: 600;
// font-size: 32rpx;
// color: #FFFFFF;
// text-align: center;
// &:active {
// opacity: .8;
// }
// }
}
}
</style>

View File

@ -27,7 +27,8 @@
<block v-for="(item,indx) in paymentData" :key="indx">
<view class="payment-detail-con-item">
<view class="item-desc">
<text class="item-desc-name">{{item.come_msg}}</text>
<text class="item-desc-name line1" style="width:280rpx;">{{item.come_msg}}</text>
<text style="width:180rpx;">{{item.pay_type_name}}</text>
<text class="item-desc-price"
:style="{'color':item.msg=='收入'?'#EEC102':''}"><text>{{item.msg == '支出'?'-':'+'}}</text>{{item.pay_price}}</text>
</view>
@ -130,7 +131,13 @@
pickerConfirm(e) {
const date = new Date(e.value).format('yyyy-MM-dd');
if (this.pickStartShow) this.searchParams.section_startTime = date;
if (this.pickStartShow) {
this.searchParams.section_startTime = date;
this.searchParams.page = 1;
this.paymentData = [];
this.loadend = false;
this.getData();
}
if (this.pickEndShow) {
if (!this.searchParams.section_startTime)
this.searchParams.section_startTime = date;

View File

@ -1,100 +1,21 @@
<style lang="scss" scoped>
page {
background-color: #FCE9B2;
}
.container {
position: relative;
height: 100vh;
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/9cf05202402291000026355.webp");
background-size: 100% auto;
background-repeat: no-repeat;
padding-top: var(--status-bar-height);
.v-navbar {
margin-bottom: 54rpx;
}
.v-desc {
position: absolute;
top: 230rpx;
left: 40rpx;
.v-desc-main {
margin-bottom: 30rpx;
font-weight: 600;
font-size: 42rpx;
color: #FFFFFF;
}
.v-desc-sub {
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
}
}
.v-qrcode {
position: absolute;
top: 475rpx;
left: 50%;
transform: translateX(-50%);
}
.v-btn {
position: absolute;
top: 1173rpx;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
justify-content: center;
width: 690rpx;
height: 100rpx;
background: #FFFFFF;
box-shadow: 0rpx 3rpx 12rpx 1rpx rgba(255, 94, 12, 0.32);
border-radius: 55rpx 55rpx 55rpx 55rpx;
margin: 0 auto;
image {
width: 32rpx;
height: 32rpx;
margin-right: 6rpx;
}
text {
font-weight: 600;
font-size: 32rpx;
color: #FF5E0C;
line-height: 16rpx;
text-align: center;
font-style: normal;
text-transform: none;
margin-top: 2rpx;
}
}
}
</style>
<template>
<view class="container">
<view class="v-navbar">
<u-navbar title="提货付款" :autoBack="true" :fixed="false" bgColor="transparent" leftIconColor="#fff"
<u-navbar title="商户收款" :autoBack="true" :fixed="false" bgColor="transparent" leftIconColor="#fff"
:titleStyle="{color:'#fff',fontWeight:'bold',fontSize:'32rpx'}">
</u-navbar>
</view>
<!-- <view class="v-desc">
<view class="v-desc-main">扫描二维码</view>
<view class="v-desc-sub">即可进入面对面付款</view>
</view> -->
<view style="display:flex;justify-content:center;flex-direction:column;align-items:center;">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/82347202403181619505958.png"
style="width:350rpx;height:118rpx;" mode="widthFix" />
<text class="shop_name">店铺:{{userInfo.mer_info.mer_name || '-'}}</text>
</view>
<view class="v-qrcode">
<u-image width="540rpx" height="540rpx" :showLoading="true" :src="img" class="v-qrcode-img"></u-image>
<view style="color: #FF5E0C;text-align: center;" v-if="userInfo.mer_info">{{userInfo.mer_info.mer_name}}</view>
<u-image width="490rpx" height="490rpx" :showLoading="true" :src="img" class="v-qrcode-img"></u-image>
</view>
<view class="v-btn" @click="handleSavePic">
<image src="../../static/images/download_yellow.webp" />
<text>保存二维码</text>
</view>
</view>
@ -108,22 +29,32 @@
data() {
return {
img: '',
userInfo: {}
userInfo: {}
}
},
onLoad(opt) {
let user = this.$store.state.app.userInfo;
if(typeof user =='string') user = JSON.parse(user);
this.userInfo = user;
this.getQrcode(user.service.mer_id)
let user = this.$store.state.app.userInfo;
if (typeof user == 'string') user = JSON.parse(user);
this.userInfo = user;
this.getQrcode(user.service.mer_id)
},
methods: {
//
getQrcode(merid) {
qrcode({
mer_id: merid || 7
mer_id: merid
}).then(res => {
this.img = res.data.url;
if (!res.data.count || res.data.count == 0) {
this.$util.Tips({
title: "您还没有添加商品,请添加!"
}, () => {
uni.redirectTo({
url: "/pages/product/addGood/addGood?mer_id=" + merid
})
})
} else {
this.img = res.data.url;
}
})
},
@ -173,4 +104,53 @@
}
}
}
</script>
</script>
<style lang="scss">
page {
background-color: #40AE36;
}
.container {
position: relative;
height: 100vh;
background-size: 100% auto;
background-repeat: no-repeat;
padding-top: var(--status-bar-height);
.v-navbar {
margin-bottom: 54rpx;
}
.v-qrcode {
width: 650rpx;
height: 650rpx;
margin-top: 100rpx;
margin: 100rpx auto 0;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
.shop_name {
margin-top: 30rpx;
font-size: 30rpx;
color: #FFFFFF;
}
.v-btn {
display: flex;
align-items: center;
justify-content: center;
width: 690rpx;
height: 100rpx;
margin: 70rpx auto 0;
text {
font-weight: 400;
font-size: 32rpx;
color: #fff;
}
}
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -47,7 +47,7 @@
</commodityComponent>
<view class="popup_group">
<!-- <view class="popup_group_item" @click="selectPlatform">
<!-- <view class="popup_group_item popup_group_item_b" @click="selectPlatform">
<view class="popup_group_item_label">平台分类</view>
<view class="popup_group_item_value">
<view class="popup_group_item_message">
@ -69,7 +69,7 @@
<view><span class="iconfont">&#xe6bd;</span></view>
</view>
</view> -->
<view class="popup_group_item">
<view class="popup_group_item popup_group_item_b">
<view class="popup_group_item_label">商品单位</view>
<view class="popup_group_item_value"><input v-model="setFormData.unit_name" type="text"
placeholder="请填写商品单位" /></view>
@ -120,7 +120,7 @@
</view>
<view v-if="false" class="popup_group">
<view class="popup_group">
<!-- <view class="popup_group_item" @click="showMoreInfo=!showMoreInfo">
<view class="popup_group_item_label">更多信息</view>
<view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'">
@ -128,8 +128,8 @@
</view>
</view> -->
<block>
<!-- <view class="input_content">
<view class="input_content_describe" style="border-top: none">
<view class="input_content">
<view class="input_content_describe" style="border: none;padding-bottom: 0;">
<view class="input_content_describe_title">
<view class="input_content_describe_title_msg">商品简介</view>
<view class="input_content_describe_title_num">
@ -139,17 +139,17 @@
</view>
</view>
<view class="input_content_describe_textarea">
<textarea v-model="setFormData.store_info" value="" placeholder="请填写商品简介"
<textarea v-model="setFormData.store_info" style="width: 100%;" value="" placeholder="请填写商品简介"
placeholderClass="placeholderClass" maxlength="200" />
</view>
</view>
<view class="input_content_keyword">
<!-- <view class="input_content_keyword">
<view class="input_content_keyword_label">关键字</view>
<view class="input_content_keyword_value"><input v-model="setFormData.keyword" type="text" value=""
placeholder="填写关键字" /></view>
</view>
</view> -->
</view> -->
</view>
<!-- <view class="input_content">
<view class="input_content_keyword">
<view class="input_content_keyword_label">最少购买件数</view>
@ -159,17 +159,17 @@
</view> -->
<view class="radio">
<view class="radio_label ">送货方式</view>
<checkbox-group class="select_group flex_start">
<checkbox-group class="select_group flex_start" @change="changeDelivery">
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
<view>
<checkbox :value="val.value" disabled :checked="val.value" />
<checkbox :value="val.value" :checked="setFormData.delivery_way.includes(val.value+'')" />
</view>
<view>{{ val.name }}</view>
</label>
</checkbox-group>
</view>
</block>
</view>
</view>
@ -246,7 +246,7 @@
specifica: '', //
// setSpecificaValue: '', //
// setSpecificaValue2: '',
delivery_way: [1, 2], // 1 2
delivery_way: ['1', '2'], // 1 2 , // 1 2
delivery_free: '1', // 0 1
temp_id: '', // ID
tempName: '' ,//
@ -346,7 +346,7 @@
// "cost": "1",
// "stock": "11",
// "ot_price": "",
// "procure_price": "",
// "wholesale_price": "",
// "bar_code": "666",
// "weight": "10",
// "volume": "5",
@ -364,6 +364,9 @@
}
},
methods: {
changeDelivery(e){
this.setFormData.delivery_way = e.detail.value;
},
//
initDataEditData() {
this.setFormData = {
@ -395,7 +398,7 @@
};
productDetail(this.merId, this.product_id).then(async (res) => {
this.showCommodity = true;
if (res.data.content_arr.length > 0) res.data.content = res.data.content_arr;
if (res.data.content_arr&&res.data.content_arr.length > 0) res.data.content = res.data.content_arr;
let editGoodsDetils = res.data;
Object.keys(this.setFormData).forEach(item => {
this.setFormData[item] = editGoodsDetils[item];
@ -413,6 +416,7 @@
if (res.data.content && typeof res.data.content == 'string') res.data.content = JSON.parse(res.data
.content);
this.setFormData.once_min_count <= 0 ? this.setFormData.once_min_count = '' : null;
this.setFormData.delivery_way = res.data.delivery_way;
//
this.$nextTick(() => {
this.$refs.commodityRef.setDatas({
@ -615,6 +619,7 @@
if (this.setFormData.spec_type == 0) {
console.log('价格库存', this.$refs.priceRef.singleSpecification);
}
if(this.setFormData.delivery_way.length==0) return Toast('请至少选择一种送货方式');
let postData = {
...this.setFormData,
...this.$refs.commodityRef.addGoodsSecoundData,
@ -636,7 +641,7 @@
if (typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
let showFlag = '';
postData.attrValue.forEach(t => {
if (userInfo?.mer_info?.type_code == "TypeSupplyChain" && (!t.procure_price || +t.procure_price <= 0)) {
if (userInfo.mer_info.wholesale && (!t.wholesale_price || +t.wholesale_price <= 0)) {
showFlag = '批发价不能小于0'
}
if (!t.price || +t.price <= 0) showFlag = '零售价不能小于0';
@ -652,12 +657,12 @@
productUpdate(this.merId, this.product_id, postData)
.then(res => {
hideLoading()
Modal('提交成功', '点击确定,返回商品管理', {
showCancel: false
}).then(() => {
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
uni.redirectTo({
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
})
}).catch(()=>{
uni.navigateBack()
})
})
.catch(rej => {
@ -668,15 +673,15 @@
productCreate(this.merId, postData)
.then(res => {
hideLoading();
Modal('提交成功', '点击确定,返回商品管理', {
showCancel: false,
}).then(() => {
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
if (this.import == 1) {
uni.$emit('importAttrValueOK', this.setFormData.import_id);
uni.navigateBack();
} else uni.redirectTo({
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
})
}).catch(()=>{
uni.navigateBack()
})
})
.catch(rej => {

View File

@ -47,7 +47,7 @@
</commodityComponent>
<view class="popup_group">
<view class="popup_group_item" @click="selectPlatform">
<view class="popup_group_item popup_group_item_b" @click="selectPlatform">
<view class="popup_group_item_label">平台分类</view>
<view class="popup_group_item_value">
<view class="popup_group_item_message">
@ -133,7 +133,7 @@
</view>
<view v-if="false" class="popup_group">
<view class="popup_group">
<!-- <view class="popup_group_item" @click="showMoreInfo=!showMoreInfo">
<view class="popup_group_item_label">更多信息</view>
<view class="popup_group_item_value" :class="showMoreInfo?'icon_bottom':'icon_top'">
@ -141,8 +141,8 @@
</view>
</view> -->
<block>
<!-- <view class="input_content">
<view class="input_content_describe" style="border-top: none">
<view class="input_content">
<view class="input_content_describe" style="border: none;padding-bottom: 0;">
<view class="input_content_describe_title">
<view class="input_content_describe_title_msg">商品简介</view>
<view class="input_content_describe_title_num">
@ -152,37 +152,37 @@
</view>
</view>
<view class="input_content_describe_textarea">
<textarea v-model="setFormData.store_info" value="" placeholder="请填写商品简介"
<textarea v-model="setFormData.store_info" style="width: 100%;" value="" placeholder="请填写商品简介"
placeholderClass="placeholderClass" maxlength="200" />
</view>
</view>
<view class="input_content_keyword">
<!-- <view class="input_content_keyword">
<view class="input_content_keyword_label">关键字</view>
<view class="input_content_keyword_value"><input v-model="setFormData.keyword" type="text" value=""
placeholder="填写关键字" /></view>
</view>
</view> -->
<view class="input_content">
</view> -->
</view>
<!-- <view class="input_content">
<view class="input_content_keyword">
<view class="input_content_keyword_label">最少购买件数</view>
<view class="input_content_keyword_value"><input v-model="setFormData.once_min_count" type="number" value=""
placeholder="不限量" /></view>
</view>
</view>
</view> -->
<view class="radio">
<view class="radio_label ">送货方式</view>
<checkbox-group class="select_group flex_start">
<checkbox-group class="select_group flex_start" @change="changeDelivery">
<label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
<view>
<checkbox :value="val.value" disabled :checked="val.value" />
<checkbox :value="val.value" :checked="setFormData.delivery_way.includes(val.value+'')" />
</view>
<view>{{ val.name }}</view>
</label>
</checkbox-group>
</view>
</block>
</view>
</view>
@ -265,7 +265,7 @@
specifica: '', //
// setSpecificaValue: '', //
// setSpecificaValue2: '',
delivery_way: [1, 2], // 1 2
delivery_way: ['1', '2'], // 1 2 , // 1 2
delivery_free: '1', // 0 1
temp_id: '', // ID
tempName: '' ,//
@ -365,7 +365,7 @@
// "cost": "1",
// "stock": "11",
// "ot_price": "",
// "procure_price": "",
// "wholesale_price": "",
// "bar_code": "666",
// "weight": "10",
// "volume": "5",
@ -399,6 +399,9 @@
this.setFormData.attrValue[this.deleteIndex].is_d_show = true;
this.showDelete = false;
},
changeDelivery(e){
this.setFormData.delivery_way = e.detail.value;
},
//
initDataEditData() {
this.setFormData = {
@ -430,7 +433,7 @@
};
productDetail(this.merId, this.product_id).then(async (res) => {
this.showCommodity = true;
if (res.data.content_arr.length > 0) res.data.content = res.data.content_arr;
if (res.data.content_arr&&res.data.content_arr.length > 0) res.data.content = res.data.content_arr;
let editGoodsDetils = res.data;
Object.keys(this.setFormData).forEach(item => {
this.setFormData[item] = editGoodsDetils[item];
@ -451,6 +454,7 @@
if(res.data.attr.length==1&&res.data.attr[0].value=='规格'){ //
this.setFormData.spec_type = 0;
}
this.setFormData.delivery_way = res.data.delivery_way;
//
this.$nextTick(() => {
this.$refs.commodityRef.setDatas({
@ -654,6 +658,7 @@
// if (this.setFormData.spec_type == 0) {
// console.log('', this.$refs.priceRef.singleSpecification);
// }
if(this.setFormData.delivery_way.length==0) return Toast('请至少选择一种送货方式');
let postData = {
...this.setFormData,
...this.$refs.commodityRef.addGoodsSecoundData,
@ -683,7 +688,7 @@
if (typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
let showFlag = '';
postData.attrValue.forEach(t => {
if (userInfo?.mer_info?.type_code == "TypeSupplyChain" && (!t.procure_price || +t.procure_price <= 0)) {
if (userInfo.mer_info.wholesale && (!t.wholesale_price || +t.wholesale_price <= 0)) {
showFlag = '结算价不能小于0'
}
if (!t.price || +t.price <= 0) showFlag = '零售价不能小于0';
@ -715,12 +720,12 @@
productUpdate(this.merId, this.product_id, postData)
.then(res => {
hideLoading()
Modal('提交成功', '点击确定,返回商品管理', {
showCancel: false
}).then(() => {
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
uni.redirectTo({
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
})
}).catch(()=>{
uni.navigateBack()
})
})
.catch(rej => {
@ -731,15 +736,15 @@
productCreate(this.merId, postData)
.then(res => {
hideLoading();
Modal('提交成功', '点击确定,返回商品管理', {
showCancel: false,
}).then(() => {
Modal('提交成功', '点击确定,前往商品列表页面').then(() => {
if (this.import == 1) {
uni.$emit('importAttrValueOK', this.setFormData.import_id);
uni.navigateBack();
} else uni.redirectTo({
url: '/pages/product/goodsOnSale/index?mer_id=' + this.merId
url: `/pages/product/goodsOnSale/index?mer_id=${this.merId}&type=6`
})
}).catch(()=>{
uni.navigateBack()
})
})
.catch(rej => {

View File

@ -31,7 +31,7 @@
cost: '', //
stock: '', //
ot_price: '', //
procure_price: '', //
wholesale_price: '', //
bar_code: '', //
weight: '', //
volume: '', //
@ -129,13 +129,13 @@
let userInfo = this.$store.state.app.userInfo;
if(typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
//
if(userInfo.mer_info?.type_code=="TypeSupplyChain"){
if(userInfo.mer_info?.wholesale){
this.formList.unshift({
id: 3,
label: '批发价',
type: 'digit',
holder: '请填写批发价',
model: 'procure_price',
model: 'wholesale_price',
require: true,
})
}

View File

@ -31,7 +31,7 @@
cost: '', //
stock: '', //
ot_price: '', //
procure_price: '', //
wholesale_price: '', //
bar_code: '', //
weight: '', //
volume: '', //
@ -137,7 +137,7 @@
label: '批发价',
type: 'digit',
holder: '请填写批发价',
model: 'procure_price',
model: 'wholesale_price',
require: true,
})
}

View File

@ -34,7 +34,7 @@
cost: '', //
stock: '', //
ot_price: '', //
procure_price: '', //
wholesale_price: '', //
bar_code: '', //
weight: '', //
volume: '', //
@ -61,10 +61,10 @@
require: true,
},{
id: 3,
label: '结算价',
label: '批发价',
type: 'digit',
holder: '请填写结算价',
model: 'procure_price',
holder: '请填写批发价',
model: 'wholesale_price',
require: true,
}, {
id: 10,
@ -155,7 +155,7 @@
let userInfo = this.$store.state.app.userInfo;
if(typeof userInfo == 'string') userInfo = JSON.parse(userInfo);
//
//
// if(userInfo.mer_info?.type_code=="TypeSupplyChain"){
// let list = []
// this.formList = [...list, ...this.formList]

View File

@ -6,6 +6,7 @@
padding-top: 20rpx;
padding-bottom: 156rpx;
}
.bar-code{
height: 80rpx;
display: flex;
@ -285,4 +286,11 @@
.margin_right {
background: #FD6523;
margin-right: 30rpx;
}
.popup_group_item_b{
padding-left: 20rpx !important;
.popup_group_item_label::before{
color: #e93323;
content: "* ";
}
}

View File

@ -138,6 +138,7 @@
"cost": "",
"ot_price": "",
"price": "",
"wholesale_price": "",
"volume": "",
"weight": "",
},
@ -420,7 +421,7 @@
// flag = false;
// str = '0';
// }
else if ((!item.procure_price||+item.procure_price<=0) && this.userInfo.mer_info.type_code == 'TypeSupplyChain') {
else if ((!item.wholesale_price||+item.wholesale_price<=0) && this.userInfo.mer_info.wholesale) {
flag = false;
str = '批发价不能小于等于0';
}

View File

@ -596,7 +596,7 @@
}
productDetail(this.merId, this.product_id).then(res => {
setStorage('editGoodsDetils', res.data);
if(res.data.content_arr.length>0) res.data.content = res.data.content_arr;
if(res.data.content_arr&&res.data.content_arr.length>0) res.data.content = res.data.content_arr;
if(typeof res.data.content == 'string')res.data.content = JSON.parse(res.data.content);
this.$store.commit('setStorage', res.data);
let editGoodsDetils = res.data;

View File

@ -30,7 +30,7 @@
cost: '', //
stock: '', //
ot_price: '', //
procure_price: '', //
wholesale_price: '', //
bar_code: '', //
weight: '', //
volume: '', //
@ -159,7 +159,7 @@
label: '批发价',
type: 'digit',
holder: '请填写批发价',
model: 'procure_price',
model: 'wholesale_price',
require: true,
})
}

View File

@ -271,7 +271,7 @@
if(!postData.unit_name||postData.unit_name?.trim().length<=0)return Toast('请输入商品单位');
let userInfo = this.$store.state.app.userInfo;
if(typeof userInfo == 'string')userInfo= JSON.parse(userInfo);
if(userInfo?.mer_info?.type_code=="TypeSupplyChain" && (!postData.attrValue[0]?.procure_price||postData.attrValue[0]?.procure_price<=0) )return Toast('批发价不能小于0');
if(userInfo?.mer_info?.type_code=="TypeSupplyChain" && (!postData.attrValue[0]?.wholesale_price||postData.attrValue[0]?.wholesale_price<=0) )return Toast('批发价不能小于0');
if(!postData.attrValue[0]?.price||postData.attrValue[0]?.price<=0)return Toast('零售价不能小于0');
if(!postData.stock||postData.stock<0)return Toast('库存不能小于0');
// if(!postData.attrValue[0]?.cost||postData.attrValue[0]?.cost<=0)return Toast('0');

View File

@ -1,14 +1,13 @@
<template>
<view class="basic_set">
<!-- 老板说这里不要 -->
<view class="basice_item">
<view class="headline">
<view class="text flex_a_c">店铺基本配置</view>
</view>
<view class="store_bg">
<view class="store_bg" v-if="false">
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>店铺背景图</view>
<block v-if="images[0].img">
<!-- <u--image :showLoading="true" :src="images[0].img" width="388px" height="210.53rpx" radius="4px"
@click="delImg(0)" mode="aspectFit"></u--image> -->
<u--image :showLoading="true" :src="images[0].img" width="680rpx" height="210.53rpx" radius="4px"
@click="delImg(0)"></u--image>
</block>
@ -17,6 +16,7 @@
建议尺寸710*220px
</view>
</view>
<view class="store_avatar flex_a_c_j_sb">
<view class="avatar_box">
<view class="text flex_a_c"><i class="iconfont icon-xinghao"></i>店铺头像</view>
@ -32,29 +32,26 @@
<view class="zizhi_box">
<view class="text">店铺资质</view>
<block v-if="images[3].img">
<u--image :showLoading="true" @click="!imgUpload?priviewImg([images[3].img]):seleckImage(3)" :src="images[3].img" width="382.46rpx" height="210.53rpx"
radius="4px"></u--image>
<u--image :showLoading="true" @click="!imgUpload?priviewImg([images[3].img]):seleckImage(3)"
:src="images[3].img" width="382.46rpx" height="210.53rpx" radius="4px"></u--image>
</block>
<view v-else class="zizhi_img" @click="seleckImage(3)">
<view class="iconfont icon-tupian1"></view>
</view>
</view>
</view>
<view class="store_avatar flex_a_c_j_sb" style="padding: 20rpx 0;" v-if="imagesArr.length>0">
<view class="avatar_box">
<view class="text flex_a_c"></i>店铺其他资质</view>
<view class="other-img">
<view class="other-item" v-for="(imgArr,index) in imagesArr" :key="index" :style="{marginRight: (index+1)%3==0?'0rpx':'20rpx'}">
<u--image :showLoading="true" @click="priviewImg(imagesArr, index)" :src="imgArr" width="210.53rpx" height="210.53rpx"
radius="4px" ></u--image>
</view>
<!-- <view class="avatar_img other-item" @click="seleckImageArr()" :style="{marginRight: (imagesArr.length+1)%3==0?'0rpx':'20rpx'}">
<view class="iconfont icon-tupian1"></view>
建议尺寸120*120px
</view> -->
</view>
</view>
</view>
<view class="store_avatar flex_a_c_j_sb" style="padding: 20rpx 0;" v-if="imagesArr.length>0">
<view class="avatar_box">
<view class="text flex_a_c"></i>店铺其他资质</view>
<view class="other-img">
<view class="other-item" v-for="(imgArr,index) in imagesArr" :key="index"
:style="{marginRight: (index+1)%3==0?'0rpx':'20rpx'}">
<u--image :showLoading="true" @click="priviewImg(imagesArr, index)" :src="imgArr"
width="210.53rpx" height="210.53rpx" radius="4px"></u--image>
</view>
</view>
</view>
</view>
<view class="ask_title">拍摄要求</view>
<view class="shoot_ask flex_a_c_j_sb">
<block v-for="(item,i) in shootAsk" :key="i">
@ -68,7 +65,8 @@
</view>
</block>
</view>
<view class="street_bg">
<view class="street_bg" style="margin-bottom:20rpx;" v-if="false">
<view class="text flex_a_c"> <i class="iconfont icon-xinghao"></i> 店铺街背景图</view>
<block v-if="images[2].img">
<u--image :showLoading="true" :src="images[2].img" width="680rpx" height="210.53rpx" radius="4px"
@ -90,10 +88,8 @@
<text class="sub_title">配送方式</text>
<view class="flex">
<checkbox-group name="" @change="checkboxChange">
<checkbox disabled='true' :checked="isZiti" :value="check.ziti" /><text
class="text ziti">到店自提(加入供应链)</text>
<checkbox disabled='true' :checked="isKuaidi" :value="check.kuaidi" /><text
class="text">快递配送</text>
<checkbox :checked="isZiti" :value="check.ziti" /><text class="text ziti">到店自提</text>
<checkbox :checked="isKuaidi" :value="check.kuaidi" /><text class="text">商家配送</text>
</checkbox-group>
</view>
</view>
@ -103,14 +99,15 @@
</view>
<block>
<view class="item_cell flex_a_c" style="display: flex;justify-content: space-between;align-items: flex-start;">
<view class="item_cell flex_a_c"
style="display: flex;justify-content: space-between;align-items: flex-start;">
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao"></i>详细地址</view>
<!-- <input class="com_input" type="text" v-model="mer_address" placeholder="输入商户地址"> -->
<view class="input" style="flex: 1;margin-right: 15rpx;">{{mer_address}}</view>
<view class="get_site flex_a_c" @click="navTo('/pages/select_address/select_address_n')">
<i class="iconfont icon-dizhi"></i>
获取地址
</view>
<view class="input" style="flex: 1;margin-right: 15rpx;">{{mer_address}}</view>
<view class="get_site flex_a_c" @click="navTo('/pages/select_address/select_address_n')">
<i class="iconfont icon-dizhi"></i>
获取地址
</view>
</view>
<!-- <view class="long_lat">
@ -158,7 +155,7 @@
<view class="sub_title flex_a_c">客服电话</view>
<view class="com_input">{{servicePhone}}</view>
</view>
<!-- <view class="item_cell flex_a_c" v-if="type_code!='TypeFamousSpecialties'||type_code!='TypeLocalCuisine'||type_code!='TypeFeaturedCultural'" >
<view class="sub_title flex_a_c"><i class="iconfont icon-xinghao" v-if="credit_buy"></i>开启先货后款</view>
<u-switch v-model="credit_buy" @change="change"></u-switch>
@ -174,7 +171,7 @@
<input type="number" maxlength="5" v-model="interest_rate" placeholder="请输入 /利率单位为: %">
</view>
<view class="remarks">*利率结算范围为:0.01 ~ 0.1 利率单位为:%</view> -->
<!-- <view class="item_cell">
<view class="if_btn flex_a_c_j_sb">
<text class="sub_title">是否开启商户</text>
@ -182,8 +179,6 @@
</view>
<text style="color: #CCCCCC;">开启后店铺即可展示在移动端</text>
</view> -->
</view>
<button class="submit_btn l_center" @click="postMerchantUpdata">提交</button>
@ -201,7 +196,7 @@
<script>
import {
navigateBack,
navigateBack,
Toast
} from '@/libs/uniApi.js'
import {
@ -240,8 +235,8 @@
}, {
img: ''
}],
imgUpload: true, //
imagesArr: [],
imgUpload: true, //
imagesArr: [],
storeBg: '',
check: {
ziti: '1',
@ -263,34 +258,34 @@
dateWeek: [{
name: '星期一',
id: 1,
isCheck: false
isCheck: true
}, {
name: '星期二',
id: 2,
isCheck: false
isCheck: true
}, {
name: '星期三',
id: 3,
isCheck: false
isCheck: true
}, {
name: '星期四',
id: 4,
isCheck: false
isCheck: true
}, {
name: '星期五',
id: 5,
isCheck: false
isCheck: true
}, {
name: '星期六',
id: 6,
isCheck: false
isCheck: true
}, {
name: '星期日',
id: 7,
isCheck: false
isCheck: true
}],
selarr: [],
mer_take_time: [],
selarr: [1, 2, 3, 4, 5, 6, 7],
mer_take_time: ['08:00', '18:00'],
beginTimeShow: false,
overTimeShow: false,
mer_address: '',
@ -300,55 +295,65 @@
interest_rate: '', //
settle_cycle: '', //
mer_name: '',
category_name: '', //
category_name: '', //
type_code: ''
}
},
onLoad(e) {
this.id = e.mer_id
this.getMerchantInfo(e.mer_id)
this.isZiti = true
this.isKuaidi = true
this.getMerchantInfo(e.mer_id);
},
onShow() {},
methods: {
getMerchantInfo(id) {
merchantInfoAPI({
id
}).then(res => {
console.log(res)
this.mer_name = res.data.mer_name
this.category_name = res.data.merchantCategory.category_name
this.images[0].img = res.data.mer_banner
this.category_name = res.data.merchantCategory.category_name
// this.images[0].img = res.data.mer_banner
this.images[1].img = res.data.mer_avatar
this.images[2].img = res.data.mini_banner
if(typeof res.data.mer_certificate != 'string'){
this.images[3].img = res.data.mer_certificate[0];
res.data.mer_certificate.shift();
this.imagesArr = res.data.mer_certificate;
}else this.images[3].img = res.data.mer_certificate;
if(this.images[3].img) this.imgUpload = false;
if(typeof res.data.delivery_way == 'string') this.delivery_way = res.data.delivery_way.split(',');
else this.delivery_way = res.data.delivery_way;
this.delivery_way.forEach(item => {
if (item === '1') this.isZiti = true
if (item === '2') this.isKuaidi = true
})
// this.images[2].img = res.data.mini_banner
if (typeof res.data.mer_certificate != 'string') {
this.images[3].img = res.data.mer_certificate[0];
res.data.mer_certificate.shift();
this.imagesArr = res.data.mer_certificate;
} else this.images[3].img = res.data.mer_certificate;
if (this.images[3].img) this.imgUpload = false;
//
if (!res.data.delivery_way || res.data.delivery_way.length == 0) {
this.delivery_way = [1, 2];
this.isZiti = true;
this.isKuaidi = true;
} else {
if (typeof res.data.delivery_way == 'string') this.delivery_way = res.data.delivery_way
.split(
',');
else this.delivery_way = res.data.delivery_way;
this.delivery_way.forEach(item => {
if (item === '1') this.isZiti = true
if (item === '2') this.isKuaidi = true
})
}
this.takeName = res.data.mer_take_name
this.takePhone = res.data.mer_take_phone
this.detailSite = res.data.mer_take_address
// this.servicePhone = res.data.service_phone
this.servicePhone = res.data.mer_phone
this.servicePhone = res.data.mer_phone;
res.data.mer_take_location ? this.longLati = res.data.mer_take_location?.join(',') : null;
res.data.mer_take_day.forEach((item, i) => {
res.data.mer_take_day && res.data.mer_take_day.forEach((item, i) => {
this.dateWeek[Number(item) - 1].isCheck = true
})
this.selarr = res.data.mer_take_day;
this.selarr = res.data.mer_take_day;
this.type_code = res.data.type_code
this.mer_take_time = res.data.mer_take_time
this.intro = res.data.mer_info
this.cruxText = res.data.mer_keyword
this.mer_address = res.data.mer_address
this.mer_address = res.data.mer_address;
this.merState = res.data.mer_state === 1 ? true : false
this.credit_buy = res.data.credit_buy === 1 ? true : false
if (res.data.settle_cycle == 0) {
@ -361,14 +366,21 @@
} else {
this.interest_rate = res.data.interest_rate
}
// console.log('res', res.data);
}).catch(err => {
// console.log('err', err);
})
},
checkboxChange(val) {
this.delivery_way = val.detail.value
if (val.detail.value.length == 0) {
this.isZiti = false;
this.isKuaidi = false;
this.$nextTick(() => {
if (this.delivery_way[0] == 1) this.isZiti = true;
else this.isKuaidi = true;
})
return Toast('请至少选择一种配送方式!');
}
this.delivery_way = val.detail.value;
},
//
change(e) {
@ -382,9 +394,9 @@
this.selarr.push(String(item.id));
} else {
item.isCheck = false;
this.selarr = this.selarr.filter(id=>{
return id!=item.id
})
this.selarr = this.selarr.filter(id => {
return id != item.id
})
}
},
postMerchantUpdata() {
@ -413,7 +425,7 @@
mer_avatar: this.images[1].img,
mini_banner: this.images[2].img,
mer_certificate: this.images[3].img,
delivery_way: [1, 2],
delivery_way: this.delivery_way,
mer_take_name: this.takeName,
mer_take_phone: this.takePhone,
mer_take_address: this.detailSite,
@ -449,9 +461,9 @@
// uni.redirectTo({
// url: '/pages/moreProject/moreProject'
// })
uni.navigateBack({
delta:1
});
uni.navigateBack({
delta: 1
});
}, 1000)
}).catch(err => {
Toast(err)
@ -472,6 +484,7 @@
}
});
},
seleckImage(i) {
let that = this;
that.$util.uploadImageOne('upload/image', function(res) {
@ -504,12 +517,12 @@
// });
},
seleckImageArr() {
let that = this;
that.$util.uploadImageOne('upload/image', function(res) {
that.imagesArr.push(res.data.path)
});
},
seleckImageArr() {
let that = this;
that.$util.uploadImageOne('upload/image', function(res) {
that.imagesArr.push(res.data.path)
});
},
delImg(i) {
let that = this
uni.showModal({
@ -522,38 +535,38 @@
}
})
},
delImgArr(i) {
let that = this
uni.showModal({
title: '删除图片',
content: '确定删除图片?',
success: res => {
if (res.confirm) {
that.imagesArr.splice(i, 1);
}
}
})
},
priviewImg(url, index=0){
uni.previewImage({
urls: url,
current: index
})
},
navTo(url){
if(url=='/pages/select_address/select_address_n'){
uni.$once('changeAddress', (res)=>{
// console.log('', res);
this.mer_address = res.formatted_addresses.recommend;
this.latitude = res.latitude;
this.longitude = res.longitude;
this.longLati = `${res.latitude},${res.longitude}`
})
}
uni.navigateTo({
url:url
})
}
delImgArr(i) {
let that = this
uni.showModal({
title: '删除图片',
content: '确定删除图片?',
success: res => {
if (res.confirm) {
that.imagesArr.splice(i, 1);
}
}
})
},
priviewImg(url, index = 0) {
uni.previewImage({
urls: url,
current: index
})
},
navTo(url) {
if (url == '/pages/select_address/select_address_n') {
uni.$once('changeAddress', (res) => {
// console.log('', res);
this.mer_address = res.formatted_addresses.recommend;
this.latitude = res.latitude;
this.longitude = res.longitude;
this.longLati = `${res.latitude},${res.longitude}`
})
}
uni.navigateTo({
url: url
})
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
@ -649,16 +662,17 @@
}
}
}
.other-img{
display: flex;
width: 100%;
flex-wrap: wrap;
.other-item{
margin-right: 20rpx;
margin-bottom: 20rpx;
}
}
.other-img {
display: flex;
width: 100%;
flex-wrap: wrap;
.other-item {
margin-right: 20rpx;
margin-bottom: 20rpx;
}
}
.zizhi_box {
.text {
@ -731,24 +745,24 @@
.sub_title {
font-size: 31.58rpx;
flex-shrink: 0;
flex-shrink: 0;
}
.item_cell {
padding: 31.58rpx 0;
border-bottom: 1px solid #F7F7F7;
.com_input{
flex: 1;
}
.com_input {
flex: 1;
}
.ziti {
margin-right: 21.05rpx;
}
.get_site{
color: #20A162;
}
.get_site {
color: #20A162;
}
}
.remark {

View File

@ -1,60 +1,70 @@
<template>
<view class="container_input">
<view class="container_input_item" v-for="(item, index) in platformClassification" :key="index" @click="selectItem(item)" v-if="!item.DoNotShow">
<view class="select_and_input" v-if="item.type == 'select' || item.type == 'input' || item.type == 'switch' || item.type == 'number' || item.type == 'digit'">
<view v-if="item.require" style="color: #e93323;">*</view>
<view class="container_input_item_label">
<text class="select_check" :class="{ select: item.select }" @click.stop="selectRadio(item)" v-if="Object.keys(item).indexOf('select') != -1">
<text v-if="item.select" class="iconfont">&#xe646;</text>
</text>
<text class="select_label line1">{{ item.label }}</text>
</view>
<view class="container_input_item_value greyColor" v-if="item.type == 'select'">
<text v-if="item.value" class="text">{{ item.value }}</text>
<text v-else>{{ item.holder }}</text>
<text class="iconfont">&#xe6bd;</text>
</view>
<view class="container_input_item_value" v-if="item.type == 'number'">
<input v-model="formData[item.model]" type="number" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" />
</view>
<view class="container_input_item_value" v-if="item.type == 'digit'">
<input v-model="formData[item.model]" type="digit" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" />
</view>
<view class="container_input_item_value" v-if="item.type == 'input'">
<input v-model="formData[item.model]" type="text" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" />
</view>
<view class="container_input_item_value" v-if="item.type == 'switch'">
<switch :checked="formData[item.model] == 1" color="#E93323" style="transform:scale(0.8)" @change="switchChange($event, item)" />
</view>
</view>
<view class="radio" v-if="item.type == 'radio' || item.type == 'check'">
<view class="container_input_item_label">{{ item.label }}</view>
<view class="container_input_item_value flex_start" v-if="item.type == 'radio'">
<radio-group class="select_group" @change="radioChange($event, item)">
<label class="container_input_item_value_select" v-for="(val, i) in item.radioList" :key="val.value">
<view>
<radio :value="val.value" :checked="val.value == item.inforValue" />
</view>
<view>{{ val.name }}</view>
</label>
</radio-group>
</view>
<view class="container_input_item_value flex_start" v-if="item.type == 'check'">
<checkbox-group class="select_group" @change="checkChange($event, item)">
<label class="container_input_item_value_select" v-for="(val, i) in item.checkList" :key="val.value">
<view>
<checkbox class="chenk_list" :value="val.value" :checked="val.value == item.inforValue" />
</view>
<view>{{ val.name }}</view>
</label>
</checkbox-group>
</view>
</view>
</view>
</view>
<view class="container_input">
<view class="container_input_item" v-for="(item, index) in platformClassification" :key="index"
@click="selectItem(item)" v-if="!item.DoNotShow">
<view class="select_and_input"
v-if="item.type == 'select' || item.type == 'input' || item.type == 'switch' || item.type == 'number' || item.type == 'digit'">
<view v-if="item.require" style="color: #e93323;">*</view>
<view class="container_input_item_label">
<text class="select_check" :class="{ select: item.select }" @click.stop="selectRadio(item)"
v-if="Object.keys(item).indexOf('select') != -1">
<text v-if="item.select" class="iconfont">&#xe646;</text>
</text>
<text class="select_label line1">{{ item.label }}</text>
</view>
<view class="container_input_item_value greyColor" v-if="item.type == 'select'">
<text v-if="item.value" class="text">{{ item.value }}</text>
<text v-else>{{ item.holder }}</text>
<text class="iconfont">&#xe6bd;</text>
</view>
<view class="container_input_item_value" v-if="item.type == 'number'">
<input v-model="formData[item.model]" type="number" value="" :placeholder="item.holder"
placeholder-class="inputPlaceHolder" />
</view>
<view class="container_input_item_value" v-if="item.type == 'digit'">
<input v-model="formData[item.model]" type="digit" value="" :placeholder="item.holder"
placeholder-class="inputPlaceHolder" />
</view>
<view class="container_input_item_value" v-if="item.type == 'input'">
<input v-model="formData[item.model]" type="text" value="" :placeholder="item.holder"
placeholder-class="inputPlaceHolder" />
</view>
<view class="container_input_item_value" v-if="item.type == 'switch'">
<switch :checked="formData[item.model] == 1" color="#E93323" style="transform:scale(0.8)"
@change="switchChange($event, item)" />
</view>
</view>
<view class="radio" v-if="item.type == 'radio' || item.type == 'check'">
<view class="container_input_item_label">{{ item.label }}</view>
<view class="container_input_item_value flex_start" v-if="item.type == 'radio'">
<radio-group class="select_group" @change="radioChange($event, item)">
<label class="container_input_item_value_select" v-for="(val, i) in item.radioList"
:key="val.value">
<view>
<radio :value="val.value" :checked="val.value == item.inforValue" />
</view>
<view>{{ val.name }}</view>
</label>
</radio-group>
</view>
<view class="container_input_item_value flex_start" v-if="item.type == 'check'">
<checkbox-group class="select_group" @change="checkChange($event, item)">
<label class="container_input_item_value_select" v-for="(val, i) in item.checkList"
:key="val.value">
<view>
<checkbox class="chenk_list" :value="val.value"
:checked="val.value == item.inforValue" />
</view>
<view>{{ val.name }}</view>
</label>
</checkbox-group>
</view>
</view>
</view>
</view>
</template>
<script>
/*
/*
item参数
id:
type: select
@ -63,178 +73,189 @@
select 有此key值时可进行选择逻辑
*/
export default {
props: {
platformClassification: {
type: Array,
default() {
return [];
}
},
form: {
type: Object,
default: () => {
return {};
}
}
},
data() {
return {
value: '',
formData: this.form
};
},
watch: {
formData: {
handler(val) {
this.$emit('input',val)
},
deep: true
},
form: {
handler(val) {
this.formData = val
export default {
props: {
platformClassification: {
type: Array,
default () {
return [];
}
},
deep: true
form: {
type: Object,
default: () => {
return {};
}
}
},
data() {
return {
value: '',
formData: this.form
};
},
watch: {
formData: {
handler(val) {
this.$emit('input', val)
},
deep: true
},
form: {
handler(val) {
this.formData = val;
//
if (!this.formData.price || this.formData.price == '0.00') this.formData.price = '';
if (!this.formData.stock) this.formData.stock = '';
},
deep: true
}
},
created() {
this.platformClassification.forEach(item => {
if (item.inforValue) {
this.$emit('formInitData', item.inforValue, item.model);
}
});
},
methods: {
selectItem(item) {
if (item.jumpLogic) {
//
this.$emit('handleJumpLogic', item);
return;
}
this.$emit('handleSelectItem', item);
},
radioChange(e, item) {
this.$emit('radioChange', e.detail.value, item);
},
// switch
switchChange(e, item) {
this.$emit('switchChange', e.detail.value, item);
},
//
//
selectRadio(item) {
item.select = !item.select;
},
//
checkChange(e, item) {
this.$emit('checkChange', e.detail.value, item);
}
}
},
created() {
this.platformClassification.forEach(item => {
if(item.inforValue) {
this.$emit('formInitData', item.inforValue, item.model);
}
});
},
methods: {
selectItem(item) {
if(item.jumpLogic) {
//
this.$emit('handleJumpLogic', item);
return;
}
this.$emit('handleSelectItem', item);
},
radioChange(e, item) {
this.$emit('radioChange', e.detail.value, item);
},
// switch
switchChange(e, item) {
this.$emit('switchChange', e.detail.value, item);
},
//
//
selectRadio(item) {
item.select = !item.select;
},
//
checkChange(e, item) {
this.$emit('checkChange', e.detail.value, item);
}
}
};
};
</script>
<style lang="scss" scoped>
.container_input {
background: #fff;
padding: 0 20rpx;
width: 710rpx;
margin: auto;
margin-top: 31rpx;
border-radius: 10rpx;
&_item {
.select_and_input {
height: 106rpx;
display: flex;
align-items: center;
justify-content: space-between;
.greyColor {
color: #bbbbbb;
}
}
.container_input {
background: #fff;
padding: 0 20rpx;
width: 710rpx;
margin: auto;
margin-top: 31rpx;
border-radius: 10rpx;
.radio {
padding: 30rpx 0;
}
&_item {
.select_and_input {
height: 106rpx;
display: flex;
align-items: center;
justify-content: space-between;
&_label {
padding-left: 10rpx;
color: #333333;
font-size: 30rpx;
display: flex;
align-items: center;
.select_label{
max-width: 520rpx;
}
.select_check {
display: flex;
align-items: center;
justify-content: center;
width: 40rpx;
height: 40rpx;
border: 1px solid #cccccc;
border-radius: 50%;
margin-right: 20rpx;
.greyColor {
color: #bbbbbb;
}
}
.iconfont {
font-size: 24rpx;
}
}
.radio {
padding: 30rpx 0;
}
.select {
background: #e93323;
border: none;
.iconfont {
color: #fff;
}
}
}
&_value {
padding-right: 10rpx;
flex: 1;
display: flex;
align-items: center;
justify-content: flex-end;
&_label {
padding-left: 10rpx;
color: #333333;
font-size: 30rpx;
display: flex;
align-items: center;
> span:nth-child(1) {
display: inline-block;
margin-right: 15rpx;
}
.text {
color: #000;
display: inline-block;
max-width: 400rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.select_label {
max-width: 520rpx;
}
input {
text-align: right;
}
.select_check {
display: flex;
align-items: center;
justify-content: center;
width: 40rpx;
height: 40rpx;
border: 1px solid #cccccc;
border-radius: 50%;
margin-right: 20rpx;
.select_group {
display: flex;
}
.iconfont {
font-size: 24rpx;
}
}
&_select {
display: flex;
margin-right: 110rpx;
}
}
.select {
background: #e93323;
border: none;
.flex_start {
padding: 0 10rpx;
margin-top: 40rpx;
justify-content: flex-start;
}
}
> view:not(:last-child) {
border-bottom: 1px solid #eeeeee;
}
}
.iconfont {
color: #fff;
}
}
}
.inputPlaceHolder {
color: #bbbbbb;
}
</style>
&_value {
padding-right: 10rpx;
flex: 1;
display: flex;
align-items: center;
justify-content: flex-end;
>span:nth-child(1) {
display: inline-block;
margin-right: 15rpx;
}
.text {
color: #000;
display: inline-block;
max-width: 400rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
input {
text-align: right;
}
.select_group {
display: flex;
}
&_select {
display: flex;
margin-right: 110rpx;
}
}
.flex_start {
padding: 0 10rpx;
margin-top: 40rpx;
justify-content: flex-start;
}
}
>view:not(:last-child) {
border-bottom: 1px solid #eeeeee;
}
}
.inputPlaceHolder {
color: #bbbbbb;
}
</style>

View File

@ -1,306 +1,312 @@
<template>
<view class="area_container">
<view class="area_container_title">
<navigator :url="`/pages/product/storeClassification/index?mer_id=${mer_id}`" hover-class="none"
class="manage_btn">管理</navigator>
<view class="area_container_title_name">选择店铺分类</view>
<view class="area_container_title_close" @click="close"><text class="iconfont">&#xe62f;</text></view>
</view>
<view class="area_container_content">
<view class="selectList_con">
<view class="selectList_con_item" v-for="(item, index) in selectList" :key="index">
<text>{{ item.cate_name }}</text>
<text class="iconfont" @click="delSelectItem(item, index)">&#xe62f;</text>
</view>
</view>
<view class="selectList_tap">
<view class="selectList_tap_item" v-for="(item, index) in tapList" :key="index"
@click="selectTapItem(item, index)" :class="{ selectTap: selectTap == item.value }">
{{ item.cate_name }}
</view>
<view class="selectList_tap_item" @click="selectTapLastItem(-1)" v-if="isShowLastItem"
:class="{ selectTap: selectTap == -1 }">请选择</view>
</view>
<view class="selectList_area">
<scroll-view scroll-y="true" class="scroll">
<view v-for="(item, index) in areaList" :key="index" class="selectList_area_item">
<view class="selectList_area_item_name" @click="selectArea(item)">{{ item.cate_name }}</view>
<view @click="handlyAddSelect(item)" v-if="!item.children"><text class="iconfont">&#xe70e;</text></view>
</view>
</scroll-view>
</view>
<view class="handle">
<view class="handle_button" @click="handleGetSelectArea">确定</view>
</view>
</view>
</view>
<view class="area_container">
<view class="area_container_title">
<navigator :url="`/pages/product/storeClassification/index?mer_id=${mer_id}`" hover-class="none"
class="manage_btn">新增分类</navigator>
<view class="area_container_title_name">选择店铺分类</view>
<view class="area_container_title_close" @click="close"><text class="iconfont">&#xe62f;</text></view>
</view>
<view class="area_container_content">
<view class="selectList_con">
<view class="selectList_con_item" v-for="(item, index) in selectList" :key="index">
<text>{{ item.cate_name }}</text>
<text class="iconfont" @click="delSelectItem(item, index)">&#xe62f;</text>
</view>
</view>
<view class="selectList_tap">
<view class="selectList_tap_item" v-for="(item, index) in tapList" :key="index"
@click="selectTapItem(item, index)" :class="{ selectTap: selectTap == item.value }">
{{ item.cate_name }}
</view>
<view class="selectList_tap_item" @click="selectTapLastItem(-1)" v-if="isShowLastItem"
:class="{ selectTap: selectTap == -1 }">请选择</view>
</view>
<view class="selectList_area">
<scroll-view scroll-y="true" class="scroll">
<view v-for="(item, index) in areaList" :key="index" class="selectList_area_item">
<view class="selectList_area_item_name" @click="selectArea(item)">{{ item.cate_name }}</view>
<view @click="handlyAddSelect(item)" v-if="!item.children"><text
class="iconfont">&#xe70e;</text></view>
</view>
</scroll-view>
</view>
<view class="handle">
<view class="handle_button" @click="handleGetSelectArea">确定</view>
</view>
</view>
</view>
</template>
<script>
import { serialize, Toast } from '@/libs/uniApi.js';
export default {
props: {
allReadySelect: {
type: Array,
default: () => {
return []
}
},
classifiedData: {
type: Array,
default: () => {
return []
}
},
mer_id: {
type: Number || String,
default: 0
}
},
data() {
return {
selectList: [],
selectTap: -1,
selectTapIndex: -1, //
tapList: [],
isShowLastItem: true, //
areaList: []
};
},
watch: {
classifiedData: {
handler(val) {
this.areaList = this.classifiedData
},
deep: true
}
},
created() {
this.areaList = serialize(this.classifiedData);
},
methods: {
import {
serialize,
Toast
} from '@/libs/uniApi.js';
export default {
props: {
allReadySelect: {
type: Array,
default: () => {
return []
}
},
classifiedData: {
type: Array,
default: () => {
return []
}
},
mer_id: {
type: Number || String,
default: 0
}
},
data() {
return {
selectList: [],
selectTap: -1,
selectTapIndex: -1, //
tapList: [],
isShowLastItem: true, //
areaList: []
};
},
watch: {
classifiedData: {
handler(val) {
this.areaList = this.classifiedData
},
deep: true
}
},
created() {
this.areaList = serialize(this.classifiedData);
},
methods: {
//
async selectArea(item) {
//
async selectArea(item) {
//
if (!(item.children && item.children.length)) {
// Toast('');
return;
if (this.isShowLastItem) {
this.tapList.push(item);
} else {
this.tapList.splice(this.tapList.length - 1, 1, item);
}
this.isShowLastItem = false;
return;
}
// console.log(item);
// titletitleitem
if (this.selectTapIndex > -1) {
this.tapList.splice(this.selectTapIndex, 999);
this.areaList = item.children;
this.tapList.push(item);
this.isShowLastItem = true;
this.selectTap = -1;
this.selectTapIndex = -1;
return;
}
//
if (!(item.children && item.children.length)) {
// Toast('');
return;
if (this.isShowLastItem) {
this.tapList.push(item);
} else {
this.tapList.splice(this.tapList.length - 1, 1, item);
}
this.isShowLastItem = false;
return;
}
// titletitleitem
if (this.selectTapIndex > -1) {
this.tapList.splice(this.selectTapIndex, 999);
this.areaList = item.children;
this.tapList.push(item);
this.isShowLastItem = true;
this.selectTap = -1;
this.selectTapIndex = -1;
return;
}
//
if (item.children && item.children.length) {
this.areaList = item.children;
this.tapList.push(item);
this.isShowLastItem = true;
this.selectTap = -1;
return;
}
//
if (item.children && item.children.length) {
this.areaList = item.children;
this.tapList.push(item);
this.isShowLastItem = true;
this.selectTap = -1;
return;
}
},
// tap
async selectTapItem(item, index) {
if (index == 0) {
this.areaList = serialize(this.classifiedData);
this.selectTap = item.value; //
this.selectTapIndex = index; //
return;
}
this.selectTap = item.value;
this.areaList = item.children;
},
//
selectTapLastItem(val) {
this.selectTap = -1;
if (!this.tapList.length) {
// this.areaList = val.children;
this.areaList = serialize(this.classifiedData);
return;
}
},
// tap
async selectTapItem(item, index) {
if (index == 0) {
this.areaList = serialize(this.classifiedData);
this.selectTap = item.value; //
this.selectTapIndex = index; //
return;
}
this.selectTap = item.value;
this.areaList = item.children;
},
//
selectTapLastItem(val) {
this.selectTap = -1;
if (!this.tapList.length) {
// this.areaList = val.children;
this.areaList = serialize(this.classifiedData);
return;
}
this.areaList = this.tapList[this.tapList.length - 1].children;
},
this.areaList = this.tapList[this.tapList.length - 1].children;
},
//
handlyAddSelect(item) {
if (this.selectList.some(val => val.value == item.value)) {
Toast('已经选择过了')
return
}
//
handlyAddSelect(item) {
if (this.selectList.some(val => val.value == item.value)) {
Toast('已经选择过了')
return
}
if (this.selectTapIndex > -1) {
this.tapList.splice(this.selectTapIndex, 999);
}
if (!item.parent_id) {
this.selectList.push(item);
return;
}
let str = '';
str =
serialize(this.tapList)
.map(val => val.name)
.join('/') +
'/' +
item.name;
this.selectList.push({ ...item, name: str });
},
//
delSelectItem(item, index) {
this.selectList.splice(index, 1);
},
if (this.selectTapIndex > -1) {
this.tapList.splice(this.selectTapIndex, 999);
}
if (!item.parent_id) {
this.selectList.push(item);
return;
}
let str = '';
str =
serialize(this.tapList)
.map(val => val.name)
.join('/') +
'/' +
item.name;
this.selectList.push({
...item,
name: str
});
},
//
delSelectItem(item, index) {
this.selectList.splice(index, 1);
},
//
handleGetSelectArea() {
this.$emit('handleGetSelectArea', this.selectList);
},
close() {
this.$emit('close');
},
//
handleGetSelectArea() {
this.$emit('handleGetSelectArea', this.selectList);
},
close() {
this.$emit('close');
},
//
unique(arr) {
var obj = {};
return arr.filter(ele => {
if (!obj[ele]) {
obj[ele] = true;
return true;
}
});
}
}
};
//
unique(arr) {
var obj = {};
return arr.filter(ele => {
if (!obj[ele]) {
obj[ele] = true;
return true;
}
});
}
}
};
</script>
<style lang="scss" scoped>
.area_container {
background: #fff;
border-radius: 16px 16px 0px 0px;
.area_container {
background: #fff;
border-radius: 16px 16px 0px 0px;
&_title {
text-align: center;
padding: 36rpx 30rpx 46rpx 0;
position: relative;
&_title {
text-align: center;
padding: 36rpx 30rpx 46rpx 0;
position: relative;
&_close {
position: absolute;
top: 20rpx;
right: 20rpx;
}
&_close {
position: absolute;
top: 20rpx;
right: 20rpx;
}
.manage_btn {
font-weight: normal;
color: #e93323;
font-size: 24rpx;
position: absolute;
left: 30rpx;
top: 40rpx;
}
}
.manage_btn {
font-weight: normal;
color: #e93323;
font-size: 24rpx;
position: absolute;
left: 30rpx;
top: 40rpx;
}
}
&_content {
padding: 0 30rpx;
&_content {
padding: 0 30rpx;
.selectList_con {
display: flex;
flex-wrap: wrap;
margin-bottom: 50rpx;
.selectList_con {
display: flex;
flex-wrap: wrap;
margin-bottom: 50rpx;
&_item {
padding: 3rpx 10rpx;
background: #fff6f5;
color: #e93323;
margin-right: 20rpx;
margin-bottom: 20rpx;
display: flex;
align-items: center;
font-size: 22rpx;
&_item {
padding: 3rpx 10rpx;
background: #fff6f5;
color: #e93323;
margin-right: 20rpx;
margin-bottom: 20rpx;
display: flex;
align-items: center;
font-size: 22rpx;
>span:nth-child(1) {
display: inline-block;
margin-right: 14rpx;
white-space: nowrap;
}
>span:nth-child(1) {
display: inline-block;
margin-right: 14rpx;
white-space: nowrap;
}
.iconfont {
font-size: 24rpx;
}
}
}
.iconfont {
font-size: 24rpx;
}
}
}
.selectList_tap {
border-bottom: 1px solid #eeeeee;
display: flex;
.selectList_tap {
border-bottom: 1px solid #eeeeee;
display: flex;
&_item {
font-size: 28rpx;
margin-right: 60rpx;
white-space: nowrap;
}
&_item {
font-size: 28rpx;
margin-right: 60rpx;
white-space: nowrap;
}
.selectTap {
color: #e93323;
border-bottom: 3rpx solid #e93323;
padding-bottom: 21rpx;
}
}
.selectTap {
color: #e93323;
border-bottom: 3rpx solid #e93323;
padding-bottom: 21rpx;
}
}
.selectList_area {
.scroll {
height: 597rpx;
}
.selectList_area {
.scroll {
height: 597rpx;
}
.selectList_area_item {
padding: 40rpx 0;
display: flex;
justify-content: space-between;
font-size: 28rpx;
.selectList_area_item {
padding: 40rpx 0;
display: flex;
justify-content: space-between;
font-size: 28rpx;
.iconfont {
color: #e93323;
font-size: 40rpx;
}
.iconfont {
color: #e93323;
font-size: 40rpx;
}
.selectList_area_item_name {
flex: 0.7;
}
}
}
.selectList_area_item_name {
flex: 0.7;
}
}
}
.handle {
height: 126rpx;
.handle {
height: 126rpx;
&_button {
width: 690rpx;
height: 86rpx;
background: #e93323;
border-radius: 43rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #fff;
}
}
}
}
&_button {
width: 690rpx;
height: 86rpx;
background: #e93323;
border-radius: 43rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #fff;
}
}
}
}
</style>

View File

@ -47,7 +47,7 @@
<view class="shop_list_item_shop_con_price">
<block v-if="mer_info.type_code=='TypeSupplyChain'">
<block v-if="item.attrValue[0]">
<text class='price font-color'>{{item.attrValue[0].procure_price}}</text>
<text class='price font-color'>{{item.attrValue[0].wholesale_price}}</text>
<text class='ot_price'>零售价{{item.attrValue[0].price}}</text>
</block>
<text v-else class='ot_price'>商品规格错误</text>

View File

@ -122,7 +122,7 @@
<view class='money-wrap'>
<block v-if="mer_info.type_code=='TypeSupplyChain'">
<block v-if="item.attrValue[0]">
<text class='price font-color'>{{item.attrValue[0].procure_price}}</text>
<text class='price font-color'>{{item.attrValue[0].wholesale_price}}</text>
<text class='ot_price'>零售价{{item.attrValue[0].price}}</text>
</block>
<text v-else class='ot_price'>商品规格错误</text>
@ -519,56 +519,16 @@
},
//线
Fline(item) {
this.checkboxList1 = item.attrValue
// console.log(this.checkboxList1.length)
if (this.checkboxList1.length>0){
navigateTo(1, '/pages/product/updateStock/updateStock', {
product_id: item.product_id
})
uni.$once('updateStock', (e)=>{
this.productList.forEach(p=>{
if(e.product_id==p.product_id){
p.stock = e.stock;
}
})
})
} else if (this.checkboxList1.length > 0) {
uni.showLoading({
title: '加载中'
})
getPreviewProDetail({
id: item.product_id
}).then(res=>{
uni.hideLoading();
let att = res.data.attr.map(e=>{
return {
value: e.attr_name,
detail: e.attr_values
}
})
this.data.attr = att;
this.data.product_id = this.checkboxList1[0].product_id
this.data.unique = this.checkboxList1[0].unique
this.data.number = this.checkboxList1[0].stock
this.data.spec_type = item.spec_type
this.data.item = item
this.on_line = 1
this.show = true;
}).catch((e)=>{
uni.hideLoading();
uni.showToast({
title: e.msg||e.message||e
})
this.show = false;
})
} else {
this.show = false
navigateTo(1, '/pages/users/online_warehousing/index', {
mer_id: this.mer_id,
product_id: this.data.product_id,
unique: this.data.unique,
});
}
navigateTo(1, '/pages/product/updateStock/updateStock', {
product_id: item.product_id
})
uni.$once('updateStock', (e)=>{
this.productList.forEach(p=>{
if(e.product_id==p.product_id){
p.stock = e.stock;
}
})
})
},
//
creat() {

View File

@ -0,0 +1,243 @@
<!-- 类型变更 -->
<template>
<view class="shop_type">
<view class="shop_type-head">
<view style="height: var(--status-bar-height);"></view>
<view class="shop-type-navbar">
<u-icon name="arrow-left" size="18" color="#fff" @click="handleBack" />
<text class="shop-type-navbar-title">类型变更</text>
<text></text>
</view>
</view>
<view class="apply-record" @click="handleToRecord">
<text>申请记录</text>
<u-icon name="arrow-right" size="12" color="#fff" style="margin-top: 4rpx;" />
</view>
<view class="shop-type-con">
<view class="shop-type-con-title">点击选择变更的商户类型</view>
<view class="pifa" @click="handleChoose(1)">
<view class="pifa-title">
<view class="main-title">升级为批发商户</view>
<view class="sub-title">备注:批发商户仅能销售批发价产品产品仅展示在批发-供销云市场批发类目</view>
</view>
<image v-if="selected == '' || selected == 2"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/d8a38202404011735139115.webp" mode="">
</image>
<image v-if="selected == 1"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/145e2202404011734207958.webp" mode=""></image>
</view>
<view class="pifalingshou" @click="handleChoose(2)">
<view class="pifa-title">
<view class="main-title">升级为批发/零售商户</view>
<view class="sub-title">备注:批发/零售商户可以进行批发与零售交易产品可在供销云市场全面展示</view>
</view>
<image v-if="selected == '' || selected == 1"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/a9447202404011734582066.webp" mode="">
</image>
<image v-if="selected == 2"
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/19c0b202404011735289980.webp" mode=""></image>
</view>
</view>
<view class="btn" @click="handleJump">
<text>提交申请</text>
</view>
</view>
</template>
<script>
import {
shopTypeChange
} from "@/api/product.js";
export default {
data() {
return {
selected: '',
mer_id: ''
}
},
onLoad(opt) {
if (opt.mer_id) this.mer_id = opt.mer_id;
},
methods: {
handleToRecord() {
uni.navigateTo({
url: "/pages/product/shop_type_change/list?mer_id=" + this.mer_id,
fail(err) {
console.log(err);
}
})
},
handleChoose(e) {
this.selected = e;
},
handleJump() {
if (!this.selected) return this.$util.Tips({
title: "请选择一种类型"
})
if (!this.mer_id) return this.$util.Tips({
title: "申请商户不能为空!"
})
shopTypeChange({
type: this.selected == 1 ? 3 : 4,
mer_id: this.mer_id
}).then(res => {
if (res.status == 200) {
this.$util.Tips({
title: res.message
}, () => {
uni.navigateTo({
url: "/pages/product/shop_type_change/list",
fail(err) {
console.log(err);
},
success(res) {
}
})
})
} else {
return this.$util.Tips({
title: res.message
})
}
}).catch((err) => {
this.$util.Tips({
title: err
})
})
},
handleBack() {
uni.navigateBack()
}
}
}
</script>
<style lang="scss">
page {
background-color: #F8F9FA;
}
.shop_type {
.shop_type-head {
background-color: #40AE36;
margin-bottom: 70rpx;
.shop-type-navbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
height: 88rpx;
.shop-type-navbar-title {
font-size: 32rpx;
color: #FFFFFF;
}
}
}
.apply-record {
position: absolute;
top: calc(128rpx + var(--status-bar-height));
right: 0;
display: flex;
justify-content: center;
align-items: center;
width: 154rpx;
height: 50rpx;
background: #A1A1A1;
border-radius: 40rpx 0rpx 0rpx 40rpx;
text {
font-weight: 400;
font-size: 26rpx;
color: #FFFFFF;
}
}
.shop-type-con {
.shop-type-con-title {
margin-bottom: 74rpx;
font-weight: 400;
font-size: 36rpx;
color: #333333;
text-align: center;
}
.pifa {
display: flex;
justify-content: center;
margin-bottom: 30rpx;
position: relative;
image {
width: 690rpx;
height: 200rpx;
}
}
.pifalingshou {
position: relative;
display: flex;
justify-content: center;
image {
width: 690rpx;
height: 200rpx;
}
}
.pifa-title {
position: absolute;
z-index: 10;
padding-top: 36rpx;
margin-left: 202rpx;
width: 464rpx;
.main-title {
margin-bottom: 14rpx;
font-weight: 600;
font-size: 30rpx;
color: #333333;
}
.sub-title {
width: 440rpx;
font-size: 24rpx;
color: #555555;
line-height: 45rpx;
}
}
}
.btn {
margin: 136rpx 30rpx 0;
height: 88rpx;
line-height: 88rpx;
background: #40AE36;
text-align: center;
border-radius: 88rpx 88rpx 88rpx 88rpx;
text {
font-weight: bold;
font-size: 30rpx;
color: #FFFFFF;
}
&:active {
opacity: .8;
}
}
}
</style>

View File

@ -0,0 +1,180 @@
<template>
<view class="shopTypeList">
<view class="shop_type-head">
<view style="height: var(--status-bar-height);"></view>
<view class="shop-type-navbar">
<u-icon name="arrow-left" size="18" color="#fff" @click="handleBack" />
<text class="shop-type-navbar-title">申请记录</text>
<text></text>
</view>
</view>
<view class="shop-type-list" v-if="list && list.length > 0">
<block v-for="(item,indx) in list" :key="indx">
<view class="shop-type-list-item">
<view class="shop-type-list-item-title" @click='hanldeTo(item)'>
<view class="shop-type-list-item-title-status"
:style="{'color':item.status==0?'#666':item.status==1?'#40AE36':'#F55726'}">
{{item.status == 0?'审核中':item.status==1?'审核通过':'审核未通过'}}
</view>
<view class="shop-type-list-item-title-detail">
查看详情
<u-icon name="arrow-right" size="13" color="#666"></u-icon>
</view>
</view>
<view class="shop-type-list-item-con">
<view class="shop-type-list-item-con-item">
<view class="shop-type-list-item-con-key">变更商户</view>
<view class="shop-type-list-item-con-val">{{item.mer_name}}</view>
</view>
<view class="shop-type-list-item-con-item">
<view class="shop-type-list-item-con-key">变更类型</view>
<view class="shop-type-list-item-con-val">{{item.type_name}}</view>
</view>
<view class="shop-type-list-item-con-item">
<view class="shop-type-list-item-con-key">申请时间</view>
<view class="shop-type-list-item-con-val">{{item.create_time}}</view>
</view>
<view class="shop-type-list-item-con-item">
<view class="shop-type-list-item-con-key">审核人</view>
<view class="shop-type-list-item-con-val">{{item.check_name || '-'}}</view>
</view>
<view class="shop-type-list-item-con-item" v-if="item.status == 1 || item.status == 2">
<view class="shop-type-list-item-con-key">审核时间</view>
<view class="shop-type-list-item-con-val">{{item.update_time || '-'}}</view>
</view>
<view class="shop-type-list-item-con-item" v-if="item.status == 2">
<view class="shop-type-list-item-con-key">备注</view>
<view class="shop-type-list-item-con-val" style="word-break: break-all;">
{{item.fail_msg || ''}}
</view>
</view>
</view>
</view>
</block>
</view>
<u-empty v-else text="暂无申请记录~" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</u-empty>
</view>
</template>
<script>
import {
intentionList
} from "@/api/product.js";
export default {
data() {
return {
list: []
}
},
onLoad(opt) {
this.getData();
},
methods: {
hanldeTo(item) {
uni.navigateTo({
url: "/pages/product/shop_type_change/progress?form=" + encodeURIComponent(JSON.stringify(
item)),
success(res) {}
})
},
getData(mer_id) {
uni.showLoading({
title: '加载中...'
})
intentionList({
uid: this.$store.state.app.userInfo.uid
}).then(res => {
uni.hideLoading()
this.list = res.data;
})
},
handleBack() {
uni.navigateBack()
}
}
}
</script>
<style lang="scss">
page {
background-color: #F8F9FA;
}
.shopTypeList {
.shop_type-head {
background-color: #40AE36;
margin-bottom: 40rpx;
.shop-type-navbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
height: 88rpx;
.shop-type-navbar-title {
font-size: 32rpx;
color: #FFFFFF;
}
}
}
.shop-type-list {
height: calc(100vh - 130rpx - var(--status-bar-height));
overflow: auto;
.shop-type-list-item {
margin: 0 30rpx 30rpx;
padding: 0rpx 30rpx 30rpx 30rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 6rpx 2rpx rgba(0, 0, 0, 0.16);
border-radius: 20rpx;
.shop-type-list-item-title {
display: flex;
justify-content: space-between;
align-items: center;
height: 90rpx;
padding: 0 10rpx;
border-bottom: 2rpx solid #F8F9FA;
margin-bottom: 20rpx;
.shop-type-list-item-title-status {
font-size: 28rpx;
color: #666666;
}
.shop-type-list-item-title-detail {
display: flex;
align-items: center;
font-size: 28rpx;
color: #666666;
}
}
.shop-type-list-item-con {
.shop-type-list-item-con-item {
display: flex;
margin-bottom: 20rpx;
.shop-type-list-item-con-key {
min-width: 130rpx;
font-size: 26rpx;
color: #666666;
text-align: left;
}
.shop-type-list-item-con-val {
font-size: 26rpx;
color: #333333;
}
}
}
}
}
}
</style>

View File

@ -0,0 +1,308 @@
<!-- 变更进度 -->
<template>
<view class="shop_type">
<view class="shop_type-head">
<view style="height: var(--status-bar-height);"></view>
<view class="shop-type-navbar">
<u-icon name="arrow-left" size="18" color="#fff" @click="handleBack" />
<text class="shop-type-navbar-title">变更进度</text>
<text></text>
</view>
</view>
<view class="shop-type-con">
<!-- 审批信息 -->
<view class="shop-type-con-item">
<view class="shop-type-con-item-info">
<view class="shop-type-con-item-info-label">变更商户</view>
<view class="shop-type-con-item-info-val">{{form.mer_name}}</view>
</view>
<view class="shop-type-con-item-info">
<view class="shop-type-con-item-info-label">变更类型</view>
<view class="shop-type-con-item-info-val">{{form.type_name}}</view>
</view>
<view class="shop-type-con-item-info">
<view class="shop-type-con-item-info-label">申请时间</view>
<view class="shop-type-con-item-info-val">{{form.create_time}}</view>
</view>
<view class="shop-type-con-item-info">
<view class="shop-type-con-item-info-label">变更进度</view>
<view class="shop-type-con-item-info-val">{{form.status == 0?'审核中':form.status==1?'审核通过':'审核未通过'}}
</view>
</view>
<view class="shop-type-con-item-img">
<u-image width="116rpx" height="116rpx" src="" shape="circle" :src="form.mer_avatar" />
</view>
</view>
<!-- 审核 -->
<view class="shop-type-audit">
<view class="shop-type-audit-people">审核人</view>
<view class="shop-type-audit-card">
<view class="shop-type-audit-card-info">
<view class="shop-type-audit-card-info-label audit">审核人</view>
<view class="shop-type-audit-card-info-val">{{form.check_name || '-'}}</view>
</view>
<view class="shop-type-audit-card-info">
<view class="shop-type-audit-card-info-label">联系电话</view>
<view class="shop-type-audit-card-info-val">{{form.check_phone || '-'}}</view>
</view>
<view class="shop-type-audit-card-img">
<u-image width="116rpx" height="116rpx" src="" shape="circle" :src="form.check_avatar" />
</view>
</view>
</view>
<!-- 进度详情 -->
<view class="shop-type-con-progress">
<view class="shop-type-con-detail">进度详情</view>
<view class="shop-type-con-progress-card">
<view class="shop-type-con-progress-left">
<view class="shop-type-con-progress-left-item">
<u-icon name="checkmark-circle-fill" size="20" color="#40AE36"></u-icon>
</view>
<view class="dot"></view>
<view class="dot"></view>
<view class="dot"></view>
<view class="dot"></view>
<view class="dot"></view>
<view class="dot"></view>
<view class="shop-type-con-progress-left-item">
<u-icon name="checkmark-circle-fill" size="18" color="#999" v-if="form.status == 0" />
<u-icon name="checkmark-circle-fill" size="18" color="#40AE36" v-if="form.status == 1" />
<u-icon name="close-circle-fill" size="18" color="#F55726" v-if="form.status == 2" />
</view>
</view>
<view class="shop-type-con-progress-right">
<view
style="display:flex;margin-bottom: 46rpx;justify-content: space-between;align-items: center;">
<view class="shop-type-con-progress-right-name">申请已提交</view>
<view class="shop-type-con-progress-right-time">{{form.create_time}}</view>
</view>
<view
style="display: flex;justify-content: space-between;align-items: center;margin-bottom:10rpx;">
<view class="shop-type-con-progress-right-name">
{{form.status == 0?'待审核人员审核':form.status==1?'审核通过':'审核未通过'}}
</view>
<view class="shop-type-con-progress-right-time" v-if="form.status == 1 || form.status == 2">
{{form.update_time}}
</view>
</view>
<view class="audit-info" v-if="form.status != 0">
<view style="margin-bottom: 10rpx;">审批人{{form.check_name}}</view>
<view class="audit-info-txt" v-if="form.status == 2">审核不通过{{form.fail_msg}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
selected: '',
form: {}
}
},
onLoad(opt) {
this.form = JSON.parse(decodeURIComponent(opt.form));
},
methods: {
handleChoose(e) {
this.selected = e;
},
handleBack() {
uni.navigateBack()
}
}
}
</script>
<style lang="scss">
page {
background-color: #F8F9FA;
}
.shop_type {
.shop_type-head {
background-color: #40AE36;
margin-bottom: 40rpx;
.shop-type-navbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
height: 88rpx;
.shop-type-navbar-title {
font-size: 32rpx;
color: #FFFFFF;
}
}
}
.shop-type-con {
.shop-type-con-item {
position: relative;
margin: 0 30rpx 40rpx;
height: 310rpx;
padding: 30rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 6rpx 2rpx rgba(0, 0, 0, 0.16);
border-radius: 20rpx 20rpx 20rpx 20rpx;
box-sizing: border-box;
.shop-type-con-item-info {
display: flex;
margin-bottom: 30rpx;
&:nth-last-child(1) {
margin-bottom: 0;
}
.shop-type-con-item-info-label {
margin-right: 50rpx;
font-weight: 400;
font-size: 28rpx;
color: #666666;
}
.shop-type-con-item-info-val {
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
}
.shop-type-con-item-img {
position: absolute;
top: 30rpx;
right: 30rpx;
}
}
.shop-type-audit {
margin: 0 30rpx 40rpx;
.shop-type-audit-people {
margin-bottom: 20rpx;
margin-left: 20rpx;
font-weight: 600;
font-size: 30rpx;
color: #333333;
}
.shop-type-audit-card {
position: relative;
height: 170rpx;
padding: 30rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 6rpx 2rpx rgba(0, 0, 0, 0.16);
border-radius: 20rpx;
.shop-type-audit-card-info {
display: flex;
.shop-type-audit-card-info-label {
width: 112rpx;
margin-right: 50rpx;
font-size: 28rpx;
color: #333333;
}
.audit {
margin-bottom: 30rpx;
}
.shop-type-audit-card-info-val {
font-size: 28rpx;
color: #333333;
}
}
.shop-type-audit-card-img {
position: absolute;
top: 26rpx;
right: 30rpx;
}
}
}
.shop-type-con-progress {
margin: 0 30rpx;
.shop-type-con-detail {
margin-bottom: 20rpx;
margin-left: 20rpx;
font-weight: 600;
font-size: 30rpx;
color: #333333;
}
.shop-type-con-progress-card {
display: flex;
width: 100%;
padding: 30rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 6rpx 2rpx rgba(0, 0, 0, 0.16);
border-radius: 20rpx 20rpx 20rpx 20rpx;
.shop-type-con-progress-left {
width: 12%;
display: flex;
flex-direction: column;
align-items: center;
.dot {
width: 4rpx;
height: 4rpx;
border-radius: 50%;
background-color: #ccc;
margin-bottom: 4rpx;
}
.shop-type-con-progress-left-item {
width: 36rpx;
height: 36rpx;
border-radius: 50%;
}
}
.shop-type-con-progress-right {
flex: 1;
margin-bottom: 40rpx;
&:nth-last-child(1) {
margin-bottom: 0;
}
.shop-type-con-progress-right-name {
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
.shop-type-con-progress-right-time {
font-size: 26rpx;
color: #666666;
}
}
.audit-info {
font-size: 22rpx;
color: #666666;
}
}
}
}
}
</style>

View File

@ -27,7 +27,7 @@
</view>
<view v-if="item.resale_type!=1" class="txt-b-b"
style="font-size: 28rpx;font-family: SF Pro Display-Regular, SF Pro Display;font-weight: 400;color: #999999;">
结算:{{item.discount_price}}
批发:{{item.discount_price}}
</view>
</view>

File diff suppressed because it is too large Load Diff

View File

@ -186,8 +186,15 @@
:order_id="currentTab"></cash>
<!-- 提现提示 -->
<u-modal :show="tipShow" title="提示" content='工作日当日10点前提现当日12点到账, 当日16点前提现当日18点到账, 当日18点后提现次日12点到账, 周末节假日提现, 下一工作日18点前到账'
<u-modal :show="tipShow" title="提示"
content='工作日当日10点前提现当日12点到账, 当日16点前提现当日18点到账, 当日18点后提现次日12点到账, 周末节假日提现, 下一工作日18点前到账'
@confirm="tipShow = false"></u-modal>
<!-- 支付密码 键盘 -->
<popups ref="popups" :isPay="true" @confirm="handleConfirm" @clear="handleClear" @change="handleChange" />
<!-- 密码错误事件处理 -->
<payPwd ref="payPwd" @left="handleLeft" @right="handleRight"></payPwd>
</view>
</template>
@ -198,7 +205,6 @@
getLisApplyAPI,
getAccountApplyAPI,
postAccountApplyAPI,
} from '@/api/user.js'
import {
extractCash,
@ -217,10 +223,18 @@
import {
Toast
} from '../../../libs/uniApi';
import {
verifyPwd
} from '@/api/order.js';
import payPwd from "@/components/payPwd/index.vue";
import popups from "@/components/popups/index.vue";
export default {
components: {
cash,
authorize
authorize,
payPwd,
popups
},
data() {
return {
@ -278,7 +292,8 @@
pay_close: false,
pay_type: [],
source: '',
merId: ''
merId: '',
modes: {}
};
},
computed: {
@ -420,9 +435,11 @@
that.$set(that, 'pics', that.pics);
},
subCash: async function(e) {
let that = this,
value = e.detail.value;
value.source = this.source
value.source = this.source;
if (that.load) return;
if (that.currentTab == 0) { //
// if (value.real_name.length == 0) return this.$util.Tips({
@ -487,18 +504,34 @@
financial_bank_branch: this.mode.bank_address,
financial_type: 1
}
console.log(mode);
postCreateApplyAPI(this.merId, mode).then(res => {
this.modes = mode;
//
const result = await this.$util.checkPassword();
if (result.data.code == 101) { //
return this.$util.Tips({
title: "您暂未设置支付密码,请前往设置!"
}, () => {
uni.navigateTo({
url: "/pages/users/user_modify_pwd/index?type=payPwd",
success: () => {
that.load = false;
}
});
})
}
this.$refs.popups.handleOpen();
},
trueWithdraw() {
postCreateApplyAPI(this.merId, this.modes).then(res => {
//
// that.postCreate(e.detail.value.extract_price)
Toast(res.message)
setTimeout(() => {
uni.navigateBack({
delta: 1
})
}, 1000)
console.log(res);
}).catch(err => {
Toast(err)
setTimeout(() => {
@ -509,6 +542,47 @@
})
},
//
async handleConfirm(e) {
const result = await this.$util.checkPassword(e);
//
if (result.data.code == 100) {
this.$set(this.modes, 'withdrawal_pwd', e);
uni.showLoading({
title: '订单支付中',
mask: true
});
this.trueWithdraw();
} else {
this.$refs.payPwd.handleOpen(result.data.code);
}
},
// 101 102
handleLeft(code) {
uni.navigateTo({
url: "/pages/users/user_modify_pwd/index?type=payPwd"
});
this.$refs.payPwd.handleClose();
},
//
handleRight(code) {
if (code == 101) { //
this.$refs.payPwd.handleClose(code);
} else {
this.$refs.payPwd.handleClose();
this.$refs.popups.handleOpen();
}
},
handleClear() {},
handleChange(val) {
if (!val)
this.load = false;
},
async postCreate(price) {
const data = {
extract_money: price,

View File

@ -2,9 +2,9 @@
<div :style="viewColor">
<div class="register absolute" v-if="!auth_token">
<div class="login">
<div class="shading" >
<div class="shading">
<div class="pictrue acea-row row-center-wrapper" style="background-color: transparent !important;">
<image src="@/static/images/logo1.png" />
<image src="@/static/images/logo1.png" />
</div>
</div>
<div class="whiteBg" v-if="formItem === 1">
@ -47,13 +47,13 @@
v-model="account" />
</div>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<input type="number" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
v-model="captcha" maxlength="4" />
<input type="number" placeholder="填写验证码" placeholder-class="placeholder"
class="codeIput" v-model="captcha" maxlength="4" />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''"
@click="handleVerify">
{{ text }}
@ -63,8 +63,8 @@
<div class="item" v-if="isShowCode">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<input type="number" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
v-model="codeVal" maxlength="4" />
<input type="number" placeholder="填写验证码" placeholder-class="placeholder"
class="codeIput" v-model="codeVal" maxlength="4" />
<div class="code" @click="getcaptcha">
<image class="code-img" style="width: 100%;height: 100%;" :src="codeUrl" />
</div>
@ -82,7 +82,7 @@
class="font_pro">隐私政策</text></text>
</checkbox-group>
</div>
</div>
<div class="whiteBg" v-else>
<div class="title">注册账号</div>
@ -97,9 +97,9 @@
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<input type="number" placeholder="填写验证码" maxLength='4' placeholder-class="placeholder" class="codeIput"
v-model="captcha" />
<input type="number" placeholder="填写验证码" maxLength='4' placeholder-class="placeholder"
class="codeIput" v-model="captcha" />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''"
@click="handleVerify">
{{ text }}
@ -113,12 +113,12 @@
v-model="password" />
</div>
</div>
<div class="item" v-if="isShowCode">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<input type="number" placeholder="填写验证码" maxlength="4" placeholder-class="placeholder" class="codeIput"
v-model="codeVal" />
<input type="number" placeholder="填写验证码" maxlength="4" placeholder-class="placeholder"
class="codeIput" v-model="codeVal" />
<div class="code" @click="getcaptcha">
<image class="code-img" style="width: 100%;height: 100%;" :src="codeUrl" />
</div>
@ -160,18 +160,18 @@
<input type='number' placeholder='填写手机号码' placeholder-class='placeholder'
v-model="account"></input>
</view>
<view class="item acea-row row-between-wrapper">
<input type='number' placeholder='填写验证码' maxlength="4" placeholder-class='placeholder' class="codeIput"
v-model="captcha"></input>
<input type='number' placeholder='填写验证码' maxlength="4" placeholder-class='placeholder'
class="codeIput" v-model="captcha"></input>
<button class="code" :class="disabled === true ? 'on' : ''" :disabled='disabled'
@click="handleVerify">
{{ text }}
</button>
</view>
<view class="item">
<input type='password' placeholder='填写登录密码' placeholder-class='placeholder'
<input type='password' placeholder='填写登录密码' placeholder-class='placeholder'
v-model="password"></input>
</view>
<view class="protocol acea-row row-between-wrapper">
@ -254,9 +254,6 @@
} from "vuex";
import Verify from '@/components/verify/verify.vue';
const BACK_URL = "login_back_url";
// #ifdef APP-PLUS
var jpushModule = uni.requireNativePlugin("JG-JPush");
// #endif
export default {
name: "Login",
mixins: [sendVerifyCode],
@ -266,7 +263,7 @@
},
data: function() {
return {
navList: ["快速登录","账号登录"],
navList: ["快速登录", "账号登录"],
current: 0,
account: "",
password: "",
@ -338,47 +335,46 @@
let that = this;
loginMpPhone({
iv: e.detail.iv,
encryptedData: e.detail.encryptedData,
code: that.codeVal,
auth_token: uni.getStorageSync('auth_token'),
}).then(({
data
}) => {
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL);
that.$store.commit("LOGIN", {
'token': data.token,
'time': data.exp
});
that.$store.commit("SETUID", data.user.uid);
that.$store.commit('UPDATE_USERINFO', data.user);
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate',
'/pages/user/index', '/pages/plant_grass/index'
]
if (indexPat.includes(this.getPath(backUrl))) {
method = 'switchTab'
} else {
method = 'navigateTo'
}
if (this.getPath(backUrl) === '/pages/users/login/index') {
uni.switchTab({
url: '/pages/index/index'
});
return
}
uni[method]({
url: backUrl
});
})
.catch(res => {
that.$util.Tips({
title: res
});
iv: e.detail.iv,
encryptedData: e.detail.encryptedData,
code: that.codeVal,
auth_token: uni.getStorageSync('auth_token'),
}).then(({
data
}) => {
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL);
that.$store.commit("LOGIN", {
'token': data.token,
'time': data.exp
});
that.$store.commit("SETUID", data.user.uid);
that.$store.commit('UPDATE_USERINFO', data.user);
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate',
'/pages/user/index', '/pages/plant_grass/index'
]
if (indexPat.includes(this.getPath(backUrl))) {
method = 'switchTab'
} else {
method = 'navigateTo'
}
if (this.getPath(backUrl) === '/pages/users/login/index') {
uni.switchTab({
url: '/pages/index/index'
});
return
}
uni[method]({
url: backUrl
});
}).catch(res => {
that.$util.Tips({
title: res
});
});
},
// #endif
goCopyUrl() {
@ -439,12 +435,12 @@
});
},
fail(error) {
that.$utils.error("苹果登录/uni.login", JSON.stringify(error))
uni.showToast({
title: '获取用户信息失败',
icon: 'none',
duration: 2000
})
// console.log(error)
}
})
},
@ -496,6 +492,7 @@
that.auth_token = res.data.result.key;
}
}).catch(res => {
that.$utils.error("微信登录/auth", JSON.stringify(res))
uni.hideLoading();
uni.showToast({
title: res.message || res,
@ -523,6 +520,7 @@
self.wxLoginApi()
},
fail(error) {
self.$utils.error("微信登录/uni.login", JSON.stringify(error))
uni.showToast({
title: '登录失败',
icon: 'none',
@ -586,6 +584,7 @@
uni.hideLoading();
}).catch(res => {
uni.hideLoading();
that.$utils.error("微信登录/auth", JSON.stringify(res))
uni.showToast({
title: res.message || res,
icon: 'none',
@ -895,20 +894,6 @@
}
})
}
// #ifdef APP-PLUS
jpushModule.initJPushService()
jpushModule.getRegistrationID(result => {
if (result.registerID) {
bindJG({
phone: this.account,
jg_register_id: result.registerID
})
}
})
// #endif
}
}
};

View File

@ -8,10 +8,10 @@
<text class='phone'>{{addressInfo.phone}}</text>
</view>
<view>
<text class='default t-color'
v-if="addressInfo.is_default">[默认]</text>{{addressInfo.province}}{{addressInfo.city}}{{addressInfo.district}}{{addressInfo.street || ''}}
<text v-if='addressInfo.brigade'>{{typeof(addressInfo.brigade)=='string'?addressInfo.brigade:addressInfo.brigade.name }}{{addressInfo.detail}}</text>
<text
v-if='addressInfo.brigade'>{{typeof(addressInfo.brigade)=='string'?addressInfo.brigade:addressInfo.brigade.name }}{{addressInfo.detail}}</text>
</view>
</view>
<navigator v-else :url="'/pages/users/user_address/index?cartId='+cartId" hover-class="none"
@ -121,7 +121,7 @@
<view class="boxs">
<view class='item acea-row row-between-wrapper'>
<view>配送方式</view>
<view
v-if="item.delivery_way.length == 2 && (item.order.allow_delivery && item.order.allow_take)"
class='discount' @tap="openShowBox(item,index)">
@ -429,7 +429,7 @@
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
let app = getApp();
import {
@ -1028,10 +1028,10 @@
takes: that.take,
use_coupon: that.subCoupon,
use_integral: that.use_integral,
// source: 0
// source: 0
}).then(res => {
//
that.product_type=res.data.order_type
that.product_type = res.data.order_type
that.is_take = false
res.data.order.forEach(el => {
if (el.order.isTake == 1) that.is_take = true
@ -1084,9 +1084,10 @@
that.order_key = res.data.key
that.cartArr[4].title =
`结算周期:${res.data.order[0].settle_cycle}天 日利率:${res.data.order[0].interest_rate}%`
// console.log(res.data);
if (res.data.order[0].credit_buy == 1 && (this.type_id == 12||this.type_id == 10||this.type_id == 17) && (res.data.order_type==99||res.data.order_type==98)) {
// console.log(res.data);
if (res.data.order[0].credit_buy == 1 && (this.type_id == 12 || this.type_id == 10 || this
.type_id == 17) && (res.data.order_type == 99 || res.data.order_type == 98)) {
this.cartArr[4].payStatus = 1
} else {
this.cartArr[4].payStatus = 0
@ -1104,7 +1105,7 @@
})
uni.hideLoading();
}).catch(err => {
console.log('err', err);
console.log('err', err);
return this.$util.Tips({
title: err
}, {
@ -1121,7 +1122,7 @@
if (that.addressId) {
getAddressDetail(that.addressId).then(res => {
res.data.is_default = parseInt(res.data.is_default);
that.addressInfo = res.data || {};
that.addressId = res.data.address_id || 0;
that.address.addressId = res.data.address_id || 0;
@ -1129,12 +1130,12 @@
real_name: res.data.real_name,
phone: res.data.phone
}
this.$nextTick(() => {
this.getConfirm(that.addressId);
})
})
} else {
getAddressList().then(res => {
that.addressInfo = res.data.list.length > 0 ? res.data.list[0] : {};
@ -1155,7 +1156,7 @@
let that = this;
let active = e;
that.active = active;
// console.log(this.active);
// console.log(this.active);
that.animated = true;
that.payType = that.cartArr[active].value;
if (that.payType == 'weixin') {
@ -1191,14 +1192,14 @@
that.address.address = true;
// that.pagesUrl = '/pages/users/user_address/index?cartId=' + this.cartId + '&pinkId=' + this
// .pinkId + '&couponId=' + this.couponId;
that.pagesUrl = '/pages/users/user_address_list/index'
that.pagesUrl = '/pages/users/user_address_list/index'
} else {
// uni.navigateTo({
// url: `/pages/users/user_address/index?cartId=${this.cartId}`,
// });
uni.navigateTo({
url: `pages/users/user_address_list/index`,
});
uni.navigateTo({
url: `pages/users/user_address_list/index`,
});
}
},
/**
@ -1308,7 +1309,7 @@
});
},
fail: (e) => {
console.log(e,'111111111')
console.log(e, '111111111')
//
let url = '/pages/order_pay_status/index?order_id=' + orderId +
'&msg=取消支付' + '&product_type=' + that.product_type;
@ -1320,7 +1321,7 @@
});
},
complete: (res) => {
uni.hideLoading();
uni.hideLoading();
//
// let url = '/pages/order_pay_status/index?order_id=' + orderId +
// '&msg=' + '&product_type=' + that.product_type;
@ -1634,6 +1635,10 @@
// return
// }
// balance
uni.showLoading({
title: '订单支付中',
mask: true
@ -2124,7 +2129,7 @@
bottom: 0;
left: 0;
z-index: 30;
.footer_count {
font-size: 28rpx;
@ -2161,7 +2166,7 @@
border-radius: 50rpx;
text-align: center;
line-height: 70rpx;
flex-shrink: 0;
flex-shrink: 0;
&.disabled {
background-color: #cccccc;

View File

@ -134,7 +134,7 @@
<view>x{{goods.product_num}}</view>
</view>
<view v-else class='money'>
<view>{{goods.cart_info.productAttr.procure_price}}</view>
<view>{{goods.cart_info.productAttr.wholesale_price}}</view>
<view>x{{goods.product_num}}</view>
</view>
</view>
@ -239,7 +239,7 @@
<view>x{{goods.product_num}}</view>
</view>
<view class='money' v-else>
<view>{{goods.cart_info.productAttr.procure_price}}</view>
<view>{{goods.cart_info.productAttr.wholesale_price}}</view>
<view>x{{goods.product_num}}</view>
</view>
<view v-if="item.pay_type==8"

File diff suppressed because it is too large Load Diff

View File

@ -7,29 +7,44 @@
<view class="item">
<text class="phone">{{userInfo.phone}}</text>
</view>
<view class="item acea-row row-between-wrapper codeVal">
<input type='number' placeholder='验证码' placeholder-class='placeholder' class="codeIput" v-model="captcha"></input>
<button class="code" :class="disabled === true ? 'on' : ''" :disabled='disabled' @click="handleVerify">
<input type='number' maxlength="4" placeholder='验证码' placeholder-class='placeholder'
class="codeIput" v-model="captcha"></input>
<button class="code" :class="disabled === true ? 'on' : ''" :disabled='disabled'
@click="handleVerify">
{{ text }}
</button>
</view>
<view class="border"></view>
<view class="item">
<input type='password' placeholder='新密码' placeholder-class='placeholder' v-model="password" autocomplete="off"></input>
</view>
<view class="item">
<input type='password' placeholder='确认新密码' placeholder-class='placeholder' v-model="repassword" autocomplete="off"></input>
</view>
<block v-if="type == 'payPwd'">
<view class="item" @click="showPopup(1)">
<input style="pointer-events: none;" type='password' placeholder="请设置支付密码"
placeholder-class='placeholder' v-model="password" autocomplete="off"></input>
</view>
<view class="item" @click="showPopup(2)">
<input style="pointer-events: none;" type='password' placeholder="请再次设置支付密码"
placeholder-class='placeholder' v-model="repassword" autocomplete="off"></input>
</view>
</block>
<block v-else>
<view class="item">
<input type='password' placeholder="请设置密码" placeholder-class='placeholder'
v-model="password" autocomplete="off"></input>
</view>
<view class="item">
<input type='password' placeholder="请再次设置密码" placeholder-class='placeholder'
v-model="repassword" autocomplete="off"></input>
</view>
</block>
</view>
</view>
<button form-type="submit" @click="confirmSubmit" class="confirmBnt">确认</button>
</view>
</form>
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }" ref="verify"></Verify>
<Verify @success="success" :captchaType="'blockPuzzle'" :imgSize="{ width: '330px', height: '155px' }"
ref="verify"></Verify>
<popups ref="popups" isPay title="请设置支付密码" @confirm="handleConfirm" @clear="handleClear" @change="handleChange">
</popups>
</view>
</template>
@ -37,70 +52,75 @@
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import sendVerifyCode from "@/mixins/SendVerifyCode";
import { modifyPassword, verifyCode, appletsDecrypt } from '@/api/api.js';
import { getUserInfo } from '@/api/user.js';
import { registerVerify } from '@/api/user.js'
import {
modifyPassword,
verifyCode,
appletsDecrypt,
setPayPwd
} from '@/api/api.js';
import {
getUserInfo
} from '@/api/user.js';
import {
registerVerify
} from '@/api/user.js'
import {
mapGetters
} from "vuex";
import authorize from '@/components/Authorize';
import Verify from '@/components/verify/verify.vue';
import {
toLogin
} from '@/libs/login.js';
import Verify from '@/components/verify/verify.vue';
import popups from "@/components/popups/index.vue";
export default {
mixins: [sendVerifyCode],
components: {
authorize,
Verify
Verify,
popups
},
data() {
return {
userInfo: {},
phone:'',
phone: '',
repassword: '',
password: '',
captcha:'',
isAuto: false, //
isShowAuth: false, //
captcha: '',
key: '',
codeVal: '',
disabled: false,
type: '',
set_type: '',
};
},
computed: mapGetters(['isLogin', 'viewColor']),
onLoad() {
onLoad(opt) {
let that = this
this.type = opt.type;
if (this.isLogin) {
this.getUserInfo()
} else {
this.isAuto = true;
this.isShowAuth = true
toLogin()
}
// #ifdef MP
wx.login({
success (res) {
if (res.code) {
that.codeVal = res.code
} else {
// console.log('' + res.errMsg)
}
}
success(res) {
if (res.code) {
that.codeVal = res.code
} else {
console.log('登录失败!' + res.errMsg)
}
}
})
// #endif
},
methods: {
onLoadFun:function(){
this.isShowAuth = false;
},
//
authColse: function(e) {
this.isShowAuth = e
},
/**
* 获取个人用户信息
*/
@ -110,6 +130,19 @@
that.userInfo = res.data
});
},
showPopup(type) {
this.set_type = type;
this.$refs.popups.handleOpen();
},
//
handleConfirm(e) {
if (this.set_type == 1) this.password = e;
else this.repassword = e;
},
handleClear() {},
handleChange() {},
confirmSubmit: function() {
let that = this;
if (!that.password) return that.$util.Tips({
@ -124,23 +157,44 @@
if (!that.captcha) return that.$util.Tips({
title: '请填写验证码'
});
modifyPassword({
password: that.password,
repassword: that.repassword,
sms_code: that.captcha
}).then(res => {
return that.$util.Tips({
title: '修改成功!',
icon: 'success'
}, {
tab: 5,
url: '/pages/users/user_info/index'
});
}).catch(err => {
return that.$util.Tips({
title: err
});
})
if (this.type == 'payPwd') { //
setPayPwd({
password: that.password,
repassword: that.repassword,
sms_code: that.captcha,
}).then(res => {
that.$util.Tips({
title: '修改成功!',
icon: 'success'
}, () => {
uni.navigateBack();
});
}).catch(err => {
that.$util.Tips({
title: err,
icon: 'none'
})
})
} else { //
modifyPassword({
password: that.password,
repassword: that.repassword,
sms_code: that.captcha
}).then(res => {
return that.$util.Tips({
title: '修改成功!',
icon: 'success'
}, {
tab: 5,
url: '/pages/users/user_info/index'
});
}).catch(err => {
return that.$util.Tips({
title: err
});
})
}
},
/**
* 发送验证码
@ -153,10 +207,10 @@
// });
this.disabled = true
await registerVerify({
phone:that.userInfo.phone,
code:that.captcha,
type: 'change_pwd',
captchaType: 'blockPuzzle',
phone: that.userInfo.phone,
code: that.captcha,
type: this.type == 'payPwd' ? 'pay_pwd' : 'change_pwd',
captchaType: 'blockPuzzle',
captchaVerification: data.captchaVerification
}).then(res => {
this.disabled = false
@ -171,7 +225,7 @@
});
});
},
success(data) {
success(data) {
this.$refs.verify.hide();
this.code(data);
},
@ -183,10 +237,11 @@
</script>
<style lang="scss" scoped>
.ChangePassword{
.ChangePassword {
background: #fff;
padding-top: 53rpx;
}
.ChangePassword .phone {
font-size: 32rpx;
}
@ -205,7 +260,8 @@
font-size: 32rpx;
}
/deep/.uni-input-input{
/deep/.uni-input-input {
// box-shadow: inset 0 0 0 0 #fff;
}
@ -222,7 +278,8 @@
position: relative;
padding-left: 26rpx;
color: var(--view-theme);
&::before{
&::before {
content: "";
width: 1rpx;
height: 30rpx;
@ -233,14 +290,17 @@
display: inline-block;
}
}
.ChangePassword .list .item .code.on {
color: #b9b9bc !important;
}
.ChangePassword .list .border{
.ChangePassword .list .border {
width: 100%;
height: 21rpx;
background: #F5F5F5;
}
.confirmBnt {
font-size: 32rpx;
width: 580rpx;
@ -252,7 +312,8 @@
line-height: 90rpx;
background-color: var(--view-theme);
}
.getPhoneBtn{
.getPhoneBtn {
font-size: 32rpx;
width: 580rpx;
height: 90rpx;
@ -262,9 +323,10 @@
margin: 40rpx auto 0 auto;
text-align: center;
line-height: 90rpx;
.iconfont{
.iconfont {
font-size: 32rpx;
margin-right: 12rpx;
}
}
</style>
</style>

681
pages/withdrawal/add.vue Normal file
View File

@ -0,0 +1,681 @@
<!-- 银行卡添加 -->
<template>
<view class="shop_type">
<view class="shop_type-head">
<view style="height: var(--status-bar-height);"></view>
<view class="shop-type-navbar">
<u-icon name="arrow-left" size="18" color="#fff" @click="handleBack" />
<text class="shop-type-navbar-title">{{bindForm.id?'修改账户':'添加账户'}}</text>
<text></text>
</view>
</view>
<!-- 表单部分 -->
<view class="withdrawal-con">
<view class="withdrawal">
<view class="withdrawal-left">
<text class="withdrawal-left-to">提现至</text>
<text
class="withdrawal-left-empty">{{bindForm.is_own === 0 ? '法人账户' : bindForm.is_own === 1 ? '对公账户':'请选择账户类型'}}</text>
</view>
<view class="withdrawal-right" @click="handleShow">
<text class="withdrawal-right-add">{{bindForm.is_own === ''?'选择':'更换'}}账户</text>
<u-icon name="arrow-right" size="14" color="#40AE36"></u-icon>
</view>
</view>
<!-- 提现信息 法人账户-->
<view class="withdrawal-info" v-if="bindForm.is_own === 0">
<view class="withdrawal-form">
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">开户银行</view>
<view class="withdrawal-form-item-val" @click="changeBank">
<image :src="bindForm.icon" v-if="bindForm.icon"></image>
<text> {{bindForm.bank?bindForm.bank:'点击选择开户银行'}}</text>
</view>
<!-- <view class="withdrawal-change" v-if="!bindForm.bank" >
<text class="withdrawal-right-add">{{bindForm.bank?'更换':'选择'}}银行</text>
<u-icon name="arrow-right" size="14" color="#40AE36"></u-icon>
</view> -->
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">持卡人</view>
<view class="withdrawal-form-item-val">
<input v-model="bindForm.name" type="text" placeholder="请输入持卡人姓名" :disabled="true"
placeholder-class="placeholderClass">
</view>
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">身份证</view>
<view class="withdrawal-form-item-val">
<input v-model="bindForm.id_card" type="text" placeholder="请输入持卡人身份证号"
placeholder-class="placeholderClass">
</view>
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">银行帐号</view>
<view class="withdrawal-form-item-val">
<input v-model="bindForm.bank_code" type="number" placeholder="请输入银行账号"
placeholder-class="placeholderClass">
</view>
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">开户网点</view>
<view class="withdrawal-form-item-val">
<input v-model="bindForm.bank_branch" type="text" placeholder="请输入开户网点"
placeholder-class="placeholderClass">
</view>
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">手机号码</view>
<view class="withdrawal-form-item-val">
<input v-model="bindForm.phone" type="number" placeholder="请输入手机号码"
placeholder-class="placeholderClass">
</view>
</view>
</view>
<!-- 相关凭证 -->
<view class="withdrawal-envidence" v-if="isCompany == 1">
<view class="withdrawal-envidence">
<text class="withdrawal-envidence-main">请上传相关凭证</text>
<text class="withdrawal-envidence-sub">(图片格式支持JPGPNGJPEG)</text>
</view>
<view class="withdrawal-envience-img">
<view class="image-wrap" v-for="(item,indx) in bindForm.temp" :key="indx">
<view class="icon" @click="delImg(indx)">
<u-icon name="close-circle-fill" size="24" color="#909399" />
</view>
<image :src="item"></image>
</view>
<view class="image-wrap placeholder-img" @click="handleUpload">
<u-icon name="camera" size="40"></u-icon>
<text>上传凭证</text>
</view>
</view>
</view>
<view style="color: #FE2121;font-size:24rpx;margin-top: 20rpx;line-height: 30rpx;">
锁定规则错误输入超 3 次后锁定<br>
恢复规则12 时后或次日 0 时恢复<br>
温馨提示锁定期间勿重复提交绑定否则锁定时间延长
</view>
</view>
<!-- 提现信息 对公账户-->
<view class="withdrawal-info" v-if="bindForm.is_own === 1">
<view class="withdrawal-form">
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">开户银行</view>
<view class="withdrawal-form-item-val" @click="changeBank">
<image :src="bindForm.icon" v-if="bindForm.icon"></image>
<text> {{bindForm.bank?bindForm.bank:'点击选择开户银行'}}</text>
</view>
<!-- <view class="withdrawal-change" v-if="!bindForm.bank" >
<text class="withdrawal-right-add">{{bindForm.bank?'更换':'选择'}}银行</text>
<u-icon name="arrow-right" size="14" color="#40AE36"></u-icon>
</view> -->
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">账户名称</view>
<view class="withdrawal-form-item-val">
<input v-model="bindForm.name" type="text" placeholder="请输入账户名称" :disabled="true"
placeholder-class="placeholderClass">
</view>
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">银行账号</view>
<view class="withdrawal-form-item-val">
<input v-model="bindForm.bank_code" type="number" placeholder="请输入银行账号"
placeholder-class="placeholderClass">
</view>
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">开户网点</view>
<view class="withdrawal-form-item-val">
<input v-model="bindForm.bank_branch" type="text" placeholder="请输入开户网点"
placeholder-class="placeholderClass">
</view>
</view>
</view>
<view style="color: #FE2121;font-size:24rpx;margin-top: 20rpx;line-height: 30rpx;">
锁定规则错误输入超 3 次后锁定<br>
恢复规则12 时后或次日 0 时恢复<br>
温馨提示锁定期间勿重复提交绑定否则锁定时间延长
</view>
</view>
</view>
<!-- 提现btn -->
<view class="withdrawal-btn tapActive" v-if="bindForm.is_own !== ''" @click="handleBind">
<view class="withdrawal-btn-wrap">
<text>{{bindForm.id?'重新':''}}提交绑定</text>
</view>
</view>
<!-- 提现账户 -->
<u-action-sheet title="请选择提现账户" :show="show" round="15" @close="show = false">
<view class="actions" style="padding-bottom: 0;">
<view class="actions-wrap">
<block v-for="(item ,indx) in list" :key="indx">
<view class="actions-item" @click="handleSelected(item)">
<text :class="{'textactive':bindForm.bank == item.name}">{{item.name}}</text>
</view>
</block>
</view>
</view>
<!-- 底部安全范围 -->
<u-safe-bottom></u-safe-bottom>
</u-action-sheet>
<!-- 银行 -->
<u-action-sheet title="请选择银行" :show="bankShow" round="15" @close="bankShow = false">
<view class="actions">
<view class="actions-wrap">
<block v-for="(item ,indx) in bankList" :key="indx">
<view class="actions-item" @click="handleSelectedBank(item)">
<image :src="item.img"></image>
<text :class="{'textactive':bindForm.bank == item.name}">{{item.name}}</text>
</view>
</block>
</view>
<view class="actions-btn" @click="bankShow = false">
<text>确认</text>
</view>
</view>
</u-action-sheet>
</view>
</template>
<script>
import {
extractBank,
addBank,
searchBank,
getById,
getUserInfo,
} from "@/api/user.js";
export default {
data() {
return {
list: [],
show: false,
bankList: [], //
bankShow: false,
bindForm: {
name: '', //
bank: '', //
bank_code: '', //
bank_branch: '', //
financial_img: '', //
id_card: '', //
phone: '', //
is_own: '', //(01)
temp: [],
id: 0,
icon: ''
},
mer_id: '',
isCompany: ''
}
},
onLoad(opt) {
if (opt.id) {
this.bindForm.id = opt.id;
this.getBankById();
}
if (opt.mer_id) {
this.mer_id = opt.mer_id;
if (opt.hasOwnProperty('isOwn') && (opt.isOwn === 0 || opt.isOwn == '0')) {
this.list = [{
name: '对公账户'
}];
this.bindForm.is_own = 1;
//
this.bindForm.name = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.company_name;
} else if (opt.hasOwnProperty('isOwn') && opt.isOwn == 1) {
this.list = [{
name: '法人账户'
}];
this.bindForm.is_own = 0;
//
this.bindForm.name = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.real_name;
} else {
this.bindForm.is_own = 1;
//
this.bindForm.name = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.company_name;
this.list = [{
name: '对公账户'
}, {
name: '法人账户'
}]
}
// , is_company =0
const isCompany = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.is_company;
this.isCompany = isCompany;
if (isCompany != 1) {
this.bindForm.is_own = 0;
this.bindForm.name = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.real_name;
this.list = [{
name: '法人账户'
}];
}
}
},
methods: {
//
getBankById() {
getById(this.bindForm.id).then(res => {
if (res.data && res.data.financial_account) {
Object.assign(this.bindForm, res.data.financial_account);
this.bindForm.id = res.data.id;
this.mer_id = this.bindForm.mer_id;
if (this.bindForm.is_own === 0 && this.bindForm.financial_img) {
this.$set(this.bindForm, 'temp', this.bindForm.financial_img.split(","));
}
}
})
},
//
handleSelected(e) {
this.show = false;
this.bindForm.bank = '';
this.bindForm.icon = '';
if (e.name == '法人账户') {
this.bindForm.is_own = 0;
this.bindForm.name = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.real_name;
}
if (e.name == '对公账户') {
//
this.bindForm.is_own = 1;
this.bindForm.name = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.company_name;
}
},
//
handleUpload() {
this.$util.uploadImageOne('upload/image', res => {
this.bindForm.temp.push(res.data.path);
});
},
//
delImg(index) {
this.bindForm.temp.splice(index, 1);
},
handleShow() {
this.show = true;
},
//
handleSelectedBank(e) {
this.bindForm.bank = e.name;
this.bindForm.icon = e.img;
},
//
changeBank() {
if (this.bankList.length > 0) {
this.bankShow = true;
} else {
extractBank().then(res => {
this.bankList = res.data;
this.bankShow = true;
})
}
},
//
handleBind() {
if (!this.bindForm.name) return this.$util.Tips({
title: this.bindForm.is_own === 0 ? '请输入法人姓名!' : '请输入账户名称!'
});
if (!this.bindForm.bank) return this.$util.Tips({
title: '请选择开户银行!'
});
if (!this.bindForm.bank_code) return this.$util.Tips({
title: this.bindForm.is_own === 0 ? '请输入银行帐号!' : '请输入银行账号!'
});
if (!this.bindForm.bank_branch) return this.$util.Tips({
title: '请输入开户网点!'
});
//
if (this.bindForm.is_own === 0) {
const isCompany = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.is_company;
if (!this.bindForm.temp.length > 0 && isCompany == 1) return this.$util.Tips({
title: '请上传凭证!'
});
this.bindForm.financial_img = this.bindForm.temp.join(",");
if (!uni.$u.test.idCard(this.bindForm.id_card)) return this.$util.Tips({
title: '请输入正确的身份证号!'
});
if (!uni.$u.test.mobile(this.bindForm.phone)) return this.$util.Tips({
title: '请输入正确的手机号!'
});
}
addBank(this.mer_id, this.bindForm).then(res => {
this.$util.Tips({
title: '提交成功,请等待后台审核!'
}, () => {
uni.redirectTo({
url: "/pages/withdrawal/progress?mer_id=" + this.mer_id
})
});
}).catch(err => {
uni.showToast({
title: err,
duration: 3000,
icon: "none"
})
})
},
//
handleBack() {
uni.navigateBack()
}
}
}
</script>
<style lang="scss">
page {
background-color: #F8F9FA;
}
.shop_type {
padding-bottom: 184rpx;
.shop_type-head {
background-color: #40AE36;
margin-bottom: 30rpx;
.shop-type-navbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
height: 88rpx;
.shop-type-navbar-title {
font-size: 32rpx;
color: #FFFFFF;
}
}
}
}
.withdrawal-con {
height: calc(100vh - 88rpx - 184rpx - var(--status-bar-height) - 30rpx);
overflow: auto;
padding-bottom: 30rpx;
.withdrawal {
display: flex;
align-items: center;
justify-content: space-between;
background-color: #fff;
height: 102rpx;
border-radius: 20rpx;
margin: 0 30rpx 26rpx;
padding: 0 26rpx 0 30rpx;
.withdrawal-left {
display: flex;
.withdrawal-left-to {
margin-right: 42rpx;
font-size: 30rpx;
color: #333333;
}
.withdrawal-left-empty {
font-weight: bold;
font-size: 28rpx;
color: #333333;
}
}
.withdrawal-right {
display: flex;
align-items: center;
.withdrawal-right-add {
font-size: 28rpx;
color: #40AE36;
}
}
}
.withdrawal-info {
margin: 0 30rpx;
.withdrawal-form {
padding: 0 30rpx;
margin-bottom: 30rpx;
background-color: #fff;
border-radius: 20rpx;
.withdrawal-form-item {
position: relative;
display: flex;
align-items: center;
height: 102rpx;
border-bottom: 2rpx solid #FBFCFC;
.withdrawal-form-item-label {
width: 120rpx;
margin-right: 42rpx;
font-size: 30rpx;
color: #333333;
text-align: left;
}
.withdrawal-form-item-val {
display: flex;
align-items: center;
color: #333;
font-size: 30rpx;
image {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
}
/deep/.uni-input-placeholder,
.placeholderClass {
font-size: 30rpx;
color: #999;
}
input {
font-size: 30rpx;
width: 460rpx;
}
text {
color: #40AE36;
}
}
.withdrawal-change {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
display: flex;
color: #40AE36;
align-items: center;
}
}
}
.withdrawal-envidence {
border-radius: 20rpx;
.withdrawal-envidence {
margin-bottom: 30rpx;
.withdrawal-envidence-main {
font-size: 30rpx;
color: #333333;
}
.withdrawal-envidence-sub {
font-size: 22rpx;
color: #666666;
}
}
.withdrawal-envience-img {
display: flex;
flex-wrap: wrap;
background-color: #fff;
padding: 24rpx 20rpx 16rpx;
border-radius: 20rpx;
.image-wrap {
position: relative;
width: 152rpx;
height: 152rpx;
background: #ccc;
margin: 0 12rpx 8rpx 0;
border-radius: 8rpx;
&:nth-child(4n) {
margin-right: 0;
}
.icon {
position: absolute;
right: -24rpx;
top: -24rpx;
z-index: 10;
}
image {
width: 152rpx;
height: 152rpx;
}
}
.placeholder-img {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
border: 2rpx dashed #9E9E9E;
border-radius: 8rpx;
background-color: #F5F5F5;
text {
font-size: 22rpx;
color: #666666;
}
}
}
}
}
}
.withdrawal-btn {
position: fixed;
bottom: 0;
left: 0;
height: 184rpx;
width: 100%;
padding-top: 32rpx;
box-sizing: border-box;
background-color: #f7f8f9;
z-index: 10;
.withdrawal-btn-wrap {
height: 88rpx;
background: linear-gradient(359deg, #72BE53 0%, #46B03A 100%);
border-radius: 88rpx;
margin: 0 30rpx;
line-height: 88rpx;
text-align: center;
text {
font-weight: bold;
font-size: 30rpx;
color: #F5F5F5;
}
}
}
.actions {
padding-bottom: 30rpx;
.actions-btn {
width: 650rpx;
height: 88rpx;
line-height: 88rpx;
background: linear-gradient(359deg, #72BE53 0%, #46B03A 100%);
border-radius: 88rpx;
margin: 0 auto;
text-align: center;
text {
font-weight: 600;
font-size: 30rpx;
color: #FFFFFF;
}
}
.actions-wrap {
max-height: 50vh;
overflow: auto;
margin-bottom: 30rpx;
.actions-item {
display: flex;
align-items: center;
justify-content: center;
height: 104rpx;
border-bottom: 2rpx solid #eeefef;
image {
width: 40rpx;
height: 40rpx;
margin-right: 12rpx;
}
text {
font-size: 32rpx;
color: #333;
}
}
.textactive {
font-weight: 600;
color: #40AE36 !important;
}
}
}
</style>

566
pages/withdrawal/index.vue Normal file
View File

@ -0,0 +1,566 @@
<!-- 提现管理 -->
<template>
<view class="shop_type">
<view class="shop_type-head">
<view style="height: var(--status-bar-height);"></view>
<view class="shop-type-navbar">
<u-icon name="arrow-left" size="18" color="#fff" @click="handleBack" />
<text class="shop-type-navbar-title">提现</text>
<text></text>
</view>
</view>
<view class="withdrawal-con">
<view class="withdrawal">
<view class="withdrawal-left">
<text class="withdrawal-left-to">提现至</text>
<text
class="withdrawal-left-empty">{{!bankInfo?'请绑定账户': bankInfo.is_own === 0 ? '法人账户' : '对公账户'}}</text>
</view>
<view class="withdrawal-right" @click.stop="handleToAdd" v-if="isShowAdd()">
<text class="withdrawal-right-add">添加账户</text>
<u-icon name="arrow-right" size="14" color="#40AE36"></u-icon>
</view>
<view class="withdrawal-right"
v-if="!isShowAdd() && userInfo.mer_info.is_company == 1 && bankList.length == 2"
@click="handleAddAccount">
<text class="withdrawal-right-add">切换账户</text>
<u-icon name="arrow-right" size="14" color="#40AE36"></u-icon>
</view>
</view>
<!-- 提现信息 法人账户-->
<view class="withdrawal-info" v-if="bankInfo && bankInfo.is_own === 0">
<view class="withdrawal-form">
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">银行卡</view>
<view class="withdrawal-form-item-val">{{bankInfo.financial_account.bank}}</view>
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">持卡人</view>
<view class="withdrawal-form-item-val">{{bankInfo.financial_account.name}}</view>
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">银行账号</view>
<view class="withdrawal-form-item-val">{{bankInfo.financial_account.bank_code}}</view>
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">开户网点</view>
<view class="withdrawal-form-item-val">{{bankInfo.financial_account.bank_branch}}</view>
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">提现金额</view>
<view class="withdrawal-form-item-val">
<input type="number" v-model="payForm.extract_money" placeholder="请输入提现金额"
placeholder-class="placeholderClass">
</view>
</view>
</view>
<!-- 协议 -->
<view class="withdrawal-pro">
<text class="withdrawal-pro-progress" @click="viewProgress">账户开通审核进度</text>
<text class="withdrawal-pro-txt" @click="handlePreview">企业授权法人提现书</text>
</view>
<!-- 提示 -->
<view class="tips">
<view>当前可提现金额:{{extract_money || '0.00'}},暂存金额: {{lock_money || '0.00'}}</view>
<view>当前商户押金:{{ot_margin || '0.00'}}</view>
<view>说明:用户下单后该订单金额存放在暂存金额中用户确认收货后次日18:00才可提现该笔订单金额
提货付款订单在完成后次日18:00才可提现</view>
</view>
</view>
<!-- 提现信息 对公账户-->
<view class="withdrawal-info" v-if="bankInfo && bankInfo.is_own === 1">
<view class="withdrawal-form">
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">对公账户</view>
<view class="withdrawal-form-item-val">{{bankInfo.financial_account.name}}</view>
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">银行账号</view>
<view class="withdrawal-form-item-val">{{bankInfo.financial_account.bank_code}}</view>
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">开户银行</view>
<view class="withdrawal-form-item-val">{{bankInfo.financial_account.bank}}</view>
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">开户网点</view>
<view class="withdrawal-form-item-val">{{bankInfo.financial_account.bank_branch}}</view>
</view>
<view class="withdrawal-form-item">
<view class="withdrawal-form-item-label">提现金额</view>
<view class="withdrawal-form-item-val">
<input type="number" v-model="payForm.extract_money" placeholder="请输入提现金额"
placeholder-class="placeholderClass">
</view>
</view>
</view>
<!-- 协议 -->
<view class="withdrawal-pro">
<text class="withdrawal-pro-progress" @click="viewProgress">账户开通审核进度</text>
</view>
<!-- 提示 -->
<view class="tips">
<view>当前可提现金额:{{extract_money || '0.00'}},暂存金额: {{lock_money || '0.00'}}</view>
<view>当前商户押金:{{ot_margin || '0.00'}}</view>
<view>说明:用户下单后该订单金额存放在暂存金额中用户确认收货后次日18:00才可提现该笔订单金额
提货付款订单在完成后次日18:00才可提现</view>
</view>
</view>
<!-- 暂未添加银行卡 -->
<u-empty v-if="!bankInfo || (bankInfo.is_own !== 1 && bankInfo.is_own !== 0)" text='您尚未绑定提现账户,\n点击右上角"添加账户"'
mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</u-empty>
</view>
<!-- 提现btn -->
<view class="withdrawal-btn tapActive" @click="handleSubmit">
<view class="withdrawal-btn-wrap" v-if="bankList.length != 0">
<text>点击提现</text>
</view>
<view class="withdrawal-btn-wrap" v-if="bankList.length == 0 && progressCount > 0">
<text>点击查看提现进度</text>
</view>
</view>
<!-- 明细按钮 -->
<view class="saomaCode" @click="navigator(`/pages/users/gather_list/index?mer_id=${mer_id}`)"
v-if="bankList.length != 0">明细</view>
<!-- 提现提示 -->
<u-modal :show="tipShow" title="提示"
content='工作日当日10点前提现当日12点到账, 当日16点前提现当日18点到账, 当日18点后提现次日12点到账, 周末节假日提现, 下一工作日18点前到账'
@confirm="tipShow = false"></u-modal>
<!-- 支付密码 键盘 -->
<popups ref="popups" :isPay="true" @confirm="handleConfirm" @clear="handleClear" @change="handleChange" />
<!-- 密码错误事件处理 -->
<payPwd ref="payPwd" @left="handleLeft" @right="handleRight"></payPwd>
</view>
</template>
<script>
import {
postCreateApplyAPI,
getAdminApplyAPI,
progressBankList
} from '@/api/user.js'
import {
searchBank
} from "@/api/user.js";
import payPwd from "@/components/payPwd/index.vue";
import popups from "@/components/popups/index.vue";
export default {
components: {
popups,
payPwd
},
data() {
return {
tipShow: false,
bankList: [],
bankInfo: undefined,
type: 0, // 0 1
payForm: {
extract_money: "",
financial_bank_bank: "",
financial_bank_branch: "",
financial_bank_code: "",
financial_bank_name: "",
financial_type: 1,
withdrawal_pwd: "",
},
mer_id: '',
ot_margin: '', //
extract_money: '', //
lock_money: '', //
userInfo: {},
progressCount: 0
}
},
onLoad(opt) {
this.mer_id = opt.mer_id;
this.getBankInfo();
//
this.userInfo = JSON.parse(this.$Cache.get("USER_INFO"));
},
onShow() {
this.getBankProgress();
},
methods: {
//
isShowAdd() {
if (this.bankList.length == 0) return true;
if (this.bankList.length == 1 && this.userInfo.mer_info.is_company == 1) return true;
return false;
},
//
handlePreview() {
let that = this;
if (this.bankInfo && this.bankInfo.financial_account.financial_img) {
uni.previewImage({
urls: that.bankInfo.financial_account.financial_img.split(','),
current: 0
})
}
},
//
getBankProgress() {
progressBankList(this.mer_id).then(res => {
this.progressCount = res.data.count;
})
},
//
handleToAdd() {
// , is_company =0
const isCompany = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.is_company;
if (isCompany != 1 && this.bankInfo && this.bankInfo.is_own === 0) return;
let strUrl = "?mer_id=" + this.mer_id;
if (this.bankInfo) strUrl += "&isOwn=" + this.bankInfo.is_own
uni.navigateTo({
url: "/pages/withdrawal/add" + strUrl
})
},
//
getBankInfo() {
uni.showLoading({
title: "加载中...",
})
searchBank(this.mer_id).then(res => {
uni.hideLoading();
this.bankList = res.data.bank;
this.bankInfo = this.bankList[this.type];
this.ot_margin = res.data.ot_margin; //
this.extract_money = res.data.extract_money //
this.lock_money = res.data.lock_money //
}).catch(err => {
uni.hideLoading();
})
},
//
handleAddAccount() {
if (this.bankList.length == 0) return this.$util.Tips({
title: "请先添加一个账户!"
});
if (this.type === 0)
this.type = 1;
else
this.type = 0;
this.bankInfo = this.bankList[this.type];
},
//
viewProgress() {
uni.navigateTo({
url: "/pages/withdrawal/progress?mer_id=" + this.mer_id
})
},
//
async handleSubmit() {
if (this.bankList.length == 0) {
this.viewProgress();
} else {
this.payForm.financial_bank_bank = this.bankInfo.financial_account.bank;
this.payForm.financial_bank_branch = this.bankInfo.financial_account.bank_branch;
this.payForm.financial_bank_code = this.bankInfo.financial_account.bank_code;
this.payForm.financial_bank_name = this.bankInfo.financial_account.name;
if (!this.payForm.extract_money) return this.$util.Tips({
title: '请输入提现金额'
});
if (Number(this.payForm.extract_money) < 0) return this.$util.Tips({
title: '请输入正确的提现金额'
});
//
const result = await this.$util.checkPassword();
if (result.data.code == 101) { //
return this.$util.Tips({
title: "您暂未设置支付密码,请前往设置!"
}, () => {
uni.navigateTo({
url: "/pages/users/user_modify_pwd/index?type=payPwd"
});
})
}
this.$refs.popups.handleOpen();
}
},
//
async handleConfirm(e) {
const result = await this.$util.checkPassword(e);
//
if (result.data.code == 100) {
this.$set(this.payForm, 'withdrawal_pwd', e);
this.submit();
} else {
this.$refs.payPwd.handleOpen(result.data.code);
}
},
// 101 102
handleLeft(code) {
uni.navigateTo({
url: "/pages/users/user_modify_pwd/index?type=payPwd"
});
this.$refs.payPwd.handleClose();
},
//
handleRight(code) {
if (code == 101) { //
this.$refs.payPwd.handleClose(code);
} else {
this.$refs.payPwd.handleClose();
this.$refs.popups.handleOpen();
}
},
handleClear() {},
handleChange(val) {
if (!val)
this.load = false;
},
submit() {
uni.showLoading({
title: '申请提现中~',
mask: true
});
postCreateApplyAPI(this.mer_id, this.payForm).then(res => {
uni.hideLoading();
this.$util.Tips({
title: "提现申请成功,请等待审核!"
}, () => {
uni.navigateBack()
})
}).catch(err => {
uni.hideLoading();
this.$util.Tips({
title: err
})
})
},
//
navigator(url, t) {
uni.navigateTo({
url: url
})
},
handleBack() {
uni.navigateBack()
}
}
}
</script>
<style lang="scss">
page {
background-color: #F8F9FA;
}
.shop_type {
padding-bottom: 184rpx;
.shop_type-head {
background-color: #40AE36;
margin-bottom: 30rpx;
.shop-type-navbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
height: 88rpx;
.shop-type-navbar-title {
font-size: 32rpx;
color: #FFFFFF;
}
}
}
}
.withdrawal-con {
height: calc(100vh - 88rpx - 184rpx - var(--status-bar-height) - 30rpx);
overflow: auto;
padding-bottom: 30rpx;
}
.withdrawal {
display: flex;
align-items: center;
justify-content: space-between;
background-color: #fff;
height: 102rpx;
border-radius: 20rpx;
margin: 0 30rpx 26rpx;
padding: 0 26rpx 0 30rpx;
.withdrawal-left {
display: flex;
.withdrawal-left-to {
margin-right: 42rpx;
font-size: 30rpx;
color: #333333;
}
.withdrawal-left-empty {
font-weight: bold;
font-size: 28rpx;
color: #333333;
}
}
.withdrawal-right {
display: flex;
align-items: center;
.withdrawal-right-add {
font-size: 28rpx;
color: #40AE36;
}
}
}
.withdrawal-btn {
position: fixed;
bottom: 0;
left: 0;
height: 184rpx;
width: 100%;
padding-top: 32rpx;
box-sizing: border-box;
background-color: #f7f8f9;
z-index: 10;
.withdrawal-btn-wrap {
height: 88rpx;
background: linear-gradient(359deg, #72BE53 0%, #46B03A 100%);
border-radius: 88rpx;
margin: 0 30rpx;
line-height: 88rpx;
text-align: center;
text {
font-weight: bold;
font-size: 30rpx;
color: #F5F5F5;
}
}
}
.withdrawal-info {
margin: 0 30rpx;
background-color: #fff;
border-radius: 20rpx;
padding-bottom: 38rpx;
.withdrawal-form {
padding: 0 30rpx;
margin-bottom: 30rpx;
.withdrawal-form-item {
display: flex;
align-items: center;
height: 102rpx;
border-bottom: 2rpx solid #FBFCFC;
.withdrawal-form-item-label {
width: 120rpx;
margin-right: 42rpx;
font-size: 30rpx;
color: #333333;
text-align: left;
white-space: nowrap;
}
.withdrawal-form-item-val {
font-size: 30rpx;
color: #333;
input {}
.placeholderClass {
font-size: 30rpx;
color: #666666;
}
}
}
}
.withdrawal-pro {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 24rpx;
margin-bottom: 30rpx;
.withdrawal-pro-txt {
font-size: 24rpx;
color: #F66C42;
}
.withdrawal-pro-progress {
font-size: 24rpx;
color: #40AE36;
}
}
.tips {
margin: 0 30rpx;
view {
margin-bottom: 20rpx;
font-size: 24rpx;
color: #999999;
line-height: 36rpx;
text {
color: #F55726;
}
}
}
}
.saomaCode {
z-index: 1;
position: fixed;
bottom: 190rpx;
right: 28.07rpx;
width: 87.72rpx;
height: 87.72rpx;
border-radius: 175.44rpx;
background-image: linear-gradient(359deg, #72BE53 0%, #46B03A 100%);
color: #fff;
text-align: center;
line-height: 87.72rpx;
}
</style>

View File

@ -0,0 +1,225 @@
<!-- 银行卡审核进度 -->
<template>
<view class="shop_type">
<view class="shop_type-head">
<view style="height: var(--status-bar-height);"></view>
<view class="shop-type-navbar">
<u-icon name="arrow-left" size="18" color="#fff" @click="handleBack" />
<text class="shop-type-navbar-title">审核</text>
<text></text>
</view>
</view>
<view class="wrap" v-if="bankList.length > 0">
<!-- 进度详情 -->
<view class="shop-type-con-progress" v-for="(item,indx) in bankList" :key="indx">
<view class="shop-type-con-detail">{{item.is_own === 0?'法人账户':'对公账户'}}进度详情</view>
<view class="shop-type-con-progress-card">
<view class="shop-type-con-progress-left">
<view class="shop-type-con-progress-left-item">
<u-icon name="checkmark-circle-fill" size="18" color="#40AE36"></u-icon>
</view>
<view class="dot"></view>
<view class="dot"></view>
<!-- #ifndef H5 -->
<view class="dot"></view>
<!-- #endif -->
<view class="dot"></view>
<view class="dot"></view>
<view class="shop-type-con-progress-left-item">
<u-icon name="checkmark-circle-fill" size="18" color="#999" v-if="item.is_check == 0" />
<u-icon name="checkmark-circle-fill" size="18" color="#40AE36" v-if="item.is_check == 1" />
<u-icon name="close-circle-fill" size="18" color="#F55726" v-if="item.is_check == 2" />
</view>
</view>
<view class="shop-type-con-progress-right">
<view class="apply">
<view class="shop-type-con-progress-right-name">申请已提交</view>
<view class="shop-type-con-progress-right-time">{{item.create_time}}</view>
</view>
<view
style="display: flex;justify-content: space-between;align-items: center;margin-bottom:10rpx;">
<view class="shop-type-con-progress-right-name">
{{item.is_check == 0?'待审核人员审核':item.is_check==1?'审核通过':'审核未通过'}}
</view>
<view class="shop-type-con-progress-right-time"
v-if="item.is_check == 1 || item.is_check == 2">
{{item.update_time}}
</view>
</view>
<view class="audit-info" v-if="item.is_check != 0">
<view style="margin-bottom: 10rpx;">
审批人{{item.adminInfo.real_name?item.adminInfo.real_name:item.adminInfo.account?item.adminInfo.account:''}}
</view>
<view class="audit-info-txt" v-if="item.is_check == 2">审核不通过{{item.fail_msg}}</view>
<view style="text-align: right;color:#46B03A;font-weight: bold;" v-if="item.is_check == 2"
@click="handleToUpdate(item.id)">
去修改
</view>
</view>
</view>
</view>
</view>
</view>
<u-empty v-else mode="data" text="暂无审批信息~" icon="http://cdn.uviewui.com/uview/empty/data.png">
</u-empty>
</view>
</template>
<script>
import {
progressBankList
} from "@/api/user.js";
export default {
data() {
return {
form: {
status: 2,
check_name: '',
fail_msg: '',
create_time: ''
},
mer_id: '',
data0: undefined, //
data1: undefined, //
bankList: []
}
},
onLoad(opt) {
this.mer_id = opt.mer_id;
progressBankList(this.mer_id).then(res => {
this.bankList = res.data.list;
});
},
methods: {
//
handleToUpdate(id) {
uni.redirectTo({
url: "/pages/withdrawal/add?id=" + id
})
},
handleBack() {
uni.navigateBack()
}
}
}
</script>
<style lang="scss">
page {
background-color: #F8F9FA;
}
.shop_type {
padding-bottom: 184rpx;
.shop_type-head {
background-color: #40AE36;
margin-bottom: 30rpx;
.shop-type-navbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
height: 88rpx;
.shop-type-navbar-title {
font-size: 32rpx;
color: #FFFFFF;
}
}
}
}
.shop-type-con-progress {
margin: 0 30rpx 30rpx;
.shop-type-con-detail {
margin-bottom: 20rpx;
margin-left: 20rpx;
font-weight: 600;
font-size: 30rpx;
color: #333333;
}
.shop-type-con-progress-card {
display: flex;
width: 100%;
padding: 30rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 6rpx 2rpx rgba(0, 0, 0, 0.16);
border-radius: 20rpx 20rpx 20rpx 20rpx;
.shop-type-con-progress-left {
width: 12%;
display: flex;
flex-direction: column;
align-items: center;
.dot {
width: 6rpx;
height: 6rpx;
border-radius: 50%;
background-color: #ccc;
margin-bottom: 4rpx;
}
.shop-type-con-progress-left-item {
width: 36rpx;
height: 36rpx;
border-radius: 50%;
}
}
.shop-type-con-progress-right {
flex: 1;
margin-bottom: 40rpx;
&:nth-last-child(1) {
margin-bottom: 0;
}
// #ifndef H5
.apply {
display: flex;
margin-bottom: 38rpx;
justify-content: space-between;
align-items: center;
}
// #endif
// #ifdef H5
.apply {
display: flex;
margin-bottom: 36rpx;
justify-content: space-between;
align-items: center;
}
// #endif
.shop-type-con-progress-right-name {
font-weight: 400;
font-size: 28rpx;
color: #333333;
}
.shop-type-con-progress-right-time {
font-size: 26rpx;
color: #666666;
}
}
.audit-info {
font-size: 22rpx;
color: #666666;
}
}
}
</style>

BIN
static/del.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 905 B

BIN
static/images/index26.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
static/shop_logo.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1,3 +1,46 @@
## 1.8.92024-03-20
- 修复 uni-popup-dialog 数据输入时修正为双向绑定
## 1.8.82024-02-20
- 修复 uni-popup 在微信小程序下出现文字向上闪动的bug
## 1.8.72024-02-02
- 新增 uni-popup-dialog 新增属性focusinput模式下是否自动自动聚焦
## 1.8.62024-01-30
- 新增 uni-popup-dialog 新增属性maxLength:限制输入框字数
## 1.8.52024-01-26
- 新增 uni-popup-dialog 新增属性showClose:控制关闭按钮的显示
## 1.8.42023-11-15
- 新增 uni-popup 支持uni-app-x 注意暂时仅支持 `maskClick` `@open` `@close`
## 1.8.32023-04-17
- 修复 uni-popup 重复打开时的 bug
## 1.8.22023-02-02
- uni-popup-dialog 组件新增 inputType 属性
## 1.8.12022-12-01
- 修复 nvue 下 v-show 报错
## 1.8.02022-11-29
- 优化 主题样式
## 1.7.92022-04-02
- 修复 弹出层内部无法滚动的bug
## 1.7.82022-03-28
- 修复 小程序中高度错误的bug
## 1.7.72022-03-17
- 修复 快速调用open出现问题的Bug
## 1.7.62022-02-14
- 修复 safeArea 属性不能设置为false的bug
## 1.7.52022-01-19
- 修复 isMaskClick 失效的bug
## 1.7.42022-01-19
- 新增 cancelText \ confirmText 属性 ,可自定义文本
- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色
- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题
## 1.7.32022-01-13
- 修复 设置 safeArea 属性不生效的bug
## 1.7.22021-11-26
- 优化 组件示例
## 1.7.12021-11-26
- 修复 vuedoc 文字错误
## 1.7.02021-11-19
- 优化 组件UI并提供设计资源详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-popup](https://uniapp.dcloud.io/component/uniui/uni-popup)
## 1.6.22021-08-24
- 新增 支持国际化
## 1.6.12021-07-30

View File

@ -10,12 +10,13 @@
</view>
<view v-else class="uni-dialog-content">
<slot>
<input class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholderText" :focus="focus" >
<input class="uni-dialog-input" :maxlength="maxlength" v-model="val" :type="inputType"
:placeholder="placeholderText" :focus="focus">
</slot>
</view>
<view class="uni-dialog-button-group">
<view class="uni-dialog-button" @click="closeDialog">
<text class="uni-dialog-button-text">{{cancelText}}</text>
<view class="uni-dialog-button" v-if="showClose" @click="closeDialog">
<text class="uni-dialog-button-text">{{closeText}}</text>
</view>
<view class="uni-dialog-button uni-border-left" @click="onOk">
<text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
@ -28,16 +29,19 @@
<script>
import popup from '../uni-popup/popup.js'
import {
initVueI18n
initVueI18n
} from '@dcloudio/uni-i18n'
import messages from '../uni-popup/i18n/index.js'
const { t } = initVueI18n(messages)
const {
t
} = initVueI18n(messages)
/**
* PopUp 弹出层-对话框样式
* @description 弹出层-对话框样式
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
* @property {String} value input 模式下的默认值
* @property {String} placeholder input 模式下输入提示
* @property {Boolean} focus input模式下是否自动聚焦默认为true
* @property {String} type = [success|warning|info|error] 主题样式
* @value success 成功
* @value warning 提示
@ -46,8 +50,10 @@
* @property {String} mode = [base|input] 模式
* @value base 基础对话框
* @value input 可输入对话框
* @showClose {Boolean} 是否显示关闭按钮
* @property {String} content 对话框内容
* @property {Boolean} beforeClose 是否拦截取消事件
* @property {Number} maxlength 输入
* @event {Function} confirm 点击确认按钮触发
* @event {Function} close 点击取消按钮触发
*/
@ -55,12 +61,30 @@
export default {
name: "uniPopupDialog",
mixins: [popup],
emits:['confirm','close'],
emits: ['confirm', 'close', 'update:modelValue', 'input'],
props: {
inputType: {
type: String,
default: 'text'
},
showClose: {
type: Boolean,
default: true
},
// #ifdef VUE2
value: {
type: [String, Number],
default: ''
},
// #endif
// #ifdef VUE3
modelValue: {
type: [Number, String],
default: ''
},
// #endif
placeholder: {
type: [String, Number],
default: ''
@ -84,21 +108,36 @@
beforeClose: {
type: Boolean,
default: false
},
cancelText: {
type: String,
default: ''
},
confirmText: {
type: String,
default: ''
},
maxlength: {
type: Number,
default: -1,
},
focus: {
type: Boolean,
default: true,
}
},
data() {
return {
dialogType: 'error',
focus: false,
val: ""
}
},
computed: {
okText() {
return t("uni-popup.ok")
return this.confirmText || t("uni-popup.ok")
},
cancelText() {
return t("uni-popup.cancel")
closeText() {
return this.cancelText || t("uni-popup.cancel")
},
placeholderText() {
return this.placeholder || t("uni-popup.placeholder")
@ -117,7 +156,21 @@
}
},
value(val) {
this.val = val
if (this.maxlength != -1 && this.mode === 'input') {
this.val = val.slice(0, this.maxlength);
} else {
this.val = val
}
},
val(val) {
// #ifdef VUE2
// TODO vue2
this.$emit('input', val);
// #endif
// #ifdef VUE3
// TODO  vue3
this.$emit('update:modelValue', val);
// #endif
}
},
created() {
@ -131,20 +184,17 @@
this.dialogType = this.type
}
},
mounted() {
this.focus = true
},
methods: {
/**
* 点击确认按钮
*/
onOk() {
if (this.mode === 'input'){
if (this.mode === 'input') {
this.$emit('confirm', this.val)
}else{
} else {
this.$emit('confirm')
}
if(this.beforeClose) return
if (this.beforeClose) return
this.popup.close()
},
/**
@ -152,20 +202,20 @@
*/
closeDialog() {
this.$emit('close')
if(this.beforeClose) return
if (this.beforeClose) return
this.popup.close()
},
close(){
close() {
this.popup.close()
}
}
}
</script>
<style lang="scss" scoped>
<style lang="scss">
.uni-popup-dialog {
width: 300px;
border-radius: 15px;
border-radius: 11px;
background-color: #fff;
}
@ -175,8 +225,7 @@
/* #endif */
flex-direction: row;
justify-content: center;
padding-top: 15px;
padding-bottom: 5px;
padding-top: 25px;
}
.uni-dialog-title-text {
@ -191,12 +240,12 @@
flex-direction: row;
justify-content: center;
align-items: center;
padding: 5px 15px 15px 15px;
padding: 20px;
}
.uni-dialog-content-text {
font-size: 14px;
color: #6e6e6e;
color: #6C6C6C;
}
.uni-dialog-button-group {
@ -228,7 +277,8 @@
}
.uni-dialog-button-text {
font-size: 14px;
font-size: 16px;
color: #333;
}
.uni-button-color {

View File

@ -71,7 +71,7 @@
}
}
</script>
<style lang="scss" scoped>
<style lang="scss" >
.uni-popup-message {
/* #ifndef APP-NVUE */
display: flex;

View File

@ -47,7 +47,7 @@
{
text: '支付宝',
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/d684ae40-50be-11eb-8ff1-d5dcf8779628.png',
name: 'wx'
name: 'ali'
},
{
text: 'QQ',
@ -59,16 +59,16 @@
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png',
name: 'sina'
},
{
text: '百度',
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
name: 'copy'
},
{
text: '其他',
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
name: 'more'
}
// {
// text: '',
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
// name: 'copy'
// },
// {
// text: '',
// icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
// name: 'more'
// }
]
}
},
@ -103,9 +103,11 @@
}
}
</script>
<style lang="scss" scoped>
<style lang="scss" >
.uni-popup-share {
background-color: #fff;
border-top-left-radius: 11px;
border-top-right-radius: 11px;
}
.uni-share-title {
/* #ifndef APP-NVUE */

View File

@ -0,0 +1,90 @@
<template>
<view class="popup-root" v-if="isOpen" v-show="isShow" @click="clickMask">
<view @click.stop>
<slot></slot>
</view>
</view>
</template>
<script>
type CloseCallBack = ()=> void;
let closeCallBack:CloseCallBack = () :void => {};
export default {
emits:["close","clickMask"],
data() {
return {
isShow:false,
isOpen:false
}
},
props: {
maskClick: {
type: Boolean,
default: true
},
},
watch: {
// 设置show = true 时,如果没有 open 需要设置为 open
isShow:{
handler(isShow) {
// console.log("isShow",isShow)
if(isShow && this.isOpen == false){
this.isOpen = true
}
},
immediate:true
},
// 设置isOpen = true 时,如果没有 isShow 需要设置为 isShow
isOpen:{
handler(isOpen) {
// console.log("isOpen",isOpen)
if(isOpen && this.isShow == false){
this.isShow = true
}
},
immediate:true
}
},
methods:{
open(){
// ...funs : CloseCallBack[]
// if(funs.length > 0){
// closeCallBack = funs[0]
// }
this.isOpen = true;
},
clickMask(){
if(this.maskClick == true){
this.$emit('clickMask')
this.close()
}
},
close(): void{
this.isOpen = false;
this.$emit('close')
closeCallBack()
},
hiden(){
this.isShow = false
},
show(){
this.isShow = true
}
}
}
</script>
<style>
.popup-root {
position: fixed;
top: 0;
left: 0;
width: 750rpx;
height: 100%;
flex: 1;
background-color: rgba(0, 0, 0, 0.3);
justify-content: center;
align-items: center;
z-index: 99;
}
</style>

View File

@ -1,9 +1,13 @@
<template>
<view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']" @touchmove.stop.prevent="clear">
<view @touchstart="touchstart" >
<uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass" :duration="duration" :show="showTrans" @click="onTap" />
<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap">
<view class="uni-popup__wrapper" :style="{ backgroundColor: bg }" :class="[popupstyle]" @click="clear"><slot /></view>
<view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']">
<view @touchstart="touchstart">
<uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass"
:duration="duration" :show="showTrans" @click="onTap" />
<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
:show="showTrans" @click="onTap">
<view class="uni-popup__wrapper" :style="getStyles" :class="[popupstyle]" @click="clear">
<slot />
</view>
</uni-transition>
</view>
<!-- #ifdef H5 -->
@ -13,391 +17,480 @@
</template>
<script>
// #ifdef H5
import keypress from './keypress.js'
// #endif
// #ifdef H5
import keypress from './keypress.js'
// #endif
/**
* PopUp 弹出层
* @description 弹出层组件为了解决遮罩弹层的问题
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
* @property {String} type = [top|center|bottom|left|right|message|dialog|share] 弹出方式
* @value top 顶部弹出
* @value center 中间弹出
* @value bottom 底部弹出
* @value left 左侧弹出
* @value right 右侧弹出
* @value message 消息提示
* @value dialog 对话框
* @value share 底部分享示例
* @property {Boolean} animation = [ture|false] 是否开启动画
* @property {Boolean} maskClick = [ture|false] 蒙版点击是否关闭弹窗
* @property {String} backgroundColor 主窗口背景色
* @property {Boolean} safeArea 是否适配底部安全区
* @event {Function} change 打开关闭弹窗触发e={show: false}
* @event {Function} maskClick 点击遮罩触发
*/
/**
* PopUp 弹出层
* @description 弹出层组件为了解决遮罩弹层的问题
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
* @property {String} type = [top|center|bottom|left|right|message|dialog|share] 弹出方式
* @value top 顶部弹出
* @value center 中间弹出
* @value bottom 底部弹出
* @value left 左侧弹出
* @value right 右侧弹出
* @value message 消息提示
* @value dialog 对话框
* @value share 底部分享示例
* @property {Boolean} animation = [true|false] 是否开启动画
* @property {Boolean} maskClick = [true|false] 蒙版点击是否关闭弹窗(废弃)
* @property {Boolean} isMaskClick = [true|false] 蒙版点击是否关闭弹窗
* @property {String} backgroundColor 主窗口背景色
* @property {String} maskBackgroundColor 蒙版颜色
* @property {Boolean} safeArea 是否适配底部安全区
* @event {Function} change 打开关闭弹窗触发e={show: false}
* @event {Function} maskClick 点击遮罩触发
*/
export default {
name: 'uniPopup',
components: {
// #ifdef H5
keypress
// #endif
},
emits:['change','maskClick'],
props: {
//
animation: {
type: Boolean,
default: true
},
// top: bottomcenter
// message: ; dialog :
type: {
type: String,
default: 'center'
},
// maskClick
maskClick: {
type: Boolean,
default: true
},
backgroundColor: {
type: String,
default: 'none'
},
safeArea:{
type: Boolean,
default: true
}
},
watch: {
/**
* 监听type类型
*/
type: {
handler: function(type) {
if (!this.config[type]) return
this[this.config[type]](true)
},
immediate: true
},
isDesktop: {
handler: function(newVal) {
if (!this.config[newVal]) return
this[this.config[this.type]](true)
},
immediate: true
},
/**
* 监听遮罩是否可点击
* @param {Object} val
*/
maskClick: {
handler: function(val) {
this.mkclick = val
},
immediate: true
}
},
data() {
return {
duration: 300,
ani: [],
showPopup: false,
showTrans: false,
popupWidth: 0,
popupHeight: 0,
config: {
top: 'top',
bottom: 'bottom',
center: 'center',
left: 'left',
right: 'right',
message: 'top',
dialog: 'center',
share: 'bottom'
},
maskClass: {
position: 'fixed',
bottom: 0,
top: 0,
left: 0,
right: 0,
backgroundColor: 'rgba(0, 0, 0, 0.4)'
},
transClass: {
position: 'fixed',
left: 0,
right: 0
},
maskShow: true,
mkclick: true,
popupstyle: this.isDesktop ? 'fixforpc-top' : 'top'
}
},
computed: {
isDesktop() {
return this.popupWidth >= 500 && this.popupHeight >= 500
},
bg() {
if (this.backgroundColor === '' || this.backgroundColor === 'none') {
return 'transparent'
}
return this.backgroundColor
}
},
mounted() {
const fixSize = () => {
const { windowWidth, windowHeight, windowTop, safeAreaInsets } = uni.getSystemInfoSync()
this.popupWidth = windowWidth
this.popupHeight = windowHeight + windowTop
//
if(this.safeArea){
this.safeAreaInsets = safeAreaInsets
}else{
this.safeAreaInsets = 0
}
}
fixSize()
// #ifdef H5
// window.addEventListener('resize', fixSize)
// this.$once('hook:beforeDestroy', () => {
// window.removeEventListener('resize', fixSize)
// })
// #endif
},
created() {
this.mkclick = this.maskClick
if (this.animation) {
this.duration = 300
} else {
this.duration = 0
}
// TODO message
this.messageChild = null
// TODO
this.clearPropagation = false
},
methods: {
/**
* 公用方法不显示遮罩层
*/
closeMask() {
this.maskShow = false
},
/**
* 公用方法遮罩层禁止点击
*/
disableMask() {
this.mkclick = false
},
// TODO nvue
clear(e) {
// #ifndef APP-NVUE
e.stopPropagation()
export default {
name: 'uniPopup',
components: {
// #ifdef H5
keypress
// #endif
this.clearPropagation = true
},
emits: ['change', 'maskClick'],
props: {
//
animation: {
type: Boolean,
default: true
},
// top: bottomcenter
// message: ; dialog :
type: {
type: String,
default: 'center'
},
// maskClick
isMaskClick: {
type: Boolean,
default: null
},
// TODO 2 使 isMaskClick
maskClick: {
type: Boolean,
default: null
},
backgroundColor: {
type: String,
default: 'none'
},
safeArea: {
type: Boolean,
default: true
},
maskBackgroundColor: {
type: String,
default: 'rgba(0, 0, 0, 0.4)'
},
borderRadius:{
type: String,
}
},
open(direction) {
let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
if (!(direction && innerType.indexOf(direction) !== -1)) {
direction = this.type
watch: {
/**
* 监听type类型
*/
type: {
handler: function(type) {
if (!this.config[type]) return
this[this.config[type]](true)
},
immediate: true
},
isDesktop: {
handler: function(newVal) {
if (!this.config[newVal]) return
this[this.config[this.type]](true)
},
immediate: true
},
/**
* 监听遮罩是否可点击
* @param {Object} val
*/
maskClick: {
handler: function(val) {
this.mkclick = val
},
immediate: true
},
isMaskClick: {
handler: function(val) {
this.mkclick = val
},
immediate: true
},
// H5
showPopup(show) {
// #ifdef H5
// fix by mehaotian h5 穿
document.getElementsByTagName('body')[0].style.overflow = show ? 'hidden' : 'visible'
// #endif
}
if (!this.config[direction]) {
console.error('缺少类型:', direction)
return
},
data() {
return {
duration: 300,
ani: [],
showPopup: false,
showTrans: false,
popupWidth: 0,
popupHeight: 0,
config: {
top: 'top',
bottom: 'bottom',
center: 'center',
left: 'left',
right: 'right',
message: 'top',
dialog: 'center',
share: 'bottom'
},
maskClass: {
position: 'fixed',
bottom: 0,
top: 0,
left: 0,
right: 0,
backgroundColor: 'rgba(0, 0, 0, 0.4)'
},
transClass: {
backgroundColor: 'transparent',
borderRadius: this.borderRadius || "0",
position: 'fixed',
left: 0,
right: 0
},
maskShow: true,
mkclick: true,
popupstyle: 'top'
}
this[this.config[direction]]()
this.$emit('change', {
show: true,
type: direction
})
},
close(type) {
this.showTrans = false
this.$emit('change', {
show: false,
type: this.type
})
clearTimeout(this.timer)
// //
// this.customOpen && this.customClose()
this.timer = setTimeout(() => {
this.showPopup = false
}, 300)
},
// TODO
touchstart(){
this.clearPropagation = false
},
onTap() {
if (this.clearPropagation) {
// fix by mehaotian nvue
this.clearPropagation = false
return
}
this.$emit('maskClick')
if (!this.mkclick) return
this.close()
},
/**
* 顶部弹出样式处理
*/
top(type) {
this.popupstyle = this.isDesktop ? 'fixforpc-top' : 'top'
this.ani = ['slide-top']
this.transClass = {
position: 'fixed',
left: 0,
right: 0,
backgroundColor: this.bg
}
// TODO type
if (type) return
this.showPopup = true
this.showTrans = true
this.$nextTick(() => {
if (this.messageChild && this.type === 'message') {
this.messageChild.timerClose()
computed: {
getStyles() {
let res = { backgroundColor: this.bg };
if (this.borderRadius || "0") {
res = Object.assign(res, { borderRadius: this.borderRadius })
}
})
return res;
},
isDesktop() {
return this.popupWidth >= 500 && this.popupHeight >= 500
},
bg() {
if (this.backgroundColor === '' || this.backgroundColor === 'none') {
return 'transparent'
}
return this.backgroundColor
}
},
/**
* 底部弹出样式处理
*/
bottom(type) {
this.popupstyle = 'bottom'
this.ani = ['slide-bottom']
mounted() {
const fixSize = () => {
const {
windowWidth,
windowHeight,
windowTop,
safeArea,
screenHeight,
safeAreaInsets
} = uni.getSystemInfoSync()
this.popupWidth = windowWidth
this.popupHeight = windowHeight + (windowTop || 0)
// TODO fix by mehaotian ,ios app ios
if (safeArea && this.safeArea) {
// #ifdef MP-WEIXIN
this.safeAreaInsets = screenHeight - safeArea.bottom
// #endif
// #ifndef MP-WEIXIN
this.safeAreaInsets = safeAreaInsets.bottom
// #endif
} else {
this.safeAreaInsets = 0
}
}
fixSize()
// #ifdef H5
// window.addEventListener('resize', fixSize)
// this.$once('hook:beforeDestroy', () => {
// window.removeEventListener('resize', fixSize)
// })
// #endif
},
// #ifndef VUE3
// TODO vue2
destroyed() {
this.setH5Visible()
},
// #endif
// #ifdef VUE3
// TODO vue3
unmounted() {
this.setH5Visible()
},
// #endif
created() {
// this.mkclick = this.isMaskClick || this.maskClick
if (this.isMaskClick === null && this.maskClick === null) {
this.mkclick = true
} else {
this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick
}
if (this.animation) {
this.duration = 300
} else {
this.duration = 0
}
// TODO message
this.messageChild = null
// TODO
this.clearPropagation = false
this.maskClass.backgroundColor = this.maskBackgroundColor
},
methods: {
setH5Visible() {
// #ifdef H5
// fix by mehaotian h5 穿
document.getElementsByTagName('body')[0].style.overflow = 'visible'
// #endif
},
/**
* 公用方法不显示遮罩层
*/
closeMask() {
this.maskShow = false
},
/**
* 公用方法遮罩层禁止点击
*/
disableMask() {
this.mkclick = false
},
// TODO nvue
clear(e) {
// #ifndef APP-NVUE
e.stopPropagation()
// #endif
this.clearPropagation = true
},
this.transClass = {
position: 'fixed',
left: 0,
right: 0,
bottom: 0,
paddingBottom: (this.safeAreaInsets && this.safeAreaInsets.bottom) || 0,
backgroundColor: this.bg
open(direction) {
// fix by mehaotian
if (this.showPopup) {
return
}
let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
if (!(direction && innerType.indexOf(direction) !== -1)) {
direction = this.type
}
if (!this.config[direction]) {
console.error('缺少类型:', direction)
return
}
this[this.config[direction]]()
this.$emit('change', {
show: true,
type: direction
})
},
close(type) {
this.showTrans = false
this.$emit('change', {
show: false,
type: this.type
})
clearTimeout(this.timer)
// //
// this.customOpen && this.customClose()
this.timer = setTimeout(() => {
this.showPopup = false
}, 300)
},
// TODO
touchstart() {
this.clearPropagation = false
},
onTap() {
if (this.clearPropagation) {
// fix by mehaotian nvue
this.clearPropagation = false
return
}
this.$emit('maskClick')
if (!this.mkclick) return
this.close()
},
/**
* 顶部弹出样式处理
*/
top(type) {
this.popupstyle = this.isDesktop ? 'fixforpc-top' : 'top'
this.ani = ['slide-top']
this.transClass = {
position: 'fixed',
left: 0,
right: 0,
backgroundColor: this.bg,
borderRadius:this.borderRadius || "0"
}
// TODO type
if (type) return
this.showPopup = true
this.showTrans = true
this.$nextTick(() => {
if (this.messageChild && this.type === 'message') {
this.messageChild.timerClose()
}
})
},
/**
* 底部弹出样式处理
*/
bottom(type) {
this.popupstyle = 'bottom'
this.ani = ['slide-bottom']
this.transClass = {
position: 'fixed',
left: 0,
right: 0,
bottom: 0,
paddingBottom: this.safeAreaInsets + 'px',
backgroundColor: this.bg,
borderRadius:this.borderRadius || "0",
}
// TODO type
if (type) return
this.showPopup = true
this.showTrans = true
},
/**
* 中间弹出样式处理
*/
center(type) {
this.popupstyle = 'center'
//
// #ifdef MP-WEIXIN
this.ani = ['fade']
// #endif
// #ifndef MP-WEIXIN
this.ani = ['zoom-out', 'fade']
// #endif
this.transClass = {
position: 'fixed',
/* #ifndef APP-NVUE */
display: 'flex',
flexDirection: 'column',
/* #endif */
bottom: 0,
left: 0,
right: 0,
top: 0,
justifyContent: 'center',
alignItems: 'center',
borderRadius:this.borderRadius || "0"
}
// TODO type
if (type) return
this.showPopup = true
this.showTrans = true
},
left(type) {
this.popupstyle = 'left'
this.ani = ['slide-left']
this.transClass = {
position: 'fixed',
left: 0,
bottom: 0,
top: 0,
backgroundColor: this.bg,
borderRadius:this.borderRadius || "0",
/* #ifndef APP-NVUE */
display: 'flex',
flexDirection: 'column'
/* #endif */
}
// TODO type
if (type) return
this.showPopup = true
this.showTrans = true
},
right(type) {
this.popupstyle = 'right'
this.ani = ['slide-right']
this.transClass = {
position: 'fixed',
bottom: 0,
right: 0,
top: 0,
backgroundColor: this.bg,
borderRadius:this.borderRadius || "0",
/* #ifndef APP-NVUE */
display: 'flex',
flexDirection: 'column'
/* #endif */
}
// TODO type
if (type) return
this.showPopup = true
this.showTrans = true
}
// TODO type
if (type) return
this.showPopup = true
this.showTrans = true
},
/**
* 中间弹出样式处理
*/
center(type) {
this.popupstyle = 'center'
this.ani = ['zoom-out', 'fade']
this.transClass = {
position: 'fixed',
/* #ifndef APP-NVUE */
display: 'flex',
flexDirection: 'column',
/* #endif */
bottom: 0,
left: 0,
right: 0,
top: 0,
justifyContent: 'center',
alignItems: 'center'
}
// TODO type
if (type) return
this.showPopup = true
this.showTrans = true
},
left(type) {
this.popupstyle = 'left'
this.ani = ['slide-left']
this.transClass = {
position: 'fixed',
left: 0,
bottom: 0,
top: 0,
backgroundColor: this.bg,
/* #ifndef APP-NVUE */
display: 'flex',
flexDirection: 'column'
/* #endif */
}
// TODO type
if (type) return
this.showPopup = true
this.showTrans = true
},
right(type) {
this.popupstyle = 'right'
this.ani = ['slide-right']
this.transClass = {
position: 'fixed',
bottom: 0,
right: 0,
top: 0,
backgroundColor: this.bg,
/* #ifndef APP-NVUE */
display: 'flex',
flexDirection: 'column'
/* #endif */
}
// TODO type
if (type) return
this.showPopup = true
this.showTrans = true
}
}
}
</script>
<style lang="scss" scoped>
.uni-popup {
position: fixed;
/* #ifndef APP-NVUE */
z-index: 99;
/* #endif */
&.top,
&.left,
&.right {
/* #ifdef H5 */
top: var(--window-top);
/* #endif */
/* #ifndef H5 */
top: 0;
/* #endif */
}
.uni-popup__wrapper {
<style lang="scss">
.uni-popup {
position: fixed;
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: relative;
/* iphonex 等安全区设置,底部安全区适配 */
/* #ifndef APP-NVUE */
// padding-bottom: constant(safe-area-inset-bottom);
// padding-bottom: env(safe-area-inset-bottom);
z-index: 99;
/* #endif */
&.top,
&.left,
&.right {
/* #ifdef H5 */
padding-top: var(--window-top);
top: var(--window-top);
/* #endif */
/* #ifndef H5 */
padding-top: 0;
top: 0;
/* #endif */
flex: 1;
}
.uni-popup__wrapper {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
position: relative;
/* iphonex 等安全区设置,底部安全区适配 */
/* #ifndef APP-NVUE */
// padding-bottom: constant(safe-area-inset-bottom);
// padding-bottom: env(safe-area-inset-bottom);
/* #endif */
&.left,
&.right {
/* #ifdef H5 */
padding-top: var(--window-top);
/* #endif */
/* #ifndef H5 */
padding-top: 0;
/* #endif */
flex: 1;
}
}
}
}
.fixforpc-z-index {
/* #ifndef APP-NVUE */
z-index: 999;
/* #endif */
}
.fixforpc-z-index {
/* #ifndef APP-NVUE */
z-index: 999;
/* #endif */
}
.fixforpc-top {
top: 0;
}
.fixforpc-top {
top: 0;
}
</style>

View File

@ -1,7 +1,7 @@
{
"id": "uni-popup",
"displayName": "uni-popup 弹出层",
"version": "1.6.2",
"version": "1.8.9",
"description": " Popup 组件,提供常用的弹层",
"keywords": [
"uni-ui",
@ -17,12 +17,8 @@
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": {
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
@ -38,10 +34,12 @@
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": [
"uni-scss",
"uni-transition"
],
"encrypt": [],
@ -81,7 +79,7 @@
},
"Vue": {
"vue2": "y",
"vue3": "u"
"vue3": "y"
}
}
}

View File

@ -3,294 +3,15 @@
## Popup 弹出层
> **组件名uni-popup**
> 代码块: `uPopup`
> 关联组件:`uni-popup-dialog`,`uni-popup-message`,`uni-popup-share`,`uni-transition`
> 关联组件:`uni-transition`
弹出层组件,在应用中弹出一个消息提示窗口、提示框等
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-popup)
#### 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839
> **注意事项**
> 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的注意事项,可以帮你避免一些错误。
> - 组件需要依赖 `sass` 插件 ,请自行手动安装
> - `uni-popup-message``uni-popup-dialog` 等扩展ui组件需要和 `uni-popup` 配套使用,暂不支持单独使用
> - `nvue` 中使用 `uni-popup` 时,尽量将组件置于其他元素后面,避免出现层级问题
> - `uni-popup` 并不能完全阻止页面滚动,可在打开 `uni-popup` 的时候手动去做一些处理,禁止页面滚动
> - 如果想在页面渲染完毕后就打开 `uni-popup` ,请在 `onReady``mounted` 生命周期内调用,确保组件渲染完毕
> - 在微信小程序开发者工具中启用真机调试popup 会延时出现,是因为 setTimeout 在真机调试中的延时问题导致的,预览和发布小程序不会出现此问题
> - 使用 `npm` 方式引入组件,如果确认引用正确,但是提示未注册组件或显示不正常,请尝试重新编译项目
> - `uni-popup` 中尽量不要使用 `scroll-view` 嵌套过多的内容,可能会影响组件的性能,导致组件无法打开或者打开卡顿
> - `uni-popup` 不会覆盖原生 tabbar 和原生导航栏
> - 组件支持 nvue ,需要在 `manifest.json > app-plus` 节点下配置 `"nvueStyleCompiler" : "uni-app"`
> - 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839
### 安装方式
本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`
如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
### 基本用法
**示例**
```html
<button @click="open">打开弹窗</button>
<uni-popup ref="popup" type="bottom">底部弹出 Popup</uni-popup>
```
```javascript
export default {
methods:{
open(){
// 通过组件定义的ref调用uni-popup方法 ,如果传入参数 type 属性将失效 ,仅支持 ['top','left','bottom','right','center']
this.$refs.popup.open('top')
}
}
}
```
### 设置主窗口背景色
在大多数场景下,并不需要设置 `background-color` 属性,因为`uni-popup`的主窗口默认是透明的,在向里面插入内容的时候 ,样式完全交由用户定制,如果设置了背景色 ,例如 `uni-popup-dialog` 中的圆角就很难去实现,不设置背景色,更适合用户去自由发挥。
而也有特例,需要我们主动去设置背景色,例如 `type = 'bottom'` 的时候 ,在异型屏中遇到了底部安全区问题(如 iphone 11因为 `uni-popup`的主要内容避开了安全区(设置`safe-area:true`),导致底部的颜色我们无法自定义,这时候使用 `background-color` 就可以解决这个问题。
**示例**
```html
<button @click="open">打开弹窗</button>
<uni-popup ref="popup" type="bottom" background-color="#fff">底部弹出 Popup</uni-popup>
```
### 禁用打开动画
在某些场景 ,可能不希望弹层有动画效果 ,只需要将 `animation` 属性设置为 `false` 即可以关闭动画。
**示例**
```html
<button @click="open">打开弹窗</button>
<uni-popup ref="popup" type="center" :animation="false">中间弹出 Popup</uni-popup>
```
### 禁用点击遮罩关闭
默认情况下,点击遮罩会自动关闭`uni-popup`,如不想点击关闭,只需将`mask-click`设置为`false`,这时候要关闭`uni-popup`,只能手动调用 `close` 方法。
**示例**
```html
<button @click="open">打开弹窗</button>
<uni-popup ref="popup" :mask-click="false">
<text>Popup</text>
<button @click="close">关闭</button>
</uni-popup>
```
```javascript
export default {
data() {
return {}
},
onReady() {},
methods: {
open() {
this.$refs.popup.open('top')
},
close() {
this.$refs.popup.close()
}
}
}
```
## API
### Popup Props
|属性名|类型|默认值|说明|
|:-:|:-:|:-:|:-:|
|animation|Boolean|true|是否开启动画|
|type|String|'center'|弹出方式|
|mask-click|Boolean|true|蒙版点击是否关闭弹窗|
|background-color|String|'none'|主窗口背景色|
|safe-area|Boolean|true|是否适配底部安全区|
#### Type Options
|属性名|说明|
|:-:| :-:|
|top|顶部弹出 |
|center|居中弹出|
|bottom|底部弹出|
|left|左侧弹出|
|right|右侧弹出|
|message|预置样式 :消息提示|
|dialog|预置样式 :对话框|
|share|预置样式 :底部弹出分享示例 |
### Popup Methods
|方法称名 |说明|参数|
|:-:|:-:|:-:|
|open|打开弹出层|open(String:type) ,如果参数可代替 type 属性|
|close|关闭弹出层 |-|
### Popup Events
|事件称名|说明|返回值|
|:-:|:-:|:-:|
|change|组件状态发生变化触发|e={show: truefalse,type:当前模式}|
|maskClick|点击遮罩层触发|-|
## 扩展组件说明
`uni-popup` 其实并没有任何样式,只提供基础的动画效果,给用户一个弹出层解决方案,仅仅是这样并不能满足开发需求,所以我们提供了三种基础扩展样式
### uni-popup-message 提示信息
`uni-popup``type`属性改为 `message`,并引入对应组件即可使用消息提示 *该组件不支持单独使用*
**示例**
```html
<uni-popup ref="popup" type="message">
<uni-popup-message type="success" message="成功消息" :duration="2000"></uni-popup-message>
</uni-popup>
```
### PopupMessage Props
|属性名|类型|默认值|说明|
|:-:|:-:|:-:|:-:|
|type|String|success|消息提示主题|
|message|String|-|消息提示文字|
|duration|Number|3000|消息显示时间超过显示时间组件自动关闭设置为0 将不会关闭,需手动调用 close 方法关闭|
#### Type Options
|属性名|说明|
|:-:| :-:|
|success|成功 |
|warn|警告|
|error|失败|
|info|消息|
### PopupMessage Slots
|名称|说明|
|:-:|:-:|
|default|消息内容,会覆盖 message 属性|
### uni-popup-dialog 对话框
`uni-popup``type`属性改为 `dialog`,并引入对应组件即可使用对话框 *该组件不支持单独使用*
**示例**
```html
<button @click="open">打开弹窗</button>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog mode="input" message="成功消息" :duration="2000" :before-close="true" @close="close" @confirm="confirm"></uni-popup-dialog>
</uni-popup>
```
```javascript
export default {
methods: {
open() {
this.$refs.popup.open()
},
/**
* 点击取消按钮触发
* @param {Object} done
*/
close() {
// TODO 做一些其他的事情before-close 为true的情况下手动执行 close 才会关闭对话框
// ...
this.$refs.popup.close()
},
/**
* 点击确认按钮触发
* @param {Object} done
* @param {Object} value
*/
confirm(value) {
// 输入框的值
// console.log(value)
// TODO 做一些其他的事情,手动执行 close 才会关闭对话框
// ...
this.$refs.popup.close()
}
}
}
```
### PopupDialog Props
|属性名|类型|默认值|说明|
|:-:|:-:|:-:|:-:|
|type|String|success|对话框标题主题,可选值: success/warn/info/error|
|mode|String|base| 对话框模式可选值base提示对话框/input可输入对话框|
|title|String|-|对话框标题|
|content|String|-|对话框内容base模式下生效|
|value| String\Number|-|输入框默认值input模式下生效|
|placeholder|String|-|输入框提示文字input模式下生效|
|before-close|Boolean|false | 是否拦截按钮事件如为true则不会关闭对话框关闭需要手动执行 uni-popup 的 close 方法|
#### PopupDialog Events
|事件称名 |说明|返回值|
|:-:|:-:|:-:|
|close|点击dialog取消按钮触发|-|
|confirm|点击dialog确定按钮触发|e={value:input模式下输入框的值}|
### PopupDialog Slots
|名称|说明|
|:-:|:-:|
|default|自定义内容,回覆盖原有的内容显示|
### uni-popup-share 分享示例
分享示例,不作为最终可使用的组件,只做为样式组件,供用户自行修改,`后续的开发计划是实现实际的分享逻辑,参数可配置`
`uni-popup``type` 属性改为 `share`,并引入对应组件即可使用 *该组件不支持单独使用*
**示例**
```html
<uni-popup ref="popup" type="share">
<uni-popup-share title="分享到" @select="select"></uni-popup-share>
</uni-popup>
```
### PopupShare Props
|属性名|类型|默认值|说明|
|:-:|:-:|:-:| :-: |
|title|String|-|分享弹窗标题|
|before-close|Boolean|false | 是否拦截按钮事件如为true则不会关闭对话框关闭需要手动执行 uni-popup 的 close 方法|
### PopupShare Events
|事件称名|说明|返回值|
|:-:|:-:|:-:|
|select|选择触发|e = {item,index}:所选参数|
**Tips**
- share 分享组件,只是作为一个扩展示例,如果需要修改数据源,请到组件内修改
## 帮助
在使用中如遇到无法解决的问题,请提 [Issues](https://github.com/dcloudio/uni-ui/issues) 给我们。
## 组件示例
点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/popup/popup](https://hellouniapp.dcloud.net.cn/pages/extUI/popup/popup)

View File

@ -1,8 +1,17 @@
## 1.3.22023-05-04
- 修复 NVUE 平台报错的问题
## 1.3.12021-11-23
- 修复 init 方法初始化问题
## 1.3.02021-11-19
- 优化 组件UI并提供设计资源详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-transition](https://uniapp.dcloud.io/component/uniui/uni-transition)
## 1.2.12021-09-27
- 修复 init 方法不生效的 Bug
## 1.2.02021-07-30
- 组件兼容 vue3如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
- 组件兼容 vue3如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.1.12021-05-12
- 新增 示例地址
- 修复 示例项目缺少组件的Bug
- 修复 示例项目缺少组件的 Bug
## 1.1.02021-04-22
- 新增 通过方法自定义动画
- 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式
@ -10,4 +19,4 @@
- 优化 支持单独的动画类型
- 优化 文档示例
## 1.0.22021-02-05
- 调整为uni_modules目录规范
- 调整为 uni_modules 目录规范

View File

@ -10,7 +10,10 @@ const nvueAnimation = uni.requireNativePlugin('animation')
class MPAnimation {
constructor(options, _this) {
this.options = options
this.animation = uni.createAnimation(options)
// 在iOS10+QQ小程序平台下传给原生的对象一定是个普通对象而不是Proxy对象否则会报parameter should be Object instead of ProxyObject的错误
this.animation = uni.createAnimation({
...options
})
this.currentStepAnimates = {}
this.next = 0
this.$ = _this

View File

@ -1,5 +1,10 @@
<template>
<view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
<!-- #ifndef APP-NVUE -->
<view v-show="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
<!-- #endif -->
<!-- #ifdef APP-NVUE -->
<view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
<!-- #endif -->
</template>
<script>
@ -48,7 +53,11 @@ export default {
customClass:{
type: String,
default: ''
}
},
onceRender:{
type:Boolean,
default:false
},
},
data() {
return {
@ -112,7 +121,7 @@ export default {
if (obj.duration) {
this.durationTime = obj.duration
}
this.animation = createAnimation(Object.assign(this.config, obj))
this.animation = createAnimation(Object.assign(this.config, obj),this)
},
/**
* 点击组件触发回调

View File

@ -1,7 +1,7 @@
{
"id": "uni-transition",
"displayName": "uni-transition 过渡动画",
"version": "1.2.0",
"version": "1.3.2",
"description": "元素的简单过渡动画",
"keywords": [
"uni-ui",
@ -17,11 +17,7 @@
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
@ -38,10 +34,11 @@
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": [],
"dependencies": ["uni-scss"],
"encrypt": [],
"platforms": {
"cloud": {
@ -76,6 +73,10 @@
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}

View File

@ -7,391 +7,5 @@
元素过渡动画
> **注意事项**
> 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的注意事项,可以帮你避免一些错误。
> - 组件需要依赖 `sass` 插件 ,请自行手动安装
> - rotate 旋转动画不需要填写 deg 单位,在小程序上填写单位动画不会执行
> - NVUE 下修改宽高动画,不能定位到中心点
> - 百度小程序下修改宽高 ,可能会影响其他动画,需注意
> - nvue 不支持 costom-class , 请使用 styles
> - 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839
### 安装方式
本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`
如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
### 基本用法
在 ``template`` 中使用组件
```html
<template>
<view>
<button type="primary" @click="open">fade</button>
<uni-transition mode-class="fade" :styles="{'width':'100px','height':'100px','backgroundColor':'red'}" :show="show" @change="change" />
</view>
</template>
<script>
export default {
data() {
return {
show: false,
}
},
onLoad() {},
methods: {
open(mode) {
this.show = !this.show
},
change() {
<!-- console.log('触发动画') -->
}
}
}
</script>
```
### 样式覆盖
**注意:`nvue` 不支持 `custom-class` 属性 ,需要使用 `styles` 属性进行兼容**
使用 `custom-class` 属性绑定样式,可以自定义 `uni-transition` 的样式
```html
<template>
<view class="content">
<uni-transition custom-class="custom-transition" mode-class="fade" :duration="0" :show="true" />
</view>
</template>
<style>
/* 常规样式覆盖 */
.content >>> .custom-transition {
width:100px;
height:100px;
background-color:red;
}
</style>
<style lang="scss">
/* 如果使用 scss 需要使用 /deep/ */
.content /deep/ .custom-transition {
width:100px;
height:100px;
background-color:red;
}
</style>
```
如果使用 `styles` 注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red`
```html
<template>
<view class="content">
<uni-transition :styles="styles" mode-class="fade" :duration="0" :show="true" />
</view>
</template>
<script>
export default {
data() {
return {
styles:{
'width':'100px',
'height':'100px',
'backgroundColor':'red'
}
}
}
}
</script>
```
### 自定义动画
当内置动画类型不能满足需求的时候 ,可以使用 `step()``run()` 自定义动画,入参以及具体用法参考下方属性说明
`init()` 方法可以覆盖默认配置
```html
<template>
<view>
<button type="primary" @click="run">执行动画</button>
<uni-transition ref="ani" :styles="{'width':'100px','height':'100px','backgroundColor':'red'}" :show="show" />
</view>
</template>
<script>
export default {
data() {
return {
show: true,
}
},
onReady() {
this.$refs.ani.init({
duration: 1000,
timingFunction: 'linear',
transformOrigin: '50% 50%',
delay: 500
})
},
methods: {
run() {
// 同时右平移到 100px,旋转 360 读
this.$refs.ani.step({
translateX: '100px',
rotate: '360'
})
// 上面的动画执行完成后等待200毫秒平移到 0px,旋转到 0 读
this.$refs.ani.step({
translateX: '0px',
rotate: '0'
},
{
timingFunction: 'ease-in',
duration: 200
})
// 开始执行动画
this.$refs.ani.run(()=>{
// console.log('动画支持完毕')
})
}
}
}
</script>
```
## API
### Transition Props
|属性名 |类型 |默认值 |说明 |
|:-: |:-: |:-: |:-:|
|show |Boolean|false |控制组件显示或隐藏 |
|mode-class |Array/String |- |内置过渡动画类型 |
|custom-class |String |- |自定义类名 |
|duration |Number |300 |过渡动画持续时间 |
|styles |Object |- |组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red` |
#### mode-class 内置过渡动画类型说明
**格式为** `'fade'` 或者 `['fade','slide-top']`
|属性名 |说明 |
|:-: |:-: |
|fade |渐隐渐出过渡 |
|slide-top |由上至下过渡 |
|slide-right |由右至左过渡 |
|slide-bottom |由下至上过渡 |
|slide-left |由左至右过渡 |
|zoom-in |由小到大过渡 |
|zoom-out |由大到小过渡 |
**注意**
组合使用时同一种类型相反的过渡动画如slide-top、slide-bottom同时使用时只有最后一个生效
### Transition Events
|事件名 |说明 |返回值 |
|:-: |:-: |:-: |
|click |点击组件触发 |- |
|change |过渡动画结束时触发 | e = {detail:true} |
### Transition Methons
|方法名|说明|参数|
|:-:|:-:|:-:|
|init()|手动初始化配置|Function(OBJECT:config)|
|step()|动画队列|Function(OBJECT:type,OBJECT:config)|
|run()|执行动画|Function(FUNCTION:callback) |
### init(OBJECT:config)
**通过 ref 调用方法**
手动设置动画配置,需要在页面渲染完毕后调用
```javascript
this.$refs.ani.init({
duration: 1000,
timingFunction:'ease',
delay:500,
transformOrigin:'left center'
})
```
### step(OBJECT:type,OBJECT:config) 动画队列
**通过 ref 调用方法**
调用 `step()` 来表示一组动画完成,`step` 第一个参数可以传入任意多个动画方法,一组动画中的所有动画会同时开始,一组动画完成后才会进行下一组动画。`step` 第二个参数可以传入一个跟 `uni.createAnimation()` 一样的配置参数用于指定当前组动画的配置。
Tips
- 第一个参数支持的动画参考下面的 `支持的动画`
- 第二个参数参考下面的 `动画配置`,可省略,如果省略继承`init`的配置
```javascript
this.$refs.ani.step({
translateX: '100px'
},{
duration: 1000,
timingFunction:'ease',
delay:500,
transformOrigin:'left center'
})
```
### run(FUNCTION:callback) 执行动画
**通过 ref 调用方法**
在执行 `step()` 后,需要调用 `run()` 来运行动画 ,否则动画会一直等待
`run()` 方法可以传入一个 `callback` 函数 ,会在所有动画执行完毕后回调
```javascript
this.$refs.ani.step({
translateX: '100px'
})
this.$refs.ani.run(()=>{
// console.log('动画执行完毕')
})
```
### 动画配置
动画配置 `init()``step()` 第二个参数配置相同 ,如果配置`step() `第二个参数,将会覆盖 `init()` 的配置
|属性名|值|必填|默认值|说明|平台差异|
|:-:|:-:|:-:|:-:|:-:|:-:|
|duration|Number|否|400|动画持续时间单位ms|-|
|timingFunction|String|否|"linear"|定义动画的效果|-|
|delay|Number|否|0|动画延迟时间,单位 ms|-|
|needLayout|Boolean|否|false |动画执行是否影响布局|仅 nvue 支持|
|transformOrigin|String |否|"center center"|设置 [transform-origin](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-origin)|-|
### timingFunction 属性说明
|值|说明|平台差异|
|:-:|:-:|:-:|
|linear|动画从头到尾的速度是相同的|-|
|ease|动画以低速开始,然后加快,在结束前变慢|-|
|ease-in| 动画以低速开始|-|
|ease-in-out| 动画以低速开始和结束|-|
|ease-out|动画以低速结束|-|
|step-start|动画第一帧就跳至结束状态直到结束|nvue不支持|
|step-end|动画一直保持开始状态,最后一帧跳到结束状态|nvue不支持|
```javascript
// init 配置
this.$refs.ani.init({
duration: 1000,
timingFunction:'ease',
delay:500,
transformOrigin:'left center'
})
// step 配置
this.$refs.ani.step({
translateX: '100px'
},{
duration: 1000,
timingFunction:'ease',
delay:500,
transformOrigin:'left center'
})
```
### 支持的动画
动画方法
如果同一个动画方法有多个值,多个值使用数组分隔
```javascript
this.$refs.ani.step({
width:'100px',
scale: [1.2,0.8],
})
```
**样式:**
|属性名|值|说明|平台差异|
|:-:|:-:|:-:|:-:|
|opacity|value|透明度,参数范围 0~1|-|
|backgroundColor|color|颜色值|-|
|width|length|长度值,如果传入 Number 则默认使用 px可传入其他自定义单位的长度值|-|
|height|length|长度值,如果传入 Number 则默认使用 px可传入其他自定义单位的长度值|-|
|top|length|长度值,如果传入 Number 则默认使用 px可传入其他自定义单位的长度值|nvue 不支持|
|left|length|长度值,如果传入 Number 则默认使用 px可传入其他自定义单位的长度值|nvue 不支持|
|bottom|length|长度值,如果传入 Number 则默认使用 px可传入其他自定义单位的长度值|nvue 不支持|
|right|length|长度值,如果传入 Number 则默认使用 px可传入其他自定义单位的长度值|nvue 不支持|
```javascript
this.$refs.ani.step({
opacity: 1,
backgroundColor: '#ff5a5f',
widht:'100px',
height:'50rpx',
})
```
**旋转:**
旋转属性的值不需要填写单位
|属性名|值|说明|平台差异 |
|:-:|:-:|:-:|:-:|
|rotate|deg|deg的范围-180~180从原点顺时针旋转一个deg角度 |-|
|rotateX|deg|deg的范围-180~180在X轴旋转一个deg角度 |-|
|rotateY|deg|deg的范围-180~180在Y轴旋转一个deg角度 |-|
|rotateZ|deg|deg的范围-180~180在Z轴旋转一个deg角度 |nvue不支持|
|rotate3d|x,y,z,deg| 同 [transform-function rotate3d](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate3d()) |nvue不支持|
```javascript
this.$refs.ani.step({
rotateX: 45,
rotateY: 45
})
```
**缩放:**
|属性名|值|说明|平台差异|
|:-:|:-:|:-: |:-:|
|scale|sx,[sy]|一个参数时表示在X轴、Y轴同时缩放sx倍数两个参数时表示在X轴缩放sx倍数在Y轴缩放sy倍数|-|
|scaleX|sx|在X轴缩放sx倍数|-|
|scaleY|sy|在Y轴缩放sy倍数|-|
|scaleZ|sz|在Z轴缩放sy倍数|nvue不支持|
|scale3d|sx,sy,sz|在X轴缩放sx倍数在Y轴缩放sy倍数在Z轴缩放sz倍数|nvue不支持|
```javascript
this.$refs.ani.step({
scale: [1.2,0.8]
})
```
**偏移:**
|属性名|值|说明|平台差异|
|:-:|:-:|:-:|:-:|
|translate|tx,[ty]|一个参数时表示在X轴偏移tx单位px两个参数时表示在X轴偏移tx在Y轴偏移ty单位px。|-|
|translateX|tx| 在X轴偏移tx单位px|-|
|translateY|ty| 在Y轴偏移tx单位px|-|
|translateZ|tz| 在Z轴偏移tx单位px|nvue不支持|
|translate3d|tx,ty,tz| 在X轴偏移tx在Y轴偏移ty在Z轴偏移tz单位px|nvue不支持|
```javascript
this.$refs.ani.step({
translateX: '100px'
})
```
## 组件示例
点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/transition/transition](https://hellouniapp.dcloud.net.cn/pages/extUI/transition/transition)
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-transition)
#### 如使用过程中有任何问题或者您对uni-ui有一些好的建议欢迎加入 uni-ui 交流群871950839

View File

@ -15,10 +15,33 @@ import store from '../store';
import {
pathToBase64
} from '@/plugin/image-tools/index.js';
import {
verifyPwd
} from '@/api/order.js';
// #ifdef APP-PLUS
import permision from "./permission.js"
// #endif
import {
errorReport
} from "@/api/user.js";
export default {
errorSave: function(a, b) {
errorReport({
route: a,
msg: b
})
},
// 是否设置密码
checkPassword: async function(e) {
e = e ? e : '';
return await verifyPwd({
withdrawal_pwd: e
});
},
/**
* 字符串截取
* @obj 传入的数据
@ -110,9 +133,9 @@ export default {
setTimeout(function() {
uni.redirectTo({
url: url,
fail(err) {
console.log("跳转失败", err);
}
fail(err) {
console.log("跳转失败", err);
}
})
}, endtime);
break;
@ -185,7 +208,7 @@ export default {
arr.push(text.slice(str, text.length));
return [strLength, arr, rows] // [处理文字的总字节长度,每行显示内容的数组,行数]
},
/**
/**
* 获取分享海报
* @param array arr2 海报素材
* @param string store_name 素材文字
@ -202,7 +225,7 @@ export default {
* 只能获取合法域名下的图片信息,本地调试无法获取
*
*/
uni.getImageInfo({
uni.getImageInfo({
src: arr2[0],
success: function(res) {
// console.log(res, 'getImageInfo')
@ -220,7 +243,8 @@ export default {
ctx.drawImage(arr2[2], cx, cy, d, d);
ctx.restore();
const CONTENT_ROW_LENGTH = 40;
let [contentLeng, contentArray, contentRows] = that.textByteLength(store_name, CONTENT_ROW_LENGTH);
let [contentLeng, contentArray, contentRows] = that.textByteLength(store_name,
CONTENT_ROW_LENGTH);
if (contentRows > 2) {
contentRows = 2;
let textArray = contentArray.slice(0, 2);
@ -280,36 +304,38 @@ export default {
* 只能获取合法域名下的图片信息,本地调试无法获取
*
*/
uni.getImageInfo({
uni.getImageInfo({
src: arr2[0],
success: function(res) {
// console.log(res, 'getImageInfo')
const WIDTH = res.width;
const HEIGHT = res.height;
ctx.drawImage(arr2[0], 0, 0, WIDTH, HEIGHT+50);
ctx.drawImage(arr2[0], 0, 0, WIDTH, HEIGHT + 50);
ctx.save();
let r = 90;
let d = r * 2;
let cx = 555;
let cy = 910;
let ux = 50;
let uy = 50;
let uy = 50;
ctx.arc(cx + r, cy + r, r, 0, 2 * Math.PI);
ctx.drawImage(arr2[3], 30, 30, 50, 50);
ctx.save();
ctx.drawImage(arr2[2], cx, cy-30, d-30, d-30);
ctx.drawImage(arr2[2], cx, cy - 30, d - 30, d - 30);
ctx.restore();
ctx.setTextAlign('left');
ctx.setFontSize(24);
ctx.setFillStyle('#282828');
ctx.fillText(site_name, r, 62);
const CONTENT_ROW_LENGTH = 26;
let [contentLeng, contentArray, contentRows] = that.textByteLength(store_name, CONTENT_ROW_LENGTH);
let [contentLeng, contentArray, contentRows] = that.textByteLength(store_name,
CONTENT_ROW_LENGTH);
if (contentRows > 2) {
contentRows = 2;
let textArray = contentArray.slice(0, 2);
textArray[textArray.length - 1] = textArray[textArray.length - 1].slice(0,textArray[textArray.length - 1].length-1)
textArray[textArray.length - 1] += '…';
textArray[textArray.length - 1] = textArray[textArray.length - 1].slice(0,
textArray[textArray.length - 1].length - 1)
textArray[textArray.length - 1] += '…';
contentArray = textArray;
}
ctx.setFontSize(32);
@ -323,18 +349,18 @@ export default {
ctx.setFontSize(26);
ctx.setFillStyle('#999999');
ctx.beginPath();
const textWidth = ctx.measureText(ot_price+'¥').width + 16; //检查字体的宽度
const textWidth = ctx.measureText(ot_price + '¥').width + 16; //检查字体的宽度
//绘制数字中间的矩形
ctx.setFillStyle('#999999');
ctx.rect(35, 1062,textWidth-10, 1);
ctx.rect(35, 1062, textWidth - 10, 1);
ctx.fill();
ctx.closePath();
ctx.fillText('¥' + ot_price, 35, 1030 + contentHh);
ctx.clip();
ctx.restore();
that.handleBorderRect(ctx, 30, 108, WIDTH-60, WIDTH-20, 12);
that.handleBorderRect(ctx, 30, 108, WIDTH - 60, WIDTH - 20, 12);
ctx.clip();
ctx.drawImage(arr2[1], 30, 108, WIDTH-60, WIDTH-20);
ctx.drawImage(arr2[1], 30, 108, WIDTH - 60, WIDTH - 20);
ctx.draw(true, function() {
uni.canvasToTempFilePath({
canvasId: 'myCanvas',
@ -378,7 +404,7 @@ export default {
* 只能获取合法域名下的图片信息,本地调试无法获取
*
*/
uni.getImageInfo({
uni.getImageInfo({
src: arr2[0],
success: function(res) {
const WIDTH = res.width;
@ -390,25 +416,26 @@ export default {
let ux = 50;
let uy = 700;
ctx.drawImage(arr2[0], 0, 0, WIDTH, HEIGHT);
ctx.drawImage(arr2[1], 32, 32, WIDTH-64, WIDTH-64);
ctx.drawImage(arr2[1], 32, 32, WIDTH - 64, WIDTH - 64);
ctx.strokeStyle = "#ffffff";
ctx.save();
ctx.arc(cx + r, cy + r, r, 0, 2 * Math.PI);
ctx.drawImage(arr2[2], 530, 760, d, d);
that.handleBorderRect(ctx, ux, uy, r, r, 45);
ctx.clip();
ctx.stockStyle ="#ffffff";
ctx.stockStyle = "#ffffff";
ctx.drawImage(arr2[3], ux, uy, r, r);
ctx.restore();
ctx.setTextAlign('left')
ctx.setFontSize(28);
ctx.setFillStyle('#282828');
ctx.fillText(nickname, r+60, 760);
ctx.fillText(nickname, r + 60, 760);
ctx.setTextAlign('left')
ctx.setFontSize(28);
ctx.setFillStyle('#282828');
const CONTENT_ROW_LENGTH = 25;
let [contentLeng, contentArray, contentRows] = that.textByteLength(content, CONTENT_ROW_LENGTH);
let [contentLeng, contentArray, contentRows] = that.textByteLength(content,
CONTENT_ROW_LENGTH);
if (contentRows > 2) {
contentRows = 2;
let textArray = contentArray.slice(0, 2);
@ -416,11 +443,11 @@ export default {
contentArray = textArray;
}
ctx.setTextAlign('left');
ctx.font = 'bold 32px Arial';
ctx.font = 'bold 32px Arial';
let contentHh = 32 * 1.3;
for (let m = 0; m < contentArray.length; m++) {
ctx.fillText(contentArray[m], 55, 850 + contentHh * m);
}
}
ctx.draw(true, function() {
uni.canvasToTempFilePath({
canvasId: 'myCanvas',
@ -448,36 +475,36 @@ export default {
})
},
/**
* 图片圆角设置
* @param string x x轴位置
* @param string y y轴位置
* @param string w 图片宽
* @param string y 图片高
* @param string r 圆角值
*/
handleBorderRect(ctx, x, y, w, h, r) {
ctx.beginPath();
// 左上角
ctx.arc(x + r, y + r, r, Math.PI, 1.5 * Math.PI);
ctx.moveTo(x + r, y);
ctx.lineTo(x + w - r, y);
ctx.lineTo(x + w, y + r);
// 右上角
ctx.arc(x + w - r, y + r, r, 1.5 * Math.PI, 2 * Math.PI);
ctx.lineTo(x + w, y + h - r);
ctx.lineTo(x + w - r, y + h);
// 右下角
ctx.arc(x + w - r, y + h - r, r, 0, 0.5 * Math.PI);
ctx.lineTo(x + r, y + h);
ctx.lineTo(x, y + h - r);
// 左下角
ctx.arc(x + r, y + h - r, r, 0.5 * Math.PI, Math.PI);
ctx.lineTo(x, y + r);
ctx.lineTo(x + r, y);
ctx.fill();
ctx.closePath();
},
* 图片圆角设置
* @param string x x轴位置
* @param string y y轴位置
* @param string w 图片宽
* @param string y 图片高
* @param string r 圆角值
*/
handleBorderRect(ctx, x, y, w, h, r) {
ctx.beginPath();
// 左上角
ctx.arc(x + r, y + r, r, Math.PI, 1.5 * Math.PI);
ctx.moveTo(x + r, y);
ctx.lineTo(x + w - r, y);
ctx.lineTo(x + w, y + r);
// 右上角
ctx.arc(x + w - r, y + r, r, 1.5 * Math.PI, 2 * Math.PI);
ctx.lineTo(x + w, y + h - r);
ctx.lineTo(x + w - r, y + h);
// 右下角
ctx.arc(x + w - r, y + h - r, r, 0, 0.5 * Math.PI);
ctx.lineTo(x + r, y + h);
ctx.lineTo(x, y + h - r);
// 左下角
ctx.arc(x + r, y + h - r, r, 0.5 * Math.PI, Math.PI);
ctx.lineTo(x, y + r);
ctx.lineTo(x + r, y);
ctx.fill();
ctx.closePath();
},
/**
* 用户信息分享海报
* @param array arr2 海报素材 1背景 0二维码
@ -528,7 +555,7 @@ export default {
}
ctx.fillText(sitename, w * markx, h * marky);
ctx.save();
ctx.draw(false,setTimeout(()=>{
ctx.draw(false, setTimeout(() => {
uni.canvasToTempFilePath({
canvasId: 'myCanvas' + index,
fileType: 'png',
@ -540,10 +567,10 @@ export default {
fail: function(err) {
// console.log(err)
uni.hideLoading();
}
})
},1000))
}, 1000))
},
fail: function(err) {
@ -624,7 +651,7 @@ export default {
}
})
},
/**
/**
* 小程序头像获取上传
* @param uploadUrl 上传接口地址
* @param filePath 上传文件路径
@ -633,7 +660,7 @@ export default {
*/
uploadImgs(uploadUrl, filePath, successCallback, errorCallback) {
let that = this;
let inputName = 'pics';
let inputName = 'pics';
uni.uploadFile({
url: HTTP_REQUEST_URL + '/api/' + uploadUrl + '/' + inputName,
filePath: filePath,
@ -688,8 +715,8 @@ export default {
},
getNowUrl: function() {
const pages = getCurrentPages(),
page = pages[pages.length - 1],
query = this.serialize(page.options || {});
page = pages[pages.length - 1],
query = this.serialize(page.options || {});
return page.route + (query ? '?' + query : '');
},
/**
@ -923,4 +950,4 @@ export default {
return status;
},
}
}
}