diff --git a/pages/index/index.vue b/pages/index/index.vue
index ab5f12f..2b70785 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -44,7 +44,7 @@
},
onLoad() {
this.getSwiperList();
- // this.checkLogin()
+ this.checkLogin()
},
onShow() {
this.page= "home"
diff --git a/pages/my/my.vue b/pages/my/my.vue
index 792de9a..b2de105 100644
--- a/pages/my/my.vue
+++ b/pages/my/my.vue
@@ -3,7 +3,7 @@
- 盛大鹏
+ {{name}}
@@ -12,7 +12,7 @@
- 0
+ {{medalNum}}
勋章
@@ -59,7 +59,9 @@
export default {
data() {
return {
+ medalNum:0,
page: "",
+ name:"",
avatarUrl: uni.$http.baseUrl + "/profile//2024/01/18/6147d64a3b94d7b3d3cc35aaf8cbfe06.png",
//轮播图数据列表
swiperList: [],
@@ -68,8 +70,11 @@
};
},
onLoad() {
+ this.name = this.userinfo.nickName;
+ this.avatarUrl = this.userinfo.avatarUrl;
this.getSwiperList()
this.getFunctionList()
+ this.getMyMedalList()
},
onShow() {
this.page = "my"
@@ -91,6 +96,16 @@
this.updateToken('')
}
},
+ async getMyMedalList() {
+
+ const {
+ data: res
+ } = await uni.$http.post('/small/wechat/showMyMedal',{openId:"cpqKnCOSsO+0mWqJI/T1MQ=="})
+ if (!res.success) return uni.$showMsg()
+ this.medalNum = res.data.length;
+
+ uni.$showMsg('数据请求成功!')
+ },
async getSwiperList() {
const {
diff --git a/subpkg/address/address.vue b/subpkg/address/address.vue
index a4719da..b605d50 100644
--- a/subpkg/address/address.vue
+++ b/subpkg/address/address.vue
@@ -41,7 +41,7 @@
{{goods.goods_name}}
- ¥{{goods.goods_price | tofixed}}
+ {{goods.goods_price | tofixed}}
diff --git a/subpkg/feedback/feedback.vue b/subpkg/feedback/feedback.vue
index 424f39f..340f8a1 100644
--- a/subpkg/feedback/feedback.vue
+++ b/subpkg/feedback/feedback.vue
@@ -23,15 +23,32 @@
},
}
},
+ computed: {
+ ...mapState('m_user', ['userinfo'])
+ },
methods:{
- toTable(){
- console.log(this.formData.mobile);
- console.log(this.formData.content);
- },
- setTable(mobile,content){
- this.formData.mobile = mobile//获取到的名称
- this.formData.content = content//获取到的单位名称
- },
+ async toTable(){
+ if(this.formData.content.length === 0){
+ return uni.$showMsg('请填写您要反馈的内容。')
+ }
+ const mobileReq = this.formData.mobile;
+ const contentReq = this.formData.content;
+ const req = {
+ content: contentReq,
+ mobile: mobileReq,
+ nickname: this.userinfo.nickName,
+ city: this.userinfo.city
+ }
+ const {
+ data: res
+ } = await uni.$http.post('/small/project/feedback/add',req)
+ if (!res.success) return uni.$showMsg()
+
+ this.formData.mobile =''
+ this.formData.content =''
+ return uni.$showMsg('非常感谢您提出宝贵的建议。我们非常重视您的反馈,会尽快对相关内容进行改进。')
+
+ }
}
}
diff --git a/subpkg/medal/medal.vue b/subpkg/medal/medal.vue
index 4f9e30e..12bad04 100644
--- a/subpkg/medal/medal.vue
+++ b/subpkg/medal/medal.vue
@@ -23,7 +23,7 @@
-
+
@@ -42,7 +42,8 @@
};
},
onLoad() {
- this.getMedalList()
+ this.getMedalList();
+ this.getMyMedalList()
},
methods: {
@@ -50,12 +51,26 @@
const {
data: res
- } = await uni.$http.post('/small/scene/manage/listAll',{name:this.name})
+ } = await uni.$http.post('/small/project/medal/listAll')
if (!res.success) return uni.$showMsg()
res.data.forEach(item=>{
- item.uploadPath = uni.$http.baseUrl +item.uploadPath
- this.taskMedalList.push(item.uploadPath)
+ item.iconPath = uni.$http.baseUrl +item.iconPath
+ this.taskMedalList.push(item.iconPath)
+ })
+
+ uni.$showMsg('数据请求成功!')
+ },
+ async getMyMedalList() {
+
+ const {
+ data: res
+ } = await uni.$http.post('/small/wechat/showMyMedal',{openId:"cpqKnCOSsO+0mWqJI/T1MQ=="})
+ if (!res.success) return uni.$showMsg()
+
+ res.data.forEach(item=>{
+ item.iconPath = uni.$http.baseUrl +item.iconPath
+ this.myMedalList.push(item.iconPath)
})
uni.$showMsg('数据请求成功!')