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

pull/2/head
tangqian 2023-05-19 16:45:43 +08:00
commit 5dc3218152
31 changed files with 1428 additions and 964 deletions

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.147:48080'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -83,7 +83,7 @@
trigger="click"
popper-class="qrcode-wrap"
>
<canvas :id="`id-${scope.row.id}`"></canvas>
<canvas :id="`id-${scope.row.id}`" width="120" height="120"></canvas>
<el-button slot="reference" size="mini" type="text" @click="handleQRCode(scope.row)"
v-hasPermi="['system:tenant:delete']">推广码
</el-button>
@ -345,9 +345,11 @@ export default {
this.resetForm('form');
},
handleQRCode(row) {
const url =`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7e503d9cded34c07&redirect_uri=
http://192.168.1.149:8080?tenantId=${row.id}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`
QRCode.toCanvas(document.getElementById(`id-${row.id}`), url, function (error) {
const baseUrl = 'http://yuxy.perrymake.com'
const url =`${baseUrl}/pages/index/index?redirectUrl=${baseUrl}&tenantId=${row.id}`
QRCode.toCanvas(document.getElementById(`id-${row.id}`), url, {
scale: 2
}, function (error) {
if (error) console.error(error)
console.log('success!');
})

View File

@ -4,7 +4,8 @@
} from "./libs/login";
import {
refreshToken,
getWeChatOpenId
getWeChatOpenId,
fetchTenantInfo
} from "@/api/api";
import {
HTTP_REQUEST_URL
@ -13,7 +14,8 @@
import Routine from './libs/routine.js';
import Apps from './libs/apps.js';
import {
mapActions
mapActions,
mapGetters
} from 'vuex'
import {
memberGradeInfo
@ -30,10 +32,10 @@
},
onLaunch: function(option) {
const res = memberGradeInfo().then((res) =>{
if(res.data.some((item) => !!!parseInt(item.isExist))){
if(res.data.some((item) => !!parseInt(item.isExist))){
uni.setTabBarItem({
index: 2,
text: 'text',
text: 'text',
pagePath: '/pages/member_equity/index'
})
}
@ -171,16 +173,21 @@
}
// #endif
},
computed: mapGetters(['tenantId']),
async mounted() {
this.isQRCode()
if (this.$store.getters.isLogin && !this.$Cache.get('USER_INFO')) {
await this.$store.dispatch('USERINFO');
}
if (!this.$Cache.get('TENANT_ID') || this.$route.query.tenantId) {
this.getTenantId()
} else {
this.getTenantInfo()
}
if (!this.$Cache.get('OPEN_ID') && this.$route.query.code) {
this.getWxChatCode()
}
this.setSpreadId()
setInterval(() => {
if (this.$store.getters.isLogin) {
this.setRefreshToken()
@ -188,11 +195,28 @@
}, 60000)
},
methods: {
//
isQRCode() {
const redirectUrl = this.$route.query.redirectUrl || ''
if (redirectUrl) {
const tenantId = this.$route.query.tenantId || ''
const spreadId = this.$route.query.spreadId || ''
const wechatUrl = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx7e503d9cded34c07'
location.href =`${wechatUrl}&redirect_uri=${redirectUrl}/pages/member_application/index?tenantId=${tenantId}&spreadId=${spreadId}&response_type=code&scope=snsapi_base#wechat_redirect`
}
},
//
getTenantInfo() {
fetchTenantInfo(this.tenantId).then(res => {
this.$store.commit("SET_TENANT_INFO", res.data);
})
},
// ID
getTenantId() {
const tenantId = this.$route.query.tenantId
const tenantId = this.$route.query.tenantId || ''
if (tenantId) {
this.$store.commit("SET_TENANTID", tenantId);
this.getTenantInfo()
} else {
this.$util.Tips({
title: '请扫码物业公司二维码访问'
@ -201,8 +225,8 @@
},
// 广ID
setSpreadId() {
const spreadId = this.$route.query.spreadId
if (tenantId) {
const spreadId = this.$route.query.spreadId || ''
if (spreadId) {
this.$store.commit("SET_SPREADID", spreadId);
}
},
@ -210,8 +234,8 @@
getWxChatCode() {
const code = this.$route.query.code
getWeChatOpenId(code).then(res => {
if(res.data){
this.$store.commit("SET_OPENID", res.data);
if (res.data) {
this.$store.commit("SET_OPENID", res.data);
}
})
},

View File

@ -2,35 +2,44 @@ import request from "@/utils/request.js";
/**
* 公共接口 优惠券接口 , 行业此讯 , 手机号码注册
*
*/
*/
/**
* 获取主页数据 无需授权
*
*/
export function getIndexData()
{
return request.get("index",{},{ noAuth : true});
*/
export function getIndexData() {
return request.get("index", {}, {
noAuth: true
});
}
/**
* 获取登录授权login
*
*/
export function getLogo()
{
return request.get('wechat/getLogo', {}, { noAuth : true});
*/
export function getLogo() {
return request.get('wechat/getLogo', {}, {
noAuth: true
});
}
export function refreshToken(token)
{
return request.post('member/auth/refresh-token?refreshToken=' + token, {}, { noAuth : true});
export function refreshToken(token) {
return request.post('member/auth/refresh-token?refreshToken=' + token, {}, {
noAuth: true
});
}
// 获取微信OpenId
export function getWeChatOpenId(code)
{
return request.get('api/order/member/getOpenId?code=' + code, {}, { noAuth : true});
export function getWeChatOpenId(code) {
return request.get('api/order/member/getOpenId?code=' + code, {}, {
noAuth: true
});
}
// 获取租户信息
export function fetchTenantInfo(id) {
return request.get('tenant/get?id=' + id, {});
}
/**
@ -38,133 +47,165 @@ export function getWeChatOpenId(code)
* @param string formId
*/
export function setFormId(formId) {
return request.post("wechat/set_form_id", { formId: formId});
return request.post("wechat/set_form_id", {
formId: formId
});
}
/**
* 领取优惠卷
* @param int couponId
*
*/
export function setCouponReceive(couponId){
return request.post('coupon/receive', { couponId: couponId});
*/
export function setCouponReceive(couponId) {
return request.post('coupon/receive', {
couponId: couponId
});
}
/**
* 优惠券列表
* @param object data
*/
export function getCoupons(data){
return request.get('coupons',data,{noAuth:true})
*/
export function getCoupons(data) {
return request.get('coupons', data, {
noAuth: true
})
}
/**
* 我的优惠券
* @param int types 0全部 1未使用 2已使用
*/
export function getUserCoupons(data){
return request.get('coupon/list',data)
*/
export function getUserCoupons(data) {
return request.get('coupon/list', data)
}
/**
* 文章分类列表
*
*/
export function getArticleCategoryList(){
return request.get('article/category/list',{},{noAuth:true})
*/
export function getArticleCategoryList() {
return request.get('article/category/list', {}, {
noAuth: true
})
}
/**
* 文章列表
* @param int cid
*
*/
export function getArticleList(cid,data){
return request.get('article/list/' + cid, data,{noAuth:true})
*/
export function getArticleList(cid, data) {
return request.get('article/list/' + cid, data, {
noAuth: true
})
}
/**
* 文章 热门列表
*
*/
export function getArticleHotList(){
return request.get('article/hot/list',{},{noAuth:true});
*/
export function getArticleHotList() {
return request.get('article/hot/list', {}, {
noAuth: true
});
}
/**
* 文章 轮播列表
*
*/
export function getArticleBannerList(){
return request.get('article/banner/list',{},{noAuth:true})
*/
export function getArticleBannerList() {
return request.get('article/banner/list', {}, {
noAuth: true
})
}
/**
* 文章详情
* @param int id
*
*/
export function getArticleDetails(id){
return request.get('article/info',id,{noAuth:true});
*/
export function getArticleDetails(id) {
return request.get('article/info', id, {
noAuth: true
});
}
/**
* 手机号+验证码登录接口
* @param object data
*/
export function loginMobile(data){
return request.post('login/mobile',data,{noAuth:true})
*/
export function loginMobile(data) {
return request.post('login/mobile', data, {
noAuth: true
})
}
/**
* 获取短信KEY
* @param object phone
*/
export function verifyCode(){
return request.get('verify_code', {},{noAuth:true})
*/
export function verifyCode() {
return request.get('verify_code', {}, {
noAuth: true
})
}
/**
* 验证码发送
* @param object phone
*/
export function registerVerify(phone){
return request.post('sendCode', { phone: phone },{noAuth:true},1)
*/
export function registerVerify(phone) {
return request.post('sendCode', {
phone: phone
}, {
noAuth: true
}, 1)
}
/**
* 手机号注册
* @param object data
*
*/
export function phoneRegister(data){
return request.post('register',data,{noAuth:true});
*/
export function phoneRegister(data) {
return request.post('register', data, {
noAuth: true
});
}
/**
* 手机号修改密码
* @param object data
*
*/
export function phoneRegisterReset(data){
return request.post('register/reset',data,{noAuth:true})
*/
export function phoneRegisterReset(data) {
return request.post('register/reset', data, {
noAuth: true
})
}
/**
* 手机号+密码登录
* @param object data
*
*/
export function phoneLogin(data){
return request.post('login',data,{noAuth:true})
*/
export function phoneLogin(data) {
return request.post('login', data, {
noAuth: true
})
}
/**
* 切换H5登录
* @param object data
*/
*/
// #ifdef MP
export function switchH5Login(){
return request.post('switch_h5', { 'from':'routine'});
export function switchH5Login() {
return request.post('switch_h5', {
'from': 'routine'
});
}
// #endif
@ -173,67 +214,80 @@ export function switchH5Login(){
* */
// #ifdef H5
export function switchH5Login() {
return request.post("switch_h5", { 'from': "wechat" });
return request.post("switch_h5", {
'from': "wechat"
});
}
// #endif
/**
* 换绑手机号
*
*/
export function bindingPhone(data){
return request.post('update/binding',data);
*/
export function bindingPhone(data) {
return request.post('update/binding', data);
}
/**
* 换绑手机号校验
*
*/
export function bindingVerify(data){
return request.post('update/binding/verify',data);
*/
export function bindingVerify(data) {
return request.post('update/binding/verify', data);
}
/**
* 退出登錄
*
*/
export function logout(){
*/
export function logout() {
return request.get('logout');
}
/**
* 获取订阅消息id
*/
export function getTemlIds(data)
{
return request.get('wechat/program/my/temp/list', data , { noAuth:true});
export function getTemlIds(data) {
return request.get('wechat/program/my/temp/list', data, {
noAuth: true
});
}
/**
* 首页拼团数据
*/
export function pink()
{
return request.get('pink', {}, { noAuth:true});
export function pink() {
return request.get('pink', {}, {
noAuth: true
});
}
/**
* 获取城市信息
*/
export function getCity() {
return request.get('area/tree', { }, { noAuth: true });
return request.get('area/tree', {}, {
noAuth: true
});
}
/**
* 获取小程序直播列表
*/
export function getLiveList(page,limit) {
return request.get('wechat/live', { page, limit}, { noAuth: true });
export function getLiveList(page, limit) {
return request.get('wechat/live', {
page,
limit
}, {
noAuth: true
});
}
/**
* 获取小程序二维码
*/
export function getQrcode(data) {
return request.post('qrcode/get',data,{ noAuth: true });
return request.post('qrcode/get', data, {
noAuth: true
});
}

View File

@ -5,19 +5,26 @@ import request from "@/utils/request.js";
* 查询会员档次信息
*/
export function memberGradeInfo(){
return request.get('api/order/member/memberGradeInfo', {},{noAuth:true})
return request.get('api/order/member/memberGradeInfo', {})
}
/**
* 获取当前登录账号的充值记录
*/
export function memberOrderInfo(){
return request.get('api/order/member/memberOrderInfo', {},{noAuth:true})
return request.get('api/order/member/memberOrderInfo', {})
}
/**
* 会员充值
*/
export function memberTopUp(data) {
return request.post('api/order/member/memberTopUp',data,{ noAuth: true });
return request.post('api/order/member/memberTopUp',data);
}
/**
* 申请退款
*/
export function memberApplyRefund(data) {
return request.post('api/order/member/memberApplyRefund',data);
}

View File

@ -88,8 +88,9 @@
},
function(res) {
if (res.err_msg == "get_brand_wcpay_request:ok") {
// 使,
//res.err_msgok
uni.switchTab({
url: '/pages/member_application/index'
})
}
})
}
@ -110,7 +111,8 @@
title: '请选择要支付的订单'
});
uni.showLoading({
title: '支付中'
title: '支付中',
mask: true
});
if(paytype === 'WXPAY' && !that.openId) {
return that.$util.Tips({

View File

@ -10,6 +10,8 @@ module.exports = {
OPEN_ID: 'OPEN_ID',
//用户信息
USER_INFO: 'USER_INFO',
//租户信息
TENANT_INFO: 'TENANT_INFO',
//token 过期时间
EXPIRES_TIME: 'EXPIRES_TIME',
//微信授权

View File

@ -443,6 +443,13 @@
"navigationBarTitleText": "注册",
"navigationStyle": "custom"
}
},
{
"path": "register/success",
"style": {
"navigationBarTitleText": "注册成功",
"navigationStyle": "custom"
}
}
]
},
@ -562,37 +569,31 @@
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/images/1-001.png",
"iconPath": "static/images/tabbar/nav_icon_shop.png",
"selectedIconPath": "static/images/1-002.png",
"text": "首页"
"text": "商城"
},
{
"pagePath": "pages/goods_cate/goods_cate",
"iconPath": "static/images/2-001.png",
"iconPath": "static/images/tabbar/nav_icon_sort.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",
"selectedIconPath": "static/images/tabbar/nav_icon_member_active.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",
"iconPath": "static/images/tabbar/nav_icon_cart.png",
"selectedIconPath": "static/images/3-002.png",
"text": "购物车"
},
{
"pagePath": "pages/user/index",
"iconPath": "static/images/4-001.png",
"iconPath": "static/images/tabbar/nav_icon_my.png",
"selectedIconPath": "static/images/4-002.png",
"text": "我的"
}

View File

@ -38,6 +38,12 @@
<paymentMember :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :payInfo="payInfo">
</paymentMember>
<button class="box-submit" @click="goPay"></button>
<u-navbar leftIcon="" title="会员申请">
<view class="u-nav-slot" slot="right">
<u-icon name="more-dot-fill" size="50" @click="show = true"></u-icon>
<u-action-sheet @select="handleSelect" :actions="list" :title="title" :show="show" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="show=false" :safeAreaInsetBottom="true"></u-action-sheet>
</view>
</u-navbar>
</view>
</template>
@ -54,6 +60,18 @@
},
data() {
return {
title:'管理',
list: [
{
name:'购买记录',
fontSize:'28'
},
{
name:'为他人充值',
fontSize:'28'
},
],
show: false,
memberData: [],
payInfo: {
userPhone: '',
@ -82,18 +100,27 @@
};
},
async onLoad() {
// uni.setTabBarItem({
// index: 2,
// text: 'text',
// pagePath: '/pages/member_equity/index'
// })
// uni.switchTab({
// url:'/pages/member_equity/index'
// })
const res = await memberGradeInfo()
this.memberData = res.data
},
methods: {
handleSelect(value){
switch (value.name){
case "购买记录":
uni.navigateTo({
url:'/pages/member_record/index'
})
break;
case "为他人充值":
console.log(123)
uni.navigateTo({
url:'/pages/member_others/index'
})
break;
default:
break;
}
},
handleMember(value, index) {
if (!!parseInt(value.isExist)) return
if (this.activeIndex.includes(index)) {
@ -119,6 +146,10 @@
userPhone: store.state.app.userInfo.mobile,
orderInfos
}
}else{
this.$util.Tips({
title: '请选择档次套餐'
})
}
},
/**
@ -168,6 +199,7 @@
<style lang="scss" scoped>
.box {
margin-top: 10%;
position: relative;
padding: 207rpx 40rpx 30rpx 40rpx;
min-height: 100vh;
@ -176,6 +208,10 @@
background-repeat: no-repeat;
background-attachment: fixed;
::v-deep .u-popup__content{
margin-bottom: 11%;
}
.phone-money {
width: 604rpx;
height: 140rpx;

View File

@ -10,17 +10,17 @@
<text>再升1级即可获得XX等6项权益</text>
</view>
<view class="member-right">
<image src='../../static/images/vipStar.png'></image>
<text >会员等级3级</text>
<button>立即续费</button>
<image src='../../static/images/vipStar.png'></image>
<text>会员等级3级</text>
<button>立即续费</button>
</view>
</view>
<view class="box-equity">
<view class="equity-text">
<view class="equity-text">
<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>
@ -48,6 +48,12 @@
</view>
</view>
</view>
<u-navbar leftIcon="" title="会员申请">
<view class="u-nav-slot" slot="right">
<u-icon name="more-dot-fill" size="50" @click="show = true"></u-icon>
<u-action-sheet @select="handleSelect" :actions="list" :title="title" :show="show" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="show=false" :safeAreaInsetBottom="true"></u-action-sheet>
</view>
</u-navbar>
</view>
</template>
@ -56,19 +62,30 @@
name: "member_application",
data() {
return {
title:'管理',
list: [
{
name:'购买记录',
fontSize:'28'
},
{
name:'为他人充值',
fontSize:'28'
},
],
show: false,
form: {
phone:''
phone: ''
},
rules: {
phone: [
{
pattern: /^[0-9a-zA-Z]*$/g,
//
transform(value) {
return String(value);
},
message: '只能包含字母或数字'
},
phone: [{
pattern: /^[0-9a-zA-Z]*$/g,
//
transform(value) {
return String(value);
},
message: '只能包含字母或数字'
},
{
message: '手机号不能为空',
// blurchange
@ -85,6 +102,23 @@
},
methods: {
handleSelect(value){
switch (value.name){
case "购买记录":
uni.navigateTo({
url:'/pages/member_record/index'
})
break;
case "为他人充值":
console.log(123)
uni.navigateTo({
url:'/pages/member_others/index'
})
break;
default:
break;
}
},
submit() {
this.$refs.uForm.validate().then(res => {
@ -99,12 +133,16 @@
<style lang="scss" scoped>
.box {
margin-top: 10%;
background: #fff;
height: 100vh;
background: url(../../static/images/memberBg.png);
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
.box-member {
padding: 36rpx 40rpx;
border-radius: 20rpx;
@ -112,7 +150,8 @@
// padding: 20rpx 20rpx 30rpx 20rpx;
display: flex;
justify-content: space-between;
.member-left{
.member-left {
display: flex;
flex-direction: column;
justify-content: space-between;
@ -121,18 +160,21 @@
font-family: PingFang SC;
font-weight: 400;
color: #000000;
.left-title{
.left-title {
font-size: 35rpx;
font-family: PingFang SC;
font-weight: 600;
color: #000000;
}
.left-info{
.left-info {
display: flex;
justify-content: space-between;
}
}
.member-right{
.member-right {
display: flex;
flex-direction: column;
justify-content: space-between;
@ -142,6 +184,7 @@
font-family: PingFang SC;
font-weight: 400;
color: #000000;
image {
width: 100rpx;
height: 100rpx;
@ -149,7 +192,7 @@
margin-bottom: 10rpx;
}
button{
button {
margin-top: 10rpx;
padding: 7rpx 16rpx;
background: #F22E60;
@ -169,31 +212,33 @@
padding: 0 40rpx;
background: url(../../static/images/memberEquity.png);
background-size: 100%;
background-repeat: no-repeat;
background-repeat: no-repeat;
display: flex;
flex-direction: column;
position: relative;
.equity-text{
margin:5% 0;
display: flex;
align-items: center;
height: 10%;
.equity-member{
.equity-text {
margin: 5% 0;
display: flex;
align-items: center;
height: 10%;
.equity-member {
margin: 0 10%;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
}
.equity-look{
.equity-look {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FF4922;
}
}
.equity-item {
background: #fff;
display: flex;
@ -201,18 +246,21 @@
justify-content: space-between;
border-radius: 20rpx;
margin: 0 20rpx 20rpx 20rpx;
// padding: 30rpx 24rpx;
.equity-grade{
.equity-grade {
border-radius: 10rpx 10rpx;
padding: 20rpx;
display: flex;
justify-content: space-between;
}
.equity-money {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
.money-box{
.money-box {
width: 46%;
padding: 24rpx 25rpx;
border-radius: 10px;
@ -224,21 +272,25 @@
font-weight: 400;
color: #000000;
margin-bottom: 18rpx;
.money-text{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
.money-text {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
}
}
.money-completed{
.money-completed {
background: #FFF2F2;
border: 1px solid #F22E60;
.money-text{
.money-text {
color: #F91F57;
}
view{
margin-top:26rpx;
}
view {
margin-top: 26rpx;
display: flex;
justify-content: space-between;
align-items: center;
@ -249,28 +301,33 @@
}
}
.money-treat{
.money-treat {
background: #FFFDF1;
border: 1px solid #FF962F;
.money-text{
.money-text {
margin-top: 26rpx;
color: #EBAF00;
color: #EBAF00;
}
}
.money-term{
.money-term {
background: #F8FFF8;
border: 1px solid #38A74F;
.money-text{
.money-text {
margin-top: 26rpx;
color: #2C9E2C;
color: #2C9E2C;
}
}
.money-time{
.money-time {
background: #F0FDFC;
border: 1px solid #5CA4E8;
.money-text{
.money-text {
margin-top: 26rpx;
color: #2D7AC9;
color: #2D7AC9;
}
}
}

View File

@ -37,6 +37,7 @@
<paymentMember :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :payInfo="payInfo">
</paymentMember>
<button class="box-submit" @click="goPay"></button>
<u-navbar autoBack title="为他人充值"></u-navbar>
</view>
</template>
@ -144,7 +145,11 @@
confirmPhone: this.form.confirmPhone,
orderInfos
}
}
}else{
this.$util.Tips({
title: '请选择档次套餐'
})
}
}).catch(errors => {
uni.$u.toast('校验失败')
})
@ -196,6 +201,7 @@
<style lang="scss" scoped>
.box {
margin-top: 10%;
position: relative;
padding: 8% 40rpx 30rpx 40rpx;
min-height: 100vh;

View File

@ -1,22 +1,28 @@
<template>
<view class="box">
<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="box-seach">
<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>
<view class="list-item" v-for="(item,index) in memberData" :key="index">
<view class="item-phone">
<view></view>
<text>充值号码{{item.userPhone}}</text>
<view class="item-title">
<view class="item-phone">
<view></view>
<text>充值号码{{item.userPhone}}</text>
</view>
<button v-show="item.bool" @click="handleService(item.orderId)">退</button>
</view>
<view class="item-text">
<text>充值档次{{item.grade}}</text>
<text>日期{{item.stringCreateTime}}</text>
</view>
</view>
<u-navbar autoBack title="购买纪录"></u-navbar>
</view>
</template>
<script>
import {
memberOrderInfo
memberOrderInfo,memberApplyRefund
} from '@/api/member.js';
import { Debounce } from '@/utils/validate.js'
export default {
@ -28,8 +34,17 @@
};
},
async onLoad() {
let milliseconds = 2 * 3600 * 1000 // 7200000
let timestamp = new Date().getTime()
const res = await memberOrderInfo()
this.memberData = res.data
const arr = res.data.map((item) => {
return {
...item,
bool:item.createTime+milliseconds>timestamp
}
})
this.memberData = arr
console.log(this.memberData)
},
watch:{
keyword :Debounce (function (){
@ -50,14 +65,24 @@
},1000)
},
methods: {
async handleService(orderId){
await memberApplyRefund({orderId})
}
}
};
</script>
<style lang="scss" scoped>
.box {
padding: 45rpx 40rpx;
margin-top: 10%;
padding: 20% 40rpx;
.box-seach{
padding: 10% 40rpx;
width: 100%;
position: fixed;
top: 3%;
left: 0;
}
.list-item{
margin-bottom: 26rpx;
padding: 30rpx 16rpx 25rpx 16rpx;
@ -66,19 +91,30 @@
display: flex;
flex-direction: column;
justify-content: space-between;
.item-phone{
.item-title{
display: flex;
align-items: center;
font-size: 30rpx;
color: #E91D51;
view{
border-radius: 3rpx;
margin-right: 10rpx;
width: 5rpx;
height: 12rpx;
background: #E91D51;
justify-content: space-between;
.item-phone{
display: flex;
align-items: center;
font-size: 30rpx;
color: #E91D51;
view{
border-radius: 3rpx;
margin-right: 10rpx;
width: 5rpx;
height: 12rpx;
background: #E91D51;
}
}
button{
padding: 6rpx ;
font-size: 26rpx;
background: rgb(22,155,213);
color: #fff;
}
}
.item-text{
padding: 34rpx 12rpx;
background: #fff;

View File

@ -125,7 +125,11 @@ import store from '@/store/index';
userPhone: store.state.app.userInfo.mobile,
orderInfos
}
}
}else{
this.$util.Tips({
title: '请选择档次套餐'
})
}
},
/**
* 事件回调

File diff suppressed because it is too large Load Diff

View File

@ -8,20 +8,24 @@
<div class="list">
<form @submit.prevent="submit">
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/phone_1.png" style="width: 37rpx; height: 42rpx;"></image>
<input type="text" class="texts" placeholder="输入您手机号码" v-model="mobile" required />
<div class="acea-row row-middle" v-if="current === 0">
<image src="/static/images/user_1.png" style="width: 40rpx; height: 40rpx;"></image>
<input type="text" class="texts" placeholder="请输入您的账号" v-model="mobile" required />
</div>
<div class="acea-row row-middle" v-else>
<image src="/static/images/phone_2.png" style="width: 40rpx; height: 40rpx;"></image>
<input type="text" class="texts" placeholder="请输入您的手机号" v-model="mobile" required />
</div>
</div>
<div class="item" v-if="current === 0">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
<image src="/static/images/code_3.png" style="width: 40rpx; height: 40rpx;"></image>
<input type="password" class="texts" placeholder="填写登录密码" v-model="password" required />
</div>
</div>
<div class="item" v-else>
<div class="acea-row row-middle">
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
<image src="/static/images/code_4.png" style="width: 40rpx; height: 40rpx;"></image>
<input type="text" placeholder="请输入您的验证码" class="texts" v-model="captcha" />
</div>
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
@ -369,6 +373,8 @@
.login-wrapper {
padding: 30rpx 52rpx;
background: url('@/static/images/bg-linear.png') center 0 no-repeat;
background-size:100% 672rpx;
.logo-wrap {
margin: 285rpx 0 85rpx 0;
@ -465,7 +471,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%);

View File

@ -1,37 +1,42 @@
<template>
<div class="login-wrapper">
<div class="shading">
<!-- <image :src="logoUrl"/> -->
<image :src="logoUrl" />
<!-- <image src="/static/images/logo2.png" v-if="!logoUrl" /> -->
<div class="logo-wrap">
<img src="/static/images/logo.png" style="width:127rpx;height:45rpx;"></image>
</div>
<view class="title">注册账号</view>
<div class="whiteBg">
<div class="list">
<form @submit.prevent="submit">
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/phone_1.png" style="width: 24rpx; height: 34rpx;"></image>
<image src="/static/images/user_1.png" style="width: 40rpx; height: 40rpx;"></image>
<input type="text" class="texts" placeholder="请输入姓名" v-model="registerForm.realName" required />
</div>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/phone_1.png" style="width: 28rpx; height: 32rpx;"></image>
<image src="/static/images/phone_2.png" style="width: 40rpx; height: 40rpx;"></image>
<input type="text" class="texts" placeholder="请输入手机号" v-model="registerForm.mobile" required />
</div>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
<input type="text" placeholder="填写验证码" class="codeIput" v-model="registerForm.code" />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
{{ text }}
</button>
<image src="/static/images/code_3.png" style="width: 40rpx; height: 40rpx;"></image>
<input type="text" placeholder="填写验证码" class="texts" v-model="registerForm.code" />
</div>
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
{{ text }}
</button>
</div>
</form>
</div>
<button class="logon" @click="onRegister" :disabled="loading" :loading="loading">注册</button>
<div class="protocol-wrap">
<u-checkbox-group v-model="checked">
<u-checkbox size="30" shape="circle" activeColor="#F35981" name="同意"></u-checkbox>
</u-checkbox-group>
<view class="text">我已阅读并同意 <span class="link">创盈商城用户协议</span></view>
</div>
</div>
<div class="bottom"></div>
</div>
@ -51,6 +56,7 @@
return {
logoUrl: '',
loading: false,
checked: [],
registerForm: {
realName: '',
mobile: '',
@ -67,7 +73,7 @@
const res = await register(this.registerForm)
this.$util.Tips({
title: res.code === 0 ? '注册成功' : res.msg
}, '/pages/users/login/index')
}, '/pages/users/register/success')
} catch (err) {
//TODO handle the exception
this.$util.Tips({
@ -84,6 +90,9 @@
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.registerForm.mobile)) return this.$util.Tips({
title: '请输入正确的手机号码'
});
if(this.checked.length === 0) return this.$util.Tips({
title: '请勾选同意用户协议'
});
await registerVerify(this.registerForm.mobile, 4)
.then(res => {
this.$util.Tips({
@ -191,7 +200,19 @@
}
.login-wrapper {
padding: 30rpx;
padding: 30rpx 52rpx;
background: url('@/static/images/bg-linear.png') center 0 no-repeat;
background-size:100% 672rpx;
.logo-wrap {
margin: 285rpx 0 85rpx 0;
}
.title {
font-size: 40rpx;
font-weight: 400;
color: #000;
}
.shading {
display: flex;
@ -215,25 +236,45 @@
}
.whiteBg {
margin-top: 100rpx;
margin-top: 46rpx;
.list {
border-radius: 16rpx;
overflow: hidden;
.item {
border-bottom: 1px solid #F0F0F0;
background: #fff;
margin-bottom: 38rpx;
height: 98rpx;
display: flex;
&:last-child {
margin-bottom: 0;
}
.code {
width: 197rpx;
text-align: center;
line-height: 96rpx;
background: #FFF3F6;
border: 1px solid #F54275;
border-radius: 15rpx;
font-size: 28rpx;
color: #F03A76;
margin-left: 19rpx;
}
.row-middle {
position: relative;
padding: 16rpx 45rpx;
padding: 28rpx;
background: #fff;
border: 1px solid #BFBFBF;
border-radius: 15rpx;
flex: 1;
.texts {
flex: 1;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
height: 42rpx;
line-height: 42rpx;
display: flex;
justify-content: center;
align-items: center;
@ -249,14 +290,6 @@
align-items: center;
}
.code {
position: absolute;
right: 30rpx;
top: 50%;
color: $theme-color;
font-size: 26rpx;
transform: translateY(-50%);
}
}
}
}
@ -266,18 +299,36 @@
align-items: center;
justify-content: center;
width: 100%;
height: 86rpx;
margin-top: 80rpx;
background-color: $theme-color;
border-radius: 120rpx;
height: 87rpx;
margin-top: 99rpx;
color: #FFFFFF;
font-size: 32rpx;
background: linear-gradient(0deg, #E63163 0%, #FF819F 100%);
border-radius: 44rpx;
font-size: 30rpx;
}
.tips {
margin: 30rpx;
text-align: center;
color: #999;
margin: 125rpx 20rpx 0 20rpx;
font-size: 24rpx;
color: #000;
display: flex;
justify-content: space-between;
}
.protocol-wrap {
margin: 131rpx 0 80rpx 0;
display: flex;
justify-content: center;
.text {
font-size: 24rpx;
color: #000;
.link {
color: #F35981;
}
}
}
}
}

View File

@ -0,0 +1,56 @@
<template>
<view class="register-success-wrap">
<image src="@/static/images/logo.png" class="icon"></image>
<view class="text">恭喜您注册成功</view>
<u-button class="logon" @click="onBackLogin"></u-button>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
onBackLogin() {
uni.navigateTo({
url: '/pages/users/login/index'
})
}
}
}
</script>
<style lang="scss" scoped>
.register-success-wrap {
padding: 0 50rpx;
text-align: center;
.icon {
margin: 428rpx auto 56rpx;
width: 98rpx;
height: 98rpx;
}
.text {
text-align: center;
font-size: 40rpx;
color: #000000;
}
.logon {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 87rpx;
margin-top: 237rpx;
color: #FFFFFF;
font-size: 32rpx;
background: linear-gradient(0deg, #E63163 0%, #FF819F 100%);
border-radius: 44rpx;
}
}
</style>

View File

@ -1,145 +1,246 @@
<template>
<div class="register absolute">
<div class="shading">
<div class="pictrue acea-row row-center-wrapper">
<image src="../../../static/images/logo2.png" />
</div>
</div>
<div class="whiteBg">
<div class="title">找回密码</div>
<div class="list">
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/phone_1.png"></image>
<input type="text" placeholder="输入手机号码" v-model="account" />
</div>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
{{ text }}
</button>
</div>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<input type="password" placeholder="填写您的新密码" v-model="password" />
</div>
</div>
<div class="item" v-if="isShowCode">
<div class="align-left">
<input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
<div class="code" @click="again"><img :src="codeUrl" /></div>
</div>
</div>
</div>
<div class="logon" @click="registerReset"></div>
<div class="tip">
<span class="font-color-red" @click="back"></span>
</div>
</div>
<div class="bottom"></div>
</div>
<div class="login-wrapper">
<div class="logo-wrap">
<img src="/static/images/logo.png" style="width:127rpx;height:45rpx;"></image>
</div>
<view class="title">找回密码</view>
<div class="whiteBg">
<div class="list">
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/phone_1.png" style="width: 40rpx; height: 40rpx;"></image>
<input type="text" class="texts" placeholder="输入手机号码" v-model="account" />
</div>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png" style="width: 40rpx; height: 40rpx;"></image>
<input type="text" class="texts" placeholder="填写验证码" v-model="captcha" />
</div>
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
{{ text }}
</button>
</div>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png" style="width: 40rpx; height: 40rpx;"></image>
<input type="password" class="texts" placeholder="填写您的新密码" v-model="password" />
</div>
</div>
<div class="item" v-if="isShowCode">
<div class="align-left">
<input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
<div class="code" @click="again"><img :src="codeUrl" /></div>
</div>
</div>
</div>
<div class="logon" @click="registerReset"></div>
<div class="tips">
<span @click="back"></span>
</div>
</div>
<div class="bottom"></div>
</div>
</template>
<script>
import sendVerifyCode from "@/mixins/SendVerifyCode";
import {
registerVerify,
registerReset,
getCodeApi
} from "@/api/user";
// import { validatorDefaultCatch } from "@/utils/dialog";
// import attrs, { required, alpha_num, chs_phone } from "@utils/validate";
// import { VUE_APP_API_URL } from "@utils";
import sendVerifyCode from "@/mixins/SendVerifyCode";
import {
registerVerify,
registerReset,
getCodeApi
} from "@/api/user";
// import { validatorDefaultCatch } from "@/utils/dialog";
// import attrs, { required, alpha_num, chs_phone } from "@utils/validate";
// import { VUE_APP_API_URL } from "@utils";
export default {
name: "RetrievePassword",
data: function() {
return {
account: "",
password: "",
captcha: "",
keyCode: "",
codeUrl: "",
codeVal: "",
isShowCode: false
};
},
mixins: [sendVerifyCode],
mounted: function() {
export default {
name: "RetrievePassword",
data: function() {
return {
account: "",
password: "",
captcha: "",
keyCode: "",
codeUrl: "",
codeVal: "",
isShowCode: false
};
},
mixins: [sendVerifyCode],
mounted: function() {
},
methods: {
back() {
uni.navigateBack();
},
again() {
this.codeUrl =
VUE_APP_API_URL + "/captcha?" + this.keyCode + Date.parse(new Date());
},
async registerReset() {
var that = this;
if (!that.account) return that.$util.Tips({
title: '请填写手机号码'
});
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
title: '请输入正确的手机号码'
});
if (!that.captcha) return that.$util.Tips({
title: '请填写验证码'
});
registerReset({
mobile: that.account,
password: that.password,
code: that.captcha
})
.then(res => {
that.$util.Tips({
title: res.message
}, {
tab: 3
})
})
.catch(res => {
that.$util.Tips({
title: res
})
});
},
async code() {
let that = this;
if (!that.account) return that.$util.Tips({
title: '请填写手机号码'
});
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
title: '请输入正确的手机号码'
});
await registerVerify(that.account, 3)
.then(res => {
// that.$dialog.success(res.message);
that.sendCode();
})
.catch(res => {
// if (res.data.status === 402) {
// that.codeUrl = `${VUE_APP_API_URL}/sms_captcha?key=${that.keyCode}`;
// that.isShowCode = true;
// }
that.$util.Tips({
title: res
});
});
},
}
};
},
methods: {
back() {
uni.navigateBack();
},
again() {
this.codeUrl =
VUE_APP_API_URL + "/captcha?" + this.keyCode + Date.parse(new Date());
},
async registerReset() {
var that = this;
if (!that.account) return that.$util.Tips({
title: '请填写手机号码'
});
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
title: '请输入正确的手机号码'
});
if (!that.captcha) return that.$util.Tips({
title: '请填写验证码'
});
registerReset({
mobile: that.account,
password: that.password,
code: that.captcha
})
.then(res => {
that.$util.Tips({
title: res.message
}, {
tab: 3
})
})
.catch(res => {
that.$util.Tips({
title: res
})
});
},
async code() {
let that = this;
if (!that.account) return that.$util.Tips({
title: '请填写手机号码'
});
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
title: '请输入正确的手机号码'
});
await registerVerify(that.account, 3)
.then(res => {
// that.$dialog.success(res.message);
that.sendCode();
})
.catch(res => {
// if (res.data.status === 402) {
// that.codeUrl = `${VUE_APP_API_URL}/sms_captcha?key=${that.keyCode}`;
// that.isShowCode = true;
// }
that.$util.Tips({
title: res
});
});
},
}
};
</script>
<style scoped>
.code img {
width: 100%;
height: 100%;
}
<style lang="scss" scoped>
.code img {
width: 100%;
height: 100%;
}
.acea-row.row-middle {
input {
margin-left: 20rpx;
display: block;
}
}
.login-wrapper {
padding: 30rpx 52rpx;
background: url('@/static/images/bg-linear.png') center 0 no-repeat;
background-size: 100% 672rpx;
.logo-wrap {
margin: 285rpx 0 85rpx 0;
}
.title {
font-size: 40rpx;
font-weight: 400;
color: #000;
}
.whiteBg {
margin-top: 46rpx;
.list {
overflow: hidden;
.item {
margin-bottom: 38rpx;
height: 98rpx;
display: flex;
&:last-child {
margin-bottom: 0;
}
.code {
width: 197rpx;
text-align: center;
line-height: 96rpx;
background: #FFF3F6;
border: 1px solid #F54275;
border-radius: 15rpx;
font-size: 28rpx;
color: #F03A76;
margin-left: 19rpx;
}
.row-middle {
position: relative;
padding: 28rpx;
background: #fff;
border: 1px solid #BFBFBF;
border-radius: 15rpx;
flex: 1;
.texts {
flex: 1;
font-size: 28rpx;
height: 42rpx;
line-height: 42rpx;
display: flex;
justify-content: center;
align-items: center;
}
input {
flex: 1;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
}
}
}
}
.logon {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 87rpx;
margin-top: 80rpx;
color: #FFFFFF;
font-size: 32rpx;
background: linear-gradient(0deg, #E63163 0%, #FF819F 100%);
border-radius: 44rpx;
}
.tips {
margin-top: 50rpx;
font-size: 24rpx;
color: #000;
display: flex;
justify-content: center;
}
}
}
</style>

View File

@ -78,13 +78,13 @@
poster: '',
isAuto: false, //
isShowAuth: false, //
qrcodeSize: 1000,
qrcodeSize: 3000,
PromotionCode: '',
base64List: [],
canvasStatus: true //
};
},
computed: mapGetters(['isLogin', 'uid', 'userInfo']),
computed: mapGetters(['isLogin', 'uid', 'userInfo','tenantId']),
watch: {
isLogin: {
handler: function(newV, oldV) {
@ -202,15 +202,17 @@
make() {
let that = this;
let href = '';
// #ifdef H5
href = window.location.href.split('/pages')[0];
// #endif
// href = window.location.href.split('/pages')[0];
const baseUrl = 'http://yuxy.perrymake.com';
const url =`${baseUrl}/pages/index/index?redirectUrl=${baseUrl}&tenantId=${that.tenantId}&spreadId=${that.uid}`
uQRCode.make({
canvasId: 'qrcode',
text: href + '/pages/index/index?spreadId=' + that.uid,
// text: href + '/pages/index/index?spreadId=' + that.uid,
text: url,
size: this.qrcodeSize,
margin: 10,
success: res => {
console.log('res', res)
that.PromotionCode = res;
setTimeout(() => {
that.PosterCanvas(this.base64List[0], that.PromotionCode, that.userInfo

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -3,6 +3,7 @@ export default {
isLogin: state => !!state.app.token,
backgroundColor: state => state.app.backgroundColor,
userInfo: state => state.app.userInfo || {},
tenantInfo: state => state.app.tenantInfo || {},
uid: state => state.app.uid,
tenantId: state => state.app.tenantId,
openId: state => state.app.openId,

View File

@ -11,7 +11,8 @@ import {
} from '../../config/cache';
import Cache from '../../utils/cache';
import {
USER_INFO
USER_INFO,
TENANT_INFO
} from '../../config/cache';
const state = {
@ -19,6 +20,7 @@ const state = {
refreshToken: Cache.get(REFRESH_TOKEN) || '',
backgroundColor: "#fff",
userInfo: Cache.get(USER_INFO)?JSON.parse(Cache.get(USER_INFO)):null,
tenantInfo: Cache.get(TENANT_INFO)?JSON.parse(Cache.get(TENANT_INFO)):null,
uid: Cache.get(UID) || null,
tenantId: Cache.get(TENANT_ID) || '',
spreadId: '',
@ -36,6 +38,10 @@ const mutations = {
Cache.set(LOGIN_STATUS, opt.token);
Cache.set(REFRESH_TOKEN, opt.refreshToken);
},
SET_TENANT_INFO(state,val){
state.tenantInfo = val
Cache.set(TENANT_INFO, val);
},
SETUID(state,val){
state.uid = val;
Cache.set(UID, val);