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

View File

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

View File

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

View File

@ -87,12 +87,16 @@
uni.setStorageSync('App-Token', rex.data.data uni.setStorageSync('App-Token', rex.data.data
.token); .token);
uni.setStorageSync('chainStoreId', rex.data
.data
.chainStoreId);
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/index' url: '/pages/index/index'
}) })
} }
console.log("swq", uni.getStorageSync( console.log("swq", uni.getStorageSync(
'App-Token')); 'App-Token'));
}, },
fail: (res) => { fail: (res) => {
console.log("fail", res); console.log("fail", res);

View File

@ -14,9 +14,12 @@
<view class="hui-size">我的积分</view> <view class="hui-size">我的积分</view>
<view class="lan-num">{{myPoints}}</view> <view class="lan-num">{{myPoints}}</view>
</view> </view>
<view class="anniu" @click="login"> <view class="anniu" @click="sign" v-if="flag">
积分签到 积分签到
</view> </view>
<view class="anniu" v-if="!flag">
已签到
</view>
</view> </view>
</view> </view>
@ -51,7 +54,8 @@
return { return {
title: '', title: '',
myPoints: 0, // myPoints: 0, //
flag: true,
storeId: uni.getStorageSync('storeId')
} }
}, },
@ -60,6 +64,7 @@
}, },
onShow() { onShow() {
this.getUserInfoList(); this.getUserInfoList();
this.getTodayIsSignIn();
}, },
methods: { methods: {
// //
@ -83,9 +88,44 @@
uni.navigateBack() uni.navigateBack()
}, },
// getTodayIsSignIn() {
login() {
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();
}
})
} }
} }
} }