From ff682aedc3f8bee7b50e07572cc94a2d7dba53c1 Mon Sep 17 00:00:00 2001
From: clay <209192278@qq.com>
Date: Mon, 26 Dec 2022 22:19:45 +0800
Subject: [PATCH 01/10] =?UTF-8?q?dengjie=20commit=20:=20=E5=8F=91=E5=B8=83?=
=?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F=E8=A7=A3=E5=86=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/news/news.vue | 10 ++++++++--
components/products/products.vue | 2 +-
utills/date.js | 16 ++++++++++++++++
3 files changed, 25 insertions(+), 3 deletions(-)
create mode 100644 utills/date.js
diff --git a/components/news/news.vue b/components/news/news.vue
index 9ef6be4..0c0e4de 100644
--- a/components/news/news.vue
+++ b/components/news/news.vue
@@ -9,7 +9,7 @@
- {{item.pub_time}}
+ {{item.pub_time_str}}
{{item.pub_name}}
@@ -21,6 +21,9 @@
\ No newline at end of file
+
diff --git a/service/request.js b/service/request.js
index 22c98d9..5cb1159 100644
--- a/service/request.js
+++ b/service/request.js
@@ -1,4 +1,3 @@
-
const serverHost = 'https://pupil.hchyun.com/api' // https://api-ugo-web.itheima.net'
function isOutTime(res) {
if (res.data.message === '请先登录') {
@@ -190,10 +189,10 @@ const apiService = {
})
},
// 获取产品列表
- getProducts() {
- const url = `/home/product?sortType=1&pageSize=4&pageNum=1`
+ getProducts(data) {
+ const url = `/home/product?sortType=1`
return new Promise((resolve, reject) => {
- resolve(service.get(url))
+ resolve(service.get(url, data))
})
},
// 获取产品详情
@@ -231,76 +230,78 @@ const apiService = {
resolve(service.get(url, id))
})
},
- login: data => {
- data = Object.assign(data || {}, {})
- const url = `/api`
- return new Promise((resolve, reject) => {
- resolve(service.post(url, data, true))
- })
- },
+ login: data => {
+ data = Object.assign(data || {}, {})
+ const url = `/api`
+ return new Promise((resolve, reject) => {
+ resolve(service.post(url, data, true))
+ })
+ },
// 获取首页分类Tag
- getTags(data) {
- const url = `/home/tags`
- return new Promise((resolve, reject) => {
- resolve(service.get(url, data))
- })
- },
+ getTags(data) {
+ const url = `/home/tags`
+ return new Promise((resolve, reject) => {
+ resolve(service.get(url, data))
+ })
+ },
// 获取首页分类
- getCategories(data) {
- const url = `/home/classlist`
- return new Promise((resolve, reject) => {
- resolve(service.get(url, data))
- })
- },
- // 搜索发现 热搜
- getDiscover() {
- const url = `/home/discover`
- return new Promise((resolve, reject) => {
- resolve(service.get(url))
- })
- },
- // 搜索产品
- getProductList(data) {
- const url = `/home/product`
- return new Promise((resolve, reject) => {
- resolve(service.get(url, data))
- })
- },
- // 图片基本地址
- getImgUrl() {
- const url = `/center/cfg?key=img_url`
- return new Promise((resolve, reject) => {
- resolve(service.get(url))
- })
- },
- // 新增
- addOutboundOrder(data) {
- const url = `/api`
- return new Promise((resolve, reject) => {
- resolve(service.post(url, data))
- })
- },
- // 提交
- deliveryOrderConfirm(data) {
- const url = `/api`
- return new Promise((resolve, reject) => {
- resolve(service.post(url, data))
- })
- },
- // 解密
- decrypt(data) {
- const url = `/api`
- return new Promise((resolve, reject) => {
- resolve(service.post(url, { data }))
- })
- },
- // 国密sm4加密
- sm4Encrypt(data) {
- const url = `/api`
- return new Promise((resolve, reject) => {
- resolve(service.sm(url, data))
- })
- }
+ getCategories(data) {
+ const url = `/home/classlist`
+ return new Promise((resolve, reject) => {
+ resolve(service.get(url, data))
+ })
+ },
+ // 搜索发现 热搜
+ getDiscover() {
+ const url = `/home/discover`
+ return new Promise((resolve, reject) => {
+ resolve(service.get(url))
+ })
+ },
+ // 搜索产品
+ getProductList(data) {
+ const url = `/home/product`
+ return new Promise((resolve, reject) => {
+ resolve(service.get(url, data))
+ })
+ },
+ // 图片基本地址
+ getImgUrl() {
+ const url = `/center/cfg?key=img_url`
+ return new Promise((resolve, reject) => {
+ resolve(service.get(url))
+ })
+ },
+ // 新增
+ addOutboundOrder(data) {
+ const url = `/api`
+ return new Promise((resolve, reject) => {
+ resolve(service.post(url, data))
+ })
+ },
+ // 提交
+ deliveryOrderConfirm(data) {
+ const url = `/api`
+ return new Promise((resolve, reject) => {
+ resolve(service.post(url, data))
+ })
+ },
+ // 解密
+ decrypt(data) {
+ const url = `/api`
+ return new Promise((resolve, reject) => {
+ resolve(service.post(url, {
+ data
+ }))
+ })
+ },
+ // 国密sm4加密
+ sm4Encrypt(data) {
+ const url = `/api`
+ return new Promise((resolve, reject) => {
+ resolve(service.sm(url, data))
+ })
+ }
}
export {
apiService,
From 56bf10b47feb44aeecebc33ff87bc4dc2775d7ab Mon Sep 17 00:00:00 2001
From: clay <209192278@qq.com>
Date: Thu, 29 Dec 2022 09:48:45 +0800
Subject: [PATCH 04/10] =?UTF-8?q?=E5=BD=93=E8=8E=B7=E5=8F=96=E9=A6=96?=
=?UTF-8?q?=E9=A1=B5=E4=BA=A7=E5=93=81=E5=88=97=E8=A1=A8=E6=97=B6=EF=BC=8C?=
=?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=95=B0=E6=8D=AElength=E4=B8=BA0=E6=97=B6?=
=?UTF-8?q?=E5=8F=96=E6=B6=88=E5=8F=91=E9=80=81=E8=AF=B7=E6=B1=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/products/products.vue | 5 +----
pages/index/index.vue | 15 +++++++++------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/components/products/products.vue b/components/products/products.vue
index 372e49f..7f60bef 100644
--- a/components/products/products.vue
+++ b/components/products/products.vue
@@ -65,11 +65,8 @@
this.tagsArray = tag.split(',')
item.tags = this.tagsArray[0]
}
+ this.$emit("getChild", tags.length);
- // if (res.data.data.length == 0) {
- // requestTask.abort()
- // }
- console.log(res);
// 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
this.productList = [...this.productList, ...res.data.data]
diff --git a/pages/index/index.vue b/pages/index/index.vue
index cf9b3f6..e6ce84b 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -38,7 +38,7 @@
-
+
@@ -59,15 +59,14 @@
],
imgUrl: '',
swiperList: [],
+ reachBottomLength: ''
}
},
onReachBottom() {
- // console.log('pageNum===', this.$refs.getProducts);
this.$refs.getProducts.pageNum += 1
- this.$refs.getProducts.getProducts()
-
- //关闭下拉刷新
- // uni.stopPullDownRefresh()
+ if (this.reachBottomLength !== 0) {
+ this.$refs.getProducts.getProducts()
+ }
},
onLoad() {
this.getCategories()
@@ -77,6 +76,10 @@
},
methods: {
+ //获取子组件的getProducts方法返回数据的length,用于当length为0时取消发送请求
+ getChild(e) {
+ this.reachBottomLength = e
+ },
//获取一级分类
getCategories() {
this.$apiServe.getCategories().then(res => {
From 27787d3300cf4acdf761bbf76b74e72cc53bf7e2 Mon Sep 17 00:00:00 2001
From: clay <209192278@qq.com>
Date: Wed, 4 Jan 2023 16:46:46 +0800
Subject: [PATCH 05/10] 1
---
components/news/news.vue | 7 +------
pages/index/index.vue | 24 ++++++++++++++++++++----
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/components/news/news.vue b/components/news/news.vue
index 804dea6..05645e5 100644
--- a/components/news/news.vue
+++ b/components/news/news.vue
@@ -36,14 +36,9 @@
this.imgUrl = uni.getStorageSync('img_url')
},
methods: {
- //获取行业新闻
- // {
- // pageSize: 2,
- // pageNum: 1
- // }
getNews() {
this.$apiServe.getNews().then(res => {
- // console.log('行业新闻', res.data.data)
+ console.log('行业新闻', res.data.data)
for (const item of res.data.data) {
item.pub_time_str = dateFormat(item.pub_time_str)
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index e6ce84b..497fcb1 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -39,6 +39,9 @@
+
+ 没有更多数据了
@@ -79,6 +82,7 @@
//获取子组件的getProducts方法返回数据的length,用于当length为0时取消发送请求
getChild(e) {
this.reachBottomLength = e
+
},
//获取一级分类
getCategories() {
@@ -103,10 +107,18 @@
})
},
getphonenumber(e) {
+ let that = this
+ console.log(e);
+ //必须要公司注册,且微信认证过的小程序,才能获取到手机号的接口权限
+ if (e.detail.errMsg == "getPhoneNumber:fail ") {
+ console.log('用户拒绝提供手机号');
+ } else {
+ console.log('用户同意提供手机号');
+ }
const {
- code
+ phoneCode
} = e.detail;
- console.log("手机code : ", code);
+ console.log("手机code : ", phoneCode);
uni.login({
"provider": "weixin",
"onlyAuthorize": true, // 微信登录仅请求授权认证
@@ -118,7 +130,12 @@
console.log("登录code", code);
//客户端成功获取授权临时票据(code),向业务服务器发起登录请求。
// 调用登录接口 拿到token 传手机code,更新手机号码
-
+ let fromData = {
+ code: code
+ }
+ that.$apiServe.login(fromData).then(res => {
+ console.log(res);
+ })
},
fail: function(err) {
// 登录授权失败
@@ -134,7 +151,6 @@
},
getImgUrl() {
this.$apiServe.getImgUrl().then(res => {
- // console.log(res)
try {
uni.setStorageSync('img_url', res.data.data.img_url);
} catch (e) {
From 2417d8fe285a5b56b39637f1be14e564af1f56d9 Mon Sep 17 00:00:00 2001
From: clay <209192278@qq.com>
Date: Wed, 4 Jan 2023 20:58:04 +0800
Subject: [PATCH 06/10] =?UTF-8?q?token=E5=B7=B2=E5=AD=98=E5=85=A5Storage,?=
=?UTF-8?q?=20=E8=AE=A4=E8=AF=81=E5=8E=82=E5=AE=B6=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=88=9D=E6=AD=A5=E5=AE=8C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/news/news.vue | 2 +-
.../certifiedCjDetail/certifiedCjDetail.vue | 40 ++++------
pages/index/index.vue | 73 +++++++++----------
service/request.js | 49 +++++--------
4 files changed, 67 insertions(+), 97 deletions(-)
diff --git a/components/news/news.vue b/components/news/news.vue
index 05645e5..04c5dfe 100644
--- a/components/news/news.vue
+++ b/components/news/news.vue
@@ -38,7 +38,7 @@
methods: {
getNews() {
this.$apiServe.getNews().then(res => {
- console.log('行业新闻', res.data.data)
+ // console.log('行业新闻', res.data.data)
for (const item of res.data.data) {
item.pub_time_str = dateFormat(item.pub_time_str)
}
diff --git a/packageReport/certifiedCjDetail/certifiedCjDetail.vue b/packageReport/certifiedCjDetail/certifiedCjDetail.vue
index 3019065..cc4f94b 100644
--- a/packageReport/certifiedCjDetail/certifiedCjDetail.vue
+++ b/packageReport/certifiedCjDetail/certifiedCjDetail.vue
@@ -1,22 +1,22 @@
-
-
+
+
经营范围及特色
- {{features}}
+ {{detailList.desc}}
企业介绍
- {{business_introduce}}
+ {{detailList.content}}
企业展示
-
-
+
+
@@ -34,37 +34,23 @@
return {
id: '',
detailList: [],
- features: '活冻鲍鱼,冻煮鲍鱼,鲍鱼罐头 佛跳墙,海螺片',
- business_introduce: '福建省海纳川食品有限公司是一家从事水产养殖,加工与销售为一体的现代化企业,公司主要加工:活冻鲍鱼,溏心皇金鲍,兰花蟹,黄金鲍片,佛跳墙,大盆菜,火锅小章鱼,鲨鱼礼盒等系列产品。公司位于福建省自由贸易试验区马尾片区,离全国大的水产交易市场--马尾名成水产市场不到一公里,这里交通方便,商贾云集,冷链物流通达全国。',
- showList: [{
- src: '/static/report/zhanwei_xf(1).png'
- }, {
- src: '/static/report/zhanwei_xf(1).png'
- }, {
- src: '/static/report/zhanwei_xf(1).png'
- },
- {
- src: '/static/report/zhanwei_xf(1).png'
- },
- ],
- swiperList: [
- '/static/detail/cj_bg.png',
- '/static/detail/cj_bg.png'
- ]
-
+ imgUrl: ''
}
},
onLoad(option) {
- // console.log('认证厂家id', option.id);
this.id = option.id
this.getCertifiedCjDetail()
+ this.imgUrl = uni.getStorageSync('img_url')
},
methods: {
//获取认证厂家详情
getCertifiedCjDetail() {
this.$apiServe.getCertifiedCjDetail(this.id).then(res => {
- console.log('认证厂家详情页', res)
- // this.detailList = 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/index/index.vue b/pages/index/index.vue
index 497fcb1..24bef32 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -75,14 +75,48 @@
this.getCategories()
this.getBanner()
this.getImgUrl()
+ this.getToken()
this.imgUrl = uni.getStorageSync('img_url')
},
methods: {
+ getToken() {
+ var that = this
+ uni.login({
+ "provider": "weixin",
+ "onlyAuthorize": true, // 微信登录仅请求授权认证
+ success: function(event) {
+ 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);
+ })
+ },
+ fail: function(err) {
+ // 登录授权失败
+ // err.code是错误码
+ }
+ })
+ },
+ //获取手机code
+ getphonenumber(e) {
+ let that = this
+ // const {
+ // code
+ // } = e.detail;
+ // console.log("手机code : ", code);
+ },
//获取子组件的getProducts方法返回数据的length,用于当length为0时取消发送请求
getChild(e) {
this.reachBottomLength = e
-
},
//获取一级分类
getCategories() {
@@ -106,43 +140,6 @@
url: '../../packageSearch/search/search'
})
},
- getphonenumber(e) {
- let that = this
- console.log(e);
- //必须要公司注册,且微信认证过的小程序,才能获取到手机号的接口权限
- if (e.detail.errMsg == "getPhoneNumber:fail ") {
- console.log('用户拒绝提供手机号');
- } else {
- console.log('用户同意提供手机号');
- }
- const {
- phoneCode
- } = e.detail;
- console.log("手机code : ", phoneCode);
- uni.login({
- "provider": "weixin",
- "onlyAuthorize": true, // 微信登录仅请求授权认证
- success: function(event) {
- const {
- code
- } = event
-
- console.log("登录code", code);
- //客户端成功获取授权临时票据(code),向业务服务器发起登录请求。
- // 调用登录接口 拿到token 传手机code,更新手机号码
- let fromData = {
- code: code
- }
- that.$apiServe.login(fromData).then(res => {
- console.log(res);
- })
- },
- fail: function(err) {
- // 登录授权失败
- // err.code是错误码
- }
- })
- },
//点击一级分类跳转到分类页
toClassify() {
uni.navigateTo({
diff --git a/service/request.js b/service/request.js
index 5cb1159..9c31843 100644
--- a/service/request.js
+++ b/service/request.js
@@ -17,7 +17,8 @@ function isOutTime(res) {
const service = {
get(url, data) {
const header = {}
- header['Authorization'] = 'Bearer ' + uni.getStorageSync('token')
+ // header['Authorization'] = 'Bearer ' + uni.getStorageSync('token')
+ header['token'] = uni.getStorageSync('token')
header['content-type'] = 'application/json'
return new Promise((resolve, reject) => {
uni.request({
@@ -42,15 +43,8 @@ const service = {
},
post(url, data, isLogin) {
const header = {}
- if (isLogin) {
- // header['content-type'] = 'application/x-www-form-urlencoded';
- console.log(isLogin)
- header['Authorization'] = ''
- } else {
- header['Authorization'] = 'Bearer ' + uni.getStorageSync('token')
- header['content-type'] = 'application/json'
- }
-
+ header['token'] = uni.getStorageSync('token')
+ header['content-type'] = 'application/json'
return new Promise((resolve, reject) => {
uni.request({
method: 'post',
@@ -59,7 +53,6 @@ const service = {
header: header,
timeout: 30000,
success: res => {
- console.log(1111, res)
uni.hideLoading()
// if (res.data.exception === 'UnAuthorizedException') {
// let pages = getCurrentPages()
@@ -99,14 +92,8 @@ const service = {
},
put(url, data, isLogin) {
const header = {}
-
- if (isLogin) {
- header['content-type'] = 'application/x-www-form-urlencoded'
- } else {
- header['Authorization'] = 'Bearer ' + uni.getStorageSync('token')
- header['content-type'] = 'application/json'
- }
-
+ header['token'] = uni.getStorageSync('token')
+ header['content-type'] = 'application/json'
return new Promise((resolve, reject) => {
uni.request({
method: 'put',
@@ -117,7 +104,6 @@ const service = {
isOutTime(res)
reject(res)
}
-
resolve(res)
},
data: data,
@@ -174,11 +160,18 @@ const toast = {
const apiService = {
uploadImgUrl: serverHost,
imgUrl: serverHost,
- login: data => {
- data = Object.assign(data || {}, {})
- const url = `/api`
+ // login: data => {
+ // data = Object.assign(data || {}, {})
+ // const url = `/api`
+ // return new Promise((resolve, reject) => {
+ // resolve(service.post(url, data, true))
+ // })
+ // },
+ //登录接口
+ login(data) {
+ const url = `/login/mnpLogin`
return new Promise((resolve, reject) => {
- resolve(service.post(url, data, true))
+ resolve(service.post(url, data))
})
},
// 获取首页轮播图
@@ -230,13 +223,7 @@ const apiService = {
resolve(service.get(url, id))
})
},
- login: data => {
- data = Object.assign(data || {}, {})
- const url = `/api`
- return new Promise((resolve, reject) => {
- resolve(service.post(url, data, true))
- })
- },
+
// 获取首页分类Tag
getTags(data) {
const url = `/home/tags`
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 07/10] =?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}}
+ 是否拨打客服电话
+
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 1ddef91..0021780 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -94,8 +94,6 @@
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/report/report.vue b/pages/report/report.vue
index a6cd523..4b1833f 100644
--- a/pages/report/report.vue
+++ b/pages/report/report.vue
@@ -120,7 +120,9 @@
color: #5ACCF0;
}
-
+ .u-image__error {
+ position: static !important;
+ }
.xpfb_text {
diff --git a/service/request.js b/service/request.js
index 3ed2c8a..55b58c9 100644
--- a/service/request.js
+++ b/service/request.js
@@ -257,6 +257,13 @@ const apiService = {
resolve(service.post(url, pid))
})
},
+ //获取个人信息
+ getUser() {
+ const url = `/center/userinfo`
+ return new Promise((resolve, reject) => {
+ resolve(service.get(url))
+ })
+ },
// 获取首页分类Tag
getTags(data) {
const url = `/home/tags`
From 7e594aa3cb50850d8d82f1af42ccedf550b33b61 Mon Sep 17 00:00:00 2001
From: clay <209192278@qq.com>
Date: Fri, 6 Jan 2023 11:29:35 +0800
Subject: [PATCH 09/10] =?UTF-8?q?=E5=88=9B=E6=84=8F=E5=8F=91=E5=B8=83&?=
=?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8F=91=E5=B8=83=E5=88=97=E8=A1=A8=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=E5=88=9D=E6=AD=A5=E5=AE=8C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/myAvatar/myAvatar.vue | 2 +-
components/productsBtn/productsBtn.vue | 13 ++++++-
packageMy/memberCenter/memberCenter.vue | 4 +-
packageMy/myRelease/myRelease.vue | 49 ++++++++++---------------
service/request.js | 7 ++++
static/styles/news.scss | 3 ++
6 files changed, 43 insertions(+), 35 deletions(-)
diff --git a/components/myAvatar/myAvatar.vue b/components/myAvatar/myAvatar.vue
index be9044a..cd99e74 100644
--- a/components/myAvatar/myAvatar.vue
+++ b/components/myAvatar/myAvatar.vue
@@ -53,7 +53,7 @@
//获取普通会员和VIP会员
getUser() {
this.$apiServe.getUser().then(res => {
- console.log('个人信息==', res.data.data);
+ // console.log('个人信息==', res.data.data);
var data = res.data.data
this.avatar = data.avatar
this.nickname = data.nickname
diff --git a/components/productsBtn/productsBtn.vue b/components/productsBtn/productsBtn.vue
index 0c8bf0c..4999c8e 100644
--- a/components/productsBtn/productsBtn.vue
+++ b/components/productsBtn/productsBtn.vue
@@ -65,6 +65,9 @@
props: {
type: String
},
+ options: {
+ styleIsolation: 'shared', // 解除样式隔离
+ },
created() {
this.getHistoryOrCollection()
this.imgUrl = uni.getStorageSync('img_url')
@@ -109,7 +112,7 @@
}
-
diff --git a/packageMy/memberCenter/memberCenter.vue b/packageMy/memberCenter/memberCenter.vue
index 3699693..1e77072 100644
--- a/packageMy/memberCenter/memberCenter.vue
+++ b/packageMy/memberCenter/memberCenter.vue
@@ -4,11 +4,11 @@
+
{{commitment}}
-
@@ -77,8 +77,6 @@
border-radius: 20rpx !important;
}
-
-
.u-modal__content {
padding: 43rpx 104rpx !important;
text-indent: 14rpx;
diff --git a/packageMy/myRelease/myRelease.vue b/packageMy/myRelease/myRelease.vue
index 7c5f86d..621ece6 100644
--- a/packageMy/myRelease/myRelease.vue
+++ b/packageMy/myRelease/myRelease.vue
@@ -59,6 +59,7 @@
showM: false,
content: '您确定删除吗?',
tabCurrent: 0,
+ type: '',
tabsList: [{
name: '需求发布'
}, {
@@ -84,10 +85,27 @@
}
},
+ onLoad() {
+ if (this.tabCurrent == 0) {
+ this.type = 2
+ } else if (this.tabCurrent == 1) {
+ this.type = 1
+ }
+ this.getIdeasAndNeeds()
+ },
methods: {
+ //获取创意发布
+ getIdeasAndNeeds() {
+ this.$apiServe.getIdeasAndNeeds(this.type).then(res => {
+ console.log('获取创意发布&需求发布', res.data);
+ // this.productList = data
+ }).finally(_ => {
+
+ })
+ },
tabChange(data) {
this.tabCurrent = data.index
- this.needsPublishForm = {}
+ this.getIdeasAndNeeds()
},
//删除按钮
showModal() {
@@ -113,7 +131,6 @@
editIdeas() {
console.log('修改创意');
uni.reLaunch({
- // id=' + ideaId + '&
url: '/pages/ideasAndNeeds/ideasAndNeeds?index=' + 1
})
}
@@ -122,39 +139,11 @@