前端 模板的更新

This commit is contained in:
@QQNZX 2024-01-04 09:10:33 +08:00
parent 0ecf231fd5
commit d79fe5d247
3 changed files with 57 additions and 8 deletions

View File

@ -181,6 +181,16 @@
} }
}, },
onLoad(query) { onLoad(query) {
if (query.storeId) {
uni.setStorageSync("y_storeId", query.storeId)
}
if (query.type) {
uni.setStorageSync("y_type", query.type)
}
if (query.userId) {
uni.setStorageSync("y_userId", query.userId)
}
const q = decodeURIComponent(query.q) // const q = decodeURIComponent(query.q) //
if (query.q) { if (query.q) {
let str = q.split("?")[1]; let str = q.split("?")[1];
@ -201,9 +211,9 @@
this.storeId = uni.getStorageSync("storeId") this.storeId = uni.getStorageSync("storeId")
this.staffId = uni.getStorageSync("inviteStaffId") this.staffId = uni.getStorageSync("inviteStaffId")
} else { } else {
if (uni.getStorageSync("storeId")){ if (uni.getStorageSync("storeId")) {
this.storeId = uni.getStorageSync("storeId") this.storeId = uni.getStorageSync("storeId")
}else{ } else {
let storeId = "19"; let storeId = "19";
uni.setStorageSync("storeId", storeId) uni.setStorageSync("storeId", storeId)
} }
@ -783,4 +793,4 @@
color: white; color: white;
margin: 0 auto; margin: 0 auto;
} }
</style> </style>

View File

@ -138,6 +138,11 @@
}, },
success: (rex) => { success: (rex) => {
console.log('请求成功', rex) console.log('请求成功', rex)
if (uni.getStorageSync("y_type") ==
'yaoqingyouli') {
this.activeRecommendRecords()
}
if (rex.data.code == 200) { if (rex.data.code == 200) {
uni.setStorageSync('App-Token', rex.data.data uni.setStorageSync('App-Token', rex.data.data
@ -174,6 +179,18 @@
} }
}) })
}, },
async activeRecommendRecords() {
let res = await request({
url: "clientApi/sign/alipayLogin/getUserid",
method: 'post',
data: {
storeId: uni.getStorageSync("y_storeId"),
type: uni.getStorageSync("y_type"),
userId: uni.getStorageSync("y_userId"),
},
})
},
goback() { goback() {
uni.navigateBack() uni.navigateBack()
} }
@ -330,4 +347,4 @@
border: 1px solid #0078FF; border: 1px solid #0078FF;
color: white; color: white;
} }
</style> </style>

View File

@ -23,7 +23,7 @@
</view> </view>
</view> </view>
<view class="x-box"> <view class="x-box">
<view class="l-naniu"> <view class="l-naniu" @click="show = true">
<u-icon name="grid" color="#FCDB5A" size="18"></u-icon> <u-icon name="grid" color="#FCDB5A" size="18"></u-icon>
<text>面对面邀请</text> <text>面对面邀请</text>
</view> </view>
@ -60,6 +60,11 @@
</view> </view>
</view> </view>
</view> </view>
<u-popup :show="show" mode="center" :round="10" @close="close" @open="open">
<view class="popup_box">
<w-qrcode :options="options"></w-qrcode>
</view>
</u-popup>
</view> </view>
</view> </view>
@ -75,7 +80,14 @@
title: '', title: '',
userId: '', userId: '',
storeId: '', storeId: '',
show: false,
options: {
code: 'https://www.tuofeng.cc/oilStation?storeId=' + uni.getStorageSync('storeId') + '&staffId=' + uni
.getStorageSync('storeId'),
// code: 'https://www.tuofeng.cc/oily?storeId=' + uni.getStorageSync('storeId') + ' &userId=' + uni
// .getStorageSync('userId'), //
size: 460, // 460460rpx
},
} }
}, },
@ -88,9 +100,10 @@
components: { components: {
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
title: '来个油惠1', title: '来个油惠',
path: '/pages/index/index?userId=' + uni.getStorageSync('userId') + '&storeId=' + uni.getStorageSync( path: '/pages/index/index?userId=' + uni.getStorageSync('userId') + '&storeId=' + uni.getStorageSync(
'storeId') + '&type=yaoqingyouli', 'storeId') + '&type=yaoqingyouli',
success() { success() {
@ -106,7 +119,13 @@
this.getActiveRecommendRecords(); this.getActiveRecommendRecords();
}, },
methods: { methods: {
// https://www.tuofeng.cc/oilStation?storeId=19&staffId=45
close() {
this.show = false
},
open() {
},
getAllAmount() { getAllAmount() {
request({ request({
url: 'business/marketingActivity/activeRecommendRecords/selectAllAmount', url: 'business/marketingActivity/activeRecommendRecords/selectAllAmount',
@ -341,7 +360,10 @@
box-shadow: 0px box-shadow: 0px
} }
.popup_box {
box-sizing: border-box;
padding: 15px;
}
button { button {
/* 清除默认边框 */ /* 清除默认边框 */