From f72f8966ba4e1715e8df82d5cf1c7e912b6da719 Mon Sep 17 00:00:00 2001 From: yiming <m13691596795@163.com> Date: 星期一, 01 四月 2024 10:21:07 +0800 Subject: [PATCH] 检索的bug --- packageBookService/pages/bookServices/detail/components/tree/index.wxml | 2 packageBookService/pages/bookServices/detail/components/tree/index.js | 11 + pages/retrievalPage/index.json | 4 packageDomain/pages/resourceDetails/myAudio/index.js | 3 pages/retrievalPage/index.wxml | 25 ++- pages/retrievalPage/index.js | 74 ++++++++++++ packageDomain/pages/resourceDetails/myAudio/index.wxml | 175 +++++------------------------ pages/retrievalPage/index.wxss | 21 +++ 8 files changed, 160 insertions(+), 155 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js index d6814f5..9162c3a 100644 --- a/packageBookService/pages/bookServices/detail/components/tree/index.js +++ b/packageBookService/pages/bookServices/detail/components/tree/index.js @@ -402,6 +402,12 @@ }) if (shoppingCartGetId.includes(saleMethodId)) { console.log(111); + + wx.showToast({ + icon: 'error', + title: '宸叉坊鍔�', + }) + } else { let query = { requests: [{ @@ -412,6 +418,11 @@ } const addRes = await app.MG.store.addShoppingCart(query) console.log(addRes, 'addRes'); + wx.showToast({ + icon: 'success', + title: '娣诲姞鎴愬姛', + }) + } }, diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.wxml b/packageBookService/pages/bookServices/detail/components/tree/index.wxml index 9c5eb2f..28f02cb 100644 --- a/packageBookService/pages/bookServices/detail/components/tree/index.wxml +++ b/packageBookService/pages/bookServices/detail/components/tree/index.wxml @@ -47,7 +47,7 @@ <!-- 浜戝涔犺瘯鐪嬪浘鏍� --> <image src="/static/images/bookService/detail/shikan.png" class="testSee" wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}"></image> <!-- 浜戝涔犲姞鍏ヨ喘鐗╄溅鍥炬爣 --> - <image src="/static/images/bookService/detail/cart.png" wx:if="{{citem.isShopCar}}" class="shopCar" data-item="{{citem}}" bind:tap="onCloudShoppingCart"></image> + <image src="/static/images/bookService/detail/cart.png" wx:if="{{citem.isShopCar}}" class="shopCar" data-item="{{citem}}" catch:tap="onCloudShoppingCart"></image> <!-- 浜戝涔犺喘涔板浘鏍� --> <image src="/static/images/bookService/detail/need-buy.png" class="need-buy" wx:if="{{citem.isbuy }}"></image> </view> diff --git a/packageDomain/pages/resourceDetails/myAudio/index.js b/packageDomain/pages/resourceDetails/myAudio/index.js index d2378ee..0fbf416 100644 --- a/packageDomain/pages/resourceDetails/myAudio/index.js +++ b/packageDomain/pages/resourceDetails/myAudio/index.js @@ -108,6 +108,9 @@ showData: '', }); myAudio.src = '' + + + console.log(this.data.myAudioPos, this.data.isplay, this.data.myAudioCurrent, this.data.showData, myAudio.src); }, /** diff --git a/packageDomain/pages/resourceDetails/myAudio/index.wxml b/packageDomain/pages/resourceDetails/myAudio/index.wxml index 90482e5..76ccfc2 100644 --- a/packageDomain/pages/resourceDetails/myAudio/index.wxml +++ b/packageDomain/pages/resourceDetails/myAudio/index.wxml @@ -1,21 +1,13 @@ <view style="width: 100%; height: {{barHeight}}px; "></view> <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> <view> - <t-icon - name="chevron-left" - size="30" - data-name="{{item}}" - bind:click="goBack" - /> + <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> </view> <view class="navbar-title">璧勬簮璇︽儏-闊抽</view> </view> <view class="audioPlayerBox"> - <view - class="audioBackground" - style="background-image: url('http://182.92.203.7:3007/jsek/website/image/video-bg.png');" - > + <view class="audioBackground" style="background-image: url('http://182.92.203.7:3007/jsek/website/image/video-bg.png');"> <image src="/static/images/resourceDetailsMyAudio/cd.png" alt="" /> </view> <!-- 瑙嗛鎾斁鐨勬寜閽� --> @@ -27,6 +19,7 @@ </view> --> <!-- 鏆傚仠鎾斁 --> +<<<<<<< Updated upstream <view class="audioIconBox color" style="margin-left: 30rpx; margin-right: 10rpx" @@ -37,6 +30,11 @@ src="/static/images/resourceDetailsMyAudio/play@2x.png" mode="" /> +======= + <view class="audioIconBox color" style="margin-left: 30rpx; margin-right: 10rpx"> + <view wx:if="{{!isplay}}" bind:tap="play"> + <t-icon name="play-circle-stroke" size="24" /> +>>>>>>> Stashed changes </view> <view wx:else bind:tap="stop" class="pauseCircleBox"> <!-- <t-icon name="pause-circle-stroke" size="24" /> --> @@ -46,14 +44,7 @@ /> </view> </view> - <slider - style="width: 300rpx" - activeColor="#FF6C00" - class="mp-slider-bar" - block-size="16" - value="{{myAudioPos}}" - bindchange="hanle_slider_change" - ></slider> + <slider style="width: 300rpx" activeColor="#FF6C00" class="mp-slider-bar" block-size="16" value="{{myAudioPos}}" bindchange="hanle_slider_change"></slider> <!-- 鍙冲垏鎹� --> <!-- <view class="rightSwitchBox color" bind:tap="onRightSwitch"> <t-icon name="next" size="24" /> @@ -68,46 +59,14 @@ <view class="publicBtn color"> <view class="publicText" bind:tap="toggleDropdown"> <view> {{"x "+speed}} </view> - <t-icon - style="margin-top: 10rpx" - wx:if="{{showDropdown}}" - name="caret-up-small" - size="14" - bind:click="onIconTap" - /> - <t-icon - style="margin-top: 10rpx" - wx:else - name="caret-down-small" - size="14" - bind:click="onIconTap" - /> + <t-icon style="margin-top: 10rpx" wx:if="{{showDropdown}}" name="caret-up-small" size="14" bind:click="onIconTap" /> + <t-icon style="margin-top: 10rpx" wx:else name="caret-down-small" size="14" bind:click="onIconTap" /> </view> <view class="multipleBox" wx:if="{{showDropdown}}"> - <view - wx:if="{{speed != 0.5}}" - style="margin: 5rpx 0" - bind:tap="smallSpeed" - >x0.5</view - > - <view - wx:if="{{speed != 1}}" - style="margin: 5rpx 0" - bind:tap="smallSpeeDmultiple" - >x1</view - > - <view - wx:if="{{speed != 1.5}}" - style="margin: 5rpx 0" - bind:tap="centreSpeed" - >x1.5</view - > - <view - wx:if="{{speed != 2}}" - style="margin: 5rpx 0" - bind:tap="bigSpeed" - >x2</view - > + <view wx:if="{{speed != 0.5}}" style="margin: 5rpx 0" bind:tap="smallSpeed">x0.5</view> + <view wx:if="{{speed != 1}}" style="margin: 5rpx 0" bind:tap="smallSpeeDmultiple">x1</view> + <view wx:if="{{speed != 1.5}}" style="margin: 5rpx 0" bind:tap="centreSpeed">x1.5</view> + <view wx:if="{{speed != 2}}" style="margin: 5rpx 0" bind:tap="bigSpeed">x2</view> </view> </view> </view> @@ -117,36 +76,14 @@ <!-- 鏍囬 --> <view class="titleBox">{{titleName}}</view> <view class="contentBox"> - <t-tabs - defaultValue="{{0}}" - bind:change="onTabsChange" - bind:click="onTabsClick" - t-class="custom-tabs" - t-class-content="custom-panel" - > + <t-tabs defaultValue="{{0}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" t-class-content="custom-panel"> <!-- 璧勬簮鍒楄〃 --> - <t-tab-panel - label="璧勬簮鍒楄〃" - value="0" - style="{{tabPanelstyle}}" - style="width: 750rpx" - > + <t-tab-panel label="璧勬簮鍒楄〃" value="0" style="{{tabPanelstyle}}" style="width: 750rpx"> <view class="wrapper"> <t-collapse value="{{activeValues}}" bind:change="handleChange"> <t-collapse-panel header="{{parentName}}" value="{{0}}" expandIcon> - <view - class="detailsName" - wx:for="{{threeLeveData}}" - wx:key="index" - wx:for-item="item" - wx:for-index="index" - bind:tap="onVideo" - data-item="{{item}}" - data-index="{{index}}" - > - <view style="color: {{selectedId == index ? '#ff6c00' : '#000'}}" - >{{item.name}}</view - > + <view class="detailsName" wx:for="{{threeLeveData}}" wx:key="index" wx:for-item="item" wx:for-index="index" bind:tap="onVideo" data-item="{{item}}" data-index="{{index}}"> + <view style="color: {{selectedId == index ? '#ff6c00' : '#000'}}">{{item.name}}</view> </view> </t-collapse-panel> </t-collapse> @@ -160,16 +97,9 @@ <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> </view> - <t-collapse-panel - value="{{item.id}}" - expandIcon - wx:for="{{noteList}}" - > + <t-collapse-panel value="{{item.id}}" expandIcon wx:for="{{noteList}}"> <view slot="header" class="collapse-header"> - <t-image - class="note-icon" - src="/static/images/bookService/detail/note-icon.png" - ></t-image> + <t-image class="note-icon" src="/static/images/bookService/detail/note-icon.png"></t-image> <view class="header-name">{{titleName}}</view> </view> <view> @@ -177,19 +107,9 @@ <view class="note-bottom"> <view class="note-time">{{item.createDate}}</view> <view class="bottom-btn"> - <t-image - src="/static/images/bookService/detail/compliceHover.png" - class="complice" - bind:tap="editNote" - data-note="{{item}}" - ></t-image> + <t-image src="/static/images/bookService/detail/compliceHover.png" class="complice" bind:tap="editNote" data-note="{{item}}"></t-image> <view></view> - <t-image - src="/static/images/bookService/detail/deleteHover.png" - class="delete" - bind:tap="deleteNote" - data-id="{{item.id}}" - ></t-image> + <t-image src="/static/images/bookService/detail/deleteHover.png" class="delete" bind:tap="deleteNote" data-id="{{item.id}}"></t-image> </view> </view> </view> @@ -208,62 +128,27 @@ </view> <!-- 璁扮瑪璁板脊绐� --> -<t-popup - visible="{{dialogKey}}" - bind:visible-change="onVisibleChange" - placement="center" -> +<t-popup visible="{{dialogKey}}" bind:visible-change="onVisibleChange" placement="center"> <view class="popup"> <view slot="title"> <view class="title-text" wx:if="{{!flag}}"> <text class="note-title">{{titleName}}</text> - <t-image - src="/static/images/bookService/detail/edit.png" - class="edit-icon" - bind:tap="changeTitle" - data-value="{{true}}" - ></t-image> + <t-image src="/static/images/bookService/detail/edit.png" class="edit-icon" bind:tap="changeTitle" data-value="{{true}}"></t-image> </view> <view wx:else> - <t-input - value="{{titleName}}" - style="{{inputStyle}}" - data-value="{{false}}" - bind:enter="changeTitle" - bind:blur="changeTitle" - maxlength="{{50}}" - bind:change="inputChange" - ></t-input> + <t-input value="{{titleName}}" style="{{inputStyle}}" data-value="{{false}}" bind:enter="changeTitle" bind:blur="changeTitle" maxlength="{{50}}" bind:change="inputChange"></t-input> </view> </view> <view slot="content"> <view class="textarea-example"> <text class="textarea-example__label">鍐呭:</text> - <t-textarea - value="{{textvalue}}" - t-class="external-class" - placeholder="璇疯緭鍏ユ枃瀛�" - bordered - maxlength="500" - disableDefaultPadding="{{true}}" - indicator - style="{{inputStyle}}" - bind:change="textareaChange" - /> + <t-textarea value="{{textvalue}}" t-class="external-class" placeholder="璇疯緭鍏ユ枃瀛�" bordered maxlength="500" disableDefaultPadding="{{true}}" indicator style="{{inputStyle}}" bind:change="textareaChange" /> </view> <view class="submit-btn"> - <t-button theme="primary" size="large" block bind:tap="confirmSuggest" - >鎻愪氦</t-button - > + <t-button theme="primary" size="large" block bind:tap="confirmSuggest">鎻愪氦</t-button> </view> </view> </view> - <t-icon - t-class="close-btn" - name="close-circle" - size="32" - color="#fff" - bind:tap="closeDialog" - /> -</t-popup> + <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="closeDialog" /> +</t-popup> \ No newline at end of file diff --git a/pages/retrievalPage/index.js b/pages/retrievalPage/index.js index bd94d94..9874ac2 100644 --- a/pages/retrievalPage/index.js +++ b/pages/retrievalPage/index.js @@ -11,6 +11,11 @@ * 椤甸潰鐨勫垵濮嬫暟鎹� */ data: { + input: '', + dialogKey: '', + showWithInput: false, + showTextAndTitleWithInput: false, + downloadLoadin: false, isMore: null, tabPanelstyle: 'display:flex;justify-content:center;align-items:center;', navBarHeight: '', @@ -731,8 +736,77 @@ }) this.retrievalPageGet() } + }, + + underConstruction() { + wx.showToast({ + title: "寤鸿涓�", + icon: 'none', + duration: 1000 + }) + }, + // 閭鐐瑰嚮 + mailbox(e) { + console.log(e); + const key = e.currentTarget.dataset.key; + const item = e.currentTarget.dataset.item; + + this.setData({ + [key]: true, + dialogKey: key, + input: '', + Md5: item.datas.freeFile.FileList[0].Md5 + }); + }, + //閭鐨勬牎楠� + onEmailInput(e) { + const isEmailValid = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(e.detail.value); + this.setData({ + emailError: !isEmailValid, + "input": e.detail.value, + }); + }, + //寮圭獥纭 + onConfirm() { + if (!this.data.emailError && this.data.input) { + const { + dialogKey + } = this.data; + this.setData({ + [dialogKey]: false + }); + console.log(this.data.input); + console.log(this.data.Md5); + if (this.data.input) { + let query = { + eMail: this.data.input, + md5s: [this.data.Md5] + } + app.MG.file.sendFileWithEmail(query).then(res => { + console.log(res); + }) + } + } else { + // 鏍¢獙涓嶉�氳繃锛岀粰鍑洪敊璇彁绀� + wx.showToast({ + title: '閭鏍煎紡涓嶆纭�', + icon: 'none', + }); + } }, + // 寮圭獥鍙栨秷 + closeDialog() { + const { + dialogKey + } = this.data; + this.setData({ + [dialogKey]: false + }); + console.log(111); + }, + + }) \ No newline at end of file diff --git a/pages/retrievalPage/index.json b/pages/retrievalPage/index.json index a348276..8a94889 100644 --- a/pages/retrievalPage/index.json +++ b/pages/retrievalPage/index.json @@ -8,7 +8,9 @@ "t-empty": "tdesign-miniprogram/empty/empty", "t-toast": "tdesign-miniprogram/toast/toast", "t-loading": "tdesign-miniprogram/loading/loading", - "t-image": "tdesign-miniprogram/image/image" + "t-image": "tdesign-miniprogram/image/image", + "t-dialog": "tdesign-miniprogram/dialog/dialog", + "t-input": "tdesign-miniprogram/input/input" }, "navigationStyle": "custom", "enablePullDownRefresh": true, diff --git a/pages/retrievalPage/index.wxml b/pages/retrievalPage/index.wxml index 8a16098..58e2947 100644 --- a/pages/retrievalPage/index.wxml +++ b/pages/retrievalPage/index.wxml @@ -51,7 +51,7 @@ <view> <view wx:for="{{courseData}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="listItemBox"> - <view class="listItem flex"> + <view class="listItem flex" data-item="{{item}}" bind:tap="underConstruction"> <view class="specialSubject-img-box"> <image src="{{item.icon}}" mode="aspectFill" /> </view> @@ -88,7 +88,7 @@ <view class="bookDataBox"> - <view class="bookDataForBox" wx:for="{{digitalTextbooksData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> + <view class="bookDataForBox" wx:for="{{digitalTextbooksData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="underConstruction"> <view class="imageBox"> <image src="{{item.icon}}" mode="" /> </view> @@ -113,7 +113,7 @@ <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" /> </view> <view class="listBox"> - <view wx:for="{{seminarData}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox"> + <view wx:for="{{seminarData}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox" data-item="{{item}}" bind:tap="underConstruction"> <view class="listItem" bindtap="goSubjectDetail" data-book="{{item}}"> <view class="specialSubject-img"> <image src="{{item.icon}}" mode="aspectFill" class="img" /> @@ -150,17 +150,20 @@ <view class="higherBox" wx:for="{{bookFairData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> <view class="outsideHigherImageBox"> - <image class="higherImageBox" src="{{item.icon}}" mode="" /> - <view class="downloadIcon" bind:tap="downloadData" data-item="{{item}}"> + <view bind:tap="downloadData" data-item="{{item}}"> - <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/downloadshiftin.png" mode="" /> - <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/download.png" mode="" /> + <image class="higherImageBox" src="{{item.icon}}" mode="" /> + </view> + + <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" bind:tap="mailbox"> + + <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="" /> + <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="" /> </view> </view> <view class="higherTextBox">{{item.name}}</view> </view> - </view> @@ -196,5 +199,11 @@ </t-tab-panel> </t-tabs> </view> + <view class="dialogBox"> + <t-dialog visible="{{showWithInput}}" title="璇疯緭鍏ラ偖绠�" confirm-btn="纭畾" cancel-btn="鍙栨秷" bind:confirm="onConfirm" bind:cancel="closeDialog"> + <t-input model:value="{{input}}" borderless class="dialog-input" clearable slot="content" placeholder="璇疯緭鍏ラ偖绠卞彿" placeholder-class="placeholder" bindchange="onEmailInput" /> + + </t-dialog> + </view> </view> \ No newline at end of file diff --git a/pages/retrievalPage/index.wxss b/pages/retrievalPage/index.wxss index 96ded0b..9e89117 100644 --- a/pages/retrievalPage/index.wxss +++ b/pages/retrievalPage/index.wxss @@ -348,4 +348,25 @@ .body-info .price { font-size: 26rpx; color: #ff6d00; +} + +.dialogBox .t-input__control { + + min-height: 100rpx; +} + +.t-button--text { + color: #000 !important; + +} + +.t-button--text.t-button--primary { + color: var(--td-button-primary-text-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9))) !important; + background: none; +} + +.t-input__control { + /* border: 1rpx #000 solid; */ + background-color: #F9F9F9; + width: 100%; } \ No newline at end of file -- Gitblit v1.9.1