| @@ -8,7 +8,8 @@ | |||||
| "pages/orderDetail/orderDetail", | "pages/orderDetail/orderDetail", | ||||
| "pages/userProtocol/userProtocol", | "pages/userProtocol/userProtocol", | ||||
| "pages/mine/mine", | "pages/mine/mine", | ||||
| "pages/ContactUs/ContactUs" | |||||
| "pages/ContactUs/ContactUs", | |||||
| "pages/selections/selections" | |||||
| ], | ], | ||||
| "window": { | "window": { | ||||
| "backgroundTextStyle": "light", | "backgroundTextStyle": "light", | ||||
| @@ -434,6 +434,7 @@ Page({ | |||||
| }, | }, | ||||
| initVoiceManager() { | initVoiceManager() { | ||||
| const that = this | |||||
| manager.onRecognize = function (res) { | manager.onRecognize = function (res) { | ||||
| console.log("current result", res.result) | console.log("current result", res.result) | ||||
| } | } | ||||
| @@ -441,6 +442,13 @@ Page({ | |||||
| manager.onStop = function (res) { | manager.onStop = function (res) { | ||||
| console.log(res.tempFilePath, 'res'); | console.log(res.tempFilePath, 'res'); | ||||
| console.log(res.result, 'result'); | console.log(res.result, 'result'); | ||||
| if (res.result) { | |||||
| that.setData({ | |||||
| message: res.result | |||||
| }) | |||||
| that.send() | |||||
| } else { | |||||
| } | |||||
| wx.hideLoading() | wx.hideLoading() | ||||
| } | } | ||||
| @@ -33,7 +33,7 @@ | |||||
| <image wx:if="{{item.id == 1}}" class="arrowGreen" src="../../asset/icon/arrowGreen.png" mode="heightFix" /> | <image wx:if="{{item.id == 1}}" class="arrowGreen" src="../../asset/icon/arrowGreen.png" mode="heightFix" /> | ||||
| </view> | </view> | ||||
| <image class="userAvatar" wx:if="{{item.id && item.id == 1}}" src="../../asset/icon/user.png" mode="heightFix" /> | |||||
| <image class="userAvatar" wx:if="{{item.id && item.id == 1}}" src="../../asset/icon/UserSelect.png" mode="heightFix" /> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class='over' wx:if="{{reLoadSocket}}">聊天已挂起</view> | <view class='over' wx:if="{{reLoadSocket}}">聊天已挂起</view> | ||||
| @@ -125,8 +125,11 @@ Page({ | |||||
| }, | }, | ||||
| goToChat() { | goToChat() { | ||||
| // wx.navigateTo({ | |||||
| // url: '/pages/chat/chat', | |||||
| // }) | |||||
| wx.navigateTo({ | wx.navigateTo({ | ||||
| url: '/pages/chat/chat', | |||||
| url: '/pages/selections/selections', | |||||
| }) | }) | ||||
| }, | }, | ||||
| @@ -0,0 +1,110 @@ | |||||
| // pages/selections.ts | |||||
| const app = getApp() | |||||
| import request from '../../utils/request' | |||||
| import { scrollToID, keyWordsEnum } from '../../utils/util' | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| list: [ | |||||
| { | |||||
| id: 0, | |||||
| imgUrl: "../../asset/image/Audi-RS7-item.png", | |||||
| title: "标题", | |||||
| detail: "简述简述简述" | |||||
| }, | |||||
| { | |||||
| id: 1, | |||||
| imgUrl: "../../asset/image/Audi-RS7-item.png", | |||||
| title: "标题", | |||||
| detail: "简述简述简述" | |||||
| }, | |||||
| { | |||||
| id: 2, | |||||
| imgUrl: "../../asset/image/Audi-RS7-item.png", | |||||
| title: "标题", | |||||
| detail: "简述简述简述" | |||||
| }, | |||||
| { | |||||
| id: 3, | |||||
| imgUrl: "../../asset/image/Audi-RS7-item.png", | |||||
| title: "标题", | |||||
| detail: "简述简述简述" | |||||
| }, | |||||
| { | |||||
| id: 4, | |||||
| imgUrl: "../../asset/image/Audi-RS7-item.png", | |||||
| title: "标题", | |||||
| detail: "简述简述简述" | |||||
| }, | |||||
| ] | |||||
| }, | |||||
| getList() { | |||||
| request.get({ | |||||
| url: '/api/promote/list' | |||||
| }).then(res => { | |||||
| console.log(res, 'res'); | |||||
| }).catch(err => { | |||||
| console.log(err, 'err'); | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad() { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady() { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow() { | |||||
| this.getList() | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| onHide() { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload() { | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh() { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom() { | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage() { | |||||
| } | |||||
| }) | |||||
| @@ -0,0 +1,6 @@ | |||||
| { | |||||
| "navigationBarTitleText": "精品推荐", | |||||
| "navigationBarTextStyle": "white", | |||||
| "navigationBarBackgroundColor": "#0d1322", | |||||
| "usingComponents": {} | |||||
| } | |||||
| @@ -0,0 +1,50 @@ | |||||
| /* pages/selections.wxss */ | |||||
| page { | |||||
| .content { | |||||
| width: 100%; | |||||
| min-height: 1500rpx; | |||||
| background-color: #0d1322; | |||||
| padding-bottom: 35rpx; | |||||
| .BG { | |||||
| width: 100%; | |||||
| margin: auto; | |||||
| image { | |||||
| width: 100%; | |||||
| } | |||||
| } | |||||
| .artList { | |||||
| display: flex; | |||||
| justify-content: space-between; | |||||
| align-items: center; | |||||
| flex-flow: row wrap; | |||||
| flex-wrap: wrap; | |||||
| width: 100%; | |||||
| margin-top: 25rpx; | |||||
| .artItem { | |||||
| width: 45%; | |||||
| height: 280rpx; | |||||
| text-align: center; | |||||
| color: #ffffff; | |||||
| margin: 5rpx; | |||||
| border-radius: 10rpx; | |||||
| border: 2px solid #fff; | |||||
| padding: 10rpx; | |||||
| padding-bottom: 0; | |||||
| margin-bottom: 15rpx; | |||||
| image { | |||||
| width: 100%; | |||||
| } | |||||
| .textArea { | |||||
| background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,16 @@ | |||||
| <!--pages/selections.wxml--> | |||||
| <view class="content"> | |||||
| <view class="BG"> | |||||
| <image src="../../asset/image/Audi-RS7.png" mode="widthFix" /> | |||||
| </view> | |||||
| <view class="artList"> | |||||
| <view wx:for="{{ list }}" wx:key="id" class="artItem"> | |||||
| <image src="{{ item.imgUrl }}" mode="widthFix" /> | |||||
| <view class="textArea"> | |||||
| <view>{{ item.title }}</view> | |||||
| <view>{{ item.detail }}</view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| @@ -22,6 +22,13 @@ | |||||
| "query": "", | "query": "", | ||||
| "launchMode": "default", | "launchMode": "default", | ||||
| "scene": null | "scene": null | ||||
| }, | |||||
| { | |||||
| "name": "pages/selections/selections", | |||||
| "pathName": "pages/selections/selections", | |||||
| "query": "", | |||||
| "launchMode": "default", | |||||
| "scene": null | |||||
| } | } | ||||
| ] | ] | ||||
| } | } | ||||
| @@ -38,6 +38,7 @@ | |||||
| "miniprogram/pages/mine/mine.js", | "miniprogram/pages/mine/mine.js", | ||||
| "miniprogram/components/userNumberChkeck/userNumberChkeck.js", | "miniprogram/components/userNumberChkeck/userNumberChkeck.js", | ||||
| "miniprogram/pages/ContactUs/ContactUs.js", | "miniprogram/pages/ContactUs/ContactUs.js", | ||||
| "miniprogram/pages/selections/selections.js", | |||||
| ], | ], | ||||
| "exclude": [ | "exclude": [ | ||||
| "node_modules" | "node_modules" | ||||