123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- <template>
- <view class="page">
- <view class="list_info">
- <view class="item">
- <view class="avator">
- <image class="icon" :src="info.image" mode="aspectFill">
- </image>
- </view>
- <view class="tit">
- <view class="name">{{info.name}}</view>
- <view class="desc" v-if="false">市场价:¥{{info.price}}</view>
- </view>
- <view class="jindu">
- <view class="bord">
- <view class="active" :style="'width:' + info.num_bfb + '%;'"></view>
- </view>
- <text class="tips">{{info.num_bfb}}%</text>
- </view>
- <block v-if="info.myid > 0">
- <view class="title">助力好友</view>
- <view class="list_mem">
- <view class="mem" v-for="(item,index) in info.mem_list">
- <image class="icon" :src="item.avator" mode="aspectFill" />
- <text>{{item.nickname}}</text>
- </view>
- </view>
- <view class="title">助力记录</view>
- <view class="list_record">
- <view class="record" v-for="(item,index) in info.mem_list">
- <view class="left">
- <image class="icon" :src="item.avator" mode="aspectFill" />
- <text>{{item.nickname}}</text>
- </view>
- <text class="right">{{item.create_time}}</text>
- </view>
- </view>
- </block>
- <block v-else>
- <view class="btn_submit" @click="JoinIt(info)">加入心愿</view>
- <view class="title">许愿动态</view>
- <view class="list_record">
- <view class="record" v-for="(item,index) in info.mem_list">
- <view class="left">
- <image class="icon" :src="item.avator" mode="aspectFill" />
- <text>{{item.nickname}}</text>
- </view>
- <text class="right">{{item.create_time}}</text>
- </view>
- </view>
- </block>
- </view>
- <view class="blankHeight"></view>
- </view>
- <DialogBoxW3 ref="DialogBoxW3"></DialogBoxW3>
- <ToastW3 ref="ToastW3"></ToastW3>
- </view>
- </template>
- <script>
- export default {
- components: {},
- data() {
- return {
- tab: 1,
- scrollTop: 0,
- old: {
- scrollTop: 0
- },
- info: {}
- }
- },
- onLoad(parms) {
- this.id = parms.id || 11
- // setTimeout(function() {
- // uni.setNavigationBarColor({
- // frontColor: '#ffffff',
- // backgroundColor: '#00000000',
- // animation: {
- // duration: 400,
- // timingFunc: 'easeIn'
- // }
- // })
- // }, 200);
- },
- onShow() {
- this.loadData();
- },
- methods: {
- onBack() {},
- checkTab(tab) {
- this.tab = tab;
- // this.loadData();
- },
- scroll: function(e) {
- console.log(e)
- this.old.scrollTop = e.detail.scrollTop
- },
- loadData() {
- uni.request({
- url: this.$apiHost + '/Wish/getInfo',
- data: {
- uuid: getApp().globalData.uuid,
- id: this.id,
- },
- header: {
- 'content-type': 'application/json'
- },
- success: (res) => {
- console.log("res", res.data)
- this.info = res.data.info;
- }
- });
- },
- JoinIt(item) {
- let that = this;
- this.$refs['DialogBoxW3'].confirm({
- title: '加入心愿',
- content: '是否确定加入心愿',
- DialogType: 'inquiry',
- btn1: '',
- btn2: '',
- animation: 0
- }).then((res) => {
- uni.request({
- url: this.$apiHost + "/Wish/joinit",
- data: {
- uuid: getApp().globalData.uuid,
- id: item.id
- },
- header: {
- "content-type": "application/json"
- },
- success: (res) => {
- console.log("----", res.data.list);
- // uni.showToast({
- // title: res.data.str,
- // icon: 'none'
- // })
- that.$refs['ToastW3'].showToast({
- title: res.data.str,
- animation: 0
- });
- if (res.data.success == "yes") {
- that.loadData()
- }
- },
- complete: (com) => {
- uni.hideLoading();
- },
- });
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- @import 'wishDetail.scss';
- </style>
|