This commit is contained in:
wangh 2023-12-05 13:33:30 +08:00
parent e56b940fb5
commit 49529cd230
5 changed files with 63 additions and 15 deletions

View File

@ -61,8 +61,7 @@
<view class="box-goods" v-for="(item,index) in integralGiftList" :key="index"
@click="godetails(item)">
<view class="goods-img">
<image :src="baseUrl+'/static/uploadImages/20231106/75bfd9e936974f7a94c2c04e17df1d1b.png'"
mode=""></image>
<image :src="baseUrl+item.coverImage" mode=""></image>
</view>
<view class="goods-title">
{{item.giftName}}
@ -109,7 +108,9 @@
title: '',
qhindex: -1,
baseUrl: config.baseUrl,
storeId: uni.getStorageSync('storeId'),
query: {
storeId: uni.getStorageSync('storeId'),
categoryId: '',
giftName: '',
deliveryMethod: '',
@ -143,19 +144,21 @@
//
getCategoryList() {
request({
url: 'business/integral/integralGiftCategory/queryByPage',
url: 'business/integral/integralGiftCategory/queryListByStoreId',
method: 'get',
params: {
storeId: this.storeId
}
}).then((res) => {
if (res.code == 200) {
this.categoryList = res.data.records
this.categoryList = res.data
}
})
},
//
getIntegralGiftList() {
request({
url: 'business/integral/integralGift/queryByPage',
url: 'business/integral/integralGift/queryByPageByStoreId',
method: 'get',
params: this.query
}).then((res) => {

View File

@ -57,6 +57,7 @@
}
},
onLoad() {
this.dataForm = {}
uni.$on('addressInfo', (data) => {
if (data != null) {
this.dataForm = data
@ -68,8 +69,6 @@
}
})
uni.$emit('unAddressInfo')
},
components: {

View File

@ -327,9 +327,11 @@
// storeid
getStroeById() {
request({
url: 'business/storeInformation/store',
url: 'business/storeInformation/store/storeInfoUni',
method: 'get',
// params:{}
params: {
storeId: uni.getStorageSync('storeId')
}
}).then((res) => {
if (res.code == 200) {
this.myPoints = res.data.points

View File

@ -87,6 +87,10 @@
uni.setStorageSync('App-Token', rex.data.data
.token);
uni.setStorageSync('chainStoreId', rex.data
.data
.chainStoreId);
uni.navigateTo({
url: '/pages/index/index'
})

View File

@ -14,9 +14,12 @@
<view class="hui-size">我的积分</view>
<view class="lan-num">{{myPoints}}</view>
</view>
<view class="anniu" @click="login">
<view class="anniu" @click="sign" v-if="flag">
积分签到
</view>
<view class="anniu" v-if="!flag">
已签到
</view>
</view>
</view>
@ -51,7 +54,8 @@
return {
title: '',
myPoints: 0, //
flag: true,
storeId: uni.getStorageSync('storeId')
}
},
@ -60,6 +64,7 @@
},
onShow() {
this.getUserInfoList();
this.getTodayIsSignIn();
},
methods: {
//
@ -83,9 +88,44 @@
uni.navigateBack()
},
//
login() {
getTodayIsSignIn() {
request({
url: 'business/integral/integralSettings/todayIsSignIn',
method: 'get',
params: {
storeId: this.storeId
}
}).then((res) => {
if (res.code == 200) {
if (res.data != 0) {
this.flag = false
} else {
this.flag = true
}
}
})
},
//
sign() {
let integralSettings = {
storeId: this.storeId
}
request({
url: 'business/integral/integralSettings/signInFunction',
method: 'post',
data: integralSettings
}).then((res) => {
if (res.code == 200) {
//
uni.showToast({
title: '标题',
duration: 2000
});
this.getUserInfoList();
this.getTodayIsSignIn();
}
})
}
}
}