商家入驻模块

pifa
wangdong 7 months ago
commit 943c420f0a
  1. 32
      api/tutorial.js
  2. 2
      ext.json
  3. 15
      pages.json
  4. 1251
      pages/gamll/index.vue
  5. 51
      pages/gamll/rules.vue
  6. 135
      pages/invite/index.vue
  7. 1332
      pages/user/index.vue
  8. 2
      project.config.json
  9. BIN
      static/user/code.png
  10. BIN
      static/user/manage.png

@ -3,7 +3,12 @@ import request from '@/utils/request'
// api地址
const api = {
courseType: 'course/getCourseType',
list: 'course/getCourseList'
list: 'course/getCourseList',
retailList: 'retail/retailPayList',
describe: 'retail/describe',
submit: 'retail/submit',
getSoftAgreement: 'retail/getSoftAgreement',
tradeQuery: 'retail/tradeQuery',
}
// 分类
@ -14,3 +19,28 @@ export const courseType = (param) => {
export const courseList = (param) => {
return request.get(api.list, param)
}
// 会员列表
export const retailList = (param) => {
return request.post(api.retailList, param)
}
// 会员全益
export const describe = (param) => {
return request.get(api.describe, param)
}
// 会员余额支付
export const submit = (param) => {
return request.post(api.submit, param)
}
/**
* 交易查询
* 查询第三方支付订单是否付款成功
* @param {Object} param
*/
export function tradeQuery(param) {
return request.get(api.tradeQuery, param)
}
// 协议
export const getSoftAgreement = (param) => {
return request.get(api.getSoftAgreement, param)
}

@ -1,6 +1,6 @@
{
"extEnable": true,
"extAppid": "wx3f1dcf2e2ac45e7c",
"extAppid": "wx8dc1c2620cfd953a",
"ext": {
"store_id": 10048
}

@ -239,6 +239,21 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/gamll/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/gamll/rules",
"style": {
"navigationBarTitleText": "软件付费服务协议",
"enablePullDownRefresh": false
}
}
],
"subPackages": [{

File diff suppressed because it is too large Load Diff

@ -0,0 +1,51 @@
<template>
<view class="pages">
<view class="content" v-html="strings">
</view>
<addShuiyin />
</view>
</template>
<script>
import * as api from '@/api/tutorial'
export default {
data() {
return {
strings: '',
}
},
onLoad(options) {
this.getSoftAgreementData()
},
methods: {
//
async getSoftAgreementData() {
let that = this;
let {
status,
message,
data
} = await api.getSoftAgreement({
type: 'soft'
});
if (status == 200) {
this.strings = data.detail.content
} else {
that.$toast(message)
}
},
},
}
</script>
<style scoped lang="scss">
.pages {
width: 100%;
height: 100%;
padding: 30rpx;
span {
white-space: normal !important
}
}
</style>

@ -27,7 +27,10 @@
</view>
</view>
<view class="a">
<view class="title"><image src="https://www.amiami.com.cn/static/news1/zuo@2x.png"></image>怎么邀请好友<image src="https://www.amiami.com.cn/static/news1/you@2x.png"></image></view>
<view class="title">
<image src="https://www.amiami.com.cn/static/news1/zuo@2x.png"></image>怎么邀请好友<image
src="https://www.amiami.com.cn/static/news1/you@2x.png"></image>
</view>
<view class="content" style="margin-top: 30rpx;">
<view class="item">
<image src="https://www.amiami.com.cn/static/news1/4@2x.png"></image>
@ -44,7 +47,10 @@
</view>
</view>
<view class="a">
<view class="title"><image src="https://www.amiami.com.cn/static/news1/zuo@2x.png"></image>邀请小技巧<image src="https://www.amiami.com.cn/static/news1/you@2x.png"></image></view>
<view class="title">
<image src="https://www.amiami.com.cn/static/news1/zuo@2x.png"></image>邀请小技巧<image
src="https://www.amiami.com.cn/static/news1/you@2x.png"></image>
</view>
<view class="desc1">邀请成功率提高200%</view>
<view class="content">
<view class="li">邀请您的同行跨行商家成功率高</view>
@ -55,20 +61,24 @@
</view>
<view class="invite-popup" v-if="isPopup">
<view class="popup">
<image class="bg" show-menu-by-longpress :src="qrcode"></image>
<image class="bg" mode="heightFix" show-menu-by-longpress :src="qrcode1"></image>
<view class="tips">
<view class="cancle" @click="download(1)">取消</view>
<view class="sure" @click="download(2)">保存到相册</view>
</view>
</view>
</view>
<canvas id="myCanvas" class="myCanvas" canvas-id="myCanvas"
:style="{'width': 702/devicePixelRatio+'px',' height': 1248/devicePixelRatio+'px',position: 'absolute',left:'-100000px',top:'-100000px'}"></canvas>
<view class="invite-fd">
<view class="btn" @click="openPage(3)">立即邀请</view></view>
<view class="btn" @click="openPage(3)">立即邀请</view>
</view>
<addShuiyin />
</view>
</template>
<script>
const ctx = uni.createCanvasContext('myCanvas')
import {
createQrCodeImg
} from '@/utils/qrcode'
@ -77,6 +87,7 @@
export default {
data() {
return {
qrcode1: "",
qrcode: "",
userInfo: {},
backgroundBg: {
@ -88,7 +99,8 @@
isPopup: false,
info: {},
info1: {},
list: []
list: [],
devicePixelRatio: 750 / uni.getSystemInfoSync().windowHeight
}
},
onReady() {
@ -138,17 +150,83 @@
return val.replace(/&(lt|gt|nbsp|amp|quot);/ig, function(all, t) {
return arrEntities[t];
});
},
createImge() {
const that = this;
ctx.fillRect(0, 0, 702 / that.devicePixelRatio, 1248 / that.devicePixelRatio);
uni.downloadFile({
url: 'https://www.amiami.com.cn/static/news1/business.png',
success(res) {
ctx.drawImage(res.tempFilePath, 0, 0, 702 / that.devicePixelRatio, 1248 / that
.devicePixelRatio);
uni.downloadFile({
url: that.qrcode,
success: (res2) => {
ctx.save(); //
ctx.beginPath(); //
ctx.arc(162 / that.devicePixelRatio / 2 + 285 / that.devicePixelRatio,
162 / that.devicePixelRatio / 2 + 870 / that.devicePixelRatio,
162 / that.devicePixelRatio / 2, 0, Math.PI * 2, false);
ctx.clip();
ctx.drawImage(res2.tempFilePath, 285 / that.devicePixelRatio, 870 /
that.devicePixelRatio, 162 / that.devicePixelRatio, 162 / that
.devicePixelRatio);
//
ctx.restore();
//
ctx.setFontSize(45 / that.devicePixelRatio);
ctx.setFillStyle('#cf100d');
ctx.fillText(that.userInfo.user_id, 200 / that.devicePixelRatio, 1213 /
that.devicePixelRatio);
ctx.draw()
uni.canvasToTempFilePath({
width: 702 / that.devicePixelRatio,
height: 1248 / that.devicePixelRatio,
destWidth: 702 / that.devicePixelRatio,
destHeight: 1248 / that.devicePixelRatio,
canvasId: 'myCanvas',
success: function(res) {
// H5tempFilePath base64
console.log(res.tempFilePath)
that.qrcode1 = res.tempFilePath;
that.isPopup = true;
ctx.clearRect(0, 0, 702, 1248);
// uni.saveImageToPhotosAlbum({
// filePath: res.tempFilePath,
// success(data) {
// that.$success('')
// },
// fail(err) {
// if (err.errMsg ===
// 'saveImageToPhotosAlbum:fail auth deny'
// ) {
// that.$toast(
// '访 ( - - )',
// 3000)
// }
// }
// })
}
})
},
})
}
})
},
//
async InviteUserPoster() {
const {
status,
data
} = await newFunApi.InviteUserPoster({type:2});
} = await newFunApi.InviteUserPoster({});
if (status == 200) {
console.log(data)
this.isPopup = true;
this.qrcode = data.imageUrl
this.qrcode = data.imageUrl;
this.createImge();
}
},
download(type) {
@ -156,7 +234,14 @@
app.isPopup = false;
if (type == 1) {
return;
} else {
uni.showLoading({
title: '加载中'
})
app.onSaveImage(app.qrcode1)
// this.createImge();
}
return;
uni.showLoading({
title: '加载中'
})
@ -254,7 +339,11 @@
url: "/pages/news/user/withdrawal?balance=" + this.userInfo.withdrawal_money
})
} else if (index == 3) {
if (!this.qrcode1) {
this.InviteUserPoster();
} else {
this.isPopup = true;
}
} else if (index == 4) {
uni.navigateTo({
url: "/pages/invite/rule"
@ -272,6 +361,12 @@
background-size: 100% auto;
min-height: 100vh;
padding-bottom: 150rpx;
.myCanvas {
position: absolute;
z-index: -1;
}
&-fd {
width: 100%;
position: fixed;
@ -283,6 +378,7 @@
box-sizing: border-box;
display: flex;
justify-content: center;
.btn {
width: 642rpx;
line-height: 90rpx;
@ -294,6 +390,7 @@
color: #FFFFFF;
}
}
&-popup {
width: 100%;
height: 100%;
@ -304,6 +401,9 @@
z-index: 55;
.popup {
display: flex;
justify-content: center;
/* 水平居中 */
width: 672rpx;
height: 912rpx;
position: absolute;
@ -345,12 +445,14 @@
display: flex;
align-items: center;
justify-content: space-between;
.cancle {
flex: 1;
background-color: #FFFFFF;
margin-right: 30rpx;
border-radius: 10rpx;
}
.sure {
border-radius: 10rpx;
flex: 1;
@ -371,11 +473,13 @@
}
}
&-hd {
width: 100%;
text-align: center;
height: 435rpx;
position: relative;
.rule {
width: 50rpx;
height: 170rpx;
@ -414,6 +518,7 @@
&-bd {
padding: 0 24rpx 24rpx;
overflow: hidden;
.a {
width: 100%;
min-height: 290rpx;
@ -422,6 +527,7 @@
margin-bottom: 20rpx;
padding-bottom: 50rpx;
overflow: hidden;
.title {
line-height: 100rpx;
font-weight: 400;
@ -430,23 +536,27 @@
display: flex;
align-items: center;
justify-content: center;
image {
width: 52rpx;
height: 24rpx;
margin: 0 20rpx;
}
}
.desc1 {
text-align: center;
font-size: 28rpx;
color: #9A372D;
position: relative;
}
.desc {
text-align: center;
font-size: 28rpx;
color: #9A372D;
position: relative;
&::after {
content: "";
width: 100rpx;
@ -457,6 +567,7 @@
left: 150rpx;
z-index: 2;
}
&::before {
content: "";
width: 100rpx;
@ -468,16 +579,19 @@
z-index: 2;
}
}
.content {
width: 100%;
margin-top: 45rpx;
overflow: hidden;
.item {
width: 33.3%;
text-align: center;
font-size: 26rpx;
color: #9A372D;
float: left;
image {
width: 122rpx;
height: 122rpx;
@ -485,6 +599,7 @@
margin: 0 auto 20rpx;
}
}
.li {
padding: 0 50rpx 0 80rpx;
position: relative;
@ -492,6 +607,7 @@
font-size: 26rpx;
color: #9A372D;
line-height: 45rpx;
&::after {
content: "";
width: 10rpx;
@ -508,18 +624,21 @@
}
}
.tixian {
width: 110rpx;
height: 110rpx;
background: #FFFFFF;
box-shadow: 0px 4rpx 12rpx 0px rgba(77, 13, 17, 0.16);
border-radius: 50%;
image {
width: 30rpx;
height: 30rpx;
display: block;
margin: 15rpx auto;
}
font-weight: 400;
font-size: 20rpx;
text-align: center;

File diff suppressed because it is too large Load Diff

@ -1,5 +1,5 @@
{
"appid": "wxa3127ed5c3542a28",
"appid": "wx8dc1c2620cfd953a",
"compileType": "miniprogram",
"libVersion": "3.3.3",
"packOptions": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Loading…
Cancel
Save