Browse Source

更新小程序页面功能和样式

pull/3/head
徐飞洋 2 months ago
parent
commit
fb027478e5
  1. 4
      app.json
  2. 18
      pages/chat-detail/index.js
  3. 18
      pages/chat/index.js
  4. 13
      pages/cooperation/index.js
  5. 18
      pages/create-supply/index.js
  6. 12
      pages/customer-service/detail/index.js
  7. 18
      pages/customer-service/index.js
  8. 18
      pages/evaluate/index.js
  9. 18
      pages/favorites/index.js
  10. 22
      pages/goods-detail/goods-detail.js
  11. 2
      pages/index/index.js
  12. 18
      pages/message-list/index.js
  13. 18
      pages/notopen/index.js
  14. 18
      pages/profile/index.js
  15. 22
      pages/publish/index.js
  16. 22
      pages/settlement/index.js
  17. 3
      pages/settlement/index.json
  18. 3
      pages/settlement/index.wxml
  19. 6
      pages/settlement/index.wxss

4
app.json

@ -70,8 +70,8 @@
"text": "消息"
},
{
"pagePath": "pages/seller/index",
"text": "货源"
"pagePath": "pages/settlement/index",
"text": "入驻"
},
{
"pagePath": "pages/favorites/index",

18
pages/chat-detail/index.js

@ -2,6 +2,24 @@
const API = require('../../utils/api.js');
Page({
// 分享给朋友/群聊
onShareAppMessage() {
return {
title: '鸡蛋贸易平台 - 实时聊天,商务沟通',
path: '/pages/chat-detail/index',
imageUrl: '/images/你有好蛋.png'
}
},
// 分享到朋友圈
onShareTimeline() {
return {
title: '鸡蛋贸易平台 - 实时聊天,商务沟通',
query: '',
imageUrl: '/images/你有好蛋.png'
}
},
// 页面状态标志,用于检测页面是否已卸载
isUnloaded: false,

18
pages/chat/index.js

@ -2,6 +2,24 @@
const API = require('../../utils/api.js');
Page({
// 分享给朋友/群聊
onShareAppMessage() {
return {
title: '鸡蛋贸易平台 - 轻松交流,合作共赢',
path: '/pages/chat/index',
imageUrl: '/images/你有好蛋.png'
}
},
// 分享到朋友圈
onShareTimeline() {
return {
title: '鸡蛋贸易平台 - 轻松交流,合作共赢',
query: '',
imageUrl: '/images/你有好蛋.png'
}
},
data: {
chatList: [],
searchKeyword: '',

13
pages/cooperation/index.js

@ -70,12 +70,23 @@ Page({
};
},
/**
* 用户点击右上角分享到朋友圈
*/
onShareTimeline: function () {
return {
title: '招商合作 - 又鸟蛋平台',
query: '',
imageUrl: ''
};
},
/**
* 拨打电话
*/
makePhoneCall: function () {
wx.makePhoneCall({
phoneNumber: '138XXXXXXXX',
phoneNumber: '18280108971',
success: function () {
console.log('拨打电话成功');
},

18
pages/create-supply/index.js

@ -5,6 +5,24 @@
const API = require('../../utils/api.js');
Page({
// 分享给朋友/群聊
onShareAppMessage() {
return {
title: '鸡蛋贸易平台 - 发布货源,轻松销售',
path: '/pages/create-supply/index',
imageUrl: '/images/你有好蛋.png'
}
},
// 分享到朋友圈
onShareTimeline() {
return {
title: '鸡蛋贸易平台 - 发布货源,轻松销售',
query: '',
imageUrl: '/images/你有好蛋.png'
}
},
/**
* 页面的初始数据
*/

12
pages/customer-service/detail/index.js

@ -225,5 +225,17 @@ Page({
path: `/pages/customer-service/detail/index?id=${customerData?.id}`,
imageUrl: ''
};
},
/**
* 用户点击右上角分享到朋友圈
*/
onShareTimeline: function () {
const { customerData } = this.data;
return {
title: `${customerData?.alias || '优秀客服'} - 鸡蛋贸易平台`,
query: `id=${customerData?.id}`,
imageUrl: ''
};
}
});

18
pages/customer-service/index.js

@ -1,6 +1,24 @@
// pages/customer-service/index.js
const api = require('../../utils/api');
Page({
// 分享给朋友/群聊
onShareAppMessage() {
return {
title: '鸡蛋贸易平台 - 专业客服,服务贴心',
path: '/pages/customer-service/index',
imageUrl: '/images/你有好蛋.png'
}
},
// 分享到朋友圈
onShareTimeline() {
return {
title: '鸡蛋贸易平台 - 专业客服,服务贴心',
query: '',
imageUrl: '/images/你有好蛋.png'
}
},
// 客服数据,将从后端动态获取
data: {
customerServices: [],

18
pages/evaluate/index.js

@ -3,6 +3,24 @@
const api = require('../../utils/api.js');
Page({
// 分享给朋友/群聊
onShareAppMessage() {
return {
title: '鸡蛋贸易平台 - 智能估价,专业分析',
path: '/pages/evaluate/index',
imageUrl: '/images/你有好蛋.png'
}
},
// 分享到朋友圈
onShareTimeline() {
return {
title: '鸡蛋贸易平台 - 智能估价,专业分析',
query: '',
imageUrl: '/images/你有好蛋.png'
}
},
data: {
evaluateStep: 1,
fromPreviousStep: false, // 用于标记是否从下一步返回

18
pages/favorites/index.js

@ -135,11 +135,29 @@ Page({
},
/**
* 用户点击右上角分享
*/
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
return {
title: '我的收藏 - 又鸟蛋平台',
path: '/pages/favorites/index',
imageUrl: ''
};
},
/**
* 用户点击右上角分享到朋友圈
*/
onShareTimeline() {
return {
title: '我的收藏 - 又鸟蛋平台',
query: '',
imageUrl: ''
};
},
/**

22
pages/goods-detail/goods-detail.js

@ -65,6 +65,28 @@ function extractProvince(region) {
}
Page({
// 分享给朋友/群聊
onShareAppMessage() {
const goodsDetail = this.data.goodsDetail || {};
const title = goodsDetail.name ? `优质鸡蛋 - ${goodsDetail.name}` : '优质鸡蛋货源';
return {
title: title,
path: `/pages/goods-detail/goods-detail?productId=${goodsDetail.id || goodsDetail.productId}`,
imageUrl: goodsDetail.imageUrls && goodsDetail.imageUrls.length > 0 ? goodsDetail.imageUrls[0] : '/images/你有好蛋.png'
}
},
// 分享到朋友圈
onShareTimeline() {
const goodsDetail = this.data.goodsDetail || {};
const title = goodsDetail.name ? `优质鸡蛋 - ${goodsDetail.name}` : '优质鸡蛋货源';
return {
title: title,
query: `productId=${goodsDetail.id || goodsDetail.productId}`,
imageUrl: goodsDetail.imageUrls && goodsDetail.imageUrls.length > 0 ? goodsDetail.imageUrls[0] : '/images/你有好蛋.png'
}
},
data: {
goodsDetail: {}, // 当前商品详情
showImagePreview: false, // 控制图片预览弹窗显示

2
pages/index/index.js

@ -1150,7 +1150,7 @@ Page({
// 跳转到我要卖蛋页面
navigateToSettlement: function() {
wx.navigateTo({
wx.switchTab({
url: '/pages/settlement/index'
})
},

18
pages/message-list/index.js

@ -1,6 +1,24 @@
// pages/message-list/index.js
const API = require('../../utils/api.js');
Page({
// 分享给朋友/群聊
onShareAppMessage() {
return {
title: '鸡蛋贸易平台 - 消息通知,及时沟通',
path: '/pages/message-list/index',
imageUrl: '/images/你有好蛋.png'
}
},
// 分享到朋友圈
onShareTimeline() {
return {
title: '鸡蛋贸易平台 - 消息通知,及时沟通',
query: '',
imageUrl: '/images/你有好蛋.png'
}
},
data: {
messageList: [],
userInfo: {},

18
pages/notopen/index.js

@ -1,4 +1,22 @@
Page({
// 分享给朋友/群聊
onShareAppMessage() {
return {
title: '鸡蛋贸易平台 - 功能敬请期待',
path: '/pages/notopen/index',
imageUrl: '/images/你有好蛋.png'
}
},
// 分享到朋友圈
onShareTimeline() {
return {
title: '鸡蛋贸易平台 - 功能敬请期待',
query: '',
imageUrl: '/images/你有好蛋.png'
}
},
/**
* 页面的初始数据
*/

18
pages/profile/index.js

@ -1,5 +1,23 @@
// pages/profile/index.js
Page({
// 分享给朋友/群聊
onShareAppMessage() {
return {
title: '鸡蛋贸易平台 - 个人中心,查看我的信息',
path: '/pages/profile/index',
imageUrl: '/images/你有好蛋.png'
}
},
// 分享到朋友圈
onShareTimeline() {
return {
title: '鸡蛋贸易平台 - 个人中心,查看我的信息',
query: '',
imageUrl: '/images/你有好蛋.png'
}
},
data: {
userInfo: {},
userType: '',

22
pages/publish/index.js

@ -529,5 +529,27 @@ Page({
this.setData({
images: images
});
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return {
title: '发布商品 - 又鸟蛋平台',
path: '/pages/publish/index',
imageUrl: ''
};
},
/**
* 用户点击右上角分享到朋友圈
*/
onShareTimeline: function () {
return {
title: '发布商品 - 又鸟蛋平台',
query: '',
imageUrl: ''
};
}
});

22
pages/settlement/index.js

@ -1462,5 +1462,27 @@ Page({
showCooperationHelp: false,
selectedCooperationDetail: null
});
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return {
title: '合作入驻 - 又鸟蛋平台',
path: '/pages/settlement/index',
imageUrl: ''
};
},
/**
* 用户点击右上角分享到朋友圈
*/
onShareTimeline: function () {
return {
title: '合作入驻 - 又鸟蛋平台',
query: '',
imageUrl: ''
};
}
});

3
pages/settlement/index.json

@ -1,5 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "立即入驻",
"navigationBarBackButtonText": "返回"
"navigationBarTitleText": "立即入驻"
}

3
pages/settlement/index.wxml

@ -7,7 +7,6 @@
<view class="guide-title">成为供应商</view>
<view class="guide-description">完成入驻后即可发布货源,开展鸡蛋贸易</view>
<button class="guide-button btn btn-primary" bindtap="startSettlement">立即入驻</button>
<button class="guide-button btn btn-secondary" bindtap="goBack">返回</button>
</view>
</view>
@ -261,6 +260,8 @@
<button class="btn btn-primary" bindtap="submitApplication">提交申请</button>
<button class="btn btn-secondary" bindtap="prevStep">返回上一步</button>
<!-- 空白区域,防止按钮被底部遮挡 -->
<view class="bottom-spacer"></view>
</view>
<!-- 审核状态页面 -->

6
pages/settlement/index.wxss

@ -120,6 +120,12 @@ page {
padding-bottom: env(safe-area-inset-bottom);
}
/* 底部空白区域样式 - 防止按钮被底部遮挡 */
.bottom-spacer {
height: 100rpx; /* 预留底部空间,避免按钮被遮挡 */
width: 100%;
}
/* iOS特殊优化 */
@supports (-webkit-touch-callout: none) {
.form-input {

Loading…
Cancel
Save