From 458f5a2562a5cfe91868181fc22da3aa3665ea01 Mon Sep 17 00:00:00 2001
From: clay <209192278@qq.com>
Date: Thu, 5 Jan 2023 21:57:51 +0800
Subject: [PATCH] =?UTF-8?q?dengjie=20commit=20:=20=E6=88=91=E7=9A=84?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/myAvatar/myAvatar.vue | 16 +-
components/myForm/myForm.vue | 4 +-
components/products/products.vue | 2 -
components/productsBtn/productsBtn.vue | 126 ++++++++++
packageMy/bindCompany/bindCompany.vue | 43 ++++
packageMy/bindCompony/bindCompony.vue | 29 ---
packageMy/browseHistory/browseHistory.vue | 235 +-----------------
packageMy/memberCenter/memberCenter.vue | 38 ++-
packageMy/myCollection/myCollection.vue | 15 ++
.../certifiedCjDetail/certifiedCjDetail.vue | 3 +-
pages.json | 11 +-
.../detail/productsDetail/productsDetail.vue | 44 ++--
pages/index/index.vue | 12 +-
pages/my/my.vue | 44 +---
service/request.js | 37 ++-
static/styles/myAvatar.scss | 36 ++-
utills/date.js | 17 +-
17 files changed, 341 insertions(+), 371 deletions(-)
create mode 100644 components/productsBtn/productsBtn.vue
create mode 100644 packageMy/bindCompany/bindCompany.vue
delete mode 100644 packageMy/bindCompony/bindCompony.vue
create mode 100644 packageMy/myCollection/myCollection.vue
diff --git a/components/myAvatar/myAvatar.vue b/components/myAvatar/myAvatar.vue
index 5636e89..4f014ce 100644
--- a/components/myAvatar/myAvatar.vue
+++ b/components/myAvatar/myAvatar.vue
@@ -1,6 +1,6 @@
-
+
@@ -10,12 +10,11 @@
- 顾发航
+ {{nickname}}
-
@@ -32,7 +31,8 @@
return {
show: false,
showEdit: true,
- avatar: 'https://cdn.uviewui.com/uview/album/2.jpg',
+ avatar: '',
+ nickname: '',
normal: '/static/my/wo_icon_pthy.png',
VIP: '/static/my/wo_icon_vip.png',
};
@@ -41,6 +41,8 @@
if (this.center != false) {
this.showEdit = false
}
+ this.avatar = uni.getStorageSync('avatar')
+ this.nickname = uni.getStorageSync('nickname')
},
methods: {
//修改头像
@@ -48,11 +50,7 @@
uni.navigateTo({
url: '../../packageMy/changeAvatar/changeAvatar'
})
- }
+ },
}
}
-
-
diff --git a/components/myForm/myForm.vue b/components/myForm/myForm.vue
index 7b50066..feb7b95 100644
--- a/components/myForm/myForm.vue
+++ b/components/myForm/myForm.vue
@@ -21,8 +21,8 @@
return {
model: {
userInfo: {
- name: '',
- phone: '',
+ name: '姓名',
+ phone: '2342233',
},
},
};
diff --git a/components/products/products.vue b/components/products/products.vue
index 7f60bef..cf8f41c 100644
--- a/components/products/products.vue
+++ b/components/products/products.vue
@@ -48,9 +48,7 @@
created() {
this.getProducts()
this.imgUrl = uni.getStorageSync('img_url')
-
},
-
methods: {
//获取产品列表
getProducts() {
diff --git a/components/productsBtn/productsBtn.vue b/components/productsBtn/productsBtn.vue
new file mode 100644
index 0000000..0c8bf0c
--- /dev/null
+++ b/components/productsBtn/productsBtn.vue
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{item.cate_name}}
+
+
+
+ {{item.name}}
+
+
+
+ {{item.title}}
+
+
+
+
+ 发布日期:
+ {{item.create_time}}
+
+
+
+
+
+
+
+
+
+
+ 暂无更多浏览记录
+
+ 暂无更多收藏记录
+
+
+
+
+
+
+
diff --git a/packageMy/bindCompany/bindCompany.vue b/packageMy/bindCompany/bindCompany.vue
new file mode 100644
index 0000000..b004335
--- /dev/null
+++ b/packageMy/bindCompany/bindCompany.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/packageMy/bindCompony/bindCompony.vue b/packageMy/bindCompony/bindCompony.vue
deleted file mode 100644
index a8b567a..0000000
--- a/packageMy/bindCompony/bindCompony.vue
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/packageMy/browseHistory/browseHistory.vue b/packageMy/browseHistory/browseHistory.vue
index 7cb58e7..07e859c 100644
--- a/packageMy/browseHistory/browseHistory.vue
+++ b/packageMy/browseHistory/browseHistory.vue
@@ -1,43 +1,6 @@
-
-
-
-
-
-
-
-
-
- {{item.img_tag}}
-
-
-
- {{item.title}}
-
-
-
-
- {{item.desc}}
-
-
-
-
- 发布日期:
- {{item.time}}
-
-
-
-
-
-
-
-
-
-
+
@@ -45,202 +8,8 @@
export default {
data() {
return {
- showM: false,
- content: '您确定移除吗?',
- type: '',
- productList: [{
- src: '/static/products/zhanwei_dg.png',
- title: '锅巴',
- tag: '无添加剂',
- img_tag: '零食铺子',
- desc: '糯米蟹黄锅巴散装,非油炸绿色健康食品',
- time: '2022-12-04'
- },
- {
- src: '/static/products/zhanwei_dg.png',
- title: '干吃汤圆',
- tag: '天然原料',
- img_tag: '糕点卷酥',
- desc: '休闲食品厂家甜品糯米食品零食闽南特产宵夜好吃糍粑',
- time: '2022-12-04'
- },
- {
- src: '/static/products/zhanwei_dg.png',
- title: '紫薯魔芋人参魔芋人参魔芋人参…',
- tag: '天然原料',
- img_tag: '健康创新',
- desc: '紫薯魔芋人参代餐粉 冲调饮品贴牌加工 五谷杂粮粉代餐',
- time: '2022-12-04'
- },
- {
- src: '/static/products/zhanwei_dg.png',
- title: '焦糖饼干',
- tag: '无防腐剂',
- img_tag: '饼干曲奇',
- desc: '比利时风味焦糖饼干代餐小吃零食品',
- time: '2022-12-04'
- }
- ]
- }
- },
- onLoad(options) {
- this.type = options.id
- },
- methods: {
- //移除按钮
- showModal() {
- this.showM = true
- },
- confirm() {
-
- },
- cancel() {
- this.showM = false
- },
- close() {
- this.showM = false
+ type: ''
}
}
}
-
-
diff --git a/packageMy/memberCenter/memberCenter.vue b/packageMy/memberCenter/memberCenter.vue
index ac0b352..3699693 100644
--- a/packageMy/memberCenter/memberCenter.vue
+++ b/packageMy/memberCenter/memberCenter.vue
@@ -4,7 +4,7 @@
-
+
{{commitment}}
@@ -20,6 +20,8 @@
export default {
data() {
return {
+ name: '',
+ phone: '',
showM: false,
//会员中心的用户名旁边不显示edit图标
show: false,
@@ -28,6 +30,10 @@
commitment: '承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置承诺声明预留文字位置'
}
},
+ onLoad() {
+ this.name = this.$refs.nameAndphone.model.userInfo.name
+ this.phone = this.$refs.nameAndphone.model.userInfo.phone
+ },
methods: {
// 联系客服模态框
showModal() {
@@ -35,6 +41,14 @@
},
confirm() {
this.showM = false
+ this.$apiServe.bindComponyAndUpdate({
+ uid: 1,
+ type: 2,
+ companyPhone: this.phone,
+ companyName: this.name
+ }).then(res => {
+ console.log('升级VIP', res);
+ }).finally(_ => {})
},
cancel() {
this.showM = false
@@ -63,30 +77,10 @@
border-radius: 20rpx !important;
}
- .u-modal {
- width: 472rpx !important;
- }
+
.u-modal__content {
padding: 43rpx 104rpx !important;
text-indent: 14rpx;
}
-
- .u-modal__content__text {
- font-size: 32rpx !important;
- font-weight: 400;
- color: #252421 !important;
- }
-
- .u-modal__button-group__wrapper--hover {
- background: #0EBB5B !important;
- }
-
- .u-modal__button-group__wrapper--confirm {
- background: #0EBB5B;
-
- .u-modal__button-group__wrapper__text {
- color: #fff !important;
- }
- }
diff --git a/packageMy/myCollection/myCollection.vue b/packageMy/myCollection/myCollection.vue
new file mode 100644
index 0000000..96dc571
--- /dev/null
+++ b/packageMy/myCollection/myCollection.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
diff --git a/packageReport/certifiedCjDetail/certifiedCjDetail.vue b/packageReport/certifiedCjDetail/certifiedCjDetail.vue
index cc4f94b..7284fcc 100644
--- a/packageReport/certifiedCjDetail/certifiedCjDetail.vue
+++ b/packageReport/certifiedCjDetail/certifiedCjDetail.vue
@@ -46,10 +46,9 @@
//获取认证厂家详情
getCertifiedCjDetail() {
this.$apiServe.getCertifiedCjDetail(this.id).then(res => {
- console.log('认证厂家详情页', res.data.data)
+ // console.log('认证厂家详情页', res.data.data)
let data = res.data.data
data.images = data.images.split(';')
- console.log('data.images', data.images);
this.detailList = data
}).finally(_ => {})
},
diff --git a/pages.json b/pages.json
index 1e0c3ad..64e0298 100644
--- a/pages.json
+++ b/pages.json
@@ -68,7 +68,7 @@
"subPackages": [{
"root": "packageMy",
"pages": [{
- "path": "bindCompony/bindCompony",
+ "path": "bindCompany/bindCompany",
"style": {
"navigationBarTitleText": "绑定公司",
"navigationBarTextStyle": "white",
@@ -108,6 +108,15 @@
"enablePullDownRefresh": false
}
+ }, {
+ "path": "myCollection/myCollection",
+ "style": {
+ "navigationBarTitleText": "我的收藏",
+ "navigationBarTextStyle": "white",
+ "navigationBarBackgroundColor": "#12CA64",
+ "enablePullDownRefresh": false
+ }
+
}]
},
{
diff --git a/pages/detail/productsDetail/productsDetail.vue b/pages/detail/productsDetail/productsDetail.vue
index 6a331ee..a12ce01 100644
--- a/pages/detail/productsDetail/productsDetail.vue
+++ b/pages/detail/productsDetail/productsDetail.vue
@@ -3,16 +3,15 @@
-
+
-
+
-
+
-
@@ -32,20 +31,20 @@
{{item}}
-
-
-
-
-
- 点赞
-
-
-
+
+
{{detailList.thumb}}赞
+
+
+
+
+
+ 点赞
+
@@ -71,9 +70,7 @@
id: '',
imgUrl: '',
tagsArray: [],
- showStar: false,
showHeart: false,
- isThumb: false,
detailList: []
}
},
@@ -86,7 +83,7 @@
//获取详情信息
getProductDetail() {
this.$apiServe.getProductDetail(this.id).then(res => {
- // console.log('详情页', res.data.data)
+ console.log('详情页', res.data.data)
if (res.data.data.thumb) {
this.isThumb = true
}
@@ -100,7 +97,12 @@
},
//收藏按钮
starTap() {
- this.showStar = !this.showStar
+ this.detailList.type = !this.detailList.type
+ // this.$apiServe.collect(this.id).then(res => {
+ // console.log('收藏成功', res.data)
+
+ // this.detailList.type = 1
+ // }).finally(_ => {})
},
//点赞按钮
heartTap() {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 24bef32..1ddef91 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -78,7 +78,6 @@
this.getToken()
this.imgUrl = uni.getStorageSync('img_url')
},
-
methods: {
getToken() {
var that = this
@@ -89,15 +88,14 @@
const {
code
} = event
- console.log("登录code", code);
- let fromData = {
- code: code
- }
that.$apiServe.login({
code: code
}).then(res => {
- console.log('登录code换取的用户', res.data.data);
- uni.setStorageSync('token', res.data.data.token);
+ var data = res.data.data
+ // console.log('登录code换取的信息', data);
+ uni.setStorageSync('token', data.token);
+ uni.setStorageSync('avatar', data.avatar);
+ uni.setStorageSync('nickname', data.nickname);
})
},
fail: function(err) {
diff --git a/pages/my/my.vue b/pages/my/my.vue
index 21bc1ac..345513f 100644
--- a/pages/my/my.vue
+++ b/pages/my/my.vue
@@ -24,27 +24,29 @@
-
+
+ {{phone}}
+ 是否拨打客服电话
+