超碰中文网,91久久精品日日躁夜夜躁欧美,一区二区三区精品道,一区二区国产在线观看,亚洲精品中文字幕乱码一区二区,天天看片高清影视在线观看,久久99精品久久久久蜜桃,久久成人影视

VPS參考測評推薦
專注分享VPS主機(jī)優(yōu)惠信息
衡天云優(yōu)惠活動
熱網(wǎng)互聯(lián)2026年促銷活動
hostkvm優(yōu)惠促銷活動
zji優(yōu)惠促銷活動
QQGNET優(yōu)惠促銷活動
QQGNET優(yōu)惠促銷活動

教你如何復(fù)制APP微信小程序(復(fù)制源代碼)

主機(jī)參考:VPS測評參考推薦/專注分享VPS服務(wù)器優(yōu)惠信息!若您是商家可以在本站進(jìn)行投稿,查看詳情!此外我們還提供軟文收錄、PayPal代付、廣告贊助等服務(wù),查看詳情!
我們發(fā)布的部分優(yōu)惠活動文章可能存在時效性,購買時建議在本站搜索商家名稱可查看相關(guān)文章充分了解該商家!若非中文頁面可使用Edge瀏覽器同步翻譯!PayPal代付/收錄合作

教你如何復(fù)制APP微信小程序(復(fù)制源代碼)

最近在研究微信小程序的開發(fā),也在和兩個同學(xué)一起復(fù)制微信小程序。這里主要分享一下我的學(xué)習(xí)過程和我踩過的一些坑,希望對你有幫助。

微信開發(fā)者工具VScode代碼編輯器APP微信小程序的開發(fā)與編寫有贊vant組件庫阿里巴巴矢量圖標(biāo)庫markman(顏色距離)整體架構(gòu)。本項(xiàng)目基于小程序云開發(fā),使用的模板是云開發(fā)快速入門模板。由于是全棧項(xiàng)目,前端采用applet支持的wxml+wxss+js開發(fā)模式,采用BEM命名規(guī)范。后臺使用云數(shù)據(jù)庫進(jìn)行數(shù)據(jù)管理。【相關(guān)學(xué)習(xí)推薦:小程序開發(fā)教程】項(xiàng)目中我負(fù)責(zé)的部分主要如下(部分?jǐn)?shù)據(jù)以固定數(shù)據(jù)的形式寫在config中,js文件通過module.exports公開,需要引用時在頁面對應(yīng)的js頭中引入,例如const {} = require('../../../config/buys ')。我在項(xiàng)目中使用了很多vant組件,所以在構(gòu)建npm包時需要引入vant。詳見Zan vant的npm安裝。當(dāng)頁面使用第三方組件時,必須在對應(yīng)的json文件中聲明,為了不重復(fù)工作,可以直接在app.json中聲明。示例:(" usingComponents & quot:& quotvan-搜索& quot:& quot@ vant/weapp/search/index & quot;})

| -配置對應(yīng)數(shù)據(jù)| -assem . js | -buys . js | -detail . js | -kind . js | -pages | -buy _ Page | -Page | -assem篩選排序頁面| -buy購買首頁| -詳細(xì)商品詳情頁| -種類品牌分類頁面| -商品標(biāo)識介紹頁面| -搜索搜索頁面項(xiàng)目策劃在做這個小程序之前,我會分析每個頁面對應(yīng)的功能,了解這個小程序的交互細(xì)節(jié),了解這大致可以分為四個步驟:分析頁面、創(chuàng)建數(shù)據(jù)集、解構(gòu)頁面基本布局、數(shù)據(jù)綁定和跳轉(zhuǎn)。參考微信小程序,以下是我的小程序的tabBar。(有點(diǎn)粗糙,但還是能看出來)

1.png

"tabBar & quot:{ & quot選定的顏色& quot:& quot#000000&quot,& quot邊框樣式& quot:& quot白色& quot,& quot背景顏色& quot:& quot# fff & quot,& quot列表& quot:

數(shù)據(jù)集合建立后,需要修改數(shù)據(jù)權(quán)限才能正常訪問。

3.png

這些操作可以在數(shù)據(jù)庫中執(zhí)行。請注意,導(dǎo)入的數(shù)據(jù)格式需要是。csv或。json文件。您可以先建立如何使用excel表格將數(shù)據(jù)集轉(zhuǎn)換成相應(yīng)的格式文件,并直接導(dǎo)入數(shù)據(jù)庫。

4.png

Const db = wx.cloud.database() //云數(shù)據(jù)庫constdewucllection = db . collection(&;#39;吳德& amp#39;)//將數(shù)據(jù)采集項(xiàng)導(dǎo)入js文件的解構(gòu)下面是我主要實(shí)現(xiàn)的object APP小程序的界面。

5.png

6.png

接下來,解構(gòu)每一頁的細(xì)節(jié)。

購買主頁7.gif

購買家居風(fēng)格8.png

& ltview class = & quot頁面& quot& gt& lt!--使用van-sticky設(shè)置dewu-hd天花板搜索欄--& gt;& ltvan-sticky & gt;& lt!-- dewu-hd采用flex布局-->;& ltview class = & quotdewu -HD & quot;& gt& ltview class = & quotdewu -hd-search & quot;bindtap = & quotgotoSearch & quot& gt& ltvan-搜索占位符= & quot搜索單號" disabled />& lt/view & gt;& ltview class = & quotdewu -種類& quotbindtap = & quot種類& quot& gt& ltimage src = & quot"& gt& lt/image & gt;& lt/view & gt;& lt/view & gt;& lt/van -sticky & gt;& lt!-- van-tabs實(shí)現(xiàn)了購買頁面的導(dǎo)航和內(nèi)容頁面對應(yīng)的--tabs > & lt;van-tabs class = & quot;dewu -tabs & quot;& gt& ltvan-tab title = & quot;推薦" & gt& ltview class = & quotdewu -tip & quot;& gt& ltview class = & quotdewu -tip -img -HD & quot;& gt& ltimage src = & quot"& gt& lt/image & gt;& lt/view & gt;& lt!--使用van-網(wǎng)格布局設(shè)置邊框隱藏和快速定位-->& ltvan-網(wǎng)格& gt& ltvan -grid -項(xiàng)目使用-插槽& gt& lt圖像樣式= & quot"src = & quot"& gt& lt/image & gt;& lttext & gt真實(shí)擔(dān)保

這個頁面的布局并不復(fù)雜,但是我寫這個布局的時候還是遇到了一個坑(感覺是自己跳進(jìn)去的)。我做dewu-hd吊頂?shù)臅r候用van-sticky直接包裹,但實(shí)際效果是dewu-hd下面也需要固定拉環(huán)。你不能在這里使用與上面相同的方法。實(shí)際效果會讓整個van-標(biāo)簽頁吸頂,頁面無法滑動。其實(shí)你只需要給van-tabs添加一個sticky屬性,設(shè)置offset-top。請注意,這兩個屬性需要一起使用才能生效。

獲取商品項(xiàng)async onLoad() {this.proData() //獲取推薦數(shù)據(jù)項(xiàng)this.shoeData() //獲取鞋類數(shù)據(jù)項(xiàng)},Prodata(){ const { data } = AwaitDewucllection。其中({安利:db . command . eq(&;#39;真實(shí)& amp#39;) }) .字段({ //獲取指定數(shù)據(jù)項(xiàng)以提高性能_ ID: true,PIC: true,title: true,buyer: true,price: true})。get ()//console.log(數(shù)據(jù));this.setData({ produces: data,})} shoeData(){ let data1 = await dewuCollection。其中({ type: 1 })。get()//console . log(data1 . data);this . setdata({ shoes:data1 . data })}綁定詳情頁goto detail(e){//console . log(e);wx . navigate to({ URL:'/pages/buy _ page/page/detail/detail?Id = '+e . current target . dataset . ID,}},利用商品_id的唯一屬性,當(dāng)數(shù)據(jù)項(xiàng)ID設(shè)置為_id時,跳轉(zhuǎn)到詳情頁,顯示對應(yīng)的數(shù)據(jù)。

產(chǎn)品詳情頁面9.gif

產(chǎn)品詳情頁面樣式10.png

& ltview class = & quot頁面& quot& gt& lt!--頭滑塊和標(biāo)題-->;& ltview class = & quotdetail _ hd & quot& gt& ltswiper class = & quotswiper _ _ hd & quot& gt& ltswiper -item class = & quot;swiper _ hd & quot& gt& lt/swiper -item & gt;& lt/swiper & gt;& ltview class = & quotdots1 & quot& gt& ltview class = & quot{ {當(dāng)前= =索引?& amp#39;主動& amp#39;:& amp#39;& amp#39;} } & quot& gt& lt/view & gt;& lt/view & gt;& ltview class = & quotdetail _ hd-標(biāo)題& quot& gt{ { img.digest } } & lt/view & gt;& ltview class = & quotdetail _ hd-價格& quot& gt& lttext id = & quotp2 & quot& gt{ { img.price } } & lt/text & gt;& lt/view & gt;& lt/view & gt;& ltvan-電池class = & quot尺寸& quot綁定:click = & quotshowPopup1 & quot& gt& ltview class = & quotsize -l & quot;& gt選擇尺寸

11.png

& ltvan-彈出可關(guān)閉位置= & quot底部& quotcustom -style = & quot;max -寬度:90% & quot;& gt& ltview class = & quotdetail _ size -HD & quot;& gt& ltview class = & quotdetail _ size -hd-img & quot;& gt& ltimage bindtap = & quot預(yù)覽圖像& quotmode = & quotaspectFit&quotsrc = & quot{ { img.pic } } & quot& gt& lt/image & gt;& lt/view & gt;& ltview class = & quotdetail _ size -hd-price & quot;& gt& lt文本樣式= & quotfont -size:25 rpx;"& gt@& lt;/text & gt;& lttext wx:if = & quot;{ { activeSizeIndex = = -1 } } & quot;& gt--& lt;/text & gt;& lttext wx:if = & quot;{ { activeSizeIndex = = index } } & quot;& gt{ { item.price } } & lt/text & gt;& lt/view & gt;& lt視圖& gt& ltimage src = & quot"& gt& lt/image & gt;& lttext wx:if = & quot;{ { activeSizeIndex = = -1 } } & quot;& gt請選擇一個產(chǎn)品

12.png

& ltvan-sticky sticky offset -top = & quot;{ { 180 } } & quot& gt& ltview class = & quothead & quot& gt& ltview class = & quotdetail _ produce -HD & quot;& gt相關(guān)建議

Get commodity details async onLoad(options){//Get commodity data console . log(options)對應(yīng)_ idlet id = options . id console . log(id);wx.cloud.database()。收藏(& amp#39;吳德& amp#39;) .文檔(id)。獲取()。然后(res = & gt{ console . log(RES);This.setdata ({img: res.data})},彈出層showPopup() {//顯示彈出層this.setData({ show: true,});},once lost(){//關(guān)閉彈出層this.setData({ show: false,});},選擇大小pick size(e){ let flag = e . current target . dataset . flag let index = e . current target . dataset . indexif(flag = = index)。{ this . setdata({ activeSizeIndex:-1,flag:-1 })} else { this . setdata({ activeSizeIndex:Index,F(xiàn)lag: index}}},點(diǎn)擊大小,flag==index為選中狀態(tài),再次點(diǎn)擊或點(diǎn)擊其他大小時設(shè)置為未選中狀態(tài),否則使Flag等于index,使其成為選中狀態(tài)。

搜索頁面13.gif

搜索頁面樣式14.png

& ltview class = & quot頁面& quot& gt& ltview class = & quot搜索& quot& gt& ltvan-stichy & gt;& ltvan-搜索值= & quot{ { value } } & quotbind:clear = & quot;onClear & quotplaceholder = & quot輸入商品名稱和商品編號"/>;& lt/van -stichy & gt;& lt!--塊封裝flex布局-->;& ltblock wx:if = & quot;{ { showHistory = = true & amp& amphistoryList.length & gt0 } } & quot& gt& ltview class = & quot歷史容器& quot& gt& ltview class = & quot標(biāo)題& quot& gt歷史搜索

搜索記錄async onsearch(e){//console . log(e);如果(!e . detail . trim()){ wx . show toast({ title:& amp;#39;請輸入貿(mào)易& amp & amp;#39;,}) return } let {value,history list } = this . data if(history list . index of(value)!= = -1){ history list . splice(history list . index of(value),1)} history list . un shift(value)this . setdata({ history list })wx . setstoragesync(& amp;#39;價值與價值。#39;,historyList) let關(guān)鍵字= e.detail.trim() let結(jié)果= await dewuCollection。其中({ title: db。RegExp({ regexp: keyword,options:& amp;#39;我& amp#39;}) }) .get()if(results . data . length = = 0 | | keyword = = & amp;#39;& amp#39;){ wx . show toast({ title:& amp;#39;不存在&;#39;+keyword,}) } else { await dewuCollection。其中({ title: db。RegExp({ regexp: keyword,options:& amp;#39;我& amp#39;}) }) .order by(& amp;#39;熱& amp#39;,& amp#39;desc & amp;#39;) .獲取()。然后(res = & gt{ console . log(RES);this . setdata({ results:RES . data })} },onload(){ this . getsearch history()//獲取歷史搜索},getsearch history(){ let history list = wx . getstoragesync(&;#39;價值與價值。#39;)if(history list){ this . setdata({ history list })},加載頁面時,從本地存儲中獲取歷史搜索記錄,確定search onSearch時判斷值是否為空。將合法值插入historyList,這里使用time unshift方法,這樣可以保證最近的搜索記錄顯示在前面,使用正則表達(dá)式模糊查詢數(shù)據(jù)庫中的匹配項(xiàng),存儲在數(shù)組結(jié)果中。當(dāng)結(jié)果出來時。長度>;0以顯示商品列表。使用wx.setStorageSync將值存儲在緩存中,wx.getStorageSync可以獲取并打印出來。通過indexOf方法判斷該值是否已經(jīng)存在,如果已經(jīng)存在,則刪除historyList中的該項(xiàng)。

歷史搜索異步歷史搜索(e){//console . log(e);讓歷史列表= this.data.historyList讓值=歷史列表

類別頁面樣式16.png

& ltview class = & quot頁面& quot& gt& ltvan-sticky & gt;& ltview class = & quot搜索& quotbindtap = & quotgotoSearch & quot& gt& ltvan-搜索占位符= & quot搜索商品" input -align = & quot;中心& quotdisabled/& gt;& lt/view & gt;& lt/van -sticky & gt;& ltview class = & quot種類& quot& gt& ltview class = & quot高清& quot& gt& ltscroll -view class = & quot;scroll -view -left & quot;& gt& ltview class = & quotscroll -view -left -item { { activenaviindex = = index?& amp#39;主動& amp#39;:& amp#39;& amp#39;} } & quot& gt& lttext & gt{ { } } & lt/text & gt;& lt/view & gt;& lt/scroll -view & gt;& lt/view & gt;& ltview class = & quotbd & quot& gt& ltscroll -view & gt;& lt視圖& gt& ltview class = & quotkind -title & quot;& gt& ltvan-分隔符contentPosition = & quot中心& quot& gt{ { } } & lt/van -divider & gt;& lt/view & gt;& ltvan-網(wǎng)格& gt& ltvan-grid -item & gt;{ { } } & lt/van -grid -item & gt;& lt/van -grid & gt;& lt/view & gt;& lt/scroll -view & gt;& lt/view & gt;& lt/view & gt;& lt/view & gt;Scroll-view主要用于設(shè)置分類頁面的垂直滾動。當(dāng)你點(diǎn)擊左側(cè)的scroll-view-left-item時,該物品變?yōu)?00cbcc,并顯示相應(yīng)的品牌類別物品kindsItem。整體采用Flex布局,這里的坑是scroll-view-left。font-size應(yīng)設(shè)置為0,font應(yīng)設(shè)置在子元素scroll-view-left-item中,以避免block元素邊距對布局的影響。

初始化類別onload:function(options){ this . setdata({ kind nav:kind nav,kindall: kinditem,//console . log(this . data . kindall));let種類=

排序頁面樣式18.png

& ltview class = & quot頁面& quot& gt& ltvan-sticky & gt;& ltview class = & quot搜索& quotbindtap = & quotgotoSearch & quot& gt& ltvan-搜索占位符= & quot{ { titles } } & quotdisabled/& gt;& lt/view & gt;& ltview class = & quottab & quot& gt& lt查看wx:for = & quot;{ { tabs } } & quotwx:key = & quot;索引& quotdata -index = & quot;{ { index } } & quotclass = & quottab -item { { activeTabIndex = = index?& amp#39;主動& amp#39;:& amp#39;& amp#39;} } & quotbindtap = & quot更改項(xiàng)目& quot& gt& lttext & gt{ { item.title } } & lt/text & gt;& lt圖像樣式= & quot寬度:26rpx身高:26rpx"src = & quot{ { item.pic } } & quot& gt& lt/image & gt;& lt/view & gt;& lt/view & gt;& lt/van -sticky & gt;& lt/view & gt;選項(xiàng)卡使用彈性布局。關(guān)于商品的布局,請參考購買頁面上的商品布局。

19.png

& ltvan-popup & gt;& ltscroll -view class = & quot;pop & quotscroll -y & gt;& ltvan-塌陷& gt& ltvan -collapse -item title = & quot;適用人群" value = & quotAll " name = & quot1 & quot& gt& lt/van -collapse -item & gt;& ltvan-網(wǎng)格column -num = & quot;3 & quotgutter = & quot{ { 10 } } & quot& gt& ltvan-grid -item class = & quot;{{activeIndex1==index?& amp#39;active1 & amp#39;:& amp#39;& amp#39;} } & quot& gt{ { } } & lt/van -grid -item & gt;& lt/van -grid & gt;& lt/van -collapse & gt;& ltvan-goods -action & gt;& ltbutton & gt重置

初始商品排序asynconload(選項(xiàng)){//console.log(選項(xiàng));Lettitle =選項(xiàng)。titletdata1 = AwaitDewuCollection。其中({ kind:title//綁定跳轉(zhuǎn)時獲取對應(yīng)數(shù)據(jù)(kind唯一)})。get()//console . log(data1);This.setdata ({goods: data1.data,titles: title})},基本排序異步變化項(xiàng)(e){//console . log(e);設(shè)index = e.currenttarget.dataset.index//index對應(yīng)排序方法this . setdata({ activetabindex:index })//console . log(index);If(index == 1) {//銷售排序等待吳德集合。哪里({kind:這個。數(shù)據(jù)。標(biāo)題})。排序依據(jù)(&;#39;買家& amp#39;,& amp#39;desc & amp;#39;) .獲取()。然后(res = & gt{ this.setData({ goods: res.data,index:index })//console . log(this . data . index);})} if(index == 0) {//綜合排序AwaitDewCollection。哪里({kind:這個。數(shù)據(jù)。標(biāo)題})。獲取()。然后(RES = > { this . setdata({ goods:RES . data })} } if(index = = 2 & amp;& ampThis.data.flag == -1) {//排序awaitdewucllection . where({ kind:this . data . titles })。order by(&;#39;價格& amp#39;,& amp#39;desc & amp;#39;) .獲取()。然后(res = & gt{ this.setData({ goods: res.data,flag:1 })})return } if(index = = 3){//創(chuàng)建時間排序等待吳德集合。其中({kind: this.data.titles})。排序依據(jù)(&;#39;ctime & amp#39;,& amp#39;desc & amp;#39;) .獲取()。然后(res = & gt{ this . setdata({ goods:RES . data })} } if(index = = 4){//過濾層this.setdata ({show: true,})} else if(index = = 2 &;& ampThis.data.flag == 1) {//排序awaitdewucllection . where({ kind:this . data . titles })。排序依據(jù)(&;#39;價格& amp#39;,& amp#39;asc & amp#39;) .獲取()。然后(res = & gt{this.setdata ({goods: res.data,flag: -1})}},設(shè)置一個flag屬性的默認(rèn)值為-1,當(dāng)flag==-1時點(diǎn)擊價格的降序,當(dāng)flag==1和flag==1時點(diǎn)擊價格的升序,設(shè)置flag==-1。

篩選排序pick(e){ let flag = e . current target . dataset . flag let index = e . current target . dataset . index let CD = this . data . human[index]。。kind if(flag = = index){ this . setdata({ active index 1:-1,flag1: -1,cd1:& amp;#39;& amp#39;})} else { this . setdata({ active index 1:index,flag1: index,cd1: cd }) } },F(xiàn)ilter reset replace() {//點(diǎn)擊重置按鈕將所有過濾條件恢復(fù)為默認(rèn)this.setdata ({flag1: -1,activeindex 1: -1,flag2: -1,activeindex 2: -1,flag3: -1,activeindex 3: -1,CD1:&;#39;& amp#39;,Cd2:& amp;#39;& amp#39;,cd3: 0,cd4: 10000000,})},這里是一個坑,不能在data (num:Infinity)中聲明,這里無窮大不會生效。目前,優(yōu)化被聲明為常數(shù)。

確認(rèn)篩選asyncicheck(){//點(diǎn)擊確定按鈕篩選顯示結(jié)果let cd3 = number(this . data . cd3)let CD4 = number(this . data . CD4)= = 0?1000000:Number(this . data . CD4)let index = Number(this . data . index)if(this . data . cd1!= & amp#39;& amp#39;& amp& ampthis.data.cd2!= & amp#39;& amp#39;){等待dewuCollection。其中({ kind: this.data.titles,sex: this.data.cd1,brand: this.data.cd2,price: _。gt(cd3)。和(_)。lt(cd4)),})。獲取()。然后(res = & gt{這個。setdata ({goods: res.data,show: false,})}) return},難坑< van -grid -item use -slot wx:for = & quot;{ { shoes } } & quotdata -item = & quot;{ { item } } & quotwx:key = & quot;索引& quotdata -id = & quot;{ {項(xiàng)目。_ id } } & quotbindtap = & quotgotoDetail & quot& gt& lt/van -grid -item & gt;goto detail(e){//console . log(e);wx . navigate to({ URL:& amp;#39;/pages/buy _ page/page/detail/detail?id = & amp#39;+e.currenttarget.dataset.id,})},跳轉(zhuǎn)到詳情頁,保留對應(yīng)數(shù)據(jù)項(xiàng)。這里利用了_id的唯一性,將每一項(xiàng)的_id賦給data-id。當(dāng)id相等時,可以跳轉(zhuǎn)并接受_id對應(yīng)的數(shù)據(jù)。

& ltvan-grid -item class = & quot;{{activeSizeIndex==index?& amp#39;size-主動& amp#39;:& amp#39;& amp#39;} } & quot使用-slot wx:for = & quot;{ { size } } & quotwx:key = & quot;索引& quotdata -flag = & quot;{ { flag } } & quotdata -index = & quot;{ { index } } & quotbindtap = & quotpickSize & quot& gt& ltview class = & quot尺寸& quot& gt& lttext id = & quotp3 & quot& gt{ { item.size } } & lt/text & gt;& lttext id = & quotp4 & quot& gt{ { item.price } } & lt/text & gt;& lt/view & gt;& lt/van -grid -item & gt;pickSize(e){ let Flag = e . current target . dataset . Flag let index = e . current target . dataset . index if(Flag = = index){ this . setdata({ activeSizeIndex:-1,F(xiàn)lag:-1 })} else { this . setdata({ activeSizeIndex:index,F(xiàn)lag: index}}},單擊大小選擇并更改文本,再次單擊項(xiàng)目重置樣式,單擊其他項(xiàng)目取消選擇并選擇所單擊的項(xiàng)目。這里通過設(shè)置一個附加標(biāo)志并結(jié)合index來控制是否選中。

& lt查看wx:for = & quot;{ { kindNav } } & quotwx:key = & quot;索引& quotdata -index = & quot;{ { index } } & quotdata -type = & quot;{ { item.type } } & quotbindtap = & quot變化種類& quotclass = & quotscroll -view -left -item { { activenaviindex = = index?& amp#39;主動& amp#39;:& amp#39;& amp#39;} } & quot& gt& lttext & gt{ { item.text } } & lt/text & gt;& lt/view & gt;change kinds(e){ console . log(e);設(shè){index,type } = e . current target . dataset;console.log(索引,類型);//指數(shù)與推薦品牌的指數(shù)相關(guān)。Type和camp type kind . js的this . setdata({ activenaviindex:index,})let kinds =[]this . data . kindall . foreach(kind = > { if(kind.camptype = = type){ kinds . push(kind)} })this . setdata({ kind item:kinds,})}綁定類型和kind . camp type,當(dāng)點(diǎn)擊的項(xiàng)發(fā)生變化時,將當(dāng)前項(xiàng)索引賦給activenaviindex,用kindall存儲所有數(shù)據(jù)項(xiàng),用foreach循環(huán)遍歷kind all,存儲滿足條件kind的數(shù)據(jù)。

deletesearchhistory(){ wx . show modal({ content:'確認(rèn)清除歷史',成功:(RES)= & gt;{ if(RES . confirm){ this . setdata({ historyList:[]})} } })wx.removeStorageSync(' value ')},清除歷史記錄時,不僅將history list設(shè)置為空,而且使用wx . removestoragesync清除本地存儲的緩存。

建議:自己寫項(xiàng)目的時候,用console.log()多打印,跟進(jìn)數(shù)據(jù)變化;查看更多文檔w3cschool,微信開發(fā)文檔,Vant-Weapp。

寫項(xiàng)目的過程對我來說是一個挑戰(zhàn)。畢竟是第一次專注合作項(xiàng)目,項(xiàng)目中遇到的bug會很煩,但是堅(jiān)持寫函數(shù)還是很有成就感的。非常感謝你在我寫項(xiàng)目的過程中幫助我的老師和同學(xué)。如果你喜歡我這篇文章或者看到對你有幫助,不妨喜歡!同時,真的希望大家在看文章的時候能給我一些建議。期待和大家一起探討學(xué)習(xí)微信小程序!

更多編程相關(guān)知識,請?jiān)L問:編程入門!!

這幾篇文章你可能也喜歡:

本文由主機(jī)參考刊發(fā),轉(zhuǎn)載請注明:教你如何復(fù)制APP微信小程序(復(fù)制源代碼) http://m.k2270.com/112867.html

【騰訊云】領(lǐng)8888元采購禮包,搶爆款云服務(wù)器 每月 9元起,個人開發(fā)者加享折上折!
打賞
轉(zhuǎn)載請注明原文鏈接:主機(jī)參考 » 教你如何復(fù)制APP微信小程序(復(fù)制源代碼)
主機(jī)參考僅做資料收集,不對商家任何信息及交易做信用擔(dān)保,購買前請注意風(fēng)險,有交易糾紛請自行解決!請查閱:特別聲明

評論 搶沙發(fā)

評論前必須登錄!