1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <template>
- <view>
- <view class="box1" v-for="(item,index) in list" :key="index">
- {{ item.name }}<text>{{ item.name1 }}</text>
- </view>
- </view>
- </template>
- <script>
- import post from "../../../common/httpClient.js";
- export default {
- props: {},
- data: () => ({
- list: [
- { name: "aaaaaaa", id: 0 },
- { name: "bbbbbbb", id: 1 },
- { name: "ccccccc", id: 2 },
- { name: "ddddddd", id: 3 },
- { name: "eeeeeee", id: 4 },
- { name: "fffffff", id: 5 },
- { name: "ggggggg", id: 6 },
- ],
- }),
- computed: {},
- methods: {},
- watch: {},
- // 页面周期函数--监听页面加载
- onLoad() {
-
- },
- // 页面周期函数--监听页面初次渲染完成
- onReady() {},
- // 页面周期函数--监听页面显示(not-nvue)
- onShow() {},
- // 页面周期函数--监听页面隐藏
- onHide() {},
- // 页面周期函数--监听页面卸载
- onUnload() {},
- onPullDownRefresh() {
- this.list[0].name1 = this.list[0].name+1
- uni.stopPullDownRefresh()
- //this.$forceUpdate();
- },
- onReachBottom(){
- let that = this;
- post({
- server: 2,
- servant: 1005,
- data: {
- phone: "3246541321",
- type: 1,
- verifyInfo: "asdasd",
- },
- })
- .then((result) => {
- let count = that.list.length
- that.list.push({
- name:result.msg,
- id:count
- })
- })
- .catch((err) => {
- });
- }
- };
- </script>
- <style lang="scss">
- @import url("./a.css");
- .box1 {
- width: 100vw;
- height: 200rpx;
- color: #353535;
- font-size: 50rpx;
- text {
- font-size: $fs-middel;
- color: red;
- }
- }
- </style>
|