Merge branch 'feature/mall_product' of http://117.33.142.185:3000/zenghuapei/cyywl_server into feature/mall_product
commit
3a0fd70313
|
@ -22,7 +22,7 @@ services:
|
|||
limits:
|
||||
memory: 800MB
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:48080/admin-api/actuator/health"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:48080/actuator/health"]
|
||||
timeout: 30s
|
||||
interval: 45s
|
||||
retries: 3
|
|
@ -1,6 +1,7 @@
|
|||
package cn.iocoder.yudao.module.shop.controller.app.buy;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated;
|
||||
import cn.iocoder.yudao.module.shop.request.member.OrderContentRequest;
|
||||
import cn.iocoder.yudao.module.shop.request.member.RefundRequest;
|
||||
import cn.iocoder.yudao.module.shop.response.member.InitOrderResponse;
|
||||
|
@ -9,11 +10,9 @@ import io.swagger.v3.oas.annotations.Operation;
|
|||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.security.PermitAll;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.Valid;
|
||||
|
||||
|
@ -32,22 +31,21 @@ public class TopUpOrderController {
|
|||
|
||||
@Autowired
|
||||
private StoreOrderService storeOrderService;
|
||||
|
||||
@PreAuthenticated
|
||||
@Operation(summary = "会员充值")
|
||||
@RequestMapping(value = "/memberTopUp", method = RequestMethod.POST)
|
||||
public CommonResult<InitOrderResponse> memberTopUp(@Valid @RequestBody OrderContentRequest request, HttpServletRequest servletRequest) throws Exception {
|
||||
log.info("initOrder会员充值===>{}", request);
|
||||
return CommonResult.success(storeOrderService.memberTopUp(request, servletRequest));
|
||||
}
|
||||
|
||||
@PreAuthenticated
|
||||
@Operation(summary = "退款")
|
||||
@RequestMapping(value = "/memberRefund", method = RequestMethod.POST)
|
||||
public CommonResult<Object> memberRefund(@Valid @RequestBody RefundRequest request, HttpServletRequest servletRequest) throws Exception {
|
||||
log.info("memberRefund会员退款===>{}", request);
|
||||
return CommonResult.success(storeOrderService.memberRefund(request, servletRequest));
|
||||
}
|
||||
|
||||
|
||||
@PreAuthenticated
|
||||
@Operation(summary = "申请退款")
|
||||
@RequestMapping(value = "/memberApplyRefund", method = RequestMethod.POST)
|
||||
public CommonResult<Boolean> memberApplyRefund(@Valid @RequestBody RefundRequest request){
|
||||
|
@ -55,4 +53,13 @@ public class TopUpOrderController {
|
|||
return CommonResult.success(storeOrderService.memberApplyRefund(request));
|
||||
}
|
||||
|
||||
|
||||
@PermitAll
|
||||
@Operation(summary = "获取openid")
|
||||
@RequestMapping(value = "/getOpenId", method = RequestMethod.GET)
|
||||
public CommonResult<String> getOpenId(@RequestParam(value = "code") String code){
|
||||
log.info("获取openid===>{}", code);
|
||||
return CommonResult.success(storeOrderService.getOpenId(code));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -403,4 +403,6 @@ public interface StoreOrderService extends IService<StoreOrder> {
|
|||
Boolean wxPayNotify(WxPayOrderNotifyV3Result.DecryptNotifyResult result);
|
||||
|
||||
Boolean memberApplyRefund(RefundRequest request);
|
||||
|
||||
String getOpenId(String code);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ 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.shop.vo.product.MyRecord;
|
||||
import com.alipay.api.AlipayApiException;
|
||||
import com.alipay.api.internal.util.AlipaySignature;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
@ -59,6 +58,10 @@ import com.github.pagehelper.Page;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.chanjar.weixin.common.bean.oauth2.WxOAuth2AccessToken;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import me.chanjar.weixin.common.service.WxOAuth2Service;
|
||||
import me.chanjar.weixin.mp.api.WxMpService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -130,12 +133,9 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
|
||||
@Autowired
|
||||
private ExpressService expressService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private ApiConfigApi apiConfigApi;
|
||||
|
||||
// @Autowired
|
||||
// private OnePassService onePassService;
|
||||
private WxMpService wxMpService;
|
||||
|
||||
/**
|
||||
* 列表(PC)
|
||||
|
@ -1310,6 +1310,18 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
|
|||
return rechargeOrderMapper.updateById(orderDO) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOpenId(String code) {
|
||||
WxOAuth2AccessToken accessToken = null;
|
||||
try {
|
||||
accessToken = wxMpService.getOAuth2Service().getAccessToken(code);
|
||||
return accessToken.getOpenId();
|
||||
} catch (WxErrorException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private RechargeOrderDO initializeOrder(OrderContentRequest request, String code, MemberUserRespDTO user) {
|
||||
RechargeOrderDO orderDO = new RechargeOrderDO();
|
||||
|
|
|
@ -52,11 +52,11 @@ public class AliPayStrategy implements IPayStrategy {
|
|||
bizContent.put("total_amount", orderDO.getPayPrice());
|
||||
//订单标题,不可使用特殊符号
|
||||
bizContent.put("subject", "会员充值");
|
||||
bizContent.put("product_code", "FAST_INSTANT_TRADE_PAY");
|
||||
bizContent.put("product_code", "QUICK_WAP_WAY");
|
||||
request.setBizContent(bizContent.toString());
|
||||
AlipayTradeWapPayResponse response = null;
|
||||
try {
|
||||
response = alipayClient.pageExecute(request);
|
||||
response = alipayClient.pageExecute(request,"get");
|
||||
orderResponse.setBody(response.getBody());
|
||||
} catch (AlipayApiException e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -36,6 +36,7 @@ public class WxPayStrategy implements IPayStrategy{
|
|||
private WxPayOneAutoConfiguration wxPayOneAutoConfiguration;
|
||||
@Autowired
|
||||
private WxPayProperties payProperties;
|
||||
|
||||
@Override
|
||||
public InitOrderResponse pay(RechargeOrderDO orderDO, HttpServletRequest servletRequest,String openid) {
|
||||
InitOrderResponse response = new InitOrderResponse();
|
||||
|
|
Binary file not shown.
|
@ -1,25 +1,25 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIEQDCCAyigAwIBAgIUWP21A/krbA4ljJlAu3JsK/YCLlYwDQYJKoZIhvcNAQEL
|
||||
MIIEKzCCAxOgAwIBAgIUf3akrcUsoLRAxOVpj4pc0WM6D80wDQYJKoZIhvcNAQEL
|
||||
BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
|
||||
FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
|
||||
Q0EwHhcNMjMwNDExMDgwODE3WhcNMjgwNDA5MDgwODE3WjCBmTETMBEGA1UEAwwK
|
||||
MTY0MTk5MzQxNzEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMUUwQwYDVQQL
|
||||
DDzliJvnm4jkupHnvZHnu5zvvIjph43luobvvInmn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QzM0E4N0FEMUNERjU5MjZFMTQwMzcxMA0GCSqGSIb3DQEBCwUAA4IBAQAc
|
||||
qtlunx6/t+aG2f2yr88kR5SQtwxY1cf3vWCowSCpE5B0nlIZxVHkyPve0w+HyuIf
|
||||
Fz5fL55P/vf53callrZ7UJ8X5nCeQNFVeAkimYXocpyMkoZaxFe3ob+rr0fDvOcd
|
||||
6MUBBKpJArLYpVmKpvQOyrGKSXMhpbLakGdsHF1++s+6DnUPKdObwVO3VpK8OkVw
|
||||
cdv+AN1M6YC4UTlw/u+TGCEUJY2xgzdRnFTG9kpx9CvWcMIFP47PK72njY5T5uIj
|
||||
IQclkz3jGSfr9oTbX8xa5MDm6vDs05zZ1IciyHDjs3VRmacYFlPMBeNVhp7JRoGi
|
||||
Ynd6pwH68Gku/KXAFr2j
|
||||
-----END CERTIFICATE-----
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDVkli5iWlW6ySa
|
||||
t7oW7rSgutZcuhmwMW5yYKvDvXz/zESzpY1Bw0qlJXlWrdbFZkjcG7CbpNB69Htb
|
||||
qMMRkidzWImDFzFo90u4j8WPvUoZAiV1n77zz40k2m5NXYNwFDPLpEREDqr5SBUc
|
||||
iXwlKIq5Y9ghl34DLxI7T2FKLhVrwdBFPZPuS88pyMl3JKVbLcda1mbZUkRf4r4l
|
||||
uQWj39rGZNAwxG3jDNdwbEUjTh0tTVlPA5Fec29YTQav0/zkO4JW7N5B6pQ/k1xJ
|
||||
HKzeuDa9axK6IXLROhKdHdYkVDBWIyVxbwav9asoutladcMJNVwKqIsriH6ihqz4
|
||||
Ze2emfvnAgMBAAECggEBAJk92MvH/P2Q20LocW3i+Vgat5TxM11pGoaXNqfMXtRs
|
||||
DR+ZujFlnznAGcBIG8KoEb9dXutO5whSQ/EQtmb1J7lr3b9h9OIMDxjukCMC/xfS
|
||||
om4zoR/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o+cUxCMhBEczK83afTfqmemUUtfobwsbGIO42UxsAn
|
||||
nIzMMWPKTyl9P3/PMGSN1es5ZQKBgQDhI3c0J4hGyS0i8/wtZ2WRn+2Z3/GggOmC
|
||||
764Umejl5pdOakiqqWna9kEgwk/p4U7bt8Vxcm6wYQaI1eP9wKrcNxIpyUrL3NuW
|
||||
joToihUW/ALrIRglaccFIlRH8xjYL+OCJAuaneM4QiCbggJrKoEQ2sCWGW4aKZOX
|
||||
8KbxrUkuBQKBgFXhRzHzbPZHB+RtN2EjPLQcUa9WL2jg8Y2j2xJOxete2NUWOJM6
|
||||
s4uYZ9XxaEVDU9TOcSqJmJ0Wrny/hkjXDjWEuu1wmVYY6joRQRPXGiIaAyJHhMEa
|
||||
dKxXg5ShT2YaXtG+S0Xfdx0GM47isNFsNYyc77PG1muPuxZ0MxbhcNzdAoGBAKRL
|
||||
z2feGZMeqLPDPZqcxABbp3cNeDVbHg2Rf4ZFMzLi7jQpV9JDQ56o6qpPYyYYaAXr
|
||||
vEin66MHi088V98MRSPjhHu+C7lt+UmLw+43JmDZk/+m7QoQgU572OmQu+a4O9zz
|
||||
FQzGf9TEXSte2wj9waZdHQHsmO66vJy63/mqLadJAoGAEXHWil7RnDr6qeTQNBxS
|
||||
5fyMAWhFQiL+2fYCXetOmwDZC8DSLQQ3CccXcisz9xCo7+24dZiPoTp0u5EcWmwc
|
||||
2TiOhkY5aG+f4sVPIm6aAn7PforQE/G2XaDVVlLsCKzUNCIhnmufD/Y2zaZg+MDY
|
||||
Iah3B7taDbqapcqhLG99rlU=
|
||||
-----END PRIVATE KEY-----
|
||||
|
|
|
@ -162,8 +162,8 @@ debug: false
|
|||
--- #################### 微信公众号、小程序相关配置 ####################
|
||||
wx:
|
||||
mp: # 公众号配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
|
||||
app-id: wxb1826c88da21d81e
|
||||
secret: 1960c9cc785b094040a4fd4b2955c0cb
|
||||
app-id: wx7e503d9cded34c07
|
||||
secret: 31883ca14e2cbac8610d30f8f945ee47
|
||||
# 存储配置,解决 AccessToken 的跨节点的共享
|
||||
config-storage:
|
||||
type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
|
||||
|
@ -179,16 +179,16 @@ wx:
|
|||
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://yuxy.perrymake.com/app-api/pay/wxpay/pay_notify
|
||||
refund-notify-url: http://yuxy.perrymake.com/app-api/pay/wxpay/refund_notify
|
||||
notify-url: http://yuxy.perrymake.com/admin-api/notify/wxpay/pay_notify
|
||||
refund-notify-url: http://yuxy.perrymake.com/admin-api/notify/wxpay/refund_notify
|
||||
two:
|
||||
enabled: true
|
||||
app-id: wxb1826c88da21d81e
|
||||
|
@ -205,9 +205,9 @@ wx:
|
|||
ali:
|
||||
pay:
|
||||
one:
|
||||
appId: 2021003194654312
|
||||
merchantPrivateKey: MIIEwAIBADANBgkqhkiG9w0BAQEFAASCBKowggSmAgEAAoIBAQC+m33MrrmGiSBCBTQMkBH9AN7ZKi/ECmgpjIbVIzAbUThqfiKvuWe8haVq0/F5nETZVYKb3kqqcdt5NkUbGkCrCNCOPvQ2FI8VWOalXGSQNA6ItA644m1dv84Khs5K3Tpu6RgcrL5uqmfNzid7YpLlGeSxMq8uqu/adZnEbm+coJAvEH423pnM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c4b/JvE44Q3PBqWRavhurFs7R62p2cV+Q767rHNOGUrjVxoWdDUkcHj4jdbxNN/rsUQa6dPvA9AltGn6jtHgtFC5kS12LPKUcgCl1o46qav+yfWzpIMstliLr+B4lLhw0CgYEA7Bpm0s2uoyC1XtYCqeWzbjODciq/hgIpmBjnP4Xs0ELB0VE95m9CVQk47dSngRqbkrEO2G2zdMTYj5Mr5bm5AXQfUpwMv89fxCxSXq1Andqe1/UphigltW/PXOfvpD1JcHNfalEcTOTdzENVYH4lN3HAoPobj04gCsFZFcqWfps=
|
||||
alipayPublicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAw21teFhHze8ltibg/mBE0Lo1gTvcRUszQpsiTLWLoYvLxfaEVD+5bkpTYrVFczLNqOw93MJxwF0Pj62T3BZU6IXPdXtkKhcflKiZxleSIaTxPFml8mQ8dfdcT25BPidRaeztxv/FCL+0MUTMVh29Ffm9/DHqkjozs4o/Vcf/BoDssw9L7JQffwo/h69B0O688E+s+SivqvXGbiRdARzPrvuQjUMPwUf9vQZ4/ZgGNlwsEhnF90ESCuBZDm8atOoZlqYSNw6g+TZQH5CVS0WCR41TQoW+R8OsX1cv3ERvJXvh/50dEhl8b4CN3nvdaSYcw93o/nkkTZkdZ7BdcNuW2wIDAQAB
|
||||
appId: 2021003196623046
|
||||
merchantPrivateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCAhydIKD244uxHaCAE8N4KA0kfK2UkhXayUwarvc09s/JHC7WkrtwgmeHx+JyFA/QQA1WHQREJ8jyS9HrgasmmA+BaE0vGwbu/c0R4Cde5dLeITZb4w4X1RlH+xjtF34pKLH3oVi29q9jUTRii41eCBeztL/XcbJDsxAnCNnuxcak0gk4cl8j9aoMBP/opIc5sTDSqYFSSTDSMPGh90M6KowFtCHyVZxEszcIRX9cRIuf9KtfGvBzljJMjNGshIMuaHVCFpy72E0s50HmMxC4Kodhp6HEdLV1GUBZy87PY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BWWdEfm8st1tCj6EkjBAwhAoGAShd1PY/QOEJ6Cj9IDXvD25DAh0dKs54PRxENetbIxPgYpH7db6n/smmbwM69U4TXZyFfqme1Bc0JwM2J7D6gs4OV88AhXJvfj091eJQhYC5e80Eo8dySserwLp8/ka6FV/EFUplg/DD4JR/jbVzO2fbOPCLm6I+sZqG3K7mg6IM=
|
||||
alipayPublicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgIcnSCg9uOLsR2ggBPDeCgNJHytlJIV2slMGq73NPbPyRwu1pK7cIJnh8fichQP0EANVh0ERCfI8kvR64GrJpgPgWhNLxsG7v3NEeAnXuXS3iE2W+MOF9UZR/sY7Rd+KSix96FYtvavY1E0YouNXggXs7S/13GyQ7MQJwjZ7sXGpNIJOHJfI/WqDAT/6KSHObEw0qmBUkkw0jDxofdDOiqMBbQh8lWcRLM3CEV/XESLn/SrXxrwc5YyTIzRrISDLmh1Qhacu9hNLOdB5jMQuCqHYaehxHS1dRlAWcvOz2Iik6qfVlZ9Ap3c3H5pnVFF1VL6ljys0Td2EsRMSdGeShQIDAQAB
|
||||
gatewayUrl: https://openapi.alipay.com/gateway.do
|
||||
notify-url: http://yuxy.perrymake.com/app-api/pay/ali/pay_notify
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
|
|
|
@ -11,8 +11,8 @@ export function memberGradeInfo(){
|
|||
/**
|
||||
* 获取当前登录账号的充值记录
|
||||
*/
|
||||
export function memberHeadInfo(){
|
||||
return request.get('api/order/member/memberHeadInfo', {},{noAuth:true})
|
||||
export function memberOrderInfo(){
|
||||
return request.get('api/order/member/memberOrderInfo', {},{noAuth:true})
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -573,11 +573,17 @@
|
|||
"text": "分类"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/member_application/index",
|
||||
"pagePath": "pages/member_record/index",
|
||||
"iconPath": "static/images/2-001.png",
|
||||
"selectedIconPath": "static/images/2-002.png",
|
||||
"text": "会员申请"
|
||||
},
|
||||
// {
|
||||
// "pagePath": "pages/member_application/index",
|
||||
// "iconPath": "static/images/2-001.png",
|
||||
// "selectedIconPath": "static/images/2-002.png",
|
||||
// "text": "会员申请"
|
||||
// },
|
||||
{
|
||||
"pagePath": "pages/order_addcart/order_addcart",
|
||||
"iconPath": "static/images/3-001.png",
|
||||
|
|
|
@ -1,23 +1,16 @@
|
|||
<template>
|
||||
<view class="box">
|
||||
<view class="box-phone">
|
||||
<u--form :model="form" :rules="rules" ref="uForm" labelWidth="100">
|
||||
<u-form-item label="手机号" prop="phone">
|
||||
<u--input v-model="form.phone" maxlength="11" placeholder="请输入您的手机号"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="手机号" prop="phone">
|
||||
<u--input v-model="form.phone" maxlength="11" placeholder="请再次确认您的手机号"></u--input>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
</view>
|
||||
<view class="box-member">
|
||||
<view class="member-item" v-for="(item,index) in 3" :key="index">
|
||||
<view :class="[activeIndex.includes(index) && 'member-active',!!parseInt(item.isExist) && 'member-disbled', 'member-item']" v-for="(item,index) in memberData" :key="index" @click="handleMember(item,index)">
|
||||
<view class="member-image">
|
||||
<image src='../../static/images/f.png'></image>
|
||||
</view>
|
||||
<view class="member-text">
|
||||
<text class="text-title">办理240得<text style="color: red;">360元</text></text>
|
||||
<text class="text-content">办理档次【240】元,可享连续12个月每个月返利30元</text>
|
||||
<view class="text-title">
|
||||
<text>{{item.name.split('得')[0]}}<text>得{{item.name.split('得')[1]}}</text></text>
|
||||
<view></view>
|
||||
</view>
|
||||
<text class="text-content">{{item.gearRemarks}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -39,6 +32,7 @@
|
|||
memberGradeInfo
|
||||
} from '@/api/member.js';
|
||||
import paymentMember from '@/components/paymentMember';
|
||||
import store from '@/store/index';
|
||||
export default {
|
||||
name: "member_application",
|
||||
components: {
|
||||
|
@ -46,18 +40,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
total_fee: 1, // 支付金额,单位分 100 = 1元
|
||||
order_no: "", // 业务系统订单号(即你自己业务系统的订单表的订单号)
|
||||
out_trade_no: "", // 插件支付单号
|
||||
description: "测试订单", // 支付描述
|
||||
type: "test", // 支付回调类型 如 recharge 代表余额充值 goods 代表商品订单(可自定义,任意英文单词都可以,只要你在 uni-pay-co/notify/目录下创建对应的 xxx.js文件进行编写对应的回调逻辑即可)
|
||||
custom:{
|
||||
a: "a",
|
||||
b: 1
|
||||
},
|
||||
form: {
|
||||
phone:''
|
||||
},
|
||||
memberData:[],
|
||||
payInfo:{
|
||||
userPhone: '',
|
||||
confirmPhone: '',
|
||||
|
@ -77,50 +60,44 @@
|
|||
}
|
||||
],
|
||||
pay_close: false,
|
||||
rules: {
|
||||
phone: [
|
||||
{
|
||||
required: true,
|
||||
message: '手机号不能为空',
|
||||
// 触发器可以同时用blur和change
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
{
|
||||
pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[1-25-9])\d{8}$/g,
|
||||
// 正则检验前先将值转为字符串
|
||||
transform(value) {
|
||||
return String(value);
|
||||
},
|
||||
message: '手机号不正确(190.193号段不可充值)',
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
activeIndex:[],
|
||||
form: {
|
||||
phone:''
|
||||
},
|
||||
|
||||
};
|
||||
},
|
||||
async onLoad() {
|
||||
const res = await memberGradeInfo()
|
||||
this.memberData = res.data
|
||||
},
|
||||
methods: {
|
||||
handleMember(value,index){
|
||||
if(!!parseInt(value.isExist)) return
|
||||
if(this.activeIndex.includes(index)){
|
||||
this.activeIndex = this.activeIndex.filter(item => item !== index)
|
||||
}else{
|
||||
this.activeIndex.push(index)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 打开支付组件
|
||||
*
|
||||
*/
|
||||
goPay() {
|
||||
this.$set(this, 'pay_close', true);
|
||||
if(this.activeIndex.length){
|
||||
this.$set(this, 'pay_close', true);
|
||||
const orderInfos = this.activeIndex.map((item) => {
|
||||
return {
|
||||
...this.memberData[item],
|
||||
gearId:this.memberData[item].id
|
||||
}
|
||||
})
|
||||
this.payInfo = {
|
||||
userPhone: '15760696662',
|
||||
confirmPhone: '15760696662',
|
||||
orderInfos: [{
|
||||
gearId: '1',
|
||||
name: '套餐1',
|
||||
gearRemarks: '备注1',
|
||||
gearAmount: 0.01
|
||||
}]
|
||||
userPhone: store.state.app.userInfo.mobile,
|
||||
orderInfos
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 事件回调
|
||||
|
@ -163,70 +140,34 @@
|
|||
let value = opt.value != undefined ? opt.value : null;
|
||||
(action && this[action]) && this[action](value);
|
||||
},
|
||||
submit() {
|
||||
this.order_no = `test`+Date.now(); // 模拟生成订单号
|
||||
this.out_trade_no = `${this.order_no}-1`; // 模拟生成插件支付单号
|
||||
// 打开支付收银台
|
||||
this.$refs.uniPay.open({
|
||||
total_fee: this.total_fee, // 支付金额,单位分 100 = 1元
|
||||
order_no: this.order_no, // 业务系统订单号(即你自己业务系统的订单表的订单号)
|
||||
out_trade_no: this.out_trade_no, // 插件支付单号
|
||||
description: this.description, // 支付描述
|
||||
type: this.type, // 支付回调类型
|
||||
custom: this.custom, // 自定义数据
|
||||
});
|
||||
|
||||
// this.$refs.uForm.validate().then(res => {
|
||||
// uni.$u.toast('校验通过')
|
||||
// }).catch(errors => {
|
||||
// uni.$u.toast('校验失败')
|
||||
// })
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
// position: relative;
|
||||
padding: 0 24rpx;
|
||||
|
||||
.box-phone {
|
||||
.u-form-item{
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
::v-deep .u-form-item__body {
|
||||
height: 100rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 0 30rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
padding: 0 40rpx;
|
||||
|
||||
.box-member {
|
||||
border-radius: 20rpx;
|
||||
width: 100%;
|
||||
margin-top: 40%;
|
||||
padding: 100rpx 20rpx 30rpx 20rpx;
|
||||
// position: absolute;
|
||||
// top: 20%;
|
||||
// left: 0;
|
||||
background: rgb(255, 210, 91);
|
||||
margin-top: 207rpx;
|
||||
padding: 83rpx 30rpx 30rpx 30rpx;
|
||||
background: linear-gradient(#FFD55D,#FD752F);
|
||||
|
||||
.member-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 30rpx;
|
||||
padding: 30rpx 20rpx 27rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.member-image {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 34rpx;
|
||||
background: red;
|
||||
width: 104rpx;
|
||||
height: 104rpx;
|
||||
border-radius: 35rpx;
|
||||
background: linear-gradient(#FFEBB2,#FDCB3B);
|
||||
padding: 20rpx;
|
||||
|
||||
image {
|
||||
|
@ -242,26 +183,90 @@
|
|||
flex: .9;
|
||||
|
||||
.text-title {
|
||||
margin-top: -16rpx;
|
||||
font-size: 40rpx;
|
||||
margin-top: -14rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bolder;
|
||||
transform: skew(-6deg, 0);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
text{
|
||||
text{
|
||||
color: #C80D00;
|
||||
}
|
||||
}
|
||||
view{
|
||||
width: 18rpx;
|
||||
height: 6rpx;
|
||||
background: #FEAC49;
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.text-content {
|
||||
font-size: 24rpx;
|
||||
color: #aaa;
|
||||
color: #747474;
|
||||
}
|
||||
}
|
||||
}
|
||||
.member-active{
|
||||
transition: .3s;
|
||||
background: linear-gradient(#FF995F,#DA0E00);
|
||||
|
||||
.member-image {
|
||||
background: linear-gradient(#FF995F,#DA0E00);
|
||||
}
|
||||
|
||||
.member-text {
|
||||
.text-title {
|
||||
text{
|
||||
color: #fff;
|
||||
text{
|
||||
color: rgb(223,208,42);
|
||||
}
|
||||
}
|
||||
view{
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
.text-content {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.member-disbled{
|
||||
transition: .3s;
|
||||
background: linear-gradient(#EFEFEF,#BCBCBC);
|
||||
|
||||
.member-image {
|
||||
background: linear-gradient(#AAAAAA,#989898);
|
||||
}
|
||||
|
||||
.member-text {
|
||||
.text-title {
|
||||
text{
|
||||
color: #868585;
|
||||
text{
|
||||
color: #868585;
|
||||
}
|
||||
}
|
||||
view{
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
.text-content {
|
||||
color: #5C5C5C;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box-privilege {
|
||||
border-radius: 20rpx;
|
||||
border-radius: 36rpx;
|
||||
width: 100%;
|
||||
margin-top: 10%;
|
||||
padding: 100rpx 10rpx 30rpx 10rpx;
|
||||
background: rgb(255, 210, 91);
|
||||
margin-top: 44rpx;
|
||||
padding: 84rpx 10rpx 40rpx 10rpx;
|
||||
background: linear-gradient(#FFD55D,#FD7630);
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
|
@ -271,35 +276,37 @@
|
|||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #fff;
|
||||
padding: 30rpx 20rpx;
|
||||
padding: 16rpx 16rpx;
|
||||
border-radius: 20rpx;
|
||||
margin: 10rpx;
|
||||
margin: 0 10rpx;
|
||||
|
||||
image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
width: 87rpx;
|
||||
height: 87rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 10rpx;
|
||||
margin-bottom: 15rpx;
|
||||
}
|
||||
|
||||
.privilege-text {
|
||||
color: #000000;
|
||||
line-height: 36rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.box-submit {
|
||||
margin-top: 10%;
|
||||
margin-bottom: 6%;
|
||||
background: linear-gradient(#FFC82B,#FD7A32);
|
||||
margin-top: 127rpx;
|
||||
margin-bottom: 75rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 90rpx;
|
||||
border-radius: 60rpx;
|
||||
background: royalblue;
|
||||
height: 87rpx;
|
||||
border-radius: 44rpx;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -11,45 +11,44 @@
|
|||
</view>
|
||||
<view class="member-right">
|
||||
<image src='../../static/images/f.png'></image>
|
||||
<text >
|
||||
立即续费
|
||||
</text>
|
||||
<text >会员等级3级</text>
|
||||
<button>立即续费</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-equity">
|
||||
<view class="equity-text">
|
||||
<view class="equity-title">
|
||||
<text>我的会员权益</text>
|
||||
</view>
|
||||
<text class="equity-member">我的会员权益</text>
|
||||
<text class="equity-look">查看权益></text>
|
||||
</view>
|
||||
<!-- <view class="equity-item" v-for="(item,index) in 2" :key="index">
|
||||
<view class="equity-item" v-for="(item,index) in 2" :key="index">
|
||||
<view class="equity-grade">
|
||||
<text>办理档次【640元】档</text>
|
||||
<text>办理日期:2021.12.30</text>
|
||||
</view>
|
||||
<view class="equity-money">
|
||||
<view class="money-text">
|
||||
<view class="money-box money-completed">
|
||||
<text>已返回金额(元)</text>
|
||||
<view>
|
||||
<text>80</text>
|
||||
<text class="money-text">80</text>
|
||||
<text class="money-detailed">查看明细></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="money-text">
|
||||
<view class="money-box money-treat">
|
||||
<text>已返回金额(元)</text>
|
||||
<text>80</text>
|
||||
<text class="money-text">80</text>
|
||||
</view>
|
||||
<view class="money-text">
|
||||
<view class="money-box money-term">
|
||||
<text>已返回金额(元)</text>
|
||||
<text>80</text>
|
||||
<text class="money-text">80</text>
|
||||
</view>
|
||||
<view class="money-text">
|
||||
<view class="money-box money-time">
|
||||
<text>已返回金额(元)</text>
|
||||
<text>80</text>
|
||||
<text class="money-text">80</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -102,20 +101,30 @@
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
padding: 10rpx 24rpx;
|
||||
|
||||
padding: 36rpx 40rpx;
|
||||
background: #fff;
|
||||
height: 100vh;
|
||||
.box-member {
|
||||
border-radius: 20rpx;
|
||||
width: 100%;
|
||||
padding: 20rpx 20rpx 30rpx 20rpx;
|
||||
background: rgb(255, 210, 91);
|
||||
// padding: 20rpx 20rpx 30rpx 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.member-left{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
flex: .7;
|
||||
width: 69%;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
.left-title{
|
||||
font-size: 35rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #000000;
|
||||
}
|
||||
.left-info{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
@ -126,13 +135,29 @@
|
|||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex: .2;
|
||||
width: 22%;
|
||||
font-size: 22rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
button{
|
||||
margin-top: 10rpx;
|
||||
padding: 7rpx 16rpx;
|
||||
background: #F22E60;
|
||||
border-image: linear-gradient(0deg, #A8052E, #FFFFFF) 10 10;
|
||||
border-radius: 18rpx;
|
||||
font-size: 22rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,27 +172,34 @@
|
|||
.equity-text{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
.equity-title{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 240rpx;
|
||||
height: 140rpx;
|
||||
// background: #fff;
|
||||
// border-radius: 8px;/* 设置圆角 */
|
||||
width: 200rpx;
|
||||
height: 90rpx;
|
||||
background: #fff;
|
||||
border-radius: 8px;/* 设置圆角 */
|
||||
transform: perspective(8px)scale(1.1, 1.3) rotateX(5deg);
|
||||
/* 镜头距离元素表面的位置为8px,x轴为1.1倍y轴为1.3倍,绕x轴旋转5度 */
|
||||
transform-origin: bottom left;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.equity-member{
|
||||
position: absolute;
|
||||
}
|
||||
.equity-look{
|
||||
z-index: 99;
|
||||
}
|
||||
}
|
||||
.equity-item {
|
||||
background: #eee;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
border-radius: 20rpx;
|
||||
margin: 10rpx;
|
||||
|
||||
margin: 15rpx;
|
||||
padding: 30rpx 24rpx;
|
||||
.equity-grade{
|
||||
background: greenyellow;
|
||||
border-radius: 10rpx 10rpx;
|
||||
|
@ -176,12 +208,68 @@
|
|||
justify-content: space-between;
|
||||
}
|
||||
.equity-money {
|
||||
// background: #fff;
|
||||
// line-height: 36rpx;
|
||||
// text-align: center;
|
||||
// font-size: 24rpx;
|
||||
.equity-money{
|
||||
background: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
.money-box{
|
||||
padding: 24rpx 25rpx;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
margin-bottom: 18rpx;
|
||||
.money-text{
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
|
||||
}
|
||||
}
|
||||
.money-completed{
|
||||
background: #FFF2F2;
|
||||
border: 1px solid #F22E60;
|
||||
.money-text{
|
||||
color: #F91F57;
|
||||
}
|
||||
view{
|
||||
margin-top:26rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
.money-treat{
|
||||
background: #FFFDF1;
|
||||
border: 1px solid #FF962F;
|
||||
.money-text{
|
||||
margin-top: 26rpx;
|
||||
color: #EBAF00;
|
||||
}
|
||||
}
|
||||
.money-term{
|
||||
background: #F8FFF8;
|
||||
border: 1px solid #38A74F;
|
||||
.money-text{
|
||||
margin-top: 26rpx;
|
||||
color: #2C9E2C;
|
||||
}
|
||||
}
|
||||
.money-time{
|
||||
background: #F0FDFC;
|
||||
border: 1px solid #5CA4E8;
|
||||
.money-text{
|
||||
margin-top: 26rpx;
|
||||
color: #2D7AC9;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,47 +2,76 @@
|
|||
<view class="box">
|
||||
<view class="box-phone">
|
||||
<u--form :model="form" :rules="rules" ref="uForm" labelWidth="100">
|
||||
<u-form-item label="手机号" prop="phone">
|
||||
<u--input v-model="form.phone" maxlength="11" placeholder="请输入您的手机号"></u--input>
|
||||
<u-form-item label="手机号" prop="userPhone">
|
||||
<u--input v-model="form.userPhone" maxlength="11" placeholder="请输入您的手机号"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="手机号" prop="phone">
|
||||
<u--input v-model="form.phone" maxlength="11" placeholder="请再次确认您的手机号"></u--input>
|
||||
<u-form-item label="手机号" prop="confirmPhone">
|
||||
<u--input v-model="form.confirmPhone" maxlength="11" placeholder="请再次确认您的手机号"></u--input>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
</view>
|
||||
<view class="box-member">
|
||||
<view class="member-item" v-for="(item,index) in 3" :key="index">
|
||||
<view :class="[activeIndex.includes(index) && 'member-active',!!parseInt(item.isExist) && 'member-disbled', 'member-item']" v-for="(item,index) in memberData" :key="index" @click="handleMember(item,index)">
|
||||
<view class="member-image">
|
||||
<image src='../../static/images/f.png'></image>
|
||||
</view>
|
||||
<view class="member-text">
|
||||
<text class="text-title">办理240得<text style="color: red;">360元</text></text>
|
||||
<text class="text-content">办理档次【240】元,可享连续12个月每个月返利30元</text>
|
||||
</view>
|
||||
<view class="member-text">
|
||||
<view class="text-title">
|
||||
<text>{{item.name.split('得')[0]}}<text>得{{item.name.split('得')[1]}}</text></text>
|
||||
<view></view>
|
||||
</view>
|
||||
<text class="text-content">{{item.gearRemarks}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="member-prompt">
|
||||
* 办理三个项目即可升级会员2,会员2享XX权益。
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-privilege">
|
||||
<view class="privilege-item" v-for="(item,index) in 4" :key="index">
|
||||
<image src='../../static/images/f.png'></image>
|
||||
<text class="privilege-text">
|
||||
开通立享大额话费返送。
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<button class="box-submit" @click="submit">立即充值</button>
|
||||
<paymentMember :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :payInfo="payInfo"></paymentMember>
|
||||
<button class="box-submit" @click="goPay">立即充值</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
memberGradeInfo
|
||||
} from '@/api/member.js';
|
||||
import paymentMember from '@/components/paymentMember';
|
||||
import store from '@/store/index';
|
||||
export default {
|
||||
name: "member_application",
|
||||
components: {
|
||||
paymentMember
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
memberData:[],
|
||||
payInfo:{
|
||||
userPhone: '',
|
||||
confirmPhone: '',
|
||||
orderInfos: []
|
||||
},
|
||||
payMode: [{
|
||||
name: "微信支付",
|
||||
icon: "icon-weixinzhifu",
|
||||
value: 'WXPAY',
|
||||
title: '微信快捷支付'
|
||||
},
|
||||
{
|
||||
name: "支付宝",
|
||||
icon: "icon-zhifubao",
|
||||
value: 'ALIPAY',
|
||||
title: '支付宝快捷支付'
|
||||
}
|
||||
],
|
||||
pay_close: false,
|
||||
activeIndex:[],
|
||||
form: {
|
||||
phone:''
|
||||
userPhone:'',
|
||||
confirmPhone:''
|
||||
},
|
||||
rules: {
|
||||
phone: [
|
||||
userPhone: [
|
||||
{
|
||||
required: true,
|
||||
message: '手机号不能为空',
|
||||
|
@ -58,143 +87,251 @@
|
|||
message: '手机号不正确(190.193号段不可充值)',
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
],
|
||||
confirmPhone:[
|
||||
{
|
||||
required: true,
|
||||
message: '手机号确认不能为空',
|
||||
// 触发器可以同时用blur和change
|
||||
trigger: ['change', 'blur']
|
||||
},
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
return this.form.userPhone == this.form.confirmPhone
|
||||
},
|
||||
message: '手机号不一致',
|
||||
trigger: ['change','blur'],
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
async onLoad() {
|
||||
const res = await memberGradeInfo()
|
||||
this.memberData = res.data
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
uni.$u.toast('校验通过')
|
||||
}).catch(errors => {
|
||||
uni.$u.toast('校验失败')
|
||||
})
|
||||
}
|
||||
handleMember(value,index){
|
||||
if(!!parseInt(value.isExist)) return
|
||||
if(this.activeIndex.includes(index)){
|
||||
this.activeIndex = this.activeIndex.filter(item => item !== index)
|
||||
}else{
|
||||
this.activeIndex.push(index)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 打开支付组件
|
||||
*
|
||||
*/
|
||||
goPay() {
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
if(this.activeIndex.length){
|
||||
this.$set(this, 'pay_close', true);
|
||||
const orderInfos = this.activeIndex.map((item) => {
|
||||
return {
|
||||
...this.memberData[item],
|
||||
gearId:this.memberData[item].id
|
||||
}
|
||||
})
|
||||
this.payInfo = {
|
||||
userPhone: this.form.userPhone,
|
||||
confirmPhone: this.form.confirmPhone,
|
||||
orderInfos
|
||||
}
|
||||
}
|
||||
}).catch(errors => {
|
||||
uni.$u.toast('校验失败')
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 事件回调
|
||||
*
|
||||
*/
|
||||
onChangeFun: function(e) {
|
||||
let opt = e;
|
||||
let action = opt.action || null;
|
||||
let value = opt.value != undefined ? opt.value : null;
|
||||
(action && this[action]) && this[action](value);
|
||||
},
|
||||
/**
|
||||
* 关闭支付组件
|
||||
*
|
||||
*/
|
||||
payClose: function() {
|
||||
this.pay_close = false;
|
||||
},
|
||||
/**
|
||||
* 支付成功回调
|
||||
*
|
||||
*/
|
||||
pay_complete: function() {
|
||||
this.status = false;
|
||||
this.page = 1;
|
||||
this.$set(this, 'bargain', []);
|
||||
this.$set(this, 'pay_close', false);
|
||||
this.getBargainUserList();
|
||||
},
|
||||
/**
|
||||
* 支付失败回调
|
||||
*
|
||||
*/
|
||||
pay_fail: function() {
|
||||
this.pay_close = false;
|
||||
},
|
||||
onChangeFun: function(e) {
|
||||
let opt = e;
|
||||
let action = opt.action || null;
|
||||
let value = opt.value != undefined ? opt.value : null;
|
||||
(action && this[action]) && this[action](value);
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
// position: relative;
|
||||
padding: 0 24rpx;
|
||||
|
||||
.box-phone {
|
||||
padding: 63rpx 40rpx;
|
||||
.box-phone {
|
||||
.u-form-item{
|
||||
margin-bottom: 20rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
::v-deep .u-form-item__body {
|
||||
height: 100rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 0 30rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
.box-member {
|
||||
border-radius: 20rpx;
|
||||
width: 100%;
|
||||
margin-top: 60rpx;
|
||||
padding: 83rpx 30rpx 30rpx 30rpx;
|
||||
background: linear-gradient(#FFD55D,#FD752F);
|
||||
|
||||
.box-member {
|
||||
border-radius: 20rpx;
|
||||
width: 100%;
|
||||
margin-top: 40%;
|
||||
padding: 100rpx 20rpx 30rpx 20rpx;
|
||||
// position: absolute;
|
||||
// top: 20%;
|
||||
// left: 0;
|
||||
background: rgb(255, 210, 91);
|
||||
.member-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 30rpx 20rpx 27rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.member-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 30rpx;
|
||||
border-radius: 20rpx;
|
||||
.member-image {
|
||||
width: 104rpx;
|
||||
height: 104rpx;
|
||||
border-radius: 35rpx;
|
||||
background: linear-gradient(#FFEBB2,#FDCB3B);
|
||||
padding: 20rpx;
|
||||
|
||||
.member-image {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 34rpx;
|
||||
background: red;
|
||||
padding: 20rpx;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.member-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
flex: .9;
|
||||
|
||||
.member-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
flex: .9;
|
||||
.text-title {
|
||||
margin-top: -14rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bolder;
|
||||
transform: skew(-6deg, 0);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
text{
|
||||
text{
|
||||
color: #C80D00;
|
||||
}
|
||||
}
|
||||
view{
|
||||
width: 18rpx;
|
||||
height: 6rpx;
|
||||
background: #FEAC49;
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.text-title {
|
||||
margin-top: -16rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: bolder;
|
||||
transform: skew(-6deg, 0);
|
||||
}
|
||||
.text-content {
|
||||
font-size: 24rpx;
|
||||
color: #747474;
|
||||
}
|
||||
}
|
||||
}
|
||||
.member-active{
|
||||
transition: .3s;
|
||||
background: linear-gradient(#FF995F,#DA0E00);
|
||||
|
||||
.text-content {
|
||||
font-size: 24rpx;
|
||||
color: #aaa;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.member-image {
|
||||
background: linear-gradient(#FF995F,#DA0E00);
|
||||
}
|
||||
|
||||
.box-privilege {
|
||||
border-radius: 20rpx;
|
||||
width: 100%;
|
||||
margin-top: 10%;
|
||||
padding: 100rpx 10rpx 30rpx 10rpx;
|
||||
background: rgb(255, 210, 91);
|
||||
display: flex;
|
||||
flex: 1;
|
||||
.member-text {
|
||||
.text-title {
|
||||
text{
|
||||
color: #fff;
|
||||
text{
|
||||
color: rgb(223,208,42);
|
||||
}
|
||||
}
|
||||
view{
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
.text-content {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.privilege-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #fff;
|
||||
padding: 30rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
margin: 10rpx;
|
||||
.member-disbled{
|
||||
transition: .3s;
|
||||
background: linear-gradient(#EFEFEF,#BCBCBC);
|
||||
|
||||
image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.member-image {
|
||||
background: linear-gradient(#AAAAAA,#989898);
|
||||
}
|
||||
|
||||
.privilege-text {
|
||||
line-height: 36rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.member-text {
|
||||
.text-title {
|
||||
text{
|
||||
color: #868585;
|
||||
text{
|
||||
color: #868585;
|
||||
}
|
||||
}
|
||||
view{
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
.text-content {
|
||||
color: #5C5C5C;
|
||||
}
|
||||
}
|
||||
}
|
||||
.member-prompt{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.box-submit {
|
||||
margin-top: 10%;
|
||||
margin-bottom: 6%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 90rpx;
|
||||
border-radius: 60rpx;
|
||||
background: royalblue;
|
||||
color: #fff;
|
||||
}
|
||||
.box-submit {
|
||||
background: linear-gradient(#FFC82B,#FD7A32);
|
||||
margin-top: 127rpx;
|
||||
margin-bottom: 75rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 87rpx;
|
||||
border-radius: 44rpx;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,30 +1,54 @@
|
|||
<template>
|
||||
<view class="box">
|
||||
<u-search placeholder="请输入关键字" v-model="keyword" :show-action="false"></u-search>
|
||||
<view class="list-item" v-for="(item,index) in 5" :key="index">
|
||||
<text class="item-phone">充值号码:13627451300</text>
|
||||
<u-search placeholder="按手机号搜索查询" v-model="keyword" border-color="#F94B78" height="70" margin="0 0 35rpx 0" placeholder-color="#9C9C9C" bg-color="#fff" :show-action="false"></u-search>
|
||||
<view class="list-item" v-for="(item,index) in memberData" :key="index">
|
||||
<view class="item-phone">
|
||||
<view></view>
|
||||
<text>充值号码:{{item.userPhone}}</text>
|
||||
</view>
|
||||
<view class="item-text">
|
||||
<text>充值档次:套餐1</text>
|
||||
<text>日期:2023-05-12</text>
|
||||
<text>充值档次:{{item.grade}}</text>
|
||||
<text>日期:{{item.createTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
memberOrderInfo
|
||||
} from '@/api/member.js';
|
||||
import { Debounce } from '@/utils/validate.js'
|
||||
export default {
|
||||
name: "member_application",
|
||||
name: "member_record",
|
||||
data() {
|
||||
return {
|
||||
keyword:'',
|
||||
memberData:[]
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
async onLoad() {
|
||||
const res = await memberOrderInfo()
|
||||
this.memberData = res.data
|
||||
},
|
||||
watch:{
|
||||
keyword :Debounce (function (){
|
||||
this.memberData.sort((a,b) =>{
|
||||
let aIndex = this.keyword.indexOf(a.userPhone)
|
||||
let bIndex = this.keyword.indexOf(b.userPhone)
|
||||
if(aIndex > bIndex) return -1
|
||||
if(aIndex < bIndex) return 1
|
||||
if(a.userPhone == b.userPhone){
|
||||
return a.createTime - b.createTime
|
||||
}else{
|
||||
if(a.createTime<b.createTime) return -1
|
||||
if(a.createTime>b.createTime) return 1
|
||||
return 0
|
||||
}
|
||||
})
|
||||
console.log(this.memberData)
|
||||
},1000)
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
|
@ -33,30 +57,35 @@
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
padding: 20rpx;
|
||||
::v-deep .u-search__content{
|
||||
background: #fff !important;
|
||||
height: 70rpx;
|
||||
.uni-input-form{
|
||||
background: #fff !important;
|
||||
}
|
||||
}
|
||||
padding: 45rpx 40rpx;
|
||||
.list-item{
|
||||
padding: 20rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 26rpx;
|
||||
padding: 30rpx 16rpx 25rpx 16rpx;
|
||||
background: #FDF0F1;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin: 20rpx;
|
||||
.item-phone{
|
||||
font-size: 36rpx;
|
||||
font-weight: bolder;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
color: #E91D51;
|
||||
view{
|
||||
border-radius: 3rpx;
|
||||
margin-right: 10rpx;
|
||||
width: 5rpx;
|
||||
height: 12rpx;
|
||||
background: #E91D51;
|
||||
}
|
||||
}
|
||||
.item-text{
|
||||
padding: 34rpx 12rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,47 +2,72 @@
|
|||
<view class="box">
|
||||
<view class="box-phone">
|
||||
<u--form :model="form" :rules="rules" ref="uForm" labelWidth="100">
|
||||
<u-form-item label="手机号" prop="phone">
|
||||
<u--input v-model="form.phone" maxlength="11" placeholder="请输入您的手机号"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="手机号" prop="phone">
|
||||
<u--input v-model="form.phone" maxlength="11" placeholder="请再次确认您的手机号"></u--input>
|
||||
<u-form-item label="手机号" prop="phone" >
|
||||
<u--input v-model="form.userPhone" maxlength="11" disabled placeholder="请输入您的手机号"></u--input>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
</view>
|
||||
<view class="box-member">
|
||||
<view class="member-item" v-for="(item,index) in 3" :key="index">
|
||||
<view :class="[activeIndex.includes(index) && 'member-active',!!parseInt(item.isExist) && 'member-disbled', 'member-item']" v-for="(item,index) in memberData" :key="index" @click="handleMember(item,index)">
|
||||
<view class="member-image">
|
||||
<image src='../../static/images/f.png'></image>
|
||||
</view>
|
||||
<view class="member-text">
|
||||
<text class="text-title">办理240得<text style="color: red;">360元</text></text>
|
||||
<text class="text-content">办理档次【240】元,可享连续12个月每个月返利30元</text>
|
||||
</view>
|
||||
<view class="member-text">
|
||||
<view class="text-title">
|
||||
<text>{{item.name.split('得')[0]}}<text>得{{item.name.split('得')[1]}}</text></text>
|
||||
<view></view>
|
||||
</view>
|
||||
<text class="text-content">{{item.gearRemarks}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="member-prompt">
|
||||
* 办理三个项目即可升级会员2,会员2享XX权益。
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-privilege">
|
||||
<view class="privilege-item" v-for="(item,index) in 4" :key="index">
|
||||
<image src='../../static/images/f.png'></image>
|
||||
<text class="privilege-text">
|
||||
开通立享大额话费返送。
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<button class="box-submit" @click="submit">立即充值</button>
|
||||
<paymentMember :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :payInfo="payInfo"></paymentMember>
|
||||
<button class="box-submit" @click="goPay">立即充值</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
memberGradeInfo
|
||||
} from '@/api/member.js';
|
||||
import paymentMember from '@/components/paymentMember';
|
||||
import store from '@/store/index';
|
||||
export default {
|
||||
name: "member_application",
|
||||
components: {
|
||||
paymentMember
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
memberData:[],
|
||||
payInfo:{
|
||||
userPhone: '',
|
||||
confirmPhone: '',
|
||||
orderInfos: []
|
||||
},
|
||||
payMode: [{
|
||||
name: "微信支付",
|
||||
icon: "icon-weixinzhifu",
|
||||
value: 'WXPAY',
|
||||
title: '微信快捷支付'
|
||||
},
|
||||
{
|
||||
name: "支付宝",
|
||||
icon: "icon-zhifubao",
|
||||
value: 'ALIPAY',
|
||||
title: '支付宝快捷支付'
|
||||
}
|
||||
],
|
||||
pay_close: false,
|
||||
activeIndex:[],
|
||||
form: {
|
||||
phone:''
|
||||
userPhone:''
|
||||
},
|
||||
rules: {
|
||||
phone: [
|
||||
userPhone: [
|
||||
{
|
||||
required: true,
|
||||
message: '手机号不能为空',
|
||||
|
@ -62,66 +87,121 @@
|
|||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
async onLoad() {
|
||||
const res = await memberGradeInfo()
|
||||
this.memberData = res.data
|
||||
this.form.userPhone = store.state.app.userInfo.mobile
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
|
||||
this.$refs.uForm.validate().then(res => {
|
||||
uni.$u.toast('校验通过')
|
||||
}).catch(errors => {
|
||||
uni.$u.toast('校验失败')
|
||||
})
|
||||
handleMember(value,index){
|
||||
if(!!parseInt(value.isExist)) return
|
||||
if(this.activeIndex.includes(index)){
|
||||
this.activeIndex = this.activeIndex.filter(item => item !== index)
|
||||
}else{
|
||||
this.activeIndex.push(index)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 打开支付组件
|
||||
*
|
||||
*/
|
||||
goPay() {
|
||||
if(this.activeIndex.length){
|
||||
this.$set(this, 'pay_close', true);
|
||||
const orderInfos = this.activeIndex.map((item) => {
|
||||
return {
|
||||
...this.memberData[item],
|
||||
gearId:this.memberData[item].id
|
||||
}
|
||||
})
|
||||
this.payInfo = {
|
||||
userPhone: store.state.app.userInfo.mobile,
|
||||
orderInfos
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 事件回调
|
||||
*
|
||||
*/
|
||||
onChangeFun: function(e) {
|
||||
let opt = e;
|
||||
let action = opt.action || null;
|
||||
let value = opt.value != undefined ? opt.value : null;
|
||||
(action && this[action]) && this[action](value);
|
||||
},
|
||||
/**
|
||||
* 关闭支付组件
|
||||
*
|
||||
*/
|
||||
payClose: function() {
|
||||
this.pay_close = false;
|
||||
},
|
||||
/**
|
||||
* 支付成功回调
|
||||
*
|
||||
*/
|
||||
pay_complete: function() {
|
||||
this.status = false;
|
||||
this.page = 1;
|
||||
this.$set(this, 'bargain', []);
|
||||
this.$set(this, 'pay_close', false);
|
||||
this.getBargainUserList();
|
||||
},
|
||||
/**
|
||||
* 支付失败回调
|
||||
*
|
||||
*/
|
||||
pay_fail: function() {
|
||||
this.pay_close = false;
|
||||
},
|
||||
onChangeFun: function(e) {
|
||||
let opt = e;
|
||||
let action = opt.action || null;
|
||||
let value = opt.value != undefined ? opt.value : null;
|
||||
(action && this[action]) && this[action](value);
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
// position: relative;
|
||||
padding: 0 24rpx;
|
||||
|
||||
.box-phone {
|
||||
padding: 63rpx 40rpx;
|
||||
.u-input{
|
||||
background: #fff !important;
|
||||
}
|
||||
.box-phone {
|
||||
.u-form-item{
|
||||
margin-bottom: 20rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
::v-deep .u-form-item__body {
|
||||
height: 100rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 0 30rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.box-member {
|
||||
border-radius: 20rpx;
|
||||
width: 100%;
|
||||
margin-top: 40%;
|
||||
padding: 100rpx 20rpx 30rpx 20rpx;
|
||||
// position: absolute;
|
||||
// top: 20%;
|
||||
// left: 0;
|
||||
background: rgb(255, 210, 91);
|
||||
.box-member {
|
||||
border-radius: 20rpx;
|
||||
width: 100%;
|
||||
margin-top: 60rpx;
|
||||
padding: 83rpx 30rpx 30rpx 30rpx;
|
||||
background: linear-gradient(#FFD55D,#FD752F);
|
||||
|
||||
.member-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 30rpx;
|
||||
padding: 30rpx 20rpx 27rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.member-image {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 34rpx;
|
||||
background: red;
|
||||
width: 104rpx;
|
||||
height: 104rpx;
|
||||
border-radius: 35rpx;
|
||||
background: linear-gradient(#FFEBB2,#FDCB3B);
|
||||
padding: 20rpx;
|
||||
|
||||
image {
|
||||
|
@ -137,64 +217,102 @@
|
|||
flex: .9;
|
||||
|
||||
.text-title {
|
||||
margin-top: -16rpx;
|
||||
font-size: 40rpx;
|
||||
margin-top: -14rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: bolder;
|
||||
transform: skew(-6deg, 0);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
text{
|
||||
text{
|
||||
color: #C80D00;
|
||||
}
|
||||
}
|
||||
view{
|
||||
width: 18rpx;
|
||||
height: 6rpx;
|
||||
background: #FEAC49;
|
||||
border-radius: 3rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.text-content {
|
||||
font-size: 24rpx;
|
||||
color: #aaa;
|
||||
color: #747474;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.member-active{
|
||||
transition: .3s;
|
||||
background: linear-gradient(#FF995F,#DA0E00);
|
||||
|
||||
.box-privilege {
|
||||
border-radius: 20rpx;
|
||||
width: 100%;
|
||||
margin-top: 10%;
|
||||
padding: 100rpx 10rpx 30rpx 10rpx;
|
||||
background: rgb(255, 210, 91);
|
||||
display: flex;
|
||||
flex: 1;
|
||||
.member-image {
|
||||
background: linear-gradient(#FF995F,#DA0E00);
|
||||
}
|
||||
|
||||
.privilege-item {
|
||||
.member-text {
|
||||
.text-title {
|
||||
text{
|
||||
color: #fff;
|
||||
text{
|
||||
color: rgb(223,208,42);
|
||||
}
|
||||
}
|
||||
view{
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
.text-content {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.member-disbled{
|
||||
transition: .3s;
|
||||
background: linear-gradient(#EFEFEF,#BCBCBC);
|
||||
|
||||
.member-image {
|
||||
background: linear-gradient(#AAAAAA,#989898);
|
||||
}
|
||||
|
||||
.member-text {
|
||||
.text-title {
|
||||
text{
|
||||
color: #868585;
|
||||
text{
|
||||
color: #868585;
|
||||
}
|
||||
}
|
||||
view{
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
.text-content {
|
||||
color: #5C5C5C;
|
||||
}
|
||||
}
|
||||
}
|
||||
.member-prompt{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: #fff;
|
||||
padding: 30rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
margin: 10rpx;
|
||||
|
||||
image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.privilege-text {
|
||||
line-height: 36rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
justify-content: center;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.box-submit {
|
||||
margin-top: 10%;
|
||||
margin-bottom: 6%;
|
||||
background: linear-gradient(#FFC82B,#FD7A32);
|
||||
margin-top: 127rpx;
|
||||
margin-bottom: 75rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 90rpx;
|
||||
border-radius: 60rpx;
|
||||
background: royalblue;
|
||||
height: 87rpx;
|
||||
border-radius: 44rpx;
|
||||
color: #fff;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue