Merge remote-tracking branch 'origin/feature/mall_product' into feature/mall_product

pull/2/head
小小张 2023-05-23 17:15:28 +08:00
commit 07de47d308
41 changed files with 9870 additions and 9494 deletions

20
builds/Dockerfile-pro Normal file
View File

@ -0,0 +1,20 @@
FROM registry.cn-hangzhou.aliyuncs.com/lrh-public/openjdk:8u222-jre-up
LABEL Author="axzsd" \
Email="atva725@qq.com" \
Description="创盈支付服务端"
ENV SPRING_PROFILES_ACTIVE="prod"
ENV JAVA_OPTIONS "-Xms4000m -Xmx4096m \
-XX:+HeapDumpOnOutOfMemoryError \
-Dfile.encoding=UTF-8 \
-Djava.awt.headless=true \
-Dsun.net.client.defaultConnectTimeout=10000 \
-Dsun.net.client.defaultReadTimeout=30000"
WORKDIR /work/projects/yudao-server
COPY yudao-server/target/yudao-server.jar /opt/app.jar
EXPOSE 48080
ENTRYPOINT exec java $JAVA_OPTIONS -jar -Dspring.profiles.active=${SPRING_PROFILES_ACTIVE} /opt/app.jar

View File

@ -0,0 +1,28 @@
version: "3.9"
services:
yudao-server:
image: ${IMAGE_VERSION}
restart: always
privileged: true
container_name: yudao-server
environment:
TZ: Asia/Shanghai
SPRING_PROFILES_ACTIVE: prod
# volumes:
# - /opt/logs/cyywl:/work/projects/yudao-server
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000
ports:
- "48080:48080"
deploy:
resources:
limits:
memory: 4096MB
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:48080/actuator/health"]
timeout: 30s
interval: 45s
retries: 3

View File

@ -1,9 +1,11 @@
package cn.iocoder.yudao.module.shop.response.order;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
@ -85,6 +87,8 @@ public class StoreOrderDetailInfoResponse implements Serializable {
private String payType;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@Schema(description = "订单状态0待发货1待收货2已收货待评价3已完成")

View File

@ -52,6 +52,8 @@ import cn.iocoder.yudao.module.shop.utils.RedisUtil;
import cn.iocoder.yudao.module.shop.vo.order.LogisticsResultVo;
import cn.iocoder.yudao.module.shop.vo.order.StoreDateRangeSqlPram;
import cn.iocoder.yudao.module.shop.vo.order.StoreOrderInfoOldVo;
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
import com.alipay.api.AlipayApiException;
import com.alipay.api.internal.util.AlipaySignature;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@ -147,6 +149,8 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
@Autowired
private WxMpService wxMpService;
private DeptApi deptApi;
/**
* PC
*
@ -1360,6 +1364,12 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
private RechargeOrderDO initializeOrder(OrderContentRequest request, String code, MemberUserRespDTO user, PromoterDTO promoterDTO) {
Long tenantId = TenantContextHolder.getTenantId();
Long deptId = promoterDTO.getDeptId();
if(deptId==null){
DeptRespDTO deptRespDTO = deptApi.findParentDept(tenantId);
deptId = deptRespDTO.getId();
}
RechargeOrderDO orderDO = new RechargeOrderDO();
List<OrderContentRequest.OrderInfo> orderInfos = request.getOrderInfos();
orderDO.setOrderId(code);

View File

@ -107,21 +107,16 @@ public class RechargeGearServiceImpl implements RechargeGearService {
List<RechargeGearDO> rechargeGearDOS = rechargeGearMapper.selectList(Wrappers.<RechargeGearDO>lambdaQuery()
.eq(RechargeGearDO::getDeleted, 0));
List<RechargeGearRespVO> rechargeGearRespVOS = RechargeGearConvert.INSTANCE.convertList(rechargeGearDOS);
RechargeOrderDO orderDO = orderMapper.selectOne(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getUid, loginUser.getId())
.eq(RechargeOrderDO::getPaid,1)
.last("LIMIT 1"));
if (Objects.nonNull(orderDO)) {
List<PhoneRecordDO> infoDOS = phoneRecordMapper.selectList(Wrappers.<PhoneRecordDO>lambdaQuery().eq(PhoneRecordDO::getRechargeOrderId, orderDO.getId()));
Map<Long, List<PhoneRecordDO>> collect = infoDOS.stream().collect(Collectors.groupingBy(PhoneRecordDO::getRechargeGearId));
rechargeGearRespVOS.forEach(vo -> {
List<PhoneRecordDO> infoDOS1 = collect.get(vo.getId());
if (!CollectionUtils.isEmpty(infoDOS1)) {
vo.setIsExist("1");
} else {
vo.setIsExist("0");
}
});
}
List<PhoneRecordDO> infoDOS = phoneRecordMapper.selectList(Wrappers.<PhoneRecordDO>lambdaQuery().eq(PhoneRecordDO::getUserId, loginUser.getId()));
Map<Long, List<PhoneRecordDO>> collect = infoDOS.stream().collect(Collectors.groupingBy(PhoneRecordDO::getRechargeGearId));
rechargeGearRespVOS.forEach(vo -> {
List<PhoneRecordDO> infoDOS1 = collect.get(vo.getId());
if (!CollectionUtils.isEmpty(infoDOS1)) {
vo.setIsExist("1");
} else {
vo.setIsExist("0");
}
});
return rechargeGearRespVOS;
}
@ -130,21 +125,16 @@ public class RechargeGearServiceImpl implements RechargeGearService {
List<RechargeGearDO> rechargeGearDOS = rechargeGearMapper.selectList(Wrappers.<RechargeGearDO>lambdaQuery()
.eq(RechargeGearDO::getDeleted, 0));
List<RechargeGearRespVO> rechargeGearRespVOS = RechargeGearConvert.INSTANCE.convertList(rechargeGearDOS);
RechargeOrderDO orderDO = orderMapper.selectOne(Wrappers.<RechargeOrderDO>lambdaQuery().eq(RechargeOrderDO::getUserPhone, phone)
.eq(RechargeOrderDO::getPaid,1)
.last("LIMIT 1"));
if (Objects.nonNull(orderDO)) {
List<PhoneRecordDO> infoDOS = phoneRecordMapper.selectList(Wrappers.<PhoneRecordDO>lambdaQuery().eq(PhoneRecordDO::getRechargeOrderId, orderDO.getId()));
Map<Long, List<PhoneRecordDO>> collect = infoDOS.stream().collect(Collectors.groupingBy(PhoneRecordDO::getRechargeGearId));
rechargeGearRespVOS.forEach(vo -> {
List<PhoneRecordDO> infoDOS1 = collect.get(vo.getId());
if (!CollectionUtils.isEmpty(infoDOS1)) {
vo.setIsExist("1");
} else {
vo.setIsExist("0");
}
});
}
List<PhoneRecordDO> infoDOS = phoneRecordMapper.selectList(Wrappers.<PhoneRecordDO>lambdaQuery().eq(PhoneRecordDO::getPhone, phone));
Map<Long, List<PhoneRecordDO>> collect = infoDOS.stream().collect(Collectors.groupingBy(PhoneRecordDO::getRechargeGearId));
rechargeGearRespVOS.forEach(vo -> {
List<PhoneRecordDO> infoDOS1 = collect.get(vo.getId());
if (!CollectionUtils.isEmpty(infoDOS1)) {
vo.setIsExist("1");
} else {
vo.setIsExist("0");
}
});
return rechargeGearRespVOS;
}

View File

@ -33,6 +33,7 @@
left join system_dept d on d.id = a.dept_id
<include refid="baseWhere">
</include>
order by a.pay_time desc
</select>
<select id="findListPage" resultType="cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.RechargeOrderRespVO">
select

View File

@ -116,7 +116,7 @@ public class AppUserController {
List<UserSpreadBannerVO> list = new ArrayList<>();
UserSpreadBannerVO userSpreadBannerVO = new UserSpreadBannerVO();
userSpreadBannerVO.setId(1);
userSpreadBannerVO.setPic("http://192.168.1.147:48080/admin-api/infra/file/4/get/431efea27162d536d35f7b3c0b844ede98a6ba58f4fd72ac7181e7ee5ebae77a.jpg");
userSpreadBannerVO.setPic("http://image.cyywl.top/431efea27162d536d35f7b3c0b844ede98a6ba58f4fd72ac7181e7ee5ebae77a.jpg");
userSpreadBannerVO.setTitle("推广背景图");
list.add(userSpreadBannerVO);
return CommonResult.success(list);

View File

@ -48,6 +48,18 @@ public interface DeptApi {
*/
void validateDeptList(Collection<Long> ids);
/**
* <pre>
* <b>findParentDept</b>
* <b>Description:</b>
* <b>@author:</b> zenghuapei
* <b>@date:</b> 2023/5/23 09:38
* @param :
* @return
* </pre>
*/
DeptRespDTO findParentDept(Long tenantId);
/**
* Map
*

View File

@ -38,6 +38,22 @@ public class DeptApiImpl implements DeptApi {
List<DeptDO> depts = deptService.getDeptList(new DeptListReqVO());
return DeptConvert.INSTANCE.convertList03(depts);
}
/**
* <pre>
* <b>findParentDept</b>
* <b>Description:</b>
* <b>@author:</b> zenghuapei
* <b>@date:</b> 2023/5/23 09:38
* @return
* </pre>
*/
@Override
public DeptRespDTO findParentDept(Long tenantId) {
DeptDO deptDO = deptService.findParentDept(tenantId );
return DeptConvert.INSTANCE.convert03(deptDO);
}
@Override
public void validateDeptList(Collection<Long> ids) {
deptService.validateDeptList(ids);

View File

@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.system.service.dept;
import cn.hutool.core.collection.CollUtil;
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptCreateReqVO;
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptListReqVO;
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptUpdateReqVO;
@ -54,6 +55,18 @@ public interface DeptService {
*/
List<DeptDO> getDeptList(DeptListReqVO reqVO);
/**
* <pre>
* <b>findParentDept</b>
* <b>Description:</b>
* <b>@author:</b> zenghuapei
* <b>@date:</b> 2023/5/23 09:40
* @param tenantId:
* @return
* </pre>
*/
DeptDO findParentDept(Long tenantId);
/**
*
*

View File

@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils;
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptCreateReqVO;
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptListReqVO;
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptUpdateReqVO;
@ -13,6 +14,7 @@ import cn.iocoder.yudao.module.system.dal.mysql.dept.DeptMapper;
import cn.iocoder.yudao.module.system.enums.dept.DeptIdEnum;
import cn.iocoder.yudao.module.system.mq.producer.dept.DeptProducer;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.Multimap;
@ -152,6 +154,26 @@ public class DeptServiceImpl implements DeptService {
return deptMapper.selectList(reqVO);
}
/**
* <pre>
* <b>findParentDept</b>
* <b>Description:</b>
* <b>@author:</b> zenghuapei
* <b>@date:</b> 2023/5/23 09:40
* @param tenantId :
* @return
* </pre>
*/
@Override
public DeptDO findParentDept(Long tenantId) {
List<DeptDO> deptDOs = deptMapper.selectList(Wrappers.lambdaQuery(DeptDO.class).eq(DeptDO::getParentId,DeptIdEnum.ROOT.getId()).eq(DeptDO::getTenantId,tenantId));
if(deptDOs!=null && deptDOs.size() > 0){
return deptDOs.get(0);
}
return null;
}
@Override
public List<DeptDO> getDeptListByParentIdFromCache(Long parentId, boolean recursive) {
if (parentId == null) {

View File

@ -151,8 +151,8 @@ wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-sta
database: 16 # 数据库索引
password: cyywl123.. # 密码,建议生产环境开启
# 公众号配置(必填)
app-id: wx041349c6f39b268b
secret: 5abee519483bc9f8cb37ce280e814bd0
app-id: wx7e503d9cded34c07
secret: 31883ca14e2cbac8610d30f8f945ee47
# 存储配置,解决 AccessToken 的跨节点的共享
config-storage:
type: RedisTemplate # 采用 RedisTemplate 操作 Redis会自动从 Spring 中获取
@ -168,16 +168,16 @@ wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-sta
pay:
one:
enabled: true
app-id: wxb1826c88da21d81e
mch-id: 1641993417
app-id: wx7e503d9cded34c07
mch-id: 1641073271
mch-key: qdn2I7Cmx4JeiKOt2CDjiu6UHgLTsOsM
apiv3-key: cyywl666666cyywl888888cyywl66666
apiv3-key: cyywl123456cyywl654321cyywl12345
private-cert-path: classpath:/1/apiclient_cert.pem
private-key-path: classpath:/1/apiclient_key.pem
key-path: classpath:/1/apiclient_cert.p12
cert-serial-no: 58FDB503F92B6C0E258C9940BB726C2BF6022E56
notify-url: http://api.cyywl.top/app-api/pay/wxpay/pay_notify
refund-notify-url: http://api.cyywl.top/app-api/pay/wxpay/refund_notify
cert-serial-no: 7F76A4ADC52CA0B440C4E5698F8A5CD1633A0FCD
notify-url: http://api.cyywl.top/admin-api/notify/wxpay/pay_notify
refund-notify-url: http://api.cyywl.top/admin-api/notify/wxpay/refund_notify
two:
enabled: true
app-id: wxb1826c88da21d81e

View File

@ -5,8 +5,8 @@ ENV = 'development'
VUE_APP_TITLE = 创盈商户管理系统
# 芋道管理系统/开发环境
VUE_APP_BASE_API = 'https://cmx.bskies.cc:8000/cyywl-api'
#VUE_APP_BASE_API = 'http://192.168.1.147:48080'
#VUE_APP_BASE_API = 'https://cmx.bskies.cc:8000/cyywl-api'
VUE_APP_BASE_API = 'http://192.168.1.188:48080'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -1,5 +1,15 @@
module.exports = {
/**
* 推广链接域名
*/
spreadDomain: 'http://h5.cyywl.top',
/**
* 推广码生成访问H5链接地址
*/
spreadLink: '/pages/member_application/index',
/**
* 侧边栏主题 深色主题theme-dark浅色主题theme-light
*/

View File

@ -204,6 +204,7 @@ import {
getTenantPage,
exportTenantExcel
} from '@/api/system/tenant';
import config from '@/settings'
import QRCode from 'qrcode'
import {CommonStatusEnum} from '@/utils/constants'
import {getTenantPackageList} from '@/api/system/tenantPackage';
@ -345,8 +346,7 @@ export default {
this.resetForm('form');
},
handleQRCode(row) {
const baseUrl = 'http://yuxy.perrymake.com'
const url =`${baseUrl}/pages/member_application/index?redirectUrl=${baseUrl}&tenantId=${row.id}`
const url =`${config.spreadDomain}${config.spreadLink}?redirectUrl=${config.spreadDomain}&tenantId=${row.id}`
QRCode.toCanvas(document.getElementById(`id-${row.id}`), url, {
scale: 2
}, function (error) {

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,12 @@ export function memberOrderInfo(){
return request.get('api/order/member/memberOrderInfo', {})
}
/**
* 根据手机号查询档次信息
*/
export function memberByHomeGradeInfo(phone){
return request.get(`api/order/member/memberByHomeGradeInfo?phone=${phone}`, {})
}
/**
* 会员头部信息
*/

View File

@ -3,7 +3,7 @@ import request from "@/utils/request.js";
/**
* 获取产品详情
* @param int id
*
*
*/
export function getProductDetail(id, type) {
return request.get('product/detail/' + id + '?type=' + type, {}, {
@ -59,7 +59,7 @@ export function collectDelete(ids) {
/**
* 购车添加
*
*
*/
export function postCartAdd(data) {
return request.post('cart/save', data, {});
@ -67,10 +67,10 @@ export function postCartAdd(data) {
/**
* 获取分类列表
*
*
*/
export function getCategoryList() {
return request.get('category', {}, {
return request.get('front/category', {}, {
noAuth: true
});
}
@ -80,17 +80,17 @@ export function getCategoryList() {
* @param object data
*/
export function getProductslist(data) {
return request.get('products', data, {
return request.get('front/products', data, {
noAuth: true
});
}
/**
* 获取推荐产品
*
*
*/
export function getProductHot(page, limit) {
return request.get("product/hot", {
return request.get("front/product/hot", {
page: page === undefined ? 1 : page,
limit: limit === undefined ? 4 : limit
}, {
@ -99,9 +99,9 @@ export function getProductHot(page, limit) {
}
/**
* 批量收藏
*
*
* @param object id 产品编号 join(',') 切割成字符串
* @param string category
* @param string category
*/
export function collectAll(id, category) {
return request.post('collect/all', {
@ -112,8 +112,8 @@ export function collectAll(id, category) {
/**
* 首页产品的轮播图和产品信息
* @param int type
*
* @param int type
*
*/
export function getGroomList(type, data) {
return request.get('index/product/' + type, data, {
@ -133,7 +133,7 @@ export function getCollectUserList(data) {
* 获取产品评论
* @param int id
* @param object data
*
*
*/
export function getReplyList(id, data) {
return request.get('reply/list/' + id, data,{
@ -153,7 +153,7 @@ export function getReplyConfig(id) {
/**
* 获取搜索关键字获取
*
*
*/
export function getSearchKeyword() {
return request.get('search/keyword', {}, {
@ -182,10 +182,10 @@ export function getProductGood() {
* 详情页产品评论
* @param int id
* @param object data
*
*
*/
export function getReplyProduct(id) {
return request.get('reply/product/' + id, {
noAuth: true
})
}
}

View File

@ -1,14 +1,16 @@
<template>
<view class="time" :style="justifyLeft">
<text class="" v-if="tipText">{{ tipText }}</text>
<text class="styleAll p6" v-if="isDay === true" :style="{background:bgColor.bgColor,color:bgColor.Color}">{{ day }}{{bgColor.isDay?'':''}}</text>
<text class="timeTxt" v-if="dayText" :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ dayText }}</text>
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ hour }}</text>
<text class="timeTxt" v-if="hourText" :class='isCol?"whit":""' :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ hourText }}</text>
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ minute }}</text>
<text class="timeTxt" v-if="minuteText" :class='isCol?"whit":""' :style="{width:bgColor.timeTxtwidth,color:bgColor.bgColor}">{{ minuteText }}</text>
<text class="styleAll" :class='isCol?"timeCol":""' :style="{background:bgColor.bgColor,color:bgColor.Color,width:bgColor.width}">{{ second }}</text>
<text class="timeTxt" v-if="secondText">{{ secondText }}</text>
<text class="red" v-if="tipText">{{ tipText }}</text>
<text class="styleAll" :style="'background-color:'+ bgColor +';color:'+ colors +';'" v-if="isDay === true">{{ day }}</text>
<text class="timeTxt red" v-if="dayText">{{ dayText }}</text>
<template v-if="isShowHour">
<text class="styleAll" :style="'background-color:'+ bgColor +';color:'+ colors +';'">{{ hour }}</text>
<text class="timeTxt red" v-if="hourText">{{ hourText }}</text>
</template>
<text class="styleAll" :style="'background-color:'+ bgColor +';color:'+ colors +';'">{{ minute }}</text>
<text class="timeTxt red" v-if="minuteText">{{ minuteText }}</text>
<text class="styleAll" :style="'background-color:'+ bgColor +';color:'+ colors +';'">{{ second }}</text>
<text class="timeTxt red" v-if="secondText">{{ secondText }}</text>
</view>
</template>
@ -49,13 +51,17 @@
type: Boolean,
default: true
},
isCol: {
type: Boolean,
default: false
isShowHour: {
type: Boolean,
default: true
},
bgColor:{
type: String,
default: ""
},
bgColor: {
type: Object,
default: null
colors:{
type: String,
default: ""
}
},
data: function() {
@ -116,47 +122,13 @@
};
</script>
<style scoped>
.p6{
padding: 0 8rpx;
}
.styleAll{
/* color: #fff; */
font-size: 24rpx;
height: 36rpx;
line-height: 36rpx;
border-radius: 6rpx;
text-align: center;
/* padding: 0 6rpx; */
}
.timeTxt{
text-align: center;
/* width: 16rpx; */
height: 36rpx;
line-height: 36rpx;
display: inline-block;
}
.whit{
color: #fff !important;
}
.time {
<style>
.time{
display: flex;
justify-content: center;
}
.red {
color: #fc4141;
.red{
color: var(--view-theme);
margin: 0 4rpx;
}
.timeCol {
/* width: 40rpx;
height: 40rpx;
line-height: 40rpx;
text-align:center;
border-radius: 6px;
background: #fff;
font-size: 24rpx; */
color: #E93323;
}
</style>

View File

@ -0,0 +1,160 @@
<template>
<view class="number-box">
<block v-for="(myIndex, index) in indexArr" :key="index">
<swiper class="swiper" vertical="true" :current="myIndex" circular="true"
v-bind:style="{color:color,width:myIndex == 10 ? '14rpx' : myIndex == 1 ? '22rpx' : width+'rpx',height:height+'rpx',lineHeight:fontSize+'rpx',fontSize:fontSize+'rpx',fontWeight: fontWeight}">
<swiper-item>
<view class="swiper-item">0</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">1</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">2</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">3</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">4</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">5</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">6</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">7</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">8</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">9</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">.</view>
</swiper-item>
</swiper>
</block>
</view>
</template>
<script>
export default {
props: {
num: [String, Number],
color: {
type: String,
default: '#000000'
},
width: {
type: String,
default: '30'
},
height: {
type: String,
default: '30'
},
fontSize: {
type: String,
default: '30'
},
fontWeight: {
type: [String, Number],
default: 500
}
},
data() {
return {
indexArr: []
};
},
created() {
let {
num
} = this;
let arr = new Array(num.toString().length);
arr.fill(0);
this.indexArr = arr;
},
watch: {
num: function(val, oldVal) {
//
let arr = Array.prototype.slice.apply(this.indexArr);
let newLen = val.toString().length;
let oldLen = oldVal.toString().length;
if (newLen > oldLen) {
for (let i = 0; i < newLen - oldLen; i++) {
arr.push(0);
}
this.indexArr = arr;
}
if (newLen < oldLen) {
for (let i = 0; i < oldLen - newLen; i++) {
arr.pop();
}
this.indexArr = arr;
}
this.numChange(val);
}
},
mounted() {
//app
this._time = setTimeout(() => {
this.numChange(this.num);
clearTimeout(this._time);
}, 50);
},
methods: {
/**
* 数字改变
* @value 数字
*/
numChange(num) {
this.$nextTick(() => {
let {
indexArr
} = this;
let copyIndexArr = Array.prototype.slice.apply(indexArr);
let _num = num.toString();
for (let i = 0; i < _num.length; i++) {
if (_num[i] === '.') {
copyIndexArr[i] = 10;
} else {
copyIndexArr[i] = Number(_num[i]);
}
}
this.indexArr = copyIndexArr;
})
}
}
};
</script>
<style lang="scss">
.number-box {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.swiper {
position: relative;
// line-height: 30upx;
// width: 30upx;
// height: 30upx;
// font-size: 30upx;
// background: red;
}
.swiper:after {
content: '';
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
</style>

View File

@ -20,9 +20,12 @@
</view>
</view>
<view class="mask" @click='close' v-if="pay_close"></view>
<button style="cursor: pointer;display:none;" class="clipboard"
:data-clipboard-text="alipayLink">
</button>
<!-- 支付宝支付界面 -->
<u-modal :show="alipayShow" title="支付宝支付" @confirm="handleConfirm">
<view class="slot-content">
<view class="slot-content">
<rich-text :nodes="alipayForm"></rich-text>
</view>
</u-modal>
@ -41,6 +44,7 @@
import {
mapGetters
} from "vuex";
import Clipboard from 'clipboard'
export default {
props: {
payMode: {
@ -65,35 +69,39 @@
data() {
return {
alipayShow: false,
alipayForm:`链接已复制,请到外部浏览器完成支付`
alipayForm: `链接已复制,请到外部浏览器完成支付`,
alipayLink: ''
};
},
computed: mapGetters(['systemPlatform', 'openId']),
mounted() {
new Clipboard('.clipboard')
},
methods: {
handleConfirm(){
handleConfirm() {
this.alipayShow = false
window.location.reload()
},
//
_copy(context) {
//
let oInput = document.createElement('input');
//
oInput.value = context;
//
document.body.appendChild(oInput);
//
oInput.select();
//
document.execCommand('Copy');
//
this.$util.Tips({
title: '复制链接成功'
})
this.alipayShow = true
//
oInput.remove();
},
_copy(context) {
//
let oInput = document.createElement('input');
//
oInput.value = context;
//
document.body.appendChild(oInput);
//
oInput.select();
//
document.execCommand('Copy');
//
this.$util.Tips({
title: '复制链接成功'
})
this.alipayShow = true
//
oInput.remove();
},
close: function() {
this.$emit('onChangeFun', {
action: 'payClose'
@ -139,12 +147,13 @@
title: '支付中',
mask: true
});
if(paytype === 'WXPAY' && !that.openId) {
if(paytype === 'WXPAY' && that.openId) {
that.payInfo.openid = that.openId
} else if(paytype === 'WXPAY' && !that.openId){
return that.$util.Tips({
title: '请在微信客户端进行支付操作'
});
} else {
that.payInfo.openid = that.openId
}
memberTopUp({
...that.payInfo,
@ -158,8 +167,12 @@
break;
case 'ALIPAY':
uni.hideLoading();
this._copy(jsConfig.body)
this.alipayShow = true
this.alipayLink = jsConfig.body
// this._copy(jsConfig.body)
setTimeout(()=>{
document.querySelector(".clipboard").click();
this.alipayShow = true
}, 500)
// const div = document.createElement('div')
// /* data.content */
// div.innerHTML = jsConfig.body

View File

@ -1,12 +1,14 @@
let domain = 'http://yuxy.perrymake.com'
// let domain = 'http://yuxy.perrymake.com'
let domain = 'http://192.168.1.188:48080'
module.exports = {
// 请求域名 格式: https://您的域名
// #ifdef MP
HTTP_REQUEST_URL: domain,
// #endif
HTTP_ADMIN_URL:'http://yuxy.perrymake.com', //PC后台的API请求地址上传图片用
// HTTP_ADMIN_URL:'http://yuxy.perrymake.com', //PC后台的API请求地址上传图片用
HTTP_ADMIN_URL:'http://192.168.1.188:48080', //PC后台的API请求地址上传图片用
// #ifdef H5
//H5接口是浏览器地址
// HTTP_REQUEST_URL: window.location.protocol+"//"+window.location.host,
@ -25,5 +27,9 @@ module.exports = {
// 缓存时间 0 永久
EXPIRE:0,
//分页最多显示条数
LIMIT: 10
LIMIT: 10,
// 推广链接域名
SPREAD_DOMAIN: 'http://h5.cyywl.top',
// 推广码生成访问H5链接地址
SPREAD_LINK: '/pages/member_application/index',
};

View File

@ -1,447 +1,84 @@
{
"name": "yudao-ui-app",
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
"lockfileVersion": 1,
"packages": {
"": {
"name": "yudao-ui-app",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"clipboard": "^2.0.11"
}
},
"node_modules/clipboard": {
"version": "2.0.11",
"resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
"dependencies": {
"good-listener": "^1.2.2",
"select": "^1.1.2",
"tiny-emitter": "^2.0.0"
}
},
"node_modules/delegate": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
},
"node_modules/good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
"dependencies": {
"delegate": "^3.1.2"
}
},
"node_modules/select": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz",
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
},
"node_modules/tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
}
},
"dependencies": {
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
},
"babel-code-frame": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
"clipboard": {
"version": "2.0.11",
"resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
"requires": {
"chalk": "^1.1.3",
"esutils": "^2.0.2",
"js-tokens": "^3.0.2"
"good-listener": "^1.2.2",
"select": "^1.1.2",
"tiny-emitter": "^2.0.0"
}
},
"babel-core": {
"version": "6.26.3",
"resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz",
"integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==",
"delegate": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
},
"good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
"requires": {
"babel-code-frame": "^6.26.0",
"babel-generator": "^6.26.0",
"babel-helpers": "^6.24.1",
"babel-messages": "^6.23.0",
"babel-register": "^6.26.0",
"babel-runtime": "^6.26.0",
"babel-template": "^6.26.0",
"babel-traverse": "^6.26.0",
"babel-types": "^6.26.0",
"babylon": "^6.18.0",
"convert-source-map": "^1.5.1",
"debug": "^2.6.9",
"json5": "^0.5.1",
"lodash": "^4.17.4",
"minimatch": "^3.0.4",
"path-is-absolute": "^1.0.1",
"private": "^0.1.8",
"slash": "^1.0.0",
"source-map": "^0.5.7"
"delegate": "^3.1.2"
}
},
"babel-generator": {
"version": "6.26.1",
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz",
"integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==",
"requires": {
"babel-messages": "^6.23.0",
"babel-runtime": "^6.26.0",
"babel-types": "^6.26.0",
"detect-indent": "^4.0.0",
"jsesc": "^1.3.0",
"lodash": "^4.17.4",
"source-map": "^0.5.7",
"trim-right": "^1.0.1"
}
"select": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz",
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
},
"babel-helpers": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
"integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
"requires": {
"babel-runtime": "^6.22.0",
"babel-template": "^6.24.1"
}
},
"babel-messages": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
"requires": {
"babel-runtime": "^6.22.0"
}
},
"babel-register": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz",
"integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=",
"requires": {
"babel-core": "^6.26.0",
"babel-runtime": "^6.26.0",
"core-js": "^2.5.0",
"home-or-tmp": "^2.0.0",
"lodash": "^4.17.4",
"mkdirp": "^0.5.1",
"source-map-support": "^0.4.15"
}
},
"babel-runtime": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"requires": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
}
},
"babel-template": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
"integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
"requires": {
"babel-runtime": "^6.26.0",
"babel-traverse": "^6.26.0",
"babel-types": "^6.26.0",
"babylon": "^6.18.0",
"lodash": "^4.17.4"
}
},
"babel-traverse": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
"requires": {
"babel-code-frame": "^6.26.0",
"babel-messages": "^6.23.0",
"babel-runtime": "^6.26.0",
"babel-types": "^6.26.0",
"babylon": "^6.18.0",
"debug": "^2.6.8",
"globals": "^9.18.0",
"invariant": "^2.2.2",
"lodash": "^4.17.4"
}
},
"babel-types": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
"requires": {
"babel-runtime": "^6.26.0",
"esutils": "^2.0.2",
"lodash": "^4.17.4",
"to-fast-properties": "^1.0.3"
}
},
"babylon": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": {
"ansi-styles": "^2.2.1",
"escape-string-regexp": "^1.0.2",
"has-ansi": "^2.0.0",
"strip-ansi": "^3.0.0",
"supports-color": "^2.0.0"
}
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"convert-source-map": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
"integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
"requires": {
"safe-buffer": "~5.1.1"
}
},
"core-image-xhr": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-image-xhr/-/core-image-xhr-1.0.3.tgz",
"integrity": "sha1-khHXtcQSGa9atpuThMoqR9VytHY="
},
"core-js": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
},
"daycaca": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/daycaca/-/daycaca-1.0.11.tgz",
"integrity": "sha512-2SJTpnpmxUGVWbFPTRhaZLvisCD7bYjvuFpLAhjfAAvtnBb26dAqIqaZ9Jq8yvSlugpEGY+v/YXHXGP3paVV9A=="
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"detect-indent": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
"integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
"requires": {
"repeating": "^2.0.0"
}
},
"dom7": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/dom7/-/dom7-2.1.3.tgz",
"integrity": "sha512-QTxHHDox+M6ZFz1zHPAHZKI3JOHY5iY4i9BK2uctlggxKQwRhO3q3HHFq1BKsT25Bm/ySSj70K6Wk/G4bs9rMQ==",
"requires": {
"ssr-window": "^1.0.1"
}
},
"emoji-awesome": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/emoji-awesome/-/emoji-awesome-0.0.2.tgz",
"integrity": "sha512-ggortYTr4+f4Jqp/R3vV9FAec+wRkIyRM458LUrv81mKQSKIJW9+xDlbqHsUpMeNKCLG45RsbbCyprrOoGZ6UQ=="
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"esutils": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
},
"globals": {
"version": "9.18.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ=="
},
"has-ansi": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"requires": {
"ansi-regex": "^2.0.0"
}
},
"home-or-tmp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
"integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=",
"requires": {
"os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.1"
}
},
"invariant": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
"requires": {
"loose-envify": "^1.0.0"
}
},
"is-finite": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz",
"integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w=="
},
"js-tokens": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
},
"jsesc": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
"integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s="
},
"json5": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE="
},
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
},
"loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"requires": {
"js-tokens": "^3.0.0 || ^4.0.0"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"mkdirp": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"requires": {
"minimist": "^1.2.5"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
},
"os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"private": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
"integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg=="
},
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
},
"repeating": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
"integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
"requires": {
"is-finite": "^1.0.0"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"slash": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
"integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU="
},
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
},
"source-map-support": {
"version": "0.4.18",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
"integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
"requires": {
"source-map": "^0.5.6"
}
},
"ssr-window": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-1.0.1.tgz",
"integrity": "sha512-dgFqB+f00LJTEgb6UXhx0h+SrG50LJvti2yMKMqAgzfUmUXZrLSv2fjULF7AWGwK25EXu8+smLR3jYsJQChPsg=="
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
}
},
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
},
"swiper": {
"version": "5.3.8",
"resolved": "https://registry.npmjs.org/swiper/-/swiper-5.3.8.tgz",
"integrity": "sha512-bCxrayTgzC2bZBRuFwAx7T4exWeHqMADBpcuTQ7PNCOIIzJRPqNh4ySIvW06LEEU3Q0KncaNre4hrn+jXcWivQ==",
"requires": {
"dom7": "^2.1.3",
"ssr-window": "^1.0.1"
}
},
"to-fast-properties": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
"integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc="
},
"trim-right": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
"integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM="
},
"vue": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.11.tgz",
"integrity": "sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ=="
},
"vue-awesome-swiper": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/vue-awesome-swiper/-/vue-awesome-swiper-4.1.1.tgz",
"integrity": "sha512-50um10t6N+lJaORkpwSi1wWuMmBI1sgFc9Znsi5oUykw2cO5DzLaBHcO2JNX21R+Ue4TGoIJDhhxjBHtkFrTEQ=="
},
"vue-core-image-upload": {
"version": "2.4.11",
"resolved": "https://registry.npmjs.org/vue-core-image-upload/-/vue-core-image-upload-2.4.11.tgz",
"integrity": "sha512-He0OcNqUaL2yHQebFwk4IxLr1Q8m1S7u8zTUek7pMaOUHW76MXOOn6sHoJMruURNvsv3SyeqFEt4N7JQBnMviA==",
"requires": {
"babel-core": "^6.26.0",
"core-image-xhr": "^1.0.3",
"daycaca": "^1.0.6",
"vue": "^2.5.13"
}
"tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
}
}
}

15
yudao-ui-app/package.json Normal file
View File

@ -0,0 +1,15 @@
{
"name": "yudao-ui-app",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"clipboard": "^2.0.11"
}
}

View File

@ -46,6 +46,12 @@
"navigationBarTitleText": "购物车"
}
},
{
"path": "pages/goods_cashier/index",
"style": {
"navigationBarTitleText": "收银台"
}
},
{
"path": "pages/user/index",
"style": {
@ -568,34 +574,34 @@
"borderStyle": "white",
"backgroundColor": "#ffffff",
"list": [
// {
// "pagePath": "pages/index/index",
// "iconPath": "static/images/tabbar/nav_icon_shop.png",
// "selectedIconPath": "static/images/1-002.png",
// "text": "商城"
// },
// {
// "pagePath": "pages/goods_cate/goods_cate",
// "iconPath": "static/images/tabbar/nav_icon_sort.png",
// "selectedIconPath": "static/images/2-002.png",
// "text": "分类"
// },
{
"pagePath": "pages/index/index",
"iconPath": "static/images/tabbar/nav_icon_shop.png",
"selectedIconPath": "static/images/tabbar/nav_icon_shop_active.png",
"text": "商城"
},
{
"pagePath": "pages/goods_cate/goods_cate",
"iconPath": "static/images/tabbar/nav_icon_sort.png",
"selectedIconPath": "static/images/tabbar/nav_icon_sort_active.png",
"text": "分类"
},
{
"pagePath": "pages/member_application/index",
"iconPath": "static/images/2-001.png",
"iconPath": "static/images/tabbar/nav_icon_member.png",
"selectedIconPath": "static/images/tabbar/nav_icon_member_active.png",
"text": "会员申请"
},
// {
// "pagePath": "pages/order_addcart/order_addcart",
// "iconPath": "static/images/tabbar/nav_icon_cart.png",
// "selectedIconPath": "static/images/3-002.png",
// "text": "购物车"
// },
{
"pagePath": "pages/order_addcart/order_addcart",
"iconPath": "static/images/tabbar/nav_icon_cart.png",
"selectedIconPath": "static/images/tabbar/nav_icon_cart_active.png",
"text": "购物车"
},
{
"pagePath": "pages/user/index",
"iconPath": "static/images/tabbar/nav_icon_my.png",
"selectedIconPath": "static/images/4-002.png",
"selectedIconPath": "static/images/tabbar/nav_icon_my_active.png",
"text": "我的"
}
]

View File

@ -0,0 +1,829 @@
<template>
<view class="page" v-if="payPriceShow">
<view class="pay-price">
<view class="title">实付金额</view>
<view class="price">
<text class="unit"></text>
<numberScroll :num='payPriceShow' color="#F12A65" width='30' height='50' fontSize='50'></numberScroll>
</view>
<view class="count-down">
支付剩余时间
<countDown :is-day="false" :is-show-hour='false' :tip-text="''" :day-text="''" :hour-text="''" :minute-text="' : '"
:second-text="' '" :datatime="invalidTime"></countDown>
</view>
</view>
<view class="payment">
<view class="title">
请选择支付方式
</view>
<view class="item acea-row row-between-wrapper" v-for="(item,index) in cartArr" :key="index"
v-show='item.payStatus' @click="payType(item.number || 0, item.value, index)">
<view class="left acea-row row-between-wrapper">
<view class="iconfont" :class="item.icon"></view>
<view class="text">
<view class="name">{{item.name}}</view>
<view class="info" v-if="item.value == 'yue'">
{{item.title}} <span class="money">{{ item.number }}</span>
</view>
<!-- <view class="info" v-else>{{item.title}}</view> -->
</view>
</view>
<view class="iconfont" :class="active==index?'icon-xuanzhong11 font-num':'icon-weixuan'"></view>
</view>
</view>
<view class="btn">
<view class="button acea-row row-center-wrapper pay-button" @click='goPay(number, paytype)'>确认支付</view>
<view class="wait-pay" @click="waitPay"></view>
</view>
<view v-show="false" v-html="formContent"></view>
<u-modal :show="cancelPayModalShow" width="519rpx">
<view class="modal-wrap">
<view class="count-down">
支付剩余时间
<countDown :is-day="false" :is-show-hour='false' :tip-text="''" :day-text="''" :hour-text="''" :minute-text="' : '"
:second-text="' '" :datatime="invalidTime"></countDown>
</view>
<view class="model-content">确认要放弃付款吗</view>
</view>
<view slot="confirmButton">
<view class="modal-btn-wrap">
<u-button class="give-up-btn" @click="onGiveUpPay"></u-button>
<u-button class="continue-btn">继续支付</u-button>
</view>
</view>
</u-modal>
</view>
</view>
</template>
<script>
import countDown from '@/components/countDown';
import numberScroll from '@/components/numberScroll.vue'
import {
getCashierOrder,
orderPay
} from '@/api/order.js';
export default {
components: {
countDown,
numberScroll
},
data() {
return {
cancelPayModalShow: false,
checked: false,
//
cartArr: [{
"name": '微信支付',
"icon": "icon-weixin2",
value: 'weixin',
title: '使用微信快捷支付',
payStatus: 1,
},
{
"name": '支付宝支付',
"icon": "icon-zhifubao",
value: 'alipay',
title: '使用支付宝支付',
payStatus: 1,
}
],
orderId: 0,
fromType: '',
active: 0,
payPrice: 10.00,
payPriceShow: 10.00,
payPostage: 0,
offlinePostage: false,
invalidTime: 1684836534,
initIn: false,
jumpData: {
orderId: '',
msg: ''
},
formContent: ''
}
},
watch: {
cartArr: {
handler(newV, oldValue) {
let newPayList = [];
newV.forEach((item, index) => {
if (item.payStatus) {
item.index = index;
newPayList.push(item)
}
});
this.active = newPayList[0].index;
this.paytype = newPayList[0].value;
this.number = newPayList[0].number || 0;
},
immediate: true,
deep: true
}
},
onLoad(options) {
if (options.order_id) this.orderId = options.order_id
if (options.from_type) this.fromType = options.from_type
// this.getCashierOrder()
},
onShow() {
let options = wx.getEnterOptionsSync();
console.log(options)
if (options.scene == '1038' && options.referrerInfo.appId == 'wxef277996acc166c3' && this.initIn) {
//
let extraData = options.referrerInfo.extraData;
this.initIn = false
if (!extraData) {
// "";
this.$util.Tips({
title: `取消支付`
}, {
tab: 5,
url: `/pages/goods/order_pay_status/index?order_id=${this.orderId}&msg=取消支付&type=3&totalPrice=${this.payPriceShow}&status=2`
});
} else {
if (extraData.code == 'success') {
this.$util.Tips({
title: `支付成功`,
icon: 'success'
}, {
tab: 5,
url: `/pages/goods/order_pay_status/index?order_id=${this.orderId}&msg=${this.jumpData.msg}&type=3&totalPrice=${this.payPriceShow}`
});
} else if (extraData.code == 'cancel') {
// "";
this.$util.Tips({
title: `取消支付`
}, {
tab: 5,
url: `/pages/goods/order_pay_status/index?order_id=${this.orderId}&msg=取消支付&type=3&totalPrice=${this.payPriceShow}&status=2`
});
} else {
// "" + extraData.errmsg;
uni.reLaunch({
url: `/pages/goods/order_pay_status/index?order_id=${this.orderId}&msg=支付失败&totalPrice=${this.payPriceShow}`
})
}
}
}
},
methods: {
onGiveUpPay() {
this.cancelPayModalShow = false
// uni.navigateBack()
},
getCashierOrder() {
uni.showLoading({
title: '创建订单中'
});
getCashierOrder(this.orderId, this.fromType).then(res => {
console.log(res)
this.payPrice = this.payPriceShow = res.data.pay_price
this.payPostage = res.data.pay_postage
this.offlinePostage = res.data.offline_postage
this.invalidTime = res.data.invalid_time
//
this.cartArr[0].payStatus = res.data.wechat_pay_status || 0
//
this.cartArr[1].payStatus = res.data.ali_pay_status || 0;
//#ifdef MP
this.cartArr[1].payStatus = false;
//#endif
//
// that.cartArr[2].title = ':' + res.data.userInfo.now_money;
this.cartArr[2].number = res.data.now_money;
this.cartArr[2].payStatus = res.data.yue_pay_status
if (res.data.offline_pay_status) {
this.cartArr[3].payStatus = 1
} else {
this.cartArr[3].payStatus = 0
}
//
this.cartArr[4].payStatus = res.data.friend_pay_status || 0;
uni.hideLoading();
}).catch(err => {
uni.hideLoading();
return this.$util.Tips({
title: err
})
})
},
payType(number, paytype, index) {
this.active = index;
this.paytype = paytype;
this.number = number;
if (this.offlinePostage) {
if (paytype == 'offline') {
this.payPriceShow = this.$util.$h.Sub(this.payPrice, this.payPostage);
} else {
this.payPriceShow = this.payPrice;
}
}
},
formpost(url, postData) {
let tempform = document.createElement("form");
tempform.action = url;
tempform.method = "post";
tempform.target = "_self";
tempform.style.display = "none";
for (let x in postData) {
let opt = document.createElement("input");
opt.name = x;
opt.value = postData[x];
tempform.appendChild(opt);
}
document.body.appendChild(tempform);
this.$nextTick(e => {
tempform.submit();
})
},
waitPay() {
this.cancelPayModalShow = true
// uni.reLaunch({
// url: '/pages/goods/order_pay_status/index?order_id=' + this.orderId + '&msg=&type=3' +
// '&status=2&totalPrice=' + this.payPriceShow
// })
},
goPay(number, paytype) {
let that = this;
if (!that.orderId) return that.$util.Tips({
title: '请选择要支付的订单'
});
if (paytype == 'yue' && parseFloat(number) < parseFloat(that.payPriceShow)) return that.$util.Tips({
title: `余额不足`
});
uni.showLoading({
title: `支付中`
});
if (paytype == 'friend' && that.orderId) {
uni.hideLoading();
return uni.navigateTo({
url: '/pages/users/payment_on_behalf/index?order_id=' + that.orderId + '&spread=' +
this.$store.state.app.uid,
success: res => {},
fail: () => {},
complete: () => {}
});
}
orderPay({
uni: that.orderId,
paytype: paytype,
type: that.friendPay ? 1 : 0,
// #ifdef H5
quitUrl: location.port ? location.protocol + '//' + location.hostname + ':' + location
.port +
'/pages/goods/order_details/index?order_id=' + this.orderId : location.protocol +
'//' + location.hostname +
'/pages/goods/order_details/index?order_id=' + this.orderId
// #endif
// #ifdef APP-PLUS
quitUrl: '/pages/goods/order_details/index?order_id=' + this.orderId
// #endif
}).then(res => {
let status = res.data.status,
orderId = res.data.result.orderId,
jsConfig = res.data.result.jsConfig,
goPages = '/pages/goods/order_pay_status/index?order_id=' + this.orderId + '&msg=' +
res
.msg +
'&type=3' + '&totalPrice=' + this.payPriceShow,
friendPay = '/pages/users/payment_on_behalf/index?order_id=' + this.orderId +
'&spread=' +
this
.$store.state.app.uid
switch (status) {
case 'ORDER_EXIST':
case 'EXTEND_ORDER':
uni.hideLoading();
return that.$util.Tips({
title: res.msg
}, {
tab: 5,
url: goPages
});
case 'ALLINPAY_PAY':
uni.hideLoading();
// #ifdef MP
this.initIn = true
wx.openEmbeddedMiniProgram({
appId: 'wxef277996acc166c3',
extraData: {
cusid: jsConfig.cusid,
appid: jsConfig.appid,
version: jsConfig.version,
trxamt: jsConfig.trxamt,
reqsn: jsConfig.reqsn,
notify_url: jsConfig.notify_url,
body: jsConfig.body,
remark: jsConfig.remark,
validtime: jsConfig.validtime,
randomstr: jsConfig.randomstr,
paytype: jsConfig.paytype,
sign: jsConfig.sign,
signtype: jsConfig.signtype
}
})
this.jumpData = {
orderId: res.data.result.orderId,
msg: res.msg,
}
// #endif
// #ifdef APP-PLUS
plus.runtime.openURL(jsConfig.payinfo);
setTimeout(e => {
uni.reLaunch({
url: goPages
})
}, 1000)
// #endif
// #ifdef H5
this.formpost(res.data.result.pay_url, jsConfig)
// #endif
break;
case 'PAY_ERROR':
uni.hideLoading();
return that.$util.Tips({
title: res.msg
}, {
tab: 5,
url: goPages
});
break;
case 'SUCCESS':
uni.hideLoading();
if (paytype !== 'friend') {
return that.$util.Tips({
title: res.msg,
icon: 'success'
}, {
tab: 4,
url: goPages
});
} else {
return that.$util.Tips({
title: res.msg,
icon: 'success'
}, {
tab: 4,
url: friendPay
});
}
break;
case 'WECHAT_PAY':
that.toPay = true;
// #ifdef MP
/* that.toPay = true; */
let mp_pay_name = ''
if (uni.requestOrderPayment) {
mp_pay_name = 'requestOrderPayment'
} else {
mp_pay_name = 'requestPayment'
}
uni[mp_pay_name]({
timeStamp: jsConfig.timestamp,
nonceStr: jsConfig.nonceStr,
package: jsConfig.package,
signType: jsConfig.signType,
paySign: jsConfig.paySign,
success: function(res) {
uni.hideLoading();
if (that.BargainId || that.combinationId || that.pinkId ||
that
.seckillId || that.discountId)
return that.$util.Tips({
title: `支付成功`,
icon: 'success'
}, {
tab: 4,
url: goPages
});
return that.$util.Tips({
title: `支付成功`,
icon: 'success'
}, {
tab: 5,
url: goPages
});
},
fail: function(e) {
uni.hideLoading();
return that.$util.Tips({
title: `取消支付`
}, {
tab: 5,
url: goPages + '&status=2'
});
},
complete: function(e) {
uni.hideLoading();
//
if (res.errMsg == 'requestPayment:cancel' || e.errMsg ==
'requestOrderPayment:cancel') return that.$util
.Tips({
title: `取消支付`
}, {
tab: 5,
url: goPages + '&status=2'
});
},
})
// #endif
// #ifdef H5
this.$wechat.pay(res.data.result.jsConfig).then(res => {
return that.$util.Tips({
title: `支付成功`,
icon: 'success'
}, {
tab: 5,
url: goPages
});
}).catch(res => {
if (!this.$wechat.isWeixin()) {
uni.redirectTo({
url: goPages + '&msg=' + `支付失败` +
'&status=2'
// '&msg=&status=2'
})
}
if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
title: `取消支付`
}, {
tab: 5,
url: goPages + '&status=2'
});
})
// #endif
// #ifdef APP-PLUS
uni.requestPayment({
provider: 'wxpay',
orderInfo: jsConfig,
success: (e) => {
let url = goPages;
uni.showToast({
title: `支付成功`
})
setTimeout(res => {
uni.redirectTo({
url: url
})
}, 2000)
},
fail: (e) => {
let url = '/pages/goods/order_pay_status/index?order_id=' +
orderId +
'&msg=' + `支付失败`;
uni.showModal({
content: `支付失败`,
showCancel: false,
success: function(res) {
if (res.confirm) {
uni.redirectTo({
url: url
})
} else if (res.cancel) {}
}
})
},
complete: () => {
uni.hideLoading();
},
});
// #endif
break;
case 'PAY_DEFICIENCY':
uni.hideLoading();
//
return that.$util.Tips({
title: res.msg
}, {
tab: 5,
url: goPages + '&status=1'
});
break;
case "WECHAT_H5_PAY":
uni.hideLoading();
that.$util.Tips({
title: `等待支付中`
}, {
tab: 4,
url: goPages + '&status=0'
});
setTimeout(() => {
location.href = res.data.result.jsConfig.h5_url;
}, 1500);
break;
case 'ALIPAY_PAY':
//#ifdef H5
uni.hideLoading();
that.$util.Tips({
title: `等待支付中`
}, {
tab: 4,
url: goPages + '&status=0'
});
that.formContent = res.data.result.jsConfig;
setTimeout(() => {
document.getElementById('alipaysubmit').submit();
}, 1500);
//#endif
// #ifdef MP
uni.navigateTo({
url: `/pages/users/alipay_invoke/index?id=${orderId}&link=${jsConfig.qrCode}`
});
// #endif
// #ifdef APP-PLUS
uni.requestPayment({
provider: 'alipay',
orderInfo: jsConfig,
success: (e) => {
uni.showToast({
title: `支付成功`
})
let url = '/pages/goods/order_pay_status/index?order_id=' +
orderId +
'&msg=' + `支付成功`;
setTimeout(res => {
uni.redirectTo({
url: url
})
}, 2000)
},
fail: (e) => {
let url = '/pages/goods/order_pay_status/index?order_id=' +
orderId +
'&msg=' + `支付失败`;
uni.showModal({
content: `支付失败`,
showCancel: false,
success: function(res) {
if (res.confirm) {
uni.redirectTo({
url: url
})
} else if (res.cancel) {}
}
})
},
complete: () => {
uni.hideLoading();
},
});
// #endif
break;
}
}).catch(err => {
uni.hideLoading();
return that.$util.Tips({
title: err
}, () => {
that.$emit('onChangeFun', {
action: 'pay_fail'
});
});
})
}
}
}
</script>
<style lang="scss" scoped>
.page {
.count-down .time {
margin-left: 10rpx;
}
.modal-btn-wrap {
display: flex;
justify-content: space-between;
.give-up-btn,
.continue-btn {
flex: 1;
height: 71rpx;
line-height: 71rpx;
background: #F3F3F3;
border: 1px solid #BFBFBF;
border-radius: 35rpx;
text-align: center
}
.continue-btn {
margin-left: 47rpx;
border: none;
color: #fff;
background: linear-gradient(0deg, #E83769 0%, #FE7E9D 100%);
}
}
.modal-wrap {
width: 100%;
text-align: center;
.count-down{
display: flex;
justify-content: center;
font-size: 32rpx;
color: #F4356B;
margin-bottom: 42rpx;
margin-top: 57rpx;
}
.model-content {
font-size: 30rpx;
color: #000;
}
}
.pay-price {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
padding: 88rpx 0 56rpx 0;
.title {
font-size: 28rpx;
color: #000;
margin-bottom: 34rpx;
}
.price {
color: #F12A65;
margin-bottom: 29rpx;
display: flex;
align-items: flex-end;
.unit {
font-size: 30rpx;
font-weight: 500;
line-height: 41rpx;
}
.num {
font-size: 50rpx;
font-weight: 600;
}
}
.count-down {
display: flex;
align-items: center;
font-size: 28rpx;
color: #7A7A7A;
.time {
margin-top: 0 !important;
}
/deep/.red {
margin: 0 !important;
}
}
}
.payment {
width: 690rpx;
border-radius: 14rpx 14rpx;
background-color: #fff;
z-index: 999;
margin: 0 30rpx;
.title {
color: #000;
font-size: 32rpx;
font-weight: 400;
padding: 30rpx 0 25rpx 30rpx;
}
.payMoney {
font-size: 28rpx;
color: #333333;
text-align: center;
margin-top: 50rpx;
.font-color {
margin-left: 10rpx;
.money {
font-size: 40rpx;
}
}
}
}
.payment.on {
transform: translate3d(0, 0, 0);
}
.icon-xuanzhong11 {
color: #E93323 !important;
}
.payment .item {
height: 80rpx;
margin-left: 30rpx;
padding-right: 30rpx;
}
.payment .item:last-child {
border-bottom: none;
}
.payment .item .left {
flex: 1;
}
.payment .item .left .text {
flex: 1;
}
.payment .item .left .text .name {
font-size: 30rpx;
color: #333;
}
.payment .item .left .text .info {
font-size: 22rpx;
color: #999;
}
.payment .item .left .text .info .money {
color: #ff9900;
}
.payment .item .left .iconfont {
font-size: 50rpx;
color: #09bb07;
margin-right: 28rpx;
}
.payment .item .left .iconfont.icon-zhifubao {
color: #00aaea;
}
.payment .item .left .iconfont.icon-yuezhifu {
color: #ff9900;
}
.payment .item .left .iconfont.icon-yuezhifu1 {
color: #eb6623;
}
.payment .item .left .iconfont.icon-tonglianzhifu1 {
color: #305fd8;
}
.payment .item .iconfont {
font-size: 40rpx;
color: #ccc;
}
.icon-haoyoudaizhifu {
color: #F34C3E !important;
}
.btn {
position: fixed;
left: 50rpx;
right: 50rpx;
display: flex;
flex-direction: column;
align-items: center;
bottom: 30rpx;
bottom: calc(30rpx + constant(safe-area-inset-bottom)); /// IOS<11.2/
bottom: calc(30rpx + env(safe-area-inset-bottom)); /// IOS>11.2/
.pay-button {
width: 100%;
height: 87rpx;
background: linear-gradient(0deg, #E63163 0%, #FF819F 100%);
border-radius: 44px;
}
}
.wait-pay {
color: #aaa;
font-size: 24rpx;
padding-top: 20rpx;
}
.button {
width: 690rpx;
height: 90rpx;
border-radius: 45rpx;
color: #FFFFFF;
background-color: #E93323;
}
}
</style>

View File

@ -107,8 +107,7 @@
});
try{
const res = await memberGradeInfo()
if(res.data.some((item) => !!!parseInt(item.isExist))){
console.log(123123)
if(res.data.some((item) => !!parseInt(item.isExist))){
uni.setTabBarItem({
index: 0,
pagePath: '/pages/member_equity/index'

View File

@ -17,7 +17,10 @@
</view>
<view class="box-equity">
<view class="equity-text">
<text class="equity-member">我的会员权益</text>
<view >
<image src='../../static/images/memberLogo.png'></image>
<text class="equity-member">我的会员权益</text>
</view>
<text class="equity-look">查看权益></text>
</view>
<view class="equity-item" v-for="(item,index) in 3" :key="index">
@ -213,7 +216,16 @@
display: flex;
align-items: center;
height: 10%;
view{
display: flex;
align-items: center;
justify-content: center;
width: 44%;
image{
width: 26rpx;
height: 26rpx;
}
}
.equity-member {
margin: 0 10%;
font-size: 30rpx;

View File

@ -43,7 +43,8 @@
<script>
import {
memberGradeInfo
memberGradeInfo,
memberByHomeGradeInfo
} from '@/api/member.js';
import paymentMember from '@/components/paymentMember';
import store from '@/store/index';
@ -125,6 +126,23 @@
uni.hideLoading();
}
},
watch:{
'form.confirmPhone' (){
this.$refs.uForm.validate().then(async res => {
uni.showLoading({
title: '加载中',
mask: true
});
try{
const res = await memberByHomeGradeInfo(this.form.confirmPhone)
this.memberData = res.data
} finally{
uni.hideLoading();
}
})
}
},
methods: {
handleMember(value, index) {
if (!!parseInt(value.isExist)) return

View File

@ -379,7 +379,7 @@
background-size:100% 672rpx;
.logo-wrap {
margin: 285rpx 0 85rpx 0;
margin: 185rpx 0 85rpx 0;
display:flex;
align-items:center;
img{
@ -478,7 +478,7 @@
justify-content: center;
width: 100%;
height: 87rpx;
margin-top: 237rpx;
margin-top: 137rpx;
color: #FFFFFF;
font-size: 32rpx;
background: linear-gradient(0deg, #E63163 0%, #FF819F 100%);
@ -486,7 +486,7 @@
}
.tips {
margin: 125rpx 20rpx 0 20rpx;
margin: 60rpx 20rpx 0 20rpx;
font-size: 24rpx;
color: #000;
display: flex;

View File

@ -206,7 +206,7 @@
background-size:100% 672rpx;
.logo-wrap {
margin: 285rpx 0 85rpx 0;
margin: 185rpx 0 85rpx 0;
display:flex;
align-items:center;
img{

View File

@ -154,7 +154,7 @@
background-size: 100% 672rpx;
.logo-wrap {
margin: 285rpx 0 85rpx 0;
margin: 185rpx 0 85rpx 0;
display:flex;
align-items:center;
img{

View File

@ -58,6 +58,7 @@
import {
imageBase64
} from "@/api/public";
import appConfig from '@/config/app.js'
export default {
components: {
// #ifdef MP
@ -85,16 +86,16 @@
};
},
computed: mapGetters(['isLogin', 'uid', 'userInfo','tenantId']),
watch: {
isLogin: {
handler: function(newV, oldV) {
if (newV) {
this.userSpreadBannerList();
}
},
deep: true
}
},
// watch: {
// isLogin: {
// handler: function(newV, oldV) {
// if (newV) {
// this.userSpreadBannerList();
// }
// },
// deep: true
// }
// },
onLoad() {
if (this.isLogin) {
this.userSpreadBannerList();
@ -203,9 +204,7 @@
let that = this;
let href = '';
// href = window.location.href.split('/pages')[0];
console.log('uid', that.uid)
const baseUrl = 'http://yuxy.perrymake.com';
const url =`${baseUrl}/pages/member_application/index?redirectUrl=${baseUrl}&tenantId=${that.tenantId}&spreadId=${that.uid}`
const url =`${appConfig.SPREAD_DOMAIN}${appConfig.SPREAD_LINK}?redirectUrl=${appConfig.SPREAD_DOMAIN}&tenantId=${that.tenantId}&spreadId=${that.uid}`
console.log('url', url)
uQRCode.make({
canvasId: 'qrcode',

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB