作者 lihongjuan

1

正在显示 93 个修改的文件 包含 4512 行增加0 行删除

要显示太多修改。

为保证性能只显示 93 of 93+ 个文件。

//app.js
App({
onLaunch: function () {
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
this.getsharepic()
// 登录
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
}
})
// 获取用户信息
wx.getSetting({
success: res => {
if (res.authSetting['scope.userInfo']) {
// 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
wx.getUserInfo({
success: res => {
// 可以将 res 发送给后台解码出 unionId
this.globalData.userInfo = res.userInfo
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
// 所以此处加入 callback 以防止这种情况
if (this.userInfoReadyCallback) {
this.userInfoReadyCallback(res)
}
}
})
}
}
})
},
// 获取分享图片
getsharepic(){
let that = this;
var url = 'user/share';
var params = {
}
that.post(url, params,"post").then((res) => {
console.log(res);
that.globalData.sharepic = res.thumbnail;
console.log(that.globalData)
}).catch((err) => {
})
},
//封装公共接口
post: function (url, data, headerParams) {
wx.showNavigationBarLoading()
var promise = new Promise((resolve, reject) => {
//init
let that = this;
let postData = data;
let baseUrl = 'https://areial.w.broing.cn/api/';
//网络请求
let header = {
// 'XX-Device-Type': 'wxapp',
'token': wx.getStorageSync("token") || ''
}
header = Object.assign(header, headerParams)
//网络请求
wx.request({
url: baseUrl + url,
data: postData,
method: headerParams,
header: header,
success: function (res) {
console.log(res)//返回取得的数据
if (res.data.code == '1') {
resolve(res.data.data);
}else if(res.data.code=='401'){
wx.showToast({
title: '请重新登录',
icon: 'none'
})
setTimeout(function () {
wx.navigateTo({
url: '/pages/index/index',
})
}, 1500)
}else {
reject(res.data)
}
},
fail: function (e) {
reject('网络出错');
// wx.hideLoading()
wx.hideNavigationBarLoading()
},
complete: function () {
wx.hideNavigationBarLoading()
},
})
});
return promise;
},
globalData: {
userInfo: null
}
})
\ No newline at end of file
... ...
{
"pages": [
"pages/startindex/startindex",
"pages/homepage/homepage",
"pages/goumaixuzhi/goumaixuzhi",
"pages/kaifapiao/kaifapiao",
"pages/lianjie/lianjie",
"pages/getphone/getphone",
"pages/index/index",
"pages/jiesuanpage/jiesuanpage",
"pages/vipdetail/vipdetail",
"pages/tupainpic/tupainpic",
"pages/picdetail/picdetail",
"pages/videodetail/videodetail",
"pages/videobox/videobox",
"pages/xiaofeijilu/xiaofeijilu",
"pages/picbox/picbox",
"pages/huiyuanknow/huiyuanknow",
"pages/chongzhi/chongzhi",
"pages/mine/mine",
"pages/orderbox/orderbox",
"pages/search/search",
"pages/searchresult/searcgresult",
"pages/cart/cart",
"pages/kind/kind",
"pages/logs/logs",
"pages/videoplay/videoplay",
"pages/jingmei/jingmei",
"pages/fuwuxieyi/fuwuxieyi",
"pages/pichezi/pichezi",
"pages/tupianbox/tupianbox",
"pages/yulanfapiao/yulanfapiao",
"pages/tousujianyi/tousujianyi"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "",
"navigationBarTextStyle": "black"
},
"sitemapLocation": "sitemap.json",
"tabBar": {
"selectedColor": "#FB6324",
"list": [
{
"pagePath": "pages/homepage/homepage",
"text": "首页",
"selectedColor": "#FB6324",
"iconPath": "img/shouye.png",
"selectedIconPath": "img/shouyeactive.png"
},
{
"pagePath": "pages/kind/kind",
"text": "分类",
"selectedColor": "#FB6324",
"iconPath": "img/kind.png",
"selectedIconPath": "img/kindactive.png"
},
{
"pagePath": "pages/cart/cart",
"text": "购物车",
"selectedColor": "#FB6324",
"iconPath": "img/cart.png",
"selectedIconPath": "img/cartactive.png"
},
{
"pagePath": "pages/mine/mine",
"text": "我的",
"selectedColor": "#FB6324",
"iconPath": "img/mine.png",
"selectedIconPath": "img/mineactive.png"
}
]
}
}
\ No newline at end of file
... ...
/**app.wxss**/
page{
background: #fff;
}
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
padding: 200rpx 0;
box-sizing: border-box;
}
image{
width:100%;
height:100%;
}
.anniu{
width:80rpx;
height:80rpx;
font-size: 0;
position: absolute;
left:50%;
top:50%;
transform: translate(-50%,-50%)
}
.anniux{
width:40rpx;
height:40rpx;
font-size: 0;
position: absolute;
left:50%;
top:50%;
transform: translate(-50%,-50%)
}
.searchsanjiao{
width:21rpx;
height:27rpx;
font-size: 0;
margin-left:8rpx;
}
.xiazairegister {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 5;
}
.picxian {
width: 1rpx;
height: 48rpx;
background: #eee;
margin-left: 18rpx;
}
.nodata{
color:#999;
font-size: 30rpx;
text-align: center;
margin-top:260rpx;
}
.fangdaimg{
width:32rpx;
height:32rpx;
font-size: 0;
position: absolute;
bottom:0;
right:0
}
.xuantype{
display:flex;
align-items: center;
height:60rpx;
background: #F9F9F9;
padding-right:24rpx;
border-radius: 4rpx;
margin-left:30rpx;
}
/* 购买须知 */
.buybox {
padding: 24rpx;
box-sizing: border-box;
color: #3d444d;
font-size: 28rpx;
line-height: 1.5;
}
.secondtitle {
color: #8c9198;
font-size: 32rpx;
text-align: center;
margin-top:20rpx;
}
.goumiatext {
text-indent: 60rpx;
margin-top:20rpx;
}
.text{
line-height: 1.5
}
.gouxuanleft{
width:36rpx;
height:36rpx;
font-size: 0
}
.gouxuanleft image{
width:100%;
height:100%;
}
.gouxuanright{
color:#5B5E63;
font-size: 28rpx;
margin-left:20rpx;
font-weight: bold;
}
.gouxuan{
display:flex;
align-items: center;
justify-content: center;
margin-top:20rpx;
}
.quebtn {
width: 286rpx;
height: 88rpx;
background: rgba(251, 99, 36, 1);
opacity: 1;
border-radius: 44rpx;
color: #fff;
font-size: 32rpx;
text-align: center;
line-height: 88rpx;
margin:40rpx auto 0;
}
.register {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
}
\ No newline at end of file
... ...

949 字节

581 字节

898 字节

935 字节

892 字节

839 字节

932 字节

1000 字节

948 字节

455 字节

// pages/cart/cart.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
array: ['2k', '4k', '8k'],
cartindex: 0,
cartlist: [],
totalmoney: 0,
video_id: [],
pic_id: [],
totalcartarr: [],
totalsel: false,
pp: [],
diannum: 0,
hebing: [],
delshow: false,
video_attr: [],
goucartid: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
ti(){
},
// 图片详情
picdetail(e) {
console.log(e)
let id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/picdetail/picdetail?id=' + id,
})
},
// 视频详情
videodetail(e) {
console.log(e)
let id = e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/videodetail/videodetail?id=' + id,
})
},
manage() {
this.setData({
delshow: !this.data.delshow
})
},
bindPickerChange: function(e) {
let newdiannum = this.data.diannum;
newdiannum++;
this.setData({
diannum: newdiannum
})
console.log(newdiannum)
console.log('picker发送选择改变,携带值为', e.detail.value)
console.log(e)
let index = e.currentTarget.dataset.index;
let newcartlist = this.data.cartlist;
let firmoney = newcartlist[index].videoprice
newcartlist[index].cartindex = e.detail.value;
if (newcartlist[index].video_id.vipprice == undefined) {
if (newcartlist[index].video_id.videotype[e.detail.value] == '2k') {
newcartlist[index].videoprice = newcartlist[index].video_id.price
} else if (newcartlist[index].video_id.videotype[e.detail.value] == '4k') {
newcartlist[index].videoprice = newcartlist[index].video_id.four_price
} else if (newcartlist[index].video_id.videotype[e.detail.value] == '8k') {
newcartlist[index].videoprice = newcartlist[index].video_id.eight_price
}
} else {
if (newcartlist[index].video_id.videotype[e.detail.value] == '2k') {
newcartlist[index].videoprice = newcartlist[index].video_id.vipprice
} else if (newcartlist[index].video_id.videotype[e.detail.value] == '4k') {
newcartlist[index].videoprice = newcartlist[index].video_id.four_vipprice
} else if (newcartlist[index].video_id.videotype[e.detail.value] == '8k') {
newcartlist[index].videoprice = newcartlist[index].video_id.eight_vipprice
}
}
let tt = 0;
let newtotalmoney = this.data.totalmoney;
let pp = this.data.pp;
pp.push(Number(newcartlist[index].videoprice));
console.log(pp)
let len = pp.length;
tt = Number(tt) + pp[len - 1]
if (newcartlist[index].sel == true) {
if (this.data.diannum == 1) {
console.log(newcartlist[index].videoprice)
newtotalmoney = newtotalmoney - firmoney;
newtotalmoney = newtotalmoney + tt
} else {
newtotalmoney = newtotalmoney - pp[newdiannum - 2];
console.log()
newtotalmoney = newtotalmoney + tt
}
} else {
newtotalmoney = newtotalmoney + tt
}
console.log(newtotalmoney)
if (newcartlist[index].sel == true) {
this.setData({
totalmoney: newtotalmoney
})
}
let newhebing=this.data.hebing;
for (var i = 0; i < newcartlist.length; i++) {
for (var j = 0; j < newhebing.length; j++) {
if (newhebing[j].id == newcartlist[i].id) {
newhebing[j] = newcartlist[i]
}
}
}
// newcartlist[index].cartindex = e.detail.value;
this.setData({
cartlist: newcartlist,
hebing:newhebing
})
console.log(this.data.cartlist);
console.log(this.data.hebing)
},
//获取购物车列表
getcartlsit() {
let that = this;
let url = 'user/car';
app.post(url, '', 'post').then((res) => {
console.log(res)
for (var obj of res) {
obj.sel = false;
obj.cartindex = 0;
if (obj.video_id != null) {
if (obj.video_id.vipprice == undefined) {
if (obj.video_id.two_url != '') {
obj.videoprice = obj.video_id.price
} else if (obj.video_id.four_url != '') {
obj.videoprice = obj.video_id.four_price
} else if (obj.video_id.eight_url != '') {
obj.videoprice = obj.video_id.eight_price
}
} else {
if (obj.video_id.two_url != '') {
obj.videoprice = obj.video_id.vipprice
} else if (obj.video_id.four_url != '') {
obj.videoprice = obj.video_id.four_vipprice
} else if (obj.video_id.eight_url != '') {
obj.videoprice = obj.video_id.eight_vipprice
}
}
}
if(obj.pic_id!=null){
console.log(obj)
console.log(obj.pic_id.vipprice)
}
}
that.setData({
cartlist: res
})
let newcartlist = res;
for (var obj of newcartlist) {
if (obj.video_id != null) {
let arr = [];
if (obj.video_id.eight_url != '') {
arr.unshift(8 + 'k')
}
if (obj.video_id.four_url != '') {
arr.unshift(4 + 'k')
}
if (obj.video_id.two_url != '') {
arr.unshift(2 + 'k')
}
obj.video_id.videotype = arr
}
}
that.setData({
cartlist: newcartlist
})
console.log(that.data.cartlist)
}).catch((err) => {
})
},
// 选择购物车
selcart(e) {
let that = this;
let token = wx.getStorageSync("token");
if (token == '') {
wx.showToast({
title: '请先登录',
icon: 'none'
})
setTimeout(function() {
wx.navigateTo({
url: '/pages/index/index',
})
}, 1500)
} else {
console.log(e)
let cartid = e.currentTarget.dataset.cartid;
let sel = e.currentTarget.dataset.sel;
let type = e.currentTarget.dataset.type;
let newpic_id = that.data.pic_id;
let newvideo_id = that.data.video_id;
let newgoucartid = that.data.goucartid;
let newtotalcartarr = that.data.totalcartarr;
let newcartlist = this.data.cartlist;
let newtotalmoney = that.data.totalmoney;
let newhebing = that.data.hebing;
let newvideo_attr = that.data.video_attr;
for (var obj of newcartlist) {
if (obj.id == cartid) {
obj.sel = !obj.sel;
if (obj.sel == true && type == 1) {
newvideo_id.push(obj.video_id.id);
newtotalcartarr.push(cartid);
newtotalmoney = Number(newtotalmoney) + Number(obj.videoprice);
newhebing.push(obj)
console.log('111', newtotalcartarr)
} else if (obj.sel == false && type == 1) {
for(var i=0;i<newtotalcartarr.length;i++){
if (newtotalcartarr[i]==cartid){
newtotalcartarr.splice(i,1);
newtotalmoney = Number(newtotalmoney) - Number(obj.videoprice);
}
}
console.log('333', newvideo_id, newtotalcartarr)
for (var j = 0; j < newtotalcartarr.length; j++) {
if (newtotalcartarr[j] == cartid) {
newtotalcartarr.splice(j, 1)
}
}
for (var k = 0; k < newhebing.length; k++) {
if (newhebing[k].id == cartid) {
newhebing.splice(k, 1)
}
}
} else if (obj.sel == true && type == 2) {
newpic_id.push(obj.pic_id.id);
newtotalcartarr.push(cartid);
newhebing.push(obj)
if (obj.pic_id.vipprice == undefined) {
newtotalmoney = Number(newtotalmoney) + Number(obj.pic_id.price)
} else {
newtotalmoney = Number(newtotalmoney) + Number(obj.pic_id.vipprice)
}
console.log(newpic_id, newtotalcartarr)
} else if (obj.sel == false && type == 2) {
for(var i=0;i<newtotalcartarr.length;i++){
if(newtotalcartarr[i]==cartid){
newtotalcartarr.splice(i,1);
if (obj.pic_id.vipprice == undefined) {
newtotalmoney = Number(newtotalmoney) - Number(obj.pic_id.price)
} else {
newtotalmoney = Number(newtotalmoney) - Number(obj.pic_id.vipprice)
}
}
}
// console.log('444', newpic_id, newtotalcartarr);
// for (var j = 0; j < newtotalcartarr.length; j++) {
// if (newtotalcartarr[j] == cartid) {
// newtotalcartarr.splice(j, 1)
// }
// }
for (var k = 0; k < newhebing.length; k++) {
if (newhebing[k].id == cartid) {
newhebing.splice(k, 1)
}
}
}
}
}
if (newcartlist.length == newtotalcartarr.length) {
that.setData({
totalsel: true
})
} else {
that.setData({
totalsel: false
})
}
newtotalmoney = newtotalmoney.toFixed(2)
that.setData({
cartlist: newcartlist,
video_id: newvideo_id,
pic_id: newpic_id,
totalcartarr: newtotalcartarr,
totalmoney: newtotalmoney,
hebing: newhebing
})
console.log(that.data.video_id);
// console.log(that.data.pic_id);
// console.log(that.data.totalcartarr);
// console.log(that.data.totalmoney);
// console.log(that.data.hebing)
}
},
// 全部选择
selallcart() {
this.setData({
totalsel: !this.data.totalsel
})
let newcartlist = this.data.cartlist;
let newtotalmoney = 0;
let newpic_id = this.data.pic_id;
let newvideo_id = this.data.video_id;
let newtotalcartarr = [];
let newhebing = this.data.hebing
if (this.data.totalsel == true) {
for (var obj of newcartlist) {
obj.sel = true;
if (obj.pic_id == null) {
console.log(obj.video_id)
newvideo_id.push(obj.video_id.id);
newtotalcartarr.push(obj.id);
newhebing.push(obj)
newtotalmoney = newtotalmoney + Number(obj.videoprice)
// if (obj.video_id.videotype[0] == '2k') {
// if (obj.video_id.vipprice == undefined) {
// newtotalmoney = newtotalmoney + obj.video_id.price
// } else {
// newtotalmoney = newtotalmoney + obj.video_id.vipprice
// }
// } else if (obj.video_id.videotype[0] == '4k') {
// if (obj.video_id.four_vipprice == undefined) {
// newtotalmoney = newtotalmoney + obj.video_id.four_price
// } else {
// newtotalmoney = newtotalmoney + obj.video_id.four_vipprice
// }
// } else if (obj.video_id.videotype[0] == '8k') {
// if (obj.video_id.four_vipprice == undefined) {
// newtotalmoney = newtotalmoney + obj.video_id.eight_price
// } else {
// newtotalmoney = newtotalmoney + obj.video_id.eight_vipprice
// }
// }
} else if (obj.video_id == null) {
newpic_id.push(obj.pic_id.id);
newtotalcartarr.push(obj.id)
newhebing.push(obj)
if (obj.pic_id.vipprice == undefined) {
newtotalmoney = newtotalmoney + obj.pic_id.price
} else {
newtotalmoney = newtotalmoney + obj.pic_id.vipprice
}
}
}
} else {
for (var obj of newcartlist) {
obj.sel = false;
}
newtotalmoney = 0;
newhebing = [];
newtotalcartarr=[]
}
newtotalmoney = newtotalmoney.toFixed(2)
this.setData({
totalmoney: newtotalmoney,
cartlist: newcartlist,
pic_id: newpic_id,
video_id: newvideo_id,
totalcartarr: newtotalcartarr,
hebing: newhebing
})
console.log('76543', this.data.video_id)
},
hejisuan() {
if (this.data.totalcartarr.length == 0) {
wx.showToast({
title: '请选结算的视频或图片',
icon: "none"
})
} else {
let newhebing = this.data.hebing;
newhebing = JSON.stringify(newhebing);
let newpic_id = JSON.stringify(this.data.pic_id);
let newvideo_id = JSON.stringify(this.data.video_id);
let newtotalcartarr=JSON.stringify(this.data.totalcartarr)
console.log(newpic_id);
console.log(newvideo_id)
wx.navigateTo({
url: '/pages/jiesuanpage/jiesuanpage?totalmoney=' + this.data.totalmoney + '&hebing=' + newhebing + '&totalcartarr=' + newtotalcartarr
})
}
},
delcart() {
let that = this;
if (that.data.totalcartarr.length == 0) {
wx.showToast({
title: '请选择要删除的图片或视频',
icon: "none"
})
} else {
let url = 'user/delcar';
let param = {
ids: that.data.totalcartarr.join(",")
}
app.post(url, param, 'post').then((res) => {
console.log(res);
let newcartlist = that.data.cartlist;
let newtotalmoney = that.data.totalmoney;
let newtotalcartarr = that.data.totalcartarr;
let money = 0;
for (var i = 0; i < newcartlist.length; i++) {
for (var j = 0; j < newtotalcartarr.length; j++) {
if (newtotalcartarr[j] == newcartlist[i].id) {
console.log(newtotalcartarr[j]);
console.log(newcartlist[i])
if (newcartlist[i].pic_id == null) {
console.log(777)
money = newcartlist[i].videoprice
newtotalmoney = newtotalmoney - money
} else if (newcartlist[i].video_id == null) {
if (newcartlist[i].pic_id.vipprice == undefined) {
money = newcartlist[i].pic_id.price
} else {
money = newcartlist[i].pic_id.vipprice
}
newtotalmoney = newtotalmoney - money
}
}
}
}
that.setData({
totalmoney: newtotalmoney
})
wx.showToast({
title: '删除购物车成功',
icon: 'none'
})
setTimeout(function() {
that.getcartlsit();
that.setData({
totalcartarr:[],
totalsel: false
})
}, 1000)
}).catch((err) => {
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.getcartlsit();
this.setData({
totalmoney: 0,
video_id: [],
pic_id: [],
totalcartarr: [],
totalsel: false,
pp: [],
diannum: 0,
hebing: []
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "购物车"
}
\ No newline at end of file
... ...
<view class="cartboxhead">
<view class="del" wx:if="{{delshow}}" bindtap="delcart">删除</view>
<view class="managerlist">
<view class="cartboxheadright" bindtap="manage">
<image src="/img/seetingimger.png"></image>
</view>
<view class="cartboxrightname">管理</view>
</view>
</view>
<view class="nodata" wx:if="{{cartlist.length==0}}">暂无数据</view>
<view class="cartbigboxz" wx:else>
<view class="cartbox gouwuche" wx:for="{{cartlist}}" wx:key="">
<!-- 视频 -->
<view class="cartvideo" wx:if="{{item.video_id!=null}}">
<view class="cartbboxitem" wx:key="" >
<block catchtap="ti">
<view class="cartboxitemleft" catchtap="selcart" data-type="1" data-cartid="{{item.id}}">
<image src="/img/noselect.png" wx:if="{{item.sel==false}}"></image>
<image src="/img/selectcart.png" wx:else></image>
</view>
<view class="cartboxitemright">
<view class="videoitemimg" data-id="{{item.video_id.id}}" bindtap="videodetail">
<image src="{{item.video_id.thumbnail}}"></image>
<view class="anniu">
<image src="/img/anniu.png"></image>
</view>
</view>
<view class="cartboxitembottom">
<view class="cartboxitembotleft">
{{item.video_id.title}}
</view>
<block catchtap="ti">
<picker bindchange="bindPickerChange" value="{{index}}" range="{{item.video_id.videotype}}" data-index="{{index}}">
<view class="cartboxitemrightone">
<view class="cartbox">{{item.video_id.videotype[item.cartindex]}}</view>
<view class="picxian"></view>
<view class="cartxuansan">
<image src="/img/sanjiaodown.png"></image>
</view>
</view>
</picker>
</block>
</view>
<view class="money">¥{{item.videoprice}}</view>
</view>
</block>
</view>
</view>
<!-- 图片 -->
<view class="picbox" wx:if="{{item.pic_id!=null}}">
<view class="cartbboxitem" wx:key="" bindtap="picdetail" data-id="{{item.pic_id.id}}">
<view class="cartboxitemleft" catchtap="selcart" data-type="2" data-cartid="{{item.id}}" data-sel="{{item.sel}}">
<image src="/img/noselect.png" wx:if="{{item.sel==false}}"></image>
<image src="/img/selectcart.png" wx:else></image>
</view>
<view class="cartboxitemright">
<view class="videoitemimgp">
<image src="{{item.pic_id.thumbnail}}"></image>
</view>
<view class="cartboxitembottom">
<view class="cartboxitembotleft">
{{item.pic_id.title}}
</view>
<!-- <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
<view class="cartboxitemrightone">
<view class="cartbox">{{array[index]}}</view>
<view class="picxian"></view>
<view class="cartxuansan">
<image src="/img/sanjiaodown.png"></image>
</view>
</view>
</picker> -->
</view>
<view class="money" wx:if="{{item.pic_id.vipprice==undefined}}">¥{{item.pic_id.price}}</view>
<view class="money" wx:else>¥{{item.pic_id.vipprice}}</view>
</view>
</view>
</view>
</view>
</view>
<view class="cartfoot">
<view class="cartfootleft">
<view class="cartfootlefimg" bindtap="selallcart">
<image src="/img/noselect.png" wx:if="{{totalsel==false}}"></image>
<image src="/img/selectcart.png" wx:else></image>
</view>
<view class="cartfootlefthe">合计:¥{{totalmoney}}</view>
</view>
<view class="cartfootright" bindtap="hejisuan">合并计算({{totalcartarr.length}})</view>
</view>
\ No newline at end of file
... ...
.cartbox {
padding: 24rpx;
box-sizing: border-box;
color: #5b5e63;
font-size: 28rpx;
}
.gouwuche {
border-bottom: 24rpx solid #f9f9f9;
}
.cartbigboxz {
padding-bottom: 100rpx;
}
.cartbboxitem {
display: flex;
align-items: center;
/* border-bottom: 1rpx solid #f5f5f5;
padding-bottom: 48rpx; */
}
.cartboxitemleft {
width: 32rpx;
height: 32rpx;
font-size: 0;
}
.cartboxhead {
display: flex;
justify-content: flex-end;
align-items: center;
padding: 14rpx 36rpx;
box-sizing: border-box;
border-bottom: 24rpx solid #f9f9f9;
}
.managerlist {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-end;
/* padding: 14rpx 26rpx;
box-sizing: border-box;
border-bottom: 24rpx solid #f9f9f9; */
}
.del {
width: 180rpx;
height: 60rpx;
background: #fb6324;
color: #fff;
font-size: 22rpx;
text-align: center;
line-height: 60rpx;
border-radius: 16rpx;
margin-right: 60rpx;
}
.cartboxheadright {
width: 35rpx;
height: 35rpx;
font-size: 0;
margin-right: 5rpx;
}
.cartboxrightname {
color: #bdc4ce;
font-size: 22rpx;
margin-top: 6rpx;
}
.videoitemimg {
width: 640rpx;
height: 360rpx;
font-size: 0;
position: relative;
}
.videoitemimgp {
width: 640rpx;
height: 212rpx;
font-size: 0;
}
.cartboxitemright {
margin-left: 24rpx;
}
.cartboxitembottom {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 24rpx;
}
.cartboxitemrightone {
display: flex;
align-items: center;
background: #f9f9f9;
height: 60rpx;
padding: 0 24rpx;
box-sizing: border-box;
}
.cartxuansan {
width: 28rpx;
height: 30rpx;
font-size: 0;
}
.picxian {
margin-right: 20rpx;
box-sizing: border-box;
}
.money {
color: #ea322b;
font-size: 32rpx;
font-weight: bold;
margin-top: 15rpx;
}
.cartfoot {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0;
box-sizing: border-box;
height: 88rpx;
position: fixed;
bottom: 0;
left: 0;
}
.cartfootleft {
width: 470rpx;
height: 88rpx;
padding: 0 32rpx;
box-sizing: border-box;
display: flex;
align-items: center;
background: #fff;
}
.cartfootlefimg {
width: 32rpx;
height: 32rpx;
font-size: 0;
margin-top: 5rpx;
}
.cartfootlefthe {
margin-left: 24rpx;
color: #ea322b;
font-size: 28rpx;
font-weight: bold;
}
.cartfootright {
width: 280rpx;
background: #fb6324;
font-size: 32rpx;
color: #fff;
text-align: center;
height: 88rpx;
line-height: 88rpx;
}
.cartboxitembotleft {
color: #06121e;
font-size: 28rpx;
font-weight: bold;
}
... ...
// pages/chongzhi/chongzhi.js
const app=getApp()
Page({
/**
* 页面的初始数据
*/
data: {
weizhi: false,
agree: false,
money: '',
order_id:'',
hui:1
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(this.data.options)
this.setData({
hui:options.hui
})
},
chongzhihui(e){
console.log(e)
this.setData({
money:e.detail.value
})
},
chongzhi(e) {
console.log(e)
this.setData({
money: e.detail.value
})
},
huiyuan(){
console.log(typeof(this.data.hui))
if(this.data.hui=='1'){
console.log(9999)
wx.redirectTo({
url:'/pages/vipdetail/vipdetail?hui=' + 1,
})
}else{
console.log(888)
wx.redirectTo({
url: '/pages/vipdetail/vipdetail',
})
}
},
xuanzhifu() {
this.setData({
weizhi: !this.data.weizhi
})
},
agreet() {
this.setData({
agree: !this.data.agree
})
},
zhifu(){
console.log(this.data.money)
if(this.data.money==''){
wx.showToast({
title: '请输入充值金额',
icon:"none"
})
return false
}
if (this.data.agree==false){
wx.showToast({
title: '请勾选用户须知',
icon:"none"
})
return false
}
if(this.data.money!=''){
if(this.data.hui==1){
if(this.data.money<8000){
wx.showToast({
title: '请输入超过8000的金额',
icon:"none"
})
return false
}
}
}
if (this.data.hui == 1){
this.huiyuanorder()
}else{
this.feihuiyaun()
}
// let that = this;
// let url = 'user/toporder';
// let param={
// money:that.data.money
// }
// app.post(url, param, 'post').then((res) => {
// console.log(res);
// that.setData({
// order_id:res.order_id,
// })
// that.pay()
// }).catch((err) => {
// })
},
// 非会员订单
feihuiyaun(){
let that = this;
let url = 'user/toporder';
let param = {
money: that.data.money
}
app.post(url, param, 'post').then((res) => {
console.log(res);
that.setData({
order_id: res.order_id,
})
that.pay()
}).catch((err) => {
})
},
// 创建会员订单
huiyuanorder(){
let that = this;
let url = 'user/viporder';
let param = {
total: that.data.money
}
app.post(url, param, 'post').then((res) => {
console.log(res);
that.setData({
order_id: res.order_id,
})
that.pay()
}).catch((err) => {
wx.showToast({
title: err.msg,
icon:'none'
})
})
},
// 支付接口
pay(){
let that = this;
let url = 'pay/pay';
let param = {
order_id: that.data.order_id
}
app.post(url, param, 'post').then((res) => {
console.log(res);
that.payment(res)
}).catch((err) => {
})
},
//唤起支付
payment(res) {
let that = this;
var timeStamp = res.timeStamp.toString();
// console.log(timeStamp);
wx.requestPayment({
timeStamp: timeStamp,
nonceStr: res.nonceStr,
package: res.package,
signType: res.signType,
paySign: res.paySign,
success: function (res) {
console.log(res)
wx.switchTab({
url: '/pages/mine/mine',
})
},
fail: function (res) {
console.log(123);
console.log(res);
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "充值"
}
\ No newline at end of file
... ...
<view class="chongbox">
<view class='chongzhir'>充值金额</view>
<view class="chongtext">
<view class="chongtextleft">
</view>
<view class="chongtextright">
<input placeholder='充值8000起' type="digit" bindinput="chongzhihui" placeholder-class="enterhui" wx:if="{{hui==1}}"/>
<input placeholder='请输入充值金额' type="digit" placeholder-class="enterhui" bindinput="chongzhi" wx:else/>
</view>
</view>
<view class='zhifu' bindtap="xuanzhifu">
<view class="zhifuleft" >
<image src="/img/xuanze.png"></image>
</view>
<view class="zhifuright">
<view class="zhifurightl">
<image src="/img/weixinimg.png"></image>
</view>
<view class="zhifurightr">微信支付</view>
</view>
</view>
</view>
<view class="yuedu" bindtap="agreet">
<view class="yueduleft" >
<image src="/img/duigou.png" wx:if="{{agree==true}}"></image>
<image src="/img/noxieyi.png" wx:else></image>
</view>
<view class="yuedutext">
<view class="yueduagree"> 我已阅读并同意</view>
<view class="yuedujing" catchtap='huiyuan'>《会员介绍》</view>
</view>
</view>
<view class="zhifupay" bindtap="zhifu">支付</view>
\ No newline at end of file
... ...
.chongbox {
padding: 24rpx 32rpx;
box-sizing: border-box;
}
.chongzhir {
color: #06121e;
font-size: 32rpx;
font-weight: bold;
}
.chongtext {
display: flex;
align-items: center;
margin-top: 24rpx;
}
.chongtextleft {
color: #06121e;
font-size: 64rpx;
font-weight: bold;
}
.chongtextright {
width: 500rpx;
height: 90rpx;
color: #06121E;
font-size: 64rpx;
margin-left: 28rpx;
}
.enterhui{
color:#BDC4CE
}
.chongtextright input {
width: 100%;
height: 100%;
}
.zhifu {
display: flex;
align-items: center;
margin-top: 24rpx;
}
.zhifuleft {
width: 32rpx;
height: 32rpx;
font-size: 0;
}
.zhifuright {
display: flex;
align-items: center;
margin-left: 12rpx;
}
.zhifurightl {
width: 56rpx;
height: 60rpx;
font-size: 0;
}
.zhifurightr {
color: #06121e;
font-size: 28rpx;
margin-left: 6rpx;
}
.yuedu {
display: flex;
align-items: center;
margin-top: 60rpx;
position: fixed;
bottom: 156rpx;
left: 24rpx;
}
.yueduleft {
width: 40rpx;
height: 40rpx;
font-size: 0;
}
.yuedutext {
display: flex;
align-items: center;
margin-left: 6rpx;
}
.yueduagree {
color: #8c9198;
font-size: 24rpx;
}
.yuedujing {
color: #fb6324;
font-size: 24rpx;
}
.zhifupay {
width: 702rpx;
height: 88rpx;
background: rgba(251, 99, 36, 1);
opacity: 1;
border-radius: 4rpx;
color:#FFFFFF;
font-size: 32rpx;
text-align: center;
line-height: 88rpx;
position: fixed;
bottom:40rpx;
left:24rpx;
}
... ...
// pages/fuwuxieyi/fuwuxieyi.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "服务协议"
}
\ No newline at end of file
... ...
<view class="huiyuanknow">
<view class="xieyi">亲爱的用户,您好</view>
<view class="buy">
欢迎您购买仁甲看见SHOP素材,请您在购买前务必仔细阅读以下内容:
</view>
<view class="item">
1充值VIP会员均可享有仁甲看见SHOP图片/视频素材七五折优惠。
</view>
<view class="item">
2购买的素材将以链接形式发送至您百度云账号。
</view>
<view class="item">
3购买素材前,请您先下载小样仔细进行预览,购买后概不接受因镜头抖动、闪烁、分辨率等问题的退换。
</view>
<view class="item">
4 购买后如若您需开发票,请联系后台客服人员,仔细填写个人信息,本公司按您填写的地址邮寄发票。
</view>
<view class="item">
5 此微信小程序中图片/视频涉及的物权与本公司无关。
</view>
<view class="item">
6购买的素材仅可以使用于本协议中的指定项目,如若在其他项目中继续使用,须联系客服更新授权书(免费),否则我们将保留通过法律途径追究您侵权责任的权利。
</view>
<view class="xiyigui">
本制度最终解释权归山东仁甲看见影像服务有限公司所有。 如若您仍有其他问题,请联系小程序后台客服人员。
</view>
</view>
\ No newline at end of file
... ...
.huiyuanknow{
padding: 40rpx 32rpx;
box-sizing: border-box;
color:#06121E;
font-size: 28rpx;
}
.mai {
width: 702rpx;
height: 88rpx;
background: rgba(251, 99, 36, 1);
opacity: 1;
border-radius: 4rpx;
color:#fff;
font-size: 32rpx;
text-align: center;
line-height: 88rpx;
margin:0 auto 36rpx;
box-sizing: border-box;
}
.buybottom{
width:750rpx;
height:124rpx;
background: #fff;
position: fixed;
bottom:0;
}
.buy{
margin-top: 20rpx;
}
.item{
margin-top:10rpx;
line-height: 1.5
}
.xiyigui{
margin-top:20rpx;
}
\ No newline at end of file
... ...
// pages/getphone/getphone.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
session_key: '',
code: '',
phone:""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.getsessionkey()
},
//获取sessionkey
getsessionkey() {
let that = this;
wx.login({
success: (res) => {
console.log(res)
that.setData({
code: res.code
})
let url = 'user/getSessionKey',
params = {
code: that.data.code
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
session_key: res.session_key
})
}).catch((err) => {
})
}
});
},
//微信授权手机号
getPhoneNumber(e) {
console.log(e)
let that = this;
let url = 'user/getMobile',
params = {
sessionKey: that.data.session_key,
encryptedData: e.detail.encryptedData,
iv: e.detail.iv
}
app.post(url, params,"post").then((res) => {
console.log(res);
that.setData({
phone:res.tel
})
wx.switchTab({
url: '/pages/homepage/homepage',
})
that.bangdingshouji()
}).catch((err) => {
console.log(err)
})
},
bangdingshouji() {
let that = this;
let url = 'user/phone',
params = {
phone:that.data.phone
}
app.post(url, params,"post").then((res) => {
console.log(res);
}).catch((err) => {
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "获取用户手机号"
}
\ No newline at end of file
... ...
<view class="shouquanimg">
<image src="/img/dun.png"></image>
</view>
<view class="quanname">仁甲看见SHOP申请获得您的手机号</view>
<button class='bottomtextright' open-type='getPhoneNumber' bindgetphonenumber='getPhoneNumber' >授权微信手机号</button>
\ No newline at end of file
... ...
/**index.wxss**/
.userinfo {
display: flex;
flex-direction: column;
align-items: center;
}
.userinfo-avatar {
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}
.userinfo-nickname {
color: #aaa;
}
.usermotto {
margin-top: 200px;
}
.shouquanimg {
width: 172rpx;
height: 202rpx;
font-size: 0;
margin: 244rpx auto 0;
}
.quanname {
color: #06121e;
font-size: 32rpx;
font-weight: bold;
margin-top: 48rpx;
text-align: center;
}
.huoqu {
color: #5b5e63;
font-size: 28rpx;
margin-top: 16rpx;
text-align: center;
}
.bottomtextright {
width: 486rpx;
height: 88rpx;
background: rgba(251, 99, 36, 1);
opacity: 1;
border-radius: 44rpx;
color:#fff;
font-size: 32rpx;
margin:100rpx auto 0;
}
... ...
// pages/goumaixuzhi/goumaixuzhi.js
Page({
/**
* 页面的初始数据
*/
data: {
select:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
selxieyi(){
this.setData({
select:!this.data.select
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "购买须知"
}
\ No newline at end of file
... ...
// pages/homepage/homepage.js
function getRandomColor() {
let rgb = []
for (let i = 0; i < 3; ++i) {
let color = Math.floor(Math.random() * 256).toString(16)
color = color.length == 1 ? '0' + color : color
rgb.push(color)
}
return '#' + rgb.join('')
}
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
array: ['视频', '图片', '精彩大片'],
index: 0,
jingmeiurl: '',
picurl: '',
videourl: '',
thumbinal: '',
pic:'',
image:'',
phoneshow:false,
phonenum:''
},
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
index: e.detail.value
})
},
// 图片
picbox() {
let token = wx.getStorageSync("token");
if (token == '') {
wx.showToast({
title: '请先登录',
icon: 'none'
})
setTimeout(function() {
wx.navigateTo({
url: '/pages/index/index',
})
}, 1500)
} else {
wx.navigateTo({
url: '/pages/pichezi/pichezi',
})
}
},
videobox() {
let token = wx.getStorageSync("token");
if (token == '') {
wx.showToast({
title: '请先登录',
icon: 'none'
})
setTimeout(function() {
wx.navigateTo({
url: '/pages/index/index',
})
}, 1500)
} else {
// wx.navigateTo({
// url: '/pages/videobox/videobox',
// })
wx.switchTab({
url: '/pages/kind/kind',
})
}
},
hidewrap(){
this.setData({
phoneshow:false
})
},
// 输入手机号
enterphone(e){
this.setData({
phonenum:e.detail.value
})
},
yuyue(){
let token=wx.getStorageSync("token");
if(token==''){
wx.showToast({
title: '请先登录',
icon:'none'
})
setTimeout(function(){
wx.navigateTo({
url: '/pages/index/index',
})
},1500)
}else{
this.setData({
phoneshow: true
})
}
},
// 确人提交
surebtn(){
let that = this;
if (!(/^1[3456789]\d{9}$/.test(that.data.phonenum))) {
wx.showToast({
title: '请输入正确手机号',
icon: 'none'
})
return false;
}
var url = '/pay/appointment';
var params = {
phone:that.data.phonenum
}
app.post(url, params,"post").then((res) => {
console.log(res);
wx.showToast({
title: '提交成功',
icon:"none"
})
setTimeout(function(){
that.setData({
phoneshow:false
})
},1500)
}).catch((err) => {
})
},
enter(){
},
gosearch() {
let token = wx.getStorageSync("token");
if (token == '') {
wx.showToast({
title: '请先登录',
icon: 'none'
})
setTimeout(function() {
wx.navigateTo({
url: '/pages/index/index',
})
}, 1500)
} else {
wx.navigateTo({
url: '/pages/search/search?index=' + this.data.index,
})
}
},
govideo() {
let token = wx.getStorageSync("token");
if (token == '') {
wx.showToast({
title: '请先登录',
icon: 'none'
})
setTimeout(function() {
wx.navigateTo({
url: '/pages/index/index',
})
}, 1500)
} else {
wx.navigateTo({
url: '/pages/jingmei/jingmei'
})
}
},
// 获取首页内容
getindex(e) {
let that = this;
let url = 'user/index';
app.post(url, '', 'post').then((res) => {
console.log(res);
that.setData({
jingmeiurl: res.wonderful_thumbnail,
picurl: res.pic_thumbnail,
videourl: res.video_thumbnail
})
}).catch((err) => {
})
},
// 封面管理
fengmian(){
let that = this;
var url = 'user/index';
var params = {
}
app.post(url, params).then((res) => {
console.log(res);
this.setData({
thumbinal: res.thumbnail,
pic: res.pic,
image: res.image
})
}).catch((err) => {
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.fengmian()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function(res) {
this.videoContext = wx.createVideoContext('myVideo')
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
this.getindex()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
console.log(app.globalData.sharepic)
return {
title: '仁甲看见SHOP',
path: '/pages/startindex/startindex',
imageUrl: app.globalData.sharepic
}
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "仁甲看见SHOP"
}
\ No newline at end of file
... ...
<view class="videobox">
<view class="videohead" bindtap="govideo">
<image src='{{thumbinal}}'></image>
<view class="anniu">
<image src="/img/anniu.png"></image>
</view>
</view>
<view class="search">
<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
<!-- <view class="picker">
当前选择:{{array[index]}}
</view> -->
<view class="searchleft">
<view class="searchleftname">{{array[index]}}</view>
<view class="searchsanjiao">
<image src='/img/sanjiaodown.png'></image>
</view>
</view>
</picker>
<view class="picxian"></view>
<view class="searchright" bindtap="gosearch">
<view class="searchfightimg">
<image src="/img/sousuo.png"></image>
</view>
<view class="searchrightname">
<input placeholder='点击这里搜一搜' />
</view>
</view>
<div class="wrapper">
<div class="circle">
<image src="/img/hand.png"></image>
</div>
<!-- <div class="finger">
<image src="/img/shou2.png"></image>
</div> -->
</div>
</view>
<!-- 搜索内容 -->
<view class="searchbox">
<!-- 搜索图片 -->
<view class="searchboximg" bindtap="picbox">
<view class="searchimg">
<image src="{{pic}}"></image>
</view>
</view>
<!-- 搜索视频 -->
<view class="searchvideo" bindtap="videobox">
<view class="searchvideoimg">
<image src="{{image}}"></image>
<view class="anniu">
<image src="/img/anniu.png"></image>
</view>
</view>
</view>
</view>
</view>
<view class="crema" bindtap="yuyue">
<view class="cremaimg">
<image src="/img/crema.png"></image>
</view>
<view class='yuyeu'>预约</view>
<view class='yuyeu'>拍摄素材</view>
</view>
<!-- 预留电话 -->
<view class="register" wx:if="{{phoneshow}}" bindtap="hidewrap">
<view class="phonewrap" catchtap='enter'>
<view class="phonename">请输入您的手机号</view>
<view class="phoneenter">
<input placeholder='请输入手机号' bindinput="enterphone" type="number"/>
</view>
<view class="surebtn" bindtap="surebtn">确定</view>
</view>
</view>
\ No newline at end of file
... ...
page {
background: #fff;
}
.videobox {
padding: 24rpx;
box-sizing: border-box;
}
.videohead {
width: 702rpx;
height: 395rpx;
font-size: 0;
position: relative;
border-radius: 16rpx;
}
.videohead image {
border-radius: 16rpx;
}
.search {
display: flex;
align-items: center;
margin-top: 24rpx;
padding:10rpx 20rpx;
box-sizing: border-box;
/* background: #F9F9F9; */
border: 4rpx solid #fb6324;
}
.searchleft {
display: flex;
align-items: center;
}
.searchright {
width:440rpx;
display: flex;
align-items: center;
margin-left: 36rpx;
}
.searchsanjiao {
width: 28rpx;
height: 30rpx;
font-size: 0;
margin-left: 8rpx;
}
.searchfightimg {
width: 40rpx;
height: 40rpx;
font-size: 0;
}
.searchrightname {
width:378rpx;
margin-left: 22rpx;
color: #8c9198;
font-size: 28rpx;
}
.searchrightname input{
width:100%;
}
.searchleftname {
color: #8c9198;
font-size: 28rpx;
}
.searchimg {
width: 702rpx;
height: 235rpx;
font-size: 0;
margin-top: 24rpx;
border-radius: 16rpx;
}
.searchimg image {
border-radius: 16rpx;
}
.searchbox {
margin-top: 48rpx;
padding-bottom: 80rpx;
}
.searchvideoimg {
width: 702rpx;
height: 395rpx;
font-size: 0;
margin-top: 24rpx;
position: relative;
border-radius: 16rpx;
}
.searchvideoimg image {
border-radius: 16rpx;
}
.crema {
width: 145rpx;
height: 145rpx;
border-radius: 50%;
background: #fb6324;
position: fixed;
bottom: 20rpx;
left: 50%;
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.cremaimg {
width: 60rpx;
height: 60rpx;
font-size: 0;
}
.yuyeu {
font-size: 20rpx;
color: #fff;
margin-top: 2rpx;
}
.phonewrap {
width: 508rpx;
height: 400rpx;
background: #fff;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 20rpx;
padding: 32rpx;
box-sizing: border-box;
z-index: 999;
}
.phonename {
color: #333;
font-size: 28rpx;
margin-top: 40rpx;
font-weight: bold;
text-align: center;
}
.phoneenter {
width: 410rpx;
height: 85rpx;
background: #f9f9f9;
border-radius: 10rpx;
font-size: 0;
margin: 44rpx auto 0;
}
.phoneenter input {
width: 410rpx;
height: 85rpx;
padding: 12rpx;
box-sizing: border-box;
color: #8c9198;
font-size: 28rpx;
text-align: center;
}
.surebtn {
width: 180rpx;
height: 70rpx;
border-radius: 40rpx;
color: #fff;
font-size: 28rpx;
text-align: center;
line-height: 70rpx;
margin: 65rpx auto 0;
background: #fb6324;
}
.wrapper {
/* position: absolute;
top: 50%;
left: 50%; */
position: relative;
/* overflow: hidden; */
width: 60rpx;
height: 60rpx;
margin: 0 auto;
background-color: transparent;
/* margin: -250px 0 0 -250px; */
}
.circle {
position: absolute;
left: 15rpx;
top: 8rpx;
/* transform: translate(-50%,-50%); */
/* background: url("https://areial.w.broing.cn/uploads/20191120/hand.png") center center no-repeat; */
width: 40rpx;
height: 42rpx;
font-size: 0;
animation: circleHide 1s ease infinite both;
}
image{
width:100%;
height:100%;
}
.finger {
/* background: url("https://areial.w.broing.cn/uploads/20191120/hand.png") center center no-repeat; */
width:30rpx;
height: 30rpx;
position: absolute;
top:0;
left:16rpx;
animation: fingerHandle 1s ease infinite both;
font-size: 0
}
@keyframes fingerHandle {
0% {
transform: none;
}
70% {
transform: scale3d(2, 2, 2);
}
100% {
transform: none;
}
}
@keyframes circleHide {
0% {
opacity: 0;
transform: scale3d(0, 0, 0);
}
70% {
opacity: 1;
transform: scale3d(1.2, 1.2, 1.2);
}
100% {
opacity: 0;
transform: scale3d(0, 0, 0);
}
}
... ...
// pages/huiyuanknow/huiyuanknow.js
var WxParse = require('../../wxParse/wxParse.js');
const app=getApp()
Page({
/**
* 页面的初始数据
*/
data: {
knowdetail:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.huiyuankonw()
},
huiyuankonw(){
let that = this;
let url = 'user/vipdetail';
app.post(url, '', 'post').then((res) => {
console.log(res);
this.setData({
knowdetail:res
})
WxParse.wxParse('article', 'html', res.desc, that, 5);
}).catch((err) => {
})
},
buyhuiyuan(){
wx.navigateTo({
url: '/pages/chongzhi/chongzhi?hui='+1,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "会员须知"
}
\ No newline at end of file
... ...
<import src="../../wxParse/wxParse.wxml" />
<view class="huiyuanknow">
<!-- {{knowdetail.desc}} -->
<template is="wxParse" data="{{wxParseData:article.nodes}}" />
</view>
<view class="buybottom" bindtap="buyhuiyuan">
<view class="mai">确定</view>
</view>
\ No newline at end of file
... ...
.huiyuanknow{
padding: 40rpx 32rpx;
box-sizing: border-box;
color:#06121E;
font-size: 28rpx;
}
.mai {
width: 702rpx;
height: 88rpx;
background: rgba(251, 99, 36, 1);
opacity: 1;
border-radius: 4rpx;
color:#fff;
font-size: 32rpx;
text-align: center;
line-height: 88rpx;
margin:0 auto 36rpx;
box-sizing: border-box;
}
.buybottom{
width:750rpx;
height:124rpx;
background: #fff;
position: fixed;
bottom:0;
}
... ...
//index.js
//获取应用实例
const app = getApp()
Page({
data: {
url: '',
thumb: '',
title: ''
},
onLoad: function (options) {
console.log('99999',options)
if(options.title!=undefined){
this.setData({
url:options.url,
thumb:options.thumb,
title:options.title
})
}
},
// 登录
start(e) {
console.log(e)
let that = this;
wx.getSetting({
success(res) {
// console.log("res", res)
if (res.authSetting['scope.userInfo']) {
console.log("已授权=====")
// 已经授权,可以直接调用 getUserInfo 获取头像昵称
// wx.getUserInfo({
// success(res) {
// console.log("获取用户信息成功", res)
// that.setData({
// name: res.userInfo.nickName
// })
// },
// fail(res) {
// console.log("获取用户信息失败", res)
// }
// })
wx.login({
success: (res) => {
console.log(res)
// wx.setStorageSync("code", res.code)
let url = 'user/login';
let params = {
code: res.code,
nickname: e.detail.userInfo.nickName,
avatar: e.detail.userInfo.avatarUrl, //分享进入的需要此参数
}
app.post(url, params, 'post').then((res) => {
console.log(res)
wx.setStorageSync('token', res.token);
wx.setStorageSync("openid", res.openid);
if(that.data.title==''){
wx.navigateTo({
url: '/pages/getphone/getphone',
})
}else{
wx.navigateTo({
url: '/pages/videoplay/videoplay?url=' + that.data.url + '&thumb=' + that.data.thumb + '&title=' + that.data.title,
})
}
// wx.switchTab({
// url: '/pages/homepage/homepage',
// })
}).catch((errMsg) => {
console.log(errMsg)
wx.switchTab({
url: '/pages/homepage/homepage',
})
})
}
});
} else {
console.log("未授权=====")
wx.switchTab({
url: '/pages/homepage/homepage',
})
}
}
})
},
})
... ...
{
"navigationBarTitleText": "仁甲看见SHOP"
}
\ No newline at end of file
... ...
<view class="shouquanimg">
<image src="/img/dun.png"></image>
</view>
<view class="quanname">仁甲看见SHOP申请获得以下权限</view>
<view class="huoqu">获得你的公开信息(昵称,头像等)</view>
<button open-type="getUserInfo" bindgetuserinfo='start' class="bottomtextright" >微信授权</button>
\ No newline at end of file
... ...
/**index.wxss**/
.userinfo {
display: flex;
flex-direction: column;
align-items: center;
}
.userinfo-avatar {
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}
.userinfo-nickname {
color: #aaa;
}
.usermotto {
margin-top: 200px;
}
.shouquanimg {
width: 172rpx;
height: 202rpx;
font-size: 0;
margin: 244rpx auto 0;
}
.quanname {
color: #06121e;
font-size: 32rpx;
font-weight: bold;
margin-top: 48rpx;
text-align: center;
}
.huoqu {
color: #5b5e63;
font-size: 28rpx;
margin-top: 16rpx;
text-align: center;
}
.bottomtextright {
width: 686rpx;
height: 88rpx;
background: rgba(251, 99, 36, 1);
opacity: 1;
border-radius: 44rpx;
color:#fff;
font-size: 32rpx;
position: fixed;
bottom:48rpx;
left:32rpx;
}
... ...
// pages/cart/cart.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
array: ['2k', '4k', '8k'],
cartindex: 0,
cartlist: [],
totalmoney: 0,
video_id: [],
pic_id: [],
totalcartarr: [],
totalsel: false,
pp: [],
diannum: 0,
hebing: [],
order_id: '',
tixian: false,
xieyi: false,
money: "",
type: 1,
yu: true,
wei: false,
myinfo: '',
video_attr: [],
totalcartarr: [],
xuzhi: false,
select: false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(options);
let newtotal = JSON.parse(options.totalmoney);
newtotal = newtotal.toFixed(2)
this.setData({
cartlist: JSON.parse(options.hebing),
totalmoney: newtotal,
totalcartarr: JSON.parse(options.totalcartarr)
// pic_id: JSON.parse(options.pic_id),
// video_id: JSON.parse(options.video_id),
})
this.getmyinfo()
console.log(this.data.cartlist);
console.log(typeof(this.data.totalmoney));
console.log(this.data.pic_id);
console.log(this.data.video_id)
},
ti() {
},
getmyinfo() {
let that = this;
let url = 'user/mine';
app.post(url, '', 'post').then((res) => {
console.log(res);
that.setData({
money: res.money,
myinfo: res
})
if (res.is_vip==0){
that.setData({
type:2,
wei:true
})
}else{
that.setData({
type: 1,
wei: false
})
}
}).catch((err) => {
})
},
hidetixian() {
this.setData({
tixian: false
})
},
// 余额支付和微信支付
yuzhi() {
this.setData({
yu: !this.data.yu,
wei: false
})
if (this.data.yu == true) {
this.setData({
type: 1
})
} else {
this.setData({
type: 0
})
}
},
weizhi() {
this.setData({
wei: !this.data.wei,
yu: false
})
if (this.data.wei == true) {
this.setData({
type: 2
})
} else {
this.setData({
type: 0
})
}
},
xuanxie() {
this.setData({
xieyi: !this.data.xieyi
})
},
bindPickerChange: function(e) {
let newdiannum = this.data.diannum;
newdiannum++;
this.setData({
diannum: newdiannum
})
console.log(newdiannum)
console.log('picker发送选择改变,携带值为', e.detail.value)
console.log(e)
let index = e.currentTarget.dataset.index;
let newcartlist = this.data.cartlist;
let firmoney = newcartlist[index].videoprice
newcartlist[index].cartindex = e.detail.value;
if (newcartlist[index].video_id.vipprice == undefined) {
if (newcartlist[index].video_id.videotype[e.detail.value] == '2k') {
newcartlist[index].videoprice = newcartlist[index].video_id.price
} else if (newcartlist[index].video_id.videotype[e.detail.value] == '4k') {
newcartlist[index].videoprice = newcartlist[index].video_id.four_price
} else if (newcartlist[index].video_id.videotype[e.detail.value] == '8k') {
newcartlist[index].videoprice = newcartlist[index].video_id.eight_price
}
} else {
if (newcartlist[index].video_id.videotype[e.detail.value] == '2k') {
newcartlist[index].videoprice = newcartlist[index].video_id.vipprice
} else if (newcartlist[index].video_id.videotype[e.detail.value] == '4k') {
newcartlist[index].videoprice = newcartlist[index].video_id.four_vipprice
} else if (newcartlist[index].video_id.videotype[e.detail.value] == '8k') {
newcartlist[index].videoprice = newcartlist[index].video_id.eight_vipprice
}
}
let tt = 0;
let newtotalmoney = this.data.totalmoney;
console.log('11223344', newtotalmoney)
let pp = this.data.pp;
pp.push(Number(newcartlist[index].videoprice));
console.log(pp)
let len = pp.length;
tt = Number(tt) + pp[len - 1]
if (newcartlist[index].sel == true) {
if (this.data.diannum == 1) {
console.log(newcartlist[index].videoprice)
newtotalmoney = newtotalmoney - firmoney;
newtotalmoney = newtotalmoney + tt
} else {
newtotalmoney = newtotalmoney - pp[newdiannum - 2];
console.log()
newtotalmoney = newtotalmoney + tt
}
console.log(tt)
// if (newdiannum == 1) {
// newtotalmoney = newtotalmoney - newcartlist[index].videoprice;
// newtotalmoney = newtotalmoney + tt;
// console.log('9999', newtotalmoney)
// } else {
// console.log('990099',newtotalmoney)
// console.log(pp)
// for (var i = 0; i < pp.length; i++) {
// newtotalmoney = newtotalmoney - pp[i]
// }
// console.log('666',newtotalmoney)
// newtotalmoney = newtotalmoney + tt
// }
} else {
newtotalmoney = newtotalmoney + tt
}
console.log(newtotalmoney)
// if(len==1){
// tt = Number(tt) + pp[len - 1];
// console.log(tt);
// }else{
// for (var i = 0; i < pp.length; i++) {
// newtotalmoney = newtotalmoney - pp[i];
// console.log(newtotalmoney)
// }
// }
// newtotalmoney = Number(newtotalmoney) +tt
// newcartlist[index].videoprice = newcartlist[index].video_id.videotype[e.detail.value]
newtotalmoney = newtotalmoney.toFixed(2)
if (newcartlist[index].sel == true) {
this.setData({
totalmoney: newtotalmoney
})
}
this.setData({
cartlist: newcartlist,
})
},
pay() {
let that = this;
let newcartlist = that.data.cartlist;
let newvideo_id = [];
let newpic_id = [];
let newvideo_attr = [];
for (var obj of newcartlist) {
if (obj.pic_id == null) {
newvideo_id.push(obj.video_id.id);
if (obj.video_id.videotype[obj.cartindex] == '2k') {
newvideo_attr.push(1)
} else if (obj.video_id.videotype[obj.cartindex] == '4k') {
newvideo_attr.push(2)
} else if (obj.video_id.videotype[obj.cartindex] == '8k') {
newvideo_attr.push(3)
}
} else if (obj.video_id == null) {
newpic_id.push(obj.pic_id.id)
}
}
that.setData({
video_id: newvideo_id,
pic_id: newpic_id,
video_attr: newvideo_attr
})
let url = 'user/orders';
let param = {
video_id: that.data.video_id.join(","),
pic_id: that.data.pic_id.join(","),
total: that.data.totalmoney,
video_attr: that.data.video_attr.join(",")
}
app.post(url, param, 'post').then((res) => {
console.log(res);
that.setData({
order_id: res.order_id,
tixian: true
})
}).catch((err) => {
console.log(err);
let pic_id = err.msg.pic_id;
let video_id = err.msg.video_id;
console.log(pic_id);
console.log(video_id)
if (pic_id == undefined) {
let newcartlist = that.data.cartlist;
console.log(newcartlist);
for (var obj of newcartlist) {
if (obj.video_id.id == video_id) {
wx.showToast({
title: '已经购买过' + obj.video_id.title,
icon: 'none'
})
}
}
} else if (video_id == undefined) {
let newcartlist = that.data.cartlist;
console.log(newcartlist);
for (var obj of newcartlist) {
if (obj.pic_id.id == pic_id) {
console.log(9999)
wx.showToast({
title: '已经购买过' + obj.pic_id.title,
icon: 'none'
})
}
}
}
console.log(video_id)
console.log(err.msg.msg)
})
},
payfinish() {
let that = this;
let url = 'user/orders';
let param = {
video_id: that.data.video_id.join(","),
pic_id: that.data.pic_id.join(","),
total: that.data.totalmoney
}
app.post(url, param, 'post').then((res) => {
console.log(res);
that.setData({
order_id: res.order_id
})
}).catch((err) => {
})
},
zhifuque() {
let that = this;
console.log(that.data.type)
if (this.data.type == 0) {
wx.showToast({
title: '请选择支付方式',
icon: 'none'
})
return false
}
that.setData({
xuzhi: true,
tixian: false
})
// if (this.data.xieyi == false) {
// wx.showToast({
// title: '请勾选服务协议',
// icon: 'none'
// })
// return false
// }
},
selxieyi() {
this.setData({
select: !this.data.select
})
},
quezhifu() {
let that = this;
console.log(that.data.type);
console.log(that.data.select)
if (that.data.select == false) {
wx.showToast({
title: '请勾选协议内容',
icon: "none"
})
return false
}
let url = 'pay/picpay';
let param = {
order_id: that.data.order_id,
type: that.data.type
}
app.post(url, param, 'post').then((res) => {
console.log(res);
if (that.data.type == 1) {
wx.showToast({
title: res,
icon: 'none'
})
that.delcart()
setTimeout(function () {
that.setData({
tixian: false
})
wx.navigateTo({
url: '/pages/orderbox/orderbox',
})
}, 1500)
} else if (that.data.type == 2) {
that.payment(res);
that.delcart()
}
}).catch((err) => {
console.log('9999', err);
console.log(err.msg.msg)
wx.showToast({
title: err.msg.msg,
icon: 'none'
})
})
},
payment(res) {
let that = this;
var timeStamp = res.timeStamp.toString();
// console.log(timeStamp);
wx.requestPayment({
timeStamp: timeStamp,
nonceStr: res.nonceStr,
package: res.package,
signType: res.signType,
paySign: res.paySign,
success: function(res) {
console.log(res)
wx.navigateTo({
url: '/pages/orderbox/orderbox',
})
},
fail: function(res) {
console.log(123);
console.log(res);
}
})
},
delcart() {
let that = this;
let url = 'user/delcar';
let param = {
ids: that.data.totalcartarr.join(",")
}
app.post(url, param, 'post').then((res) => {
console.log(res);
}).catch((err) => {
})
},
fuwuxieyi() {
wx.navigateTo({
url: '/pages/fuwuxieyi/fuwuxieyi',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "结算"
}
\ No newline at end of file
... ...
<view class="xiazairegister" wx:if="{{tixian}}" bindtap="hidetixian">
<view class="selecttixian" catchtap="ti">
<view class="tixianhead">
选择提现账户
</view>
<view class="tixianlist" wx:if="{{myinfo.is_vip==1}}">
<view class="tixianlistleft">
<view class="tixian">
<image src="/img/yueimg.png"></image>
</view>
<view class="tixianname">余额支付(当前账户余额为{{money}}元)</view>
</view>
<view class="tixianxuan" catchtap="yuzhi">
<image src="/img/xuanze.png" wx:if="{{yu==true}}"></image>
<image src="/img/zhifuno.png" wx:else></image>
</view>
</view>
<view class="tixianlist">
<view class="tixianlistleft">
<view class="tixian">
<image src="/img/weixinimg.png"></image>
</view>
<view class="tixianname">微信支付</view>
</view>
<view class="tixianxuan" catchtap="weizhi">
<image src="/img/xuanze.png" wx:if="{{wei==true}}"></image>
<image src="/img/zhifuno.png" wx:else></image>
</view>
</view>
<!-- <view class="yuedu">
<view class="yueduleft" catchtap="xuanxie">
<image src="/img/duigou.png" wx:if="{{xieyi==true}}"></image>
<image src="/img/noxieyi.png" wx:else></image>
</view>
<view class="yuedutext">
<view class="yueduagree"> 我已阅读并同意</view>
<view class="yuedujing" bindtap="fuwuxieyi">《服务协议》</view>
</view>
</view> -->
<view class="queren" catchtap="zhifuque">确认</view>
</view>
</view>
<view wx:if="{{xuzhi==false}}">
<view class="minehead">
<view class="mineheadleft">
<image src='{{myinfo.avatar}}'></image>
</view>
<view class="mineright">
<view class="minertop">
{{myinfo.nickname}}
</view>
<view class="mintbottom" wx:if="{{myinfo.is_vip==1}}">
<view class="vipimg">
<image src="/img/vipimg.png"></image>
</view>
<view class="vipmember">VIP会员</view>
</view>
</view>
</view>
<view class="cartbigboxz">
<view class="cartbox gouwubox" wx:for="{{cartlist}}" wx:key="">
<!-- 视频 -->
<view class="cartvideo" wx:if="{{item.video_id!=null}}">
<view class="cartbboxitem" wx:key="">
<view class="cartboxitemright">
<view class="videoitemimg">
<image src="{{item.video_id.thumbnail}}"></image>
<view class="anniu">
<image src="/img/anniu.png"></image>
</view>
</view>
<view class="cartboxitembottom">
<view class="cartboxitembotleft">
{{item.video_id.title}}
</view>
<picker bindchange="bindPickerChange" value="{{index}}" range="{{item.video_id.videotype}}" data-index="{{index}}">
<view class="cartboxitemrightone">
<view class="cartbox">{{item.video_id.videotype[item.cartindex]}}</view>
<view class="picxian"></view>
<view class="cartxuansan">
<image src="/img/sanjiaodown.png"></image>
</view>
</view>
</picker>
</view>
<view class="money">¥{{item.videoprice}}</view>
</view>
</view>
</view>
<!-- 图片 -->
<view class="picbox" wx:if="{{item.pic_id!=null}}">
<view class="cartbboxitem" wx:key="">
<view class="cartboxitemright">
<view class="videoitemimgp">
<image src="{{item.pic_id.thumbnail}}"></image>
</view>
<view class="cartboxitembottom">
<view class="cartboxitembotleft">
{{item.pic_id.title}}
</view>
<!-- <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
<view class="cartboxitemrightone">
<view class="cartbox">{{array[index]}}</view>
<view class="picxian"></view>
<view class="cartxuansan">
<image src="/img/sanjiaodown.png"></image>
</view>
</view>
</picker> -->
</view>
<view class="money" wx:if="{{item.pic_id.vipprice==undefined}}">¥{{item.pic_id.price}}</view>
<view class="money" wx:else>¥{{item.pic_id.vipprice}}</view>
</view>
</view>
</view>
</view>
</view>
<view class="cartfoot">
<view class="cartfootleft">
<view class="cartfootlefthe hejisuan">
<text> 合计:¥{{totalmoney}}</text>
<text class="totaljian">共{{cartlist.length}}件</text>
</view>
</view>
<view class="cartfootright" bindtap="pay">支付</view>
</view>
</view>
<view class="buybox" wx:else>
<view class="text">
亲爱的用户,您好
</view>
<view class="text">
欢迎您购买仁甲看见SHOP素材,为了让您购买愉快,请您在购买前务必仔细阅读以下内容:
</view>
<view class="secondtitle">关于购买及售后</view>
<view class="goumiatext">您可充值仁甲看见SHOP小程序账户,通过账户余额或微信钱包进行付费购买。注册本小程序VIP会员均可享有仁甲看见SHOP所有图片/视频素材七五折优惠。购买的素材将以链接形式发送至您百度云账号,您可通过搜索我的订单查找已购买的素材链接。购买后如若您需开发票,请仔细填写个人信息,本公司按您填写的地址及时邮寄发票。</view>
<view class="secondtitle">关于版权和使用权</view>
<view class="goumiatext">您购买的素材仅限贵单位使用于本协议中的指定用途,仅拥有使用权,不包含版权及著作权等;如若在其他项目中继续使用,须联系客服更新授权书(无限次免费),以避免日后出现的侵权事件造成的不必要麻烦。</view>
<view class="secondtitle">关于物权</view>
<view class="goumiatext">此微信小程序中图片/视频涉及的拍摄目标主要针对城市景观,如果客户在使用过程中出现涉及物权纠纷的案例,本公司及小程序概不负责。如果您介意此事,请慎重下单。</view>
<view class="secondtitle">关于素材质量</view>
<view class="goumiatext">素材拍摄使用的设备种类很多,本小程序内素材稳定性 分辨率 调色 光比等都会略有差别,建议您在下单购买之前认真查看小样,素材属于虚拟版权物品,一经售出概不接受任何理由的退换货。如果您介意此事,请慎重下单。</view>
<view class="goumiatext">我们摆上货架的商品都是仁甲看见仔细筛选和挑选的优质素材,部分航拍延时素材可能存在轻微抖动的问题,建议您在购买之前仔细查看预览视频及水印小样,以避免因为素材抖动问题带来的困扰和麻烦。如果您介意此事,请慎重下单。</view>
<view class="goumiatext">如果您在使用素材的过程中遇到其他问题或是有更好的建议请联系客服,我们会以第一时间与您沟通确保素材的正常使用。</view>
<view class="goumiatext">本制度最终解释权归山东仁甲看见影像服务有限公司所有。</view>
<view class="gouxuan" bindtap="selxieyi">
<view class="gouxuanleft">
<image src="/img/selectcart.png" wx:if="{{select}}"></image>
<image src="/img/noselect.png" wx:else></image>
</view>
<view class="gouxuanright">我已阅读该协议内容,并且同意素材售出概不退换</view>
</view>
<view class="quebtn" bindtap="quezhifu">确定</view>
</view>
\ No newline at end of file
... ...
.cartbox {
padding: 24rpx;
box-sizing: border-box;
color: #5b5e63;
font-size: 28rpx;
}
.gouwubox{
border-bottom:24rpx solid #f9f9f9
}
.cartbigboxz{
padding-bottom: 100rpx;
}
.cartbboxitem {
display: flex;
align-items: center;
/* margin-bottom: 48rpx; */
}
.cartboxitemleft {
width: 32rpx;
height: 32rpx;
font-size: 0;
}
.cartboxhead {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-end;
padding: 14rpx 26rpx;
box-sizing: border-box;
border-bottom: 24rpx solid #f9f9f9;
}
.cartboxheadright {
width: 35rpx;
height: 35rpx;
font-size: 0;
margin-right: 5rpx;
}
.cartboxrightname {
color: #bdc4ce;
font-size: 22rpx;
margin-top: 6rpx;
}
.videoitemimg {
width: 640rpx;
height: 360rpx;
font-size: 0;
position: relative;
}
.videoitemimgp {
width: 640rpx;
height: 212rpx;
font-size: 0;
}
.cartboxitemright {
margin-left: 24rpx;
}
.cartboxitembottom {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 24rpx;
}
.cartboxitemrightone {
display: flex;
align-items: center;
background: #f9f9f9;
height: 60rpx;
padding: 0 24rpx;
box-sizing: border-box;
}
.cartxuansan {
width: 28rpx;
height: 30rpx;
font-size: 0;
}
.picxian{
margin-right: 20rpx;
box-sizing: border-box
}
.money {
color: #ea322b;
font-size: 32rpx;
font-weight: bold;
margin-top:15rpx;
}
.cartfoot {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0;
box-sizing: border-box;
height: 88rpx;
position: fixed;
bottom:0;
left:0
}
.cartfootleft {
width: 470rpx;
height: 88rpx;
padding: 0 32rpx;
box-sizing: border-box;
display: flex;
align-items: center;
background: #fff;
}
.cartfootlefimg {
width: 32rpx;
height: 32rpx;
font-size: 0;
margin-top: 5rpx;
}
.cartfootlefthe {
margin-left: 24rpx;
color: #ea322b;
font-size: 28rpx;
font-weight: bold;
}
.cartfootright {
width: 280rpx;
background: #fb6324;
font-size: 32rpx;
color: #fff;
text-align: center;
height: 88rpx;
line-height: 88rpx;
}
.cartboxitembotleft {
color: #06121e;
font-size: 28rpx;
font-weight: bold;
}
.hejisuan{
display:flex;
align-items:center;
}
.totaljian{
color:#8C9198;
font-size: 24rpx;
font-weight: normal;
margin-left:24rpx;
}
.selecttixian {
width: 750rpx;
height: 580rpx;
background: #fff;
position: fixed;
bottom: 0;
left: 0;
z-index: 9999;
padding: 0 24rpx;
box-sizing: border-box;
}
.tixianhead {
padding: 24rpx 0;
box-sizing: border-box;
color: #5b5e63;
font-size: 32rpx;
border-bottom: 1rpx solid #f5f5f5;
}
.tixianlist {
display: flex;
align-items: center;
justify-content: space-between;
padding: 34rpx 42rpx 34rpx 0;
box-sizing: border-box;
border-bottom: 1rpx solid #f5f5f5;
}
.tixian {
width: 56rpx;
height: 60rpx;
font-size: 0;
}
.tixianname {
color: #06121e;
font-size: 28rpx;
margin-left: 10rpx;
}
.tixianxuan {
width: 28rpx;
height: 28rpx;
font-size: 0;
}
.tixianlistleft {
display: flex;
align-items: center;
}
.yuedu {
display: flex;
align-items: center;
margin-top: 35rpx;
}
.yueduleft {
width: 40rpx;
height: 40rpx;
font-size: 0;
}
.yuedutext {
display: flex;
align-items: center;
margin-left: 6rpx;
}
.yueduagree {
color: #8c9198;
font-size: 24rpx;
}
.yuedujing {
color: #fb6324;
font-size: 24rpx;
}
.queren {
width: 702rpx;
height: 88rpx;
background: rgba(251, 99, 36, 1);
opacity: 1;
border-radius: 4rpx;
color:#fff;
font-size: 32rpx;
text-align: center;
line-height: 88rpx;
margin:20rpx auto 0;
position: fixed;
bottom:40rpx;
left:24rpx;
}
.mineheadleft {
width: 104rpx;
height: 104rpx;
font-size: 0;
border-radius: 50%;
}
.mineheadleft image {
border-radius: 50%;
}
.minebox {
padding: 32rpx 24rpx;
box-sizing: border-box;
}
.minehead {
display: flex;
align-items: center;
padding: 32rpx 24rpx;
}
.mintbottom {
display: flex;
align-items: center;
margin-top: 18rpx;
}
.vipimg {
width: 32rpx;
height: 32rpx;
font-size: 0;
}
.mineright {
margin-left: 28rpx;
}
.minertop {
color: #06121e;
font-size: 36rpx;
font-weight: bold;
}
.vipmember {
color: #3d444d;
font-size: 24rpx;
margin-left: 5rpx;
}
.minebac {
width: 750rpx;
height: 350rpx;
font-size: 0;
position: relative;
}
.minetop {
color: #ae8538;
font-size: 30rpx;
position: absolute;
top: 68rpx;
left: 64rpx;
}
.minemoney {
color: #977434;
font-size: 52rpx;
font-weight: bold;
position: absolute;
top: 124rpx;
left: 64rpx;
}
.mineqian {
display: flex;
align-items: center;
position: absolute;
bottom: 78rpx;
right: 56rpx;
}
.mineqianleft {
width: 166rpx;
height: 64rpx;
background: linear-gradient(180deg, rgba(255, 253, 248, 1) 0%, rgba(255, 242, 208, 1) 100%);
opacity: 1;
border-radius: 36rpx;
color: #916e2c;
font-size: 28rpx;
text-align: center;
line-height: 64rpx;
margin-right:24rpx;
}
.mineqianright {
width: 166rpx;
height: 64rpx;
border: 2rpx solid rgba(255, 255, 255, 1);
opacity: 1;
border-radius: 36rpx;
color:#7B6011;
font-size: 28rpx;
text-align: center;
line-height: 64rpx;
}
.minelist{
padding: 0 32rpx;
box-sizing: border-box
}
.minelsititem{
display:flex;
align-items: center;
padding: 30rpx 0;
box-sizing: border-box;
border-bottom:1rpx solid #f5f5f5;
justify-content: space-between
}
.minelistleftimg{
width:50rpx;
height:50rpx;
font-size: 0
}
.minelsititemleft{
display:flex;
align-items: center
}
.minelsitleftname{
color:#06121E;
font-size: 30rpx;
margin-left:24rpx;
}
.mineleftright{
width:35rpx;
height:35rpx;
font-size: 0
}
.chongvip{
width:750rpx;
height:166rpx;
font-size: 0
}
\ No newline at end of file
... ...
// pages/jingmei/jingmei.js
var WxParse = require('../../wxParse/wxParse.js');
const app=getApp()
Page({
/**
* 页面的初始数据
*/
data: {
jingmeilist:[],
page:1
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.getjingmei()
},
//获取精美大片列表
getjingmei() {
let that = this;
let url = 'user/won';
let param={
page:that.data.page,
pageNum:10
}
app.post(url, param, 'post').then((res) => {
console.log(res);
that.setData({
jingmeilist: that.data.jingmeilist.concat(res)
})
let newjingmeilist = that.data.jingmeilist;
for (let i = 0; i < newjingmeilist.length; i++) {
console.log(i)
WxParse.wxParse('content' + i, 'html', newjingmeilist[i]['content'], that, 5);
if (i === newjingmeilist.length - 1) {
WxParse.wxParseTemArray("artileList", 'content', newjingmeilist.length, that)
}
}
that.setData({
jingmeilist:newjingmeilist
})
console.log(this.data.jingmeilist)
}).catch((err) => {
})
},
govideo(e) {
let url=e.currentTarget.dataset.url;
let thumb=e.currentTarget.dataset.thumb;
let title=e.currentTarget.dataset.title
wx.navigateTo({
url: '/pages/videoplay/videoplay?url='+url+'&thumb='+thumb+'&title='+title,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
let newpage=this.data.page;
newpage++;
this.setData({
page:newpage
})
this.getjingmei()
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "精美大片"
}
\ No newline at end of file
... ...
<import src="../../wxParse/wxParse.wxml" />
<view class="searchlist">
<view class="searchlistbox">
<view wx:for="{{jingmeilist}}" wx:for-index="idxs" wx:for-goodsid="{{item.goodsId}}" wx:key=''bindtap="govideo" data-url="{{item.video}}" data-thumb="{{item.share}}" data-title="{{item.title}}">
<view class="searchboximg">
<image src="{{item.thumbnail}}"></image>
<view class="anniu">
<image src="/img/anniu.png"></image>
</view>
</view>
<view class="biaoti">{{item.title}}</view>
<view class="texttu">
<block wx:for="{{artileList}}" wx:for-item="item" wx:for-index="idx" wx:key=''>
<block wx:if="{{idxs==idx}}">
<template is="wxParse" data="{{wxParseData:item}}" />
</block>
</block>
</view>
</view>
</view>
<!-- <view class="moreshuju">
<view class="moreshujuleft">
<image src="/img/more.png"></image>
</view>
<view class="moredata">点击加载更多</view>
</view> -->
</view>
\ No newline at end of file
... ...
/* pages/jingmei/jingmei.wxss */
.search{
width:700rpx;
margin:0 auto;
display:flex;
align-items: center;
margin-top:24rpx;
padding: 20rpx;
box-sizing: border-box;
background: #F9F9F9
}
.searchleft{
display:flex;
align-items: center
}
.searchright{
display:flex;
align-items: center;
margin-left:60rpx;
}
.searchsanjiao{
width:28rpx;
height:30rpx;
font-size: 0;
margin-left:8rpx;
}
.searchfightimg{
width:40rpx;
height:40rpx;
font-size: 0
}
.searchrightname{
margin-left:22rpx;
color:#8C9198;
font-size:28rpx;
}
.searchleftname{
color:#8C9198;
font-size:28rpx;
}
.searchimg{
width:702rpx;
height:235rpx;
font-size: 0;
margin-top:24rpx;
}
.searchbox{
margin-top:48rpx;
padding-bottom: 80rpx;
}
.searchjilu{
margin-top:40rpx;
}
.searchjiluitem{
/* width:168rpx;
height:68rpx; */
padding: 14rpx 24rpx;
box-sizing: border-box;
background: #F7F7F7;
margin-right: 24rpx;
margin-bottom:38rpx;
color:#3D444D;
font-size: 28rpx;
}
.history{
color:#06121E;
font-size:28rpx;
margin-top:38rpx;
padding: 0 26rpx;
box-sizing: border-box
}
.searchjilu{
padding: 40rpx 24rpx;
box-sizing: border-box;
display:flex;
align-items: center;
flex-wrap: wrap
}
.searchtop{
color:#06121E;
font-size: 28rpx;
}
.searchlist{
padding: 0 24rpx;
box-sizing: border-box;
margin-top:24rpx;
padding-bottom: 50rpx;
}
.searchboximg{
width:702rpx;
height:394rpx;
font-size: 0;
position: relative;
margin-top:24rpx;
border-radius:16rpx;
}
.searchboximg image{
border-radius:16rpx;
}
.moreshuju{
display:flex;
align-items: center;
justify-content: center;
margin-top:28rpx;
}
.moreshujuleft{
width:38rpx;
height:38rpx;
font-size: 0
}
.moredata{
color:#BDC4CE;
font-size: 28rpx;
margin-left:6rpx;
}
.biaoti{
color:#06121E;
font-size: 34rpx;
font-weight:bold;
margin-top:20rpx;
text-align: center
}
.texttu{
color:#06121E;
font-size: 28rpx;
margin-top:20rpx;
}
\ No newline at end of file
... ...