Merge branch 'wwz_x' of e.coding.net:g-cphe0354/xiaochengxusaomadiancan/cashier_weapp into wwz_d

This commit is contained in:
duan
2024-05-23 13:50:29 +08:00
9 changed files with 259 additions and 75 deletions

View File

@@ -13,9 +13,9 @@ export default {
return uni.api.get("/product/orderConfirm", data);
},
// 会员支付
accountPay(data) {
return uni.api.get("/pay/accountPay", data);
},
accountPay(data) {
return uni.api.get("/pay/accountPay", data);
},
// 下单
creatGroupOrder(data) {
return uni.api.post("/groupOrderInfo/creatGroupOrder", data);
@@ -68,7 +68,7 @@ export default {
return uni.api.post("/pay/modfiyOrderInfo", data);
},
// 获取余额
shopUserInfo(data) {
shopUserInfo(data) {
return uni.api.get("/user/shopUserInfo", data);
},
// 优惠券数量
@@ -116,9 +116,6 @@ export default {
orderfindCoupons(data) { //系统优惠券
return uni.api.get("/order/findCoupons", data);
},
loginuserInfo(data) { //获取用户信息
return uni.api.get("/login/userInfo", data);
},
tbPlatformDict(data) { //获取菜单
return uni.api.get("/tbPlatformDict", data);
},
@@ -132,7 +129,7 @@ export default {
return uni.api.get("/order/findWiningUser", data);
},
// 获取自己的免单订单
ordermineWinner(data) {
ordermineWinner(data) {
return uni.api.get("/order/mineWinner", data);
},
indexlist(data) { //商品列表(今日上新/热榜/咖啡饮品)
@@ -163,4 +160,10 @@ export default {
paygetActive(data) { // 获取充值活动
return uni.api.get("/pay/getActive", data);
},
paygetShopByMember(data) { // 获取会员店铺信息
return uni.api.get("/pay/getShopByMember", data, false);
},
loginmpdifyPwd(data) { // 修改资金密码
return uni.api.get("login/mpdifyPwd", data);
},
}

View File

@@ -16,22 +16,32 @@
<!-- #endif -->
<!-- 标题搜索框 -->
<view class="flex-between" @click="clicknavigateBack">
<view class="navbar_tow_one flex-start">
<view class="navbar_tow_one flex-start" v-if="iconshow">
<u-icon name="arrow-left" color="#000" size="40"></u-icon>
</view>
<!-- #ifndef MP-WEIXIN -->
<view class="navbar_tow_tow" v-if="opacity || titleshow">
{{title}}
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<view class="navbar_tow_tow" v-if="opacity || titleshow"
:style="{'padding-left':HeighT.custwidth-14 + 'px'}">
<!-- #endif -->
{{title}}
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {};
return {
Topdistance: ''
};
},
props: {
title: {
@@ -46,14 +56,31 @@
type: Boolean,
default: false
},
iconshow: {
type: Boolean,
default: true
}
},
computed: {
HeighT() { //手机类型的尺寸
return this.$store.getters.is_BarHeight
},
},
mounted() {
this.$nextTick(() => {
this.GetTop()
});
// 当组件挂载完成后获取距离
},
methods: {
clicknavigateBack(){
GetTop() {
this.$u.getRect('.navbar').then(res => {
this.Topdistance = res.height //滚动距离
this.$emit('Topdistance', res.height)
})
},
clicknavigateBack() {
uni.navigateBack()
}
}
@@ -135,6 +162,8 @@
}
.navbar_tow_tow {
text-align: center;
flex: auto;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;

View File

@@ -121,7 +121,8 @@
"style": {
"navigationBarTitleText": "个人中心",
"navigationBarBackgroundColor": "#FFD158",
"navigationBarTextStyle": "white"
"navigationBarTextStyle": "white",
"navigationStyle": "custom"
}
}, {
"path": "pages/user/repairpassword",

View File

@@ -2,17 +2,20 @@
<view class="content">
<view class="towcontentitem">
<view class="towcontentitemone flex-start">
<image class="towcontentitemoneimage" :src="userInfo.headImg" mode="aspectFill"></image>
<image class="towcontentitemoneimage" :src="userInfo.logo" mode="aspectFill"></image>
<view class="towcontentitemonetext flex-colum-start">
<text class="towcontentitemonetextone">{{userInfo.nickName || '暂无昵称'}}</text>
<text class="towcontentitemonetextone">{{userInfo.chainName || '暂无昵称'}}</text>
</view>
</view>
<view class="towcontentitemthere flex-start">
余额<text class="towcontentitemtheretext">{{memberlist.vip_number || '0.00'}}</text>
余额<text class="towcontentitemtheretext">{{userInfo.amount || '0.00'}}</text>
</view>
<view class="towcontentitemtow flex-between">
<text class="towcontentitemtowetext">{{memberlist.vip_number || '无'}}</text>
<text class="towcontentitemtowetext">vip{{userInfo.code || '无'}}</text>
</view>
<view class="towcontentitevip">
vip{{userInfo.is_vip}}
</view>
</view>
<view class="therecontent">
@@ -46,11 +49,24 @@
}
},
onLoad(e) {
// this.shopUser = uni.cache.get('shopUser')
this.userInfo = uni.cache.get('userInfo')
this.paygetActive()
console.log(e)
if (e.type == 'list') {//从列表进来的
this.paygetShopByMember(e.shopId_id)
}else{
this.paygetShopByMember(e.shopId_id)
}
this.paygetActive() //列表
},
methods: {
async paygetShopByMember(w) {
let res = await this.api.paygetShopByMember({
page: 1,
pageSize: 10,
userId: uni.cache.get('userInfo').id,
shopId: w
})
this.userInfo = res.data.list[0]
},
async paygetActive() {
let res = await this.api.paygetActive({
shopId: uni.cache.get('shopUser'),
@@ -201,13 +217,29 @@
}
.towcontentitemtow {
margin-top: 84rpx;
z-index: 10;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #422A07;
}
.towcontentitevip{
position: absolute;
right: 0;
top: 0;
width: 92rpx;
height: 40rpx;
font-size: 20rpx;
background: #F4C380;
border-radius: 0rpx 12rpx 0rpx 12rpx;
text-align: center;
line-height: 40rpx;
color: #fff;
font-family:Source Han Sans CN-Medium;
font-weight: Medium;
}
.towcontentitemthere {
margin-left: 92rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
@@ -292,6 +324,8 @@
}
.fivecontent {
position: relative;
bottom: 44rpx;
margin-top: 62rpx;
padding: 20rpx 0;
text-align: center;

View File

@@ -9,20 +9,20 @@
<image class="towcontentitemimage"
src="https://ointmentweapp.oss-cn-beijing.aliyuncs.com/my/recharge.png" mode="aspectFill"></image>
<view class="towcontentitemone flex-start">
<image class="towcontentitemoneimage" :src="item.store_avatar" mode="aspectFill"></image>
<text class="towcontentitemonetext" style="color: #333333;">{{item.store_title}}</text>
<image class="towcontentitemoneimage" :src="item.logo" mode="aspectFill"></image>
<text class="towcontentitemonetext" style="color: #333333;">{{item.chainName}}</text>
</view>
<view class="towcontentitemtow flex-between">
<text class="towcontentitemtowetext" style="color:#333333;">{{item.vip_number}}</text>
<text>{{item.end_time}}</text>
<text class="towcontentitemtowetext" style="color:#333333;">{{item.is_vip}}</text>
<text>{{item.shopName}}</text>
</view>
</view>
</view>
<view v-if="list.length==0 && is_end == true" class="flex-colum">
<view v-if="list.length== 0 && is_end == true" class="flex-colum" >
<image :src="bgnothave" mode="aspectFill">
</image>
</view>
<u-loadmore :status="form.status" />
<u-loadmore :status="form.status" iconSize='24' fontSize='24' height='40' />
</view>
</template>
@@ -30,53 +30,57 @@
export default {
data() {
return {
bgnothave:uni.getStorageSync('bgnothave'),
bgnothave: uni.getStorageSync('bgnothave'),
list: [],
is_end: false,
nickname: uni.cache.get('loginuser').userinfo.nickname,
nickname: uni.cache.get('userInfo').nickName,
form: {
page: 1,
page: 1, //页数
size: 10, //页容量
status: 'loadmore',
},
}
},
onShow() {
this.userusercarlist()
this.paygetShopByMember()
},
onReachBottom() {
this.userusercarlist()
},
computed: {
this.paygetShopByMember()
},
computed: {},
methods: {
async userusercarlist() {
let res = await this.api.userusercarlist({
async paygetShopByMember() {
let res = await this.api.paygetShopByMember({
page: this.form.page,
store_id:uni.cache.get('store_id')
pageSize: this.form.size,
userId: uni.cache.get('userInfo').id,
shopId:''
})
if (res.length == 0) {
this.is_end = true
if (res.data.pages < this.form.page) {
this.form.status = 'nomore'
if (this.form.page == 1 && res.data.list == 0) {
this.is_end = true
}
return false;
} else {
this.form.status = 'loading';
this.form.page = ++this.form.page;
setTimeout(() => {
this.list = [...this.list, ...res];
if (res.length == 10) {
this.form.status = 'loading';
} else {
this.is_end = true;
this.list = [...this.list, ...res.data.list];
this.form.status = 'loading';
if (res.data.pageNum == res.data.pages) {
this.form.status = 'nomore';
} else {
this.form.status = 'loading';
}
}, 500)
}
},
eeInfo(e) {
uni.pro.navigateTo('my/member/memberinfo',{
id: e.vip_id,
lang:1
eeInfo(item) {
uni.pro.navigateTo('member/index',{
shopId_id:item.shopId,
type:'list'
})
},
}
@@ -137,6 +141,7 @@
.towcontentitemone {
position: relative;
z-index: 10;
.towcontentitemoneimage {
width: 76rpx;
height: 76rpx;
@@ -162,7 +167,7 @@
width: 100%;
left: 0;
bottom: 18rpx;
padding:0 32rpx;
padding: 0 32rpx;
// margin-top: 52rpx;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;

View File

@@ -395,6 +395,7 @@
uni.showToast({
title: "支付成功"
})
uni.cache.set('shopUser','')//删除shopUser
this.paymodfiyOrderInfo()
setTimeout(res => {
uni.redirectTo({

View File

@@ -45,7 +45,7 @@
</view>
<image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
v-if="is_end" mode="aspectFill"></image>
<u-loadmore height='40' :status="form.status" iconSize='24' fontSize='24' />
<u-loadmore :status="form.status" iconSize='24' fontSize='24' height='40' />
</view>
</view>
</view>

View File

@@ -1,8 +1,8 @@
<template>
<view class="Box">
<view class="box_one">安全密码用于商户推广提现/订单退款确保资金安全</view>
<view class="box_one" v-if="isPwd == 0">安全密码用于商户推广提现/订单退款确保资金安全</view>
<view class="box_box">
<view class="box_item flex-between">
<view class="box_item flex-between" v-if="isPwd == 0">
<text class="top_box_one_text">手机号码</text>
<input type="number" v-model="form.mobile" placeholder="请输入手机号" maxlength="11" disabled="disabled" />
</view>
@@ -36,6 +36,7 @@
export default {
data() {
return {
isPwd: uni.cache.get('userInfo').isPwd,
form: {
mobile: uni.cache.get('userInfo').telephone,
password: '',
@@ -50,8 +51,14 @@
Recapture: '发送验证码'
};
},
onLoad() {},
onLoad() {
if (uni.cache.get('userInfo').isPwd != 0) {
uni.setNavigationBarTitle({
title: '忘记支付密码', // 标题文本,必须是字符串
});
}
},
methods: {
async CodeRegister() {
const res = await this.api.phoneValidateCode({
@@ -78,8 +85,8 @@
}
},
async userInfosavePayPassword() {
console.log(this.form.payPassword, this.form.password)
if (this.form.mobile.length != 11) {
if (this.form.mobile.length != 11 && this.isPwd == 0) {
uni.showToast({
title: '手机号必须是11位',
icon: 'none'
@@ -123,14 +130,21 @@
}
let res = await this.api.loginresetPwd({
pwd: this.form.password,
shopId: uni.cache.get('shopUser'),
code: this.form.checkCode
})
if (res == 1) {
uni.showToast({
title: '修改成功',
icon: 'none'
});
if (res.code == 0) {
if (uni.cache.get('userInfo').isPwd != 0) {
uni.showToast({
title: '修改成功',
icon: 'none'
});
} else {
uni.showToast({
title: '设置成功',
icon: 'none'
});
}
setTimeout(() => {
uni.navigateBack();
}, 1000);

View File

@@ -1,6 +1,6 @@
<template>
<view class="container">
<view class="user-info-wrap" @click="clickinformation">
<!-- <view class="user-info-wrap" @click="clickinformation">
<view style="width: 108rpx; height: 108rpx;border-radius: 50%;">
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-if="userInfo.headImg"
:src="userInfo.headImg" mode="aspectFill">
@@ -12,8 +12,35 @@
<view class="info flex-colum-start">
<text class="phone">{{userInfo.nickName || '无'}}</text>
</view>
</view> -->
<navseat :opacity='opacity' class="navseat" title='个人中心' :iconshow="false" :titleshow='true'></navseat>
<view class="boxtop">
<!-- #ifndef MP-WEIXIN -->
<view :style="{'height':Topdistance+'px'}"></view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<view :style="{'height':HeighT.customBar+HeighT.heightBar+'px'}"></view>
<!-- #endif -->
<view class="boxtop_top flex-between">
<view class="boxtop_topleft">
<view class="flex-start" v-if="userInfo.nickName">
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-if="userInfo.headImg"
:src="userInfo.headImg" mode="aspectFill">
</image>
<text>{{userInfo.nickName || '无'}}</text>
</view>
<view class="flex-start" v-else @click="loginClick">
<text>去登录</text>
</view>
</view>
<image style="width: 44rpx; height: 42.26rpx;"
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/user/kf.png" mode="aspectFill">
</view>
<image @click="memberlist" class="boxtop_botton" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/user/member.png"
mode="aspectFit"></image>
</view>
<view class="userinfoone">
<view class="userinfoone" v-if="teblist.length!=0">
<view class="userinfoonebox">
<view class="userinfooneboxitem flex-between" @click="clickinfo(item,index)"
v-for="(item,index) in teblist" :key="index">
@@ -25,31 +52,48 @@
</view>
</view>
</view>
<listitem :list='list'></listitem>
<listitem :list='list' v-if="list.length!=0"></listitem>
</view>
</template>
<script>
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
import listitem from "@/components/listitem.vue";
import navseat from '@/components/navseat.vue'
export default {
components: {
listitem
listitem,
navseat
},
data() {
return {
shopUser: {},
titlename: '个人中心',
opacity: false,
userInfo: {},
shopInfo: {},
teblist: [],
list: []
list: [],
Topdistance: ''
};
},
onLoad() {
this.init_fn()
},
computed: {
HeighT() { //手机类型的尺寸
return this.$store.getters.is_BarHeight
},
},
mounted() {
setTimeout(() => {
this.$nextTick(() => {
this.GetTop()
});
}, 1000)
// 当组件挂载完成后获取距离
},
onShow() {
if (uni.cache.get('token')) {
this.init_fn()
this.loginwxuserInfo()
this.tbPlatformDict()
}
@@ -58,6 +102,20 @@
clickinformation() {
uni.pro.navigateTo('user/information')
},
//获取元素距离顶部的距离
GetTop() {
this.$u.getRect('.content').then(res => {
console.log(1111, res)
this.Topdistance = res.height //滚动距离
})
},
memberlist(){
if (uni.cache.get('token')) {
uni.pro.navigateTo('member/list')
}else{
this.loginClick()
}
},
//退出登录
boxClick() {
uni.showModal({
@@ -78,6 +136,12 @@
}
});
},
loginClick() {
uni.cache.clear();
uni.reLaunch({
url: '/pages/login/login'
});
},
// 精选推荐
// 下面初始数据
init_fn() {
@@ -128,7 +192,7 @@
}
break;
case 'scan_applet':
uni.navigateToMiniProgram(JSON.parse(item.value))
uni.navigateToMiniProgram(JSON.parse(item.value))
break
case 'relative': //内部页面
uni.pro.navigateTo(item.absUrl)
@@ -153,7 +217,7 @@
let res = await this.api.tbPlatformDict({
type: 'ownMenu'
})
console.log(res)
// console.log(res)
if (res.code == 0) {
this.teblist = res.data
}
@@ -233,13 +297,46 @@
background-image: radial-gradient(40rpx at 0px 0px, rgba(0, 0, 0, 0) 40rpx, #fff 40rpx);
}
.boxtop {
width: 100%;
height: 542rpx;
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/user/user.png) no-repeat;
background-size: 100% 100%;
position: relative;
.boxtop_top {
padding: 0 32rpx;
margin-top: 52rpx;
.boxtop_topleft {
.flex-start {
text {
margin-left: 18rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 36rpx;
color: #333333;
}
}
}
}
.boxtop_botton {
position: absolute;
left: 50%;
bottom: 0;
transform: translatex(-50%);
width: 654rpx;
height: 160rpx;
}
}
.userinfoone {
position: relative;
padding: 48rpx 28rpx;
width: 100%;
top: -40rpx;
// top: -40rpx;
background: #F6F6F6;
border-radius: 40rpx 0 0rpx 0rpx;
// border-radius: 40rpx 0 0rpx 0rpx;
.userinfoonebox {
padding: 32rpx 20rpx 32rpx 52rpx;