Browse Source

Merge branch 'twodate' of http://8.134.10.79:3000/Leadfyy.co/uniapp-shikongwang into twodate

twodate
邓平艺 5 years ago
parent
commit
53cd02aa10
  1. 74
      pages/center/bestar.vue
  2. 11
      pages/center/fans.vue
  3. 107
      pages/center/invite.vue
  4. 2
      pages/center/widthdraw.vue
  5. 7
      pages/goodsDetail/index.vue
  6. 5
      pages/order/confirm-order.vue

74
pages/center/bestar.vue
File diff suppressed because it is too large
View File

11
pages/center/fans.vue

@ -23,11 +23,12 @@
<view class="lf-font-32 text-black1">时空网的内部网友 <text class="bg-red lf-font-24 lf-m-l-10" style="border-radius: 30rpx;padding: 5rpx 16rpx;">达人</text></view>
<view class="lf-font-24 lf-color-gray">2021-7-6 21:32:53</view>
</view>
<!-- 空数据的情况 -->
<view class="loading-more">
<text v-if="tabItem.list.length" :class="{'loading-more-text': tabItem.loadingClass}">{{ tabItem.loadingText }}</text>
<my-nocontent v-else></my-nocontent>
</view>
</view>
<!-- 空数据的情况 -->
<view class="loading-more">
<text v-if="tabItem.list.length" :class="{'loading-more-text': tabItem.loadingClass}">{{ tabItem.loadingText }}</text>
<my-nocontent v-else></my-nocontent>
</view>
</scroll-view>
</view>

107
pages/center/invite.vue

@ -4,13 +4,7 @@
<!-- <image src="../../static/images/bill.png" mode="widthFix" style="height: 1220rpx;width: 686rpx;"></image> -->
<image v-if="imagePath" :src="imagePath" mode="widthFix"></image>
</view>
<tki-qrcode v-if="info.avatar" style="visibility: hidden;position: fixed;left: -500rpx;" ref="qrcode" @result="qrR" :val="checkArea" :size="115" unit="px" background="#fff"
foreground="#000" pdground="#000" :onval="true" :loadMake="true" :icon="info.avatar" />
<tki-qrcode v-else ref="qrcode" style="visibility: hidden;position: fixed;left: -500rpx;" @result="qrR" :val="checkArea" :size="115" unit="px" background="#fff"
foreground="#000" pdground="#000" :onval="true" :loadMake="true" :icon="require('@/static/images/system/payfail.png')" />
<view class="canvas-box">
<canvas style="width: 375px;height: 667px;position:fixed;top:9999px" canvas-id="mycanvas" />
</view>
@ -18,7 +12,7 @@
<view class="btn-bottom" style="bottom: 40rpx;">
<view class="padding-lr-lg">
<button class="cu-btn block bg-orange lg" style="border-radius: 42rpx;" @tap="saveBill()">
<text class="text-df text-white">保存</text>
<text class="lf-font-32 text-white">保存</text>
</button>
</view>
@ -32,7 +26,6 @@
</template>
<script>
import tkiQrcode from "tki-qrcode"; //
export default {
data() {
return {
@ -49,75 +42,65 @@
showLogin: true,
imagePath: '',
userToken: ''
userToken: '',
wxCode: '',
onceCode: ''
}
},
components: {
tkiQrcode
},
onLoad() {
wx.showToast({
title: '生成海报中...',
icon: 'loading',
duration: 1000
});
this.getData();
this.createNewImg();
this.getWxCode()
},
methods:{
//
saveAvatar() {
var that = this
console.log(that.info.avatar)
wx.saveImageToPhotosAlbum({
filePath: that.info.avatar,
success(res) {
wx.showModal({
content: '图片已保存到相册,赶紧晒一下吧~',
showCancel: false,
confirmText: '好的',
confirmColor: '#333',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
that.maskHidden = false
}
},
fail: function(res) {
that.maskHidden = false
console.log(res)
}
})
getWxCode() {
uni.request({
url: 'http://dev-gxsky.com/api/salesman/qrcode', //
data: {
scene: 'route=goods&id=2&pt=2',
page: 'pages/route/index',
width: '2800'
},
fail(err) {
method: 'POST',
success: (res) => {
this.wxCode = res.data.data.base_url
if (this.wxCode) {
this.getwxCodeImg()
}
}
});
},
//
getwxCodeImg() {
var imgSrc = this.wxCode; //base64
var save = wx.getFileSystemManager();
var number = Math.random();
save.writeFile({
filePath: wx.env.USER_DATA_PATH + '/pic' + number + '.jpg',
data: imgSrc,
encoding: 'base64',
success: res => {
this.onceCode = wx.env.USER_DATA_PATH + '/pic' + number + '.jpg'
if(this.onceCode) {
this.createNewImg()
}
},
fail: err => {
console.log(err)
}
})
},
qrR(data) {
this.base64Img = data;
console.log('base64',this.base64Img)
},
getData() {
let userinfo = uni.getStorageSync('userinfo') || {};
if (userinfo) {
this.info = userinfo
console.log('用户数据缓存',this.info)
} else {
this.$http(this.API.API_USER_CENTER).then(res => {
this.info = res.data;
console.log('用户数据接口',this.info)
})
}
},
createNewImg() {
var that = this;
var context = wx.createCanvasContext('mycanvas');
var path = "../../static/images/bill.png";
context.drawImage(path, 0, 0, 375, 667);
//
var path1 = "../../static/logo.png";
context.drawImage(path1, 24, 530,120, 120);
let wxcode = that.onceCode
context.drawImage(wxcode, 18, 530, 120, 120);
//
// context.setFontSize(24);
// context.setFillStyle('#fff');
@ -168,16 +151,6 @@
}
})
},
formSubmit() {
var that = this;
wx.showToast({
title: '生成海报中...',
icon: 'loading',
duration: 1000
});
wx.hideToast()
that.createNewImg()
},
//
copy(text) {
uni.setClipboardData({

2
pages/center/widthdraw.vue

@ -41,7 +41,7 @@
<view class="btn-bottom" style="bottom: 60rpx;">
<view class="padding-lr-lg">
<button class="cu-btn block bg-orange lg" style="border-radius: 42rpx;" @tap="subimitApply()">
<text class="text-df text-white">提现</text>
<text class="lf-font-32 text-white">提现</text>
</button>
</view>
</view>

7
pages/goodsDetail/index.vue

@ -194,9 +194,8 @@
var path = "../../static/images/bill.png";
context.drawImage(path, 0, 0, 375, 667);
//
var number = Math.random();
let wxcode = that.onceCode
context.drawImage(wxcode, 24, 530, 120, 120);
context.drawImage(wxcode, 18, 530, 120, 120);
//
// context.setFontSize(24);
// context.setFillStyle('#fff');
@ -255,7 +254,9 @@
duration: 1000
});
wx.hideToast()
that.createNewImg()
if(that.onceCode) {
that.createNewImg()
}
},
//
getGoodsDetail() {

5
pages/order/confirm-order.vue

@ -100,7 +100,8 @@
order_id: 0,
ifDo: 1,
ifPay: true,
limit: 1
limit: 1,
pt: 1
}
},
computed: {
@ -124,6 +125,7 @@
onLoad(e) {
this.type = e.type;
this.goods_id = e.goods_id;
this.pt = e.pt || 1;
this.order_id = e.order_id;
this.goods_specs_id = e.goods_specs_id
if(this.goods_id && this.goods_specs_id) {
@ -191,6 +193,7 @@
goods_id: this.goods_id,
goods_specs_id: this.goods_specs_id,
number: this.num,
payment_desc: this.pt
}).then(res => {
this.order_id = res.data.order_id
uni.requestPayment({

Loading…
Cancel
Save